{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

7
votes
2answers
294 views

title of a colored box

In an another post, beamer style text box, I've seen a box that I'm interested in making it. However, I would like to use it in a book, and I would like before the title to write: Definition (or ...
1
vote
0answers
100 views

Removing overfull and underfull box warnings [closed]

Always when I want to prepare a document with LaTeX I receive different warnings including underfull and overfull but I don't know how I can handle these warnings. As you can see here I have two ...
5
votes
1answer
278 views

Box around several but different items in an itemize environment

I am trying to highlight, at the end of my slide, several items in a list with a box in something similar as in the method shown in Box around a few items in an itemize environment. The difference ...
2
votes
1answer
71 views

how to extend shaded to full page width?

I use "shaded" to indicate the reader that the text is about something special. This works fine but i can not extend the box to the full page with. How is this possible? I use LYX and i can imagine ...
3
votes
1answer
171 views

vertical spacing on enumitem

In the example below I want the enumerate list to essentially be ``inline'' with the word Example from the example environment. It works perfectly with text or enumerate* (inline list), but I cannot ...
1
vote
1answer
1k views

Mimicking (*office) CV-layout in TeX

To me (who considers himself a TeX-beginner for a long while to come) it seems like quite a mountain to climb, with much guessworking required, to convert this CV template into a (reasonably close, or ...
5
votes
1answer
72 views

Header content higher than header heigth

Edited: based on the discussion below I created an interactive file to help people to understand the margins. I'd like to get your opinion about that. You can access it here: Geogebra file to ...
17
votes
1answer
4k views

Differentiating between \hbox and \mbox

What are the differences between \hbox and \mbox? Related: This answer to "What are the different kinds of boxes in (La)TeX?" discusses different boxes in general. This answer to "Difference ...
4
votes
1answer
130 views

Equal separation between south of one node and north of another

I am new to TikZ and am trying to get these three boxes with equal spacings between the outer frames of the boxes such that the two arrows are the same length. I am going to have a flow chart with ...
10
votes
2answers
211 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
222 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
402 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
999 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
128 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
702 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
425 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
237 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
246 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
153 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
712 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
171 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
187 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
251 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
4k 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
197 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 ...
7
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
380 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
237 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
997 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
304 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
3k 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
103 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
2answers
6k 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
114 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
675 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
230 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
200 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
265 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
328 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
139 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
959 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
132 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 ...