| Commit | Line | Data |
|---|---|---|
| 465b256c JR |
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 | ||
| 4d3e9548 | 13 | Copyright (C) 2004, 2009 Free Software Foundation, Inc. |
| 465b256c JR |
14 | written by Gaius Mulley <gaius@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 | |
| 4d3e9548 JL |
18 | Software Foundation, either version 3 of the License, or |
| 19 | (at your option) any later version. | |
| 465b256c JR |
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 | |
| 4d3e9548 | 27 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 465b256c JR |
28 | |
| 29 | ||
| 30 | ------------------------------------------------------------------------ | |
| 31 | Description | |
| 32 | ------------------------------------------------------------------------ | |
| 33 | ||
| 34 | A simple set of macros to provide markup devices (currently only grohtml) | |
| 35 | with tags that define the meaning of the formatted text and also | |
| 36 | basic formatting instructions. It generalizes the tag concept used within | |
| 37 | grohtml and in the future it is hoped that more markup based devices | |
| 38 | can capitalize on this work. It also clearly defines those tags which are | |
| 39 | honoured by grohtml. Note that not all tags are included here. Some | |
| 40 | of the grohtml specific tags (header specific and jobname, etc.) are | |
| 41 | called directly from within www.tmac. The tags defined here are | |
| 42 | reasonably generic and could be applied to other devices. | |
| 43 | .. | |
| 44 | . | |
| 45 | .do if d DEVTAG-NH .nx | |
| 46 | . | |
| 47 | .nr _C \n(.C | |
| 48 | .cp 0 | |
| 49 | . | |
| 50 | .\" -------------------------------------------------------------------- | |
| 51 | .\" DEVTAG <name> | |
| 52 | .\" | |
| 53 | .\" Emit a tag <name> | |
| 54 | .\" | |
| 55 | .de DEVTAG | |
| 56 | . tag devtag:\\$* | |
| 57 | .. | |
| 58 | .\" -------------------------------------------------------------------- | |
| 59 | .\" DEVTAG-NEXT <name> | |
| 60 | .\" | |
| 61 | .\" When the troff state changes, emit tag <name> | |
| 62 | .\" | |
| 63 | .de DEVTAG-NEXT | |
| 64 | . taga devtag:\\$* | |
| 65 | .. | |
| 66 | . | |
| 67 | .\" -------------------------------------------------------------------- | |
| 68 | .\" SH <level> | |
| 69 | .\" NH <level> | |
| 70 | .\" tell device we are starting a numbered heading | |
| 71 | .\" Takes a single parameter <level>. <level> 1 | |
| 72 | .\" is the outer most level. | |
| 73 | . | |
| 74 | .de DEVTAG-NH | |
| 75 | . DEVTAG ".NH \\$1" | |
| 76 | .. | |
| 77 | .als DEVTAG-SH DEVTAG-NH | |
| 78 | . | |
| 79 | .\" -------------------------------------------------------------------- | |
| 80 | .\" COL <n> | |
| 81 | .\" indicate that the following text is aligned for the column <n> | |
| 82 | .\" n: [1..MAX(n)] | |
| 83 | . | |
| 84 | .de DEVTAG-COL | |
| 85 | . DEVTAG ".col \\$1" | |
| 86 | .. | |
| 87 | . | |
| 88 | .\" -------------------------------------------------------------------- | |
| 89 | .\" EO-H | |
| 90 | .\" indicate that a header has finished. | |
| 91 | . | |
| 92 | .de DEVTAG-EO-H | |
| 93 | . DEVTAG ".eo.h" | |
| 94 | .. | |
| 95 | .\" -------------------------------------------------------------------- | |
| 96 | .\" EO-TL | |
| 97 | .\" indicate that a title has finished. | |
| 98 | . | |
| 99 | .de DEVTAG-EO-TL | |
| 100 | . DEVTAG ".eo.tl" | |
| 101 | .. | |
| 102 | .\" -------------------------------------------------------------------- | |
| 103 | .\" TL | |
| 104 | .\" indicate that the following text forms a title. | |
| 105 | . | |
| 106 | .de DEVTAG-TL | |
| 107 | . DEVTAG ".tl" | |
| 108 | .. | |
| 109 | . | |
| 110 | .\" -------------------------------------------------------------------- | |
| 111 | .\" COL-NEXT <n> | |
| 112 | .\" emit a column tag just before the next glyph. | |
| 113 | . | |
| 114 | .de DEVTAG-COL-NEXT | |
| 115 | . DEVTAG-NEXT ".col \\$1" | |
| 116 | .. | |
| 117 | . | |
| 118 | . | |
| 119 | .cp \n[_C] | |
| 120 | . | |
| 121 | . | |
| 122 | .\" -------------------------------------------------------------------- | |
| 123 | .\" Emacs settings | |
| 124 | .\" -------------------------------------------------------------------- | |
| 125 | . | |
| 126 | .\" Local Variables: | |
| 127 | .\" mode: nroff | |
| 128 | .\" End: | |
| 129 | .\" EOF |