1

I want to type the following formula in mkdocs using Mathjax

$$\text{Volumenänderungsarbeit} & L_\text{vol} = -\int p \,dV$$

The problem is the German umlaut ä that I am using. If I remove it, then everything is fine. I tried to replace it but it does not work.

  • \text{Volumen{\"a}nderungsarbeit}
  • \text{Volumen"anderungsarbeit}
  • \text{Volumen}{\"a}\text{nderungsarbeit}
  • \text{Volumen\"anderungsarbeit}
MrYouMath
  • 547
  • 2
  • 13
  • 34
  • 2
    Mathjax is not TeX or LaTeX. Use HTML entities like `ä`. – n. m. could be an AI Jan 09 '18 at 13:18
  • Thank you for your answer. I tried your solution and it works. If I am writing on MathStackExchange I can simply write ä, is there a way to turn this feature on in mkdocs/HTLM? – MrYouMath Jan 09 '18 at 14:13
  • I think you should be able to write ä but you need to use the correct encoding (likely UTF-8) whereas ampersand-entities always work. – n. m. could be an AI Jan 09 '18 at 14:37
  • 2
    I'm not sure how Mathjax handles Unicode characters, which may be the cause of your problem (and why I'm not providing an answer). Python-Markdown (which MkDocs uses under the hood) will properly pass Unicode characters through unaltered. It all works only if your Markdown pages and MkDocs templates are properly encoded and the resulting HTML is served with the proper encoding (usually UTF-8). However, if any one of those things is missing, it all falls down. Therefore, as the output is HTML, HTML entities are the best way to ensure they display correctly everywhere. – Waylan Jan 09 '18 at 15:20
  • @Waylan: Thank you a lot for your comment. And +1 for your great answer https://stackoverflow.com/questions/27882261/mkdocs-and-mathjax/31926644#31926644 – MrYouMath Jan 09 '18 at 15:21

0 Answers0