3
votes
1answer
67 views

Is there any horizontal skip after which the space character `\ ` is removed automatically?

Let's consider the following TeX macro: \def\theorem#1{Theorem (#1).\enspace} Try to use it: \theorem{Dirac} A simple graph with $n$ vertices\dots Then TeX produces two spaces after "Theorem ...
13
votes
1answer
126 views

How can we detect that we are right after display math mode? (for vertical spacing)

I need a "\smartmedskip" feature/macro in plain TeX which is in usual identical to \medskip, however, if we are right after display math mode, then it should be just "disabled", i.e. it should then ...
2
votes
2answers
127 views

Kind of spurious space

I'm trying to write a \spaced macro: it takes a string as parameter, decompose that string and then recompose it spreading avery token from the others according to a given \spreadratio. Here are the ...
8
votes
1answer
357 views

Can I assume that the \ht+\dp of a strutbox == \baselineskip?

In Context, as long as the interline space is set through the proper interface, it is safe to assume that (tex.box.strutbox.height + tex.box.strutbox.depth) == tex.baselineskip.width. This relation is ...
13
votes
2answers
607 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} ...
4
votes
1answer
137 views

What's special about \def\\ vs. \def\mksp?

In the following definitions, \\ captures a space token but \mksp does not. \documentclass{article} \begin{document} {\def\\{\global\let\sp= } \\ } {\def\mksp{\global\let\spx= } \mksp } \show\sp ...
16
votes
1answer
282 views

What does `\ ` exactly do?

In the The Not So Short Introduction to LATEX2e - Version 5.01, April 06, 2011 it is suggested that: A backslash in front of a space generates a space that will not be enlarged. (page 39) It ...
4
votes
1answer
3k views

Make an invisible vbox

I'm placing a PDF meta information in a \vbox in a plain XeTeX document, and I would like it to behave as if there were no box at all (so any additional \vskip after the \vbox will appear). Right now, ...
13
votes
4answers
2k views

Hard whitespace

I am using plainTeX and would like to typeset some (python) code examples. Switching to \tt gets me partway there, but I (obviously) need the whitespace respected. Is there a trick for doing this? The ...