* Simple filter to strip outer math environment, for use in Typora?
@ 2018-06-24 18:37 Gandalf Saxe
0 siblings, 0 replies; only message in thread
From: Gandalf Saxe @ 2018-06-24 18:37 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1592 bytes --]
Hi,
I'm frequently using Typora <https://typora.io>, which have the problem
that this will not show up as a live math preview:
\begin{align}
...
\end{align}
, however this will:
$$
> \begin{align}
> ...
> \end{align}
> $$
But since nested math environments are not allowed in LaTeX, one will get
this error when trying to convert .md to .pdf with pandoc:
! Package amsmath Error: Erroneous nesting of equation structures;
> (amsmath) trying to recover with `aligned'.
I've tried `aligned`, and the problem is that it's not equivalent to
`align` since none of the lines are numbered.
So I could really need a filter to simply strip the outer displaymath
environment, so that I could write:
$$
> \begin{align}
> ...
> \end{align}
> $$
But filter the AST such that only the align is left.
\begin{align}
> ...
> \end{align}
>
This filter would be very useful to all Typora users who are also using
pandoc. I suspect this should be pretty easy if you know how. Would
appreciate any help.
--
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/0e6fcc63-1c7d-4e61-ad6a-8df5c5f6e906%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 3106 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-24 18:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-24 18:37 Simple filter to strip outer math environment, for use in Typora? Gandalf Saxe
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).