Latex:如何在包含逐字块的文本周围绘制框
通常,要在某些文本中装箱,我会使用以下内容:
\fbox {
\parbox{\linewidth}{
This is some text! Blah blah blah...
}
}
但是,假设其中有一个逐字块。它永远不会编译。有人知道我如何在包含逐字块的文本周围绘制一个框吗?例如这样...
\fbox {
\parbox{\linewidth}{
\begin{verbatim}
This is some text!
\end{verbatim}
}
}
我不应该在 CPF 指出之后在 tex.stackexchange 中重新发布此内容就是这样的事情。如果有人反对重复发帖,请告诉我。如果没有,我也会在这里保留。
Typically, to box in some text, I use the following:
\fbox {
\parbox{\linewidth}{
This is some text! Blah blah blah...
}
}
However, say I have a verbatim block within that. It will never compile. Anyone know how I could draw a box around text which contains a verbatim block? Like this for example...
\fbox {
\parbox{\linewidth}{
\begin{verbatim}
This is some text!
\end{verbatim}
}
}
I should not that I re-posted this in tex.stackexchange after CPF pointed out that there was such a thing. Let me know if people are opposed to doubled posting. If not, I'll keep it up here as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更简单:使用
fancyvrb
包。Easier: use the
fancyvrb
package.