bachotex2009-hans-taco-pearl1.tex
bachotex2009-hans-taco-pearl1.tex
—
TeX document,
1 KB (1470 bytes)
Zawartość pliku
%%% Scary \<space>
% In pure TeX
\show\
\show\ %
% gives the following log on Hans's machine
%
% **space.tex
% (./space.tex
% > \
% =macro:
% ->\ .
% l.1 \show\
%
% ?
% > \ =\ .
% l.2 \show \
% %
% ?
% )
% No pages of output.
%
% and on Taco's machine gives:
%
% **space.tex
% (./space.tex
% > \^^M=macro:
% ->\ .
% l.1 \show\
%
% ?
% > \ =\ .
% l.2 \show \
% %
% ?
% )
% No pages of output.
%
% The visualization of a ^^M depends of the platform but since
% there's definitely a newline involved we need to take care of it.
%
% When parsing the input the following happens (this is mentioned in
% one of the dangerous bends in the TeXbook):
%
% \let\x\ <newline> => \let\x\<endlinechar>
%
% This means that when you want to store the meaning of this
% primitive, you need to make sure that TeX explicitly sees a
% space instead of a newline. So we get:
\let\normalspaceprimitive=\ % space-comment is really needed
% In ConTeXt this is used for:
%
% \unexpanded\def\ {\mathortext\normalspaceprimitive{\dontleavehmode\space}}
%
% If you don't use the explicit space a simple
$\ $
% will execute \^^M. In Plain TeX (and in ConTeXt) we have:
\def\^^M{\ } % control <return> = control <space>
% So this will result in a loop.
\end
Akcje Dokumentu
