From: etheisen Date: Sun, 15 Sep 1996 01:56:29 +0000 (+0000) Subject: Updated mm (mgm) macros X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=19a175a1cb2e352206947c3619e7b8d3c3f8fe66;p=openbsd Updated mm (mgm) macros --- diff --git a/gnu/usr.bin/groff/mm/ChangeLog b/gnu/usr.bin/groff/mm/ChangeLog index 481d1fd9001..c71b8584e04 100644 --- a/gnu/usr.bin/groff/mm/ChangeLog +++ b/gnu/usr.bin/groff/mm/ChangeLog @@ -1,3 +1,21 @@ +Wed May 15 07:39:32 1996 Jörgen Hägg (jh at axis.se) + + * version 1.29 + * Syntax and scaling errror fixed, (thanks to Frazer Williams) + * DF/DE will now do a line-break before printing the display. + * Updated the manual for TB,FG,EX and EC. + * Added support for the ms- (and mgs-)macro .IX + * Added indexmacro IX, INITI, IND and INDP, support for + TXIND, TYIND and TZIND. + * PGFORM will now always really reset to the default + values for unspecified arguments. + * Floating displays tested and repaired, it should + now (finanlly) work exactly as the original (I hope :-). + * Should now set year correctly even after 2000. + * Stupid bug in PGNH fixed. + * Corrected line length for figure caption (FG and friends) + + Mon Apr 24 07:37:52 1995 Jörgen Hägg (jh at axis.se) * version 1.28 diff --git a/gnu/usr.bin/groff/mm/Makefile.sim b/gnu/usr.bin/groff/mm/Makefile.sim index 6941294aba2..1722ec91543 100644 --- a/gnu/usr.bin/groff/mm/Makefile.sim +++ b/gnu/usr.bin/groff/mm/Makefile.sim @@ -1,5 +1,5 @@ # -# $Id: Makefile.sim,v 1.1.1.1 1996/09/15 01:48:06 etheisen Exp $ +# $Id: Makefile.sim,v 1.1.1.2 1996/09/15 01:56:32 etheisen Exp $ # # To install mgm separately as tmac.gm: # make -f Makefile.sub tmacdir=/usr/local/lib/groff/tmac srcdir=. \ @@ -21,8 +21,8 @@ install = install -m 644 # Do not change anything below this line srcdir = . -version = 1.28 -mdate = 1996-05-15 +version = 1.29 +mdate = 1996-09-06 .SUFFIXES: .n .man diff --git a/gnu/usr.bin/groff/mm/Makefile.sub b/gnu/usr.bin/groff/mm/Makefile.sub index f3b555092d6..ef3cda2926e 100644 --- a/gnu/usr.bin/groff/mm/Makefile.sub +++ b/gnu/usr.bin/groff/mm/Makefile.sub @@ -1,5 +1,5 @@ # -# $Id: Makefile.sub,v 1.1.1.2 1996/09/15 01:48:06 etheisen Exp $ +# $Id: Makefile.sub,v 1.1.1.3 1996/09/15 01:56:32 etheisen Exp $ # MAN7=groff_mm.n groff_mmse.n FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov diff --git a/gnu/usr.bin/groff/mm/groff_mm.man b/gnu/usr.bin/groff/mm/groff_mm.man index 676330b14b8..9ed3c4e8910 100644 --- a/gnu/usr.bin/groff/mm/groff_mm.man +++ b/gnu/usr.bin/groff/mm/groff_mm.man @@ -1,5 +1,5 @@ .\" -.\" $Id: groff_mm.man,v 1.1.1.2 1996/09/15 01:48:07 etheisen Exp $ +.\" $Id: groff_mm.man,v 1.1.1.3 1996/09/15 01:56:33 etheisen Exp $ .\" .de T2 .ne 2v @@ -41,13 +41,6 @@ groff mm does not support cut marks \fBm@TMAC_M@\fP is intended to be international. Therefore it is possible to write short national macrofiles which change all english text to the preferred language. Use \fBm@TMAC_M@se\fP as an example. -.LP -New macros: \fBAPP\fP, \fBAPPSK\fP, \fBB1\fP, \fBB2\fP, \fBBVL\fP, -\fBCOVER\fP, \fBCOVEND\fP, \fBGETHN\fP, \fBGETPN\fP, \fBGETR\fP, -\fBGETST\fP, \fBINITR\fP, \fBMC\fP, \fBMOVE\fP, \fBMULB\fP, -\fBMULN\fP, \fBMULE\fP, \fBPGFORM\fP, \fBPGNH\fP, \fBSETR\fP, -\fBTAB\fP, \fBVERBON\fP, \fBVERBOFF\fP. -.LP .\"######################################################################## .LP A file called \fBlocale\fP or \fIlang\fP\fB_locale\fP is read @@ -395,12 +388,19 @@ change the numbering. It is possible to use \fB.af\fP to change the format of the number. If number register \fBOf\fP is 1, then the format of title will use a dash instead of a dot after the number. +.br The string \fBLe\fP controls the title of the List of Equations, default is \fILIST OF EQUATIONS\fP. +The List of Equations will only be printed if number register \fBLe\fP +is 1, default 0. The string \fBLiec\fP contains the word \fIEquation\fP, wich is printed before the number. -If \fIrefname\fP is used, then the equationnumber is saved with +If \fIrefname\fP is used, then the equation number is saved with \&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBEC\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. .TP .B "EF [arg]" Even-page footer, printed just above the normal page footer @@ -439,14 +439,20 @@ number register \fBEq\fP is 1. Then the label will appear at the left margin. .TP .B "EX [title [override [flag [refname]]]]" -Exhibit title, arguments are the same as for \fBEC\fP +Exhibit title, arguments are the same as for \fBEC\fP. \fBEX\fP uses the number register \fBEx\fP as counter. The string \fBLx\fP controls the title of the List of Exhibits, default is \fILIST OF EXHIBITS\fP. +The List of Exhibits will only be printed if number register \fBLx\fP +is 1, default 1. The string \fBLiex\fP contains the word \fIExhibit\fP, wich is printed before the number. -If \fIrefname\fP is used, then the exhibitnumber is saved with +If \fIrefname\fP is used, then the exhibit number is saved with \&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBEX\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. .TP .B "FC [closing]" Prints \fIYours\ very\ truly,\fP as a formal closing of a letter or @@ -485,9 +491,20 @@ Default for m@TMAC_M@m is 10. Footnote end. .TP .B "FG [title [override [flag [refname]]]]" -Figure title. -If \fIrefname\fP is used, then the figurenumber is saved with +Figure title, arguments are the same as for \fBEC\fP. +\fBFG\fP uses the number register \fBFg\fP as counter. +The string \fBLf\fP controls the title of the +List of Figures, default is \fILIST OF FIGURES\fP. +The List of Figures will only be printed if number register \fBLf\fP +is 1, default 1. +The string \fBLifg\fP contains the word \fIFigure\fP, wich +is printed before the number. +If \fIrefname\fP is used, then the figure number is saved with \&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +.br +Special handling of the title will occur if +\fBFG\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. .TP .B "FS [label]" Footnote start. @@ -737,6 +754,52 @@ See \fBI\fP. .TP .B IE Ends the address-specification after \fPIA\fP. +.TP +.B "INITI filename [type]" +Initialize the new index system, sets the filename to collect +index lines in with \fBIND\fP. Argument \fItype\fP selects +teh type of index, page number, header marks or both. +The default is \fIN\fP. +.sp +\fBtype\fP +.in +.5i +.T2 N +Page numbers +.T2 H +Header marks +.T2 B +Both page numbers and header marks, tab separated +.in +.TP +.B "IND arg1 [arg2 [...]]" +\fBIND\fP writes a line in the index file selected by \fBINITI\fP +with all arguments and the page number or header mark separated by tabs. +.in +.5i +\fBExamples\fP +.br +arg1\etpage number +.br +arg1\etarg2\etpage number +.br +arg1\etheader mark +.br +arg1\etpage number\etheader mark +.in +.TP +.B "INDP" +\fBINDP\fP prints the index by running the command specified +by string variable \fBIndcmd\fP, normally \fIsort\ -t\et\fP. +\fBINDP\fP reads the output from the command to form +the index, normally in two columns (can be changed by defining \fBTYIND\fP). +The index is printed with string variable \fBIndex\fP as header, +default is \fBINDEX\fP. One-column processing is +returned after the list. \fBINDP\fP will call the +user-defined macros \fBTXIND\fP, \fBTYIND\fP and \fBTZIND\fP if defined. +\fBTXIND\fP is called before printing \fBINDEX\fP, \fBTYIND\fP +is called instead of printing \fBINDEX\fP. \fBTZIND\fP is called +after the printing and should take care of restoring to normal +operation again. + .TP .B "INITR filename" Initialize the refencemacros. References will be written to @@ -1207,9 +1270,18 @@ to avoid this. reset tabs to every 5n. Normally used to reset any previous tabpositions. .TP .B "TB [title [override [flag [refname]]]]" -Table title. -If \fIrefname\fP is used, then the tablenumber is saved with -\&\fB.SETR\fP, and can be retrieved with \fB.GETST\fP \fIrefname\fP. +Table title, arguments are the same as for \fBEC\fP. +\fBTB\fP uses the number register \fBTb\fP as counter. +The string \fBLt\fP controls the title of the +List of Tables, default is \fILIST OF TABLES\fP. +The List of Tables will only be printed if number register \fBLt\fP +is 1, default 1. +The string \fBLitb\fP contains the word \fITABLE\fP, wich +is printed before the number. +.br +Special handling of the title will occur if +\fBTB\fP is used inside \fBDS\fP/\fBDE\fP, it will not be +affected by the format of \fBDS\fP. .TP .B "TC [slevel [spacing [tlevel [tab [h1 [h2 [h3 [h4 [h5]]]]]]]]]" Table of contents. @@ -1235,7 +1307,7 @@ of \fICONTENTS\fP, and \fBTY\fP is called instead of printing \fICONTENTS\fP. .sp Equivalent macros can be defined for list of figures, tables, equations and excibits by defining \fBTXxx\fP or \fBTYxx\fP, where \fBxx\fP -is \fFg\fP, \fBTB\fP, \fBEC\fP or \fBEX\fP. +is \fBFg\fP, \fBTB\fP, \fBEC\fP or \fBEX\fP. .sp String \fBCi\fP can be set to control the indentations for each heading-level. It must be scaled, like \fB.ds\ Ci\ .25i\ .5i\ .75i\ 1i\ 1i\fP. @@ -1383,6 +1455,12 @@ Nonnumeric fontnames may also be used. Pointsize list for headings. Normally "0 0 0 0 0 0 0" which is the same as "10 10 10 10 10 10 10". .TP +.B Index +.TP +Contains \fIINDEX\fP. +.B Indcmd +.TP +Contains the index command, \fIsort\ -t\et\fP. .B Lifg String containing \fIFigure\fP. .TP diff --git a/gnu/usr.bin/groff/mm/groff_mmse.man b/gnu/usr.bin/groff/mm/groff_mmse.man index 45f4e300302..6fecde69f25 100644 --- a/gnu/usr.bin/groff/mm/groff_mmse.man +++ b/gnu/usr.bin/groff/mm/groff_mmse.man @@ -1,5 +1,5 @@ .\" -.\" $Id: groff_mmse.man,v 1.1.1.2 1996/09/15 01:48:07 etheisen Exp $ +.\" $Id: groff_mmse.man,v 1.1.1.3 1996/09/15 01:56:33 etheisen Exp $ .\" Skrivet av Jörgen Hägg, Lund, Sverige .\" .TH GROFF_MMSE @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@" diff --git a/gnu/usr.bin/groff/mm/mm/0.MT b/gnu/usr.bin/groff/mm/mm/0.MT index d456671d6b2..853fc268c67 100644 --- a/gnu/usr.bin/groff/mm/mm/0.MT +++ b/gnu/usr.bin/groff/mm/mm/0.MT @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: 0.MT,v 1.1.1.2 1996/09/15 01:48:08 etheisen Exp $ +.\" $Id: 0.MT,v 1.1.1.3 1996/09/15 01:56:34 etheisen Exp $ .\" Cover sheet. Memorandum type 0-3 and "string". .\"------------ .if !r Au .nr Au 1 diff --git a/gnu/usr.bin/groff/mm/mm/4.MT b/gnu/usr.bin/groff/mm/mm/4.MT index f353d73a247..4e7504b95bf 100644 --- a/gnu/usr.bin/groff/mm/mm/4.MT +++ b/gnu/usr.bin/groff/mm/mm/4.MT @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: 4.MT,v 1.1.1.2 1996/09/15 01:48:08 etheisen Exp $ +.\" $Id: 4.MT,v 1.1.1.3 1996/09/15 01:56:34 etheisen Exp $ .\" Cover sheet. Memorandum type 4 .\"------------ .de cov@print-title diff --git a/gnu/usr.bin/groff/mm/mm/5.MT b/gnu/usr.bin/groff/mm/mm/5.MT index 39881a30e27..7c701961a2e 100644 --- a/gnu/usr.bin/groff/mm/mm/5.MT +++ b/gnu/usr.bin/groff/mm/mm/5.MT @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: 5.MT,v 1.1.1.2 1996/09/15 01:48:09 etheisen Exp $ +.\" $Id: 5.MT,v 1.1.1.3 1996/09/15 01:56:35 etheisen Exp $ .\" Cover sheet. Memorandum type 5 .\"------------ .nr cov*mt0-ind 1.1c diff --git a/gnu/usr.bin/groff/mm/mm/ms.cov b/gnu/usr.bin/groff/mm/mm/ms.cov index 962b185e3f0..edfe8d54f8a 100644 --- a/gnu/usr.bin/groff/mm/mm/ms.cov +++ b/gnu/usr.bin/groff/mm/mm/ms.cov @@ -1,5 +1,5 @@ .\"------------ -.\" $Id: ms.cov,v 1.1.1.2 1996/09/15 01:48:09 etheisen Exp $ +.\" $Id: ms.cov,v 1.1.1.3 1996/09/15 01:56:35 etheisen Exp $ .\" Cover sheet. Mostly like ms cover. .\"------------ .de cov@print-title diff --git a/gnu/usr.bin/groff/mm/mm/se_ms.cov b/gnu/usr.bin/groff/mm/mm/se_ms.cov index 3375c5f59e6..545be6dbfa4 100644 --- a/gnu/usr.bin/groff/mm/mm/se_ms.cov +++ b/gnu/usr.bin/groff/mm/mm/se_ms.cov @@ -1,3 +1,3 @@ -.\" $Id: se_ms.cov,v 1.1.1.2 1996/09/15 01:48:10 etheisen Exp $ +.\" $Id: se_ms.cov,v 1.1.1.3 1996/09/15 01:56:36 etheisen Exp $ .mso mm/ms.cov .nr cur*abstract-ll 11c diff --git a/gnu/usr.bin/groff/mm/tmac.m b/gnu/usr.bin/groff/mm/tmac.m index 0814d382378..7166881d7c6 100644 --- a/gnu/usr.bin/groff/mm/tmac.m +++ b/gnu/usr.bin/groff/mm/tmac.m @@ -3,11 +3,11 @@ .ds RE \\$2 .. .\" -.\" $Id: tmac.m,v 1.1.1.2 1996/09/15 01:48:05 etheisen Exp $ -.@revision $Revision: 1.1.1.2 $ +.\" $Id: tmac.m,v 1.1.1.3 1996/09/15 01:56:30 etheisen Exp $ +.@revision $Revision: 1.1.1.3 $ .ig -Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. mgm is written by Jörgen Hägg mgm is free software; you can redistribute it and/or modify it under @@ -154,27 +154,28 @@ Index array!index .\" .\" Current pointsize and vertical space, always in points. .ie r S \{\ -. ps (p;\n[S]) -. vs (p;\n[S]+2) +. ps (u;\n[S]) +. vs (u;\n[S]+2p) .\} .el \{\ -. ps (p;10) +. ps 10 . vs 12p .\} .nr @ps \n[.ps] .nr @vs \n[.v] +.if \n[D]>1 .tm @ps=\n[@ps], @vs=\n[@vs] .\" .\" Page length -.ie r L \{\ -. ie n .pl (v;\n[L]) -. el .pl \n[L] +.if r L \{\ +. ie n .pl \n[L]u +. el .pl \n[L]u .\} .nr @pl \n[.p] .\" .\" page width .ie r W \{\ -. ie n .ll (n;\n[W]) -. el .ll \n[W] +. ie n .ll \n[W]u +. el .ll \n[W]u .\} .el .ll 6i .nr @ll \n[.l] @@ -209,6 +210,11 @@ Index array!index .nr Hps2 1v .if n .nr Hps2 2v .\" +.\" header text for the index +.ds Index INDEX +.\" command to sort the index +.ds Indcmd sort +.\" .\" flag for mkindex .if !r Idxf .nr Idxf 0 .\" Change these in the national configuration file @@ -223,7 +229,7 @@ Index array!index .\" .\" Lsp controls the height of an empty line. Normally 0.5v .\" Normally used for nroff compatibility. -.nr Lsp 0.5v +.nr Lsp 0.25v .if n .nr Lsp 1v .ds MO1 January .ds MO2 February @@ -376,12 +382,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de P .\" skip P if previous heading .ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* . if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c .\} .el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* . if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c .\} @@ -391,12 +397,12 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de nP .\" skip P if previous heading .ie !((\\n[nl]=\\n[hd*last-pos]):(\\n[nl]=(\\n[hd*last-pos]-.5v))) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* \\n[H2].\\n+[par*number2]\ \ \c .\} .el .if !(\\n[hd*last-hpos]=\\n[.k]) \{\ -. if \\n[D]>2 .tm Paragraph +. if \\n[D]>2 .tm Paragraph nl=\\n[nl] . par@doit \\$* \\n[H2].\\n+[par*number2]\ \ \c .\} @@ -499,22 +505,28 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" Hope this doesn't break anything else :-) .\" Don't break if arg_4 is a '1'. .if ''\\$4' .br -.if !''\\$1' \{\ +.ie !''\\$1' \{\ . ll \\$1 . nr @ll \n[.l] . nr @cur-ll \\n[@ll] . lt \\n[@ll]u .\} +.el \{\ +. ll \\n[@ll]u +. lt \\n[@ll]u +.\} .\" -.if !''\\$2' \{\ +.ie !''\\$2' \{\ . pl \\$2 . nr @pl \n[.p] .\} +.el .pl \\n[@pl]u .\" -.if !''\\$3' \{\ +.ie !''\\$3' \{\ . po \\$3 . nr @po \n[.o] .\} +.el .po \\n[@po]u 'in 0 .pg@move-trap .. @@ -570,8 +582,9 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if !'\\*[misc*a]'C' \{\ . ie '\\*[misc*a]'P' .ps \\n[misc*S-ps]u . el \{\ -. ie '\\*[misc*a]'D' .ps 10p -. el .ps (p;\\*[misc*a]) +. ie '\\*[misc*a]'D' .ps 10 +. el .ps \\*[misc*a] +. if \\n[D]>2 .tm S: .ps \\*[misc*a] . \} .\} .\" @@ -580,13 +593,14 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . ie '\\*[misc*b]'P' .vs \\n[misc*S-vs]u . el \{\ . ie '\\*[misc*b]'D' .vs \\n[@ps]u+2p -. el .vs (p;\\*[misc*b]) +. el .vs \\*[misc*b] +. if \\n[D]>2 .tm S: .ps \\*[misc*b] . \} .\} .nr @ps \\n[.ps] .nr @vs \\n[.v] .\" -.if \\n[D]>1 .tm S[\\n[.c]]: point-size \\n[@ps]u, vertical spacing \\n[@vs]u +.if \\n[D]>1 .tm S(\\$*): ma:\\*[misc*a], mb:\\*[misc*b] => ps:\\n[@ps]u, vs:\\n[@vs]u .nr misc*S-ps \\n[misc*S-ps1] .nr misc*S-vs \\n[misc*S-vs1] .nr misc*S-ps1 \\n[@ps] @@ -944,7 +958,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .. .\" no header on the next page .de PGNH -.nr pg*top-enabled -1 +.nr pg*top-enabled (-1) .. .\" set first trap for pagefooter .pg@enable-top-trap @@ -1579,6 +1593,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\"------------- .\" called by end-of-text .de df@eot-print +.br .if \\n[df*o-fnr]<=\\n[df*fnr] \{\ . if \\n[D]>2 .tm Print remaining displays. .\" still some floats left, make non-empty environment @@ -1603,16 +1618,34 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .if !\\n[ds*float-busy] \{\ . nr ds*float-busy 1 .\" at .DE -. if (\\$1=1)&((\\n[Df]%2)=1) \{\ +. if \\n[D]>3 .tm print-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] +. \" Df = 1 or 5 +. if (\\$1=1)&((\\n[Df]=1):(\\n[Df]=5)) \{\ . if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\ -. \" Df = 1,3 or 5 +. \" Print only new displays. +. if \\n[df*o-fnr]=\\n[df*fnr] \{\ +. br +. ds@print-one-float +. \} +. \} +. \} +. \" Df = 3 +. if (\\$1=1)&(\\n[Df]=3) \{\ +. if \\n[.t]>\\n[df*height!\\n[df*o-fnr]] \{\ +. br . ds@print-one-float . \} . \} .\" print all if Df<2 and end of section -. if (\\$1=2)&(\\n[Df]<2) .ds@print-all-floats +. if (\\$1=2)&(\\n[Sectp]>0)&(\\n[Df]<2) \{\ +. br +. ds@print-all-floats +. \} .\" print all if end of document. Where should they go instead? -. if \\$1=3 .ds@print-all-floats +. if \\$1=3 \{\ +. br +. ds@print-all-floats +.\} .\" new page . if (\\$1=4)&(\\n[Df]>1) \{\ . if \\n[Df]=2 .ds@print-one-float @@ -1655,6 +1688,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" print one floating display if there is one. .de ds@print-one-float .if \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-one-float: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page . ds@output-div . if \\n[De] .pg@next-page @@ -1665,7 +1699,10 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" if De>0 do a page eject between the floats. .de ds@print-all-floats .while \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-all-floats: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .pg@next-page +. br +\c . ds@output-div . if \\n[De] .pg@next-page .\} @@ -1674,6 +1711,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" print as many floats as will fit on the current page .de ds@print-this-page .while \\n[df*o-fnr]<=\\n[df*fnr] \{\ +. if \\n[D]>3 .tm print-this-page: .t=\\n[.t], h=\\n[df*height!\\n[df*o-fnr]] . if \\n[.t]<\\n[df*height!\\n[df*o-fnr]] .break . ds@output-div .\} @@ -2194,7 +2232,6 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .\" level mark text pagenumber .de toc@set .if \\$1<=\\n[toc*slevel] .SP \\n[toc*spacing]u -.ne 2v .na .fi .nr toc*ind 0 @@ -2215,6 +2252,7 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .nr toc*i \\n[toc*hl!\\$1]-\w@\\$2@ .\" .ll \\n[@ll]u-\w@\\$4@u-2m +.ne 2v .\" ragged right --------------------------------- .ie \\$1>\\n[toc*tlevel] \{\ \\$2 @@ -2322,14 +2360,18 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] \!.el .ds lix*pgnr \\\\n[%] \!.SP \\\\n[Lsp]u \!.misc@ev-keep lix +\!.ll \\n[.l]u \!.init@reset -\!.br +\!.fi \!.ie (\w@\\$1\\$2@)>(\\\\n[.l]-\\\\n[.i]) \{\ . in +\w@\\$1@u \!. ti 0 +\!\fB\\$1\fP\\$2 \!.\} -\!.el .ce 1 +\!.el \{\ +. ce 1 \!\fB\\$1\fP\\$2 +\!.\} \!.br \!.ev .\" save line for LIST OF XXX, wth is the width of the lable @@ -2692,8 +2734,8 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] .de AE .. .\" I am planning to use mgm some time :-) -.ie \\n[yr]<50 .ds cov*new-date \\*[MO\\n[mo]] \\n[dy], 20\\n[yr] -.el .ds cov*new-date \\*[MO\\n[mo]] \\n[dy], 19\\n[yr] +.nr cov*year 1900+\n[yr] +.ds cov*new-date \*[MO\n[mo]] \n[dy], \n[cov*year] .als DT cov*new-date .de ND .ds cov*new-date \\$1 @@ -2855,6 +2897,65 @@ in=\\n[.i] fi=\\n[.u] .d=\\n[.d] nl=\\n[nl] pg=\\n[%] . \} .\} .. +.\"########################### module ind ############################ +.\" Support for mgs-style indexing, borrowed from mgs. +.de IX +.tm \\$1\t\\$2\t\\$3\t\\$4 ... \\n[%] +.. +.\"-------------------- +.\" Another type of index system +.\" INITI filename [type] +.de INITI +.if \\n[.$]<1 .@error "INITI:filename missing" +.\" ignore if INITI has already been used +.if r ind*pass .@error "INITI:already initialyzed" +.nr ind*pass 1 +.ds ind*file \\$1.ind +.ie \\n[.$]<2 .ds ind*type N +.el .ds ind*type \\$2 +.open ind*stream \\*[ind*file] +.close ind*stream +.. +.\"--------------- +.de IND +.if !r ind*pass .@error "IND: No .INITI in this file" +.if '\\*[ind*type]'N' .ds ind*ref \\n[%] +.if '\\*[ind*type]'H' .ds ind*ref \\*[hd*toc-mark] +.if '\\*[ind*type]'B' .ds ind*ref \\*[hd*toc-mark]\t\\n[%] +.\" +.if \\n[.$] .ds ind*line \\$1 +.while \\n[.$]>0 \{\ +. shift +. as ind*line \t\\$1 +.\} +.as ind*line \\*[ind*ref] +.opena ind*stream \\*[ind*file] +.write ind*stream \\*[ind*line] +.close ind*stream +.. +.\" print index +.de INDP +.\" sort the index +.if !\\n[Cp] .pg@next-page +.\" print INDEX +.\" execute user-defined macros +.if d TXIND .TXIND +.ie d TYIND .TYIND +.el \{\ +. SK +. ce +\\*[Index] +. SP 3 +. 2C +. nf +.\} +.pso \\*[Indcmd] \\*[ind*file] +.ie d TZIND .TZIND +.el \{\ +. fi +. 1C +.\} +.. .\"########################### module let ############################ .\" Letter macros .\"------------------------ diff --git a/gnu/usr.bin/groff/mm/tmac.mse b/gnu/usr.bin/groff/mm/tmac.mse index cef90de8178..e68e73a9665 100644 --- a/gnu/usr.bin/groff/mm/tmac.mse +++ b/gnu/usr.bin/groff/mm/tmac.mse @@ -1,4 +1,4 @@ -.\" $Id: tmac.mse,v 1.1.1.2 1996/09/15 01:48:06 etheisen Exp $ +.\" $Id: tmac.mse,v 1.1.1.3 1996/09/15 01:56:31 etheisen Exp $ .\" .\" swedish version of mm .\" See tmac.m for version-information. @@ -44,7 +44,7 @@ .ds Letns!4 Atts. .ds Letns!5 Enc. .ds Letns!6 Encs. -.ds Letns!7 Under separate cover +.ds Letns!7 Annat försättsblad .ds Letns!8 Brev till .ds Letns!9 Dokument till .ds Letns!10 Kopia (med atts.) till @@ -65,8 +65,8 @@ .ds MO10 oktober .ds MO11 november .ds MO12 december -.ie \\n[yr]<50 .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] 20\\n[yr] -.el .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] 19\\n[yr] +.nr cov*year 1900+\n[yr] +.ds cov*new-date \n[dy] \*[MO\n[mo]] \n[cov*year] .nr pg*footer-size 4\" 1v+footer+even/odd footer+1v .\"------------------------------------------------ .\" Dokumentnamn