We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Using groff

andrewma
andrewma asked
on
Medium Priority
340 Views
Last Modified: 2010-04-21
Hello,
I want to use groff to format a document (mostly a txt file).  However, when I do "groff -Tascii test.txt | more", it shows up the line won't break even I put in a newline character in it.  So what should I do to make my document look normal.
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
.LQ

Author

Commented:
Sorry I don't understand.  Can you make it more explicily
ksb

Commented:
The groff text formatter expects commands (mark-up) in the document to describe how to format the text.  For example ".br" on a line by itself "breaks" the line.

You only need about 10 markups to write letters and stuff.  The manual pages are not so helpful.  The manual page you need to read for the description of groff mark-up is "troff".  It goes into blow-by-blow descriptions.

For exmaple ".break" breaks a loop in groff.  I don't see all the mark-up I remember in the manual page, there must be another.  The customary macro packages (like the "-me" and "-ms" macros)  make groff much nicer to use.

Manual pages are coded to "-man" macros ".SH" ".P" ".BI" and the like.

Author

Commented:
Can you give me a little example for how to put in the marks-up into the document ?  Also where can I find a man or command refrence of the marks-up ?


Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.