Tag Info

Hot answers tagged

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, ...


9

\dotfill is defined via \cleaders and an infinite glue specification (\hfill). A similar definition of \vdotfill has two problems: \leaders and friends only work with horizontal glues in horizontal mode or vertical glue in vertical mode. Orthogonal variants are not available. There are two vertical directions (height and depth) instead of one horizontal. ...


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 ...


4

Only \vrule can adapt its height plus depth to the dimension of the outer box. If you need to put dotted vrule between two or more boxes with unknown height and depth then you can use \valign: \def\putbox{\afterassignment\putboxA\setbox0=} \def\putboxA{\aftergroup\putboxB} \def\putboxB{\global\dimen0=\dp0 \dp0=0pt \box0 & \kern\dimen0 \cr} ...


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


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 ...


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 ...



Only top voted, non community-wiki answers of a minimum length are eligible