2

I need to format documents with the groff -mm macros and need help on some issues: image showing issues

============
You can see it is putting some blank lines at the top and a page number. I need it to run one continuous column starting at the first line of the file.
It is using ansi escape codes, i need it to strictly use ascii text characters.
I also want no default indentation and the page width needs to be 80 chars wide as i am sending it to a text file not a printer.

George Profenza
51.9k20 gold badges156 silver badges228 bronze badges
asked Sep 15, 2015 at 10:22

1 Answer 1

4

You can reformat the page with .PGFORM <line length> <page length> <page offset> <line break>. .PGNH skips the header printing on the first page.

.PGFORM 80 0 0 1
.PGNH
ConImp [-a] [-t] [n<name>] [m<time>] [e<editor>]
 -a = non-ANSI terminal
 -t = use test port
 -n = force user name
 -m = maximum play time
 -e<editor> = allow external editor
-a:
 If your terminal is not ANSI compatible use this to prevent ANSI codes being sent
-t:
 Use the testing port
-n<name>:
 Force the username to this user, used in BBS doors
-m<time>:
 Set maximim play time
-e<editor>:
 Set the external editor, if any. For example to use VI editor

The text above is only guessed ;-)

I guess that the escape characters are added by the tty output device (-T ascii) which is grotty. grotty allows you to disable color and escape sequences by the -c option. This flag should be propergated to grotty if you call groff -c ... .

Edit

with the following call you can switch off the hidden call to grotty with -Z and pipe the output to an explicit call of grotty with the -c flag.

groff -mm -Tascii conimp.mm -Z|grotty -c
answered Sep 15, 2015 at 14:37
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.