# Want to modify default font of Latex

**URL:** <https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580>\
**Category:** JupyterLab\
**Tags:** jupyterlab, help-wanted\
**Created:** [March 17, 2024, 12:14pm UTC](https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580 "2024-03-17T12:14:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exolune](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Exolune](https://discourse.jupyter.org/u/Exolune)\
**Post date:** [March 17, 2024, 12:14pm UTC](https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580/1 "2024-03-17T12:14:05Z")

</div>

Hello all,  
I’m new user of Jupyter Lab (using the online version) and wondering if there is a way to have latex prints not in italic ?

thanks for your help

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [March 17, 2024, 3:55pm UTC](https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580/2 "2024-03-17T15:55:10Z")

</div>

It would probably help in this case if you provided example code you are using and seeing italics.

---

<div class="post-metadata">

**Author:** ![Exolune](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@Exolune](https://discourse.jupyter.org/u/Exolune)\
**Post date:** [March 17, 2024, 6:02pm UTC](https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580/3 "2024-03-17T18:02:09Z")

</div>

Hello fomightez,

thanks a lot for your help, it’s simply the example from the Jupyter lab, it appears in italic by default

$$  
\begin{aligned}  
\dot{x} & = \sigma(y-x) \  
\dot{y} & = \rho x - y - xz \  
\dot{z} & = -\beta z + xy  
\end{aligned}  
$$

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [March 17, 2024, 8:53pm UTC](https://discourse.jupyter.org/t/want-to-modify-default-font-of-latex/24580/4 "2024-03-17T20:53:28Z")

</div>

> “IPython notebook uses [MathJax](http://www.mathjax.org/) to render LaTeX inside html/markdown. Just put your LaTeX math inside `$$`.” - [SOURCE](https://stackoverflow.com/a/13222501/8508004)

IPython notebook evolved into the Jupyter project

Math tends to be displayed in italics and so I think so it is often used for that, it defaults to that. And you happened to supply a version of code that uses that ability and so it is in italics. However, you have a lot of control. This below shouldn’t display as italics for you:

```plaintext
$$\text{Hello world! this is text without italics!}$$

```

You’ll note that it is pretty straightforward once you add some wrapping of the text you want in `\text{}` instead of getting the default italicized math.

You can do it inline, too:

```plaintext
This is normal markdown. $\text{Hello world! this is text without italics!}$ This is normal markdown after inline MAthJax.

```

You’ll even note in some math equations you combine text in with the italicized math, for example with differentials (below is adapted from [here](https://discourse.jupyter.org/t/display-command-output-as-math-ipython-display-math/3125/3) to show a differential):

```plaintext
$$\int_{{t=0}}^1 \frac{{1}}{{1+t^2}}\,\text{d}t$$

```

In non-math speak: The particular part I am referencing is the part on the right `\text{d}t`, where the `d` is not italicized.

I’ll put some resources below that you can look into as Latex allows a lot of control and is quite a powerful tech itself:

- [LaTeX cheat sheet](https://wch.github.io/latexsheet/)
- [Another LaTeX cheat shee](https://people.cs.umass.edu/~freedman/resources/Freedman_LaTeXCheatSheet.pdf)
