HTML export not including MathJax CDN link

d.avitabile's Avatar

d.avitabile

19 Aug, 2020 07:32 AM

Hi All,

this may be a silly question. When I export to HTML files that contain some maths and for which maths is displayed correctly in the preview (attached is a minimal example), the HTML does not render the formulas. I've read in the documentation that if one chooses to include MathJax in the HTML, then a CDN link will be included. My HTML does not include any Mathjax link though.

Is there an option to tick? I really could not find it in Markded 2.5.43 (990).

Thank you
Daniele

  1. Support Staff 1 Posted by Brett on 19 Aug, 2020 12:52 PM

    Brett's Avatar

    Looks like a bug on my end. Unrelated, you should update to the latest
    version, there have been a lot of other improvements. I'll try to get
    the MathJax CDN issue fixed for the next update.

    Thanks,
    Brett

  2. 2 Posted by d.avitabile on 19 Aug, 2020 01:15 PM

    d.avitabile's Avatar

    Hi Brett,

    I’ve updated, thanks. Sorry that I’m bothering you again. Using Marked2
    I’ve managed to create a large document for an online conference with 1000
    attendees (see attached) and I was hoping to display some math (the booklet
    must be html, and I’m receiving very positive comments). Would you be able
    to write the lines of html I need to make this work? I could simply copy
    them in the final html, and this would help me having a booklet in time for
    tomrrow… conference on Monday...

  3. 3 Posted by d.avitabile on 19 Aug, 2020 01:18 PM

    d.avitabile's Avatar

    Also Brett, I've realised that posting the previous comment via email made the html file available on the forum, and this gives away credentials to the conference. Would it be possible to remove the post, or simply the attachment? I'm not managing to do that

  4. 4 Posted by d.avitabile on 19 Aug, 2020 01:22 PM

    d.avitabile's Avatar

    I've made the discussion private, for now.

  5. Support Staff 5 Posted by Brett on 19 Aug, 2020 01:40 PM

    Brett's Avatar

    Deleted, but making it private will be protection as well.

  6. Support Staff 6 Posted by Brett on 19 Aug, 2020 01:43 PM

    Brett's Avatar

    To add the CDN link in manually, insert this inside the head tag (before the style tag, for example):

     <script async src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_CHTML"></script>
    

    You'll probably want to adjust the config to match whatever preset you're using in Marked's Preferences->Style Mathjax setup.

  7. 7 Posted by d.avitabile on 20 Aug, 2020 12:18 PM

    d.avitabile's Avatar

    It works, thank you!

    Daniele Avitabile
    Associate Professor in Applied Mathematics
    Vrije Universiteit Amsterdam
    www.danieleavitabile.com

  8. Support Staff 8 Posted by Brett on 03 Sep, 2020 12:41 PM

    Brett's Avatar

    This should be fixed in the next update.

  9. Brett closed this discussion on 03 Sep, 2020 12:41 PM.

  10. d.avitabile re-opened this discussion on 03 Sep, 2020 01:19 PM

  11. 9 Posted by d.avitabile on 03 Sep, 2020 01:19 PM

    d.avitabile's Avatar

    Excellent, thank you once again.

    PS: the booklet of our conference mentioned explicitly in the Colophon that
    we’ve made it using Marked2. Thanks for producing very useful software!

  12. Brett closed this discussion on 24 Sep, 2020 02:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac