public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* \newcommand in LaTeX blocks inside Markdown inputs
@ 2015-11-10  0:47 Alex Polozov
  0 siblings, 0 replies; only message in thread
From: Alex Polozov @ 2015-11-10  0:47 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1603 bytes --]

While converting into non-LaTeX formats such as DOCX, pandoc can parse 
\newcommand macros in the input and apply them automatically to all 
following LaTeX markup in the document. However, such \newcommand macros 
have to be a part of regular input Markdown text:

\newcommand{\state}{\sigma}

Given an input state $\state$...


MathJax, on the other hand, requires \newcommand macros to be included in 
LaTeX blocks, not in plain text. If I'm writing my Markdown in an editor 
with live HTML preview based on MathJax (in my case, StackEdit 
<https://stackedit.io>), I have to write the following:

$$ \newcommand{\state}{\sigma} $$


Given an input state $\state$...


Unfortunately, I cannot pass the latter Markdown into Pandoc: it does not 
apply \newcommands in the resulting DOCX. Thus, I end up duplicating my 
preamble twice: with and without LaTeX embedding.

*Question: *can Pandoc parse \newcommand macros when they are embedded in 
LaTeX within Markdown? Is it an unsupported scenario or just a bug?

Thank you!
Alex.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/96425955-ddd6-4a4f-9b08-47fd619c7915%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3171 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-10  0:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10  0:47 \newcommand in LaTeX blocks inside Markdown inputs Alex Polozov

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).