I would like to use listlisting and post commented source code in french. This is the complete document :
\documentclass{article}
\usepackage{listings,xcolor}
%% Langage et police utilisée
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=Java,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
escapebegin={/**},
escapeend={*/},
tabsize=3
}
\begin{document}
Test écriture.
\begin{lstlisting}
/**
* Compilation problem because there is é or ç or ê or ï
* @param Description
* @return Description
*/
public static void main(String argc[]) {
System.out.println("_Compilation problem"); // This create a compilation problem
}
\end{lstlisting}
\end{document}
I have two errors : Babel error
unknow option 'francais'
(I tried frenchb but same problem).
The second error is !
Package inputenc Error: Unicode char �\lst@EC� (U+9EA9) ! Package inputenc Error: Unicode char �\lst@EC� (U+9EA7)
...
literate
option out there.