{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

10
votes
2answers
203 views

Multi-line box around a sentence in a paragraph

I am trying to draw a polygon box around a sentence within a paragraph. This box would wrap over multiple lines and terminate exactly at the end of the sentence (i.e. without white space filling the ...
1
vote
2answers
215 views

Need to left align referenced image in mdframed Info box

I have been successful at creating a set of Warning, Note, and Info boxes using mdframed package, and they look very good. However, I need to left align an inserted image rather than have it on its ...
5
votes
2answers
392 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} ...
6
votes
2answers
938 views

How to edit the length of a color box?

I've typed my Resume and Im using a color box, with a line underneath it. However the grey colored box doesn't reach the full length of the page width. \documentclass[letterpaper,11pt]{article} ...
8
votes
2answers
125 views

\setbox containing maths interferes with surrounding math mode in XeTeX

I encountered what might be a bug in XeTeX (but I would be glad to be proven wrong) while chasing a strange interaction between bytefield, unicode-math, and mathtools. In general, I do not expect a ...
3
votes
2answers
671 views

algorithm2e with boxruled gives overfull hbox

I am using the algorithm2e package with the boxruled option to format my pseudo-code. However, I am getting an overfull hbox, which I suspect is due to margin/box conflicts. Does anyone have a fix ...
4
votes
1answer
416 views

listings caption gray box meaning of code

Some time ago I copied this code from Stackexchange to have a nice gray box at the top of my imported source code which I displayed with listings: \DeclareCaptionFont{white}{\color{white}} ...
8
votes
2answers
233 views

How to avoid the enlarging of a \vbox by \vbox\unvbox?

The \vbox{\unvbox ...} operation should remove obsolete vertical space. In the following case, additional vertical space appears somewhere inside the resulting box. The resulting \vbox grows from a ...
2
votes
1answer
235 views

how to centerlize a box in the very center of the paper?

I am trying to draw a box in the center of the current page (A4 size). I try the following code \documentclass{article} \usepackage{graphicx} \usepackage{tikz} ...
1
vote
1answer
65 views

Horizontal boxes in article class

How can I have a box with multiple boxes inside like the following in the article class? It should be at the beginning of the page on the left side.
3
votes
1answer
143 views

Bottom-right box

I am preparing a poster with LaTeX and I want my blocks to be only half boxed to the bottom-right. Which means that I want to draw a half box made of only two lines. Can anyone help me?
5
votes
2answers
695 views

Getting a particular kind of page border using background package

I am doing my project report using latex, and the format requires a particular kind of page border around each page. (Its a black thick box enclosing a thin box). I saw this question, Multiple border ...
1
vote
1answer
68 views

How to set \framed to make the baseline of the whole \framed as same as the first line in this \framed in ConTeXt?

An simple example: \starttext \setupframed[align=right,frame=off,offset=none] \framed{A\hskip3em\framed{B\\ C}} \stoptext How can I set the framed which contains B\\ C so that the baseline of ...
4
votes
1answer
168 views

Highlight theorem environment using todonotes

I'm trying to highlight theorem-like environment (defined using amsthm) utilizing todonotes. In the preamble I have: \newtheorem{que}{Question} \newcommand*{\question}[1]{% ...
9
votes
1answer
7k views

What is a “Overfull \hbox (9.89561pt too wide)”?

I have this warnings around, some of them seems to be solved naturally but I never really understand what do they mean. What this means? Edit: I would like to keep the question in more general ...
1
vote
0answers
186 views

Covered Box Beamer Shadows [closed]

It seems to me that in beamer, a (rounded) box with shadows that is covered (transparent, normally visible on the next slide) has buggy shadows, I'm not sure if this is a know bug, or maybe an error ...
6
votes
1answer
243 views

Creating form boxes with labels

I want to recreate a form with LaTeX, that can be filled by hand or --- of course --- via LaTeX. How can I create the boxes, with a footnotesized label at the top and enough space for the text to be ...
4
votes
1answer
3k views

Set the width of a fcolorbox

Hi a very basic question I'm sure, but is there a way to tell \fcolorbox in xcolor to draw the box of a certain width. For example with \fbox I would do \documentclass{article} \usepackage{xcolor} ...
1
vote
2answers
3k views

How to put \algorithm and \algorithmic environments inside a box?

I want to put an algorithm inside a box. Here is the code \fbox{\parbox{0.8\linewidth}{ \begin{algorithm} \caption{My algorithm} \begin{algorithmic}[1] \scriptsize ... \end{algorithmic} ...
1
vote
1answer
189 views

Textbox on frontpage

in my thesis I would like to include a "textbox" in the lower left corner of the front page. It should contain the names of my supervisors. But I'm not able to put a box there, I suppose it has to do ...
6
votes
2answers
6k views

How can I box multiple aligned equations?

This question is two-fold. In my document, I currently have boxes around single equations like so: \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
1
vote
1answer
365 views

footnote inside itemize

I know that I should use \footnotemark and \footnotetext{} (or not?) for putting a footnote inside an itemize environment, but when the items are split on more pages, I want the footnote to be placed ...
3
votes
1answer
101 views

can't put figures in a box

The other day I had a problem in creating an example that contained text and listings, I asked about that here: lstlisting in a box? David Carlisle found a very good solution for it, and after toying ...
5
votes
1answer
228 views

Hide paragraph but keep space

I need a command that replaces its contents by white space of the same size. Unlike \phantom it should work paragraphs and/or images. It should do more or less the same as the \visible command of the ...
4
votes
1answer
920 views

lstlisting in a box?

My problem is that I am trying to write a document with coloured sections for examples. Examples can contain code listings. Somehow I can't seem to combine a background colouring with a listing, or ...
5
votes
2answers
297 views

Drawing boxes of any size and any location

How can I draw rectangles of any size and any placement on the current page? \PassOptionsToPackage{dvipsnames}{xcolor} \documentclass[landscape]{article} \usepackage{tikz,graphicx} ...
8
votes
2answers
2k views

Beamer overlay box around text - the correct way?

I have something that "works," but I'm wondering if there's a more elegant solution. I want to box some text after an itemize in beamer, so this is what I'm doing: \documentclass{beamer} ...
4
votes
1answer
101 views

\hbox in “p”-column (tabular) destroys row layout

The following example code shows a problem with my \vertgap command, which is just intended to add some space above and below the mandatory argument after encapsulating it in an \hbox (for tall ...
15
votes
5answers
8k views

How to draw a square of 1cm in LaTeX filled with color?

How to draw a square of 1cm in LaTeX filled with colour? I found mdframed and framebox does this, but there need to write text inside it. I just need to draw a box.
4
votes
1answer
5k views

Set background color of a box with predefined width

I would like to have something like a minipage with colored background, i.e. a box where you can predefine the width and the background color. My attempt \colorbox{green}{\begin{minipage}{\slwidth} ...
5
votes
1answer
109 views

boxed equation but framed only some sides

I need to box part of an equation, but I need the frame to be open one side. In the following MWE I would need the left part of the equation not to have the right frame of the box and the right part ...
3
votes
1answer
79 views

Vertical centering of a title within a box which ignores possible accents

I am currently adapting the \part command to customize the table of contents as follows [code directly extracted from the book.cls class]: \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax% ...
2
votes
2answers
630 views

(Framed) Boxes are too long / Textwidth doesn't work

I want to create a box/frame (in math mode) with its content centered horizontally and vertically such that I can adjust the height of the box and such the width of the box automatically (!) is the ...
6
votes
2answers
224 views

Saving a list in a re-usable box

Pardon me if this is a dumb question, but I am a bit rusty about this. I want to store a list like one generated by the enumerate environment in a re-usable box that I may re-use within a TikZ ...
13
votes
1answer
198 views

Is it possible to `split a hbox`?

When creating two columns or balancing it, we may use \vsplit to achieve this, but can we split a \hbox in TeX? Compared with \vsplit, an example may be like this: \setbox0=\hbox to 6in{ ... } ...
5
votes
1answer
259 views

Putting text in a box: custom box : different color for each line

For a beamer presentation, I would like to enclose text in a box such that: - all the line of the box are blank, - except the upper left corner, and the lower right corner of the box which are color ...
2
votes
2answers
315 views

Align boxes and rotate boxes in plain TeX

When I finish reading the Appendix D: Dirty Tricks in the TeXbook, I rethink a question: is it possible to align some character boxes like this: The input may be like this: ...
9
votes
1answer
135 views

LaTeX2e \makebox !=\hbox?

The source2e documentation (pg. 233) when describing \makebox states: ... If wid  is missing, then pos is also missing and obj  is put in an \hbox of its natural width... This, ...
3
votes
1answer
933 views

Make matrix inside equation fit the page width in LyX

I have a matrix that is a bit too wide to fit inside my page width. After reading a lot of different answers on the Internet, none really related to LyX, I came up with these three different ...
5
votes
2answers
131 views

Figure with a different box around

I'm trying to make a box around my figure like the ones in Benjamin Pierce "Types and Programming Languages" book and Luca Cardelli paper "Types Systems". Such boxes have horizontal rules and only ...
0
votes
2answers
173 views

Linebreak in table cell at document margin

In order to allow line breaks within a table cell, I use \parbox. But when the cells I want to have line breaks in are in the last column of the table, the best thing would be to break them at the ...
6
votes
3answers
4k views

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

Why does \textit not produce the expected result when used with \usebox?

\documentclass[border=3pt]{standalone} \newsavebox\temp \newenvironment{definition} {\begin{lrbox}{\temp}} {\end{lrbox}\textit{\usebox\temp}} \begin{document} \begin{definition} Hello World! ...
3
votes
1answer
122 views

Globally set the justification in a framed box

I want to show the text from a Python Interpreter in a Windows console. This should be plain text (like you see in a command line terminal). I also want to show Python code snippets with highlighting. ...
1
vote
0answers
39 views

How to implement a floating text box? [duplicate]

I'm trying to write an environment that creates a new float type for text boxes. These are used for example in some books to provide interesting tidbits that aren't really part of the main line of ...
6
votes
1answer
344 views

How can I adjust the box around my equation?

I currently use the \boxed{} command to place boxes around my equations. However, I would like to have more control of the style of the box. Is there a way to do this? To take a specific example, ...
4
votes
1answer
67 views

Removing boxes in a ytableau

I am attempting to draw a ytableau where I remove the boxes around the outermost part of the table. Basically, what I would like to do is remove the boxes around all of the numbers in the example ...
5
votes
1answer
211 views

How to create a shade box that covers the whole footnotes area?

I would like to shade the whole footnote area (bottom of the page). Does anyone know, if it can be done ? Edit : Using the answer provided, the text direction commands \setRL and \setLR, from the ...
1
vote
2answers
584 views

How to right align content of pbox?

Lets have simple \pbox example like this: \documentclass[twoside]{book} \usepackage{pbox, calc} \begin{document} \noindent\fbox{\pbox{\textwidth}{Some text\\Text}} \end{document} Here is printed ...
2
votes
1answer
310 views

How to scale a dirtree inside a figure?

I drew a tree structure with \dirtree. This tree is located in a {figure} environment. It is possible to adjust the size of the figure? With \includegraphics one can do it with scale. Is there a ...