11
votes
1answer
77 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 ...
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, ...
4
votes
4answers
99 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
54 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} % ...
12
votes
1answer
75 views

Tight connection of \vbox es

I don't understand why TeX put a thin whitespace between my two vertical boxes: \documentclass{article} \begin{document} \vbox to 1cm {\rule{1cm}{1cm}} \vbox to 1cm {\rule{1cm}{1cm}} ...
6
votes
0answers
124 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 ...
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 ...
4
votes
1answer
418 views

\vbox with some extra space below

I don't understand why when using \vbox of a certain height, there is some extra space added below it. I'm trying - towards grid typesetting - to put for example graphics in the vbox of a certain ...
8
votes
2answers
162 views

Is it possible to remove (or otherwise nullify) a whatsit node from a box?

I am aware that it is not generally possible to modify the contents of a box (as per http://tex.stackexchange.com/a/49903/17427), though I believe it is sometimes possible to "unbox" material and hack ...
11
votes
1answer
978 views

Why does \hss fail?

Please why does the following fail? % \hss -> \hskip 0pt plus 1fil minus 1fil \setbox0=\hbox{a}% \setbox0\hbox to 10mm{\hss\unhbox0\hss} \unhbox0 And what makes LaTeX's ...
5
votes
2answers
244 views

Output routine and \box255

The \box255 referred to in this question applies only to the container of the latest chunk of the MVL, as cut by the page builder. Now the question: I read somewhere that \setbox0=\vbox to ...
18
votes
2answers
332 views

What is \box255?

I'm just reading the everyshi manual, and it says: This package provides the hooks \EveryShipout and \AtNextShipout whose arguments are executed after the output routine has constructed ...
7
votes
2answers
98 views

Changing the refpoint of splittopskip?

The following example has the setting: \splittopskip=.3cm However in the output I can't see any vertical space. It seems that \vsplit starts the computing of the height at the baseline. How can I ...
4
votes
1answer
126 views

How can I remove a vertical skip added by splittopskip?

The following example splits a box with the setting \splittopskip=2cm. Everything works as expected. However I want to remove the vertical skip add by \splittopskip=2cm some steps later. Is there an ...
14
votes
2answers
170 views

Can I get at stuff in “current page” or “recent contributions”?

When I compile the following, \documentclass[a4paper]{article} \usepackage{atbegshi} \AtBeginShipout{\showlists} \showboxdepth\maxdimen \showboxbreadth\maxdimen \usepackage{lipsum} ...
30
votes
5answers
2k views

Confused with TeX terminology: height, depth, width

The LaTeX reference card states for example \strut box w/ ht and depth of “(”, zero width I came to see text as a two dimensional feature, but I must be missing out on something... (following ...
9
votes
2answers
917 views

How to avoid underfull vbox in combination with \vsplit?

In the following example I am using the command \vsplit. I can't see the reason why \vsplit produced an overfull \vbox \documentclass{article} \parindent0pt \def\exampletext{Text Text Text Text Text ...
2
votes
2answers
115 views

How do I get what's been printed by {align}?

I was trying to figure out an automatic answer to Sharing alignment between equations in two different items by way of typesetting an {align} inside a \vbox and then using \unvbox and \lastbox ...
3
votes
2answers
738 views

Centering contents after \unvbox

Trying to build a complex macro, I managed to compute what I need in a vbox. Now, I want to \unvbox this box to allow page breaks, and would like each element it contains to be centered. I can't find ...
6
votes
1answer
250 views

How costly is it to store content in a box register?

I wonder how costly it is in terms of compilations speed and also other terms like memory etc., to store some content in a box and use this box then afterwards only once (or maybe twice). Is the ...
29
votes
1answer
2k views

Definition of \strut explained

Can anyone explain me the fine details of the \strut macro. Why is the box \copyied in mathmode but \unhcopyied otherwise? % latex.ltx, line 484, but identical in plainTeX ...
12
votes
2answers
1k views

Breakable vboxes

In Plain TeX how can I make vboxes breakable, and can I handle/measure them separately? What I'm trying to do, is that I have a portion of text, that is treated separately (no indention, narrower, ...
14
votes
2answers
549 views

Why is \baselineskip not inserted before an \unvbox?

It seems that \setbox0=\vbox{\hbox{abc}}\unvbox0 is not equivalent to \hbox{abc}: the former does not insert a \baselineskip in the following situation. \vbox{% \hbox{XY}% \hbox{abc}% ...
8
votes
2answers
681 views

Reading the contents of a box

Is it possible to take a box and retrieve the following information from it: A list of all "top level" internal boxes; All intervening space (kerns and glue: did I forget another type of space?)? ...
7
votes
2answers
2k views

How can the dimensions of a box be retrieved with LaTeX

One can specify a box in LaTeX, using various methods for example: \newsavebox{\Abox} \savebox{\Abox}{\parbox{4cm}{\lorem}} \usebox{\Abox} How can I retrieve the width, height and depth of the ...
4
votes
3answers
451 views

Restricting the length of a line of text while allowing line breaks

While attempting to answer this question, I re-read Chapter 14 of The TeX Book (on how TeX breaks paragraphs into lines). It got me thinking: Is there a way to restrict the length of a string of text ...