Document Classes ⇒ National characters inside lstlisting environment
National characters inside lstlisting environment
are you aware of any way to include special characters (è,ò,à...) inside listings with the listings package? I tried the extendedchars=true option of the package, as well as using inputenc, fontenc, and their combination, but no way, it fails every time.
Or, should I try an alternate package?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
National characters inside lstlisting environment
Code: Select all
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{listings}
% ...
\begin{lstlisting}
èàò
\end{lstlisting}
Re: National characters inside lstlisting environment
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
National characters inside lstlisting environment
there's the package listingsutf8 that provides a workaround for using utf8 with listings when \lstinputlisting would be used.
Stefan