{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

2
votes
1answer
13 views

longtabu and rotatebox resulting on too wide table

I'm trying to produce a fixed full-width table, that can potentially span multiple pages. I found that rotating headers with \rotatebox messes up the dimension computation, but I can't find a way to ...
2
votes
1answer
31 views

Building a box for side calculations

I am doing a math assignment, and want to place a box next to my calculations for side calculations. I tried to use the tabular environment, but then there is a huge space besides the box, and the ...
3
votes
1answer
28 views

Boxes with two different border widths

I'm making a box with text inside. For it I use the package mdframed. Essentially I want a box with the left border width 2pt and the rest of the borders width 1pt. What I've got so far: ...
3
votes
2answers
36 views

Automatically add \vfill for breakable tcolorbox

I'm using tcolorbox with nested tcolorboxes, the upper level ones being breakable. Here is an example. \documentclass{article} \usepackage{lipsum} \usepackage{tcolorbox} ...
3
votes
1answer
105 views

How to make an empty box

I am making a sheet where people can fill in answers of various types. For this I would like to make some boxes of certain width and height. How can this best be done? I use \fbox when I want to box a ...
4
votes
1answer
87 views

Print immediately before first word of paragraph, without altering its first line indentation?

Although my case can be generalised, perhaps it would be clearer if I describe a specific example. I need to print a digit as a subscript, immediately to the left of the first line of each paragraph, ...
1
vote
0answers
27 views

Split page first vertically, then horizontal, and finally vertical again, for folding into eighths. Reflow?

I would like to make a letter sized document for folding into eighths for a pocket size pad to take notes and include references, for instance tasks for the day. I may use org-mode exporting ...
2
votes
1answer
102 views

Background colors with mdframed: is this behavior normal?

Introduction With the help of this answer, I tried to define a semi-transparent background for a theorem-like environment. Here is my solution: \documentclass{article} ...
6
votes
1answer
50 views

Unboxing \hrule's?

How do you unbox \hrules such as in this code sample: \setbox0=\vbox{1\hrule2\hfil\break3} \unvbox0 \setbox0=\lastbox % line 3 \unskip % \baselineskip \unpenalty % \break ...
3
votes
1answer
42 views

Unwanted title box on first page of a part

I used the code provided by Gonzalo here Chapter Title in rotated vertical box at the margin The problem I have are: I am using \parts also to divide my document and the box appear in the part ...
9
votes
1answer
88 views

Measuring a part of the page

I'm trying to measure the height of a part of my page. The complete titlepage, along with the part of the page I'm trying to measure is outlined in red, and the code to compile the page is shown ...
4
votes
1answer
58 views

How to skip \newsavebox?

I frequently try out stuff and do a little introspection to find out why things (don't) work the way they do. Using boxes and obtaining their width, height and depth is an integral part of this. As ...
4
votes
3answers
72 views

Newline is not working with parbox and usebox

I would like to save data to a savebox (or any other storage element) in iterations. At the end I would like to put each datapoint in a framebox and then in a frambox container with a given width. ...
0
votes
1answer
40 views

How to keep increasing counters for content that is (optionally) hidden?

I have a framework for creating exercises, where the content of the solution to each subproblem is fed into a \solution-macro, which only displays its content if a global boolean is set to true. What ...
1
vote
1answer
76 views

(color-) Box spanning two out of three columns

I desire a layout that has, say, an "info-box" (for the lack of better wording). The main layout of my document uses a three column layout. I intend to place a colorbox (two columns in width) in such ...
7
votes
2answers
120 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
45 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
157 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
103 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', ...
16
votes
4answers
858 views

How to draw the following box using TikZ?

How to draw the following boxes using TikZ? EDIT (22.09.)
5
votes
2answers
136 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
57 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
96 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
80 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
64 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
89 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
50 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
57 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
60 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
13 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
88 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
127 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
73 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
102 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
108 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
81 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
75 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
63 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
64 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
93 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
84 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
78 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
304 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
104 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
137 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
61 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
143 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
50 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
58 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} ...