[comp.text.tex] troff or TeX which one to adopt?

skdutta@cs.tamu.edu (Saumen K Dutta) (02/25/90)

Maybe this is a redundant question to ask but

I am quite concerned about the environment which I should use for my
future text processing work. Till now I have been working with the
text formatter "troff".Now I would like to explore the possibilities
of switching over to LaTek. I am quite comfortable with the unix
text formatter as it provides lots of fexibility though I have not
gone beyond writng few lines of troff macros.
	The feature I liked most in working with this environment is that
nroff allows me to develop the text on the character terminals and verify
them (ofcourse to some extent) with a dot matrix printer without going
through iteration with Laser Printer. It also gives me the flexibility
to define the printer sequence and using any printer for output(Even
the diasy wheel printers {with character wheels} can be used to test
mathematcal characters.) The tbl, eqn, neqn preprocessors really makes
things simpler. Maybe one can use deroff for quick reading of text and
feeding it to the spelling checker. One problem I faced with it(maybe
due to my ignorance) is the difficulty to create even simplest figures
(like circle,ellipse etc.) unless you patch some postscript command at
appropriate places before passing it to the printer. I heard that
this can be done directly using Tex.
	Please advise me the pros and cons of switching over to 
other formatter with regard to
a) Facilities to be available in Future
b) Simplicity in programming
c)Flexibility ( i am concerned about the difficulty to be encountered
	in getting a device driver for dot matrix or daisy wheel printer
	for LaTex)
d)Any minus points of one compared to other.

Thank you for your time

Please send your replies through e-mail only. If you wish I will compile
them and post separately.

Thanks again for any anticipated pointer.
	
     _                                   ||  503 cherry st. Apt #128
    (   /_     _ /   --/-/- _            ||  College Station, Tx 77840
   __)_/(_____(_/_(_/_(_(__(_/_______    ||  Phone: (409)846-8803
                                ..       ||  Internet: skdutta@cssun.tamu.edu

skdutta@cs.tamu.edu (Saumen K Dutta) (03/03/90)

Sometime back I posted a news in Newsgroups: comp.text,comp.text.tex
(Please refer to <4326@helios.TAMU.EDU>). I was concerned with
changing over from one text formatter(troff) to another (tex). It
was difficult without knowing the pros & cons of one wrt the other.
I am thankful to a lot of people who tried to help me by comparing
troff with TeX. I am giving below the important points out of all
those replies. Hope it will help those who are with me on the same
boat.
-----------------------------------------------------------------
From seeba@amelia.nas.nasa.gov Sat Feb 24 15:17:41 1990
In-Reply-To: <4326@helios.TAMU.EDU>
Organization: NASA Ames Research Center, Moffett Field, CA

>                              . . . One problem I faced with it(maybe
>due to my ignorance) is the difficulty to create even simplest figures
>(like circle,ellipse etc.) unless you patch some postscript command at
>appropriate places before passing it to the printer. I heard that
>this can be done directly using Tex.

	It can also be done with troff, using the "pic" preprocessor.
	Pic works in the same manner as "tbl" or "egn," and some pretty
	elaborate drawings can be made, using primitives such as
	'circle,' 'box,' 'ellipse,' etc.  Although it seems that it
	would be difficult to specify a drawing with a series of
	statements, it becomes easy with a little practice.  By
	including a scale factor, you can even use real world
	dimensions, and "pic" will adjust the output.  I created a
	document recently which included a floor plan with terminals,
	desks, file cabinets, bookcases, etc.; it came out
	beautifully.
	
	Pic is part of DWB, but is less likely to be found in any
	particular installation than "tbl" or "eqn," which are standard
	fare.  It is distributed with some commercial ?roff
	distributions, such as the one from Elan (eroff).  I am only a
	neophyte TeX user, but have not yet found anything easier to use
	than pic for getting some basic figures into a document.

------------------------------------------------------------------
From davidra@tcgould.TN.CORNELL.EDU Sat Feb 24 15:06:41 1990
In-Reply-To: <4326@helios.TAMU.EDU>
Organization: Cornell Theory Center, Cornell University, Ithaca NY

If you are going to switch to tex, switch to tex -- not latex.  Latex's
formats are restrictive and difficult to change.

Tex is a little better.  It is far more flexible than troff but very
hard to use.  I've been writing long complicated macros in it for several
years -- they're much worse than troff macros.  For the first month, I
couldn't do anything without help.
There exists no documentation for tex.  The Texbook, by Donald Knuth,
is a tutorial, not a reference, and it doesn't tell half of what one needs
to know.  I find its tone condescending (instead of talking about
parsing and evaluation, Knuth speaks of "tex's stomach" and its "mouth.")
Tex commands are not "orthogonal" -- it might be easy to make something
go to the left but take 20 lines of code to make it move up.

Tex is designed for bitmap fonts (although with certain dvi->laser-printer
translaters one can use internal and scaleable fonts) and provides no
easy way to switch point sizes without switching fonts or vice-versa
(i.e., it lacks \f and \s).

Tex provides no facility for making tables comparable to tbl (don't let
people tell you that there's a tbl->tex converter out there -- it doesn't
work even on the simplest tbl source).

So why do I use tex more than troff?  It lets me do things impossible in
troff (such as tables inside tables), the output looks nicer,  it has
fewer bugs, and all my colleagues and co-authors use it.  You will invest
a tremendous amount of time learning it, more if you insist on making your
text look the way you want it look rather than the way Donald Knuth wants
your text to look.

If I had to do it over, I would have stuck with troff.
------------------------------------------------------------------
From rodgers@maxwell.mmwb.ucsf.EDU Mon Feb 26 07:52:18 1990
References: <4326@helios.TAMU.EDU>
Just a few quick thoughts.  I use both TeX and troff.  I still use troff
for the bulk of my work, for althogh TeX is clearly superior as a "language"
and for setting mathematics, troff still offers a much fuller environment for
producing complex documents.  You don't appear to know about the pre-processors
"pic", "chem", "ideal", and "psfig", which allow various diagrams to be easily
created with the device-independent version of troff (which you should
*definitely* be using if you are working with troff at all!!).  There is a
version of psfig for TeX as well.  You can include arbitrary PostScript
files within documents with it.  You might want to obtain the UCSF Enhanced
trof/TranScript (I'm the principal author), which bundles all this
together for UNIX sites, with documents, etc.  Also look into bibIX, the
UCSF bibliographic pre-processor, which is a much fuller environment than
BibTeX.  Contact: domino@violet.berkeley.edu for information on availability.

Cheerio, Rick Rodgers
--
R. P. C. Rodgers, M.D.         (415)476-8910 (work) 664-0560 (home)
UCSF Laurel Heights Campus     UUCP:
...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers
3333 California St., Suite 102 ARPA: rodgers@maxwell.mmwb.ucsf.edu
--------------------------------------------------------------
From alberta!tim@uunet.UU.NET Mon Feb 26 08:43:01 1990
In-Reply-To: <4326@helios.TAMU.EDU>
Organization: Dep't of Computing Science, University of Alberta
We have a program called ``pic'' here which is a very nice
troff-oriented picture drawer.  You should see if your department
can get it.  If you take a little while to learn it, it will do
almost all you could want.

TeX is NOT useful for drawing pictures.  In fact, that's the main
reason I don't use TeX.
Tim Breitkreutz         Internet: tim@cs.ualberta.ca  Bitnet: usertimb@ualtamts
-----------------------------------------------------------------
From Irvin.Lustig@BASIE.Princeton.EDU Mon Feb 26 08:47:58 1990
From: Irvin.Lustig@BASIE.Princeton.EDU
To: SKDUTTA%CSSUN.TAMU.EDU@Princeton.EDU
Subject: TeX versus Troff


My wife was a technical secretary who has used both troff and TeX
extensively.  She used troff first, then TeX.  She believes that
TeX is much easier to use and produces better looking documents.

She was using a Unix system for both and had a Laser Printer, so
it was easy to "preview".  I use the Mac version of TeX, called
TeXtures, and think it's great.  So does she.
	-Irv Lustig
	Assistant Professor
	Dept. of Civil Engineering and Operations Research
	Princeton University
	irv%basie@princeton.edu
-------------------------------------------------------------------
From elan!jlo@ames.arc.nasa.gov Mon Feb 26 22:30:43 1990
In-Reply-To: <4326@helios.TAMU.EDU>
Organization: Elan Computer Group, Inc., Mountain View, CA
Ditroff and its variants (not the old C/A/T troff) support line drawing
commands including circles and ellipses.

One troff based system you may want to consider is Eroff from
Elan Computer Group, Inc.  See the product description below.

----
Elan Computer Group, Inc. sells a package called Eroff which is the AT&T
Documenter's WorkBench (DWB), including device independent troff (ditroff),
-------------------------------------------------------------------
From barrett@crabcake.cs.jhu.edu Tue Feb 27 13:33:57 1990
Date: Tue, 27 Feb 90 14:33:43 EST
From: barrett@crabcake.cs.jhu.edu


	I switched from troff to LaTeX about a year ago, after using troff
for 4 years.  I am glad I made the switch.

	It took me about 1 day to get comfortable with LaTeX.  However, there
are always new things to learn, and some of them take a while.  It helps to
have a TeX or LaTeX guru where you work.  (Although I taught myself using
The LaTeX Book.)

	The major differences between TeX (== LaTeX) and troff, in my
opinion, are:

(1)	TeX is better at handling spacing between different fonts.  If
	you put a Roman `!' after an italics 'y', TeX understands this and
	compensates for the spacing.

(2)	TeX commands have a more clearly-defined SCOPE.  For any command,
	you specify a REGION OF TEXT in which that command takes place.
	In troff, your "scope" is "start here, and continue until some
	other command turns it off."  Since commands interact (particularly
	in troff macro packages), it is sometimes unclear who is turning
	on and off which parameters.

	For example, troff looks like this:

		<TURN ON BOLDFACE>
		Here is bold text.
		<TURN ON ITALICS>
		Here is italics text.
		<TURN ON BOLDFACE>
		More bold.

	TeX looks like this (note the balanced braces):

		{BOLD:	Here is bold text.
			{ITALICS: Here is italics.}
			More bold.
		}

	(These examples do not use real troff/TeX syntax.)

I like LaTeX macro facility (\newcommand) better than troff's.  It's a lot
more like using a structured programming language.  I think of troff more as
"assembly language" and TeX as "LISP" (with its balanced parentheses).

	There seem to be TeX implementations for all PC's, both free and
commercial versions.  There are also plenty of drivers for 24-pin dot matrix,
laser printers, and Postscript.

	Have fun, and feel free to write with questions.

                                                        Dan
-----------------------------------------------------------------
From gillies@cs.uiuc.edu Tue Feb 27 23:08:41 1990
troff has some quirky bugs (boldface bugs on page headers sometimes).

TeX will definitely outlive troff, since it is the best computer program
in the world at formatting math.  If you ever write any math, you will
appreciate TeX.  Also, TeX has much more sophisticated font control &
line-stretching algorithms, resulting in more aesthetic output.  I'll
bet that 80% of all computer-typeset books are done in TeX.

Latex has a picture environment for drawing crummy pictures.  There is
a nifty macintosh "sketch" program that lets you edit these pictures
(LADraw or something), and then insert them into your TeX document.

troff has pic, a picture preprocessor, which is a horrible mess.  In
fact, I bought a macintosh and learned ms-word & macdraw, just to
avoid having to learn pic.  pic extracts blood & sweat, and gives back
almost no functionality in return.  Basically, you are up shit creek
if you want to do decent illustrations within troff.  There are several
hacked versions of troff that accept postscript files.  I think TeX
was designed with postscript in mind somewhat (brian reid was
associated with knuth's project, I believe).
.........
.........
........
go with TeX!

Don Gillies, Dept. of Computer Science, University of Illinois
1304 W. Springfield, Urbana, Ill 61801    
------------------------------------------------------------------

     _                                   ||Internet: skdutta@cssun.tamu.edu  
    (   /_     _ /   --/-/- _            ||Bitnet : skd8107@tamvenus.bitnet 
   __)_/(_____(_/_(_/_(_(__(_/_______    ||Uucp : uunet!cssun.tamu.edu!skdutta
                                 ..      ||Voicenet: (409)846-8803