Zim

Don't substitute charaters in \begin{lstlisting} (LaTeX export)

Bug #1580049 reported by Nathaniel Roach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Committed
Undecided
Unassigned

Bug Description

Zim 0.65 on debian testing.

When exporting to LaTeX, characters such as '>' are changed to \textgreater{} which is fine, until said character is inside a code section. Zim translates this into \begin{lstlisting}
, which LaTeX then will read all code in that section literally.

When I have the following in a code segment in Zim:
  <1 - 30 seconds> (Need to be at least 3 times larger than Fast Heartbeat value.)
The following LaTeX output results:
  \begin{lstlisting}
  \textless{}1 - 30 seconds\textgreater{} (Need to be at least 3 times larger than Fast Heartbeat value.)
Which comes out as the following (in the PDF) after texi2pdf:
  \textless{}1 − 30seconds\textgreater{} (Need to be at least 3 times larger than Fast Heartbeat value. )

Reading the page at https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings shows that this seems to be the correct behaviour on LaTeX's end.

Tags: export
Changed in zim:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.