{boxes} are the units used by (La)TeX to construct a page by pasting them together horizontally or vertically. A single character from a font is a box, as are the lines of type and the eventual page.
Questions tagged [boxes]
1598 questions
311
votes
1 answer
What are the different kinds of boxes in (La)TeX?
I've seen hbox, vbox, mbox, parbox and others used in various code samples. What are the different kinds of box in (La)Tex? Which are suitable for use in LaTeX, as opposed to plain TeX?
Mohan
- 15,906
146
votes
6 answers
How to put a long piece of text in a box?
I want to put a long piece of text in a box, for example
The quick brown fox jumps right over the lazy dog. the quick brown fox
jumps right over the lazy dog. the quick brown fox jumps right over the lazy
dog. the quick brown fox jumps right over…
Stone Heart
- 1,461
95
votes
2 answers
Function and usage of \leavevmode
I am beginner of LaTeX. From many examples I found, I notice that it's very common to use command \leavevmode. I can't find any information about this command. Could anyone tell me what's the function of it and how to use it?
Jason Xu
- 1,783
95
votes
4 answers
How can I visualize boxes?
This question led to a new package:
lua-visual-debug
Some of you may know the Web Developer Toolbar for Firefox that can outline the block level elements of a page like this:
Is there a way to do something similar with TeX boxes for a complete…
h0b0
- 5,437
- 7
- 35
- 34
65
votes
1 answer
Differentiating between \hbox and \mbox
What are the differences between \hbox and \mbox?
Related:
This answer to "What are the different kinds of boxes in (La)TeX?" discusses different boxes in general.
This answer to "Difference between various methods for producing text in math mode"…
Lover of Structure
- 22,025
50
votes
2 answers
beamer style text box
If you're using beamer you can do some nice text boxes using:
\begin{block}{block title}content of block\end{block}
Which gives a text box something like this (the box with the header Esimerkki):
How can I do the same thing in a regular latex…
Tyler Rinker
- 1,093
- 4
- 13
- 25
31
votes
4 answers
How to make an empty box
I am making a sheet where people can fill in answers of various types. For this I would like to make some boxes of certain width and height. How can this best be done? I use \fbox when I want to box a box around some text, but now I need to make a…
Thomas
- 2,837
26
votes
4 answers
How to specify height and width of \fbox{}
I am trying to have my text read like this inside a box:
If A and B are two events that are not mutually exclusive then:
$P(A \cup B) = P(A) + P(B) - P(A \cap B)$
Al I have is this, can someone help guide me of hidden…
Janice
- 589
25
votes
4 answers
Drawing boxes around words
I want to put some small boxes around certain words in a paragraph. The boxes will never contain more than one word.
The \ovalbox command described in the fancybox documentation is close to what I need. However, I found some problems:
The rounded…
Village
- 13,603
- 23
- 116
- 219
16
votes
3 answers
Get a box with zero depth including some text
How to get a box including some text in text mode, which depth 0pt?
Stufazi Hoqckt
- 1,129
13
votes
2 answers
How to leave horizontal mode?
There is this question: How do I leave horizontal mode? - but there is no answer no how to leave horizontal mode.
I know there is a command \leavevmode (Function and usage of \leavevmode); the post What are vertical and horizontal modes? points to…
sdaau
- 17,079
12
votes
1 answer
How would I make a colored alert box in LaTeX?
I would like to make something similar to the following green alert box
http://twitter.github.com/bootstrap/components.html#alerts
I have tried various combinations of verbatim without success
Hoa
- 223
12
votes
3 answers
Box for multiple lines and automatic width
I feel this is rather a dumb question, but I could not find an answer. I'm looking for a \parbox without the width parameter, i.e. it should be determinded by its content. And the content is multiple lines. Something like:
A
I like B , but…
cxxl
- 1,183
11
votes
3 answers
How to write mathematics with boxes?
I want to write the mathematics inside the box as written below.
See my code given below:
\documentclass{article}
\begin{document}
\\fbox{text}
\framebox[width][pos]{text}
\makebox[\textwidth]{X_1 X_2} \par
\makebox[\textwidth]{X_3 X_4}…
user132638
11
votes
1 answer
How to write text that takes up no space?
How does one write text such that whatever comes next is placed as if the text had not been written?
Edit: More specifically, I would like to place text in the top-left corner of a tikzpicture by writing the text right before the figure and…
Max Flow
- 354