Why? questions can not really be answered except by the person who originally designed the system. But in most languages (certainly most languages of the era) the grammar for names of a language is defined by explicitly listing the allowed characters rather then listing terminating characters. In c or fortran or most other programming languages abc+xyz*rst
would be three variable tokens separated by the operator tokens +
and *
so it is hardly uncommon.
Unlike those languages though, almost none of the lexical rules in TeX are fixed so if you want to allow +
and *
in multi-letter command names you just need
\catcode`\*=11 \catcode`\+=11
and you can then define \foo*+
as a command, however \alpha+\beta
would no longer work you would have to do \alpha +\beta
.
It isn't really accurate to say
\mycs* are actually two tokens with the * being the first "argument"
to \mycs (even when \mycs isn't defined as taking an argument.
the *
isn't (in general) an argument to \mycs
it is simply the next token in the output stream, conside \alpha*\beta
where the *
is simply typeset as an infix operator between the tokens.
First some personal experience: for one of the conference proceedings I was in charge of for the TeXnical aspects, I got several papers to put into shape. One of them was in Word: I asked for a printout and then converted the “saved as text” version line by line following the printout.
Another one was in plain TeX. The conversion was quite easy: I changed the initial macro definitions to use \newcommand
or \newtheorem
; then I went through the document and the translation to LaTeX was a rather short and easy job.
Much more painful was translating most papers from their authors' concept of LaTeX to the real one.
About your specific points in the list, here's my two cent.
You never use \hsize
in a LaTeX document, not even in the preamble (sole exceptions, some tricks with tabularx
). Using \textwidth
is not “simpler”: would you say that driving on the left side in the UK is simpler? Well, it's the same: setting the text width with \hsize
is like driving on the right side in the UK.
You never (with no exception) change \@outputpage
, unless your name is Frank and you're German (plus some other strict conditions).
While it's possible to specify page parameters by explicitly changing \oddsidemargin
and friends, it's much better done with geometry
. By the way, \hoffset
and \voffset
should always be zero.
The current value of the page number is accessible as \thepage
(which changes according to the chosen numbering style). Using \value{page}
(or \c@page
) should be a very rare need. Besides, one should not use \pageno
in plain TeX document, but \folio
, that's analogous to \thepage
.
Probably your point 2 is about adding structure the the header and footer; this is done with packages such as fancyhdr
, scrlayer-scrpage
or titleps
.
If you use \beginsection
and \proclaim
, it's not difficult to switch to LaTeX; of course, you'll remove all manually assigned numbers.
Most common plain TeX constructions work also in LaTeX; the manual mentions \line
among those having different meaning. Of course, no font selection command will work.
However, the mere fact that a plain TeX macro also works in LaTeX should not mean we can keep it. A typical example is \centerline
, that has essentially no place in a LaTeX document (it's not color safe, for instance), but also \root 3\of{2017}
should not be used.
Yes, I know that \centerline
can in some cases get me simply out of a problem, but such usages should always be buried in macros defined in the preamble.
The well structured plain TeX document I mentioned before, was written in a logical fashion, with consistent markup. The markup was not the same as in LaTeX, but this was not a problem: I just had to make a translation table and apply some search-and-replace.
A badly written document, using plain TeX, AMS-TeX, ConTeXt, LaTeX, Lollipop or whatever format, is just badly written and sometimes it's a pain also making it a valid document for the original format.
Best Answer
The ASCII code of
\
is 92, and this is also TeX's internal code for the backslash. Now have a look at Appendix F of the TeXbook (F like Font Tables). There you see that the typewriter fontcmtt10
indeed has a\
sitting in position 92 (which is ´134 in octal notation), whereas the standard text fontcmr10
has a quotation mark“
in that position. The reason for the latter is that in a standard text you'll need quotation marks quite often, but hardly ever a backslash.If you want to procude the font tables yourself, use the following code (thanks to Stefan Kottwitz for the suggestion!):