Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been using LaTeX for 3 years and I'm decided to switch to (plain) TeX. For the moment I'm reading The TeXbook for the third time (I quietly start to read the double-danger signed paragraphs) and I'm looking for informations about stuff that are not covered in the book but needed to use TeX with all that has been added since the 90's: etex, eplain, preloading other formats, pdftex, texmf trees, character encodings (utf8/latin1), foreign language hyphenation (French in particular), use of colors, image inclusion, etc. I also read somewhere that TeX's modern implementation have switched from 256 to (a higher number I've forgotten) registers. What about it?

share|improve this question
Why do you want to use an old system like plain (which doesn't know anything of the newer development like unicode) instead of a modern system like latex or context? – Ulrike Fischer Jan 21 '13 at 15:58
@Ulrike: I use plain format with XeTeX and I have everything I want with UTF-8 support (\defs, etc.). – morbusg Jan 21 '13 at 16:22
@Ulrike: It says "TeX" right there at the top of this page, not LaTeX, so I don't see why some people have made it their business to decide what format other people should use. This isn't the first time I see that kind of question (I'm referring to your question) on this site. I'm not asking why would you drive a Peugeot, am I now? – morbusg Jan 21 '13 at 16:25
@morbusg: I'm giving such advices all the time. I care about people and try to show them the best way. So I'm telling people to drop bibtex and switch to the modern biber/biblatex, I'm telling people to drop old classes and switch to a modern class, I'm telling people to drop old TeXLive versions and to update. I don't intent to let someone run without comment in the plainTeX adventure if I have the impression that he/she doesn't really know what plainTeX is. – Ulrike Fischer Jan 21 '13 at 16:58
@Ulrike: I want to leave LaTeX (I play with it for 3 years) because I believe that things are much easier to do in TeX than in LaTeX, for example creating a page layout from zero. From my little experience, I see the link between LaTeX commands and TeX primitives a bit cloudy (in other words: there's a cloud of abstraction between low- and high-level) and that makes it difficult to modify existing things. – lvaneesbeeck Jan 21 '13 at 19:10

3 Answers 3

Here's a whirlwind of some of the things you can do with XeTeX (and to even larger extent, LuaTeX). Plain-kru putting a stop to this discrimination nonsense.

\input eplain %

\font\bodyfont="Liberation Serif:mapping=tex-text" at 12bp
% ^ XeTeX-specific font-loading, see
\font\titlefont="Liberation Serif:letterspace=12" at 20bp

\fontdimen2\font=.25em % inter-word space
\fontdimen3\font=.25em % inter-word stretchability
\fontdimen4\font=.05em % inter-word shrinkability
% ^

\parindent=1.3em % paragraph indentation
\parskip=0pt % normally there is stretchability between par's, remove it

\topskip=\baselineskip \lineskip=\baselineskip
\smallskipamount=\baselineskip \medskipamount=2\baselineskip
\bigskipamount=3\baselineskip % retain vertical rhythm

\emergencystretch=1em % in a case of emergency, let there be some extra
% stretchability on that line.

\def\marginprotrusion#1{% let these characters protrude into right margin
  % just some random test values to play with.
  \rpcode#1 U`” 150 \rpcode#1 U`’ 150 \rpcode#1 U`! 100
  \rpcode#1 U`, 200 \rpcode#1 U`- 200 \rpcode#1 U`. 200
  \rpcode#1 U`: 100 \rpcode#1 U`; 100 \rpcode#1 U`? 100}

\doublecolumns % this command comes from eplain
% see

\special{background rgb 1.0 0.941176470588235 0.96078431372549}

\special{color push rgb 1 0 0}
\centerline{\titlefont J'accuse}
\special{color pop}
\XeTeXpicfile "Desktop/daalia.jpg" width\hsize height 10\baselineskip
\input zola


enter image description here

share|improve this answer
+1 (extra if I could for the choice of text!) – Alan Munn Jan 21 '13 at 19:37
... though you're tying yourself to XeTeX tremendously by using all these primitives without any abstraction layer inbetween... – Stephan Lehmke Jan 21 '13 at 19:51
@Stephan: Yes, true, but then again that's what I use. I usually do abstract away stuff, but I just wanted to quickly compile an example for this question (OP mentioned primitives vs abstraction in the comments). I phrased poorly the first line, though. What I meant was that you can do even more neat stuff with LuaTeX. – morbusg Jan 21 '13 at 20:00
+1 for completeness to the answer will you please add texdoc xetexref – Yiannis Lazarides Jan 21 '13 at 20:45
Thanks @Yiannis, good suggestion, added. – morbusg Jan 21 '13 at 21:06

these resources don't cover "recent" implementations of (plain) tex, but are nonetheless useful in explaining its workings.

  • Victor Eijkhout's TeX by Topic is a solid reference that explains the meaning of all (original) TeX primitives in the context of related commands; available on-line in PDF form or printed/bound on demand (see the linked page for details). Edit 2014-04-01: TeX by Topic is now available in a new revised edition by the german user group DANTE.
  • A Gentle Introduction to TeX by Michael Doob gives a tutorial in source and output; an interesting (to me) feature is the inclusion in the source of both Canadian and U.S. spellings, and the ability to choose between them by setting of a "true" or "false" condition (requires changing the source).
  • An excellent introduction is A Beginner's Book of TeX by Silvio Levy and Raymond Seroul (translated and expanded from the French original by Seroul).
  • David Salomon wrote The Advanced TeXbook to cover topics such as page layout, font manipulation, contents and indexes; this book is long out of print, but some of the material was published in TUGboat; look in the list by author for relevant articles.
  • another author of an extensive work about (plain) TeX, TeX in Practice (4 volumes), is Stephan Bechtolsheim; again, the work is out of print, but some of the material was presented in TUGboat.

unfortunately, the tugboat list by category doesn't usually identify plain/latex/context, but everything there that was published more than a year ago is open to all.

share|improve this answer
The Advanced TeXbook does not seem to be out of print:… – Mafra Jan 21 '13 at 23:19
@Mafra -- thanks. it was out of print for awhile, but it seems that springer has republished it (it's listed under "new and forthcoming titles). i'll update the ams master list of tex-related books. – barbara beeton Jan 22 '13 at 14:07
@HenriMenke -- good news! thanks. – barbara beeton Apr 1 '14 at 18:41

I post here answers to my questions as I find them. I'm not finished with reading all I've found, so this answer will be edited.

(personnal note: get information about multilingual support.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.