public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Conversión from Markdown with TeX formula into docx
@ 2021-03-10 21:59 Loïc Houpert
       [not found] ` <c6443796-cecb-4acc-8183-f9c811f69ff1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Loïc Houpert @ 2021-03-10 21:59 UTC (permalink / raw)
  To: pandoc-discuss


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


Hi,

I am trying to convert a markdown file with latex formula into docx but I 
got the error message below:
```
pandoc essay.md \
--citeproc \ 
--from=markdown+tex_math_single_backslash+tex_math_dollars \ 
--to=docx \ 
--output=build/essay.docx \
--mathjax

[WARNING] Could not convert TeX math ' 
f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,dz. \tag{1} \label{eq:1} ', 
rendering as TeX: f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,d ^ unexpected "{" 
expecting "%", "\\label", "\\nonumber" or whitespace [WARNING] Could not 
convert TeX math '\eqref{eq:1}', rendering as TeX: \eqref{eq:1} ^ 
unexpected "{" expecting "%", "\\label", "\\nonumber" or whitespace 
```

I am running pandoc on this directory: 
https://github.com/jaantollander/Markdown-Templates/tree/master/essay

I manage to convert properly the markdown file to pdf and html. It is only 
the docx conversion that doesn't work. 
I have certainly done a beginner mistake and would appreciate any advices 
to get the docx conversion working! 

Thank you, 

Loïc 

-- 
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/c6443796-cecb-4acc-8183-f9c811f69ff1n%40googlegroups.com.

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

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

* Re: Conversión from Markdown with TeX formula into docx
       [not found] ` <c6443796-cecb-4acc-8183-f9c811f69ff1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-03-11  2:28   ` John MacFarlane
       [not found]     ` <m2pn06whip.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2021-03-11  2:28 UTC (permalink / raw)
  To: Loïc Houpert, pandoc-discuss


You haven't made any mistakes.  It works for pdf and html
because, in these formats, the tex formulas can be passed
through unchanged. But for docx, we need to convert it to
Word's XML equation format, and in this case there's something
pandoc (actually the texmath library) can't handle.

Actually it's just the \tag command that is causing the problem.
You should be able to work around that by adding the following to your
essay.md (in a paragraph by itself):

\renewcommand{\tag}[1]{}

Loïc Houpert <houpertloic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Hi,
>
> I am trying to convert a markdown file with latex formula into docx but I 
> got the error message below:
> ```
> pandoc essay.md \
> --citeproc \ 
> --from=markdown+tex_math_single_backslash+tex_math_dollars \ 
> --to=docx \ 
> --output=build/essay.docx \
> --mathjax
>
> [WARNING] Could not convert TeX math ' 
> f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,dz. \tag{1} \label{eq:1} ', 
> rendering as TeX: f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,d ^ unexpected "{" 
> expecting "%", "\\label", "\\nonumber" or whitespace [WARNING] Could not 
> convert TeX math '\eqref{eq:1}', rendering as TeX: \eqref{eq:1} ^ 
> unexpected "{" expecting "%", "\\label", "\\nonumber" or whitespace 
> ```
>
> I am running pandoc on this directory: 
> https://github.com/jaantollander/Markdown-Templates/tree/master/essay
>
> I manage to convert properly the markdown file to pdf and html. It is only 
> the docx conversion that doesn't work. 
> I have certainly done a beginner mistake and would appreciate any advices 
> to get the docx conversion working! 
>
> Thank you, 
>
> Loïc 
>
> -- 
> 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/c6443796-cecb-4acc-8183-f9c811f69ff1n%40googlegroups.com.

-- 
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/m2pn06whip.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]     ` <m2pn06whip.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-03-11 10:10       ` Loïc Houpert
  2021-03-11 11:29       ` Loïc Houpert
  1 sibling, 0 replies; 8+ messages in thread
From: Loïc Houpert @ 2021-03-11 10:10 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you very much John for the quick reply. Do you think it is possible 
to do that in a filter? so I will not have to change the content of my .md 
file? I just discovered https://github.com/jgm/pandocfilters

Loic

Le jeudi 11 mars 2021 à 02:28:47 UTC, John MacFarlane a écrit :

>
> You haven't made any mistakes. It works for pdf and html
> because, in these formats, the tex formulas can be passed
> through unchanged. But for docx, we need to convert it to
> Word's XML equation format, and in this case there's something
> pandoc (actually the texmath library) can't handle.
>
> Actually it's just the \tag command that is causing the problem.
> You should be able to work around that by adding the following to your
> essay.md (in a paragraph by itself):
>
> \renewcommand{\tag}[1]{}
>
> Loïc Houpert <houpe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hi,
> >
> > I am trying to convert a markdown file with latex formula into docx but 
> I 
> > got the error message below:
> > ```
> > pandoc essay.md \
> > --citeproc \ 
> > --from=markdown+tex_math_single_backslash+tex_math_dollars \ 
> > --to=docx \ 
> > --output=build/essay.docx \
> > --mathjax
> >
> > [WARNING] Could not convert TeX math ' 
> > f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,dz. \tag{1} \label{eq:1} ', 
> > rendering as TeX: f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,d ^ unexpected 
> "{" 
> > expecting "%", "\\label", "\\nonumber" or whitespace [WARNING] Could not 
> > convert TeX math '\eqref{eq:1}', rendering as TeX: \eqref{eq:1} ^ 
> > unexpected "{" expecting "%", "\\label", "\\nonumber" or whitespace 
> > ```
> >
> > I am running pandoc on this directory: 
> > https://github.com/jaantollander/Markdown-Templates/tree/master/essay
> >
> > I manage to convert properly the markdown file to pdf and html. It is 
> only 
> > the docx conversion that doesn't work. 
> > I have certainly done a beginner mistake and would appreciate any 
> advices 
> > to get the docx conversion working! 
> >
> > Thank you, 
> >
> > Loïc 
> >
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/c6443796-cecb-4acc-8183-f9c811f69ff1n%40googlegroups.com
> .
>

-- 
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/27246deb-8084-4159-8121-b6397ebf98bcn%40googlegroups.com.

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

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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]     ` <m2pn06whip.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  2021-03-11 10:10       ` Loïc Houpert
@ 2021-03-11 11:29       ` Loïc Houpert
       [not found]         ` <ed2ee9eb-e30b-4d5a-a557-26b8bf4b3da7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Loïc Houpert @ 2021-03-11 11:29 UTC (permalink / raw)
  To: pandoc-discuss


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

By the way, I tried your method and it worked. I still have a warning   for 
the equation reference:
```
[WARNING] Could not convert TeX math '\eqref{eq:1}', rendering as TeX:
  \eqref{eq:1}
        ^
  unexpected "{"
  expecting "%", "\\label", "\\nonumber" or whitespace
```
 Any suggestions on how to fix it?  I attached a minimal example of the 
markdown file I am using below:

```
---

---
\renewcommand{\tag}[1]{}

### Test Equation
Cauchy's integral formula [@dixon1971brief]

$$
f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,dz.
\tag{1}
\label{eq:1}
$$



As seen in equation $\eqref{eq:1}$, duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

### Test Table

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

<!-- \renewcommand\tcap{Table styles. \label{tab:1}} -->
Table: Table styles. \label{tab:1}

Seen in table \ref{tab:1}, Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

```

Le jeudi 11 mars 2021 à 02:28:47 UTC, John MacFarlane a écrit :

>
> You haven't made any mistakes. It works for pdf and html
> because, in these formats, the tex formulas can be passed
> through unchanged. But for docx, we need to convert it to
> Word's XML equation format, and in this case there's something
> pandoc (actually the texmath library) can't handle.
>
> Actually it's just the \tag command that is causing the problem.
> You should be able to work around that by adding the following to your
> essay.md (in a paragraph by itself):
>
> \renewcommand{\tag}[1]{}
>
> Loïc Houpert <houpe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Hi,
> >
> > I am trying to convert a markdown file with latex formula into docx but 
> I 
> > got the error message below:
> > ```
> > pandoc essay.md \
> > --citeproc \ 
> > --from=markdown+tex_math_single_backslash+tex_math_dollars \ 
> > --to=docx \ 
> > --output=build/essay.docx \
> > --mathjax
> >
> > [WARNING] Could not convert TeX math ' 
> > f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,dz. \tag{1} \label{eq:1} ', 
> > rendering as TeX: f(a)=\frac{1}{2πi}∮_γ\frac{f(z)}{z-a}\,d ^ unexpected 
> "{" 
> > expecting "%", "\\label", "\\nonumber" or whitespace [WARNING] Could not 
> > convert TeX math '\eqref{eq:1}', rendering as TeX: \eqref{eq:1} ^ 
> > unexpected "{" expecting "%", "\\label", "\\nonumber" or whitespace 
> > ```
> >
> > I am running pandoc on this directory: 
> > https://github.com/jaantollander/Markdown-Templates/tree/master/essay
> >
> > I manage to convert properly the markdown file to pdf and html. It is 
> only 
> > the docx conversion that doesn't work. 
> > I have certainly done a beginner mistake and would appreciate any 
> advices 
> > to get the docx conversion working! 
> >
> > Thank you, 
> >
> > Loïc 
> >
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/c6443796-cecb-4acc-8183-f9c811f69ff1n%40googlegroups.com
> .
>

-- 
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/ed2ee9eb-e30b-4d5a-a557-26b8bf4b3da7n%40googlegroups.com.

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

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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]         ` <ed2ee9eb-e30b-4d5a-a557-26b8bf4b3da7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-03-11 18:37           ` John MacFarlane
       [not found]             ` <m27dmdwn8t.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2021-03-11 18:37 UTC (permalink / raw)
  To: Loïc Houpert, pandoc-discuss


The same approach should work (mutatis mutandis) for \eqref.

Loïc Houpert <houpertloic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> By the way, I tried your method and it worked. I still have a warning   for 
> the equation reference:
> ```
> [WARNING] Could not convert TeX math '\eqref{eq:1}', rendering as TeX:
>   \eqref{eq:1}
>         ^
>   unexpected "{"
>   expecting "%", "\\label", "\\nonumber" or whitespace
> ```
>  Any suggestions on how to fix it?  I attached a minimal example of the 
> markdown file I am using below:
>

-- 
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/m27dmdwn8t.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]             ` <m27dmdwn8t.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-03-11 19:03               ` Loïc Houpert
       [not found]                 ` <e9d6e873-43db-48ab-ab48-649509e3065bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Loïc Houpert @ 2021-03-11 19:03 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you John it worked perfectly!

A last question: I would like to avoid changing my markdown file because I 
am exporting its content to different format (html, pdf). I tried to 
include the changes above in a  file  ( mutedocxeqref.tex):

```
more layout/mutedocxeqref.tex                               ⏎ ✹ ✭ 19:00:02
            \renewcommand{\tag}[1]{}
            \renewcommand{\eqref}[1]{} 
```

In order to load them in a separate file when I execute the pandoc command:
```
pandoc article.md \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex  \
--to=docx \
--output=build/article.docx \
--mathjax \
--include-before-body="layout/mutedocxeqref.tex"

```

but it doesnt work. The file doesn't seem to be read. Any idea how I could 
tackle this problem?



Le jeudi 11 mars 2021 à 18:37:22 UTC, John MacFarlane a écrit :

>
> The same approach should work (mutatis mutandis) for \eqref. 
>
> Loïc Houpert <: 
>
> > By the way, I tried your method and it worked. I still have a warning 
> for 
> > the equation reference: 
> > ``` 
> > [WARNING] Could not convert TeX math '\eqref{eq:1}', rendering as TeX: 
> > \eqref{eq:1} 
> > ^ 
> > unexpected "{" 
> > expecting "%", "\\label", "\\nonumber" or whitespace 
> > ``` 
> > Any suggestions on how to fix it? I attached a minimal example of the 
> > markdown file I am using below: 
> > 
>

-- 
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/e9d6e873-43db-48ab-ab48-649509e3065bn%40googlegroups.com.

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

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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]                 ` <e9d6e873-43db-48ab-ab48-649509e3065bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-03-11 22:58                   ` John MacFarlane
       [not found]                     ` <m2sg51uwl0.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: John MacFarlane @ 2021-03-11 22:58 UTC (permalink / raw)
  To: Loïc Houpert, pandoc-discuss


--include-before-body just inserts stuff into the template after
processing, so it doesn't affect parsing.

What you should do instead is

pandoc layout/mutedocxeqref.tex article.md \
--citeproc \
--from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex  \
--to=docx \
--output=build/article.docx \
--mathjax \


Loïc Houpert <houpertloic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Thank you John it worked perfectly!
>
> A last question: I would like to avoid changing my markdown file because I 
> am exporting its content to different format (html, pdf). I tried to 
> include the changes above in a  file  ( mutedocxeqref.tex):
>
> ```
> more layout/mutedocxeqref.tex                               ⏎ ✹ ✭ 19:00:02
>             \renewcommand{\tag}[1]{}
>             \renewcommand{\eqref}[1]{} 
> ```
>
> In order to load them in a separate file when I execute the pandoc command:
> ```
> pandoc article.md \
> --citeproc \
> --from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex  \
> --to=docx \
> --output=build/article.docx \
> --mathjax \
> --include-before-body="layout/mutedocxeqref.tex"
>
> ```
>
> but it doesnt work. The file doesn't seem to be read. Any idea how I could 
> tackle this problem?
>
>
>
> Le jeudi 11 mars 2021 à 18:37:22 UTC, John MacFarlane a écrit :
>
>>
>> The same approach should work (mutatis mutandis) for \eqref. 
>>
>> Loïc Houpert <: 
>>
>> > By the way, I tried your method and it worked. I still have a warning 
>> for 
>> > the equation reference: 
>> > ``` 
>> > [WARNING] Could not convert TeX math '\eqref{eq:1}', rendering as TeX: 
>> > \eqref{eq:1} 
>> > ^ 
>> > unexpected "{" 
>> > expecting "%", "\\label", "\\nonumber" or whitespace 
>> > ``` 
>> > Any suggestions on how to fix it? I attached a minimal example of the 
>> > markdown file I am using below: 
>> > 
>>
>
> -- 
> 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/e9d6e873-43db-48ab-ab48-649509e3065bn%40googlegroups.com.

-- 
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/m2sg51uwl0.fsf%40MacBook-Pro.hsd1.ca.comcast.net.


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

* Re: Conversión from Markdown with TeX formula into docx
       [not found]                     ` <m2sg51uwl0.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-03-12  8:00                       ` Loïc Houpert
  0 siblings, 0 replies; 8+ messages in thread
From: Loïc Houpert @ 2021-03-12  8:00 UTC (permalink / raw)
  To: pandoc-discuss


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

Thank you very much for the help it worked like a charm :-) I don't know 
why I didn't think about the simplest solution earlier...

Loïc

Le jeudi 11 mars 2021 à 22:58:35 UTC, John MacFarlane a écrit :

>
> --include-before-body just inserts stuff into the template after
> processing, so it doesn't affect parsing.
>
> What you should do instead is
>
> pandoc layout/mutedocxeqref.tex article.md \
> --citeproc \
> --from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex \
> --to=docx \
> --output=build/article.docx \
> --mathjax \
>
>
> Loïc Houpert <houpe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thank you John it worked perfectly!
> >
> > A last question: I would like to avoid changing my markdown file because 
> I 
> > am exporting its content to different format (html, pdf). I tried to 
> > include the changes above in a file ( mutedocxeqref.tex):
> >
> > ```
> > more layout/mutedocxeqref.tex ⏎ ✹ ✭ 19:00:02
> > \renewcommand{\tag}[1]{}
> > \renewcommand{\eqref}[1]{} 
> > ```
> >
> > In order to load them in a separate file when I execute the pandoc 
> command:
> > ```
> > pandoc article.md \
> > --citeproc \
> > --from=markdown+tex_math_single_backslash+tex_math_dollars+raw_tex \
> > --to=docx \
> > --output=build/article.docx \
> > --mathjax \
> > --include-before-body="layout/mutedocxeqref.tex"
> >
> > ```
> >
> > but it doesnt work. The file doesn't seem to be read. Any idea how I 
> could 
> > tackle this problem?
> >
> >
> >
> > Le jeudi 11 mars 2021 à 18:37:22 UTC, John MacFarlane a écrit :
> >
> >>
> >> The same approach should work (mutatis mutandis) for \eqref. 
> >>
> >> Loïc Houpert <: 
> >>
> >> > By the way, I tried your method and it worked. I still have a warning 
> >> for 
> >> > the equation reference: 
> >> > ``` 
> >> > [WARNING] Could not convert TeX math '\eqref{eq:1}', rendering as 
> TeX: 
> >> > \eqref{eq:1} 
> >> > ^ 
> >> > unexpected "{" 
> >> > expecting "%", "\\label", "\\nonumber" or whitespace 
> >> > ``` 
> >> > Any suggestions on how to fix it? I attached a minimal example of the 
> >> > markdown file I am using below: 
> >> > 
> >>
> >
> > -- 
> > 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...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/e9d6e873-43db-48ab-ab48-649509e3065bn%40googlegroups.com
> .
>

-- 
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/5ac2518e-2892-4410-9335-4a9c3a022326n%40googlegroups.com.

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

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

end of thread, other threads:[~2021-03-12  8:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 21:59 Conversión from Markdown with TeX formula into docx Loïc Houpert
     [not found] ` <c6443796-cecb-4acc-8183-f9c811f69ff1n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-11  2:28   ` John MacFarlane
     [not found]     ` <m2pn06whip.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-03-11 10:10       ` Loïc Houpert
2021-03-11 11:29       ` Loïc Houpert
     [not found]         ` <ed2ee9eb-e30b-4d5a-a557-26b8bf4b3da7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-11 18:37           ` John MacFarlane
     [not found]             ` <m27dmdwn8t.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-03-11 19:03               ` Loïc Houpert
     [not found]                 ` <e9d6e873-43db-48ab-ab48-649509e3065bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-03-11 22:58                   ` John MacFarlane
     [not found]                     ` <m2sg51uwl0.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-03-12  8:00                       ` Loïc Houpert

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