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

MD -> LaTeX/PDF Issue on ordered lists #5072

Closed
suzizecat opened this issue Nov 12, 2018 · 3 comments
Closed

MD -> LaTeX/PDF Issue on ordered lists #5072

suzizecat opened this issue Nov 12, 2018 · 3 comments

Comments

@suzizecat
Copy link

Hello.

In pandoc 2.4 and 2.3.1 (tried as fallback), in a markdown to LaTeX conversion, ordered enumeration produces invalid TeX code.

The following code

Lorem Ipsum

1. This
2. Is
3. A Test

Produces the following

%some stuff
Lorem Ipsum blabla

\begin{enumerate}[<+->]
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
  This
\item
  Is
\item
  A Test
\end{enumerate}
%some other stuff

Which don't compile under my up-to-date MiKTeX distribution. The issue seems to come from the [<+->] code which I don't understand at all (maybe some beamer stuff ?).

I'm using the following line : pandoc.exe -f markdown --standalone -V geometry:margin=2cm --toc -i input.txt -o Test.tex. The produced file will fail with several errors likes

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.129   T
         est

Removing the [<+->] part makes it work perfectly fine.

Best regards,
Julien FAUCHER

@jgm
Copy link
Owner

jgm commented Nov 12, 2018

-i doesn't mean what you think it means. Look it up in the manual!

Once writerIncremental is turned on, it affects the way latex lists are rendered. I think a slight change is needed: we should ignore writerIncremental unless the output format is beamer. But in your case, you can fix things just by removing -i.

@jgm jgm closed this as completed Nov 12, 2018
@suzizecat
Copy link
Author

OK That was it.
Is it a recent feature (later than February 2018) ? Because I saved this command line at work few month ago and used it extensively. without issue...

@jgm
Copy link
Owner

jgm commented Nov 12, 2018

No, -i has worked this way for years...

jgm added a commit that referenced this issue Nov 12, 2018
even if `writerIncremental` is True.

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

No branches or pull requests

2 participants