
Why is TeX still used? What are some good, modern alternatives? - zem
http://tex.stackexchange.com/questions/13370/why-are-there-no-alternatives-to-tex-or-why-is-tex-still-used
======
jessriedel
The reason TeX is still used is because it is open source and beautiful,
because it is the best at handling mathematical notation, and because of its
inertial dominance in math and the hard sciences in Academia. The reason TeX
has so, _so_ many fixable problems after 30 years is because there is no
financial incentive for anyone to fix it.

The answer is not to find a TeX alternative. This will not be possible in
Academia for a very long time. The answer is for someone to plunk down a
million dollars to hire some full-time developers to fix it. Honestly, the TeX
language is wonderful; it's the editors which are terrible. A TeX editor
should...

[] seamlessly hide the compilation process

[] feature a modern debugging environment

[] make 99% of commands (including everything you can do in MS Word)
discoverable within the editor, rather than sending the user to the internet
or some pdf guide, and

[] robustly handle all modern image types

... _without_ becoming an unstable WYSIWYG hybrid like LyX. The only thing
about the language itself that might need to be changed is some
standardization of common packages. I shouldn't need to download anything to
get appendices and sub-figures to behave sensibly.

The amount of professor, post-doc, and grad student time wasted on TeX is
_staggering_ , and easily justifies paying for an overhaul...if only the
government or some benefactor would step up.

~~~
pedrocr
I would disagree that the base is wonderful and it's the editors that are bad.
At least in LaTeX there are a multitude of packages to do any given thing, all
with varying levels of completeness, and most with incompatibilities between
them. Leaky abstractions abound, and the way the macro language works probably
makes this easier.

The features you mention would be needed to put it in front of less geeky
users but are far from the core issues. I'd love to see a language with better
flow control and abstraction features put on top of the Tex engine that indeed
produces beautiful output. Maybe LuaTex will be that.

~~~
_delirium
The core algorithms are pretty creaky as well. Knuth did a brilliant job
coming up with efficient algorithms that could do a fairly good job at
breaking lines/paragraphs/pages and could handle book-length documents even on
70s-era hardware, but they've had minimal improvement since then. Figure
placement in particular is pretty bad, especially for two-column, relatively
short conference papers, which is currently a frequent TeX use case. And all
of those things are really hard to exercise any control over, with black-magic
parameters that often don't have obvious effects ("goddammit, why won't it put
the figure at the top of page 5?!").

LuaTeX does seem to be experimenting with some improvements in these areas
though.

~~~
ssp
All true. Also, the way indexes, table of contents, bibliographies and cross
references work in LaTeX are unholy, fragile hacks. Foot- and endnotes could
use some TLC. And on 2011-era hardware we really should have some
approximation of globally optimal page breaking.

Ugh, and fonts and character sets. Do you still have to put in magic
incantations like

    
    
        \usepackage[T1]{fontenc}
        \usepackage[latin1]{inputenc}
    

to get working hyphenation with wacky characters such as æ, ø, and å?

 _LuaTeX does seem to be experimenting with some improvements in these areas
though._

About when I stopped paying attention to TeX and LaTeX many years ago
(2002-ish?), there was some effort under way to rewrite all of TeX in Java.
Did that go anywhere?

~~~
patrickg
> About when I stopped paying attention to TeX and LaTeX many years ago
> (2002-ish?), there was some effort under way to rewrite all of TeX in Java.
> Did that go anywhere?

I'd say no. See <http://extex.org/>

------
patrickg
LuaTeX can be used as a PDF writing library that has a "perfect" line breaking
algorithm inside along with many other nice features. We use it as a base for
our database publishing tool. Its absolutely reliable, has modern features
(unicode, OTF) and can be programmed in a very decent language (Lua). You need
to know TeX if you want to unleash all the power, but you don't need to
program in TeX's macro language (which is fun but also a PITA).

I think that a new generation of TeX based applications will show up in the
next 10 years.

Edit: some links:

<http://luatex.org/> \- official site

<http://en.wikipedia.org/wiki/LuaTeX> \- wikipedia

<http://wiki.contextgarden.net/LuaTeX> \- LuaTeX is now also the base of
ConTeXt, a LaTeX alternative

~~~
chalst
Agreed. Luatex makes the following division of labour practical: work with
data structures and manipulate fonts and the backend in Lua, handle moving
about text and setting parameters in the macro language.

One thing I would like to see is proper static analysis tools for Luatex. Lua
has tools like
[https://github.com/fab13n/metalua/tree/master/src/samples/me...](https://github.com/fab13n/metalua/tree/master/src/samples/metalint)
but there's nothing of comparable sophistication for Tex, let alone code
combining the two, which makes debugging needlessly hard.

~~~
patrickg
The problem is that you can change TeX's syntax during the run time. I am not
sure if it is theoretically possible to create such a tool for TeX input. That
is one of the reason why I use (except for approx 10 lines of TeX code) only
Lua code in my software. These 10 lines will disappear once there is a
tex.initialize() in LuaTeX.

~~~
chalst
I'm quite sure flow-based static analysis can be done for Tex, the question is
how expensive it is to perform and how useful the results are.

With respect to catcode-changing code, you can model its possible execution
paths: while you can construct example Tex code where you can't infer anything
past this point without having complete information from before, in practice
with, say a package, you do have example documents which the package is meant
to work with, and you can use that in the static analysis.

I've thought about this a fair bit, at least in the context of typical Plain
Tex, but not written much code. I should try and enough time for a proof of
concept: there's a lot that could be built on it.

------
maigret
For my usage, I came to conclusion that HTML is the solution. When I need
formulas, I may use TeX, for graphs I'll use Excel most of the time. For
pictures Gimp etc. HTML is the glue I now use:

\- You can reuse it everywhere, publish it on the web, print it

\- It's easier to generate

\- You can combine it with code much more easily

\- Semantic tags in HTML5 (<article>, <section>) remove a big feature gap with
LaTeX

\- You can reuse your HTML skills for much more other topics.

I use LaTeX quite a bit, still use it for special goals (resumes, articles),
but outside the scientific crowd, I don't think it is the best solution any
more. I know the typography is better there than on most other software, but
on that I rather wished browsers and HTML got better.

~~~
bane
<http://code.google.com/p/hyphenator/>

And example in action <http://www.bramstein.com/projects/typeset/flatland/>

~~~
bramstein
Thanks for the reference. I have also recently released my own JavaScript
hyphenation engine:

<https://github.com/bramstein/Hypher>

It is quite small and fast, and mostly aimed at integration with other
libraries, unlike Hyphenator.js (which comes with a partial DOM library.) An
example integration can be seen in the Treesaver library
(<https://github.com/bramstein/treesaver/tree/hyphenation>) where it is used
to hyphenate magazine columns.

------
cemerick
FWIW, I and my coauthors are writing "Clojure Programming" for O'Reilly using
asciidoc[1]. Our source ends up being converted to a _beautiful_ PDF using a
post-commit hook that performs a translation from asciidoc -> docbook -> PDF.

I've enjoyed it so much that I'm now using asciidoc for my github readme's and
such, and will likely use it for future documentation-generation requirements
(e.g. generating PDF and HTML versions of library developer guides and such).
For those that need mathematical notation, it appears that asciidoc just uses
passthrough blocks of LaTeX math notation (or direct MathML if you're so
inclined)[2].

[1] <http://www.methods.co.nz/asciidoc>

[2] <http://www.methods.co.nz/asciidoc/userguide.html#X78>

~~~
patrickg
Do you have an example PDF for that? For the average use, TeX is overkill
(sometimes OK), but if you need the finest possible typography, TeX yields its
power. And then the XSL-FO formatters are pretty fast disappointing.

~~~
cemerick
Not that I can post publicly. It should be available as an O'Reilly Rough Cut
soon; if you snag it (or any PDF ebook version of it), you're looking at an
asciidoc-sourced PDF.

AFAIK, the vast majority of O'Reilly books pass through docbook at some point
(many authors write in docbook directly, some portion of them use asciidoc
like us), so if you look at any O'Reilly PDF ebook, chances are good it was
generated from docbook (at least as an intermediate format).

------
akjj
I feel that the OP misunderstands TeX's virtues: it is a very powerful
typesetting system whose macro system happens to be Turing complete.
Typesetting is the hard problem and TeX has solved it so well that most people
wanting to build a text-driven typesetting system has built on top of TeX
rather than trying to replicate it. This is especially true for typesetting
equations.

If you try to use TeX as a programming language, you're going to be
disappointed, as the OP seems to have been. The macros work well enough for
saving typing by making simple substitutions, which is what most people use
them for. But using them for anything more complicated is a bit of a black
art. Somewhere I read that Leslie Lamport wrote out LaTeX in pseudo-code first
and then translated it into macros. Knuth was impressed by what Lamport was
able to do with a system which was not meant to be a general-purpose
programming language.

In the end, I think Knuth was correct to make TeX's input focused on document
entry and not on programming. I've never used it, but LuaTeX seems interesting
because I think it's better to use an external language for programming rather
than one embedded in a document layout format.

------
asclepiades
I use LaTeX for something people usually never think about: critical editions
of ancient and medieval texts. A good critical edition has many typographic
details (say: parallel and aligned text, apparatus, typefaces & styles,
footnotes, endnotes, margin notes, eventually hundrends of bibliographic
references) difficult, error-prone or even _literally_ impossible in word
processors.

Of course learning to typeset this kind of work in (La)TeX is not a walk in
the park, but as a professor once told me it was easier (for a skilled
operator, of course) to typeset a good, not to mention beautiful, critical
edition with a Lnotype machine than with Word and similar software.

I do agree that TeX could be more "programmable", in the sense at least of
integration with scripting languages; however, there still isn't a better tool
and LaTeX 3/LuaTeX might indeed become a solution in the foreseeable future.

------
jamii
TeX is great for typesetting but it does very little else. It's a nightmare to
parse and analyse. The equation language doesn't convey any information about
the equation other than it's appearance (eg syntactic scope, semantics). This
makes it really hard to build things like search engines or screen readers
(screen readers for LaTeX tend to end up saying things like 'sum-symbol
subscript x equals zero superscript infinity x subscript one superscript two
plus x subscript two superscript two' rather than 'the sum from x = 0 to
infinity of x one squared plus x two squared).

I spent months building an equation search engine for Springer's math/science
corpus so I've experienced the pain and horror of parsing LaTeX first hand.
HTML + Semantic MathML is so much easier to work with. Its easy to parse, it
allows the author to easily convey scope and semantic information and it can
handle resizable displays. It just needs better tooling (eg a sane macro
language which outputs MathML).

~~~
psykotic
ConTeXt Mk II has had solid MathML support for a long time. It's also there
albeit still undergoing construction in Mk IV, which is the newer LuaTeX-based
rewrite.

------
cypherpunks
I do a lot of math. That makes LaTeX much faster to write than any
alternatives. At this point, in math classes, I can take notes in real time. A
properly written LaTeX file is also much faster to modify -- if I'm giving a
presentation, and I have an arrow between two equations on different lines,
when I rearrange things, that arrow keeps pointing between those two things. I
can generate LaTeX programmaticly (e.g. tables of results). I can keep it in
version control and have sensible differences between versions.

My major problem is that it does not handle animation and video well. Those
are increasingly coming to be critical parts of presentations, and are the
major thing pushing me towards OO.Presentation or PowerPoint or similar.

------
rosejn
I very much agree with the sentiment. LaTeX works well and it produces the
best technical documents of anything I've seen, but the world could really use
a modernized replacement. The syntax is a pain in the ass, the error messages
are horrible, and it takes documentation to figure out how to do anything new.
If it could be made more user friendly I think something like Tex would be
used much more widely as well. (It works with version control, unlike word
docs which are hell to manage in group collaboration.)

------
danieldk
There are good alternatives, depending on the type of document being written.
For instance, for technical documentation that does not contain to many
equations[1], DocBook is often used. Since DocBook uses XML (or SGML
previously), it is easy to transform with XSLT. The DocBook project provides
excellent stylesheets for xhtml and xsl-fo output, making it easy to target
the web and printed media. It is easy to customize output, by overriding
templates in the default stylesheets.

Also, DocBook documents can be validated automatically using DTDs or RelaxNG
schema. (Yes, XML is full of buzzword bingo :).)

[1] Equations can be typeset with MathML, but since most software only
supports presentation MathML this is not ideal.

~~~
danieldk
Before I forget: yes, hand-editing XML is no fun. I did this for years when
writing the 'Slackware Basics' book. It is tedious and annoying, even with the
excellent nxml-mode for emacs.

For Natural Language Processing for the Working Programmer, we use the
<oXygen/> XML editor, which really takes the pain out of writing DocBook
documentation. It provides WYSIWYG mode that also renders inline or xincluded
XML, such as SVG and MathML. I rarely switch back to the non-WYSIWYG mode,
unless I want to reorder some elements quickly.

~~~
cemerick
FYI, asciidoc is great, provides a pipeline to docbook (and thence on to PDF),
and is a joy to edit (not quite as concise as, say, markdown, but not
ambiguously-defined, either). See my other comment on this thread about it.

~~~
danieldk
asciidoc is nice, but the tag set in DocBook is far broader. Also, DocBook
makes it easy to add new elements. But if you need just the basic
functionality of DocBook, it is great.

~~~
cemerick
True enough. I've needed some bits of docbook that don't have a direct
asciidoc corollary twice, and just used asciidoc passthrough blocks to use
them. It's a very practical solution to a leaky abstraction, while allowing me
to stay in asciidoc 99.7% of the time.

------
Scramblejams
I got tired of OpenOffice's IMHO clunky formula editor, so I thought: "Ah ha!
Pros use TeX! So should I!" Then I saw how much fingertyping is necessary to
reproduce what I was doing in OO, and I went back. Of course, I was trying to
kill a field mouse with a nuke, so I should have expected to be disappointed.
Any recommendations for a math-friendly TeX-lite for those of us who don't
need all that power?

~~~
zem
if you want a gui equation editor, check out lyx [<http://www.lyx.org/>],
which uses tex as its backend. texmacs [<http://www.texmacs.org/>] is another
option worth exploring.

~~~
chalst
Texmacs often get recommended, but I haven't seen any arguments for it that
are compelling. I guess there must be a case for it, else no one would work on
it. What do you like about it?

~~~
zem
it's a decent middle ground between the clunkiness of wysiwyg word processors
and the typing-to-reward ratio of pure markup. personally i prefer just
writing markup in ascii, but if you want some of the control of tex, but
dislike doing that much typing, texmacs or lyx might be just what you are
looking for.

~~~
chalst
I guess I should look at it. It sounds like Kile is its natural competitor.

~~~
zem
kile is more of a lyx competitor (latex frontend versus latex ide). texmacs
has its own rendering engine; despite the name it does not in any way depend
upon tex.

------
Argorak
Why I still use TeX? First of all, it still compiles my documents and samples
from 1998. Try that in any other equally sophisticated system.

Second, it is the only system where I can expect a constant error rate. No
feature is "done in no time", but can be solved in a rather constant time
using Google and some TeX knowledge. In other systems, I am usually lost,
because most of the stuff has not been tried or is not intended.

Also, it is actually quite fast in batch usage.

If you want to have a look at what can be done with TeX, have a look at the
PGF documentation.

Also, don't mistake TeX with LaTeX, there are other TeX environments around
that are better in certain regards.

------
cskau
I've recently taken to MultiMarkdown + HTML5 + CSS3 + MathJAX.

As CSS3 support gets better and libraries like MathJAX brings beautiful math
to HTML, I see less and less reason to stick with TeX.

One of the remaining issues I'm struggling with is margins which browsers
unfortunately seem to have real problems with. However, if you can do with
just default margins, MultiMarkdown -> HTML in your browser -> PDF works
perfectly.

~~~
petercooper
If you were really determined or needed extra features in regard to the PDF
generation (as I did with a similarish workflow) you could use something like
PrinceXML rather than a browser.

------
anghyflawn
I use LaTeX in an academic setting (theoretical linguistics) which only
occasionally requires a lot of math, but I'm still saving tons of man-hours by
using the LaTeX + Emacs + AUCTeX combo. Here are some frequent use cases where
LaTeX blows a text processor out of the water.

* Bibliography. The median article length in our field is 30+ pages, with reference lists of 60+ not uncommon. Maintaining these in Word/OO is a nightmare, even with (non-free) bibliography software. RefTeX allows me to find and insert citations in a matter of three keystrokes, and whenever I reshuffle the reference list I'm 100% sure it's in order (i.e. everything I cite in the text is in the references and there are no uncited references)

* We don't use math, but we do use a lot of tree-like diagrams. Drawing these by hand is a chore; using logical markup to get trees which need zero to very little tuning saves enormous amounts of time and frustration.

* Floats and numbered examples. TeX floats are notoriously unreliable, but seriously, are Word's any better? And it gets worse with numbered examples (and pictures in numbered examples). For instance, a frequent feature of linguistics papers is an interlinear gloss: two or three lines of elements that have to line up with each other. These involve tables or tab stops in a word processor, and are notoriously fragile (e. g. if your sentence doesn't fit on one line, you get horrible issues with breaking lines).

All this is in addition to the common advantages like keeping track of
numbering. These are all things that _can_ be done with a word processor, but
usually require significant amounts of time and self-discipline.

A lot of people in our department use LaTeX; most are not of the "programming"
type, and are not deeply "into" LaTeX, interacting with the very basics and
using some googling and copy-pasting. They still get much more satisfactory
results in a shorter amount of time than the Word people.

------
zdw
Pandoc is another alternative that uses Markdown for syntax and converts to a
variety of formats (html, epub, rtf, odt, docbook, pdf, LaTeX, etc.):

<http://johnmacfarlane.net/pandoc/>

Works quite well. If you known LaTeX, it allows you to customize your output
template, while still composing in Markdown.

~~~
jb55
This. I do all of my school assignments in markdown + embedded latex. I
convert them directly to PDF using the markdown2pdf helper that comes with
Pandoc. It has pretty much replaced .doc files and monolithic word processors
for me.

------
kalessin
WYSIWYG editors are not an example of intuitiveness either, most people don't
get the concept of Style in MS Word like editors.

For that, I find the hierarchy macros of Latex much simpler to apprehend as
well as lot of goodies: footnotes, references, hyperref, mathematic mode,
bibliography management…

Also, and it's blocker for lot of my use cases, Latex is version control
friendly. The WYSIWYG editors are not.

Changing fonts may become a PITA and I recommend to use the koma-script
classes for that (btw, the whole system of packages and the build system are a
mess), but at least people can't use Comic Sans.

~~~
Derbasti
If only people would know how to use styles! This is probably _the_ most
important thing to know about word processors. Styles make documents
consistent and beautiful. Most word processors these days ship with really
beautiful and professional styles (not OOo, though). Maybe not as beautiful as
TeX, but easily good enough for most applications.

But people don't know about styles, and their documents are ugly.

------
adamc
Off-topic, but the closing of interesting open-ended discussion points is one
of the reasons I avoid stack overflow.

~~~
gm
Agreed. I think the stack exchange sites hould just openly state:

"If you ask a questions that harms the ego of any of our mods, your question
will be summarily closed. Be advised that our mods identify with the
technology at hand, so any criticism of the underlying technology will almost
certianly be taken as a personal attack on our mods."

It's a cancer that affects all of the SE forums (and they _are_ forums).

------
catechu
Independent of the elegant typesetting it produces, TeX contains well-designed
notation for mathematics, reflecting the algorithmic bent of its author, Don
Knuth.

Mathematics doesn't change as frequently as desktop publishing, so it's a good
bet that the TeX (e.g. $\int_0^1 \tau \, d\tau$) is going to be around as long
as people talk math online.

That said, I think there are much easier-to-use and less error-prone desktop
publishing tools (e.g. Scribus) for less math-heavy domains, like magazine
layout.

~~~
Lost_BiomedE
Anything graphics + text heavy I switch to Scribus. The closer what I am
working on can be described as a brochure the more likely I will use Scribus.

TeX, for me, tends to be articles, reports, and documents that I expect to use
the same format again and again (or the format is provided, such as from
IEEE).

------
GeneralMaximus
Nearly all the most beautifully typeset documents I've ever seen have been
typeset in TeX. Also, it's probably the only way I can type in a mathematical
formula without going crazy.

That said, I never use TeX. It's too much work. Bean.app is more than I need.

------
yason
I argue that TeX isn't widely used in nearly all of academia. Microsoft Word
is awkwardly common, for what I've seen. The likelihood of TeX use grows with
the probability of having to include complex equations into papers. This will
emphasize—with perhaps the notable exception of CS—the sciences without the
word 'science' in them.

Generally, it's easier to write logically structured text rather than
physically structured text. Thus, instead of battling with physical layout
people have a subtle incentive to try to let a computer automated some of that
work for them in hope for productivity gains. Various text authoring tools and
word processors can help with that to some extent.

The differences come into play as different software start cracking broke in
different ways. Some people are never able to cross the border to something
more complex and powerful and are thus forever limited to pixel-perfecting
their MS Word layouts, equations, and formatting—quite complex and powerless
in itself! Now, TeX has that power but comes with a steep learning curve and a
significant load of archaic baggage. This means that, for people with certain
inclination, it will be at some point be easier to battle with TeX than with
other typesetting or text authoring programs.

TeX users don't probably drool its unlimited awesomeness. It just means that
for many of them TeX is the best _known_ tool for the job. If there ever is an
another tool that allows them the power of TeX and yet comes with a good
library of facades that shield them from the inevitable ugly innards it will
probably win over many people over time. Nobody likes to write HTML/XML and
MathML but think something like Markdown with cross-references, TeX-like
equations, a good chaptering markup, and you're close.

~~~
blahblahblah
I'd suspect that TeX is mostly used in academic departments where UNIX has
been the de facto operating environment for a long time (e.g. engineering,
computer science, mathematics, physics) and there is a well-established
"command line" culture. In more Windows-centric departments, MS Word is
ubiquitous. If the Equation Editor functionality in Word isn't sufficient to
do what you need, then MathType (the professional version, sold separately) is
generally adequate to get the job done. If you need more control than what MS
Word can offer, then you generally go with InDesign instead.

------
program
I have used LaTeX, TeX and ConTeX for years as my only programming language
for writing beautiful docs and I think that nowadays there isn't a good
alternative if you write technical documents that have math inside.

Today I use XeTeX together with the swiss-knife memoir class and a huge
preamble that I have built over the years. XeTeX is modern and lets you write
your docs in UTF8 with ease. I have stopped writing a lot of commands by hand
cause there are a lot of modern editors out there (TeXShop on the Mac,
TeXworks/TeXnicCenter on Windows, Kile and a bunch of others in Linux.)

When you enter the TeX world you cannot go back cause you start to see
typographical errors everywhere: wrong kerning, missing ligatures, wrong align
in formulas, wrong page dimensions and others. As Don Knuth says: "I can't go
to a restaurant and order food because I keep looking at the fonts on the
menu."

The beauty of LaTeX (XeLaTeX in this case):
<http://nitens.org/taraborelli/latex>

~~~
chalst
Note that you can't use Xetex with the current incarnation of Context, mk4.

------
coliveira
People that suggest this usually don't have experience using Tex. Tex may be
hard to learn, but it is the best solution for the problem it is supposed to
solve: high quality technical documents. Of course you can create something
easier to use, but to achieve the same fine quality you'll need so much
control that the system will end up more complicated than Tex.

If you really want Tex quality without much work, one can just use Lyx, a gui
application that uses Tex as the backend.

------
cturner
It's good at what it does. We need useful layers on top of it.

We need a simple, hot-key friendly outliner that persists to something very
much like docbook. Then you'd transform to TeX when you need something
printed, and to html if you want the same content on the web, and to some sort
of braile engine if you want blind people to interact with it.

A major obstacle to better document production is the WYSIWYG is a bad but
strong meme.

~~~
limmeau
org-mode can export HTML and LaTeX (and many more). However, I would not
describe it as "hotkey-friendly", rather as "hotkey-happy".

------
jasonmorton
I think Tex is wonderful just as it is. It does have a learning curve, like
any powerful system, but so does e.g. html+css or any programming language.
Emacs is a great editor and I run it with a simple inotify script to get
automatic compilation. The error messages could be better, but that too comes
with experience; I can almost always tell exacty what is wrong from the error
message. Tex is so well suited to the purpose of producing mathematical
documents that I really think asking for a modern replacement is like asking
for a modern replacement for HTML. If you are not interested in becoming an
expert user, go with a front end (the equivalent of frontpage or dreamweaver
or similar). For the heaviest users, learning Latex is not a big deal relative
to the other arcane knowledge one must acquire to write something worthwhile
with it. As others have said, the investment is paid off in beauty, speed, and
control.

------
millerc
If you have to ask why TeX is still used as a tool, then you don't understand
what TeX is. You should not view it as a program or a fad that gets outdated
when the latest version of BozOS Release 9 comes out. TeX is a theoretical
solution to the problem of computer typesetting. As an article ages but still
remains a reference until the science has advanced, TeX stays the same until
somebody discovers something that makes it a footnote in history.

The fact that you can install a program called TeX on your computer is
marginally irrelevant.

The question you want to ask is: after Knuth has solved to the best of his
ability the general problem of computer typesetting, why hasn't anyone bridged
his theory with the front-ends that everyone uses? My take is: the shiny tools
that exist were good enough for most people to toy with.

------
mark_l_watson
Summary: someone is too lazy to do some studying in order to take advantage of
(La)Tex's awesomeness.

I have written a few books using LaTex: in my experience way nicer than using
a word processor.

------
vmind
I think TeX notation for maths is still very good, sometimes you just need
that bulk to properly handle equations, though finding symbol keywords can be
a pain.

I recently released a web editor for Markdown/LaTeX mix
(<http://notepag.es/introduction>) using Showdown/Mathjax. Have found it very
useful for quick technical docs (assignments at university primarily). Though
it still needs some smoothing between markdown and tex.

------
protomyth
Could have been "Why is C still used? What are some good, modern
alternatives?" heck this works too "Why is HTTP still used? What are some
good, modern alternatives?"

Because, sometimes, someone gets something right and a lot of people build
some exceptional infrastructure around it and then it lasts.

~~~
jackolas
HTTP is being replaced. <http://www.chromium.org/spdy>

~~~
EdiX
Don't hold your breath.

------
Read_the_Genes
The answers on HN are better and have more variety than SE!

------
kamechan
why is it still used?

WYSIWYW >> WYSIWYG

modern alternatives?

nothing i can think of.

~~~
towndrunk
Adobe's FrameMaker?

~~~
bjelkeman-again
I used to work for a Framemaker competitor, Interleaf, which was better at
long documents and customizable in Lisp to boot. The longest document i
participated working on was 30,000 pages and was successfully published on
schedule. But Interleaf is not available now in any meaningful way.

I hate trying to produce anything longer than a couple of pages in Word and
get predictable results. But it is often the required document standard in
academia those days.

Fortunately I discovered Scrivener, albeit not available on Linux. But I find
it a great writing tool without having to code in TeX, which just isn't
something i want to do anymore. :)

------
NY_USA_Hacker
Part One

I can respond here in sections:

I. My Background.

II. How to Use TeX.

III. What TeX is Good for.

IV. Warnings.

below:

I. My Background.

I was an early member of the TeX user's group (TUG) and have been a serious
and happy TeX user for 15 years.

I use TeX itself just as Knuth wrote it and rarely have anything to do with
LaTeX or any of the other extensions or preprocessors.

The TeX installation I use is ProTeX 1.2, which now is relatively old. From
ProTeX 1.2, beyond TeX itself, I make heavy use of three more programs: (1)
The screen preview program YAP (yet another previewer). (2) The program
DVIPDFM.EXE for converting TeX output files with extension DVI (device
independent file) to PDF. (3) The spell checker Aspell.

I type my input into my favorite, general-purpose, programmable editor KEdit.
Nearly all my typing for anything goes into KEdit -- blog posts, e-mail, notes
on cooking to car and house maintenance, programming in ASP.NET, Visual Basic
.NET, C, PL/I, Fortran, Rexx, etc. And I use Aspell for essentially all my
spell checking.

Point: My means of input to TeX is just this general purpose text editor. I do
a lot of typing, use this editor heavily and have for 25 years, and, thus,
have good facility with it. So, I minimize typing into anything else and am
pleased that for TeX I can type just into this same text editor. In
particular, for entering TeX I want nothing to do with any other tools for
typing. I would consider converting to an editor better than KEdit, but I see
no candidates.

I have a Ph.D. in applied math, and for me TeX is one of my most important
professional tools. Why? A crucial reason is, for typing math TeX is well
designed.

Since TeX has high quality in many respects, I also use it for nearly all my
higher quality word processing -- letters, foils, technical documentation,
business plans, etc.

II. How to Use TeX.

There is a book, Knuth's 'The TeXBook'. It is polished documentation, very
carefully written to make first and easy things easy but still contains a lot
of detail. Really you need a copy of the book and to read at least the easier
parts cover to cover.

In its internal design as software, TeX makes heavy use of the idea of
'macros'. The main idea of the macros is just string substitution. The main
use of the macros is just to replace some frequently used long patterns of
typing with short patterns.

The macro language is powerful enough that TeX is really a programming
language. Yes, the language supports arithmetic, string manipulations, if-
then, loops, and reading and writing files.

The language also has an elegant 'architecture' of scope of names. So there is
the nested and static scoping of what is typed in and also the nested and
dynamic scoping as the macros execute. For this scoping, there is memory
management with a push down stack with some enhancements.

So, a good TeX user will write some macros, and I have over 100 that I have
used for years and write new ones occasionally. I have macros for tables of
contents, automatic numbering of chapters, sections, tables, and figures,
cross referencing, bibliographic entries, simple lists, ordered lists, and
lists with bullet points, putting TeX annotation on figures, using some of the
special math fonts from the AMS (American Mathematical Society), more in
memory management, etc.

TeX has a concept 'verbatim' which means to produce output 'just as entered'
and that might contain characters such as '$_%\' usually treated in special
ways in TeX. I have several macros for verbatim, and some of these are good
for listing source code and TeX macros.

To create a new document with TeX, I make use of the windows in Windows: So, I
have one window with KEdit with the document I am creating, one window for the
screen preview program YAP, and one window to run the TeX program itself.
These three windows work well.

So, I type in my document, run TeX, and look at the output in YAP. The process
works well.

If there is some tricky TeX usage in my document, then at the tricky part I
repeatedly execute a fast loop of type, run TeX, and look at YAP.

TeX is so efficient that on a PC with a 1.8 GHz processor, usually TeX is done
in less than two seconds, maybe less than the time it takes for me to get my
finger off the Enter key.

I have enough experience with TeX that now I rarely have to look at my copy of
'The TeXBook'. E.g., my main collection of TeX macros are all in one directory
and have documentation, and I have a KEdit macro that displays the directory
of TeX macros so that I can easily check details. I have many examples of TeX
usage, and for something tricky I've done before I just look at the old
example.

Generally in my computer usage, I want to script things; TeX is easy to drive
with scripts, and I do that.

Going back at least to Xerox PARC, there is a 'paradigm' of computer
'graphical user interface' (GUI) based heavily on buttons like on a kitchen
appliance and a mouse for pushing the buttons. Microsoft's Word, Excel, and
PowerPoint are based heavily on this paradigm. There are 'integrated
development environments' (IDEs) for writing software that make heavy use of
this paradigm. There are Web browsers, and now there is more with 'smart
phones'.

GUIs have revolutionized computing: E.g., on the Internet GUI Web browsers are
one of the main differences between the current Web which is changing the
world and various 'bulletin board' systems that came before which changed
little.

But GUIs have some problems; TeX is not based on GUIs, and I don't want it to
be.

There is an old description: "With 'what you see is what you get' (WYSIWYG),
what you see is all you've got.". To see the importance of the difference,
with TeX your input is explicit, in text, in a file, and, if you wish, with
some documentation of any tricky parts. E.g., my simplest verbatim macro has
54 lines of documentation and 7 lines of TeX code. So, with the
'explicitness', you know what you did, can copy it, use it again, document it,
modify it, etc., and all such things are more difficult to worse with GUI
WYSIWYG approaches.

~~~
NY_USA_Hacker
Part Two

III. What TeX is Good for.

No single piece of software is everything, and neither is TeX.

It is possible to look at TeX and wish for more.

So, just what is TeX and what is it good for?

The history is clear: For Knuth's series of books, 'The Art of Computer
Programming', the publisher Addison-Wesley told Knuth that for his next
edition they were going to use an approach to typesetting that would reduce
the 'typesetting quality' of the results. So, Knuth wrote TeX so that he could
do the 'typesetting' for his books himself and deliver to the publisher
'camera-ready' copy or perhaps just some files.

So, Knuth wrote TeX to let him write his books.

Knuth presented his work to the American Mathematical Society that quickly
took TeX seriously. Why? For typing math, TeX is terrific, was much better
than anything else, and mostly still is. Otherwise, the typesetting quality is
about as high as typesetting gets.

So, TeX is also good for developing camera ready versions of papers in
mathematics.

Quickly TeX became the international standard for word processing of more
mathematical material in all of the more mathematical fields in science and
engineering.

Since then, TeX has been used for the word processing for many books in
mathematical fields.

TeX is good for such word processing: TeX was designed for such work and is
heavily used for it.

Note: With TeX, Knuth was essentially looking backwards in time, not forward.
So, he was writing software to automate, with high quality, what was old and
solid but slow and expensive in manual typesetting for mathematics and to be
printed on paper. So, he was not trying to do all of word processing,
graphical design, interactive user interface, and software development for the
future of information, computing, the Web, and civilization.

Notice the typesetting and 'graphical design' in Knuth's 'The Art of
Computing' and 'The TeXBook' and in papers with a lot of mathematics:

(1) There isn't a lot of color; mostly it's just black and white.

(2) There fonts are not 'stylish' like can find in printed advertising.

(3) There are only a few tables and figures, and the figures are mostly simple
line drawings, X-Y graphs, or photographs.

(4) The output is to be on paper and not 'interactive' or continually updated.
That output can also be converted to PDF and still not be interactive.

(5) Typically the writing is by no more than a few authors so that the
techniques for coordinating the work of many people on one large software
development project are not relevant.

Net, the emphasis is on the technical content and not the typography,
graphical design, GUIs, or large work groups.

So, now we know what TeX is good for.

IV. Warnings.

For the math, be well advised to stay with just Knuth's math fonts standard in
TeX and the AMS fonts and symbols. Once you are staying with these math fonts,
for the text just stay with Knuth's Computer Modern fonts that are standard in
TeX and work well with the math fonts.

For developing your own high quality math fonts for TeX, that'd be a LOT of
work. For using fonts for text other than Knuth's standard Computer Modern, it
would be a lot of work to get them to work well with Knuth's math fonts.

If you are not doing math, then you can work to use fonts Helvetica, Bookman,
Century School Book, etc. for your text, but then there will be some question
just why you are using TeX.

If you are developing a Web page, then use HTML and whatever, maybe ASP.NET,
that helps writing HTML. TeX and HTML have very different purposes.

If, compared with TeX, you want a lot more or something very different, then
you will likely run into problems from limitations from the original
intentions of TeX.

If you want something as good as TeX where TeX is good plus a lot more, then
don't hold your breath while waiting for it.

If you want to write a better TeX yourself, then start with Knuth's
voluminous, exemplary, polished, very finely detailed documentation in volumes
A-E of 'Computers and Typesetting'. After reading that material, you may
decide that you have better things to do than writing a better TeX.

Don't think that TeX and HTML compete: They are designed for very different
purposes.

~~~
juiceandjuice
Actually, I'd argue that HTML had a very similar goal to TeX with a very
different philosophy. That goal was purely the sharing of information. Some
early browsers even had postscript interpreters so you could link to papers
and view them in the browser. The first website at SLAC (first site in the US)
was purely meant to be a gateway to the SPIRES database.

[http://en.wikipedia.org/wiki/Stanford_Physics_Information_Re...](http://en.wikipedia.org/wiki/Stanford_Physics_Information_Retrieval_System)

I guess what I'm trying to say is that their histories are interwoven, and
despite being different technologies, they shared a common goal and worked
together. It's possible philosophy of what a web browser is probably led to
their divergence more than anything.

~~~
NY_USA_Hacker
I've suspected that Tim Berners-Lee knew TeX before he did HTML. That he was a
physicist in computing at CERN means that he had to have seen TeX.

I'd say that the main difference is that TeX was looking backwards and HTML,
forwards. Again, TeX was trying to computerize old, stable, slow, expensive,
high quality manual typesetting for math, and HTML, at least now, is on the
way to being the main way people view nearly all information and interact with
computers. The emphasis on the 'typographic quality' of the results is very
different: TeX goes for the highest quality, and HTML is to be quick and
dirty.

Yes, both had smaller beginnings: For TeX, Knuth wanted to write his books.
For HTML, Berners-Lee wanted a physics newsletter.

At this point there is a huge difference: TeX is solidly frozen, and HTML
continues with changes as fast as Jeff Jaffe and the rest of computing can
implement,

In the future, sure, HTML could replace TeX. For the very high quality
paragraph setting, there's no fundamental reason HTML could not specify and
implement that. For the math, similarly. There does need to be an 'executing
language' (TeX is a programming language, maybe Turing machine equivalent, and
not just static text), but JavaScript might suffice.

A big advantage would be that HTML now knows about all the characters in all
the languages.

But such high interest in math is likely in conflict with reality!

------
nice1
When you solve that one, you can try to figure out why people still listen to
Chopin's music, or read Shakespeare.

