# Inline mathematic expression in MD with Mathjax

**URL:** <https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569>\
**Category:** DEVONthink\
**Created:** [February 14, 2022, 1:54pm UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569 "2022-02-14T13:54:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roland\_N](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/roland_n/32/7214_2.png) [@Roland\_N](https://discourse.devontechnologies.com/u/Roland_N)\
**Post date:** [February 14, 2022, 1:54pm UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/1 "2022-02-14T13:54:06Z")

</div>

Hello to the experts. I’ve found the following description from MathJax:  
Mathematics that is written in TeX or LaTeX format is indicated using math delimiters that surround the mathematics, telling MathJax what part of your page represents mathematics and what is normal text. There are two types of equations: ones that occur within a paragraph (in-line mathematics), and larger equations that appear separated from the rest of the text on lines by themselves (displayed mathematics).  
Now I did as described and found that the inline mathematics was not really inline since the letters size were as big as in the larger separated equation.  
When opening the file in obsidian, there is a better rendering as the inline maths have smaller letters which fits the lines.  
Is there something to do in the preferences? Or is this the standard solution? Is there somebody who can give me an advice?  
btw. for the inline equation the delimiter is $ _expression_ $ the other delimiter \ ( _expression_ \) will not work at all.

Best regards  
Roland

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [February 14, 2022, 3:57pm UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/2 "2022-02-14T15:57:28Z")

</div>

> [@Roland\_N](#):
>
> Is there something to do in the preferences?

Did you enable MathJAX in _Preferences \> Files \> Markdown_?

---

<div class="post-metadata">

**Author:** ![Roland\_N](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/roland_n/32/7214_2.png) [@Roland\_N](https://discourse.devontechnologies.com/u/Roland_N)\
**Post date:** [February 15, 2022, 9:00am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/3 "2022-02-15T09:00:09Z")

</div>

Of course, otherwise it will not show the rendered result.  
To my surprise, in the DTTG on iPad it looks as expected with the inline equation. It’s a strange behaviour.  
With Obsidian the result is as expected on both devices.

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [February 15, 2022, 9:04am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/4 "2022-02-15T09:04:18Z")

</div>

Could you please post an example document plus a screenshot of _Preferences \> Files \> Markdown_? Thanks!

---

<div class="post-metadata">

**Author:** ![Roland\_N](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/roland_n/32/7214_2.png) [@Roland\_N](https://discourse.devontechnologies.com/u/Roland_N)\
**Post date:** [February 15, 2022, 9:20am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/5 "2022-02-15T09:20:23Z")

</div>

The Preference setting

 ![Setting](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/a/5/a59b69bcf38c6f07f4e28a018e545362d8c77c76.jpeg)

and an example

 ![Example](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/3X/c/c/cccf00e84fbc06d504253e748825a0f2fba6fd8c.jpeg)

The inline equation delimiters are $-sign

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [February 15, 2022, 9:22am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/6 "2022-02-15T09:22:34Z")

</div>

The raw Markdown source would be great, thanks.

---

<div class="post-metadata">

**Author:** ![Roland\_N](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/roland_n/32/7214_2.png) [@Roland\_N](https://discourse.devontechnologies.com/u/Roland_N)\
**Post date:** [February 15, 2022, 9:25am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/7 "2022-02-15T09:25:47Z")

</div>

Here it is (the same as before in raw Text)

```auto
# A. The basis of thermal design
Cooling towers are designed such that a given amount of water is cooled down from a given inlet temperature by a required difference in temperature, taking into account the typical environmental conditions such as ambient pressure, temperature and humidity. In this process the heat is transferred from the cooling water to the air.
The amount of air that is required for cooling depends on the characteristics of the cooling tower packing. The outlet temperature ${T}_{C,w.out}$ of the cooling water is dependent on cooling water inlet temperature $T_{C,w.in}$, ambient air temperature $T_{C,a}$ wet bulb temperature $T_{C,wb}$ and atmospheric pressure $P_a$ and the magnitudes $(\dot{M}_w$ and $\dot{M}_a)$ of the entering flows as well as the transfer function K of the packing:

$${T}_{C,w.out} = f({\dot{M}_a| T_{C,w.in}| T_{C,WB}| T_{C,a}| p_A| \dot{M}_W| K })$$

T

```

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [February 15, 2022, 10:33am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/8 "2022-02-15T10:33:43Z")

</div>

When I look at the HTML generated by DT (by “Convert to HTML”), I can see that there’s nothing special happening: The inline expressions are simply `<span class="math">` elements. _However_, when I open that document (i.e. the HTML) in a browser, these `span` elements are augmented (for lack of a better expression) by a lot of stuff, some of it being inline styles (yuck). These are most probably inserted by the MathJax script, and one of first always sets the `font-size` attribute to 116%.

I’m not knowledgable enough to say if there’s something that can be done about that. _But_ given the expressions you’re using, I’d go out on a limb … increasing the font size for (e.g.) the T with the subscripts seems to be a reasonable decision, since the subscripts should be legible, too. And they’re by definition smaller than the subscripted symbols. Also, the `font-size` is the same for inline _and_ displayed symbols.

---

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [February 15, 2022, 11:04am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/9 "2022-02-15T11:04:02Z")

</div>

> [@chrillek](#):
>
> These are most probably inserted by the MathJax script, and one of first always sets the `font-size` attribute to 116%.

That’s right, most add-ons like MathJax or Prism change the rendering on the fly.

---

<div class="post-metadata">

**Author:** ![chrillek](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/chrillek/32/29340_2.png) [@chrillek](https://discourse.devontechnologies.com/u/chrillek)\
**Post date:** [February 15, 2022, 11:08am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/10 "2022-02-15T11:08:34Z")

</div>

The difference being that Prism uses classes whereas MathJax uses inline styles. Which makes Prism’s behaviour easy(er) to modify, whereas the MathJax approach prevents any modifications by the user.

---

<div class="post-metadata">

**Author:** ![system](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/2X/4/4e6ff70c96be2eb307a274d890bba8d71ba671b3.png) [@system](https://discourse.devontechnologies.com/u/system)\
**Post date:** [February 14, 2025, 11:08am UTC](https://discourse.devontechnologies.com/t/inline-mathematic-expression-in-md-with-mathjax/69569/11 "2025-02-14T11:08:36Z")

</div>

This topic was automatically closed 1095 days after the last reply. New replies are no longer allowed.
