mmd2tex fails to generate macros specified in mathjax config portion of HTML Header block

19 views
Skip to first unread message

Anne Dranovski

unread,
Sep 18, 2016, 10:24:21 PM9/18/16
to MultiMarkdown Discussion List
I have something like this 

HTML header: <script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
RR: "{\\bf R}",
bold: ["{\\bf #1}",1],
Abs: ['\\left\\lvert #2 \\right\\rvert_{\\text{#1}}', 2, ""]
}
}
});
</script>
...
# begin markdown .. some math
 in my file. When I run mmd2tex on my file (mmd2tex test.md) the tex file is incomplete. It's missing a documentclass and document wrapper and it's missing the macros i have defined. There is no "\bold" command in the preamble for example. Running pandoc on my file btw, with the extension markdown+mmd_header_identifiers also fails to read/generate the macros.

Fletcher T. Penney

unread,
Sep 18, 2016, 10:32:43 PM9/18/16
to Anne Dranovski, MultiMarkdown Discussion List
I'm not entirely clear on what you're doing and what you think the
result will be.

You are defining a bunch of metadata keys (e.g. "TeX", "Macros", "RR",
etc.) some of which are empty and none of which have any meaning to MMD.

If all of that is supposed to be part of the <script>, then you need to
indent each line after the "HTML header" line so that it is considered
one "thing."

I'm confused -- are you trying to create an HTML document (using
MathJax) or a LaTeX document (which has nothing to do with MathJax)?


In either case, you don't include any LaTeX setup information in your
headers, therefore there's none in your document. See the Sample
documents for examples of working LaTeX files:

https://github.com/fletcher/MultiMarkdown-Gallery



Fletcher
> --
> You received this message because you are subscribed to the Google
> Groups "MultiMarkdown Discussion List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to multimarkdow...@googlegroups.com
> <mailto:multimarkdow...@googlegroups.com>.
> To post to this group, send email to multim...@googlegroups.com
> <mailto:multim...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/multimarkdown.
> For more options, visit https://groups.google.com/d/optout.

--
Fletcher T. Penney
fletche...@gmail.com
Reply all
Reply to author
Forward
0 new messages