Live data from Hacker News

Why is TeX still used? What are some good, modern alternatives?

tex.stackexchange.com

61–70 of 127 posts

Re: Why is TeX still used? What are some good, modern alternatives?

#61
post #49
post #44

Earlier quoted context omitted.

But then is the Lua scripting at the user level? Can it be used in the building of documents? Or is it a scripting language for the underlying engine, invisible to the end-user? Incidentally I went looking for what pure TeX actually looks like as most people say TeX when they really mean LaTeX. Here's Knuth's TAOCP Volume I errata: http://www-cs-faculty.stanford.edu/~uno/err1.textxt Talk about Perl being line noise..…

I did a few times. It's actually easier to make something look exactly the way you want it to look in plain TeX than fight with some poorly documented LaTeX package.

I'm sure its possible and useful for specialty cases but would you want to write TAOCP in it?

My experience of using LaTeX compared to WYSIWYG is that it's easier to focus on the text in the editor instead of fighting with the UI interface but it then requires some chasing around package bugs and compile errors. In total it's clearly a net positive for me.

Writing pure TeX would seem to push the tradeoff quite a bit, having so much distracting stuff around the text that requires a totally different mindset than the text being written. It was probably designed for a world where typesetting was done as a final step before publication, potentially by someone else.

Re: Why is TeX still used? What are some good, modern alternatives?

#62

Earlier quoted context omitted.

>no financial incentive for anyone to fix it. What? What is the financial incentive of fixing ANY of the classical open source software?

Well the Linux project has demonstrated that many companies who use Linux internally have financial incentive to keep the kernel working well.

That's probably because Linux has more utility for its audience than TeX does. Which is sad, as TeX's original goal was to provide typesetting for the masses, who are unlikely to ever use it for their typesetting purposes.

Re: Why is TeX still used? What are some good, modern alternatives?

#63

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 customi…

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 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 M…

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.

Re: Why is TeX still used? What are some good, modern alternatives?

#64
post #44

Earlier quoted context omitted.

LuaTeX has the same macro language as the other TeX engines (pdftex and it's ilk). The true power of LuaTeX comes into play when you use Lua scripting. I am not sure if ConTeXt has more advanced figure placement algorithms due to LuaTeX. LaTeX for sure has the same algorithms as before.

But then is the Lua scripting at the user level? Can it be used in the building of documents? Or is it a scripting language for the underlying engine, invisible to the end-user? Incidentally I went looking for what pure TeX actually looks like as most people say TeX when they really mean LaTeX. Here's Knuth's TAOCP Volume I errata: http://www-cs-faculty.stanford.edu/~uno/err1.textxt Talk about Perl being line noise..…

You can do Lua scripting a the user level (\directlua{...}). But you have to know the Lua interface. What purpose is having Lua inside your document? Do some calculations? Yes, that's easy. Do complex algorithms for placing floats? Then you need to replace a lot of TeX/LaTeX code anyway and then I wouldn't speak of user level. What you can do easily from inside Lua: shuffle nodes (nodelists) around. Everything you see on a page is represented by a node. So you can reposition anything. That requires a lot of knowledge of the internal representation of nodes and the LuaTeX API, but once you grok it, it is much fun to do these things.

And no, Knuth is definitely not the only one using plain TeX. Yes, it is a niche.

Re: Why is TeX still used? What are some good, modern alternatives?

#65
post #37

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 per…

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.

Re: Why is TeX still used? What are some good, modern alternatives?

#66

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 ve…

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.

Re: Why is TeX still used? What are some good, modern alternatives?

#67
post #62

Earlier quoted context omitted.

Well the Linux project has demonstrated that many companies who use Linux internally have financial incentive to keep the kernel working well.

That's probably because Linux has more utility for its audience than TeX does. Which is sad, as TeX's original goal was to provide typesetting for the masses, who are unlikely to ever use it for their typesetting purposes.

Nope, TeX's original (and only) goal was to help Knuth typesetting his books (TAOCP specifically) and he didn't think anyone but his secretary will use it.

Re: Why is TeX still used? What are some good, modern alternatives?

#68

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 ve…

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.

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).

Re: Why is TeX still used? What are some good, modern alternatives?

#69

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 customi…

DocBook is not really a TeX alternative, since it is merely a markup language and does no typesetting of its own. There are actually many DocBook workflows that do the final typesetting in TeX.

Re: Why is TeX still used? What are some good, modern alternatives?

#70
post #51
post #13

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 ( , ) remove a big feature gap with LaTeX - You can reuse your H…

http://code.google.com/p/hyphenator/ And example in action http://www.bramstein.com/projects/typeset/flatland/

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.

Post reply on HN