答案1
您必须在列表中替换此类字符:
\documentclass{amsart}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\lstset{literate={ë}{{\"e}}1}
\begin{document}
\begin{lstlisting}[float,caption=example]
ë
\end{lstlisting}
\end{document}
您必须在列表中替换此类字符:
\documentclass{amsart}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\lstset{literate={ë}{{\"e}}1}
\begin{document}
\begin{lstlisting}[float,caption=example]
ë
\end{lstlisting}
\end{document}