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)
5 .\" This file is part of groff.
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
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
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.
21 .\" user level guide to using the -markup macroset
26 groff_markup \- groff macros for authoring web pages
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
38 It has been included into the distribution so that a lot of people have a
40 Note that this macro file will be automatically called (via the
41 \fCtroffrc\fP file) if you use \fC-Thtml\fP.
43 To see the hyperlinks in action, please format this man page with the
47 Here is a summary of the functions found in this macro set.
50 \&.HTMLINDEX determine automatic link cut off
52 point for sections/headers
54 \&.BODYCOLOR specify colours on a web page
56 \&.BACKGROUND specify background image
58 \&.URL create a url using two parameters
60 \&.MAILTO create a html email address
62 \&.FTP create an ftp reference
64 \&.IMAGE include an image file
66 \&.HTML pass an html raw request to the
70 \&.TAG generate an html name tag from $1
72 .\"\&.CDFTP optionally create two different links
74 .\" depending on hostname
76 \&.LINE create a full width horizontal rule
85 preprocessors is acceptable as input.
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
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
111 takes five parameters: foreground, background, active hypertext link,
112 hypertext link not yet visited, and visited hypertext link colour.
115 the only parameter to this macro is the background image file.
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
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
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
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
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)
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
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
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:
202 \&. HTML <body background=\\$1>
208 generates an html name tag from its argument.
209 This can then be referenced using the
212 As you can see, you must precede the tag name with `\fC#\fP' since it is
214 This link was achieved via placing a TAG in the URL description above;
215 the source looks like this:
225 a URL using either two or three
229 $1 is the name of the link, $2 is the actual URL
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
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
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
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.
259 generates a full width horizontal rule.
262 \fC\s-2\&.LINE\fP\s+2
265 SECTION HEADING LINKS
269 generates links to all section headings and places these at the top of the
272 has to guess what a section heading looks like \(em remember that all
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
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
287 has to try and guess text relationship.
288 In particular, whenever
290 encounters text tables and indented paragraphs or two column mode it will
291 try and utilize the html table construct to preserve columns.
293 also attempts to work out which lines should be automatically formatted by
295 Ultimately in trying to make reasonable guesses most of the time it will
297 Hopefully these mistakes will happen less and less as we get bug reports
300 Tbl, pic, eqn's are also generated using images which may be
301 considered a limitation.
303 @MACRODIR@/tmac.arkup
305 .BR groff (@MAN1EXT@),
306 .BR @g@troff (@MAN1EXT@)
307 .BR grohtml (@MAN1EXT@),
312 .MAILTO gaius@glam.ac.uk "Gaius Mulley"
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.