* Proper syntax or format to convert markdown to html when mathjax is in the md
@ 2020-04-23 11:27 Robert Bower
[not found] ` <c99ef396-3c58-42ea-bdab-5807bb099248-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Robert Bower @ 2020-04-23 11:27 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1311 bytes --]
Yes,
I am having trouble converting markdown to html when I have mathjax in the
markdown document.
Here is the source of the markdown
I find this an easy way to post information for students.
<script type="text/javascript" async
src=
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML"
>
</script>
<p>
\( {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} \)
</p>
Here is the syntax I use:
pandoc --mathjax Math2.md -o Math2md.html
Here is what I get:
I find this an easy way to post information for students.
>
> ( {x = } )
>
If I look at source the javascript is there it is the
If I save the same document in wiki format and run
pandoc --mathjax Math2.wiki -o Math2wiki.html
The page renders correctly.
Is there a different command line switch I should use when converting from
markdown or something I need to add to the markdown?
Thanks
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c99ef396-3c58-42ea-bdab-5807bb099248%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3626 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Proper syntax or format to convert markdown to html when mathjax is in the md
[not found] ` <c99ef396-3c58-42ea-bdab-5807bb099248-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-04-23 13:19 ` Daniel Staal
[not found] ` <614001ec-12cb-b635-842c-e483aad42044-Jdbf3xiKgS8@public.gmane.org>
2020-04-23 20:54 ` Robert Bower
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Staal @ 2020-04-23 13:19 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
On 4/23/20 7:27 AM, Robert Bower wrote:
> Yes,
>
> I am having trouble converting markdown to html when I have mathjax in the markdown document.
>
> Here is the source of the markdown
>
> I find this an easy way to post information for students.
>
> <script type="text/javascript" async
> src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
> </script>
> <p>
> \( {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} \)
> </p>
>
Script elements don't get considered as Markdown, and I think that's
dropping you out here. What you need is to make it explicit that the
block is HTML, using a raw_attribute block:
---
I find this an easy way to post information for students.
```{=html}
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML">
</script>
<p>
\( {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} \)
</p>
```
---
Daniel T. Staal
--
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Proper syntax or format to convert markdown to html when mathjax is in the md
[not found] ` <614001ec-12cb-b635-842c-e483aad42044-Jdbf3xiKgS8@public.gmane.org>
@ 2020-04-23 13:24 ` Jeremy Theler
[not found] ` <c3d7739d9e45093376c9e68328362b2aeac7b02e.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Theler @ 2020-04-23 13:24 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
What about
I find this an easy way to post information for students.
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
--
jeremy theler
www.seamplex.com
On Thu, 2020-04-23 at 09:19 -0400, Daniel Staal wrote:
> On 4/23/20 7:27 AM, Robert Bower wrote:
> > Yes,
> >
> > I am having trouble converting markdown to html when I have mathjax
> > in the markdown document.
> >
> > Here is the source of the markdown
> >
> > I find this an easy way to post information for students.
> >
> > <script type="text/javascript" async
> > src="
> > https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML
> > ">
> > </script>
> > <p>
> > \( {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} \)
> > </p>
> >
>
> Script elements don't get considered as Markdown, and I think that's
> dropping you out here. What you need is to make it explicit that
> the
> block is HTML, using a raw_attribute block:
>
> ---
> I find this an easy way to post information for students.
>
> ```{=html}
> <script type="text/javascript" async
>
> src="
> https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML
> ">
> </script>
> <p>
> \( {x = \frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}} \)
> </p>
> ```
> ---
>
> Daniel T. Staal
>
> --
> ---------------------------------------------------------------
> This email copyright the author. Unless otherwise noted, you
> are expressly allowed to retransmit, quote, or otherwise use
> the contents for non-commercial purposes. This copyright will
> expire 5 years after the author's death, or in 30 years,
> whichever is longer, unless such a period is in excess of
> local copyright law.
> ---------------------------------------------------------------
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Proper syntax or format to convert markdown to html when mathjax is in the md
[not found] ` <c3d7739d9e45093376c9e68328362b2aeac7b02e.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
@ 2020-04-23 20:52 ` Robert Bower
0 siblings, 0 replies; 5+ messages in thread
From: Robert Bower @ 2020-04-23 20:52 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 45 bytes --]
Thank to both of you. Both methods worked.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Proper syntax or format to convert markdown to html when mathjax is in the md
[not found] ` <c99ef396-3c58-42ea-bdab-5807bb099248-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-23 13:19 ` Daniel Staal
@ 2020-04-23 20:54 ` Robert Bower
1 sibling, 0 replies; 5+ messages in thread
From: Robert Bower @ 2020-04-23 20:54 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 48 bytes --]
Thank you to both of you. Both methods worked.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-23 20:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 11:27 Proper syntax or format to convert markdown to html when mathjax is in the md Robert Bower
[not found] ` <c99ef396-3c58-42ea-bdab-5807bb099248-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-04-23 13:19 ` Daniel Staal
[not found] ` <614001ec-12cb-b635-842c-e483aad42044-Jdbf3xiKgS8@public.gmane.org>
2020-04-23 13:24 ` Jeremy Theler
[not found] ` <c3d7739d9e45093376c9e68328362b2aeac7b02e.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
2020-04-23 20:52 ` Robert Bower
2020-04-23 20:54 ` Robert Bower
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).