{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

5
votes
1answer
162 views

difficulties getting lrbox to cooperate with Verbatim environment

This is a follow up to an earlier question of mine: local commands are not recognized when trying to define a wrapper lrbox If I write \documentclass{article} \usepackage{fancyvrb} ...
4
votes
1answer
79 views

local commands are not recognized when trying to define a wrapper lrbox

I can't get the following code to work correctly: \documentclass{article} \usepackage{pgfkeys} \makeatletter \newif\if@ae@nfig@verb@ \pgfkeys {%%' /ae/nfigverb/.is family, /ae/nfigverb, ...
5
votes
3answers
2k views

I can't seem to get \fbox and \itemize to work together

I'm trying to place some text inside of a box, here's what I'm writing that is not working: \fbox{The \textit{two-step} model of XMCD: \begin{itemize} \item[In the \textit{first step}, circularly ...
3
votes
2answers
227 views

Bad box because of algebraic expression

I'm getting a bad box in the following (I can see in the PDF that the expression is shooting past the right edge of page contents): \item If $\dfrac{a}{b} = \dfrac{c}{d} = \dfrac{e}{f} = \ldots$, ...
11
votes
2answers
431 views

mdframed box of fixed minimum height

I would like my mdframed boxes from MyEnvironment to have a minimum total (title+body) height. The height can be greater (if the content warrants it), but not smaller than a certain size. I can ...
6
votes
0answers
128 views

Replace paragraphs with boxes [closed]

I would like to replace the paragraphs of a compiled document with framed boxes. Although I read the /tex/latex/base documentations I have no idea how to tackle this problem. In detail I want to ...
5
votes
3answers
481 views

Vertical spacing around a parbox

Given this: \documentclass{article} \usepackage{lipsum} \usepackage{setspace} \setstretch{1.5} \setlength{\parindent}{0pt} \newlength{\len} \newcommand{\arrowed}[1]{% % draw an arrow, then a ...
5
votes
2answers
140 views

How do I add a box as a prefix to sections or float a box left of sections?

I am working on converting some old documents at work into LaTeX. I realize that some of the things I need to do do not conform to the LaTeX typesetting standards but that is where I am. I have most ...
16
votes
3answers
778 views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] ...
7
votes
1answer
493 views

defining a centered shadowboxed listings environment

I'm trying to define a environment for code listings wrapped in a shadowbox and centered in the line. Using this code, I can generate the kind of output that I want: ...
2
votes
0answers
208 views

\tcolorbox: footnote on page on which there are

I use in my document boxes created with tcolorbox package. Each box can cover few pages in document, and I would like to add some footnotes inside the box. But I want the footnotes to occur together ...
6
votes
1answer
147 views

Box with same vertical height, even when empty

I'm trying to draw a vertical box around one or more lines of text (for a field in a pre-filled form), but some of the fields may be empty and in these cases, the box should be the same vertical ...
8
votes
2answers
221 views

Better way to center text below overline with given length

I need to create lines for signatures. I need 3 of them with different texts below them, but i want all lines to have the same length and the texts centered below them. Tables with \hlines made the ...
15
votes
1answer
221 views

Strange behaviour of \sbox

This question consists of two related parts. I already solved the original problem but still don't understand where it came from or why the solution works. I use the subcaption package so I can place ...
2
votes
3answers
194 views

get the width (in pt) of a box

I would get the width (so a dimension) of a string in a box. I need to know the width of \hphantom{some text}, in order to use it into a tikz picture, for example as \draw (0,0)--(\mylen,0); that ...
1
vote
0answers
260 views

Occasional overfull \vbox warnings [closed]

Depending on the value of \aeheight I may or may not get Overfull \vbox errors. I don't understand why. \documentclass{article} \usepackage[margin=0.5in,landscape]{geometry} \usepackage{multicol} ...
0
votes
0answers
34 views

Badbox in TexnicCenter.. How to solve it? [duplicate]

After compiling my Project in Latex, I got 206 badboxes of all the types you want. However, I can only see the reference of the Badbox, for example: Underfull \hbox (badness 1607) in paragraph at ...
8
votes
2answers
523 views

Making the text fit in a specific space in Latex

I'm trying to fit my text in a specific space, as it's a Graph explanation. I would like to make something like the graph below: Is it possible to make the text fit in that space? LaTex does it by ...
-1
votes
1answer
2k views

How to make this diagram in latex

Please could someone make this diagram in LaTeX and if you have some other thought to make it better than I draw it I'll be grateful. Here is how figure 1 and 2 Thanks to Mr John Wickerson who ...
8
votes
2answers
4k views

Sample example of box in latex

Could someone make this picture in sample code in LaTeX and please make it in different style with different colors. Here is my attempt: \fbox{ \parbox{\linewidth}{ This example will show ...
3
votes
2answers
1k views

Coloured shadowed boxes around equations

When I want to highlight some important result, I traditionnally put my equations in boxes: \begin{equation} boxed{\Delta = b^2-4ac} \end{equation} I would like to have a more fancy thing: to be ...
19
votes
2answers
666 views

TikZ -The pretty boxes to frame the theorems-lemma-proposition-etc

I came across a website which provides examples of pretty boxes to frame theorems in LaTeX with extension bioboite and not with TikZ. Here is code with: \documentclass{article} ...
2
votes
2answers
433 views

How to show only the TeX boxes [duplicate]

I'd like to use a sequence of boxes to show how TeX works. I read some time ago that everything (or almost) in TeX are boxes. So, how to show only the TeX boxes that surround each character, each ...
15
votes
3answers
447 views

Angle brackets with an underset arrow

I am trying to make a pair of angle brackets of variable height enclosing a main box along with a box beneath each bracket and an arrow of variable length between these lower boxes. Since I'm sure ...
8
votes
1answer
528 views

Fancy Handwritten Post it document

Recently I was asked by a professor to gather comments from all my class mates, anonimusly, regading his way of teaching in order to improve or keep some aspects. I thought to write each comment in a ...
0
votes
0answers
32 views

How can I keep an environment all on one page? [duplicate]

In other words, how can I forbid pagination between \myenv and \endmyenv? I thought at first to make the whole thing a box; if I'm not mistaken---this would prevent TeX from breaking it up---but I ...
5
votes
1answer
230 views

Newline Not Working Inside \pbox After Using \selectfont Command

I have the following command defined for a custom row of a two-column tabularx table with column specifiers rX: \newcommand{\pbrow}[2]{\pbox[t]{\linewidth}{#1} & \pbox[t]{\linewidth}{#2} \\} ...
6
votes
4answers
249 views

Why is `\strut` working in these scenarios?

\strut seems to be a powerful command to get the interlinear spacing correct; particularly, when working with text in \parboxs or minipages. But it's also nice in contexts in which LaTeX is setting ...
5
votes
2answers
94 views

Boxes of zero height, depth and width unexpectedly affecting document spacing

I was adding some mark up for a roughdraft of a document I'm working on. But when I eliminated the mark up, the spacing and linebreaks came out differ. My intention was to create boxes of zero ...
10
votes
1answer
222 views

How do I get an empty box on each page?

I'd like to have an empty box on the bottom of my pages in a certain chapter. I've messed around with wrapfigure and kinda sorta gotten something that looks okay, but I'd like to do it properly so I ...
2
votes
1answer
164 views

Not breakable box in mdframed package

In my previous post, title of a colored box, I've tried the first answer I was given typing the following code: \documentclass[12pt,a4paper,titlepage,twoside,openright]{book} ...
5
votes
1answer
429 views

Break box (a long caption) over pages

I want to have text of a certain width less than the page width, which goes across several pages. Normally you’d put text into a (\par)box to set its width but these boxes cannot be broken across ...
7
votes
2answers
315 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
110 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
308 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
72 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
184 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
2k 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
0answers
847 views

Fitting TikZ picture in beamer: Difference between using \resizebox and \adjustbox? [closed]

\documentclass[10pt]{beamer} \usepackage{amsmath} \usepackage{amssymb} \usepackage[english]{babel} \usepackage{color} \usepackage{float} \usepackage[T1]{fontenc} ...
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 ...
21
votes
1answer
5k 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
138 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
237 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
235 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
456 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
1k 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
139 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
826 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
470 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
253 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 ...