{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.

learn more… | top users | synonyms

234
votes
7answers
56k views

Remove ugly borders around clickable cross-references and hyperlinks

I know that I can use hyperref to make cross-references and hyperlinks clickable. That makes the clickable areas outlined in fluorescent green, however. How can I make the green boxes go away?
33
votes
2answers
3k views

How to keep a constant baselineskip when using minipages (or \parboxes)?

When a minipage is used to box a text paragraph, the first line of the minipaged text and the last line of the previous text paragraph are closer than two consecutive lines in a standard text ...
15
votes
3answers
8k views

Dynamic signature/date line

I'm trying to create a signature and date line in a document. I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as: ...
61
votes
3answers
24k views

What are underfull hboxes and vboxes and how can I get rid of them?

Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them?
63
votes
2answers
21k views

What does “overfull hbox” mean?

I often see output from TeX with the warning overfull hbox, badness 10000. What does this message mean?
28
votes
4answers
2k views

Fit text into given box by adjusting the fontsize

I would like to fit text (potentially several paragraphs) into a box of given size. This should be done by adjusting the fontsize of the contained text. Clarification edit: The given dimensions are ...
38
votes
3answers
5k views

How to create Highlight Boxes in LaTeX?

I am writing an Article in LaTeX. Please suggest me how to create a highlight boxes like the ones shown below in LaTeX:
24
votes
4answers
5k views

Faded drop-shadow using tikz-based rounded rectangle?

Background Epigraphs are in a box with rounded corners. The boxes have a drop-shadow. Example Picture #1 shows a shadow, while Picture #2 shows a shadow that fades out (soft blur): Problem ...
23
votes
3answers
381 views

What are the ways to position things absolutely on the page?

I know that there is tikz, but also eso-pic and textpos. I'd like to see a list of possible ways (not necessarily packages) for absolute positioning of things (which I believe amounts to "boxes") on ...
16
votes
3answers
696 views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] ...
6
votes
1answer
2k views

Rounded corner colored box around figure

I'm trying to get Rounded corner grey-colored box around figures. One solution would be to use \usepackage{float} \floatstyle{boxed} \restylefloat{figure} but this results in black box around a ...
38
votes
3answers
2k views

Bounding box for each letter

How can I take input text and replace each character with a solid (and/or hollow) rectangle representing the bounding box for that character? In the case where two characters are closer together from ...
32
votes
1answer
6k views

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 ...
12
votes
1answer
400 views

How can I use an hbox inside a TikZ environment for text dimension measurement?

I'm trying to use an \hbox to measure the dimensions of a certain text. This is working in normal text as in the following example: \setbox37=\hbox{this is a text that I want to measure} text width ...
104
votes
1answer
16k views

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?
18
votes
2answers
5k views

Highlight an equation within an align environment

I would like to define a command that puts a red box around an equation with yellow highlighting. I have the basics working pretty well. What I am unable to figure out is: How to keep the alignment ...
12
votes
2answers
1k views

Breakable vboxes

In Plain TeX how can I make vboxes breakable, and can I handle/measure them separately? What I'm trying to do, is that I have a portion of text, that is treated separately (no indention, narrower, ...
8
votes
1answer
434 views

Making the text fit in a specific space in Latex

I'm trying to fit my text in a specific space, as it's a Graph explanation. I would like to make something like the graph below: Is it possible to make the text fit in that space? LaTex does it by ...
7
votes
3answers
645 views

A \boxed alternative with minimal spacing?

The following code comes from this post. The problem is that I would like a way to automate the size of the box so as to be very small with a few of spacing, but the following solution doesn't work ...
49
votes
5answers
2k views

Is there no easier way to float objects and set margins?

I come from a HTML / CSS background and am used to a particular way of setting margins, floats, etc. As a beginner in TeX, I am having a hard time positioning elements, probably because my mindset is ...
15
votes
2answers
1k views

Fitting text into a box over-a-pic

I am trying to fit a text into a box within an overpic environment. kongo09 had a similar question fit-text-into-given-box-by-adjusting-the-fontsize, and a highly workable solution was provided by ...
29
votes
1answer
2k views

Definition of \strut explained

Can anyone explain me the fine details of the \strut macro. Why is the box \copyied in mathmode but \unhcopyied otherwise? % latex.ltx, line 484, but identical in plainTeX ...
20
votes
2answers
31k views

Attractive Boxed Equations

I often used \boxed{...} from the AMS math package to place a box around important equations. However, this approach often produces somewhat awkward looking output. Consider \documentclass{article} ...
28
votes
3answers
9k views

How to highlight an entire paragraph?

I'd like to highlight paragraphs such that the highlight color appears as one whole rectangle underlying the entire paragraph. I have looked around but nothing gives me the desired effect so far. For ...
22
votes
2answers
8k views

What's the difference between \strut, \mathstrut and \vphantom?

What's the difference between \strut, \mathstrut and \vphantom? When would I prefer one of them to the others, and why?
14
votes
1answer
983 views

How to choose which sides of the border to draw in a `framebox`?

If, for example, you only want to draw the top and bottom border of a box, or perhaps the left and bottom only, is there a simple package to do this or must one resort to using tables or heavy-weight ...
12
votes
1answer
13k views

How to rotate text in multirow table?

I have a big table with a problem, when I want to rotate the text in a \multirow cell, the text is placed outside and is bigger than the dimensions of the cell, I took some advice from here, ...
10
votes
6answers
936 views

A \boxed alternative with nicer spacing?

I like using \boxed to emphasize my answers in homework problem sets. However, whenever I use superscripts/exponents inside the box, the box becomes taller than it seems it should. This causes two ...
56
votes
4answers
2k views

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 ...
14
votes
4answers
5k views

Make an Example and shaded box like in the book

I want to make Examples in the book as in the following book http://www.analogmachine.org/Books/Chapter1.pdf See Page 2... Also shaded box as in the page 3... Pictures can be seen below. ...
36
votes
1answer
4k views

\setbox vs. \sbox and \savebox - What are the differences I need to know about?

What's the difference between using TeX's \setbox and LaTeX's \sbox and \savebox?
10
votes
1answer
821 views

Create a “yearbook-style” multi-page layout of photos

I would like to create a "yearbook-style" layout of photos in LaTeX. Each photo would have a caption and the objective would be to automatically layout the differently sized rectangular photos to ...
7
votes
3answers
1k views

Stretching a framebox over the whole page

Does anyone know how to stretch a (framed) box down to the end of the page? In effect something like \documentclass{scrartcl} \begin{document} sometext ...
16
votes
2answers
701 views

Package for game/playing cards (not only poker)

Is there a package to design playing cards (NOT ONLY POKER and similar card games, but board games like this and that) in TeX (and friends)? I'm well aware of this one and a half years old topic ...
14
votes
2answers
5k views

How to highlight important parts (with a gray background)

In the below link http://www.math.uiowa.edu/~goodman/algebrabook.dir/bookmt.pdf the author highlights anything which is important using a greyish color background. For example, if you see ...
7
votes
3answers
427 views

Insert text into a fixed size box

Is there a way to create a box which has fixed width and height? I tried \parbox and some similar things, but sometimes the text overflows. If the text inserted would overflow: it should be resized ...
5
votes
2answers
376 views

Boxed text between pages

I've made boxed text into a manuscript using tikz by following the example in texamples, it works like a charm as long as the box is short enough to fit into a page. \documentclass{article} ...
14
votes
2answers
537 views

Why is \baselineskip not inserted before an \unvbox?

It seems that \setbox0=\vbox{\hbox{abc}}\unvbox0 is not equivalent to \hbox{abc}: the former does not insert a \baselineskip in the following situation. \vbox{% \hbox{XY}% \hbox{abc}% ...
2
votes
1answer
448 views

Create a two column static small box

how can I create a new command to make a static true and false as labels of the first and two columns. This columns are lanes of small boxes. This small boxes would depend on the questions created. If ...
8
votes
2answers
999 views

Expandable Nested Boxes with TikZ

Could someone please post a minimal tikz example to draw this: I am currently doing this with nested tables, but would like to see how it can be done with tikz. The nodes would ideally have a ...
29
votes
5answers
2k views

Confused with TeX terminology: height, depth, width

The LaTeX reference card states for example \strut box w/ ht and depth of “(”, zero width I came to see text as a two dimensional feature, but I must be missing out on something... (following ...
38
votes
3answers
16k views

\parbox vs. minipage: Differences in applicability

Lamport, LaTeX: A document preparation system, states on p. 104: There are two ways to make a parbox at a given point in the text: with the \parbox command and the minipage environment. They can ...
15
votes
2answers
11k views

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): ...
15
votes
2answers
210 views

Write content of box to a file

I would like to take the contents of a box generated with \begin{lrbox} ... \end{lrbox} and write it to a file. The use case is a question and answer environment, where the answer should be collected ...
12
votes
3answers
492 views

putting a box around each line of text in a paragraph

In my environment I would like to automatically make a box around each individual line of text in a paragraph so that I can operate on each line. I think this should really be done in LaTeX rather ...
7
votes
1answer
3k views

Beamer: highlighting aligned math with overlay

This question led to a new package: hf-tikz Minimal working example: \documentclass{beamer} \usepackage{amsmath} \begin{document} \begin{frame} \begin{align} a_i + b_j = 10 & ...
15
votes
1answer
9k views

How to draw frame with rounded corners around box

Is it possible to simply draw a frame around a box which has rounded corners, and be able to control frame width, frame color, frame radius, box background colour (preferably without having to use the ...
10
votes
1answer
12k views

Frame around text and figure

Consider the following TEXT TEXT TEXT TEXT Figure~\ref{fig:foo} TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT \begin{figure} \centering \includegraphics[width=\textwidth]{foo} \caption{This is foo.} ...
7
votes
1answer
568 views

Repeat scaled version of slide, \savebox and \usebox in multi-slide frame?

I have a frame where I uncover a tikz-diagram in 12 slides. In the next frame, I want to repeat a scaled-down version of the full diagram (slide 12). I've tried to use a combination of \savebox, ...
5
votes
2answers
554 views

hf-tikz doesn't box around equation

In TikZ based \boxed construct is causing pdflatex to hang it was suggested to use hf-tikz instead of manually using tikz. The documentation indicates that this package doesn't work properly for tall ...