Take the 2-minute tour ×
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 know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?

share|improve this question
You should really read tug.org/levels.html –  Martin Schröder Jan 10 '12 at 18:36
add comment

5 Answers

up vote 61 down vote accepted

TeX is both a program (which does the typesetting) and format (a set of macros that the engine uses). Looked at in either way, TeX gives you the basics only. If you read the source for The TeXBook, you'll see that Knuth wrote more macros to be able to typeset the book, and made a format for that.

LaTeX is a generalised set of macros to let you do many things. Most people don't want to have to program TeX, especially to set up things like sections, title pages, bibliographies and so on. LaTeX provides all of that: these are the 'macros' that it is made up of.

share|improve this answer
To clarify, the set of macros is called "plain TeX" or "plain", and it's a bit of a misnomer, since one would expect that to refer to nothing but the primitives. –  SamB Dec 1 '10 at 5:23
add comment

In short TeX is all about formatting, for document/template designers, while LaTeX is all about content, for document writers.

TeX is a typesetting system. It provides many commands which allow you to specify the format of your document with great detail (e.g. font styles, spacing, kerning, ligatures, etc.), and has specialized algorithms to compute the optimal flow of text in your document (e.g. where to cut lines, pages, etc.). TeX is all about giving you powerful algorithms and commands to specify even the tiniest detail to make your documents look pretty.

LaTeX is a set of macros built on top of TeX. The idea behind LaTeX is to shift the focus from the format to the content of your document. In LaTeX commands are all about giving a structure to the content of your document (e.g. sections, emphasis, tables, indices, etc.). In LaTeX you just say \section{...} instead of: selecting a larger font, a different font style, and inserting appropriate spaces before and after the section heading. As LaTeX is built on top of TeX you also get, of course, a beautiful document as your output; but, more importantly, your source input can also be well structured, easier to read (and write!) for humans.

share|improve this answer
"LaTeX is all about content" is correct, but that's only with LaTeX2e, because in LaTeX 2.09 the distinction between formatting and content was not clear cut. In fact, it was only when LaTeX2e was introduced that I stopped using TeX in favour of LaTeX. –  José Figueroa-O'Farrill Aug 4 '10 at 23:50
@JoséFigueroa-O'Farrill surely latex 2.09 (declared obsolete in 1994) can be regarded as no longer germane to current discussions? (note, the faq, first published in 1995, iirc, still sometimes talks as if latex 2e is a shiny new object ... something more to remember when proof reading (a task like the old "painting the forth bridge") –  wasteofspace Nov 9 '12 at 11:07
Good answer, but there is a bit of ambiguity in the nomenclature. The TeX term for "a set of macros built on top of TeX" is format. Plain TeX is a format, LaTeX is a format, ConTeXt is a format. So maybe it would be better to say TeX is all about formatting. –  Matthew Leingang Apr 30 '13 at 12:01
add comment

Don Knuth provide both the TeX typesetting program and the plain TeX macros (the file plain.tex).

TeX the program does the typesetting. The preloaded macros (and the input documents, of course) control what is typeset.

Typically, the macros and input document place items on a horizontal list and then, when the \par command (for example, a blank line) is issued TeX the program breaks the paragraphs into lines.

If you run TeX with \tracingall you can see what are macros and what are TeX commands. I suggest you try this with

 $ tex '\relax \tracingall \input story \end'

rather than a LaTeX document. LaTeX does a lot of macro processing, particularly for font selection.

share|improve this answer
add comment

I'd add that the name actually shows the difference: LaTeX = "Layman's TeX". This also shows that it's enough to master LaTeX to get (most) things done, but TeX to be a real master. As the saying goes: there are TeXnicians and TeXperts...

EDIT: I know this answer is inaccurate (it's one of my first contributions to TeX.SX, I have learned a lot since, tanks mostly to the community behind this site). I kept it deliberately, because this is a quite widely accepted belief, among newbies especially. The comments and the downvote I received put things right, therefore I don't believe this should be edited as it was, namely to LaTeX = "Lamport's TeX" (Leslie Lamport was the initial developer of LaTeX).

I don't know where the comments are gone (I can't see them anymore), but the edit skews the original answer and cancels its message. As I said, I kept this for educational/informative reasons. We learn not only from things that are done right, but also from mistakes. If we are smart enough, from those of our peers, too.

share|improve this answer
add comment

TeX, LaTeX, ConTeXT - different languages / syntax for typesetting.

For each of these there are many engines available that can process the above syntax and generate dvi, ps, pdf, html, svg.... and what not.

To confuse even more there are engines called tex and latex, which can be used to process tex and latex syntaxes respectivly to produce dvi outputs.

@José Figueroa-O'Farrill:

Treating the system as blackbox: ConTeXt, LaTeX and TeX have significantly different syntax and different compilers hence they are different. And most users do not need to know that one is using the other behind the scene, that's an implementation detail. The beginner user needs to know that (a) they are different (b) they all produce awesome quality documents (c) each package has its own "native" way to do stuff (d) you can seek for all of them here.

share|improve this answer
I don't understand the downvotes. This is somewhat terse, but there's nothing particularly wrong with this. What happened to "please consider adding a comment if you think this post can be improved"? –  ShreevatsaR Jul 28 '10 at 18:15
I'm voting this up. It's a fine answer. –  Chris Phan Aug 4 '10 at 21:55
I didn't vote this down, but I don't agree that TeX and LaTeX are different languages. LaTeX (as of today) is still a set of TeX macros. –  José Figueroa-O'Farrill Aug 4 '10 at 22:41
And: there is no engine called latex. It is just the format. (I didn't downvote either, but the answer is misleading). –  topskip Aug 5 '10 at 5:37
Please read tug.org/levels.html –  Martin Schröder Jan 10 '12 at 18:39
show 2 more comments

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.