diff options
author | wl <wl> | 2008-10-04 21:24:37 +0000 |
---|---|---|
committer | wl <wl> | 2008-10-04 21:24:37 +0000 |
commit | 907c3a48e79ec146a4954c76c453cdbe6625a497 (patch) | |
tree | 8e2125e118713810bedd4bf9cecc072fa76cfa75 | |
parent | 2c4507c31fd3eb50aa2daf0a9e1478c46d0ab774 (diff) | |
download | groff-907c3a48e79ec146a4954c76c453cdbe6625a497.tar.gz |
* tmac/andoc.tmac: Rewritten, based on a preliminary version from
Tadziu Hoffmann. It can now process multiple man pages with both
man and mdoc formats intermixed.
* NEWS, tmaca/groff_man.man, tmac/groff_mdoc.man,
man/groff_tmac.man: Document it.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | man/groff_tmac.man | 20 | ||||
-rw-r--r-- | tmac/an-old.tmac | 4 | ||||
-rw-r--r-- | tmac/andoc.tmac | 83 | ||||
-rw-r--r-- | tmac/groff_man.man | 3 | ||||
-rw-r--r-- | tmac/groff_mdoc.man | 3 |
7 files changed, 111 insertions, 13 deletions
@@ -2,6 +2,15 @@ * tmac/doc-common (doc-operating-system-*): Update releases. + * tmac/an-old.tmac (an-extra1, an-extra2, an-extra3): Initialize. + + * tmac/andoc.tmac: Rewritten, based on a preliminary version from + Tadziu Hoffmann. It can now process multiple man pages with both + man and mdoc formats intermixed. + + * NEWS, tmaca/groff_man.man, tmac/groff_mdoc.man, + man/groff_tmac.man: Document it. + 2008-10-04 Werner LEMBERG <wl@gnu.org> * src/roff/troff/input.cpp (do_suppress): Make \O[3], \O[4], and @@ -163,6 +163,8 @@ o New option `-f NAME' to set the internal name of the groff font. Macro Packages -------------- +o -mandoc now supports multiple man pages (in either man or mdoc format). + o Fabrice Ménard contributed locales support. In particular, it is now possible to get French localization of the main macro packages (-ms, -mm, -me, and -mom, but not -man and -mdoc which are localized differently) by diff --git a/man/groff_tmac.man b/man/groff_tmac.man index a02b0ecf..c2ef5d56 100644 --- a/man/groff_tmac.man +++ b/man/groff_tmac.man @@ -79,6 +79,14 @@ or . .P fails. +Exception to this is the use of man pages written with either the +.B mdoc +or the +.B man +macro package. +See below the description of the +.B andoc.tmac +file. . . .\" -------------------------------------------------------------------- @@ -102,6 +110,18 @@ man\~pages; see .BR groff_mdoc (@MAN7EXT@). . . +.TP +.B andoc +.TQ +.B mandoc +Use this file in case you don't know whether the +.B man +macros or the +.B mdoc +package should be used. +Multiple man pages (in either format) can be handled. +. +. .\" -------------------------------------------------------------------- .SS "Full Packages" .\" -------------------------------------------------------------------- diff --git a/tmac/an-old.tmac b/tmac/an-old.tmac index 536094c2..c686731f 100644 --- a/tmac/an-old.tmac +++ b/tmac/an-old.tmac @@ -127,6 +127,10 @@ . nr an-margin \\n[IN] .. . +.ds an-extra1 +.ds an-extra2 +.ds an-extra3 +. .\" .TH title section extra1 extra2 extra3 .de1 TH . if \\n[an-html] \{\ diff --git a/tmac/andoc.tmac b/tmac/andoc.tmac index bfb869ab..5b938b42 100644 --- a/tmac/andoc.tmac +++ b/tmac/andoc.tmac @@ -1,19 +1,80 @@ .\" andoc.tmac .\" -.\" Load either an-old.tmac or doc.tmac. -.if !\n(.g .ab These macros require groff. -.de Dd -.rm Dd -.do mso doc.tmac -\\*(Dd\\ +.\" Load either an-old.tmac or doc.tmac. Multiple man pages can be +.\" handled. +.\" +.\" +.\" Copyright (C) 1991, 1995, 2000, 2002, 2008 +.\" Free Software Foundation, Inc. +.\" Written by James Clark (jjc@jclark.com) +.\" +.\" This file is part of groff. +.\" +.\" groff is free software; you can redistribute it and/or modify it under +.\" the terms of the GNU General Public License as published by the Free +.\" Software Foundation; either version 2, or (at your option) any later +.\" version. +.\" +.\" groff is distributed in the hope that it will be useful, but WITHOUT ANY +.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or +.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +.\" for more details. +.\" +.\" You should have received a copy of the GNU General Public License along +.\" with groff; see the file COPYING. If not, write to the Free Software +.\" Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. +.\" +. +.if !\n(.g \ +. ab These macros require groff. +. +.nr _C \n(.C +.cp 0 +. +.als andoc-em em +.als andoc-bp bp +. +.de1 reload-doc +. ch an-header \" remove trap set by an-old.tmac +. ch an-footer \" remove trap set by an-old.tmac +. ch an-p-footer \" remove trap set by an-old.tmac +. +. als em andoc-em +. als bp andoc-bp +. rm Dd \" disable load-only-once, see doc.tmac +. +. mso doc.tmac +. +. ds str-dfp NAME\" this triggers setup-header +. als TH reload-man +\\*[Dd]\\ .. -.de TH -.rm TH -.do mso an-old.tmac -\\*(TH\\ +. +.de1 reload-man +. ch header \" remove trap set by doc.tmac +. ch footer \" remove trap set by doc.tmac +. +. als em andoc-em +. als bp andoc-bp +. rm RI \" disable load-only-once, see an-old.tmac +. blm \" no blank line macro +. rm TH +. +. mso an-old.tmac +. +. als Dd reload-doc +\\*[TH]\\ .. -.\" dummy equation macros -- eqnrc is read before .TH or .Dd is parsed. +. +.als TH reload-man +.als Dd reload-doc +. +.\" dummy equation macros -- eqnrc is read before .TH or .Dd is parsed .de EQ .. .de EN .. +. +.cp \n[_C] +. +.\" end of andoc.tmac diff --git a/tmac/groff_man.man b/tmac/groff_man.man index fee8a48e..c3892102 100644 --- a/tmac/groff_man.man +++ b/tmac/groff_man.man @@ -1068,11 +1068,12 @@ These are wrapper files to call . .TP .B andoc.tmac -This file checks whether the +Use this file in case you don't know whether the .B man macros or the .B mdoc package should be used. +Multiple man pages (in either format) can be handled. . .TP .B an-old.tmac diff --git a/tmac/groff_mdoc.man b/tmac/groff_mdoc.man index 50ca686f..3812c335 100644 --- a/tmac/groff_mdoc.man +++ b/tmac/groff_mdoc.man @@ -4088,11 +4088,12 @@ Definitions used for all other devices. .It Pa mdoc.local Local additions and customizations. .It Pa andoc.tmac -This file checks whether the +Use this file if you don't know whether the .Nm \-mdoc or the .Nm \-man package should be used. +Multiple man pages (in either format) can be handled. .El . . |