123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- \# A collection of macros for groff ms.
- .
- \# Break and separate
- .de SP
- . br
- . sp
- ..
- .
- \# Remove trailing dot in headers
- .als SN-STYLE SN-NO-DOT
- .
- .de TD
- . SP
- . gcolor red
- . B "\\$*"
- . gcolor
- . SP
- ..
- .
- \# Draw an horizontal line of width equal to line length
- .de HL
- . nop \l'\n[.l]u'
- ..
- .
- \# Captions
- .nr fig_count 0 1
- .de CP
- . ce
- . nop \f[B]Fig. \\n+[fig_count].\f[] \\$*
- . sp
- ..
- .
- \# Automatic table of contents entry when adding a section
- \# Also appropriately infers depth from last explicit depth definition
- .nr infered_depth 0 1
- .de H
- . ie !'\?\\$2\?'\?\?' \{
- . nr infered_depth \\$2 1
- . NH \\$2
- . \}
- . el \{
- . NH \\n+[infered_depth]
- . nr infered_depth -1
- . \}
- . ps +2
- . XN \h'1'\\$1
- . ps
- ..
- .
- \# Like .H, but allows for TOC entry different from header text
- .de FH
- . nr indent \\$3*2
- . NH \\$3
- . ps +2
- . nop \h'1'\\$1
- . XS
- . nop \h'\\n[indent]n'\\$2
- . ps
- . XE
- ..
- .
- \# Bullet points
- .de BL
- . IP \(bu 2
- ..
- .
- \# Verbatim mode
- .de VBS VBE
- . ev verbatim-env
- . evc 0
- . nf
- .VBE
- .
- .de VBE
- . ev
- ..
- .
- \# Code block
- .de CBS CBE Test
- . ds caption \\$*
- . sp
- . br
- . RS
- . CW
- . VBS
- . br
- .CBE
- .
- .de CBE
- . VBE
- . RE
- . sp
- . CP \\*[caption]
- . rm caption
- ..
|