# VSCode -- export of Jupyter Notebook & LaTeX math

**URL:** <https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568>\
**Category:** VS Code\
**Tags:** latex\
**Created:** [September 6, 2023, 11:40am UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568 "2023-09-06T11:40:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [September 6, 2023, 11:40am UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568/1 "2023-09-06T11:40:34Z")

</div>

I managed to install Python so that I can export HTML-files from VSCode/Jupyter Notebook to _HTML_ – but export to _PDF_ fails. I can get around this by opening the HTML file in MS Edge, and print to PDF from Edge – that seems to work fine.

There is a _bug_ in the conversion from VSCode to HTML…

This is what my text looks like in VSCode/Jupyter Notebook:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/2/8263fa0853f0e87122e9aafaee60da6606698dd9.png)

and this is what it looks like in the HTML file that is generated:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/b/ab7743b3f0005c25b98ae1bf6b2507a69f940697.png)

- Is there a way to get around this?

NOTE: When I open the file in IJulia instead of VSCode/Jupyter Notebook, IJulia has the same problem as the HTML file has, i.e., shows this `textnormal\.` string instead of the dot over the m…

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 6, 2023, 12:57pm UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568/2 "2023-09-06T12:57:50Z")

</div>

> [@BLI](#):
>
> When I open the file in IJulia instead of VSCode/Jupyter Notebook, IJulia has the same problem as the HTML file has, i.e., shows this `textnormal\.` string instead of the dot over the m…

Most of these tools are not using full LaTeX implementations, but rather are using things like [MathJax](https://www.mathjax.org/) that can render _most_ LaTeX equations.

Probably they just don’t all support `\textnormal`. I would suggest editing your equations to use `\dot{\mathrm{m}}_e` instead (or `\textrm`), which is a more typical and widely supported way to render \dot{\mathrm{m}}\_e in an equation.

(In particular, renderers like MathJax seem not to support `\textnormal` because [there _is_ no “normal text mode” in these packages](https://groups.google.com/g/mathjax-users/c/JC7L3lX54s4?pli=1) — they are _only_ for rendering LaTeX equations, not normal LaTeX text.)

PS. This has nothing to do with Unicode support (LaTeX ≠ Unicode), so I edited the title of your post accordingly.

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [September 6, 2023, 1:28pm UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568/3 "2023-09-06T13:28:44Z")

</div>

For what it’s worth, KaTeX [supports](https://katex.org/docs/support_table#t) `\textnormal` at least syntactically, and is available as a [JupyterLab extension](https://pypi.org/project/jupyterlab-katex/), but I’d go with the MathJax compatible solution too.

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [September 6, 2023, 2:20pm UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568/4 "2023-09-06T14:20:17Z")

</div>

Hm… I did not use `\textnormal`. I created  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/2/421bbba64b8946ee55b59a3c596480d049f7a87b.png)

in ModelingToolkit by `m\dot + TAB _e`. Is there a better way to do it so that I can avoid `\textnormal`? The `\textnormal` command must have been inserted by `latexify` or something.

---

<div class="post-metadata">

**Author:** ![skleinbo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skleinbo/32/36080_2.png) [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Post date:** [September 6, 2023, 2:49pm UTC](https://discourse.julialang.org/t/vscode-export-of-jupyter-notebook-latex-math/103568/5 "2023-09-06T14:49:57Z")

</div>

It comes from Latexify indeed:

```julia
julia> latexify(:(ṁ_e))
L"$\textnormal{\.{m}}_{e}$"

```

Related issue: [Change the behavior of bar? · Issue #243 · korsbo/Latexify.jl · GitHub](https://github.com/korsbo/Latexify.jl/issues/243)
