1 | initial version |
Here is a workaround, which allows me to paste latex commands into a computation cell, evaluate and display the results within the notebook.
First, in a separate input cell, load the latex packages that you need to deal with the latex code from the original document, e.g.:
latex.extra_macros('') latex.extra_preamble('') latex.add_to_preamble('\usepackage{amsmath}') latex.add_to_preamble('\usepackage{amssymb}') latex.add_to_preamble('\usepackage[natbib=true]{biblatex}') # natbib=true, because the original document uses \citet and \citep latex.add_to_preamble('\addbibresource{/path-to/MyLibrary.bib}') latex.add_to_preamble('\usepackage{hyperref}') latex.add_to_preamble('\usepackage[]{showlabels}') # To display equation labels on the side
Then, in every input cell, I first enter the following code, followed by the copied and pasted latex code:
%hide %latex \renewcommand{\ref}[1] {\url{#1}} % to print names of references
2 | No.2 Revision |
Here is a workaround, which allows me to paste latex commands into a computation cell, evaluate and display the results within the notebook.
First, in a separate input cell, load the latex packages that you need to deal with the latex code from the original document, e.g.:
latex.extra_macros('') latex.extra_preamble('') latex.add_to_preamble('\usepackage{amsmath}') latex.add_to_preamble('\usepackage{amssymb}')
latex.add_to_preamble('\usepackage[natbib=true]{biblatex}') # natbib=true, because the original document uses \citet andlatex.extra_macros('')
latex.extra_preamble('') `
latex.add_to_preamble('\usepackage{amsmath}')`
latex.add_to_preamble('\usepackage{amssymb}')`
latex.add_to_preamble('\addbibresource{/path-to/MyLibrary.bib}')
latex.add_to_preamble('\usepackage{hyperref}')
latex.add_to_preamble('\usepackage[]{showlabels}') # To display equation labels on the sideThen, in every input cell, I first enter the following code, followed by the copied and pasted latex code:
%hide %latex \renewcommand{\ref}[1] {\url{#1}} % to print names of references