# Can I see a plain TeX source file please?

all the LaTeX-tutorials tell me how LaTeX is an extention simplifying the building of TeX documents. Understandably, no one uses plain TeX anymore, right?

But I seem to learn better when I grasp the link between TeX and LaTeX (this uppercase/lowercase-typing is getting annoying :) ). Does someone have a link to example files in plain TeX? I'd like to know which commands, macros etc. are LaTeX-specific.

-

Here's an example, taken from here.

% Plain TeX for a 1 page document

%% The lines between the two rows of %'s are more or less compulsory.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\magnification=\magstep1
\baselineskip=12pt
\hsize=6.3truein
\vsize=8.7truein
\font\footsc=cmcsc10 at 8truept
\font\footbf=cmbx10 at 8truept
\font\footrm=cmr10 at 10truept
\footline={\footsc the electronic journal of combinatorics
{\footbf 16} (2009), \#R00\hfil\footrm\folio}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% The further structure of the front page need not be exactly as below,
%% but the header must contain the names and addresses of the authors
%% as well as the submission and acceptance dates.

\font\bigrm=cmr12 at 14pt
\centerline{\bigrm An elementary proof of the reconstruction conjecture}

\bigskip\bigskip

\centerline{D. Remifa\footnote*{Thanks to
the editors of this wonderful journal!}}
\smallskip
\centerline{Department of Inconsequential Studies}
\centerline{Solatido College, North Kentucky, USA}
\centerline{\tt remifa@dis.solatido.edu}

\bigskip

\centerline{\footrm
Submitted: Jan 1, 2009; Accepted: Jan 2, 2009; Published: Jan 3, 2009}
\centerline{\footrm Mathematics Subject Classifications: 05C88, 05C89}

\bigskip\bigskip

\centerline{\bf Abstract}
\smallskip
{\narrower\noindent
The reconstruction conjecture states that the multiset of unlabeled
vertex-deleted subgraphs of a graph determines the graph, provided it
has at least 3 vertices.  A version of the problem was first stated
by Stanis\l aw Ulam.  In this paper, we show that the conjecture can
be proved by elementary methods.  It is only necessary to integrate
the Lenkle potential of the Broglington manifold over the quantum
supervacillatory measure in order to reduce the set of possible
counterexamples to a small number (less than a trillion).  A simple
computer program that implements Pipletti's classification theorem
for torsion-free Aramaic groups with simplectic socles can then
finish the remaining cases.\par}

\bigskip

\beginsection 1. Introduction.

This is the start of the introduction.

\bye


Result:

-
It doesn't even have a \documentclass and it says \bye at the end. Tee hee hee. Thanks :) –  Alexx Hardt Dec 3 '10 at 17:20
@Alexx: Well, not that simple! LaTeX introduces a lot of macros into TeX. Obviously, you can't use them in plain TeX. –  Sadeq Dousti Dec 3 '10 at 17:41

if you really want to be boggled by a plain tex source file, go to the ur-source: http://mirror.ctan.org/tex-archive/systems/knuth/dist/tex/texbook.tex

this is what it says it is -- the source of the texbook -- and it has been made available by don knuth so that people can see how he solved various problems. it shouldn't be tex'ed without his permission.

of course, it's most meaningful when viewed together with the printed version; try to find someone who can lend you a copy.

the formatting depends on a collection of macros created specifically for the purpose; \input manmac.tex makes these available. that file is included in the tex live distribution and it's worth taking a look at it to see how it differs from latex packages. it's my opinion that, whatever the flavor of the input one might be using for a tex job, the first order of business is to decide on (design, if necessary) the basic user interface, and only then embark on the input of the content. from there, they will most often develop in parallel.

-

Since TH took the chance to post xii.tex, I take the chance and post my further condensed version (needs almost 14% less key strokes for the same output :-)). This exercise was indeed my first plunge into the inner workings of TeX.

\let~\catcode~76~A13~F1~j00~P2jdefA71F~7113jdefPA;;FP
PA**7172F727171PAKK7172F72r71PAqq71.F71Kse71PAIIFoPAXXFKdiP
AQQFjbigskipDOPAzzFhPAHHFDPATT7172F72a71PAZZFTDDPAUU71,72MF
jpar71ing;jifx:72jelseU72MjfiPABB71W72;73,74:Fjif.74.jelseB
74:jfiQn tJ;z7172tz; TydDIfDCEzs;tTsm;DmWa;y "KKJtDulIY TYg
tI J;mU7173,74:MPB tJlwWf;Wq;Yq K*dmu.,eJYlnW;q Ep"p.,JntW;
lKsGZlTpe,En"nW;eDTJlsE "dTndc,Egz"eW;t Emd"TsZElk"m,JYsnW;
sTnwWo;sZs*mE"w,Ex"sW; Jg*JZsTyl,E"fWf;Y gGlEDng"KsW,fIurW;
TlcEngD"lbXsW,tzWXW;K*J JfKncz JnzsW,WJcsGnW;tWace;wI tKtuJ
DldIYsW,WKsE"ftW;aHAHHFndZPKpTEt"KdJEgn"DZpJTKDtK*J.W,:jbye

-

The best plain TeX source is David Carlisle's xii.tex:

\let~\catcode~76~A13~F1~j00~P2jdefA71F~7113jdefPALLF
PA''FwPA;;FPAZZFLaLPA//71F71iPAHHFLPAzzFenPASSFthP;AFevP
AGGFRruoPAqq71.72.F717271PAYY7172F727171PA??Fi*LmPA&&71jfi
Fjfi71PAVVFjbigskipRPWGAUU71727374 75,76Fjpar71727375Djifx
RrhC?yLRurtKFeLPFovPgaTLtReRomL;PABB71 72,73:Fjif.73.jelse
B73:jfiXF71PU71 72,73:PWs;AMM71F71diPAJJFRdriPAQQFRsreLPAI
I71Fo71dPA!!FRgiePBt'el@ lTLqdrYmu.Q.,Ke;vz vzLqpip.Q.,tz;
;Lql.IrsZ.eap,qn.i. i.eLlMaesLdRcna,;!;h htLqm.MRasZ.ilk,%
s\$;z zLqs'.ansZ.Ymi,/sx ;LYegseZRyal,@i;@ TLRlogdLrDsW,@;G
doTsW,Wk;Rri@stW aHAHHFndZPpqar.tridgeLinZpe.LtYer.W,:jbye

-
So you found your chance to post xii.tex. How do you like my version? :-) –  Hendrik Vogt Jan 15 '11 at 20:38
@Hendrik: Heh. I wondered if anyone would remember that comment. I like your version. One of these days, I'll actually go to the trouble of figuring out more than the first three lines. –  TH. Jan 15 '11 at 21:04