Dear John, many thanks for your suggestion ! I would like to have a same markdown file for PDF and .docx. Could you help to suggest how to only redefine the color macros to no-ops for generating .docx ? On Sunday, July 22, 2018 at 1:03:51 PM UTC+8, John MacFarlane wrote: > > > You can redefine the color macros to no-ops; (recent) pandoc > should be able to expand the macros prior to passing > the tex to texmath. e.g., > > \renewcommand{\color}[1]{#1} > > Try that. > > J > writes: > > > Dear John, many thanks for your comment ! Is it possible to just ignore > the > > color instructions and produce a monochrome one ? I mean, a monochrome > one > > is much useful than raw latex code. > > > > On Sunday, July 22, 2018 at 3:09:37 AM UTC+8, John MacFarlane wrote: > >> > >> > >> Sorry, the texmath package (which we use for > >> conversions) doesn't support xcolor. > >> > >> J > writes: > >> > >> > $ pandoc MWE1.md --mathml --filter=pandoc-crossref > >> --filter=pandoc-citeproc > >> > -s -o MWE1.docx > >> > [WARNING] Could not convert TeX math > >> > > >> > '\mathrm{\underline{\begingroup\color{magenta}AB\endgroup},\underline{\textcolor{green}{CD}}}', > > >> > >> > rendering as TeX: > >> > derline{\begingroup\color{magenta}AB\end > >> > ^ > >> > unexpected "\\" > >> > expecting "%", "\\label", "\\nonumber" or whitespace > >> > $ > >> > $ pandoc MWE1.md --mathml --filter=pandoc-crossref > >> --filter=pandoc-citeproc > >> > -s -o MWE1.pdf --pdf-engine=xelatex > >> > $ > >> > > >> > > >> > Could you help to comment how to use color in equations when > converting > >> to > >> > MS Word file ? The MWE1.md attached can be converted to PDF but not > to > >> > .docx. Many 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > >> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > >> . > >> > To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/pandoc-discuss/aa5ab201-d3a6-44e2-807d-3f92a97f7a8b%40googlegroups.com. > > >> > >> > For more options, visit https://groups.google.com/d/optout. > >> > --- > >> > header-includes: > >> > - \usepackage{xcolor} > >> > --- > >> > > >> > $\mathrm{\underline{\begingroup\color{magenta}AB\endgroup},\underline{\textcolor{green}{CD}}}$ > > >> > >> > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/ce8072fa-b82f-468b-8d62-781ce71bd8e0%40googlegroups.com. > > > For more options, visit https://groups.google.com/d/optout. > -- 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/eed0bcd1-9e02-4945-aa91-28d1464d34c3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.