Discussion:
why is VT (ascii 11) apparently "printable" with pdftex?
(too old to reply)
jfbu
2017-11-06 19:59:50 UTC
Permalink
Raw Message
Hi,

I have noticed that CTRL-I, CTRL-J and CTRL-K are "printable"

(cf http://tug.org/texinfohtml/web2c.html#TCX-files)

with pdfTeX or pdfLaTeX, by default.

Now Plain TeX has \catcode11 set to 7, but LaTeX has it to 15 making
it invalid by default. Also Plain TeX has \catcode1 set to 8, but CTRL-A
is not "printable".

This all looks a bit strange, why is ascii char 11 (VT = Unicode Line Tabulation)
handled this way ?

For test:

\the\catcode11
%\the\newlinechar

\immediate\write-1{^^K}

\begingroup
\catcode`@ 11
\def\x{\count@ 0
\loop
\catcode\count@ 12
\advance\count@ \@ne
\ifnum\count@<32
\repeat}\x%
\immediate\write-1{%
^^@^^A^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K^^L^^M^^N^^O%
^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z^^[^^\^^]^^^^^_}\endgroup
\bye

One can use -8bit option, then all are printable, the question is why
is VT printable by default ?

(seems to contradict http://tug.org/texinfohtml/web2c.html#TCX-files,
and I can understand TAB and LF are considered a bit special)

Best,

Jean-François
PS: please keep me in CC if replying, thanks
Karl Berry
2017-11-06 23:38:16 UTC
Permalink
Raw Message
One can use -8bit option, then all are printable, the question is why
is VT printable by default ?

It seems Thomas Esser suggested making VT printable by default, along
with HT FF SP, back in 2004. That seems to be when we invented
cp227.tcx (read from fmtutil.cnf). I think he just figured vertical tab
should be printable if horizontal tab was, but I don't really know.

At any rate, I'm not inclined to change it again at this late date. -k
jfbu
2017-11-07 08:02:57 UTC
Permalink
Raw Message
Hi Karl,
Post by jfbu
One can use -8bit option, then all are printable, the question is why
is VT printable by default ?
It seems Thomas Esser suggested making VT printable by default, along
with HT FF SP, back in 2004. That seems to be when we invented
cp227.tcx (read from fmtutil.cnf). I think he just figured vertical tab
should be printable if horizontal tab was, but I don't really know.
At any rate, I'm not inclined to change it again at this late date. -k
Thanks! Something looks weird in the
comments of cp227.tcx file:

0x09 0x09 % HT
0x0a 0x0a % VT
0x0b 0x0b % FF

it should be

0x09 0x09 % HT
0x0a 0x0a % LF
0x0b 0x0b % VT

right ?

(FF being 0x0c)

Best,

Jean-François
Karl Berry
2017-11-07 21:48:28 UTC
Permalink
Raw Message
0x0a 0x0a % LF
0x0b 0x0b % VT

Indeed. Fixed, thanks. -k

Loading...