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

texorpdfstring dropping \mbox{} #5909

Open
rnuske opened this issue Nov 15, 2019 · 1 comment
Open

texorpdfstring dropping \mbox{} #5909

rnuske opened this issue Nov 15, 2019 · 1 comment

Comments

@rnuske
Copy link

rnuske commented Nov 15, 2019

Would it be possible for the latex writer to keep the contents of \mbox{} in the plain text variant of the \texorpdfstring{orig tex}{plain text} ?

Using pandoc 2.7.3 I get the following

$ pandoc -t latex
# Lorem \mbox{ipsum} dolor sit amet {#Lorem-ipsum}
^D
\hypertarget{Lorem-ipsum}{%
\section{\texorpdfstring{Lorem \mbox{ipsum} dolor sit
amet}{Lorem  dolor sit amet}}\label{Lorem-ipsum}}

but would love to get

\hypertarget{Lorem-ipsum}{%
\section{\texorpdfstring{Lorem \mbox{ipsum} dolor sit
amet}{Lorem ipsum dolor sit amet}}\label{Lorem-ipsum}}

Is there anything I could do differently to get the desired result?

@jgm
Copy link
Owner

jgm commented Nov 15, 2019

It's parsed from markdown as raw tex, so all the writer knows about it is that it's a bit of raw tex. Given that, it's kind of hard to extract the ipsum. I suppose we could run the LaTeX reader on it first, though I don't usually like to couple the reader and writer in this way.

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