|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
|
Thread Tools | Display Modes |
|
|
|||
The big TeX and (g)troff thread
What do you see as the failings of troff that Knuth should have improved or cleaned up?
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
Quote:
Is the roff family capable of any typesetting task presented to it - or is it just the syntax is so unnatural that it is hard to learn?
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
||||
Quote:
This might be an interesting reading for you http://www.tug.org/interviews/interv...r-lemberg.html By the way Werer Lemberg is current maintainer of Troff. He has significantly contributed to LaTeX, and he is professional composer by occupation so he uses Lilypond on daily basis. Speaking of Troff syntax I find it little bit more difficult than TeX but I have used TeX thousand times more than Troff. It is OK actually. Why don't you try. There are enough documents on the net to get you start with the simple document in Troff. Unix in the Nutshell has a good short introduction. Lets face it. Any markup language is far beyond capabilities of most desktop users. Don't forget most Windows users are not like Dr. J who uses Windows because he has to run specific software. Last edited by Oko; 9th November 2008 at 09:24 PM. |
|
|||
Quote:
The macro packages are pretty easy to use for most things, as are the preprocessors for equations (eqn), tables (tbl), references (refer), line drawings (pic), graphs (grap) and chemistry (chem). I've found that you have to know a certain amount of raw troff to do some of the things I want to, and that is less than intuitive until you get the hang of it. That takes some time. The next level up, such as writing macros, is pretty challenging for me, mainly because I don't do it enough to stay in shape. An excellent introduction to the troff family is the original Bell Labs documentation. You can find much of it here: http://www.troff.org/papers.html Remember that groff has many useful extensions from the troff of these papers, but they are an excellent place to start. I still use my dog-eared Unix Seventh Edition programmer's manual (volume 2) as my day-to-day reference. FWIW, I learned it by writing everything in raw troff (from the tutorial), including overhead slide presentations and simple memos, until I got the hang of it. Then I moved on into the macro packages, which then were quite easy. I don't know if that sort of effort is worth it these days. The upside is that every *nix system has groff, it is still used for man pages, and it is very powerful. The downside is that an investment in TeX might be better if you are looking to publish or exchange source files with other authors (though they usually use Word). For me I've used it for 25 years, so it is second nature. But it really does suck to have to translate the code to TeX, and then diddle with it, to publish anything. There are enough hurdles to getting articles out the door already. |
|
|||
Quote:
|
|
|||
Off topic to pcc...
Personally I don't think there is anything wrong with groff (which these days I use synonymously with troff though that's not quite right). It has many extensions to troff that help quite a bit, and it does pretty much all I need to do. TeX/LaTeX has some added flexibility, but it comes at the expense of greatly increased verbosity (if you use LaTeX). And no one really uses groff without macro packages or the proprocessors. -ms is fine for most things, but there are others, such as -me, -mm and -mom. Support for the groff family also is quite good through a small but dedicated group on a mailing list. Its main failing I have found is that it is hard to float text around an inserted graphics element, which is important when you have page limits, and that the graphics insertion routines are rather picky about the eps syntax (and you can't use any other format, though you can always convert). The other limitation is that very few publishers accept troff code, but usually do accept TeX/LaTeX code. That is a *major* problem. Some accept a submission in PDF format, but many more do not. I also think that the computer modern font Knuth developed is downright ugly. I understand the motivation for its development, but there is a reason that type designers didn't come up with something like it. I know you can use others, but Times Roman is just a better default (not that it is my favorite either). |
|
||||
Quote:
Unfortunately domination of the TeX is probably due to the fact that TeX was open source while Troff was jealously guarded ATT child until it was too late. |
|
||||
personally, i don't use g/troff or (la)tex and i never thought about this until you guys brought this up. so why did Knuth create TeX if troff was already available at the time?
(BTW, i think Jmj_coder was asking the same question ) > I preferred if he worked on improving Troff instead of waisting 10 years of his life to code TeX from the scratch. the man is known as the father of computer science and his intellect/achievements exceeds that of all of us combined. do you really think he would "waste" 10 years of his life creating TeX without a compelling reason for doing so? |
|
||||
Quote:
third volume of the Art of the Computer Science for almost two decades would cold -heartedly agree with me. I would go with Dr. J healthy speculation. Troff was closed and there were no real alternatives at the time for typesetting while the old gold standards were scraped by publishers due to the cost. I agree that Knuth is the Leonard Euler of CS. However do not let the greatness cloud your mind. Great people also make blunders. The famous one in Computer Science is one committed by John von Neumann by putting a single clock in the heart of the computer despite fierce opposition of the chief co-architect Dr. Lehman from U.C. Berkley (Just like Dr. J) who wanted to put couple clocks and run programs in parallel fashion. That effectively hindered the development of parallel programming for half a century. I could not get of the impression that Knuth has gotten himself little bit too much into calligraphy. The fact that he brought Brian Ried inventor of the third major type setting system of the time Scribe to Stanford is the one of my arguments. It is important however to notice that typesetting systems that we are talking for granted today have been painfully developed by some of the brightest minds of computer science. Cheers, OKO P.S. For Moderators. I apologize to BSD666fun and everybody else as I had no intention of hijacking original thread. It seems to me that one of my original remarks mentioned in respond to the question to PCC compiler lead to this very interesting discussion TeX vs Troff. Could you pelase separate the thread. Last edited by Oko; 9th November 2008 at 07:23 PM. |
|
||||
like Knuth we started with PCC then switched to a completely unrelated topic.
can the moderators fork this thread? > The famous one in Computer Science is one committed by John von Neumann by putting a single clock in the heart of the computer despite fierce opposition of the chief co-architect Dr. Lehman from U.C. Berkley (Just like Dr. J) who wanted to put couple clocks and run programs in parallel fashion. That effectively hindered the development of parallel programming for half a century. this is interesting. can you tell us more about it or point to any links? BSDfan666, sorry for hijacking the thread. > U.C. Berkley (Just like Dr. J) Oko, don't get me wrong, I was just being a fanboy and I didn't mean it that way. Last edited by ephemera; 9th November 2008 at 06:51 PM. |
|
|||
Quote:
While troff was closed, AT&T was rather liberal with academic licenses. Stanford undoubtedly had the source. It would hinder its wide-spread propagation, though that may not have mattered much to Knuth initially. My guess is that he looked at the troff source, and found areas where he could improve the product, such as the spacing and line-break algorithms. You also have to remember where the industry was in those days. troff and its many preprocessors was the practical justification that was used to develop Unix originally. KSRs were still very common, and being displaced slowly by terminals. The PDP 7 and 11 were considered to be very powerful computers. These days we have more computing power in our cell phones. Move forward a few years into the late 1970s and early 1980s, and you are in the era of CP/M 8-bit machines. Wordstar was king (though I used the EMACS- and Scribe-like editor-formatter Final Word). Eight-pin dot matrix printers were the most common (yuk!); there were some daisy wheel and rotating ball printers that had extended character sets but they were really costly (like over $2K). The majority of scientific and technical document processing was done on Wang stand-alone word processors. On the other end of the spectrum were the dedicated phototypesetters. These usually ran on minicomputers, used proprietary software, and drove the phototype output device. The output form was photographic paper; resolutions were extremely high (on the order of 6000 dpi) and the type was absolutely beautiful. My wife at the time was a typographical proofreader and typesetter, and it was through her that I originally got into type. The output from troff was limited to a single typesetter (Berkeley had one which I used) and the troff output type, while quite good, fell terribly far short of what could be done with dedicated systems. There simply was not enough attention given to character spacing (kerning), typographical "nicities" like ligatures, interword spacing and use of thousands and thousands of type families, and their corresponding weights, in condensed and expanded faces, and in faces (like italic). While extremely capable as a technical document production system, troff was a pretty crude typesetter when compared with the professional systems. That's the context into which Knuth started TeX. It is no wonder that he thought he could do better -- there were many areas where improvement was possible. At the same time, he was undoubtedly influenced greatly by troff, which you can see in how it handles mathematics. Personally, I think the troff preprocessor eqn is one of the most brilliant pieces of software ever written. Incidentally, type these days has taken a terrible turn for the worse. There simply is no replacement for phototype -- it is simply stunningly beautiful. You really should try to find a galley on photographic paper produced by a first-rate system. There is nothing like it. At the same time, the word processors uniformly turn out ugly type. MS Word, for example, in spite of the alleged sophistication of its many internal algorithms, produces profoundly ugly type. I can always tell when someone has written a document in it. Both troff and TeX produce type that is worlds better. But even those pale in comparison with the old dedicated systems. These, alas, are pretty much dead. Typography has never really recovered from the introduction of the personal computer. And I count that as a great shame. The upside is that for a few hundred dollars (including an inexpensive laser printer), one can use troff or TeX to produce documents that are pretty good. They are much, much better than documents produced by the old Wang (or even scientific typewriters!) and so they are much more accessible to the general user. Sadly, those users tend to use Word or its equivalents, which really have no place for anything beyond a simple memo. That is, if one places any value in the appearance of type. Sorry for the length of the post, but this is an area near to my heart, as you can probably tell. |
|
||||
Quote:
Lets put this way. I know very well the guy (mister X) who is now 85 years who was Ph.D. student of late Dr. Lehman at the time. For the record mister X was not my Ph.D advisor. We are just very good friends. My Ph.D. advisor was dealing with computers mostly through me! Last edited by Oko; 9th November 2008 at 07:35 PM. |
|
|||
I'll not let facts get in the way of healthy speculation, but I would guess that Knuth simply got interested in text processing and thought he could improve the state-of-the-art. Academics are free to do that -- there need be no real "reason". That troff was closed at the time was likely a motivation.
|
|
|||
These are the sort of discussions that leave me confused as to what to study. On my list of things to learn is troff/groff/nroff/tex/latex and I'm not sure what to choose or where to start. I always find articles and postings that do what seems to be done above, that is, "troff can do anything you want better"/"I don't know if it's worth learning anymore" and "Latex isn't as good"/"No one can accept your troff files" or "Everyone uses Latex"/"It can't do what you want". (Don't take all that literally.)
This rocking back and forth makes me unsure what to take up first and what's worth pursuing later. I think, I think, I want to be able to markup my text that can be easily published, or at least easily translated to postscript or pdf (or even Word/OO?). As an assembly language programmer, I like working with the simple basics of handling raw code but I don't want to waste my time with something no one can use, or no one uses anymore. I even get confused with the differences between the different roffs. Does it all boil down to this compilation from DrJ above? Quote:
Quote:
|
|
|||
If you are not doing mathematics, you should learn DocBook
The roff's and Tex are presentation-oriented, while Docbook is presentation-neutral. From http://en.wikipedia.org/wiki/DocBook : Quote:
It wouldn't be too difficult to write a stylesheet to produce Tex or troff markup. Some more details about this can be found in http://daemonforums.org/showthread.php?t=184 BTW the FreeBSD handbook is written in DocBook and IIRC it uses Tex to produce the Postscript/PDF output.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
The answer is "it depends." Lots of help, right?
But it does depend on what you want to do: what sorts of documents you want to produce, the parties with whom you collaborate (if any), and where those documents will go. Either troff (used generically) or TeX produce decent documents, even getting html or pdf from them. That's easy. Where both of the shine is in producing complex documents, like technical reports that include heavy math and tables and the like. That includes things like technical publications or proposals. If you want just a PDF at the end, use either. If you want to submit an article to ACS or APS (for example), go with TeX. Many publications from the Royal Society or Elsevier accept PDFs and massage them directly. But honestly, most are geared, even in this space, more for Word. If you collaborate with all but a few of us nerdly types, don't bother. Just use Word or OO.o. And there is no good way to take a troff or TeX document and convert it to Word and back. I'd suggest you learn both troff and TeX, at least at a rudimentary level. They are in many ways very similar in how they do their jobs, but the specific statements are of course a bit different. It is like picking up a new programming language -- at first it seems like it is hard, but after you know four or five, picking up a new one is just no big deal. You don't have to learn all of the low-level troff stuff -- I did, and it helps, but it is by no means necessary. Most people can get by just fine without it. These days I write in troff, use a translator to convert it to TeX, and then massage the code so that it formats properly. OKO probably does something similar, but in reverse. I probably should learn TeX/LaTeX better, but honestly it just does not seem worth the time. If you are set on only learning one, TeX is probably the better choice these days. It is used in more places, and more people seem to know it well. You probably won't see much difference in the output quality unless you do *really* heavy-duty math (mostly in the symbolic area). In this case TeX is better. It is also better for writing non-Roman documents (like in Arabic). For western documents it makes little difference. On the other hand, the introductory troff + preprocessor documentation is really outstanding, and just feels like Unix. TeX feels more like Pascal when you are used to troff's C, or the GNU command-line options ("-this_option_is_really_long") when you are used to BSD ("-opt"). That's an aesthetic choice, and not one of functionality or usefulness. One example might be the number of options to control font size. LaTeX has five (or more?) options to make fonts larger. Most troff macros have one, since it was geared to writing standard patent applications. I usually just use the direct font-size commands from raw troff, so it doesn't matter to me in the slightest. I hope this ramble has been of some use. If you want to share more of what your needs are, we can certainly discuss it. |
|
|||
Much of what J65nko write is true: both troff and TeX are geared primarily for paper output of whatever size. That can be proposals, reports or books -- that does not really matter -- but they are not at their best for other formats.
That said, how an abstract (for example) appears is controlled through the macros, and those are pretty easy to edit. That part is transparent to the user. You just have to designate it as an abstract. As an aside, when people ask me what I do for a living, I often say that "I kill trees." Clearly output to paper is what matters to me. |
Tags |
docbook, groff, latex, tex, troff, typesetting |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
NOT another Linux vs BSD thread | DNAeon | FreeBSD General | 21 | 27th July 2009 03:10 PM |
NetBSD laptop thread | Mr-Biscuit | Guides | 1 | 10th June 2009 05:51 AM |
troff/nroff Q; how to put a linebreak in a tag labeled lists item | TerryP | General software and network | 8 | 10th November 2008 07:39 AM |
BSD Girls/Woman Thread | worldofopensource | Off-Topic | 15 | 11th June 2008 05:25 AM |
TeX for troff users? | DrJ | Off-Topic | 0 | 2nd May 2008 09:29 PM |