作者jsb (jsb)
看板LaTeX
标题Re: [问题] 讯息框里面放\verb= =?
时间Sat Nov 3 10:13:53 2007
多谢!结果用 \lrbox 解决了:
\newsavebox{\verbex}
\begin{lrbox}{\verbex}
\verb=\parbox=
\end{lrbox}
\begin{center}
\begin{minipage}[h]{10cm}
\fbox{\parbox{10cm}
{This is a test message. If the message is longer than the width
indicated by \usebox{\verbex}, it breaks into the next line.}
}
\end{minipage}
\end{center}
※ 引述《[email protected] (蒙古大夫 2.0)》之铭言:
: ※ 引述《[email protected] (jsb)》之铭言:
: > 问题是以下的讯息框:
: > \begin{center}
: > \begin{minipage}[h]{10cm}
: > \fbox{\parbox{10cm}
: > {This is a test message. If the message is longer than
: > the width indicated by \verb=\parbox=, it breaks into the next
: > line.}
: > }
: > \end{minipage}
: > \end{center}
: > 如果没有 \verb=\parbox= 的话,显示就是我要的样子。
: > 可是这个讯息框里面想要显示 \parbox 这种 LaTeX 指令,好像就会出现错误。
: > 不知道是为什麽?怎麽解决咧?
: \verb 不能当其他指令的参数。例如,不能用在 \fbox{} 里头。请参考:
: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.162.96.180