I came across latex both as a saving format and drawing framework under libreoffice and goffice.
I also came across djvu as an alternative to pdf, which uses latex instead of postscript. Now, postscript is adobe's base for flash animations, and is thus vector graphics tagged under a script.
So for me, latex looks like an alternative to postscript. Or can latex substitute postscript?
Postscript is a scripted programming language with built-in graphics and font-rendering primitives. It can be used as a word-processor's output format, but usually requires to word-processor to do all the text-placement calculations. Output can be post-processed to PDF.
TeX (I'll get to LaTeX in a moment) is a document-processing language. It performs text-placement calculations and font-rendering but lacks the drawing facilities of postscript. TeX output is normally a .dvi (device-independent document) file which can be post-processed into postscript.
LaTeX basically adds style-sheets to TeX, higher-level concepts like "chapter" and "section".
So you end up with a chain. LaTeX -> TeX -> DVI -> PS -> PDF (mirroring the earlier chain: pic | eqn | tbl | groff). Later versions of LaTeX have merged several of these conversions. DVI, PS, and PDF are all equally good, but you may prefer one to the others depending on what other software you wish to use. There's a popular package for LaTeX called PSTricks which requires you to have PS in the chain.
So they're all different, but the same, you know?
It may be helpful to enumerate which of these formats cannot be converted into one of the others.
LaTeX -> TeX. You cannot really go the other way. I'm not sure it makes any sense.
TeX -> DVI. Again, this is a "rendering" step, so you can't go backwards. Like you can't convert a photograph of an apple into an apple.
DVI -> PS. PS -> DVI. DVI -> PDF. PDF -> DVI (never heard of this, but why not?!). PS -> PDF. PDF -> PS (unless you're using PDF layers which don't exist in PS). These three, treated as output formats are readily inter-convertible.
As input formats, LaTeX, TeX, and PS have very different problem-domains. While theoretically each has the power to perform the proper work of one of the others, it'd be a gaudawful mess. For examples, look up "Line-breaking in Postscript" (you end-up having to re-implement a whole mess of algorithms for which library versions would be readily available in almost any other language) or "Image-Processing in Tex" (you make a "font" of halftone spots and then "print" your image by setting text in that font). DVI and PDF are not really human-read/write-able; they are only "output" formats (except, of course, to post-processing software, to whom they are "input").
LaTeX is a language for easily writing documents, and Postscript is like PDF, so both aren't comparable. latex produces postscript documents. think it like LaTeX is C source code, and postscript the executable produced by compilation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With