12
votes
1answer
66 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}} ...
10
votes
3answers
380 views

Why is tex designed to render spaces around brackets?

When I wrote following lines: \section{Introduction}{ Content in introduction ... } Unwanted space comes before Content as warned. I understand it's due to some technical decision in tex. But I ...
11
votes
4answers
102 views

A question about macro matching

Consider the following macro definition, and subsequent invocation: \def\foo #1 #2 \bar{stuff with #1 and #2 goes here} \foo arg1 arg2 \bar The \bar simply acts as the terminator for \foo. This all ...
18
votes
1answer
288 views

Drawbacks of redefining math accents with extra leading {}?

As I discovered through the non-bug latex/4253, TeX has a (mis)feature whereby it ignores braces around a \mathaccent construction: ${a_b}_c$ works, but ${\tilde a_b}_c$ fails with a "Double ...
7
votes
1answer
525 views

TeX ignores \vskip at the beginning of document

Here is a simple Plain TeX snippet for demonstration \vskip 3in Aaaaa \vskip 3in Bbbbb \end When I compile this with pdftex, I expect to see a 3-inch-high blank space, then Aaaaa, followed by ...
15
votes
3answers
861 views

Difference between \mskip and \mkern

What are the differences between \mskip and \mkern? The TeXbook writes the following (ch. 18): You can insert math glue into any formula just by giving the command ‘\mskip⟨muglue⟩’. [...] ...
16
votes
2answers
1k views

When is it good practice to use \unskip

One sees in source2e the command \unskip used in various places. My understanding in general terms is that the macro is the equivalent of \ignorespacesbehind. Where would it be recommended to use ...
4
votes
3answers
217 views

How are space tokens and empty lines processed by long commands (as their potential arguments)?

How are spaces and empty lines processed by long commands (i.e., those that do not accept paragraph breaks inside)? Are there different space tokens aside from " " and an empty line? It appears that ...
12
votes
2answers
555 views

The revenge of the vboxes

Yes, they're back. With a vengeance. Those pesky little buggers we call \vboxes which I've fought against previously. (And Bruno, too.) \parskip=0pt \def\unquo{\unvbox0\smallskip} ...
5
votes
1answer
93 views

Preventing atoms from changing kind

In the example below, the presence of \mycommand changes the first minus sign into a binary operation atom, so that the spacing between - and 1 is increased. \documentclass{article} ...
4
votes
1answer
116 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 ...
11
votes
1answer
550 views

How to prevent extra spaces between two specific words when justification occurs?

My document contains many short, justified lines, so the lines often appear with many spaces between words, e.g.: These words have a space so that they can fit nicely into the available ...
8
votes
2answers
215 views

Practical uses for skips with negative stretch or shrink components

I am currently looking somewhat carefully at how TeX manipulates skips, and I am having trouble finding practical use cases for skips with a negative stretch or shrink component, such as \Askip and ...
4
votes
1answer
347 views

Why doesn't math \fontdimen's work with XeTeX?

Why doesn't the \fontdimen-command change anything with XeTeX? \input pgffor \def\chfndims#1{\foreach\dim in{13,...,19}{\fontdimen\dim#1=20pt}} \font\mymathfn="XITS Math:script=math" at 10pt ...
6
votes
2answers
316 views

Vertical Equivalent of \hfill

Is there an equivalent of \hfill for vertical spacing?
9
votes
2answers
219 views

Which spaces exactly are ignored by \halign?

Some spaces seem ignored by the \halign primitive. For instance, \setbox0=\vbox{\halign{ # \cr \space b \cr}} \showbox0 indicates that there is no glue before b, but that there are two spaces ...
59
votes
3answers
51k views

\vspace vs. \vskip

What is the difference between \vspace{-1em} and \vskip -1em, for example? I guess the first is LaTeX, and the latter is TeX. When is the proper time to use one and not the other, and why?