我使用了很多内联的铸造材料。为了区分文档中的代码元素和文本元素,我给所有内容都赋予了浅色背景颜色。(下面使用的颜色被夸大了,以提高对比度。)遗憾的是,这暴露了(或者可能引入了?)铸造材料在文档中的设置方式存在问题:
% arara: xelatex: { shell: yes }
% arara: xelatex: { shell: yes }
\documentclass{article}
\usepackage{minted}
\newmintinline{csharp}{bgcolor=black!15}
\textwidth=10cm
\begin{document}
We're going to start writing our desktop calculator. The first step
is to distinguish between different kinds of \emph{tokens}. Write a
method that will receive this token as a string and determine what
kind of token it is. Define an enumeration of the values
\csharpinline{Operand}, \csharpinline{Operator},
\csharpinline{LeftParen}, \csharpinline{RightParen}, and
\csharpinline{Unknown}. Use a \csharpinline{switch} statement in your
implementation. Note you can have multiple \csharpinline{return}
statements in one method.
\end{document}
任何注意到这一点的人都会感到不安。我怎样才能获得一致的行距/框高?