From 5ccf2ba25e5128fbef94c2515e292c567f0048f2 Mon Sep 17 00:00:00 2001 From: wl Date: Sat, 23 Jan 2010 07:47:39 +0000 Subject: Break out example formatting to a separate file. * hdmisc.tmac: Move example formatting stuff to... * examples/common.roff: This new file. * hdtbl.tmac (HM, t*HM, BM, t*BM): Remove. * examples/*.roff: Include `common.roff'. * groff_hdtbl.man: Remove references to `HM' and `BM'. * Makefile.sub: Handle `examples/common.roff'. --- contrib/hdtbl/ChangeLog | 17 +- contrib/hdtbl/Makefile.sub | 5 +- contrib/hdtbl/examples/chess_board.roff | 3 +- contrib/hdtbl/examples/col_rowspan_colors.roff | 3 +- contrib/hdtbl/examples/color_boxes.roff | 3 +- contrib/hdtbl/examples/color_nested_tables.roff | 3 +- contrib/hdtbl/examples/color_table_cells.roff | 3 +- contrib/hdtbl/examples/color_transitions.roff | 3 +- contrib/hdtbl/examples/common.roff | 341 ++++++++++++++++++++++++ contrib/hdtbl/examples/mixed_pickles.roff | 3 +- contrib/hdtbl/examples/rainbow.roff | 3 +- contrib/hdtbl/examples/short_reference.roff | 3 +- contrib/hdtbl/groff_hdtbl.man | 13 - contrib/hdtbl/hdmisc.tmac | 317 +--------------------- contrib/hdtbl/hdtbl.tmac | 17 +- 15 files changed, 382 insertions(+), 355 deletions(-) create mode 100644 contrib/hdtbl/examples/common.roff diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog index 5323d504..139a0dee 100644 --- a/contrib/hdtbl/ChangeLog +++ b/contrib/hdtbl/ChangeLog @@ -1,3 +1,18 @@ +2010-01-23 Larry Kollar + + Break out example formatting to a separate file. + + * hdmisc.tmac: Move example formatting stuff to... + * examples/common.roff: This new file. + + * hdtbl.tmac (HM, t*HM, BM, t*BM): Remove. + + * examples/*.roff: Include `common.roff'. + + * groff_hdtbl.man: Remove references to `HM' and `BM'. + + * Makefile.sub: Handle `examples/common.roff'. + 2009-04-05 Joachim Walsdorff * hdtbl.tmac (ETB, t*free): Correct two typos, fixing register @@ -205,7 +220,7 @@ * Import of hdtbl 0.91 (with some further modifications). Still many rough edges. -Copyright 2006, 2008, 2009 +Copyright 2006, 2008, 2009, 2010 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff --git a/contrib/hdtbl/Makefile.sub b/contrib/hdtbl/Makefile.sub index 314552c8..d8f32326 100644 --- a/contrib/hdtbl/Makefile.sub +++ b/contrib/hdtbl/Makefile.sub @@ -1,4 +1,4 @@ -# Copyright (C) 2006, 2009 Free Software Foundation, Inc. +# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. # Written by Werner Lemberg (wl@gnu.org) # # This file is part of groff. @@ -84,6 +84,7 @@ MOSTLYCLEANADD=\ $(PROCESSEDEXAMPLEFILES) \ $(GENFILES) \ examples/stamp \ + examples/common.roff \ stamp-strip \ hdmisc.tmac-s hdtbl.tmac-s @@ -98,7 +99,7 @@ MOSTLYCLEANADD=\ all: $(PROCESSEDEXAMPLEFILES) stamp-strip -$(PROCESSEDEXAMPLEFILES): gnu.eps examples/stamp +$(PROCESSEDEXAMPLEFILES): gnu.eps examples/stamp examples/common.roff gnu.eps: if test -f $(top_srcdir)/doc/gnu.eps; then \ diff --git a/contrib/hdtbl/examples/chess_board.roff b/contrib/hdtbl/examples/chess_board.roff index 9274f17f..f5bd0b10 100644 --- a/contrib/hdtbl/examples/chess_board.roff +++ b/contrib/hdtbl/examples/chess_board.roff @@ -5,7 +5,7 @@ chess_board.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .nr *x 8 diff --git a/contrib/hdtbl/examples/col_rowspan_colors.roff b/contrib/hdtbl/examples/col_rowspan_colors.roff index 43aa40ce..5460dbef 100644 --- a/contrib/hdtbl/examples/col_rowspan_colors.roff +++ b/contrib/hdtbl/examples/col_rowspan_colors.roff @@ -5,7 +5,7 @@ col_rowspan_colors.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .de color# diff --git a/contrib/hdtbl/examples/color_boxes.roff b/contrib/hdtbl/examples/color_boxes.roff index 77a158e7..da5b272b 100644 --- a/contrib/hdtbl/examples/color_boxes.roff +++ b/contrib/hdtbl/examples/color_boxes.roff @@ -5,7 +5,7 @@ color_boxes.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .H Horizontal Rules and Boxes .br with Randomly Colored Border and Background diff --git a/contrib/hdtbl/examples/color_nested_tables.roff b/contrib/hdtbl/examples/color_nested_tables.roff index db2f8b54..9e75cf58 100644 --- a/contrib/hdtbl/examples/color_nested_tables.roff +++ b/contrib/hdtbl/examples/color_nested_tables.roff @@ -5,7 +5,7 @@ color_nested_tables.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .PN 15 Text before first table. diff --git a/contrib/hdtbl/examples/color_table_cells.roff b/contrib/hdtbl/examples/color_table_cells.roff index 03c4d70e..7ae35f45 100644 --- a/contrib/hdtbl/examples/color_table_cells.roff +++ b/contrib/hdtbl/examples/color_table_cells.roff @@ -5,7 +5,7 @@ color_table_cells.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .H Horizontal Rules and Randomly Colored Table Cells diff --git a/contrib/hdtbl/examples/color_transitions.roff b/contrib/hdtbl/examples/color_transitions.roff index 9bad1613..43cc5296 100644 --- a/contrib/hdtbl/examples/color_transitions.roff +++ b/contrib/hdtbl/examples/color_transitions.roff @@ -5,7 +5,7 @@ color_transitions.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .de ctab diff --git a/contrib/hdtbl/examples/common.roff b/contrib/hdtbl/examples/common.roff new file mode 100644 index 00000000..e14caeaa --- /dev/null +++ b/contrib/hdtbl/examples/common.roff @@ -0,0 +1,341 @@ +.\" -*- mode: roff -*- +.ig + +common.roff + +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2010 Free Software Foundation, Inc. +written by Joachim Walsdorff . + +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 3 of the License, 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 this program. If not, see . + +.. +. +. +.\" ****************************************************************** +.\" ** Some macros and the page setup used by the examples ** +.\" ****************************************************************** +. +.\" ****************************************************************** +.\" ** some of the following macros use system commands ** +.\" ** and are therefore `unsafe': they need the `-U' argument ** +.\" ** when calling groff/troff ** +.\" ****************************************************************** +. +.\" ****************************************************************** +.\" ** Header macro for the examples ** +.\" ****************************************************************** +.de H +. nr *w* (17 * \w\\$* / 10 + 4n) +. TBL border=1n \ + bc=yellow \ + bgc=red4 \ + fgc=yellow \ + csp=0 \ + fst=TB \ + "fsz=1.7 1.5" \ + hal=c \ + tal=c \ + "width=(\\n[*w*]+4n) 16)) \ +. tm \\n[.F]:\\n[.c]: invalid base `\\$2' +. el \ +. nr b# \\$2 +. \}\} +. el \ +. nr b# 16 +. +. nr xb# 1 +. +. ie (\\n[b#] == 1) \{\ +. nr dec# +1 +. while \\n-[dec#] \ +. as hex# |\" +. \} +. el \{\ +. while (\\n[dec#] - \\n[xb#]) \{\ +. nr xb# (\\n[xb#] * \\n[b#]) +. nr j# +1 +. \} +. +. while (\\n+[i#] < \\n[j#]) \{\ +. nr ** (\\n[dec#] / \\n[xb#]) +. as hex# \\*[d2x-\\n[**]]\" +. nr dec# (\\n[dec#] - (\\n[xb#] * \\n[**])) +. nr xb# (\\n[xb#] / \\n[b#]) +. \} +. \} +. +. \" strip leading zero, if any +. ds * \\*[hex#]\" +. substring * 0 0 +. if "\\*[*]"0" \ +. substring hex# 1 -1 +. +. if (\\$1 < 0) \ +. ds hex# -\\*[hex#]\" +. +. if !"\\$3"" \{\ +. ie !\A\\$3 \ +. tm \\n[.F]:\\n[.c]: invalid string name `\\$3' +. el \ +. ds \\$3 \\*[hex#]\" +. \} +.. +. +. +.\" Utility macro: .random# +.\" .random-seed seed1 seed2 +.\" +.\" Return pseudo-random numbers in the range 0..0xFFFFFF, +.\" represented as the concatenation of `#' and six +.\" hexadecimal digits, in the string `#random'. The +.\" macro `random-seed' can be used to set seed values, +.\" which should be integers in the range 1..2147483562 and +.\" 1..2147483398 for `seed1' and `seed2', respectively +.\" (the macro applies a modulo operation to assure this +.\" range). If `random-seed' isn't called the registers +.\" `seconds', `minutes', `hours', `dy', `mo', `year', and +.\" `$$' are used to compute it. +.\" +.\" The used generator is presented in L'Ecuyer's 1988 paper +.\" `Efficient and Portable Combined Random Number +.\" Generators', which combines two Multiplicative Linear +.\" Congruential Generators (MLCGs) to achieve a period of +.\" 2.3*10^18. +.af hours 00 +.af minutes 00 +.af seconds 00 +.af year 0000 +.af mo 00 +.af dy 00 +. +.ds random-s1 \n[minutes]\n[seconds]\n[$$]\n[hours]\" +.\" prevent overflow +.substring random-s1 0 8 +. +.nr random-s1 (\*[random-s1] % 2147483562) +.nr random-s2 \n[dy]\n[year]\n[mo] +. +. +.de random-seed +. if !(\\n[.$] == 2) \{\ +. tm1 "random-seed: Invalid number of arguments. +. tm1 " usage: `.random-seed seed1 seed2' +. return +. \} +. +. nr random-s1 (\\$1 % 2147483562) +. nr random-s2 (\\$2 % 2147483398) +.. +. +. +.de random# +. nr * (\\n[random-s1] / 53668) +. nr random-s1 (40014 * (\\n[random-s1] - (\\n[*] * 53668)) \ + - (\\n[*] * 12211)) +. if !\\n[random-s1] \ +. nr random-s1 +2147483563 +. +. nr * (\\n[random-s2] / 52774) +. nr random-s2 (40692 * (\\n[random-s2] - (\\n[*] * 52774)) \ + - (\\n[*] * 3791)) +. if !\\n[random-s2] \ +. nr random-s2 +2147483399 +. +. nr * (\\n[random-s1] - \\n[random-s2]) +. if (\\n[*] < 1) \ +. nr * +2147483562 +. +. \" reduce the result to the leftmost 24 bits +. nr * (\\n[*] / 128) +. +. d2x \\n[*] +. ds hex# 000000\\*[hex#]\" +. substring hex# -6 +. ds #random #\\*[hex#]\" +.. +. +. +.\" ****************************************************************** +.\" ** minimal Page setup ** +.\" ****************************************************************** +. +.nr s \n[.ps] +.nr v \n[.v] +.pv 1.2 1.2 "" X +.nr l 6.6i \" set text width +.ll \n[l]u +.nr o 2c \" set offset +.po \n[o]u +.nr p 29.7c \" set paper length (A4) +.pl \n[p]u +.nr tH 1i \" set top margin +.sp |\n[tH]u +. +.ev 99 +.lt \n[l]u +.ev +. +. +.de HM +. sp |.5i \" print header in top margin +. tl \\*[t*HM] +. sp |\\n[tH]u +. ev +.. +. +. +.de BM +. ev 99 +. sp |(\\n[p]u - .5i) \" print footer in bottom margin +. tl \\*[t*BM] +. bp +.. +. +. +.de EM +. rm BM \" no page number at bottom of last page +. +. if !"\\*[t*kept]"" \{\ +. tm1 "hdtbl: Not all tables have been printed. +. tm1 " Add `.bp' at the end of your document. +. \} +. if !"\\*[t*held]"" \{\ +. tm1 "hdtbl: There are held tables which haven't been printed. +. tm1 " Add `.t*free' at the end of your document. +. \} +. if \\n[t*#] \ +. tm hdtbl: Missing `.ETB' macro at end of document. +.. +. +. +.em EM +. +.if "\n[.m]"" \ +. gcolor black +.if "\n[.M]"" \ +. fcolor white +. +.mso hdtbl.tmac\" load table macros +. +.\" EOF diff --git a/contrib/hdtbl/examples/mixed_pickles.roff b/contrib/hdtbl/examples/mixed_pickles.roff index df3d776c..6e0935f2 100644 --- a/contrib/hdtbl/examples/mixed_pickles.roff +++ b/contrib/hdtbl/examples/mixed_pickles.roff @@ -5,7 +5,7 @@ mixed_pickles.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start . diff --git a/contrib/hdtbl/examples/rainbow.roff b/contrib/hdtbl/examples/rainbow.roff index 451efe82..fa23da09 100644 --- a/contrib/hdtbl/examples/rainbow.roff +++ b/contrib/hdtbl/examples/rainbow.roff @@ -5,7 +5,7 @@ rainbow.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start . diff --git a/contrib/hdtbl/examples/short_reference.roff b/contrib/hdtbl/examples/short_reference.roff index 7e18db9d..efc6c7df 100644 --- a/contrib/hdtbl/examples/short_reference.roff +++ b/contrib/hdtbl/examples/short_reference.roff @@ -5,7 +5,7 @@ short_reference.roff This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -22,6 +22,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . .. +.so examples/common.roff . .time start .pv 1.2 1.2 "" x diff --git a/contrib/hdtbl/groff_hdtbl.man b/contrib/hdtbl/groff_hdtbl.man index 3dbfcddd..b47a4f82 100644 --- a/contrib/hdtbl/groff_hdtbl.man +++ b/contrib/hdtbl/groff_hdtbl.man @@ -918,19 +918,6 @@ if you use the .B ms macro package. . -.PP -.B hdtbl -has built-in page header and page footer macros, -.B HM -and -.BR BM . -If they interfere with your own header and footer macros, simply -say -.CR ".rm\ HM" -and -.CR ".rm\ BM" -to remove them. -. . .SH AUTHOR . diff --git a/contrib/hdtbl/hdmisc.tmac b/contrib/hdtbl/hdmisc.tmac index de05bbc1..4da28444 100644 --- a/contrib/hdtbl/hdmisc.tmac +++ b/contrib/hdtbl/hdmisc.tmac @@ -5,7 +5,7 @@ hdmisc.tmac This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -300,319 +300,4 @@ along with this program. If not, see . . fi \" reactivate formatting .. . -. -.\" ****************************************************************** -.\" ** Some macros and the page setup used by the examples ** -.\" ****************************************************************** -. -.\" ****************************************************************** -.\" ** some of the following macros use system commands ** -.\" ** and are therefore `unsafe': they need the `-U' argument ** -.\" ** when calling groff/troff ** -.\" ****************************************************************** -. -.\" ****************************************************************** -.\" ** Header macro for the examples ** -.\" ****************************************************************** -.de H -. nr *w* (17 * \w\\$* / 10 + 4n) -. TBL border=1n \ - bc=yellow \ - bgc=red4 \ - fgc=yellow \ - csp=0 \ - fst=TB \ - "fsz=1.7 1.5" \ - hal=c \ - tal=c \ - "width=(\\n[*w*]+4n) 16)) \ -. tm \\n[.F]:\\n[.c]: invalid base `\\$2' -. el \ -. nr b# \\$2 -. \}\} -. el \ -. nr b# 16 -. -. nr xb# 1 -. -. ie (\\n[b#] == 1) \{\ -. nr dec# +1 -. while \\n-[dec#] \ -. as hex# |\" -. \} -. el \{\ -. while (\\n[dec#] - \\n[xb#]) \{\ -. nr xb# (\\n[xb#] * \\n[b#]) -. nr j# +1 -. \} -. -. while (\\n+[i#] < \\n[j#]) \{\ -. nr ** (\\n[dec#] / \\n[xb#]) -. as hex# \\*[d2x-\\n[**]]\" -. nr dec# (\\n[dec#] - (\\n[xb#] * \\n[**])) -. nr xb# (\\n[xb#] / \\n[b#]) -. \} -. \} -. -. \" strip leading zero, if any -. ds * \\*[hex#]\" -. substring * 0 0 -. if "\\*[*]"0" \ -. substring hex# 1 -1 -. -. if (\\$1 < 0) \ -. ds hex# -\\*[hex#]\" -. -. if !"\\$3"" \{\ -. ie !\A\\$3 \ -. tm \\n[.F]:\\n[.c]: invalid string name `\\$3' -. el \ -. ds \\$3 \\*[hex#]\" -. \} -.. -. -. -.\" Utility macro: .random# -.\" .random-seed seed1 seed2 -.\" -.\" Return pseudo-random numbers in the range 0..0xFFFFFF, -.\" represented as the concatenation of `#' and six -.\" hexadecimal digits, in the string `#random'. The -.\" macro `random-seed' can be used to set seed values, -.\" which should be integers in the range 1..2147483562 and -.\" 1..2147483398 for `seed1' and `seed2', respectively -.\" (the macro applies a modulo operation to assure this -.\" range). If `random-seed' isn't called the registers -.\" `seconds', `minutes', `hours', `dy', `mo', `year', and -.\" `$$' are used to compute it. -.\" -.\" The used generator is presented in L'Ecuyer's 1988 paper -.\" `Efficient and Portable Combined Random Number -.\" Generators', which combines two Multiplicative Linear -.\" Congruential Generators (MLCGs) to achieve a period of -.\" 2.3*10^18. -.af hours 00 -.af minutes 00 -.af seconds 00 -.af year 0000 -.af mo 00 -.af dy 00 -. -.ds random-s1 \n[minutes]\n[seconds]\n[$$]\n[hours]\" -.\" prevent overflow -.substring random-s1 0 8 -. -.nr random-s1 (\*[random-s1] % 2147483562) -.nr random-s2 \n[dy]\n[year]\n[mo] -. -. -.de random-seed -. if !(\\n[.$] == 2) \{\ -. tm1 "random-seed: Invalid number of arguments. -. tm1 " usage: `.random-seed seed1 seed2' -. return -. \} -. -. nr random-s1 (\\$1 % 2147483562) -. nr random-s2 (\\$2 % 2147483398) -.. -. -. -.de random# -. nr * (\\n[random-s1] / 53668) -. nr random-s1 (40014 * (\\n[random-s1] - (\\n[*] * 53668)) \ - - (\\n[*] * 12211)) -. if !\\n[random-s1] \ -. nr random-s1 +2147483563 -. -. nr * (\\n[random-s2] / 52774) -. nr random-s2 (40692 * (\\n[random-s2] - (\\n[*] * 52774)) \ - - (\\n[*] * 3791)) -. if !\\n[random-s2] \ -. nr random-s2 +2147483399 -. -. nr * (\\n[random-s1] - \\n[random-s2]) -. if (\\n[*] < 1) \ -. nr * +2147483562 -. -. \" reduce the result to the leftmost 24 bits -. nr * (\\n[*] / 128) -. -. d2x \\n[*] -. ds hex# 000000\\*[hex#]\" -. substring hex# -6 -. ds #random #\\*[hex#]\" -.. -. -. -.\" ****************************************************************** -.\" ** minimal Page setup ** -.\" ****************************************************************** -. -.nr s \n[.ps] -.nr v \n[.v] -.pv 1.2 1.2 "" X -.nr l 6.6i \" set text width -.ll \n[l]u -.nr o 2c \" set offset -.po \n[o]u -.nr p 29.7c \" set paper length (A4) -.pl \n[p]u -.nr tH 1i \" set top margin -.sp |\n[tH]u -. -.ev 99 -.lt \n[l]u -.ev -. -. -.de HM -. sp |.5i \" print header in top margin -. tl \\*[t*HM] -. sp |\\n[tH]u -. ev -.. -. -. -.de BM -. ev 99 -. sp |(\\n[p]u - .5i) \" print footer in bottom margin -. tl \\*[t*BM] -. bp -.. -. -. -.de EM -. rm BM \" no page number at bottom of last page -. -. if !"\\*[t*kept]"" \{\ -. tm1 "hdtbl: Not all tables have been printed. -. tm1 " Add `.bp' at the end of your document. -. \} -. if !"\\*[t*held]"" \{\ -. tm1 "hdtbl: There are held tables which haven't been printed. -. tm1 " Add `.t*free' at the end of your document. -. \} -. if \\n[t*#] \ -. tm hdtbl: Missing `.ETB' macro at end of document. -.. -. -. -.em EM -. -.if "\n[.m]"" \ -. gcolor black -.if "\n[.M]"" \ -. fcolor white -. -.mso hdtbl.tmac\" load table macros -. .\" EOF diff --git a/contrib/hdtbl/hdtbl.tmac b/contrib/hdtbl/hdtbl.tmac index 9b0f2066..f3daf6e5 100644 --- a/contrib/hdtbl/hdtbl.tmac +++ b/contrib/hdtbl/hdtbl.tmac @@ -5,7 +5,7 @@ hdtbl.tmac This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc. written by Joachim Walsdorff . groff is free software; you can redistribute it and/or modify it under @@ -35,14 +35,6 @@ along with this program. If not, see . .mso hdmisc.tmac .mso 62bit.tmac . -.wh 0 HM \" comment this out if a page header macro exists -.wh -1i BM \" comment this out if a bottom margin macro exists -. -.\" replace `HM' with the name of your pageheader macro, e.g., `pg@top' for MS -.am HM -. t*hm -.. -. . .\" ***************************************************************** .\" * default values for some arguments * @@ -73,11 +65,6 @@ along with this program. If not, see . "\m[\\*[t*fgc]]Table \\n+[t*cptn]:\0\c\k*"\" . . -.\" Running title, running footer -.ds t*HM //arbitrary text for pageheader, except on the first page//\" -.ds t*BM //arbitrary text for pagefooter, except on the last page/\\n[%]/\" -. -. .\" %beginstrip% . .\" for better error messages @@ -979,6 +966,8 @@ along with this program. If not, see . .. . . +.\" Append to your page header macro ('pg@top' for MS) +.\" to enable tables to span pages. .de t*hm . ev t*tbl . nr ** \\n[.t] -- cgit v1.2.1