emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Export to Latex - Incorrect output for list items starting


From: Vladimir Lomov
Subject: Re: [O] Bug: Export to Latex - Incorrect output for list items starting with left bracket [8.2.3c (8.2.3c-elpa @ /Users/jdegenhardt/.emacs.d/elpa/org-20131115/)]
Date: Tue, 14 Jan 2014 08:56:37 +0900
User-agent: Mutt/1.5.22 (2013-10-16)

Hello,
** Nicolas Goaziou [2014-01-13 17:51:05 +0100]:

> Hello,

> Jon Degenhardt <address@hidden> writes:

>> Export to Latex (org-latex-export-to-pdf) generates incorrect latex when
>> list items start with a left square bracket. This occurs because the
>> \item command interprets the left square bracket as the start of an
>> argument list. An example:

>>    An item list:
>>    - abc def
>>    - [def] ghi
>>    - [jkl m n o]
>>    - pqr

>> This produces the latex fragment:

>>    An item list:
>>    \begin{itemize}
>>    \item abc def
>>    \item [def] ghi
>>    \item [jkl m n o]
>>    \item pqr
>>    \end{itemize}

>> The pdf output renders the second and third items incorrectly. If there
>> is no right bracket to terminate the argument, then pdf generation may
>> fail with message:
>>   
>>    org-latex-compile: PDF file ./example.pdf wasn't produced: Runaway
>> argument

> Thank you for the report. Would the following patch solves the problem?

I didn't test this patch, and could interpret it wrong, but, IMHO, when
exporting lists to LaTeX into itemize or enumerate environments the most
suitable approach would be to insert '\item's as
\item{}
or
\item\relax

Both prevents LaTeX engine to read next character and interpret it in
some special way (simple \item read next character and if it is [], then
it assumes that this is an optional argument to the command).

> Regards,

---
WBR, Vladimir Lomov

-- 
I had the rare misfortune of being one of the first people to try and
implement a PL/1 compiler.
                -- T. Cheatham



reply via email to

[Prev in Thread] Current Thread [Next in Thread]