{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

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}= ...
16
votes
1answer
16k 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
639 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
905 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
441 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
145 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
207 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
446 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
569 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
575 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
485 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
255 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
258 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
96 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
189 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
395 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
287 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
421 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 ...
109
votes
1answer
19k 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
584 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
373 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
551 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
168 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
427 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
267 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
214 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
370 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
400 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
194 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
290 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 ...
12
votes
1answer
2k views

how to draw a container box in latex around automata?

This is my tikz code : \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,} \usepackage{amsmath} \begin{document} ...
3
votes
2answers
85 views

How can I produce 3 centered columns, with the middle one fitting the width of its content?

How can I produce a document similar to this, but cause the middle column to take up only as much space as it needs (rather than explicitly specifying a width), such that as much space as possible is ...
4
votes
2answers
1k views

Remove space before colorbox

I've made the command \newcommand{\pink}[1]{\colorbox{red!20}{#1}} to highlight in pink. It works fine for words and sentences, but if I want to highlight a subpart of a word, e.g. laugh\pink{ing} ...
16
votes
2answers
14k 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): ...
2
votes
1answer
247 views

Tabular vs fbox (or other options?) for creating an organized document

I'm currently in the process of trying to make a template that I can use for creating lesson plans for my high school math classes, but am having some trouble figuring out how I can make this be the ...
6
votes
1answer
718 views

Page header with gray background and without margin

After finishing my thesis in LaTeX (I am an absolute newcomer) I've been asked to format it in a specific design matching a doc-file I received. I've managed to change titles and fonts and margins ...
8
votes
1answer
232 views

Savebox equivalent of \csname?

I would like to define a command which would increment a counter, and create a new savebox whose name is generated from the counter value. Something like: \documentclass{article} ...
6
votes
2answers
1k views

Highlight an equation within an align environment with color option

I'd really like to do exactly what's being asked for in this question: Highlight an equation within an align environment, but with the ability to change the color when I call it, so that I could have ...
3
votes
3answers
781 views

How to create a keybutton in latex? [duplicate]

Possible Duplicate: Keyboard Font for LaTeX So the result looks like: Press F5 for help. I've checked the fancybox package, but it only includes three patterns: doublebox, ovalbox, ...
8
votes
2answers
953 views

Underfull \vbox in each longtable… can it be fixed or must it be ignored?

I got some strange "underfull \vbox (badness 10000) detected at line ..." warnings, obviously at each of my "longtable"s. Is there a way to fix them (I actually don't see the cause) or do I have to ...
5
votes
1answer
399 views

aboxed across multiple alignment

I would like to have the entire last line in a box, but when I compile, it only boxes the first equation and doesn't even print the second equation. Does anyone know how to fix this? Here's my MWE. ...
5
votes
1answer
260 views

Savebox with \bgroup/\egroup doesn't work in beamer (for environment)

This works: \documentclass{article} \newsavebox{\mybox} \begin{document} \savebox{\mybox}\bgroup This is a test.\egroup\usebox{\mybox} \end{document} But this fails (Missing } inserted. at the ...
7
votes
1answer
350 views

Penalty or badness for linebreak near start or end of sentence

I would like to set a penalty or badness for breaking a sentence (or the contents of some \command{...}) too early. More specifically, I would like the penalty of a line break to be dependent on the ...