Adding EBCDIC code page 1047.
[s-roff.git] / tmac / groff_markup.man
blob46233cea6b97257a2e69372b9420d65f7d256f62
1 .TH GROFF_MARKUP @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
2 .\" Copyright (C) 2000 Free Software Foundation, Inc.
3 .\"      Written by Gaius Mulley (gaius@glam.ac.uk)
4 .\"
5 .\" This file is part of groff.
6 .\" 
7 .\" groff is free software; you can redistribute it and/or modify it under
8 .\" the terms of the GNU General Public License as published by the Free
9 .\" Software Foundation; either version 2, or (at your option) any later
10 .\" version.
11 .\" 
12 .\" groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 .\" for more details.
16 .\" 
17 .\" You should have received a copy of the GNU General Public License along
18 .\" with groff; see the file COPYING.  If not, write to the Free Software
19 .\" Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 .\"
21 .\" user level guide to using the -markup macroset
22 .\"
23 .do mso tmac.arkup
24 .LINE
25 .SH NAME
26 groff_markup \- groff macros for authoring web pages
27 .LINE
28 .SH SYNOPSIS
29 .B "groff \-markup"
30 [ options ]
31 file ... 
32 .SH DESCRIPTION
33 This manual page describes the GNU \-markup macros, which is part of the
34 groff document formatting system.
35 The manual page is very a basic guide, and the html device driver
36 .RB ( grohtml )
37 is still very alpha.
38 It has been included into the distribution so that a lot of people have a
39 chance to test it.
40 Note that this macro file will be automatically called (via the
41 \fCtroffrc\fP file) if you use \fC-Thtml\fP.
42 .PP
43 To see the hyperlinks in action, please format this man page with the
44 .B grohtml
45 device.
46 .PP
47 Here is a summary of the functions found in this macro set.
48 .SH SYNPOSIS
49 .ta 2iL
50 \&.HTMLINDEX    determine automatic link cut off
51 .br
52         point for sections/headers
53 .br
54 \&.BODYCOLOR    specify colours on a web page
55 .br
56 \&.BACKGROUND   specify background image
57 .br
58 \&.URL  create a url using two parameters
59 .br
60 \&.MAILTO       create a html email address
61 .br
62 \&.FTP  create an ftp reference
63 .br
64 \&.IMAGE        include an image file
65 .br
66 \&.HTML pass an html raw request to the
67 .br
68         device driver
69 .br
70 \&.TAG  generate an html name tag from $1
71 .br
72 .\"\&.CDFTP     optionally create two different links
73 .\".br
74 .\"     depending on hostname
75 .\".br
76 \&.LINE create a full width horizontal rule
77 .br
78 .PP
79 Output of the
80 .IR pic ,
81 .IR eqn ,
82 .IR refer ,
83 and
84 .I tbl
85 preprocessors is acceptable as input.
86 .SH REQUESTS 
87 .TP
88 .B HTMLINDEX
89 determines the cut off point for automatic link generation to headings.
90 By default all headings found in a troff document have links created to them
91 at the top of the html web page.
92 It maybe that many of the lower heading levels do not require links.
93 Alternatively some web pages may not need any heading links at all, in which
94 case:
95 .sp
96 .nf
97 \fC\&.HTMLINDEX 0\fP
98 .fi
99 .sp
100 will tell
101 .B grohtml
102 not to generate links.
103 An \fCHTMLINDEX\fP of 2 will mean that a heading
105 .B "1.1.1 Some Title"
107 will not be included in the links either as it is said to have a heading
108 level of three.
110 .B BODYCOLOR
111 takes five parameters: foreground, background, active hypertext link,
112 hypertext link not yet visited, and visited hypertext link colour.
114 .B BACKGROUND
115 the only parameter to this macro is the background image file.
117 .B URL
118 generates
119 .TAG URL
120 a URL using either two or three arguments.
121 $1 is the name of the link, $2 is the actual URL, and $3 is optional stuff
122 to be printed immediately after $2.
123 Here is how to encode
124 .URL "homepage for groff" http://groff.ffii.org/ :
127 \s-2\fC\&.URL "homepage for groff" http://groff.ffii.org/ :\fP\s+2
130 If this is processed by a device other than \fC-Thtml\fP
131 it appears as:
132 homepage for groff \(lahttp://groff.ffii.org\(ra.
133 The URL macro can be of any type; for example we can reference
134 .URL "Eric Raymond's pic guide" pic.html
138 \s-2\fC\&.URL "Eric Raymond's pic guide" pic.html\fP\s+2
142 .B MAILTO
143 generates an email html reference.
144 The first argument is mandatory as the email address.
145 The optional second argument is the text you see in your browser, and
146 an optional third argument is stuff printed immediately after the
147 second argument.
148 For example, the groff maintainers are
149 .MAILTO wl@gnu.org "Werner Lemberg"
151 .MAILTO Ted.Harding@nessie.mcc.ac.uk "Ted Harding" .
152 This is achieved by the following macros:
155 \s-2\fC\&.MAILTO wl@gnu.org "Werner Lemberg"\fP
157 \fC\&.MAILTO Ted.Harding@nessie.mcc.ac.uk \\
159 "Ted Harding" .\s+2\fP
162 Note that all the urls actually are treated as consuming no textual space
163 in groff.
164 This could be considered as a bug since it causes some problems.
165 To circumvent this, \fCtmac.arkup\fP inserts a zero-width character which
166 expands to a harmless space (only if in HTML mode)
168 .B FTP
169 indicates that data can be obtained via ftp.
170 The first argument is the browser text and the second is the url.
171 A third argument, similar to the macros above, is intended for stuff printed
172 immediately after the second argument.
173 The second and the third parameter are optional.
174 As an example, here the location of the
175 .FTP "current groff development distribution" \
176 ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .
177 The macro example above was specified by:
179 \s-2\fC\&.FTP "current groff development distribution" \\
181 ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz .\fP\s+2
184 .B IMAGE
185 allows the document to include pictures.
186 The first argument is the image file.
187 The next two arguments are optional:
188 Argument two is the width in pixels (default is 400 pixels if absent).
189 The third argument is the height in pixels (default is the width value if
190 absent).
193 .B HTML
194 all text after this macro is treated as raw html.
195 If the document is processed \fIwithout\fP \fC-Thtml\fP then
196 the macro is ignored.
197 This macro is a building block for other higher level macros.
199 For example, the \fCBACKGROUND\fP macro is defined as:
201 \fC\&.de BACKGROUND
202 \&.   HTML <body background=\\$1>
203 \&..
207 .B TAG
208 generates an html name tag from its argument.
209 This can then be referenced using the
210 .URL URL #URL
211 macro.
212 As you can see, you must precede the tag name with `\fC#\fP' since it is
213 a local reference.
214 This link was achieved via placing a TAG in the URL description above;
215 the source looks like this:
217 \s-2\fC\&.TP
219 \&.B URL
221 generates
223 \&.TAG URL
225 a URL using either two or three
227 arguments.
229 $1 is the name of the link, $2 is the actual URL
231 \fP\s+2etc.
233 .\".TP
234 .\".B CDFTP
235 .\"takes four arguments.
236 .\"Basically it is the FTP macro with optional local reference.
237 .\"It was designed to allow the same groff source to be built on two different
238 .\"machines and access the ftp data differently.
239 .\"For example, on a web server you might wish for the web page to reference
240 .\"a web site.
241 .\"However, if you were producing a CDROM of your information you might wish
242 .\"for the ftp data to be also stored on your CDROM and referenced as a file.
243 .\"An example to get the current groff development distribution
244 .\".CDFTP merlin "click here." \
245 .\"ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz \
246 .\"../../groff.tar.gz
247 .\"The source for this CDFTP invocation is
248 .\".sp
249 .\"\fC\s-2\&.CDFTP merlin "click here." \
250 .\"ftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz \
251 .\"../../groff.tar.gz\fP\s+2
252 .\".sp
253 .\"which means if the html is generated on machine \fCmerlin\fP
254 .\"then generate a URL to \fC../../groff.tar.gz\fP.
255 .\"Otherwise construct an FTP URL to 
256 .\"\fCftp://ftp.ffii.org/pub/groff/devel/groff-current.tar.gz\fP.
258 .B LINE
259 generates a full width horizontal rule.
260 Example:
262 \fC\s-2\&.LINE\fP\s+2
265 SECTION HEADING LINKS
267 By default
268 .B grohtml
269 generates links to all section headings and places these at the top of the
270 html document.
271 .B Grohtml
272 has to guess what a section heading looks like \(em remember that all
273 .B grohtml
274 actually sees is a device independent language telling it where to place
275 text, draw lines, change font sizes and faces etc.
276 It believes a section heading to be a line of bold text which starts at the
277 left most margin.
278 Consequently it may misinterpret.
279 Users can turn off all heading and title guessing by giving invoking groff
280 with \fCgroff -P-g\fP.
282 LIMITATIONS OF GROHTML
284 Although basic text can be translated in a straightforward fashion there are
285 some areas where
286 .B grohtml
287 has to try and guess text relationship.
288 In particular, whenever
289 .B grohtml
290 encounters text tables and indented paragraphs or two column mode it will
291 try and utilize the html table construct to preserve columns.
292 .B Grohtml
293 also attempts to work out which lines should be automatically formatted by
294 the browser.
295 Ultimately in trying to make reasonable guesses most of the time it will
296 make mistakes.
297 Hopefully these mistakes will happen less and less as we get bug reports
298 and patches :-).
300 Tbl, pic, eqn's are also generated using images which may be
301 considered a limitation.
302 .SH FILES
303 @MACRODIR@/tmac.arkup
304 .SH "SEE ALSO"
305 .BR groff (@MAN1EXT@),
306 .BR @g@troff (@MAN1EXT@)
307 .BR grohtml (@MAN1EXT@),
309 .SH AUTHOR
310 .B Grohtml
311 is written by
312 .MAILTO gaius@glam.ac.uk "Gaius Mulley"
313 .LINE
314 .SH BUGS
315 Report bugs to the
316 .MAILTO bug-groff@gnu.org "Groff Bug Mailing List" .
317 Include a complete, self-contained example that will allow the bug to be
318 reproduced, and say which version of groff you are using.
319 .LINE