MathJax icon indicating copy to clipboard operation
MathJax copied to clipboard

Missing standard core LaTeX symbols: /ae, /o, etc.

Open bdtc opened this issue 4 years ago • 1 comments

The following are standard LaTeX, and could be used inside \text for things like names attached to pieces of math, for example.

\oe         x0153
\OE         x0152
\ae         x00E6
\AE         x00C6
\aa         x00E5
\AA         x00C5
\o          x00F8
\O          x00D8
\l          x0142
\L          x0141
\ss         x00DF
\SS         x1E9E
\dag        x2020
\ddag       x2021
\P          x00B6
\copyright  x00A9
\pounds     x00A3

bdtc avatar Sep 10 '21 09:09 bdtc

There are several reasons these are not included. First, MathJax concentrates on math-mode macros, not text-mode ones. Even though you can use \text{}, by default very few text macros are processed. Second, MathJax doesn't usually define macros for characters that aren't in its default fonts, and most of the ones on your list are not in the MathJax fonts. That means MathJax would need to call on local fonts on your system, and the results would vary from user to user, depending on the fonts they have installed.

You can, of course, define these macros yourself in your MathJax configuration, if you are willing to accept the variation that users may see. You will need to include the textmacros package in your configuration, and you may want to set mtextInheritFont to true so that the unknown characters will match the rest of your text better. For example:

MathJax = {
  loader: {load: ['[tex]/textmacros']},
  tex: {
    packages: {'[+]': ['textmacros']},
    macros: {
      oe: '\u0153',
      OE: '\u0152',
      ae: '\u00E6',
      AE: '\u00C6',
      aa: '\u00E5',
      AA: '\u00C5',
      o:  '\u00F8',
      O:  '\u00D8',
      l:  '\u0142',
      L:  '\u0141',
      ss: '\u00DF',
      SS: '\u1E9E',
      dag: '\u2020',
      ddag: '\u2021',
      P:  '\u00B6',
      copyright: '\u00A9',
      pounds: '\u00A3'
    }
  },
  chtml: {
    mtextInheritFont: true
  },
  sag: {
    mtextInheritFont: true
  }
};

should do the trick.

dpvc avatar Sep 15 '21 23:09 dpvc