public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Pandoc Markdown, LaTeX Math and DOCX: tag{xx} not working in DOCX
@ 2019-10-14  0:53 Andrew Logan
       [not found] ` <20d5da9c-a51b-49a0-903d-8638dd3c560d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Logan @ 2019-10-14  0:53 UTC (permalink / raw)
  To: pandoc-discuss


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

I am using VS Code, Markdown and Pandoc to produce cross-platform documents 
with math. For an equation, it is useful to use the Latex \tag{} command to 
number equations.

For example

    $$
        e^{i\pi} +1 = 0 \tag{99}
    $$

will produce a TEX file, a PDF, and HTML files all of which will properly 
number the equation as (99) justified to the far right. The DOCX file will 
fail to work properly with the \tag{99} command and the equation will not 
even be converted but the raw Latex command are not converted or the DOCX 
file may even fail to load.

I have one work around of using

    $$
        e^{i\pi} +1 = 0 \quad \quad \quad (99)
    $$

Which is not right-justified. I think I can use HTML tags but this degrades 
the usefulness of the document in LaTeX and I am trying to stay with 
Markdown and Math-Latex. I've thought about using LaTeX alignment tags, but 
this becomes very complicated and error prone with more complex equations 
such as matrices or multiple equations and in any case, it doesn't solve 
the right justification issue.

Is there a better solution for numbering equations which works in all 
document types? Or is this a bug in Pandoc that can be fixed? I understand 
if it is difficult or impossible to make a proper DOCX reference, but at a 
minimum it would be nice to ignore the \tag{} or change to plain text. It 
is rather frustrating because the HTML and PDF look just about perfect when 
using the \tag{} command.


Thanks for any help, my apologies if I didn't find the answer in the 
documentation or made a noobee error.


-- 
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/20d5da9c-a51b-49a0-903d-8638dd3c560d%40googlegroups.com.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Pandoc Markdown, LaTeX Math and DOCX: tag{xx} not working in DOCX
       [not found] ` <20d5da9c-a51b-49a0-903d-8638dd3c560d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-14  4:57   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2019-10-14  4:57 UTC (permalink / raw)
  To: Andrew Logan, pandoc-discuss


If you just want numbers and don't absolutely need them
right-aligned, you can use the example list syntax supported
by pandoc.

  (@foo)  $e=mc^2$

  Einstein's equation (@foo) is...
 
This also gives you cross-references, as the example illustrates.
It will work in every output format pandoc supports.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-14  4:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14  0:53 Pandoc Markdown, LaTeX Math and DOCX: tag{xx} not working in DOCX Andrew Logan
     [not found] ` <20d5da9c-a51b-49a0-903d-8638dd3c560d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-14  4:57   ` John MacFarlane

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