Sponsored Content
Full Discussion: troff macros
Top Forums UNIX for Dummies Questions & Answers troff macros Post 12493 by Perderabo on Wednesday 2nd of January 2002 09:54:39 AM
Old 01-02-2002
I don't know the troff macro packages that well. But I reviewed my troff documentation to get a sense of the differences.

-ms
This was the first and most widely available macro package.

-mm
This was written by the Unix Support Group and was intended to be an official part of System V. It is much bigger and more powerful than the others. It is also harder to learn. I see that HP-UX has a mm command but SunOS does not. mm is a command to print documented formatted by the -mm macros.

-me
This was written at Berkeley. Its documentation says that it is for technical papers. (The documentation on the other macro packages indicate that they are more general purpose.) This package is much simpler and less powerful. Stuff written in -me will work well in troff or nroff.

So I guess that -ms is probably the best choice for a first package. But if you need very complex stuff, -mm may be best. And if you can settle for some limited capability or need to easily use nroff and troff then -me may be best.

It may be lame, but here is what I do: I find a document that is nicely formatted and I get the source code for it. Then I remove the author's text and put in my own.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

saving macros for VIM

The question is , as the topic says, how does one save macros for VIM in the .vimrc. I had a look on web and it gave all this ****** about how to build turing machines in vim code or something but i just want to store a macro to like : if(){ } I know how to do it IN vim but .vimrc??????!?!?!... (3 Replies)
Discussion started by: yngwie
3 Replies

2. Programming

How do capability macros get named?

The following is taken from some production code: #ifdef LOCK_LOCKF #ifdef HAVE_SYS_FILE_H #include <sys/lockf.h> #endif #ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif #define LOCK(file) fseek(file, 0L, 0), lockf(file, 1, 0L) #define UNLOCK(file) fseek(file, 0L, 0),... (2 Replies)
Discussion started by: frequency8
2 Replies

3. Programming

One last question about capability macros

This might be poorly worded. In the header file, I have #ifdef LOCK_FCNTL #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #define LOCK(file) setlock(fileno(file), F_WRLCK); #define UNLOCK(file) setlock(fileno(file), F_UNLCK); #endif /* LOCK_FCNTL */ #ifdef LOCK_FLOCK #ifdef... (1 Reply)
Discussion started by: frequency8
1 Replies

4. Shell Programming and Scripting

Expect Terminal Macros

Hey people! I just started out working at an ISP as tech support and thought that I should ease the work load by scripting some small macros. I create different commands with Alias through .bashrc which are all directed to the same script file. Here I planned on using Expect to run different... (0 Replies)
Discussion started by: GhettoFish
0 Replies

5. UNIX for Dummies Questions & Answers

MAKE and its macros and variables

I want to build a Makefile that simply takes a template file and modifies it (sed or perl, probably) before installing the result in the right place - my problem is creating the variable for substitution... So I have SYSTEM = SYS1 SYS2 SYS1_CHANNELS = CHANNEL1 CHANNEL2 CHANNEL4... (1 Reply)
Discussion started by: JerryHone
1 Replies

6. UNIX for Dummies Questions & Answers

Page feed in Troff

Hi, does anyone knows how to give the page feed command to Printer in troff. Actually I want to implement the functionality where I'll print say 10 pages and I want user to stop printer at 5th page to do manual feed by user .... (2 Replies)
Discussion started by: dpmore
2 Replies

7. Linux

What are the meaning of these macros..

Masters, I am trying to learn the serial mouse driver for linux kernel. On the kernel source tree I find out these macros and I am unable to find out the meaning of these macros. Please anyone help me to understand these. These macros are defined in linux/serio.h... (2 Replies)
Discussion started by: iamjayanth
2 Replies

8. UNIX for Advanced & Expert Users

Using Macros in sftp command

Hi, I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file. I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error. Is there any other alternative? Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies

9. Programming

help with atoi and macros in C

I have a PORT_NUM macro (10 digits long number) in a server file, if i do htons(PORT_NUM) i get warning: this decimal constant is unsigned only in ISO C90 warning: large integer implicitly truncated to unsigned type whats wrong with this? (2 Replies)
Discussion started by: omega666
2 Replies

10. Shell Programming and Scripting

Macros how-to?

Hi, all I just came to new system with RH, and it has alot of macros I was told to use, but I can't find how to open it for display or for edit, can you help me please, is it all about make/makefile? let say I have macro <trx> like this, that does a lot of things: >$ trx ... creating new... (1 Reply)
Discussion started by: trento17
1 Replies
deroff(1)							   User Commands							 deroff(1)

NAME
deroff - remove nroff/troff, tbl, and eqn constructs SYNOPSIS
deroff [ -m [m | s | l] ] [-w] [-i] [ filename...] DESCRIPTION
deroff reads each of the filenames in sequence and removes all troff(1) requests, macro calls, backslash constructs, eqn(1) constructs (between .EQ and .EN lines, and between delimiters), and tbl(1) descriptions, perhaps replacing them with white space (blanks and blank lines), and writes the remainder of the file on the standard output. deroff follows chains of included files (.so and .nx troff commands); if a file has already been included, a .so naming that file is ignored and a .nx naming that file terminates execution. If no input file is given, deroff reads the standard input. OPTIONS
-m The -m option may be followed by an m, s, or l. The -mm option causes the macros to be interpreted so that only running text is output (that is, no text from macro lines.) The -ml option forces the -mm option and also causes deletion of lists associated with the mm macros. -w If the -w option is given, the output is a word list, one ``word'' per line, with all other characters deleted. Otherwise, the output follows the original, with the deletions mentioned above. In text, a ``word'' is any string that contains at least two let- ters and is composed of letters, digits, ampersands (&), and apostrophes ('); in a macro call, however, a ``word'' is a string that begins with at least two letters and contains a total of at least three letters. Delimiters are any characters other than letters, digits, apostrophes, and ampersands. Trailing apostrophes and ampersands are removed from ``words.'' -i The -i option causes deroff to ignore .so and .nx commands. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWdoc | +-----------------------------+-----------------------------+ SEE ALSO
eqn(1), nroff(1), tbl(1), troff(1), attributes(5) NOTES
deroff is not a complete troff interpreter, so it can be confused by subtle constructs. Most such errors result in too much rather than too little output. The -ml option does not handle nested lists correctly. SunOS 5.10 14 Sep 1992 deroff(1)
All times are GMT -4. The time now is 01:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy