sans-serif font with CHTML

36 views
Skip to first unread message

dei...@gmail.com

unread,
Oct 24, 2016, 7:47:59 AM10/24/16
to MathJax Users
Is it possible to do the same as here for CHTML?

https://groups.google.com/d/msg/mathjax-users/PjcC7lqbNGs/z-EafIHplpoJ

        <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
     "HTML-CSS": {availableFonts: ["TeX"]},
         MMLorHTML: {prefer: "HTML"}
  });
    MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
      var VARIANT = MathJax.OutputJax["HTML-CSS"].FONTDATA.VARIANT;
  VARIANT["normal"].fonts.unshift("MathJax_SansSerif");
  VARIANT["bold"].fonts.unshift("MathJax_SansSerif-bold");
       VARIANT["italic"].fonts.unshift("MathJax_SansSerif-italic");
   VARIANT["-tex-mathit"].fonts.unshift("MathJax_SansSerif-italic");
    });
    MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
   var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;
  VARIANT["normal"].fonts.unshift("MathJax_SansSerif");
  VARIANT["bold"].fonts.unshift("MathJax_SansSerif-bold");
       VARIANT["italic"].fonts.unshift("MathJax_SansSerif-italic");
   VARIANT["-tex-mathit"].fonts.unshift("MathJax_SansSerif-italic");
    });
    </script>


Peter Krautzberger

unread,
Oct 24, 2016, 9:48:50 AM10/24/16
to mathja...@googlegroups.com
Hi,

Hm. The obvious way does not seem to work (http://codepen.io/pkra/pen/rrPPAV)

@dpvc do you have an idea what I did wrong in my example?

Peter.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davide Cervone

unread,
Oct 24, 2016, 11:12:51 AM10/24/16
to mathja...@googlegroups.com
You need to use "...-Italic" (capitalized) for the font names being unshifted (different from HTML-CSS).  With that you should be able to get your code to work.

Davide


To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

Peter Krautzberger

unread,
Oct 24, 2016, 11:14:54 AM10/24/16
to mathja...@googlegroups.com
You need to use "...-Italic" (capitalized) for the font names being unshifted (different from HTML-CSS).  

Ah! I did not notice that. Works great.

I've updated the codepen example. 
Peter.

On Mon, Oct 24, 2016 at 5:12 PM, Davide Cervone <dpv...@gmail.com> wrote:
You need to use "...-Italic" (capitalized) for the font names being unshifted (different from HTML-CSS).  With that you should be able to get your code to work.

Davide
Message has been deleted
Message has been deleted

Audrey Krawec

unread,
Oct 26, 2016, 12:27:16 PM10/26/16
to MathJax Users
Thank you, MathJax Team, for this post. This is exactly the information I have been searching for the past few days ... the configuration works perfectly. KUDOs again to your team for its technical expertise and endless efforts into this project!

Kindest regards,
Audrey
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.

Peter Krautzberger

unread,
Oct 27, 2016, 3:14:07 AM10/27/16
to mathja...@googlegroups.com
Thanks for the kind words, Audrey. Glad this helped you.

Regards,
Peter.

To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages