groff: update vendor branch to v1.20.1
[dragonfly.git] / contrib / groff / tmac / devtag.tmac
CommitLineData
465b256c
JR
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
4d3e9548 13Copyright (C) 2004, 2009 Free Software Foundation, Inc.
465b256c
JR
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
4d3e9548
JL
18Software Foundation, either version 3 of the License, or
19(at your option) any later version.
465b256c
JR
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
4d3e9548 27along with this program. If not, see <http://www.gnu.org/licenses/>.
465b256c
JR
28
29
30------------------------------------------------------------------------
31 Description
32------------------------------------------------------------------------
33
34A simple set of macros to provide markup devices (currently only grohtml)
35with tags that define the meaning of the formatted text and also
36basic formatting instructions. It generalizes the tag concept used within
37grohtml and in the future it is hoped that more markup based devices
38can capitalize on this work. It also clearly defines those tags which are
39honoured by grohtml. Note that not all tags are included here. Some
40of the grohtml specific tags (header specific and jobname, etc.) are
41called directly from within www.tmac. The tags defined here are
42reasonably 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