andrewma
asked on
Using groff
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.
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.
.LQ
ASKER
Sorry I don't understand. Can you make it more explicily
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.
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.
ASKER
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 ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.