summaryrefslogtreecommitdiff
path: root/tmac/andoc.tmac
diff options
context:
space:
mode:
authorwl <wl>2008-10-04 21:24:37 +0000
committerwl <wl>2008-10-04 21:24:37 +0000
commit907c3a48e79ec146a4954c76c453cdbe6625a497 (patch)
tree8e2125e118713810bedd4bf9cecc072fa76cfa75 /tmac/andoc.tmac
parent2c4507c31fd3eb50aa2daf0a9e1478c46d0ab774 (diff)
downloadgroff-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.
Diffstat (limited to 'tmac/andoc.tmac')
-rw-r--r--tmac/andoc.tmac83
1 files changed, 72 insertions, 11 deletions
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