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 writer: a span with an id inside a header will have an extra right brace #2136
Comments
+++ Benct Philip Jonsson [May 06 15 09:38 ]:
This right bracket matches the left bracket after There is a problem here, but I don't think we yet understand what it is. |
The problem is \let\oldhyperdef\hyperdef
\DeclareRobustCommand{\hyperdef}{\oldhyperdef} But it could also be implemented in pandoc with \subsection{\texorpdfstring{\protect\hyperdef{}{a-header-with-a-span-in-it}{}{A
header with a span in
it}}{A header with a span in it}}\label{a-header-with-a-span-in-it} While first option is generally more robust, second would work for non-standalone LaTeX output. There are other environments in which See TeX stackexchange for more info on this topic. Also see http://www.giss.nasa.gov/tools/latex/fragile.html for other examples where |
P.S. Now that I think about it, \makeatletter
\let\hyperdef@original\hyperdef
\DeclareRobustCommand{\hyperdef}{\hyperdef@original}
\makeatother |
I think just adding a |
Moving arguments are literally arguments which can appear in document in
|
When converting with pandoc to LaTeX a span with an id inside a header will have an extra right brace appear which causes a syntax error in latex. The brace marked with
^
in the LaTeX output is one too many, as can be readily seen in an editor which highlights matching braces. From these tests it appears to happen only when converting from Markdown, but I first noticed it when converting from HTML from various web pages. Apparently they put an empty span in the header instead of giving the header an id. They must be using (non-pandoc) Markdown! It doesn't happen when there is no id in the span.Testing:
Converting markdown to html
Converting html to pdf
No errors
Converting markdown to pdf
Stderr:
Latex output:
The text was updated successfully, but these errors were encountered: