# Tag Info

## New answers tagged tex-core

2

Add a check in \pagecontents that we're not in a chapter starting page. You need that your chapter has more than one page, though. \newif\ifchapterpage \def\chap#1\par{% \vfil\break\vglue1cm {\nobreak\noindent #1\par} \global\chapterpagetrue \nobreak\bigskip %\firstnoindent % commented because definition is missing } \catcode`@=11 ...

0

Yet another way to crash the engine: \closeout18\bye causes a segmentation fault in pdfTeX and in XeTeX when trying to ship out the page. The last line shown on the terminal is [1zsh: segmentation fault (core dumped) pdftex '\closeout18\bye'

1

The best source for definitions and meanings of LaTeX sources is source2e. Specifically for \ensuremath, it states In math mode, \ensuremath{text} is equivalent to text; in LR or paragraph mode, it is equivalent to $text$. \relax is not needed in front of the \ifmmode as \protect will be \let to \relax. This version (due to Donald Arseneau) avoids ...

14

The argument for \kern is a ⟨dimen⟩, so TeX first looks for a ⟨decimal number⟩ (which can be an integer in any admissible representation, or a fractional number in decimal notation, with period or comma for separating the fractional part) and then for a ⟨unit of measure⟩, that is, a pair of letters representing one of the accepted units (pt, cm, mm, in, dd, ...

3

I cite the TeX By Topic book by Viktor Eijkhout. Here is a an excerpt \char is basically just for conversion of numbers to a character representation, using the underlying encoding. '82 uses octal numbers, "82 means hexadecimal numbers. The last sentence in this excerpt says all: typeset character number so-and-so

5

TeX doesn't expand tokens when it's absorbing arguments to a macro. So \foo finds } when still looking for its second argument after having decided that \x is the first one. If your aim is to have the second argument to \foo delimited by a space you should do \def\foo#1#2 {% \if#1a% \message{#2} \fi} \def\x{abc } \edef\y{\expandafter\foo\x} \y so ...

5

The first case is \leaders with a rule. The rule can be easily extended to the desired width. The result is just one rule with the specified leaders width. The second case is a box with fixed dimensions. The width of the box is the default rule width 0.4 pt. Then the space to be filled is filled with the boxes. There are three variants: \leaders sets the ...

Top 50 recent answers are included