How to use MathJax Optentype fonts with XeLaTeX? The 2019 Stack Overflow Developer Survey...

Why “相同意思的词” is called “同义词” instead of "同意词"?

Why doesn't shell automatically fix "useless use of cat"?

Keeping a retro style to sci-fi spaceships?

What information about me do stores get via my credit card?

How do I free up internal storage if I don't have any apps downloaded?

writing variables above the numbers in tikz picture

How come people say “Would of”?

Slides for 30 min~1 hr Skype tenure track application interview

Worn-tile Scrabble

What do these terms in Caesar's Gallic wars mean?

Why can't devices on different VLANs, but on the same subnet, communicate?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

Is an up-to-date browser secure on an out-of-date OS?

Why doesn't UInt have a toDouble()?

What's the name of these plastic connectors

Kerning for subscripts of sigma?

Can we generate random numbers using irrational numbers like π and e?

How do PCB vias affect signal quality?

Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?

What do I do when my TA workload is more than expected?

Why not take a picture of a closer black hole?

What is this business jet?

Can there be female White Walkers?

Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?



How to use MathJax Optentype fonts with XeLaTeX?



The 2019 Stack Overflow Developer Survey Results Are InWhat math fonts are available that work in xelatex?Switching math fonts with unicode-mathHow to combine LaTeX fonts with system fonts in XeLaTeXIncomplete generation of Greek letters with Unicode and XeLaTeXSymbol sslash with XeLaTeX (and unicode-math)Bold italic math fonts with unicode-math (xelatex)Pencil symbol with xelatex (and unicode-math)Using multiple math fonts causes characters and spacing problems with delimitersXeLaTeX and Math Fonts from Main FontUse sans serif math operators with Roboto












1















I want to use MathJax opentype text and math fonts in my document. All the following fonts can be downloaded from this GitHub MathJax page.



MathJax_AMS-Regular.otf          MathJax_SansSerif-Bold.otf
MathJax_Caligraphic-Bold.otf MathJax_SansSerif-Italic.otf
MathJax_Caligraphic-Regular.otf MathJax_SansSerif-Regular.otf
MathJax_Fraktur-Bold.otf MathJax_Script-Regular.otf
MathJax_Fraktur-Regular.otf MathJax_Size1-Regular.otf
MathJax_Main-Bold.otf MathJax_Size2-Regular.otf
MathJax_Main-Italic.otf MathJax_Size3-Regular.otf
MathJax_Main-Regular.otf MathJax_Size4-Regular.otf
MathJax_Math-BoldItalic.otf MathJax_Typewriter-Regular.otf
MathJax_Math-Italic.otf MathJax_WinChrome-Regular.otf
MathJax_Math-Regular.otf MathJax_WinIE6-Regular.otf


For text, I was able to get things working, but for math it is too tricky. I tried mathspec and unicode-math without success. I used XeLaTeX before with other math fonts successfully, but it doesn't work properly with this font. Some people went farther and succeeded in compiling the MathJax fonts even with pdfLaTeX and got awesome results. It will be fine for me to just make it work with XeLaTeX.



Here is my attempt with unsatisfying output:



documentclass[a4paper,12pt]{article}

usepackage{amsmath}
usepackage{mathspec}

setmainfont{MathJax_Main-Regular.otf}[
UprightFont = MathJax_Main-Regular,
ItalicFont = MathJax_Main-Italic,
BoldFont = MathJax_Main-Bold
]

setmathrm{MathJax_Main-Regular.otf} % for sin cos ln max ..
setmathsfont(Digits){MathJax_Main-Regular.otf}
setmathsfont(Latin,Greek){MathJax_Math-Italic.otf}
setboldmathrm{MathJax_Math-BoldItalic.otf}

usepackage{bm}

begin{document}

section{Mathjax fonts}

subsection{Main fonts}
Roman: `The quick brown fox jumps over the lazy dog.' 0123456789\
Italic: textit{`The quick brown fox jumps over the lazy dog.' 0123456789}\
Bold: textbf{`The quick brown fox jumps over the lazy dog.' 0123456789}

subsection{Math}
Numbers: $123,456.7890$\
Alphabet: $abcdefghijklmnopqrstuvwxyz$ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$\
Calligraphic: $mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
Accents: $hat f vec f ddot f dot f bar fcheck f tilde f acute f grave f breve f$\
Greek: $alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega$
$Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega$\
Operators: $costheta$, $ln x$, $a bmod n$, etc.\
Big operators:
[ f(x) = sum_{n = -infty}^infty c_{n}e^{jnx} ]
[ c_{n} = frac{1}{2}int_{-pi}^{pi}f(x)e^{-jnx},mathrm dx ]
%
Bold italic: $bm{abcdefghijklmnopqrstuvwxyz}$\
Bold rm: $mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
Bold italic: $bm{alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega}$

end{document}


enter image description here









share



























    1















    I want to use MathJax opentype text and math fonts in my document. All the following fonts can be downloaded from this GitHub MathJax page.



    MathJax_AMS-Regular.otf          MathJax_SansSerif-Bold.otf
    MathJax_Caligraphic-Bold.otf MathJax_SansSerif-Italic.otf
    MathJax_Caligraphic-Regular.otf MathJax_SansSerif-Regular.otf
    MathJax_Fraktur-Bold.otf MathJax_Script-Regular.otf
    MathJax_Fraktur-Regular.otf MathJax_Size1-Regular.otf
    MathJax_Main-Bold.otf MathJax_Size2-Regular.otf
    MathJax_Main-Italic.otf MathJax_Size3-Regular.otf
    MathJax_Main-Regular.otf MathJax_Size4-Regular.otf
    MathJax_Math-BoldItalic.otf MathJax_Typewriter-Regular.otf
    MathJax_Math-Italic.otf MathJax_WinChrome-Regular.otf
    MathJax_Math-Regular.otf MathJax_WinIE6-Regular.otf


    For text, I was able to get things working, but for math it is too tricky. I tried mathspec and unicode-math without success. I used XeLaTeX before with other math fonts successfully, but it doesn't work properly with this font. Some people went farther and succeeded in compiling the MathJax fonts even with pdfLaTeX and got awesome results. It will be fine for me to just make it work with XeLaTeX.



    Here is my attempt with unsatisfying output:



    documentclass[a4paper,12pt]{article}

    usepackage{amsmath}
    usepackage{mathspec}

    setmainfont{MathJax_Main-Regular.otf}[
    UprightFont = MathJax_Main-Regular,
    ItalicFont = MathJax_Main-Italic,
    BoldFont = MathJax_Main-Bold
    ]

    setmathrm{MathJax_Main-Regular.otf} % for sin cos ln max ..
    setmathsfont(Digits){MathJax_Main-Regular.otf}
    setmathsfont(Latin,Greek){MathJax_Math-Italic.otf}
    setboldmathrm{MathJax_Math-BoldItalic.otf}

    usepackage{bm}

    begin{document}

    section{Mathjax fonts}

    subsection{Main fonts}
    Roman: `The quick brown fox jumps over the lazy dog.' 0123456789\
    Italic: textit{`The quick brown fox jumps over the lazy dog.' 0123456789}\
    Bold: textbf{`The quick brown fox jumps over the lazy dog.' 0123456789}

    subsection{Math}
    Numbers: $123,456.7890$\
    Alphabet: $abcdefghijklmnopqrstuvwxyz$ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$\
    Calligraphic: $mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
    Accents: $hat f vec f ddot f dot f bar fcheck f tilde f acute f grave f breve f$\
    Greek: $alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega$
    $Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega$\
    Operators: $costheta$, $ln x$, $a bmod n$, etc.\
    Big operators:
    [ f(x) = sum_{n = -infty}^infty c_{n}e^{jnx} ]
    [ c_{n} = frac{1}{2}int_{-pi}^{pi}f(x)e^{-jnx},mathrm dx ]
    %
    Bold italic: $bm{abcdefghijklmnopqrstuvwxyz}$\
    Bold rm: $mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
    Bold italic: $bm{alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega}$

    end{document}


    enter image description here









    share

























      1












      1








      1








      I want to use MathJax opentype text and math fonts in my document. All the following fonts can be downloaded from this GitHub MathJax page.



      MathJax_AMS-Regular.otf          MathJax_SansSerif-Bold.otf
      MathJax_Caligraphic-Bold.otf MathJax_SansSerif-Italic.otf
      MathJax_Caligraphic-Regular.otf MathJax_SansSerif-Regular.otf
      MathJax_Fraktur-Bold.otf MathJax_Script-Regular.otf
      MathJax_Fraktur-Regular.otf MathJax_Size1-Regular.otf
      MathJax_Main-Bold.otf MathJax_Size2-Regular.otf
      MathJax_Main-Italic.otf MathJax_Size3-Regular.otf
      MathJax_Main-Regular.otf MathJax_Size4-Regular.otf
      MathJax_Math-BoldItalic.otf MathJax_Typewriter-Regular.otf
      MathJax_Math-Italic.otf MathJax_WinChrome-Regular.otf
      MathJax_Math-Regular.otf MathJax_WinIE6-Regular.otf


      For text, I was able to get things working, but for math it is too tricky. I tried mathspec and unicode-math without success. I used XeLaTeX before with other math fonts successfully, but it doesn't work properly with this font. Some people went farther and succeeded in compiling the MathJax fonts even with pdfLaTeX and got awesome results. It will be fine for me to just make it work with XeLaTeX.



      Here is my attempt with unsatisfying output:



      documentclass[a4paper,12pt]{article}

      usepackage{amsmath}
      usepackage{mathspec}

      setmainfont{MathJax_Main-Regular.otf}[
      UprightFont = MathJax_Main-Regular,
      ItalicFont = MathJax_Main-Italic,
      BoldFont = MathJax_Main-Bold
      ]

      setmathrm{MathJax_Main-Regular.otf} % for sin cos ln max ..
      setmathsfont(Digits){MathJax_Main-Regular.otf}
      setmathsfont(Latin,Greek){MathJax_Math-Italic.otf}
      setboldmathrm{MathJax_Math-BoldItalic.otf}

      usepackage{bm}

      begin{document}

      section{Mathjax fonts}

      subsection{Main fonts}
      Roman: `The quick brown fox jumps over the lazy dog.' 0123456789\
      Italic: textit{`The quick brown fox jumps over the lazy dog.' 0123456789}\
      Bold: textbf{`The quick brown fox jumps over the lazy dog.' 0123456789}

      subsection{Math}
      Numbers: $123,456.7890$\
      Alphabet: $abcdefghijklmnopqrstuvwxyz$ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$\
      Calligraphic: $mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
      Accents: $hat f vec f ddot f dot f bar fcheck f tilde f acute f grave f breve f$\
      Greek: $alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega$
      $Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega$\
      Operators: $costheta$, $ln x$, $a bmod n$, etc.\
      Big operators:
      [ f(x) = sum_{n = -infty}^infty c_{n}e^{jnx} ]
      [ c_{n} = frac{1}{2}int_{-pi}^{pi}f(x)e^{-jnx},mathrm dx ]
      %
      Bold italic: $bm{abcdefghijklmnopqrstuvwxyz}$\
      Bold rm: $mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
      Bold italic: $bm{alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega}$

      end{document}


      enter image description here









      share














      I want to use MathJax opentype text and math fonts in my document. All the following fonts can be downloaded from this GitHub MathJax page.



      MathJax_AMS-Regular.otf          MathJax_SansSerif-Bold.otf
      MathJax_Caligraphic-Bold.otf MathJax_SansSerif-Italic.otf
      MathJax_Caligraphic-Regular.otf MathJax_SansSerif-Regular.otf
      MathJax_Fraktur-Bold.otf MathJax_Script-Regular.otf
      MathJax_Fraktur-Regular.otf MathJax_Size1-Regular.otf
      MathJax_Main-Bold.otf MathJax_Size2-Regular.otf
      MathJax_Main-Italic.otf MathJax_Size3-Regular.otf
      MathJax_Main-Regular.otf MathJax_Size4-Regular.otf
      MathJax_Math-BoldItalic.otf MathJax_Typewriter-Regular.otf
      MathJax_Math-Italic.otf MathJax_WinChrome-Regular.otf
      MathJax_Math-Regular.otf MathJax_WinIE6-Regular.otf


      For text, I was able to get things working, but for math it is too tricky. I tried mathspec and unicode-math without success. I used XeLaTeX before with other math fonts successfully, but it doesn't work properly with this font. Some people went farther and succeeded in compiling the MathJax fonts even with pdfLaTeX and got awesome results. It will be fine for me to just make it work with XeLaTeX.



      Here is my attempt with unsatisfying output:



      documentclass[a4paper,12pt]{article}

      usepackage{amsmath}
      usepackage{mathspec}

      setmainfont{MathJax_Main-Regular.otf}[
      UprightFont = MathJax_Main-Regular,
      ItalicFont = MathJax_Main-Italic,
      BoldFont = MathJax_Main-Bold
      ]

      setmathrm{MathJax_Main-Regular.otf} % for sin cos ln max ..
      setmathsfont(Digits){MathJax_Main-Regular.otf}
      setmathsfont(Latin,Greek){MathJax_Math-Italic.otf}
      setboldmathrm{MathJax_Math-BoldItalic.otf}

      usepackage{bm}

      begin{document}

      section{Mathjax fonts}

      subsection{Main fonts}
      Roman: `The quick brown fox jumps over the lazy dog.' 0123456789\
      Italic: textit{`The quick brown fox jumps over the lazy dog.' 0123456789}\
      Bold: textbf{`The quick brown fox jumps over the lazy dog.' 0123456789}

      subsection{Math}
      Numbers: $123,456.7890$\
      Alphabet: $abcdefghijklmnopqrstuvwxyz$ $ABCDEFGHIJKLMNOPQRSTUVWXYZ$\
      Calligraphic: $mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
      Accents: $hat f vec f ddot f dot f bar fcheck f tilde f acute f grave f breve f$\
      Greek: $alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega$
      $Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega$\
      Operators: $costheta$, $ln x$, $a bmod n$, etc.\
      Big operators:
      [ f(x) = sum_{n = -infty}^infty c_{n}e^{jnx} ]
      [ c_{n} = frac{1}{2}int_{-pi}^{pi}f(x)e^{-jnx},mathrm dx ]
      %
      Bold italic: $bm{abcdefghijklmnopqrstuvwxyz}$\
      Bold rm: $mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$\
      Bold italic: $bm{alpha beta gamma delta epsilon varepsilon zeta eta theta vartheta iota kappa lambda mu nu xi pi varpi rho varrho sigma varsigma tau upsilon phi varphi chi psi omega Gamma Delta Theta Lambda Xi Pi Sigma Upsilon Phi Psi Omega}$

      end{document}


      enter image description here







      xetex unicode-math mathspec math-fonts





      share












      share










      share



      share










      asked 5 mins ago









      AboAmmarAboAmmar

      34.5k32985




      34.5k32985






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f484424%2fhow-to-use-mathjax-optentype-fonts-with-xelatex%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f484424%2fhow-to-use-mathjax-optentype-fonts-with-xelatex%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          IEEEtran - How to include ORCID in TeX/PDF with PdfLatexIs there a standard way to include ORCID in TeX /...

          Cicindela nigrior Przypisy | Menu nawigacyjneCicindela varians unicolorManual for the Identification of the...

          Glossaries-extra: Adding glossaries package to “Clas­sicTh­e­sis” template by Dr. André Miede v. 4.6 ...