-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Abbreviations within links within strike-throughs break Markdown to PDF generation #8411
Comments
An easier way to defeat this is to escape the period: |
I am experiencing the same issue with the following example: ❯ echo '~~[N comparison](example.com)~~' | pandoc -o temp.pdf
Error producing PDF.
! Extra }, or forgotten \endgroup.
\UL@stop ...z@ \else \UL@putbox \fi \else \egroup
\egroup \UL@putbox \fi \if...
l.56 \sout{\href{example.com}{N~comparison}} |
@ickc this example does not raise an error for me. |
After some confusion I found that the example I used has a unicode non-breaking space Hence it is equivalent to ❯ echo '~~[N\ comparison](example.com)~~' | pandoc -o temp.pdf
Error producing PDF.
! Extra }, or forgotten \endgroup.
\UL@stop ...z@ \else \UL@putbox \fi \else \egroup
\egroup \UL@putbox \fi \if...
l.56 \sout{\href{example.com}{N~comparison}} where we know why it fails. What's not very obvious is when the source has a non-breaking space, it is hard to understand what's happening (even when I am using an editor that shows space and non-breaking space differently.) The doc of ulem mentioned they only support |
See #7835 |
This handles things like hyphenation, line breaks, and nonbreaking spaces better. Closes #8411.
I just decided to go with soul, we need it anyway for highlighting. |
Explain the problem.
I'm trying to generate a PDF that has a a link within a strike-through. When the anchor text includes a title like
Rev. A W McLum
, the PDF generation fails. Further investigation shows that this appears with any string in theabbreviations
file, followed by a space, if the string is nested within a link that is nested within a strike-through.This can be circumvented by not using the default abbreviations file, so that Markdown doesn't recognize
Rev.
orSen.
as an abbreviation:$ echo '~~[Sen. Jones](#footnote)~~' | pandoc --from markdown+superscript -o edited.pdf --pdf-engine=xelatex --abbreviations=/dev/null
Pandoc version
The text was updated successfully, but these errors were encountered: