{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

3
votes
2answers
132 views

Why does xcolor not like \fbox (or vice versa)?

This document would not compile and a rather cryptic ! Illegal unit of measure (pt inserted) pops up. Here's the MnWE: \documentclass{article} \usepackage{xcolor} \renewcommand{\fboxrule}{0.9pt} ...
7
votes
1answer
301 views

Customising theorem style

I wish to customise my theorem style to something like the one shown, but I couldn,t figure a universal definition of parameters. Some suggestions? The code: \documentclass{article} ...
4
votes
1answer
527 views

\vbox with some extra space below

I don't understand why when using \vbox of a certain height, there is some extra space added below it. I'm trying - towards grid typesetting - to put for example graphics in the vbox of a certain ...
3
votes
2answers
144 views

Set picture size to size of a given box

I would like to use the picture mode in latex, but need to set the size of the drawing region to the size of some other box. I would normally do \begin{picture}(max_hor, max_ver)(ll_hor, ll_ver) ...
6
votes
1answer
290 views

Multiple vertical rules along text – by using \leaders?

I want to draw individual vertical rules on the left side of consecutive paragraphs/vertical boxes covering the vertical skips. In my case for every paragraph/vertical box, there can be different ...
5
votes
1answer
315 views

LaTeX align/distribute objects à la InDesign?

I'm trying to replicate, in LaTeX, InDesign's align and distribute tools. This is a snapshot of ID's toolbar: Say I want first to align vertically two objects (texts, graphics, boxes,...), and ...
5
votes
1answer
2k views

Overfull hbox warning when including graphics

I'm getting the error: Overfull \hbox (14.34999pt too wide) in paragraph at lines 374--375 [][] | when including graphics files. The files are in EPS format. Below is an example: \begin{figure} ...
8
votes
3answers
235 views

PDF annotations: How to know if “a box is empty”?

Extract from dvipdfmx documentation: Warning: No annotation will be constructed if the content between pdf:bann and pdf:eann is an empty box. My MWE (via xelatex): \documentclass{article} ...
8
votes
2answers
2k views

\pbox vertical alignment

What's going on here, why are the TEXTs not aligned? \documentclass{article} \usepackage{pbox} \begin{document} \hrule \pbox[c][20pt][b]{\textwidth}{TEXT\\ Short} ...
10
votes
2answers
290 views

Savebox and usebox unexpected behaviour for the box with index 10

I have found that when saving and later using boxes the box with index 10 behaves differently to all other. Here is simple demo that shows different behaviour. In preamble I define this commands: ...
6
votes
1answer
124 views

Yet another overfull \hbox question

Consider the following example: \documentclass[a4paper,11pt]{article} \usepackage{showframe} \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor ...
21
votes
1answer
749 views

Box that behaves like vbox but its width is that of its content?

I need a box that fulfils these conditions: It can contain multiple lines (and paragraphs) of text (unlike \hbox) A line that is longer then \textwidth is split to the next line (like \parbox, \vbox ...
6
votes
3answers
138 views

reproduce section at different position

I would like to reproduce a \section at a later position, with the same number as at the original position. I tried \newsavebox{\meinebox} \savebox{\meinebox}[80mm][l]{\section{Hier}} ...
1
vote
0answers
33 views

draw a box for part of a matrix in math environment [duplicate]

Possible Duplicate: Highlight elements in the matrix I have a big matrix as follows: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \tilde{M}_{R+1,N}= ...
19
votes
1answer
18k 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, ...
5
votes
1answer
664 views

\resizebox shifts tikzpicture up when in a subfloat environment

Why when I try to re-scale a tikz figure using \resizebox the baseline is shifted up (regardless of how small the scale factor is), and two horizontal floats are not aligned properly. ...
5
votes
1answer
3k views

How to avoid overfull \hbox warning? [closed]

The following code compiles but throws this error/warning : Overfull \hbox (7.65448pt too wide) in paragraph at lines 21--21 Visually there is nothing wrong though, and the box does not cross the ...
10
votes
1answer
2k views

A few words in a coloured/grey background box

How can I write a few words with a grey highlighting box in the background, as shown in the picture below ("TEXT 4")?
17
votes
3answers
3k views

Color box with rounded corners around a fragment of a formula

Is there any way in TeX to highlight some part of a formula with a box having colored background and rounded corners? At present, I need to export such formulas into an image, add those highlight ...
6
votes
2answers
964 views

Setting the vertical distance in \overline

I want to overline a piece of text, but the line is too close to the number, which is not nice, so I want to add some kind of padding between the overline and the text. This is what I've made up so ...
3
votes
2answers
1k views

Using tabularx, multirow, and parbox for line-wrapping

I am using a multirow inside a tabularx, but because the multirow doesn't wrap, I am putting the multirow's text inside a parbox environment: \begin{tabularx}{\textwidth}{@{}XX@{}} \toprule blah ...
15
votes
4answers
454 views

Reasons for saving a box?

I've been reading through a number of answers that use \newsavebox to save the contents of a box. As far as I can tell it's a workaround for fragility of some kind. Is that right? If not, what is the ...
10
votes
4answers
1k views

How can I have a verbatim text in specific sized box?

I am trying to typset the following \resizebox{0.95\textwidth}{!}{% \begin{verbatim} require( "lattice" ) require( "grid" ) \end{verbatim} } I have a lot more to add to this box, and it needs ...
7
votes
3answers
1k views

Creating uniformly sized boxes around text

I want to put individual words in to boxes next to each other. I've used the \framebox command, but this has produced different sized boxes around each word. How could I get all the boxes to be the ...
3
votes
2answers
155 views

Box in a theorem environment

I am solving some exercises for my master program. I am including question and answer in a theorem environment. I would also like to have the question inside a gray box. The thing is that the gray box ...
1
vote
1answer
209 views

Hyphenate typewriter / avoid overfull \hboxes in code, using fontspec and XeTeX

I would like to avoid overfull \hboxes as a result of inline code, inserted with \textt{foo} or \ttfamily, e.g. in this MWE: % compile with xelatex \documentclass{article} \usepackage[textwidth=4cm, ...
2
votes
1answer
463 views

Errors with multicolumn-equations inside tabular (inside tcolorbox)

I try to rebuild a fairly complicated math-table, and I'm almost satisfied with the result. The MWE actually compiles to the table I want, but with error messages. When I include the table in my real ...
7
votes
2answers
589 views

Can't get rid of strange underfull \hbox with TikZ fit library [duplicate]

Possible Duplicate: Badbox from PGF layer using fit This peace of code is compiled with 'Underfull \hbox (badness 1484) in paragraph at lines 23--23' message. Line 23 is \node[draw, inner ...
1
vote
1answer
620 views

How to align middle-align text in a parbox?

I am trying to add a frame around a text which would be centered and vertically aligned to the middle of the box but I can only center the text. What should I do to align the text to the middle of ...
2
votes
2answers
2k views

remove box borders

I have the following code, in which I fit three logos into a box: \setlength\fboxsep{0pt} \setlength\fboxrule{0.5pt} \fbox{ \begin{minipage}{14em} ...
2
votes
1answer
493 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 ...
6
votes
2answers
262 views

Generate a square and line

how should i write a command to automatically place a box on the left side wherein this box can contain text and beside the box are lines which depends on an argument.
13
votes
2answers
263 views

Persuading (la)tex “silently to go beyond the envelope of 'good taste' ” to avoid an overfull hbox

My understanding, based on reading this website, is that (la)tex performs at most three passes when trying to typeset a paragraph: one based on \pretolerance, one based on \tolerance, and one based on ...
1
vote
1answer
97 views

How to output the choices of the questions inside a box?

I plan to create a command where I can use to output the choices inside the box and above the list of questions but its a know how. This is a sample output of what i am saying. I will use the ...
3
votes
1answer
193 views

Aligning three small box together with a text

I made through creating the boxes inside a box with help of an expert by this link Is three boxes inside a box posibble in latex Now im being troubled on how will i put into command to align this ...
4
votes
2answers
406 views

Are three boxes inside a box possible?

I am making a yes or no question inside a box and I have difficulty on creating the command for it. Would you mind to help me make something that will output this:
10
votes
2answers
297 views

How to create command for a box where text inside the box can automatically adjust?

I have a problem on how I can make my command right. I created a box where the text will be inside it when used but something went wrong when I prolong the text it turn out like this: Code: ...
16
votes
3answers
422 views

(Why) Can't we get 'fully expandable' versions of every command?

I'm just starting to figure out what 'expandable' means in LaTeX, and why it is useful to have commands that expand as far as possible. In particular: If you want to \typeout some string to the log ...
112
votes
1answer
20k 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?
3
votes
2answers
608 views

multicols within colorbox

i'm trying to get a gray background for an entire multicols environment and get errors with this "minimal" working example: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} ...
2
votes
1answer
392 views

Vertically center \makebox

Code: \documentclass{article} \usepackage{xcolor,hyperref} \makeatletter \def\Fld@bordercolor{0 0 0} % this works. \makeatletter \begin{document} \begin{Form} \setlength\unitlength{1cm} ...
1
vote
1answer
598 views

Create a static box in LaTeX

How can I make a command to automate the creation of a box? This box would enclose texts or statements, questions and the like when the command is used. Example:
8
votes
2answers
171 views

Is it possible to remove (or otherwise nullify) a whatsit node from a box?

I am aware that it is not generally possible to modify the contents of a box (as per http://tex.stackexchange.com/a/49903/17427), though I believe it is sometimes possible to "unbox" material and hack ...
5
votes
2answers
458 views

How to box the correct answer in Exam class?

I have tried using the following code: \documentclass[12pt]{exam} \CorrectChoiceEmphasis{\mbox{}} \begin{document} \begin{questions} \question Who is an idot? \begin{choices} \choice Not the writer ...
2
votes
1answer
275 views

hbox out of margin, beamer

I wanna put a round image in a presentation il LaTeX out from the margin. I would like to show it just as a 1/4 of the image in the left bottom corner. I tried: \begin{frame} \tableofcontents ...
8
votes
1answer
223 views

Why isn't a zero-width box in math mode aligned on the baseline?

I'd like to move equation labels into the margin for an article I'm working on, and the answers in Theorem Name/Numbering in Margin accomplish exactly what I'm looking for. Here is a small example: ...
4
votes
1answer
376 views

Text between two lines

i'd like to write words that fit between two lines. i found the following code: \documentclass[parskip,paper=a4]{scrartcl} \usepackage{calc} \setlength{\parindent}{0pt} \setlength{\fboxsep}{0pt} ...
3
votes
1answer
405 views

How to create a figure with math content

What's wrong with the following figure in the text? First, it says "amsmath: Unable to redefine math accent \vec." and then "Undefined control sequence" but neither is any helpful to me. It uses LLNCS ...
9
votes
3answers
197 views

How can I wrap each page of a document with a box that has a caption?

I have a LaTeX document that contains proprietary information. I need to print a version of the document that has a box around the text with a disclaimer (something to the effect of "Proprietary ...
4
votes
1answer
298 views

A fancy box for non-verb text, but like that of Fancyvrb

How can I create, without a verbatim environment, these nice boxes that the Fancyvrb package produces: The sibling package Fancybox (by the same author) doesn't allow for the caption being placed ...