Re: Conflitto tra listings e babel

#2071
Up
0
Down
::

Aggiungi nel preambolo:`\AtBeginDocument{\shorthandoff{“}}`

Mi dà sempre lo stesso errore. Ho provato a compilare:
`
\documentclass{article}
\usepackage[italian]{babel}
\usepackage{listings}

\AtBeginDocument{\shorthandoff{“}}

\begin{document}

\begin{lstlisting}
% le grandezze “*” sono denominate “n”
clear;clc; format short e A=[0 0 2 1;2 0 3 0;1 0 3 0;1 7 0 0]; B=[0;1;1;2]; xq=[2,0]'; R6=; R6q=R6(1:2,:); R6n=R6(3:4,:); ott=pinv(R6q)*xq xn=R6n*uott
\end{lstlisting}

\end{document}`

e mi dà come errore:

! Extra \fi.
\lst@AppendLetter …putOther \lst@lettertrue \fi
\lst@Append
l.14 …]; B=[0;1;1;2]; xq=[2,0]’; R6=[B A*B A^2*B
A^3*B
?

Go to top