NetBSD/gnu/dist/groff/tmac/troffrc

102 lines
2.4 KiB
Plaintext

.\" Startup file for troff.
.
.\" This is tested by pic.
.nr 0p 0
.
.\" Use .do here, so that it works with -C.
.\" The groff command defines the .X string if the -X option was given.
.ie r.X .do ds troffrc!ps Xps.tmac
.el .do ds troffrc!ps ps.tmac
.do ds troffrc!dvi dvi.tmac
.do ds troffrc!X75 X.tmac
.do ds troffrc!X75-12 X.tmac
.do ds troffrc!X100 X.tmac
.do ds troffrc!X100-12 X.tmac
.do ds troffrc!ascii tty.tmac
.do ds troffrc!latin1 tty.tmac
.do ds troffrc!utf8 tty.tmac
.do ds troffrc!cp1047 tty.tmac
.do ds troffrc!lj4 lj4.tmac
.do ds troffrc!lbp lbp.tmac
.do ds troffrc!html html.tmac
.do if d troffrc!\*[.T] \
. do mso \*[troffrc!\*[.T]]
.do rm troffrc!ps troffrc!Xps troffrc!dvi troffrc!X75 troffrc!X75-12 \
troffrc!X100 troffrc!X100-12 troffrc!lj4 troff!lbp troffrc!html
.
.\" test whether we work under EBCDIC
.do ie '\[char97]'a' \
. do tr \[char160]\~
.el \
. do tr \[char65]\~
.
.\" Set the hyphenation language to `us'.
.do hla us
.
.\" Load hyphenation patterns and exceptions.
.do hpf hyphen.us
.do hpfa hyphenex.us
.
.\" Load composite mappings.
.do mso composite.tmac
.
.\" Handle paper formats
.do mso papersize.tmac
.
.if n \{\
. nr _C \n(.C
. cp 0
.
. \" The following code sets a top-of-page trap to disable grotty's TTY
. \" mode. Since neither \X nor .output can be used before the first
. \" page has started, we must use a trap. To make it work with troff's
. \" -o option, we wait until the first printed page.
.
. de sgr@dummy
. .
.
. rn wh wh@old
.
. \" The stand-alone version. If no other trap is set, we can safely
. \" insert the truncated vertical space caused by the trap (if any).
. \" Otherwise we assume that the document's main macro package takes
. \" care of that. As soon as the trap has been executed, it is removed.
. de1 no@sgr
. if \\n[.P] \{\
. if (\\n[.t] == \\n[.p]) \{\
. rn wh@old wh
. rm no@sgr
. wh 0
. sp \\n[.trunc]
. nop \X'tty: sgr 0'
. sp -1
. \}\}
. .
.
. wh@old 0 no@sgr
.
. \" The piggyback version to be appended to macros planted with the
. \" modified `wh' request.
. de1 no@sgr1
. if \\n[.P] \{\
. rn wh@old wh
. ds no@sgr1
. nop \X'tty: sgr 0'
. sp -1
. \}
. .
.
. \" We redefine the `wh' request so that `no@sgr1' is appended to
. \" the trap macro.
. de1 wh
. am1 \\$2 sgr@dummy
. no@sgr1
. sgr@dummy
. wh@old \\$1 \\$2
. .
.
. cp \n[_C]
.\}
.
.\" Don't let blank lines creep in here.