开发者

LateX: Equation Like "box" for a block of text

开发者 https://www.devze.com 2023-01-17 14:47 出处:网络
Hi I\'m using LateX. I have a block of text that I\'d li开发者_运维知识库ke to have a small box like space highlighting the are (just like a \\begin{equation} but for text).

Hi I'm using LateX. I have a block of text that I'd li开发者_运维知识库ke to have a small box like space highlighting the are (just like a \begin{equation} but for text).

Is there such a thing in LateX?


I'm not 100% sure what you're asking I'm afraid, but if you just want to indent text with a margin on each side of the page to make it stand out, you can use...

\begin{quotation} Quotation is good for long blocks of text that you want highlighted \end{quotation}

\begin{quote} Quote is suited to a single block of quoted text. \end{quote}

If you actually want to have a physical black box around the text, you might want to consider wrapping it in a tabular / table, or you might want to delve into minipages and/or par box environments...


Is \makebox what you're looking for?

To create boxes of text that behave differently from the rest of the text, we can use

\makebox[width][pos]{text}

The width sets the width the of the box. The pos sets the positioning of the text - either r (right justified text), l (left justified), or s (stretched to fill the box). If the pos parameter is left out, as in \makebox[1in]{centerme}, the text is centered. The text is placed in the box. If you want to draw a box around the text, use \framebox just as you would use \makebox.

\mbox{text} and \fbox{text} are quick versions of \makebox and \framebox, which create a box to fit the size of the text.

There are some more examples at http://www.artofproblemsolving.com/wiki/index.php?title=LaTeX:Layout#Boxes

0

精彩评论

暂无评论...
验证码 换一张
取 消