Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vadjust pre does not get parsed by LaTeX reader #7531

Closed
luerhard opened this issue Aug 30, 2021 · 3 comments
Closed

vadjust pre does not get parsed by LaTeX reader #7531

luerhard opened this issue Aug 30, 2021 · 3 comments

Comments

@luerhard
Copy link

Explain the problem.
I am running a pipeline to produce documents with pandoc as:

  1. convert markdown to tex with pandoc
  2. convert tex to docx with pandoc (and tex to pdf with pdflatex)

I use citeproc and link-citations: true.

When i create the pdf with pdflatex, everything looks fine, but in \vadjust pre in the link citations do not seem to work with the docx writer.

from this base latex:

\hypertarget{refs}{}
\begin{CSLReferences}{1}{0}
\leavevmode\vadjust pre{\hypertarget{ref-baayen2008}{}}%
Baayen, R. H. (2008). \emph{Analyzing linguistic data. {A} practical
introduction to statistics using {R}} (1. publ.). {Cambridge University
Press}.

\leavevmode\vadjust pre{\hypertarget{ref-jones2016}{}}%
Jones, S. E. (2016). \emph{Roberto {Busa}, {S}. {J}., And the
{Emergence} of {Humanities Computing}. {The Priest} and the {Punched
Cards}}. {Routledge}.

\end{CSLReferences}

the resulting references in docx are:
image

This behavior is the same with the odt writer.

Pandoc version?
I am using pandoc 2.14.2 on Ubuntu.

@luerhard luerhard added the bug label Aug 30, 2021
@mb21 mb21 changed the title vadjust pre does not get parsed by docx/odt writer vadjust pre does not get parsed by LaTeX reader Aug 30, 2021
@jgm
Copy link
Owner

jgm commented Aug 30, 2021

  • We need to teach the LaTeX reader about the CSLReferences environment (which should gobble the two parameters)
  • and about the \vadjust command -- basically we just need to gobble a pre after it if there is one.

@jgm
Copy link
Owner

jgm commented Aug 30, 2021

@luerhard why are you doing this way? You could just go directly from markdown to docx using pandoc.
This would be more reliable.

@luerhard
Copy link
Author

luerhard commented Aug 30, 2021

Mainly because i want to be able to write latex commands in my markdown document. Also, that way I only have one pipeline to worry about and can manually adjust the latex file if necessary.

I have to convert to latex before pdf anyway to get stuff like the letter-numbered appendices, so I figured it is easier and better to maintain one single intermediary file with two outputs instead of two completely separate conversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants