{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

6
votes
2answers
71 views

\hbox spread in plain TeX

I want to learn Plain TeX to understand the underlying mechanics of TeX and friends. I am trying to reproduce the spacing of this dedication from the Spanish music-theory treatise, El porque de la ...
4
votes
2answers
36 views

Line breaks in \fbox

I sometimes have bits of text I want to emphasize. My idea is to change the margin with changepage's adjustwidth and then frame the text with \fbox. The problem is this prevents linebreaks. For now, ...
3
votes
4answers
86 views

Fitting fancyhdr's chead in a colorbox

I am trying to create a header using fancyhdr in which the rhead and lhead parts are two images, of the same and known size. In the center, I would like to put some text (perhaps the document's ...
4
votes
3answers
94 views

Restrict text to box without linebreak

This: \fbox{\makebox[3cm][l]{long text long text long text long text}} results into this: I want it to stop right at the end of the box. No line-wrapping. So the text, which is 'too much', ...
14
votes
3answers
622 views

How to draw the following box using TikZ?

How to draw the following box using TikZ?
4
votes
2answers
117 views

How to make more than two fancy gradient stripes in tcolorbox?

I use the following fancy tcolorbox definition: \newtcolorbox{mybox}{colframe=black!80,colback=black!10,sharpish corners, skin=bicolor,interior style={left color=black!5,right ...
5
votes
1answer
49 views

move text box outside the textwidth

I used tcolorbox to make a semi-transparent box as explained in this link. What I need is to offset this box from the center of the texwidth, this means crossing a bit the border of the textwidth. Is ...
3
votes
1answer
66 views

text with semi-transparent color filled box

I have this text: \begin{flushleft} \fontsize{16pt}{16pt}\selectfont\textit{some text}\\ \fontsize{16pt}{16pt}\selectfont\textit{some text} \end{flushleft} and I would like to have a filled ...
4
votes
2answers
72 views

How to relax the horizontal spacing rules for one line?

I have a line that happens to end in a non-breakable code-fragment This is a long line that ends in a \pre{std::ostream} long word. When printed the line is too full. The spaces between the words ...
5
votes
1answer
41 views

How to use wider and higher margins in a beamerboxesrounded box?

I love beamerboxesrounded boxes in Beamer presentations, but the text fits too tightly into the box. So I would like to use equal but wider and higher margins (left, right, top, bottom) around the ...
5
votes
3answers
64 views

Long list of tabular figures inside minipage goes off page

Using the follow MWE, I'm able to create a beautiful lists of photos on the left and a caption on the right (similarly, I could also use the sidecaption package or floats directly). MWE [LuaLaTeX]: ...
5
votes
1answer
37 views

\vbox and vertical spacing between lines

When I put a text in a \vbox and \unvbox it, I have extra space between line. Why? See the MWE: \documentclass{article} \begin{document} \newbox\titi ...
0
votes
3answers
44 views

header rule margin with boxes

I'm creating a document with a box in the header and an other one in the footer. But I would like to have the same space between the bottom of the top box and header rule and between the top of the ...
0
votes
2answers
53 views

Ignore particular tabular cell height and simple overflow its content (like \multirow)

I want latex to ignore the height of a tabular cell and to overflow its content to the above and below tabular cell (see image - red arrows). First I tried \multirow but this doesn't align the text on ...
1
vote
0answers
10 views

\parboxes with facing pages in `eledmac`/`eledpar`

Currently I'm trying to typeset a document with facing pages using eledpar and eledmac. On some pages I'd like to fill in images between paragraphs. In order to have a predictable height for these ...
2
votes
1answer
79 views

Rescale paragraph to fit margins or detect used width of paragraph

I want to write a command or similar that allows me to rescale a given paragraph to fit a given frame, keeping the aspect ratio. The problem is that the paragraph is usually manually set and not ...
3
votes
3answers
119 views

No space before first section in framed box

I am looking for the correct way to lay out content in a framed box. In my opinion the space before the first section in a box looks odd in comparison to the same content at the start of a page. How ...
4
votes
2answers
67 views

Boxes with equal height

I am looking for a simple way to make the following boxes the same height. \documentclass{article} \setlength{\parindent}{0pt} \begin{document} \fbox{\hbox to 0.3\linewidth{\vbox{test}}}% \hfill ...
6
votes
2answers
91 views

Problem with vertical alignment in tabular environment

I'm having a few issues with vertically aligning table elements. There seems to be too much space either above or below the text or image. Is this to do with the fbox environment? I want both the ...
5
votes
1answer
84 views

Debugging Friggeri's CV - Underfull \hbox (badness 10000)

I am trying to debug my CV made using Friggeri's CV template but there is still a recurrent warning I cannot get rid of no matter what I try... I am using the same friggeri-cv.cls file, I have only ...
3
votes
1answer
71 views

Controlling height of box

I am currently using the code \newsavebox{\FVerbB} \newenvironment{code} {\VerbatimEnvironment \hspace{-0.25cm} \begin{lrbox}{\FVerbB} \hspace{-0.29cm} \begin{BVerbatim}} {\end{BVerbatim} ...
3
votes
1answer
56 views

How to make a box around an equation in align-environment

I would like to draw a frame around one equation to point it out. I used \fbox{...} but it didn't work out. Here is a minimal example where I tried it. Any package suggestions? \documentclass[ ...
6
votes
1answer
54 views

Why is a varwidth incorrectly vertically centered by \raisebox{-0.5\height}?

I was creating a pseudocode/JavaScript comparison table, and wanted to typeset algorithms written with the algorithm2e package vertically centered in table cells. Out-of-the box, algorithm2e can't do ...
9
votes
1answer
56 views

Peek ahead a \vbox: \vsplit and reassemble again?

I'm wondering if it's possible to implement a peek method to inspect the head of a \vbox without changing the content of the \vbox. It could be done by brute force using a \copy of the original \vbox, ...
3
votes
0answers
89 views

How to get box dimensions within lualatex

I'm new to lualatex, which looks phenomenal. I wonder what the easiest way is to access the dimensions of a box from within lualatex. I intend to use it in more complicated situations than this (as ...
11
votes
1answer
80 views

Measure total glue in a box

Someone gives me a box, and my goal is to know as much as possible about the amount of glue inside that box. I can assume that the box is not huge, but it may contain arbitrary stuff (so I cannot ...
1
vote
1answer
68 views

Shadow title-like box in beamer

I'd like to have the same box as the title one. I try an imitation, but is there a direct way with beamer stuff ? \documentclass[xcolor=dvipsnames]{beamer} \RequirePackage{fontspec} ...
5
votes
3answers
109 views

Adding a hrule between hboxes decreases their vertical distance

Using pdftex. Given two sample programs test0.tex \vbox{ \hbox{X} \hbox{Y} } \bye test1.tex \vbox{ \hbox{X} \hrule \hbox{Y} } \bye gives the following outputs. test0.png test1.png So, ...
7
votes
3answers
251 views

Make box with minimum width (in math mode)

How can I give a box a minimal width, in math mode? That is, I would like a command something like \minwidth{exp}{width}, which will always typeset exp, but additionally, if the natural length of exp ...
10
votes
1answer
94 views

Measure a very large \vbox

I would like to measure the total height of a \vbox even for boxes which are larger than \maxdimen. It would be enough, if the code would compute the total height correctly only for small boxes. For ...
4
votes
4answers
110 views

\vtop vertical top alignment of \vsplit \vbox

Well, I wanted to have a minipage spanning across pages, so first I thought to split a minipage so it can , but I learned you cannot; so I got to breakable vboxes, and in trying that, learned that ...
3
votes
1answer
57 views

Why can I not vsplit a parbox? (and fbox alignment, and unvbox syntax)

I was trying to experiment with the code in this answer: Breakable vboxes, and I got something I didn't expect; consider this MWE: \documentclass{article} \usepackage{lipsum} \usepackage{xcolor} % ...
8
votes
3answers
133 views

Box for multiple lines and automatic width

I feel this is rather a dumb question, but I could not find an answer. I'm looking for a \parbox without the width parameter, i.e. it should be determinded by its content. And the content is multiple ...
2
votes
1answer
47 views

PDFLatex is counting numbers due to a parbox

I am having a problem with a minipage or \parbox and its parameters. Currently I try to do some business cards with the package called ticket. Therefore I modified one example delivered with the ...
6
votes
1answer
53 views

Define \shearbox with \rotatebox and \scalebox

Similar to this problem, I want to define \shearbox with \rotatebox and \scalebox using singular value decomposition: The latex code is as follows: \documentclass[12pt]{article} ...
4
votes
3answers
133 views

Reusing saveboxes

Since \newsavebox{\name} assigns the box register number to \name, there are probably a maximum of 256 boxes available. Is there a way to release a \savebox after you are through with it?
5
votes
2answers
181 views

Coloured box with tikz

I'd like to break a coloured box when the page which contains it breaks... here is an example which shows this issue: \documentclass[11pt]{report} \usepackage[explicit]{titlesec} ...
3
votes
1answer
57 views

Using \textwidth via strip@pt with beamer and the picture environment

OK, I admit I haven't tried my MWE without Beamer. My goal is to use e.g \textwidth with the picture environment, and my overall goal is to include several rectangular portions of an .eps file within ...
4
votes
1answer
120 views

very bad underfull hbox

I would like to include a progress bar in my presentation and, when in draft mode, a page number below the progress bar. I have the code to do this, and it looks great, but I get one instance of this ...
7
votes
3answers
102 views

How to align text in title with \fcolorbox

I have defined a new command to make some titles for a newsletter. I'm using the article class for the document. The command is defined with the following code: \definecolor{myblue}{rgb}{0.16, 0.32, ...
2
votes
0answers
72 views

How to make “callouts” or “standout blurbs” among a larger body of text?

I'm not sure what the word I need to search for is, to find help if this question has already been answered. In magazines it's common to pick out words from the middle of a body of text and repeat ...
4
votes
0answers
79 views

Bottom margin not respected with tikz and verticaly centered boxes

I've been working on making a Cards Against Humanity clone in TeX and have everything but this one last bit working. The text on one card is long enough that I need to stick the logo/game name on the ...
1
vote
1answer
56 views

getting rid of underfull Bad boxes

\begin{table}[h] \begin{center} \renewcommand{\arraystretch}{1.5} \renewcommand{\tabcolsep}{0.2cm} \begin{tabular}{|c|c|c|c|} ...
7
votes
2answers
139 views

tcolorbox empty title but with frame?

I want a box with the header frame for empty title. How can I do that? If I remove the title, the header frame will be removed automatically. I've tried to put an empty title so that I can keep the ...
6
votes
2answers
61 views

Custom date format

I am trying to create a fancy date format as shown below: The following is a MWE of what I have so far. For some reason or the other I can't seem to get the right height. ...
1
vote
1answer
59 views

Draw a box around a title on the title page

As part of a title page, I'd like to make a simple box around my Title. Nothing fancy, just a black lined box around it. But I don't want the box to be as narrow as usual but to have some space around ...
5
votes
1answer
60 views

Tips on ways to mark important equations/statements in a thesis/paper

I'm writing my masters thesis and in it I have a set of examples for different chapters which I separate from the rest of the thesis by a mdframed-box. Furthermore, I have a set of equation that are ...
6
votes
2answers
116 views

What to do with both “underfull \hbox” and “overfull \hbox” in the same line?

I've recently read through my \jobname.log files to spot errors in typography. I came across this: Overfull \hbox (6.8925pt too wide) in paragraph at lines 650--651 [][]\T1/cmtt/m/n/10 ...
7
votes
1answer
135 views

Text doesn't fit the box

I created the following picture with Inkspace and made export to tikz. The problem is that the text doesn't fit the boxes. And the arrows should be colored with a gradient, but it's not so important. ...
5
votes
3answers
131 views

How to measure the minimum width or height of several boxes?

I know we can get the maximum width or height of several boxes via: \setbox0=\vbox{\hbox{a}\hbox{b}\hbox{c}} The maximum width is \the\wd0 \setbox0=\hbox{\hbox{a}\hbox{b}\hbox{c}} The maximum height ...