{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
1answer
345 views

Create an environment like the `checkboxes` in exam.cls

I am having trouble on how will i create something like the checkboxesor oneparcheckboxes environment in exam.cls. The only difference is that since the checkboxes gives circle, i'd like to create ...
9
votes
1answer
570 views

Box or sidebar for additional text

I'm not sure of the name of what I need. I would like to set some text in a box or sidebar, as I've seen in some textbooks. The main text will refer the reader to the sidebar for more details. I would ...
4
votes
2answers
885 views

Removing an “Overfull \vbox” message caused by a nested table

I am trying to typeset a nested table, like this: \documentclass{article} \usepackage{bigstrut} \usepackage{multirow} \begin{document} \begin{tabular}{|lll|} \hline A & \multirow{2}{*}{ ...
7
votes
4answers
267 views

Function determining the length of text, usable where something with internal units (e.g. “em”) is expected

Is there a way to define a function \horizontallengthof returning the length of a piece of text in internal units? I would like to be able to use it anywhere where something of that sort is required, ...
4
votes
2answers
121 views

How can I set the color of an \sbox / \usebox?

In the following code, I want to produce a coloured shape, for example a \rule{1em}{1em}. If I use the \rule as is, it works as expected. However, putting it in an \sbox somehow breaks colouring and I ...
0
votes
0answers
37 views

Create two small box after text? [duplicate]

how should i declare a command for two small boxes after text in every line? based from this link Create a two column static small box. I need to remove the automatic printing of its numbers. What ...
5
votes
2answers
478 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 ...
3
votes
2answers
111 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
235 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
304 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
128 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
235 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 ...
4
votes
1answer
268 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
960 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
223 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} ...
6
votes
2answers
1k 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
264 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
113 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
501 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
124 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}= ...
8
votes
1answer
9k 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
502 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
2k 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 ...
9
votes
1answer
1k 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")?
16
votes
3answers
2k 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 ...
5
votes
2answers
610 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
728 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
388 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
774 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
616 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
126 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
181 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
338 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
443 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
265 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
1k 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
382 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
208 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
235 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
86 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
164 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
314 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
246 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
409 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 ...
96
votes
1answer
13k 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
434 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
274 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} ...
0
votes
1answer
412 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
155 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 ...