public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Equation numbers and newlines not rendering as I expect in docx generated from LaTeX
@ 2021-06-26 19:25 Rached A.
       [not found] ` <d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Rached A. @ 2021-06-26 19:25 UTC (permalink / raw)
  To: pandoc-discuss


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


Dear community,

The following latex markup renders as expected in in overleaf:

Here is equation \ref{eq:test}
\begin{equation} \label{eq:test}
    \begin{split}
        a & = b \\
        & = c
    \end{split}
\end{equation}

Roughly looking like this in the complied pdf:

Here is equation 9
a = b
                        (9)
  = c

When I try converting the .tex file to .docx using pandoc as shown below, 
three problems arise:

1. The equation is not referenced properly in the paragraph. It looks like 
this in the docx:
Here is equation [eq:test]

2-3. The equation itself is not labelled with a number AND there is no 
newline in the equation. It looks like this in the docx:
a = b = c

This is the command I ran to perform the conversion:
pandoc main.tex --filter /usr/local/bin/pandoc-crossref -C --csl 
./springer-basic-brackets --bibliography=mybib.bib -N --wrap=preserve -o 
mydoc.docx

pandoc 2.14.0.2
pandoc-crossref 0.3.12.0

Could someone kindly point me in the right direction to resolve this issue?

-- 
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/d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n%40googlegroups.com.

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

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

* Re: Equation numbers and newlines not rendering as I expect in docx generated from LaTeX
       [not found] ` <d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-06-26 21:40   ` Rached A.
  2021-06-28 17:12   ` John MacFarlane
  1 sibling, 0 replies; 3+ messages in thread
From: Rached A. @ 2021-06-26 21:40 UTC (permalink / raw)
  To: pandoc-discuss


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

I would like to add that figure references seem to render as expected in 
the docx. Only equation references seem to be problematic.
E.g.
Here is Fig. \ref{fig:A}
\begin{figure}[H]
\centering
\includegraphics[width=5in]{figures/file.png}
\caption{\doublespacing ...}
\label{fig:A}
\end{figure}
On Saturday, June 26, 2021 at 3:25:01 p.m. UTC-4 Rached A. wrote:

>
> Dear community,
>
> The following latex markup renders as expected in in overleaf:
>
> Here is equation \ref{eq:test}
> \begin{equation} \label{eq:test}
>     \begin{split}
>         a & = b \\
>         & = c
>     \end{split}
> \end{equation}
>
> Roughly looking like this in the complied pdf:
>
> Here is equation 9
> a = b
>                         (9)
>   = c
>
> When I try converting the .tex file to .docx using pandoc as shown below, 
> three problems arise:
>
> 1. The equation is not referenced properly in the paragraph. It looks like 
> this in the docx:
> Here is equation [eq:test]
>
> 2-3. The equation itself is not labelled with a number AND there is no 
> newline in the equation. It looks like this in the docx:
> a = b = c
>
> This is the command I ran to perform the conversion:
> pandoc main.tex --filter /usr/local/bin/pandoc-crossref -C --csl 
> ./springer-basic-brackets --bibliography=mybib.bib -N --wrap=preserve -o 
> mydoc.docx
>
> pandoc 2.14.0.2
> pandoc-crossref 0.3.12.0
>
> Could someone kindly point me in the right direction to resolve this issue?
>
>

-- 
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/8ca05161-e11b-4b67-bdda-b63e3c864828n%40googlegroups.com.

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

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

* Re: Equation numbers and newlines not rendering as I expect in docx generated from LaTeX
       [not found] ` <d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-06-26 21:40   ` Rached A.
@ 2021-06-28 17:12   ` John MacFarlane
  1 sibling, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2021-06-28 17:12 UTC (permalink / raw)
  To: Rached A., pandoc-discuss


Equation labels and references are not yet supported in the latex
reader.  You could submit an issue for this so we can track it.
It's a bit complex; we need to do conversions among multiple
math formats, and they all have their own way of doing
references. In addition, texmath (which does the equation
conversion) doesn't have access to all the information pandoc
has about references.

Another relevant issue is
https://github.com/jgm/pandoc/issues/2851

"Rached A." <rached.al-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Dear community,
>
> The following latex markup renders as expected in in overleaf:
>
> Here is equation \ref{eq:test}
> \begin{equation} \label{eq:test}
>     \begin{split}
>         a & = b \\
>         & = c
>     \end{split}
> \end{equation}
>
> Roughly looking like this in the complied pdf:
>
> Here is equation 9
> a = b
>                         (9)
>   = c
>
> When I try converting the .tex file to .docx using pandoc as shown below, 
> three problems arise:
>
> 1. The equation is not referenced properly in the paragraph. It looks like 
> this in the docx:
> Here is equation [eq:test]
>
> 2-3. The equation itself is not labelled with a number AND there is no 
> newline in the equation. It looks like this in the docx:
> a = b = c
>
> This is the command I ran to perform the conversion:
> pandoc main.tex --filter /usr/local/bin/pandoc-crossref -C --csl 
> ./springer-basic-brackets --bibliography=mybib.bib -N --wrap=preserve -o 
> mydoc.docx
>
> pandoc 2.14.0.2
> pandoc-crossref 0.3.12.0
>
> Could someone kindly point me in the right direction to resolve this issue?
>
> -- 
> 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/d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n%40googlegroups.com.


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

end of thread, other threads:[~2021-06-28 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 19:25 Equation numbers and newlines not rendering as I expect in docx generated from LaTeX Rached A.
     [not found] ` <d9a2ff0a-7f05-4ee6-b5c4-cb650fcc66a5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-26 21:40   ` Rached A.
2021-06-28 17:12   ` 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).