我都快疯了。
我想在LaTeX中居中列出最后一个列表。
在尝试了3个小时之后,下面是一些代码:
\lstset{ %
caption=Descriptive Caption Text,
label=lst:descr_capti_text,
basicstyle=\ttfamily\footnotesize\bfseries,
frame=tb,
linewidth=0.6\textwidth
}
\centering\begin{tabular}{c}
\begin{lstlisting}
printf("this should be centered!");
\end{lstlisting}
\end{tabular}
这是把最后一个列表放在中间,而不是它的标题,也就是右边。如果我去掉表格,那么标题会居中,但代码会转到左边!:(
谢谢。
https://stackoverflow.com/questions/3106419
复制相似问题