I know LaTeX and I've heard that LaTeX is a set of macros in TeX. But what does it exactly mean?
|
|
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. |
|||||||||
|
|
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 |
|||||||||
|
|
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. |
||||
|
|
|
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. |
|||||||||||||||||||||
|
|
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
rather than a LaTeX document. LaTeX does a lot of macro processing, particularly for font selection. |
|||
|
|