为什么转义环境会减少字符之间的水平空间?我尝试了和escapechar
。escapeinside
请参阅下面的代码。
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[escapechar=@]
NEW: HardwareVersion 75.32.2 FirmwareVersion 532.23
OLD: @\textcolor{red}{HardwareVersion 15.32.2}@ FirmwareVersion 323.12
\end{lstlisting}
\begin{lstlisting}[escapeinside={@}{@}]
NEW: HardwareVersion 75.32.2 FirmwareVersion 532.23
OLD: @\textcolor{red}{HardwareVersion 15.32.2}@ FirmwareVersion 323.12
\end{lstlisting}
\end{document}