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

Bug#413045: texlive-latex-recommended: UTF8 listings error



Dear Brooks,

a user of listings in Debian noticed that there's a small glitch when
the file is saved in UTF-8 encoding.  It is already mentioned in the
documentation, but only takes into account CJK-latex or the ucs
package.  Actually, the inputenc package also supports utf8.  

I think it would be a good idea to document the "extendedchars=false"
workaround also for that, much more common, case, or make it unnecessary
(cannot this be detected automatically?).

A test document is below (Benoît, I don't think the <..> are special, it
also fails in the second listing after s/cpp/C++/).

Regards, Frank

Benoît Dejean <benoit@placenet.org> wrote:

> \documentclass[a4paper, 12pt]{report}
>
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[francais]{babel}
> \usepackage{listings}
>
> \begin{document}
>
> \begin{lstlisting}[language=sh, basicstyle=\ttfamily\footnotesize]
> ip prefix-list FILTRE_ANNONCES_ENTRANTES seq 5  deny <réseau> le 32
> \end{lstlisting}
>
> \begin{lstlisting}[language=cpp, basicstyle=\ttfamily\footnotesize]
> void foo() {
> // réseau
> }
> \end{lstlisting}
>
> \end{document}




-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Reply to: