5 Copyright (C) 2021 Free Software Foundation, Inc.
6 Written by Deri James (deri@chuzzlewit.myzen.co.uk)
8 This file is part of groff.
10 groff is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation, either version 3 of the License, or (at your
13 option) any later version.
15 groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 . tm sboxes.tmac: macros require groff extensions; not loading
29 . tm sboxes.tmac: macros do not work in compatibility mode; not loading
33 .\" Define a string for use in diagnostic messages.
34 .ds bx*name sboxes.tmac\"
37 . ab \*[bx*name]: ms macros must be loaded first; aborting
39 .if (\n[.x]\n[.y] < 123) \{\
40 . ds bx*msg \*[bx*name]: groff 1.23 or later is required,\"
41 . as bx*msg " but found groff \n[.x].\n[.y]; not loading\"
46 .\" See if already loaded.
49 .\" GSBOX is defined if the package is loaded, and true if it will work.
57 . tm \*[bx*name]:\\n[.F]:\\n[.c]: error: \\$*
60 .\" Define dummy macro if we're not formatting for the pdf device.
66 .\" Link into ms macros to trap footnote growth
68 . nr bx*pb \\n[nl]u-2p
69 . nop \!x X pdf: background footnote \\n[bx*pb]z
72 .\" Has PD been actioned?
79 . nr bx*stack \\n[bx*stack]+1u
86 . ie 'SHADED'\\$1' \{\
93 . ie 'OUTLINED'\\$1' \{\
100 . ie 'WEIGHT'\\$1' \{\
105 . ie 'INDENT'\\$1' \{\
110 . bx*error ignoring unrecognized BOXSTART parameter '\\$1'
118 . if '\\*[bx*type]'' .ds bx*type "fill"
119 . nr bx*l \\n[\\n[.ev]:li]s+\\n[.o]s-\\n[bx*ind]u
120 . nr bx*r \\n[bx*l]u+\\n[.l]-\\n[\\n[.ev]:li]+(\\n[bx*ind]u*2u)
121 . nr bx*gap \\n[.v]-\\n[.ps]+\\*[bx*wt]
122 . nr bx*bot \\n[.p]u-\\n[FM]u+\\n[bx*ind]u+\\n[.ps]u
123 . nr bx*top \\n[HM]-\\n[bx*ind]u+\\n[bx*gap]u
124 . ne \\n[bx*ind]u+2v+\\*[bx*wt]
125 . sp -(2v-(\\n[bx*PD]u*2u))u
126 . pdfbackground \\*[bx*type] \\n[bx*l]z \\n[bx*top]z \
127 \\n[bx*r]z \\n[bx*bot]z \
129 . sp (\\n[bx*ind]u-1v)u
130 . if (\\n[bx*shad]=1) .nop \\M[]\c
131 . if (\\n[bx*outl]=1) .nop \\m[]\c
132 . ds bx*ind\\n[bx*stack] \\n[bx*ind]
133 . rr bx*shad bx*outl bx*ind bx*bot bx*top bx*l bx*r
139 . sp \\*[bx*ind\\n[bx*stack]]u-\\n[.psr]u
141 . nr bx*stack \\n[bx*stack]-1u
147 .\" vim: set expandtab filetype=groff textwidth=72: