1 .ig 2 devtag.tmac - macro package for adding tags to roff documents. 3 4 File position: <groff_source_top>/tmac/devtag.tmac 5 Installed position: groff's main macro directory. 6 7 ------------------------------------------------------------------------ 8 Legalize 9 ------------------------------------------------------------------------ 10 11 This file is part of groff, the GNU roff type-setting system. 12 13 Copyright (C) 2004 Free Software Foundation, Inc. 14 written by Gaius Mulley <gaius (a] glam.ac.uk>. 15 16 groff is free software; you can redistribute it and/or modify it under 17 the terms of the GNU General Public License as published by the Free 18 Software Foundation; either version 2, or (at your option) any later 19 version. 20 21 groff is distributed in the hope that it will be useful, but WITHOUT 22 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 23 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 24 for more details. 25 26 You should have received a copy of the GNU General Public License 27 along with groff; see the file COPYING. If not, write to the Free 28 Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA 29 02110-1301, USA. 30 31 32 ------------------------------------------------------------------------ 33 Description 34 ------------------------------------------------------------------------ 35 36 A simple set of macros to provide markup devices (currently only grohtml) 37 with tags that define the meaning of the formatted text and also 38 basic formatting instructions. It generalizes the tag concept used within 39 grohtml and in the future it is hoped that more markup based devices 40 can capitalize on this work. It also clearly defines those tags which are 41 honoured by grohtml. Note that not all tags are included here. Some 42 of the grohtml specific tags (header specific and jobname, etc.) are 43 called directly from within www.tmac. The tags defined here are 44 reasonably 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