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

Latex reader fails parsing \author{} if it contains empty lines #6324

Closed
aronfiechter opened this issue Apr 28, 2020 · 1 comment
Closed

Comments

@aronfiechter
Copy link

pandoc 2.9.2.1

When converting this document with the command pandoc -s -f latex -t native main.tex:

\documentclass{article}

\begin{document}
    \title{Document title}
    \author{
        Me

    }
    \maketitle
\end{document}

the parser fails with this error:

Error at "source" (line 8, column 1):
unexpected ()
    }
^

It also fails if the empty line comes before "Me".
If the \author command is moved before \begin{document}, then the parser fails silently (i.e., no "author" is included in the parsed Meta).

When removing the empty line inside the author block, instead, the command successfully completes and Meta containns the author list.

Using pdflatex, everything rennders perfectly in all cases.
My use case is converting the raw tex code into markdown, for purposes of text extraction.

@jgm jgm added this to the next release milestone Apr 28, 2020
@jgm
Copy link
Owner

jgm commented Oct 10, 2020

Fixed by 0b5e260

@jgm jgm closed this as completed Oct 10, 2020
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

2 participants