Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why MathJax does not render the LaTeX logo with the "\LaTeX" macro?

Tags:

mathjax

I'm using MathJax in a hand-written web page (which is unfortunately not online yet, so I cannot point you to the whole source code).

I embed MathJax in the page as follows, which is simply copy/pasted from the official documentation:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    "HTML-CSS": {
      webFont: "TeX"
    }
  });
</script>
<script
  type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML.js">
</script>

After that, MathJax seems to work well on every formula I tried, but I cannot get it to render the \TeX and \LaTeX commands to obtain the TeX and LaTeX logos. Everything on the web makes it look like these two commands are supported by MathJax, and I remember of having used them with MathJax in a wordpress blog years ago, so I think there must be some extension or option missing.

So why are those commands not working and what can I do to fix them? Or are they not supported?

like image 730
gigabytes Avatar asked Nov 02 '25 15:11

gigabytes


1 Answers

MathJax only processes the math on the page, not other text-mode macros. So if you want MathJax to process the \TeX or \LaTeX macros, try using

$\rm\TeX$ or $\rm\LaTeX$

in your page instead.

EDIT: Here is an example. Run the code snippet to see it work.

<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>

\(\rm\TeX\) and \(\rm\LaTeX\)
like image 132
Davide Cervone Avatar answered Nov 04 '25 19:11

Davide Cervone



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!