|
From: | Charles C. Berry |
Subject: | Re: [O] Multiple underscores crash org latex export; other exporters survive |
Date: | Sat, 3 Dec 2016 14:31:08 -0800 |
User-agent: | Alpine 2.20 (OSX 67 2015-01-07) |
On Sat, 3 Dec 2016, Scott Randby wrote:
On 12/03/2016 02:40 PM, Scott Otterson wrote:When an org file contains a string with more than one underscore, the orgmode export result will crash latex (example attached). On the other hand, the org html export does finish successfully, and while result is odd, it's odd in a way that makes the problem visible and easy to identify.I exported your file using LaTeX export without trouble. The result does look odd, but that is because the string you gave is missing the braces needed to make it export properly. The output messages warn that the string contains a double subscript, so the problem is with the string and not Org's LaTeX export. Your string: a_variable_deleteThisAndItWorks Properly formed string: a_{variable_{deleteThisAndItWorks}}
I don't think the OP wanted double subscripts. If the OP really wanted "heavily underscored code snippets", something like:
Code snippet: ~a_variable_deleteThisAndItWorks~ seems like the way to go. See (info "(org) Emphasis and monospace") That way the latex is : \texttt{a\_variable\_deleteThisAndItWorks} and that idiom would properly render html as : <code>a_variable_deleteThisAndItWorks</code> rather than : a<sub>variable</sub><sub>deleteThisAndItWorks</sub></p>as in OPs case. The latter is valid html, but doesn't seem quite like the right thing to do for code snippets.
HTH, Chuck
Scott RandbyMany people have orgfiles with heavily underscored code snippets buried deep inside. To them, the latex crashes are probably as mysterious as they were to me. So I'd like to suggest that the org latex exporter adopt something like the org html exporter behavior.
[Prev in Thread] | Current Thread | [Next in Thread] |