The short question is:

How do I progress with this book? What tools should I download? A step by step explanation would be deeply appreciated ..

The experience I had: Am a computer science student and have read several programming books. I was able to follow through them by practicing and putting effort. One of my recent goals was to learn TeX.

I believed I got the best book to learn -correct me if am wrong- the TeXbook by Knuth himself-. I wanted to make it my friend and spend tens of hours practicing but I could not manage to do it. TeXbook is really a different type of read. It starts right a way with the syntax and doesn’t introduce any tools or software that you need to prepare in order to practice. I knew the book was published before I was even born hence, the tools might no longer be the same so I searched a lot.

The search led me to CTAN and Tug sites where I was able to read lots of materials and develop superficial understanding of what a distribution is? what is macro? . I also read a lot of questions and answers in this site .

What is the difference between TeX and LaTeX?

Eventually I downloaded MikTex distribution I started typing some of the syntax in the second chapter, [Book Printing Versus Ordinary Typing]. I was able to generate my first pdf!!! The book didn’t mention that I need to put \end at the end of the document. I obtained this information from your site.

enter image description here

I continued to chapter 4 where I was stuck with font changing command

chapter 4

controlling font size

\ninerm and smaller\eightrm and smaller \sevenrm and smaller \sixrm and smaller \fiverm and smaller \tenrm

\tenrm Ulrich Dieter, {\sl Journal f"ur die reine und angewandte Mathematik} {\bf 201} (1959), 37–70.

to be {\bf bold} or to {\sl emphasize} something.

\tt this will be in a \bf typewriter font format

\it this is an italic font. I want to learn \rm I get the below error ..

enter image description here

I change the drop down list option to luaTex and the PDF magically generates. magical to me because I have no clue why it is happening : )

enter image description here

I hope you understand the challenge am facing as total clueless beginner. I became frustrated to the point where I stopped trying to practice and just continued reading and absorbing as much as I can in hope that I will be able to understand with time.

Yesterday, I reached chapter 6 Running TeX! Knuth was amazingly funny in this paragraph

OK, let’s suppose that you’re rested and excited about having a trial run of TEX. Step-by-step instructions for using it appear in this chapter. First do this: Go to the lab where the graphic output device is, since you will be wanting to see the output that you get—it won’t really be satisfactory to run TEX from a remote location, where you can’t hold the generated documents in your own hands. Then log in; and start TEX. (You may have to ask somebody how to do this on your local computer. Usually the operating system prompts you for a command and you type ‘tex’ or ‘run tex’ or something like that.) When you’re successful, TEX will welcome you with a message.

There are no diagrams there is no explanation of the underlying concepts. I searched online hoping that somebody has put a step by step tutorial with screenshot but no luck.

Please advise about the tools I should use and how to move forwards with this book

please feel free to attack my learning style to improve it and have better outcome.

Sorry for my English & thanks

  • 4
    Some people think the TeXbook is the best book ever written. Others think it's the worst. The following link provides some alternatives: tex.stackexchange.com/questions/53/… . Commented Jun 25, 2021 at 14:40
  • 5
    @JavierBezos Best or worst, it gives great insight into the mind of a highly influential man of the era. Commented Jun 25, 2021 at 14:46
  • 3
    You've fooled yourself (or your editor has). pdftex vs luatex both should produce errors with this code since \ninerm and \eightrm are undefined. The reason the luatex compile appeared to work was because it ran in non-stop mode and pushed through the errors producing some output (but not the intended output). If you look at the log file for either of the runs, they should show the errors.
    – Alan Munn
    Commented Jun 25, 2021 at 14:56
  • 5
    note it's usual to end a plain tex document with \bye not the primitive \end Commented Jun 25, 2021 at 19:39
  • 5
    The TeXbook offers a lot of information in a very compressed way. No half-sentence, no phrase, no word in it is somehow superfluous. Think of each phrase as a part of a sum that is more than just the sum of its parts: often phrases that are far apart in the book form a connection/implication. Read the book like a picky lawyer reviewing a contract for potential pitfalls, and therefore needing to grasp the meaning of each phrase and the implications that arise in context with the rest. ... Commented Jun 25, 2021 at 19:40

1 Answer 1


Hello, newbie!

In my rather long and somewhat uneducated experience, a feasible way to understand what is going on (and experience TeX as a beginner) goes first through understanding that the program may be considered a hybrid between an interpreter (like Perl or Python) and a compiler (like Pascal or C): the interface is, in principle, interactive, so you put stuff through a console, and after executing the instruction, the program comes back to the input prompt; but the product is always an object, if successful: in this case, your formatted document, in a DVI (device independent) format; nowadays, PDF for the most part.

Second: originally, there were perhaps at least six programs to run and/or master to get into the guts of the system. The typesetter TeX (and its sister font designer MetaFont) came in two flavors, ini and production (and the latter in virgin or preloaded versions; but I'll skip those details): the first did not load anything but itself, and had to be taught to do everything from scratch; but it had the ability do \dump a precompiled memory snapshot as object, which the "production" versions could load automagically as "formats" to save time at initialization. After a not very long but somewhat convoluted history, they both are integrated in today's binaries, and the default behavior is the production system: to enter the "ini" TeX you should tell the compiler to run with the flag "tex -ini", to avoid preloading the precompiled format.

Finally, you need to understand that the object produced with early systems (a file with the extension .dvi) had to be processed through a driver to send the output to the device of choice, screen (ega or vga, for instance) or printer (dot matrix or laserjet, for instance), so you had to run perhaps two different programs to do that: one for the screen and another for the printer.

The development of newer document formats allowed for some normalization in the dvi drivers. A popular one, DVIWin, ran on MSWin, which took care of the screen or printer detailes thereon. Now, for PostScript output, you may run dvips on your console, and then send the output to the PostScript screen driver or printer depending on the system, or save it as a file for further processing. Another driver, dvipdfm produces PDF directly from the original DVI object, so you may view it or print it from the PDF viewer of your choice. Over the course of time, the original engine has been extended to produce PDF directly; but this approach has evolved in several, sometimes parallel, sometimes incompatible systems: PDFTeX, XeTeX or LuaTeX, so you save one step (you don't need the DVI format and drivers anymore) at the expense of deciding which "engine" (typesetter model) you want to use.

Today's systems assume you want to typeset LaTeX documents, not Plain or any other existing formats; so they provide an IDE like the one you see, and the IDE defaults to tell the typesetter to run pdfLaTeX, not Plain DVITeX, in "nonstopmode", more akin to a compiler. This is the case as well with at least one OnLine LaTeX service available, which may save you the pain of trying to install a TeX system on your computer.

So this rather long explanation works as a preface for the simple instructions: if you want to try the experience of Plain TeX, the one described in the TeXBook, from scratch, you may use the IDE or any text editor of your choice, but run the typesetter from a console/terminal (on Windoze, typically cmd) with the command pdftex <filename[.tex]>; this way the program will run pdfTeX in "production" mode, with the (slightly extended) Plain format preloaded, and produce PDF files directly, so you may skip the process of learning how to use dvi drivers for the time being.

Addendum From the statement of your question, I collect now that you may have realized that the TeXbook has a rather steep learning curve, and you may have run a little impatient with this system; so I recommend to you to read the first three sections (chapters) of TeX for the Impatient, which you may find at CTAN. This may give you a good grasp of the whole; and then you may get back and start the TeXbook all over. You may find a tutorial on the early interaction with the system in the first section of A Gentle Introduction to TeX, which is a rather good "manual for self study" for Plain TeX as well.

Good luck, and happy TeXing.

  • 3
    Good "pre-introduction" to the TeXbook. A few things it doesn't say are that (1) the book was written long before personal computers, laser printers, PostScript, etc., and (2) that bias of the book hasn't been updated. It was tacitly assumed that someone learning TeX from the TeXbook had the benefit of a "local expert" who had brought TeX inhouse and would be available to answer questions. In the early 1980s that was definitely true, and it remained essentially true for some years thereafter. Commented Jun 25, 2021 at 16:15
  • 3
    @jarnosz -- Just because something is on the net doesn't mean it's either truthful or the best answer. The last time I looked at some pages in the LaTeX Wikibook, there were a number of recommendations that were not "best practices". I tried to edit them but was "shot down". (I guess I should look again, but am not enthusiastic.) On the other hand, this forum is inhabited by enough people who know what they're talking about, so recommendations are pretty reliable. YMMV. Commented Jun 25, 2021 at 17:23
  • 2
    One nitpick. iniTeX and "virgin" TeX are not quite the same thing (although the distinction is less important since ca 1989 or so). Initially iniTeX was TeX with the inittini blocks active. virTeX was TeX with those same blocks commented out and not format pre-loaded, TeX was virTeX with the plain format preloaded (e.g., a shortcut to virtex &plain) while LaTeX would be virTeX with LaTeX preloaded. In practice, I don't know anybody ever ran virTeX directly. Before TeX 3.0, only iniTeX could load hyphenation patterns, but that was changed at that time.
    – Don Hosek
    Commented Jun 25, 2021 at 19:30
  • 2
    A bit before the TeX 3.0 release, IIRC, I modified the VMS port of TeX to make iniTeX a run-time setting (I also did the same with the debuggubed blocks) on the TeX executable. Around that same time, I had a conversation with DEK where he mentioned that he regularly just used initex &plain as his main TeX executable.
    – Don Hosek
    Commented Jun 25, 2021 at 19:33
  • 2
    It's not that plain TeX isn't used anymore in a strict basis, but that the vast majority of activity in the TeX ecosystem happens around using LaTeX for document preparation. When I first started using TeX (35 years ago(!)), the system that I was on wasn't even capable of supporting LaTeX. It wasn't immediately clear at that time that LaTeX was going to be the future of TeX. Now, anything non-LaTeX is pretty much in the margins. The best analogy would be the JavaScript ecosystem where very little JS work is done without one of the major JS frameworks.
    – Don Hosek
    Commented Jun 25, 2021 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .