devtag.tmac revision 1.1.1.1
1.ig 2devtag.tmac - macro package for adding tags to roff documents. 3 4File position: <groff_source_top>/tmac/devtag.tmac 5Installed position: groff's main macro directory. 6 7------------------------------------------------------------------------ 8 Legalize 9------------------------------------------------------------------------ 10 11This file is part of groff, the GNU roff type-setting system. 12 13Copyright (C) 2004 Free Software Foundation, Inc. 14written by Gaius Mulley <gaius@glam.ac.uk>. 15 16groff is free software; you can redistribute it and/or modify it under 17the terms of the GNU General Public License as published by the Free 18Software Foundation; either version 2, or (at your option) any later 19version. 20 21groff is distributed in the hope that it will be useful, but WITHOUT 22ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 23FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 24for more details. 25 26You should have received a copy of the GNU General Public License 27along with groff; see the file COPYING. If not, write to the Free 28Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA 2902110-1301, USA. 30 31 32------------------------------------------------------------------------ 33 Description 34------------------------------------------------------------------------ 35 36A simple set of macros to provide markup devices (currently only grohtml) 37with tags that define the meaning of the formatted text and also 38basic formatting instructions. It generalizes the tag concept used within 39grohtml and in the future it is hoped that more markup based devices 40can capitalize on this work. It also clearly defines those tags which are 41honoured by grohtml. Note that not all tags are included here. Some 42of the grohtml specific tags (header specific and jobname, etc.) are 43called directly from within www.tmac. The tags defined here are 44reasonably generic and could be applied to other devices. 45.. 46. 47.do if d DEVTAG-NH .nx 48. 49.nr _C \n(.C 50.cp 0 51. 52.\" -------------------------------------------------------------------- 53.\" DEVTAG <name> 54.\" 55.\" Emit a tag <name> 56.\" 57.de DEVTAG 58. tag devtag:\\$* 59.. 60.\" -------------------------------------------------------------------- 61.\" DEVTAG-NEXT <name> 62.\" 63.\" When the troff state changes, emit tag <name> 64.\" 65.de DEVTAG-NEXT 66. taga devtag:\\$* 67.. 68. 69.\" -------------------------------------------------------------------- 70.\" SH <level> 71.\" NH <level> 72.\" tell device we are starting a numbered heading 73.\" Takes a single parameter <level>. <level> 1 74.\" is the outer most level. 75. 76.de DEVTAG-NH 77. DEVTAG ".NH \\$1" 78.. 79.als DEVTAG-SH DEVTAG-NH 80. 81.\" -------------------------------------------------------------------- 82.\" COL <n> 83.\" indicate that the following text is aligned for the column <n> 84.\" n: [1..MAX(n)] 85. 86.de DEVTAG-COL 87. DEVTAG ".col \\$1" 88.. 89. 90.\" -------------------------------------------------------------------- 91.\" EO-H 92.\" indicate that a header has finished. 93. 94.de DEVTAG-EO-H 95. DEVTAG ".eo.h" 96.. 97.\" -------------------------------------------------------------------- 98.\" EO-TL 99.\" indicate that a title has finished. 100. 101.de DEVTAG-EO-TL 102. DEVTAG ".eo.tl" 103.. 104.\" -------------------------------------------------------------------- 105.\" TL 106.\" indicate that the following text forms a title. 107. 108.de DEVTAG-TL 109. DEVTAG ".tl" 110.. 111. 112.\" -------------------------------------------------------------------- 113.\" COL-NEXT <n> 114.\" emit a column tag just before the next glyph. 115. 116.de DEVTAG-COL-NEXT 117. DEVTAG-NEXT ".col \\$1" 118.. 119. 120. 121.cp \n[_C] 122. 123. 124.\" -------------------------------------------------------------------- 125.\" Emacs settings 126.\" -------------------------------------------------------------------- 127. 128.\" Local Variables: 129.\" mode: nroff 130.\" End: 131.\" EOF 132