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

\lstinline inside \subsection in LaTeX output causes issues #1963

Closed
wilx opened this issue Feb 20, 2015 · 2 comments · Fixed by #1964
Closed

\lstinline inside \subsection in LaTeX output causes issues #1963

wilx opened this issue Feb 20, 2015 · 2 comments · Fixed by #1964

Comments

@wilx
Copy link
Contributor

wilx commented Feb 20, 2015

I am generating (some) log4cplus documentation from Markdown using Pandoc. Recently, LaTeX output compilation has started failing for me:

! Extra }, or forgotten \endgroup.
<recently read> \egroup 

l.656         LIBS 
                 += -LC:\log4cplus\msvc14\Win32\bin.Release_Unicode -llog4cp...

I had no clue what was wrong with that so I asked a question on TeX.SE after at first failing to find a solution there as well.

As you can see from the accepted answer, the problem appears to be that when --listings option is used with Pandoc, it generates \lstinline!foo! inside \subsection for

## Header with `foo`

The solution appears to be to use \texttt instead inside the headers.

@mpickering
Copy link
Collaborator

> .cabal-sandbox/bin/pandoc -t latex --listings
## heading `heading`
\subsection{\texorpdfstring{heading
\texttt{heading}}{heading heading}}\label{heading-heading}

Fixed in HEAD 👍

mpickering added a commit to mpickering/pandoc that referenced this issue Feb 20, 2015
mpickering added a commit to mpickering/pandoc that referenced this issue Feb 20, 2015
@wilx
Copy link
Contributor Author

wilx commented Feb 20, 2015

Awesome! Thanks!

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

Successfully merging a pull request may close this issue.

2 participants