9 ms·
Dumb question: Are man pages the only place where any footprint of troff really survives these days? Sometimes I feel that contemporary markup languages like M
by pattisapu 10y ago
Dumb question: Are man pages the only place where any footprint of troff really survives these days?
Sometimes I feel that contemporary markup languages like Markdown, Textile, etc. fall short compared to the syntax that was just as readable and quite a bit more powerful in troff...
- jandrese 10y agoProbably. Everybody these days seems to just implement a random handful of markdown tags and call it good. It is really frustrating trying to remember the different syntaxes used on every website and what features they support. I've more than once posted stuff with the wrong markup because I forgot which site I was on.
- mzs 10y agoI use -ms when tex is overkill: http://www.troff.org/using-ms.pdf http://www.troff.org/using-ms.pdf
- pattisapu 10y agotyft
- privong 10y ago> Sometimes I feel that contemporary markup languages like Markdown, Textile, etc. fall short compared to the syntax that was just as readable and quite a bit more powerful in troff... I've never used troff myself, but your comment prompted me to look at the spec for it. I also searched for a "markdown vs troff" comparison, but didn't have much luck. Do you know of a head-to-head comparison? I've been using markdown for the past year or so when I don't need the full power of LaTeX. But your comment has me wondering if I'd be better off just using troff?
- jff 10y agotroff takes a little bit more work but it can put out some very nice-looking documents with a lot of control over the formatting and some pretty handy utilities for tables and math and such. For example, pretty much all the Plan 9 papers were written in troff: https://9p.io/sys/doc/ https://9p.io/sys/doc/
- privong 10y agoOkay. I guess what I'm wondering is, if I'm already reasonably proficient in LaTeX (for documents where I want/need lots of control) is there an advantage to learning/using troff versus using markdown?
- mzs 10y agoNo two latex installations are the same.
- privong 10y ago> No two latex installations are the same. Sure, but that doesn't address my question about whether I should use troff versus markdown for things where I don't need the power and complexity of LaTeX.
- jff 10y agoIn my opinion, I'd say pull out troff if you're thinking about making a PDF, or if you want tables or equations (see http://www.troff.org/prog.html http://www.troff.org/prog.html). Personally, I mostly use markdown when I want to generate some HTML but don't feel like typing tags by hand, or just as a sort of "style guideline" when writing text files.
- mzs 10y agoI meant when in two years you add something to your tex file and make blows-up, that's a reason to use roff if you can get away with it.
- privong 10y agoGotcha, thanks for the clarification. I guess I don't use very many "exotic" packages, so I haven't had much of an issue with old LaTeX files not compiling. Though, I also rarely have to go back and recompile them.
- david-given 10y agoIt's not bad. It's got some not-entirely-awful metaprogramming features; a while back I got interested in it and wrote a 'modern' macro package proof-of-concept for it: http://cowlark.com/meta http://cowlark.com/meta Example input follows. Defining a paragraph style in meta: .STYLE TITLE . FONT SANS . FACE B . FONTSIZE 30 . ALIGNMENT CENTER ./STYLE ...and using it: .TITLE The meta macro package ./TITLE This is a very simple, noddy example of how to use the meta macro package. It's not intended to be a reference (there currently isn't one). But the core language is kinda horrible, needing a really hacky implementation, and you can't define inline macros --- the \fB and \fP above are built-ins. Macro invocations have to start on new lines. In fact, this isn't a bad limitation in practice for anything even slightly heavyweight, but for italics, bold and underline it's still nice to have inline markup.
- pattisapu 10y agoThe troff suite includes eqn for equations, pic for diagrams, etc. that make it more like TeX in its capabilities than HTML like for Markdown etc. http://www.troff.org/prog.html#pic http://www.troff.org/prog.html#pic And the basic inline markup tags are, at least in my opinion, just as simple as Markdown, Textile, or AsciiDoc.
- AceJohnny2 10y agoThe Go Programming Language book, published 08/2015, was typeset using troff (well, groff, the GNU version). Maybe because it was written by Kernighan (of K&R C fame): https://rkrishnan.org/posts/2016-03-07-how-is-gopl-typeset.html https://rkrishnan.org/posts/2016-03-07-how-is-gopl-typeset.h... HN discussion: https://news.ycombinator.com/item?id=11470905 https://news.ycombinator.com/item?id=11470905
- thechao 10y agoI don't know about recently—it looks like he's switched to Word—but Bjarne Stroustrup used to use troff to write & typeset his books.
- stroustrup 10y agoI (still) use troff for "The C++ Programming Language" and "A Tour of C++". I use Tex for academic articles (mostly because of co-authors). I use html and markup for web documents. I use Word for quick articles and notes. I'm not a tool fanatic.
- emmelaich 10y agoI wrote my cv/resume in troff (groff), not so long ago (this millenium) Didn't have Word, didn't want to learn LaTeX, printed html looked worse.
- carussell 10y agoroff is readable? Unhappy memories from my past of reading through roff and mdoc pages on a system with no viewer has led me to the opposite conclusion. It's been a secret promise to myself for a while now that if ever I fall headlong into Shuttleworth levels of cash, one of the first things I would do is to throw some money at a project for the express purpose of writing missing pages, keeping existing ones up to date, bridging the man/info divide, and to singlehandedly push for weening the world off of roff onto a more human-readable format.