xref: /minix/minix/man/man9/macros.9 (revision ebfedea0)
Macro package for producing books (based on -ms)
.nr PS 12 .nr PZ 12 RT - reset everything to normal state

0 .ul 0 . ll +\\n(QIu . in -\\n(QIu . nr QP -1\} . ps \\n(PS . if \\n(VS>=41 .vs \\n(VSu . if \\n(VS<=40 .vs \\n(VSp\} .bd 1

.. . \"IZ - initialization .nr TN 0 .em EM .ch FO \\n(YYu .nr YY -\\n(FMu .nr XX 0 1 .nr IP 0 .nr PI 5n .nr QI 5n .nr I0 \\n(PIu .nr PZ 12 .nr VZ 13.8p .nr PS \n(PZ .nr VS \\n(VZu .nr ML 3v .nr IR 0 .nr TB 0 .nr SJ \\n(.j .nr LL 6i .nr LT \\n(.l .lt \\n(LTu .ev 1 .nr FL \\n(LLu*11u/12u .vs 12p .ev .wh 0 NP .wh -\\n(FMu FO .ch FO 16i .wh -\\n(FMu FX .ch FO -\\n(FMu .. . \"KS keep - for keep release features. As in IFM .nr KN \\n(.u .nr IK +1 .. . \"KQ - real keep processor

.nr KI \\n(.i .ev 2

.lt \\n(LTu .di KK .nr TB 0 .nr KV 0 .. . \"KF - floating keep .nr KN \\n(.u .nr IK +1 .. . \"FQ real floating keep processor .nr KI \\n(.i .ev 2

.lt \\n(LTu .di KK .nr TB 1 .nr KV 0 .. . \"KP - keep full page .nr KV 1 .. . \"KE release - everything between keep and release is together .. . \"RQ real release

.di .nr NF 0

.rs
.nr TC 5
.ls 1
.ls

0 .nr TC \\n(TB .ev .. .nr EF \\n(.u .nr LE 1 \" 1 is center .di EZ ..

.di .nr ZN \\n(dn 'pc 'lt \\n(.lu .di EZ \" GCOS patch
\\*(10 \" GCOS patch
.br \" GCOS patch
.di \" GCOS patch
.rm EZ \" GCOS patch
'lt \\n(LLu 'pc % .rr 10 11 12 13 14 15 16 17 18 19 20 21 22 23 .nr z 72-((\\n(nl-\\n(HM)%72) .. .nr SJ \\n(.j .nr YE 1 .. . \"EM end up macro - process left over keep-release

.. . \"NP new page .nr PX \\n(.s .nr PF \\n(.f .nr PV \\n(.v 'sp \\n(HMu/2u .lt \\n(LTu .vs \\n(PS+2

T .vs \\n(PVu 'sp |\\n(HMu .nr XX 0 1 .nr YY 0-\\n(FMu .ch FO 16i .ch FX 17i .ch FO \\n(.pu-\\n(FMu .ch FX \\n(.pu-\\n(FMu .nr MF 0

.os .ev 1 .nr TC 0 .ns .ev .nr TQ \\n(.i .nr TK \\n(.u . in 0 . nf . TT . in \\n(TQu . if \\n(TK .fi\ \}

#T .. .nr TD 1

.ls 1
.rn KJ KL
.KL
.nr TB 0

.ls

.nr TD 0 .. .nr KM 0 .nr KR \\n(.t .rs .. .lt \\n(LLu .pc % .nr PN \\n% ....if \\n%-1 .tl '\\*(LH'\\*(CH'\\*(RH' .lt \\n(.lu .. . \"FO - footer of page .rn FO FZ .nr FC +1 .nr dn 0 .rn FZ FO .nr MF 0 .nr x 7176u-\\n(.d .nr FC -1 .. . \"2C - begin double column .MC \" default MC is double column .. .nr L1 \\n(LL*7/15 .nr GW 0-1 .nr NQ \\n(LL/\\n(L1 . BG . if n .sp 4 . if t .sp 2\} . RT . if \\n(NX>1 .bp . mk . nr NC 1 . po \\n(POu\} .nr NX \\n(NQ .nr CW \\n(L1 .nr FL \\n(CWu*11u/12u .nr RO \\n(CW+\\n(GW .ns .. .. .po +\\n(ROu .nr NC +1 .nr XX 0 1 .ch FX \\n(.pu-\\n(FMu .ev 1 .nr TC 0 .ev .nr TQ \\n(.i

#T .ns .. .po \\n(POu .nr NC +1 'bp .. . \"1C - return to single column format .MC \\n(LLu .. . \".de R3 . \".pl 102 . \".nr LT \\n(.l . \".. .nr PX \\n(.s .nr PF \\n(.f 'lt \\n(LTu .po \\n(POu .. . \"PP - paragraph .RT .. . \"SH - (unnumbered) section heading .RT .RT .. . \"NH - numbered heading .RT .RT .nr NS \\$1 .nr H\\n(NS +1 \\*(SN .. . \"BG - begin, execute at first PP

.ME .di

0 .nr KI 0 .nr 1T 1 .S\\n(ST

100 \\..

100 \\..

100 \\.. .RA .rn FJ FS .rn FK FE

.ev 1
.vs \\n(.s+2p
.ev
.nr KG 0 

..

1 .nr AJ 1 .RT \\.. .nr AJ 0

\\.. .. . \"IP - indented paragraph .RT .nr TY \\n(TZ-\\n(.i \\$1\t\c\} .. . \"LP - left aligned (block) paragraph .RT .. .RT .nr QP 1 .. . \"IE - synonym for .LP

.. . \"LB - label paragraph .. .RT .nr J\\n(IR \\n(IRu/2u \0\\$1\t\\$2\t\c .. . \"RS - prepare for double indenting .nr IS \\n(IP .RT .nr IP \\n(IS .nr IR +1 .nr I\\n(IR \\n(PIu .nr TY \\n(TZ-\\n(.i .. . \"RE - retreat to the left .nr IS \\n(IP .RT .nr IP \\n(IS .. .nr TZ \\n(.lu ..

.nr TZ 0 .. . \"CM - cut mark .po 0 .lt 7.6i .vs 4p .po .vs .lt .. . \"B - bold font .nr PQ \\n(.f .. . \"R - Roman font .. . \"I - italic font .nr PQ \\n(.f .. . \"TA - tabs set in ens or chars .. . \"SM - make smaller size .. . \"LG - make larger size .. . \"NL - return to normal size .. . \"DA - force date; ND - no date or new date. .. .ME .. .FS .. . \"FS - begin footnote 'ce 0 .di .ev1 .da FF

.nr IF 1 .. . \"FE - footnote end

.nr IF 0 .di .ev .nr YY -\\n(dn .. First page footer.
.ev1

.da FG ..

.di .nr FP \\n(dn .ev ..

.. .FS

.ls 1
.FY
.ls
.FE .. .. .ev1
.ls 1
.FF
.nr XX 0 1

.ls .di

.ev .. .ev1 .nr FL \\$1n .ev .. .. UNIX .. the X operating system ..

..

..

.di BB .nr BC 0 .nr BE 1 ..

.nr BI 1n .di .nr BE 0 .nr BW \\n(dl .nr BH \\n(dn .nr BQ \\n(.j

B .nr BW +2*\\n(BI
\l'\\n(BWu\(ul'\L'-\\n(BHu'\l'|0\(ul'\h'|0'\L'\\n(BHu'

..

Attached:
..
..
..
Z  ------------------- VARIABLES ------------------------------
\na - Current chapter
\nb - Current section
\nc - Current subsection
\nd - Set to 0 initially, 1 by PT, 2 by .PB Used to control running head
\ne - Current equation number
\ng - Used to count items in numbered lists
\nh - Counts number of times CP has been invoked
\nj - Set to 1 iff footer page number needed
\nk - Last figure number used
\nL - 1 if depth printed for each page
\nl - 1 old Agfa length to be used
\np - Numbers end-of-chapter problems
\nq - 1 for double spaced text, smaller vert. margins
\ns - initial page number
\nt - Variable part of spacing inside .BI macro
\nv - Scratch register in lower case roman numerals
\nx - Scratch register
------------------- GENERAL PARAMETERS ---------------------
.nr BO 43 \" number of lines of text per page .nr PO 1.3i .po \n(PO .nr LL 5.67i .nr PL 29.73c .nr PI 0.25i\} .nr LL 80m .nr PL 11.0i .nr PI 3m\} .nr HM (\n(PLu-(\n(BOu*\n(VSu))/2u .nr FM \n(PLu-(\n(HMu+((\n(BOu-1u)*\n(VSu)+1u) .nr xx \n(HMu%\n(VZu .nr HM \n(HMu-\n(xxu .nr FM \n(FMu+\n(xxu .nr t 0 0 ------------------- INITIALIZATION -------------------------
.nr d 0 0 .nr e 0 1 .nr h 0 1 .nr j 1 0 .nr t 0 0 .tr ~ .ND \"suppress date on bottom of page .af v i \"register v is in lower case roman .ch FO -\n(FMu .ch BT -\n(FMu+0.5P ------------------- ALIGN TEXT TO A WHOLE NUMBER OF PICAS ----
'nr xx \\n(.du%\\n(VZu 'nr xy \\n(VZu-\\n(xx 'if \\n(xy=\\n(VZu .nr xy 0 'sp \\n(xyu .. ------------------- DIVISION OF TEXT INTO LOGICAL UNITS ----
Define chapter number
.nr H1 \\$1 0 .nr H2 0 1 .nr a \\$1 0 .nr b 0 1 .nr c 0 1 .nr d 1 1 .nr e 0 1 .nr k 0 1 .nr s \\n% .nr LT \\n(LLu .lt \\n(LLu .po \n(POu .nr PS \\n(PZ .nr VS \\n(VZu .nr PD 0i .rs .vs 32

1 \\$1 .vs 20

1 \\$2 .vs 12 .R .nr x \\n(.pu/2u .nr h +1 1 .tr _\\(ru .AL .. .. .. Major section (numbered)
.nr b +1 1 .nr c 0 1 \\$1 .. Subsection (numbered)
.nr c +1 1 \\$1 ..

\\$1 .. -------------------- PAGE TRANSITION MACROS USED BY -MS ------
.nr d \\$1 .. .AL .pc %

N \\n% 'sp |\\n(HMu-0.35i
nd = 0 means no running head this time, normal next time
.tl '''' \" no running head on initial page transition .nr j 1 0\}
nd = 1 is normal case: chapter heading even (left) and section odd(right)

nd = 2 is for PROBLEMS; even normal, odd CHAP. ... PROBLEMS %

nd = 3 is for index, problem solutions & other cases with same odd even hd

nd = 4 is like nd = 3, except page numbers are lower case roman
.nr v \\n%
nd = 5 suppresses running heads like nd=0, only it keeps them suppressed
nd = 6 gives page number in right-hand corner only
.. .nr x \\n(HMu+(\\n(BO*\\n(VSu)+2P 'sp |\\nxu .nr v \\n% .nr j 0 0 .. --------------- CHECK FOR INITIAL PAGE NUMBER ---------------
.tm You forgot to set the page number. Run aborted. Use troff -n .ex\} .tm You forgot to set the page number. Run aborted. Use troff -n .ex\} .. -------------------- LISTS OF THINGS ------------------------
Start list
.nr g 0 1 .nr LL -0.25i .HS .. End list
.nr LL +0.25i

.. List item
.HS .nr g \\ng+1 1 .. Short unnumbered lines
.HS .. -------------------- END OF CHAPTER EXERCISES ---------------
.nr d 2 0

1 PROBLEMS .nr p 0 1 .. .vs 13 .nr PS 11 .nr VS 13.01p .HS .nr p +1 1 .. .nr PS \\n(PZ .nr VS \\n(VZu .nr a \\$1 1 .nr b 0 0 .nr p 0 1

1 .nr x 1 .. .HS .vs \\n(VSu .nr PS \\n(PZ .nr VS \\n(VZu .nr p +1 1 .. -------------------- BIBLIOGRAPHY ---------------------------
.. .vs 12 .HS .R .. -------------------- QUOTES ---------------------------------
-------------------- FIGS.-----------------------------------
'sp 1v .vs 12 Fig.\|\|\|\\*(CN-\\n+k.~\c .R .. .KF 'sp 1v .nr TP \\n(.s .nr TV \\n(.v .nr TF \\n(.f .nr r 0 0 .FC \\$2 .. .vs \\n(TV 'if \\nr==0 'sp 30u 'AL .KE .. .nr x \\nk+1 .. .. -------------------- MULTIPLE BLANK PAGES -------------------
.KF .KP .KE .MP \\$1-1 \} .. -------------------- TABLE OF CONTENTS ----------------------
.vs 13 .nr a \\$1 0 .nr b 0 1 .nr c 0 1 \\s18\\$1\\s12 \\$2 \\$3\\\s11

.R .. .nr b +1 1 .nr c 0 1 .HS \\na.\\nb \\$1 \\$2 .. .nr c +1 1 \\na.\\nb.\\nc \\$1 \\$2 .. ------------------- INDEX -----------------------------------
.nr PS \\n(PZ-2 .nr VS 12.01p

\s+4\\$1\\s0
..
------------------- NEW .B MACRO ----------------------------
.nr PQ \\n(.f .. --------------------- FIXES NEEDED TO -MS -------------------
Remove .if n .ul 1000 from .NH
Remove .if n .ul 1000 from .SH
Fix to allow letters as chapter "numbers"

Here is the b3mac file
.nr Cs 10 .fp 5 H \\\$1\\\$2 .. .HS ~~~~~\\s\\n(Cs\\f5\\$1\\\s0 .HS

.. ~~~~~\\s\\n(Cs\\f5\\$1\\\s0\\$2 .. \\s\\n(Cs .HS \\f5 .. .HS \ .nr PS \\n(PZ .nr VS \\n(VZ

.. \\$3\s-2\\$1\s+2\\$2 .. \\$3\s-1\\$1\s+1\\$2 .. \\\$1\\\$2 .. \\\$1\\\$2 .. \\\$1\\\$2 .. .nr x \\$1+\\$2 \\$4line .L4 \\nx \\$3 .. .nr x \\$1+\\$2 .nr y \\$1+\\$3 .nr z \\nx+1 \\$5lines .L4 \\nx .L4 \\ny \\$4 .. .. \f5\\$1\\$2 .. \s-2MINIX\s+2\\$1 .. \s-2UNIX\s+2\\$1 .. .tr _\(ru \s-2UNIX\s+2\\$1 .. \f5 .. .HS

"\0\(bu" 4
.. .nr x 0 0 .nr y 0 0 .nr z 0 0 \Command: \\$1\

.. .nr x 1 1

.. .nr y 1 1

..

.nr z 1 1

..

.nr z 1 1

..