[comp.text] troff macros

marisa@wilbur.nas.nasa.gov (marisa) (03/11/89)

Forgive me if this has been asked many times before...

If I have my own troff macro, but am unable to place it into
/usr/lib/tmac/tmac.name due to permission problems, how do I
tell troff to use *my* macro file?  I could include my macro
file at the top of every troff file that I use it with, but
I am looking for a command line option.

Thanks for any hints, pointers, answers.  Please email and if
there is enough interest I will summarize.

Marisa Chancellor

P.S.  Yes, I have read the manuals...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marisa K. Chancellor                         Internet:  marisa@ames.ARPA
            UUCP:  {hao,decwrl,hplabs,harvard,ihnp4,lll-crg}!ames!marisa
  Control Data Corporation, 215 Moffett Park Drive, Sunnyvale, CA  94089
On site at NASA-Ames Research Center, MS 258-5, Moffett Field, CA  94035
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

lfk@mbio.med.upenn.edu (Lee Kolakowski) (03/11/89)

In article <1595@amelia.nas.nasa.gov> marisa@wilbur.nas.nasa.gov writes:
> If I have my own troff macro, but am unable to place it into
> /usr/lib/tmac/tmac.name due to permission problems, how do I
> tell troff to use *my* macro file?  I could include my macro
> file at the top of every troff file that I use it with, but
> I am looking for a command line option.

Well, there are lots of ways to do this.

first -m(?) is not magic, it is just short for

	(?)roff /usr/lib/tmac/tmac.(?) filename

so that means that you can just put your macros in a file that you call
any of the following ways

	roff -m(?) your_macro_file your_input

	or in your input at the top

	.so your_macro_file

If you are using macro names that are the same as already existing
macros, it is best if you remove the existing macro, before defining
yours, although I don't think it matters.

	.rm PP
	.de PP
	.
	.
	.
	..


--

Frank Kolakowski 
____________________________________________________________________________
|lfk@mbio.med.upenn.edu                         ||      Lee F. Kolakowski   |
|kolakowski@mscf.med.upenn.                     ||	Univ. of Penna.     |
|c/o jes@eniac.seas.upenn.edu			||	Dept of Chemistry   |
|kolakowski%c.chem.upenn.edu@relay.upenn.edu	||	231 South 34th St.  |
|kolakowski%d.chem.upenn.edu@relay.upenn.edu    ||	Phila, PA 19104     |
|bcooperman.kolakowski@bionet-20.arpa		||--------------------------|
|AT&T:	1-215-898-2927				||      One-Liner Here!     |
=============================================================================

jtkohl@MIT.EDU (John T Kohl) (11/29/90)

I have a document which needs to refer the user to (sometimes forward)
sections by section number.  Currently the references are hard-wired and
quickly becoming out of date.

I already have some hacks for automatically generating table of contents
when using sectioning commands (essentially, some macros to do the ToC
stuff, then call .NH).  What I want is the equivalent of \ref{} from
LaTeX, but implemented for troff ms macros.

Please e-mail replies to <jtkohl@mit.edu>, as I don't normally read
troff stuff in this newsgroup.
--
John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@MIT.EDU>
Digital Equipment Corporation/Project Athena
(The above opinions are MINE.  Don't put my words in somebody else's mouth!)