Re: [問題] 訊息框裡面放\verb= =?
多謝!結果用 \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}
※ 引述《EdwardLee.bbs@bbs.cs.nctu.edu.tw (蒙古大夫 2.0)》之銘言:
: ※ 引述《jsb.bbs@ptt.cc (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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 4 篇):
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章