0
|
1 \input texinfo
|
20
|
2 @c
|
|
3 @c Please note that this file uses some constructs not supported by earlier
|
30
|
4 @c versions of TeX-info. You must be running one of the newer TeX-info
|
24
|
5 @c releases (I currently use version 3.9 from ftp://prep.ai.mit.edu/pub/gnu/)
|
20
|
6 @c
|
|
7 @c Please do not send in bug reports about not being able to format the
|
|
8 @c document with 'makeinfo' or 'tex', just upgrade your installation.
|
|
9 @c
|
|
10 @c Info formatted files are provided in the distribution, and you can
|
30
|
11 @c retrieve dvi, postscript, and PDF versions from the web site or FTP
|
20
|
12 @c site: http://www.cs.indiana.edu/elisp/w3/docs.html
|
|
13 @c
|
14
|
14 @setfilename w3.info
|
44
|
15 @settitle Emacs/W3 User's Manual
|
0
|
16 @iftex
|
|
17 @finalout
|
|
18 @end iftex
|
|
19 @c @setchapternewpage odd
|
|
20 @c @smallbook
|
|
21 @tex
|
|
22 \overfullrule=0pt
|
|
23 %\global\baselineskip 30pt % for printing in double space
|
|
24 @end tex
|
|
25 @synindex cp fn
|
|
26 @synindex vr fn
|
16
|
27 @dircategory World Wide Web
|
|
28 @dircategory GNU Emacs Lisp
|
|
29 @direntry
|
44
|
30 * W3: (w3). Emacs/W3 World Wide Web browser.
|
16
|
31 @end direntry
|
0
|
32 @ifinfo
|
44
|
33 This file documents the Emacs/W3 World Wide Web browser.
|
0
|
34
|
20
|
35 Copyright (C) 1993, 1994, 1995, 1996 William M. Perry
|
|
36 Copyright (C) 1996, 1997 Free Software Foundation
|
0
|
37
|
|
38 Permission is granted to make and distribute verbatim copies of
|
|
39 this manual provided the copyright notice and this permission notice
|
|
40 are preserved on all copies.
|
|
41
|
|
42 @ignore
|
|
43 Permission is granted to process this file through Tex and print the
|
|
44 results, provided the printed document carries copying permission
|
|
45 notice identical to this one except for the removal of this paragraph
|
|
46 (this paragraph not being relevant to the printed manual).
|
|
47
|
|
48 @end ignore
|
|
49 @end ifinfo
|
|
50 @c
|
|
51 @titlepage
|
|
52 @sp 6
|
44
|
53 @center @titlefont{Emacs/W3}
|
0
|
54 @center @titlefont{User's Manual}
|
|
55 @sp 4
|
44
|
56 @center Third Edition, Emacs/W3 Version 3.0
|
0
|
57 @sp 1
|
20
|
58 @center February 1997
|
0
|
59 @sp 5
|
|
60 @center William M. Perry
|
|
61 @center @i{wmperry@@cs.indiana.edu}
|
|
62 @page
|
|
63 @vskip 0pt plus 1filll
|
|
64 Copyright @copyright{} 1993, 1994, 1995 William M. Perry@*
|
20
|
65 Copyright @copyright{} 1996, 1997 Free Software Foundation
|
0
|
66
|
|
67 Permission is granted to make and distribute verbatim copies of@*
|
|
68 this manual provided the copyright notice and this permission notice@*
|
|
69 are preserved on all copies.
|
|
70
|
|
71 @end titlepage
|
|
72 @page
|
|
73 @ifinfo
|
26
|
74 @node Top, Getting Started, (dir), (dir)
|
|
75 @top W3
|
|
76
|
44
|
77 Users can browse the World Wide Web from within Emacs by using Emacs/W3.
|
20
|
78 All of the widely used (and even some not very widely used) @sc{url}
|
|
79 schemes are supported, and it is very easy to add new methods as the
|
|
80 need arises.
|
|
81
|
44
|
82 Emacs/W3 provides some core functionality that can be readily re-used
|
20
|
83 from any program in Emacs. Users and other package writers are
|
|
84 encouraged to @i{Web-enable} their applications and daily work routines
|
|
85 with the library.
|
|
86
|
44
|
87 Emacs/W3 is completely customizable, both from Emacs-Lisp and from
|
|
88 stylesheets @xref{Stylesheets} If there is any aspect of Emacs/W3 that
|
20
|
89 cannot be modified to your satisfaction, please send mail to the
|
|
90 @t{w3-beta@@indiana.edu} mailing list with any suggestions.
|
|
91 @xref{Reporting Bugs}
|
0
|
92
|
|
93 @menu
|
44
|
94 * Getting Started:: Getting up and running with Emacs/W3
|
|
95 * Basic Usage:: Basic movement and usage of Emacs/W3.
|
0
|
96 * Compatibility:: Explanation of compatibility with
|
20
|
97 other browsers.
|
26
|
98 * Stylesheets:: How to control the look of web pages
|
22
|
99 * Supported URLs:: What @sc{URL} schemes are supported.
|
20
|
100 * MIME Support:: Support for @sc{mime}
|
|
101 * Security:: Various security methods supported
|
26
|
102 * Non-Unix Operating Systems:: Special considerations necessary to get
|
0
|
103 up and running correctly under non-unix
|
|
104 OS's.
|
20
|
105 * Speech Integration:: Outputting to a speech synthesizer.
|
0
|
106 * Advanced Features:: Some of the more arcane features.
|
|
107 * More Help:: How to get more help---mailing lists,
|
|
108 newsgroups, etc.
|
|
109 * Future Directions:: Plans for future revisions
|
|
110
|
|
111 Appendices:
|
44
|
112 * Reporting Bugs:: How to report a bug in Emacs/W3.
|
22
|
113 * Dealing with Firewalls:: How to get around your firewall.
|
44
|
114 * Proxy Gateways:: Using a proxy gateway with Emacs/W3.
|
22
|
115 * Installing SSL:: Turning on @sc{ssl} support.
|
|
116 * Mailcap Files:: An explanation of Mailcap files.
|
|
117 * Down with DoubleClick:: Annoyed by advertisements? Read this!
|
0
|
118
|
|
119 Indices:
|
22
|
120 * General Index:: General Index.
|
|
121 * Key Index:: Menus of command keys and their references.
|
0
|
122 @end menu
|
|
123 @end ifinfo
|
|
124
|
20
|
125 @node Getting Started, Basic Usage, Top, Top
|
14
|
126 @chapter Getting Started
|
|
127 @cindex Clueless in Seattle
|
|
128 @cindex Getting Started
|
20
|
129 @kindex M-x w3
|
0
|
130 @vindex w3-default-homepage
|
20
|
131 @findex w3
|
44
|
132 If installed correctly, starting Emacs/W3 is quite painless. Just type
|
32
|
133 @kbd{M-x w3} in a running Emacs session. This will retrieve the default
|
|
134 page that has been configured (@pxref{Preferences Panel}) - by default the
|
44
|
135 documentation for Emacs/W3 at Indiana University.
|
0
|
136
|
20
|
137 If the default page is not retrieved correctly at startup, you will have
|
32
|
138 to do some customization (@pxref{Preferences Panel}).
|
|
139
|
|
140 Once started, you can use the mouse and the menu or use the following
|
|
141 key commands (for more commands and more detail, @pxref{Basic Usage, ,
|
|
142 Basic Usage}).
|
|
143
|
|
144 @table @asis
|
|
145 @item move forward
|
|
146 press the space bar,
|
|
147
|
|
148 @item move backwards
|
|
149 press the backspace key,
|
|
150
|
|
151 @item move to the next HTML reference on the page
|
|
152 press the @kbd{TAB} key,
|
|
153
|
|
154 @item move to the previous HTML reference on the page
|
|
155 press the @kbd{SHIFT} and @kbd{TAB} keys at the same time. If this does
|
|
156 not work (some text terminals cannot distinguish between @kbd{TAB} and
|
|
157 @kbd{SHIFT-TAB}, pressing the @kbd{ALT} and @kbd{TAB} keys should also
|
|
158 work.
|
|
159
|
|
160 @item follow a link
|
|
161 put the cursor over it
|
|
162 and press the @kbd{RETURN} key, or @*
|
|
163 click the left mouse button on it,
|
|
164
|
|
165 @item fetch a @sc{url}
|
|
166 press the @kbd{Control} and @kbd{o} keys at the same time,@*
|
|
167 type the @sc{url}, and then press the @kbd{RETURN} key,
|
|
168
|
|
169 @item return to the last URL you were at
|
|
170 press the @kbd{l} key,
|
|
171
|
|
172 @item quit W3 mode
|
|
173 press the @kbd{q} key.
|
|
174 @end table
|
20
|
175
|
|
176 @menu
|
44
|
177 * Downloading:: Where to download Emacs/W3.
|
22
|
178 * Building and Installing:: Compiling and installing from source.
|
20
|
179 * Startup Files:: What is where, and why.
|
|
180 * Preferences Panel:: Quick configuration of common options.
|
|
181 @end menu
|
0
|
182
|
22
|
183 @node Downloading, Building and Installing, Getting Started, Getting Started
|
|
184 @section Downloading
|
26
|
185
|
22
|
186 :: WORK :: What you need, and why
|
|
187 :: WORK :: Where to download Emacs, XEmacs, various platforms
|
44
|
188 :: WORK :: Where to download Emacs/W3
|
22
|
189 :: WORK :: Where to download related utilities (netpbm, xv, gimp, etc.)
|
20
|
190
|
22
|
191 @node Building and Installing, Startup Files, Downloading, Getting Started
|
|
192 @section Building and Installing
|
26
|
193
|
22
|
194 :: WORK :: Document makefile variables
|
|
195 :: WORK :: Document what gets installed where, why
|
0
|
196
|
22
|
197 @node Startup Files, Preferences Panel, Building and Installing, Getting Started
|
20
|
198 @section Startup Files
|
|
199 @cindex Startup files
|
|
200 @cindex Default stylesheet
|
26
|
201
|
20
|
202 :: WORK :: startup files
|
44
|
203 This section should document where Emacs/W3 looks for its startup files,
|
20
|
204 and what each one does. 'profile' 'stylesheet' 'hotlist' 'history' etc.
|
|
205
|
26
|
206 @node Preferences Panel, , Startup Files, Getting Started
|
20
|
207 @section Preferences Panel
|
|
208 @cindex Preferences
|
22
|
209 @kindex M-x w3-preferences-edit
|
26
|
210
|
20
|
211 :: WORK :: pref panel
|
22
|
212 This should document the quick preferences panel. M-x w3-preferences-edit
|
20
|
213
|
26
|
214 @node Basic Usage, Compatibility, Getting Started, Top
|
0
|
215 @chapter Basic Usage
|
20
|
216 @cindex Basic Usage
|
|
217 @kindex space
|
|
218 @kindex backspace
|
|
219 @kindex return
|
|
220 @kindex tab
|
|
221 @kindex M-tab
|
44
|
222 Emacs/W3 is similar to the Info package all Emacs users hold near and
|
20
|
223 dear to their hearts (@xref{Top,,Info,info, The Info Manual}, for a
|
|
224 description of Info). Basically, @kbd{space} and @kbd{backspace}
|
|
225 control scrolling, and @kbd{return} or the middle mouse button follows a
|
|
226 hypertext link. The @kbd{tab} and @kbd{Meta-tab} keys maneuver around the
|
|
227 various links on the page.
|
0
|
228
|
44
|
229 @b{NOTE:} Starting with Emacs/W3 3.0, form entry areas in a page can be
|
20
|
230 typed directly into. This is one of the main differences in navigation
|
|
231 from version 2.0. If you are used to using the @kbd{f} and @kbd{b} keys
|
|
232 to navigate around a buffer, I suggest training yourself to always use
|
|
233 @kbd{tab} and @kbd{M-tab} - it will save time and frustration on pages
|
|
234 with lots of form fields.
|
0
|
235
|
14
|
236 By default, hypertext links are surrounded by '[[' and ']]' on
|
|
237 non-graphic terminals (VT100, DOS window, etc.). On a graphics
|
20
|
238 terminal, the links are in shown in different colors.
|
|
239 @xref{Stylesheets} for information on how to change this.
|
0
|
240
|
44
|
241 There are approximately 50 keys bound to special Emacs/W3 functions.
|
|
242 The basic rule of thumb regarding keybindings in Emacs/W3 is that a
|
0
|
243 lowercase key takes an action on the @b{current document}, and an
|
|
244 uppercase key takes an action on the document pointed to by the
|
|
245 hypertext link @b{under the cursor}.
|
|
246
|
|
247 There are several areas that the keybindings fall into: movement,
|
|
248 information, action, and miscellaneous.
|
|
249
|
|
250 @menu
|
26
|
251 * Movement:: Moving around in the buffer.
|
|
252 * Information:: Getting information about a document.
|
|
253 * Action:: Following links, printing, etc.
|
|
254 * Miscellaneous:: Everything else.
|
0
|
255 @end menu
|
26
|
256
|
0
|
257 @node Movement, Information, Basic Usage, Basic Usage
|
|
258 @section Movement
|
26
|
259
|
20
|
260 All the standard Emacs bindings for movement are still in effect, with a
|
|
261 few additions for convenience.
|
|
262
|
0
|
263 @table @kbd
|
20
|
264 @findex w3-scroll-up
|
|
265 @kindex space
|
|
266 @item space
|
0
|
267 Scroll downward in the buffer. With prefix arg, scroll down that many
|
|
268 screenfuls.
|
20
|
269 @kindex backspace
|
0
|
270 @findex scroll-down
|
20
|
271 @item backspace
|
0
|
272 Scroll upward in the buffer. With prefix arg, scroll up that many
|
|
273 screenfuls.
|
|
274 @kindex <
|
|
275 @findex w3-start-of-document
|
|
276 @item <
|
|
277 Goes to the start of document
|
|
278 @kindex >
|
|
279 @findex w3-end-of-document
|
|
280 @item >
|
|
281 Goes to the end of document
|
|
282 @kindex b
|
20
|
283 @kindex Meta-tab
|
|
284 @findex w3-widget-backward
|
30
|
285 @item Meta-tab, Shift-tab, b
|
0
|
286 Attempts to move backward one link area in the current document.
|
|
287 Signals an error if no previous links are found.
|
20
|
288 @kindex f
|
|
289 @kindex tab
|
|
290 @kindex n
|
|
291 @findex w3-widget-forward
|
|
292 @item tab, f, n
|
|
293 Attempts to move forward one link area in the current document. Signals
|
|
294 an error if no more links are found.
|
|
295 @kindex B
|
|
296 @findex w3-backward-in-history
|
|
297 @item B
|
|
298 Move backwards in the history stack.
|
|
299 @kindex F
|
|
300 @findex w3-forward-in-history
|
|
301 @item F
|
|
302 Move forwards in the history stack.
|
|
303 @kindex l
|
|
304 @findex w3-goto-last-buffer
|
|
305 @item l
|
|
306 Return to the last buffer shown before this buffer.
|
|
307 @kindex q
|
|
308 @findex w3-quit
|
|
309 @item q
|
|
310 Kill this buffer.
|
|
311 @kindex Q, u
|
|
312 @findex w3-leave-buffer
|
30
|
313 @item Q, u
|
20
|
314 Bury this buffer, but don't kill it
|
|
315 @end table
|
|
316
|
|
317 @node Information, Action, Movement, Basic Usage
|
|
318 @section Information
|
26
|
319
|
20
|
320 These functions relate information about one or more links on the
|
|
321 current document.
|
|
322
|
|
323 @table @kbd
|
|
324 @kindex v
|
|
325 @findex url-view-url
|
|
326 @item v
|
|
327 This shows the @sc{url} of the current document in the minibuffer.
|
|
328 @kindex V
|
|
329 @findex w3-view-this-url
|
|
330 @item V
|
|
331 This shows the @sc{url} of the hypertext link under point in the
|
|
332 minibuffer.
|
|
333 @kindex i
|
|
334 @findex w3-document-information
|
|
335 @item i
|
|
336 Shows miscellaneous information about the currently displayed document.
|
|
337 This includes the @sc{url}, the last modified date, @sc{mime} headers,
|
|
338 the @sc{http} response code, and any relationships to other documents.
|
|
339 Any security information is also displayed.
|
|
340 @kindex I
|
|
341 @findex w3-document-information-this-url
|
|
342 @item I
|
|
343 Shows information about the @sc{url} at point.
|
|
344 @kindex s
|
|
345 @findex w3-source-document
|
|
346 @item s
|
|
347 This shows the @sc{html} source of the current document in a separate buffer.
|
|
348 The buffer's name is based on the document's @sc{url}.
|
|
349 @kindex S
|
|
350 @findex w3-source-document-at-point
|
|
351 @item S
|
|
352 Shows the @sc{html} source of the hypertext link under point in a separate
|
|
353 buffer. The buffer's name is based on the document's @sc{url}.
|
|
354 @kindex k
|
|
355 @findex w3-save-url
|
|
356 @item k
|
|
357 This stores the current document's @sc{url} in the kill ring, and also in the
|
|
358 current window-system's clipboard, if possible.
|
|
359 @kindex K
|
|
360 @findex w3-save-this-url
|
|
361 @item K
|
|
362 Stores the @sc{url} of the document under point in the kill ring, and also in
|
|
363 the current window-system's clipboard, if possible.
|
|
364 @end table
|
|
365
|
|
366 @node Action, Miscellaneous, Information, Basic Usage
|
|
367 @section Action
|
26
|
368
|
20
|
369 First, here are the keys and functions that bring up a new hypertext
|
|
370 page, usually creating a new buffer.
|
|
371 @table @kbd
|
0
|
372 @kindex m
|
|
373 @findex w3-complete-link
|
|
374 @item m
|
|
375 Choose a link from the current buffer and follow it. A completing-read
|
|
376 is done on all the links, so @kbd{space} and @kbd{TAB} can be used for
|
|
377 completion.
|
|
378 @kindex return
|
|
379 @findex w3-follow-link
|
|
380 @item return
|
|
381 Pressing return when over a hyperlink attempts to follow the link
|
|
382 under the cursor. With a prefix argument (@kbd{C-u}), this forces the
|
|
383 file to be saved to disk instead of being passed off to other viewers
|
20
|
384 or being parsed as @sc{html}.
|
0
|
385
|
20
|
386 Pressing return when over a form input field can cause auto-submission
|
|
387 of the form. This is for Mosaic and Netscape compatibility. If there
|
|
388 is only one item in the form other than submit or reset buttons, then
|
|
389
|
0
|
390 minibuffer for the data to insert into the input field. Type checking
|
|
391 is done, and the data is only entered into the form when data of the
|
|
392 correct type is entered (ie: cannot enter 44 for 'date' field, etc).
|
|
393
|
|
394 @kindex Middle Mouse Button
|
|
395 @findex w3-follow-mouse
|
|
396 @item Middle Mouse Button
|
|
397 Attempt to follow a hypertext link under the mouse cursor. Clicking on
|
|
398 a form input field will prompt in the minibuffer for the data to insert
|
|
399 into the input field. Type checking is done, and the data is only
|
|
400 entered into the form when data of the correct type is entered (ie:
|
|
401 cannot enter 44 for 'date' field, etc).
|
|
402
|
|
403 @kindex Control Middle Mouse Button
|
|
404 @kindex Meta return
|
|
405 @findex w3-follow-inlined-image
|
|
406 @item Control Middle Mouse Button, Meta return
|
|
407 Tries to retrieve the inlined image that is under point. It ignores any
|
|
408 form entry areas or hyperlinks, and blindly follows any inlined image.
|
|
409 Useful for seeing images that are meant to be used as hyperlinks when
|
|
410 not on a terminal capable of displaying graphics.
|
|
411
|
|
412 @kindex p
|
|
413 @findex w3-print-this-url
|
|
414 @item p
|
|
415 Prints out the current buffer in a variety of formats, including
|
20
|
416 PostScript, @sc{html} source, or formatted text.
|
0
|
417 @kindex P
|
|
418 @findex w3-print-url-under-point
|
|
419 @item P
|
20
|
420 Prints out the @sc{url} under point in a variety of formats, including
|
|
421 PostScript, @sc{html} source, or formatted text.
|
0
|
422 @kindex m
|
|
423 @findex w3-complete-link
|
|
424 @item m
|
|
425 Selects a destination from a list of all the hyperlinks in the current
|
|
426 buffer. Use @kbd{space} and @kbd{tab} to complete on the links.
|
|
427
|
|
428 @kindex r
|
|
429 @kindex g
|
|
430 @findex w3-reload-document
|
|
431 @item r, g
|
|
432 Reloads the current document. The position within the buffer remains
|
|
433 the same (unless the document has changed since it was last retrieved,
|
|
434 in which case it should be relatively close). This causes an
|
|
435 unconditional reload from the remote server - the locally cached copy is
|
|
436 not consulted.
|
|
437 @kindex C-o
|
|
438 @findex w3-fetch
|
|
439 @item C-o
|
20
|
440 Prompts for a @sc{url} in the minibuffer, and attempts to fetch
|
44
|
441 it. If there are any errors, or Emacs/W3 cannot understand the type of link
|
0
|
442 requested, the errors are displayed in a hypertext buffer.
|
|
443 @kindex o
|
|
444 @findex w3-open-local
|
|
445 @vindex url-use-hypertext-dired
|
|
446 @item o
|
|
447 Opens a local file, interactively. This prompts for a local file name
|
|
448 to open. The file must exist, and may be a directory. If the requested
|
|
449 file is a directory and @code{url-use-hypertext-dired} is @code{nil},
|
44
|
450 then a dired-mode buffer is displayed. If non@code{nil}, then Emacs/W3
|
0
|
451 automatically generates a hypertext listing of the directory. The
|
|
452 hypertext mode is the default, so that all the keys and functions remain
|
|
453 the same.
|
|
454
|
|
455 @kindex M-s
|
30
|
456 @findex w3-save-as
|
0
|
457 @item M-s
|
30
|
458 Save a document to the local disk as HTML Source, Formatted Text, LaTeX
|
|
459 Source, or Binary.
|
|
460
|
0
|
461 @kindex Hv
|
|
462 @findex w3-show-history-list
|
|
463 @vindex w3-keep-history
|
|
464 @item Hv
|
44
|
465 If @code{url-keep-history} is non-@code{nil}, then Emacs/W3 keeps track
|
20
|
466 of all the @sc{url}s visited in an Emacs session. This function takes all
|
0
|
467 the links that are in that internal list, and formats them as hypertext
|
|
468 links in a list.
|
|
469 @end table
|
|
470
|
|
471 @cindex Buffer movement
|
44
|
472 And here are the commands to move around between Emacs/W3 buffers:
|
0
|
473
|
|
474 @table @kbd
|
|
475 @kindex l
|
|
476 @findex w3-goto-last-buffer
|
|
477 @item l
|
|
478 Goes to the last WWW buffer seen.
|
|
479 @kindex q
|
|
480 @findex w3-quit
|
|
481 @item q
|
|
482 Quits WWW mode. This kills the current buffer and goes to the most
|
|
483 recently visited buffer.
|
|
484 @kindex Q
|
|
485 @findex w3-leave-buffer
|
|
486 @item u
|
|
487 This is similar to w3-quit, but the buffer is not killed, it is moved to
|
|
488 the bottom of the buffer list (so it is the least likely to show up as
|
|
489 the default with switch-to-buffer). This is different from
|
|
490 @code{w3-goto-last-buffer} in that it does not return to the last WWW
|
|
491 page visited - it is the same as using @code{switch-to-buffer} - the
|
|
492 buffer left in the window is fairly random.
|
|
493 @kindex HB
|
|
494 @kindex B
|
|
495 @findex w3-backward-in-history
|
|
496 @item HB, B
|
|
497 Takes one step back along the path in the current history. Has no
|
|
498 effect if at the beginning of the session history.
|
|
499 @kindex HF
|
|
500 @kindex F
|
|
501 @findex w3-forward-in-history
|
|
502 @item HF, F
|
|
503 Takes one step forward along the path in the current history. Has no
|
|
504 effect if at the end of the session history.
|
|
505 @end table
|
|
506
|
26
|
507 @node Miscellaneous, , Action, Basic Usage
|
0
|
508 @section Miscellaneous
|
26
|
509
|
0
|
510 @table @kbd
|
|
511 @kindex M-m
|
|
512 @findex w3-mail-current-document
|
|
513 @item M-m
|
|
514 Mails the current document to someone. Choose from several different
|
20
|
515 formats to mail: formatted text, @sc{html} source, PostScript, or LaTeX source.
|
|
516 When the @sc{html} source is mailed, then an appropriate <base> tag is inserted
|
0
|
517 at the beginning of the document so that relative links may be followed
|
|
518 correctly by whoever receives the mail.
|
|
519 @kindex M-M
|
|
520 @findex w3-mail-document-under-point
|
|
521 @item M-M
|
|
522 Mails the document pointed to by the hypertext link under point to someone.
|
20
|
523 Choose from several different formats to mail: formatted text, @sc{html} source,
|
|
524 PostScript, or LaTeX source. When the @sc{html} source is mailed, then an
|
0
|
525 appropriate <base> tag is inserted at the beginning of the document so that
|
|
526 relative links may be followed correctly by whoever receives the
|
|
527 mail.
|
|
528 @kindex p
|
|
529 @findex w3-print-this-url
|
|
530 @item p
|
|
531 Prints the current document. Choose from several different formats to
|
20
|
532 print: formatted text, @sc{html} source, PostScript (with ps-print), or by using
|
0
|
533 LaTeX and dvips).
|
|
534
|
|
535 @findex lpr-buffer
|
|
536 @vindex lpr-command
|
|
537 @vindex lpr-switches
|
|
538 When the formatted text is printed, the normal @code{lpr-buffer} function
|
|
539 is called, and the variables @code{lpr-command} and @code{lpr-switches}
|
|
540 control how the document is printed.
|
|
541
|
20
|
542 When the @sc{html} source is printed, then an appropriate <base> tag is
|
0
|
543 inserted at the beginning of the document.
|
|
544 @vindex w3-print-commnad
|
|
545 @vindex w3-latex-docstyle
|
20
|
546 When postscript is printed, then the @sc{html} source of the document is
|
14
|
547 converted into LaTeX source. There are several variables controlling
|
|
548 what the final LaTeX document looks like.
|
|
549
|
|
550 :: WORK :: Document the new LaTeX backend
|
|
551
|
|
552 @table @code
|
|
553 @item w3-latex-use-latex2e
|
|
554 @vindex w3-latex-use-latex2e
|
|
555 If non-@code{nil}, configures the LaTeX engine to use the LaTeX2e
|
|
556 syntax. A @code{nil} value indicates that LaTeX 2.0.9 compabibility
|
|
557 will be used instead.
|
|
558 @item w3-latex-docstyle
|
|
559 @vindex w3-latex-docstyle
|
20
|
560 The document style to use when printing or mailing converted @sc{html} files
|
14
|
561 in LaTeX. Good defaults are: @{article@}, [psfig,twocolumn]@{article@},
|
|
562 etc.
|
|
563 @item w3-latex-packages
|
|
564 @vindex w3-latex-packages
|
|
565 List of LaTeX packages to include. Currently this is only used if
|
|
566 @code{w3-latex-use-latex2e} is non-@code{nil}.
|
|
567 @item w3-latex-use-maketitle
|
|
568 @vindex w3-latex-use-maketitle
|
|
569 If non-@code{nil}, the LaTeX engine will use real LaTeX title pages for
|
|
570 document titles.
|
|
571 @item w3-latex-print-links
|
|
572 @vindex w3-latex-print-links
|
20
|
573 If non-@code{nil}, prints the @sc{url}s of hypertext links as endnotes at the
|
|
574 end of the document. If set to @code{footnote}, prints the @sc{url}'s as
|
14
|
575 footnotes on each page.
|
|
576 @end table
|
|
577
|
0
|
578 @kindex P
|
|
579 @findex w3-print-url-under-point
|
|
580 @item P
|
|
581 Prints the document pointed to by the hypertext link under point.
|
|
582 Please see the previous item for more information.
|
|
583 @kindex M-x w3-insert-formatted-url
|
|
584 @findex w3-insert-formatted-url
|
|
585 @item M-x w3-insert-formatted-url
|
20
|
586 Insert a fully formatted @sc{html} link into another buffer. This gets the
|
|
587 name and @sc{url} of either the current buffer, or, with a prefix arg, of the
|
0
|
588 link under point, and construct the appropriate <a...>...</a> markup and
|
|
589 insert it into the desired buffer.
|
|
590 @kindex M-tab
|
|
591 @findex w3-insert-this-url
|
|
592 @item M-tab
|
20
|
593 Inserts the @sc{url} of the current document into another buffer. Buffer is
|
|
594 prompted for in the minibuffer. With prefix arg, uses the @sc{url} of the
|
0
|
595 link under point.
|
|
596 @kindex U
|
|
597 @findex w3-use-links
|
|
598 @item U
|
|
599 Selects one of the <LINK> tags from this document and fetch it. Links
|
|
600 are attributes of a specific document, and can tell such things as who
|
|
601 made the document, where a table of contents is located, etc.
|
|
602
|
|
603 Link tags specify relationships between documents in two ways. Normal
|
|
604 (forward) relationships (where the link has a REL="xxx" attribute), and
|
|
605 reverse relationships (where the link has a REV="xxx" attribute). This
|
|
606 first asks what type of link to follow (Normal or Reverse), then does
|
|
607 a @code{completing-read} on only the links that have that type of
|
|
608 relationship.
|
|
609 @end table
|
|
610
|
26
|
611 @node Compatibility, Stylesheets, Basic Usage, Top
|
0
|
612 @chapter Compatibility with other Browsers
|
44
|
613 Due to the popularity of several other browsers, Emacs/W3 offers an easy
|
0
|
614 transition to its much better way of life. This ranges from being able
|
|
615 to share the same preferences files and disk cache to actually emulating
|
|
616 the keybindings used in other browsers.
|
|
617
|
|
618 @menu
|
44
|
619 * Emulation:: Emacs/W3 can emulate the keybindings and
|
0
|
620 other behaviours of other browsers.
|
|
621 * Hotlist Handling:: A hotlist is an easy way to keep track of
|
|
622 interesting Web pages without having to
|
|
623 remember the exact path to get there.
|
|
624 * Session History:: Keeping a history of documents visited
|
|
625 in one Emacs sessions allows the use of
|
|
626 'forward' and 'back' buttons easily.
|
26
|
627 * Global History:: Keeping a history of all the places ever
|
0
|
628 visited on the web.
|
|
629 @end menu
|
26
|
630
|
0
|
631 @node Emulation, Hotlist Handling, Compatibility, Compatibility
|
|
632 @section Emulation
|
|
633 @cindex Browser emulation
|
|
634 @cindex Emulation of other browsers
|
|
635 @cindex Netscape emulation
|
|
636 @cindex Lynx emulation
|
|
637 @findex turn-on-netscape-emulation
|
|
638 @findex turn-on-lynx-emulation
|
|
639 @findex w3-netscape-emulation-minor-mode
|
|
640 @findex w3-lynx-emulation-minor-mode
|
|
641 @vindex w3-mode-hook
|
26
|
642
|
14
|
643 :: WORK :: Document lynx emulation
|
30
|
644 @table @kbd
|
20
|
645 @item Down arrow
|
|
646 Highlight next topic
|
|
647 @item Up arrow
|
|
648 Highlight previous topic
|
|
649 @item Right arrow, Return, Enter
|
|
650 Jump to highlighted topic
|
|
651 @item Left arrow
|
|
652 Return to previous topic
|
|
653 @item +
|
|
654 Scroll down to next page (Page-Down)
|
|
655 @item -
|
|
656 Scroll up to previous page (Page-Up)
|
|
657 @item SPACE
|
|
658 Scroll down to next page (Page-Down)
|
|
659 @item b
|
|
660 Scroll up to previous page (Page-Up)
|
|
661 @item C-A
|
|
662 Go to first page of the current document (Home)
|
|
663 @item C-E
|
|
664 Go to last page of the current document (End)
|
|
665 @item C-B
|
|
666 Scroll up to previous page (Page-Up)
|
|
667 @item C-F
|
|
668 Scroll down to next page (Page-Down)
|
|
669 @item C-N
|
|
670 Go forward two lines in the current document
|
|
671 @item C-P
|
|
672 Go back two lines in the current document
|
|
673 @item )
|
|
674 Go forward half a page in the current document
|
|
675 @item (
|
|
676 Go back half a page in the current document
|
|
677 @item #
|
|
678 Go to Toolbar or Banner in the current document
|
|
679 @item ?, h
|
|
680 Help (this screen)
|
|
681 @item a
|
|
682 Add the current link to a bookmark file
|
|
683 @item c
|
|
684 Send a comment to the document owner
|
|
685 @item d
|
|
686 Download the current link
|
|
687 @item e
|
|
688 Edit the current file
|
|
689 @item g
|
|
690 Goto a user specified @sc{url} or file
|
|
691 @item i
|
|
692 Show an index of documents
|
|
693 @item j
|
|
694 Execute a jump operation
|
|
695 @item k
|
|
696 Show a list of key mappings
|
|
697 @item l
|
|
698 List references (links) in current document
|
|
699 @item m
|
|
700 Return to main screen
|
|
701 @item o
|
|
702 Set your options
|
|
703 @item p
|
|
704 Print the current document
|
|
705 @item q
|
|
706 Quit
|
|
707 @item /
|
|
708 Search for a string within the current document
|
|
709 @item s
|
|
710 Enter a search string for an external search
|
|
711 @item n
|
|
712 Go to the next search string
|
|
713 @item v
|
|
714 View a bookmark file
|
|
715 @item V
|
|
716 Go to the Visited Links Page
|
|
717 @item x
|
|
718 Force submission of form or link with no-cache
|
|
719 @item z
|
|
720 Cancel transfer in progress
|
|
721 @item [backspace]
|
|
722 Go to the history Page
|
|
723 @item =
|
|
724 Show file and link info
|
|
725 @item \
|
|
726 Toggle document source/rendered view
|
|
727 @item !
|
|
728 Spawn your default shell
|
|
729 @item *
|
|
730 Toggle image_links mode on and off
|
|
731 @item [
|
|
732 Toggle pseudo_inlines mode on and off
|
|
733 @item ]
|
|
734 Send an @sc{http} @sc{head} request for the current doc or link
|
|
735 @item C-R
|
|
736 Reload current file and refresh the screen
|
|
737 @item C-W
|
|
738 Refresh the screen
|
|
739 @item C-U
|
|
740 Erase input line
|
|
741 @item C-G
|
|
742 Cancel input or transfer
|
|
743 @item C-T
|
|
744 Toggle trace mode on and off
|
|
745 @item C-K
|
|
746 Invoke the Cookie Jar Page
|
|
747 @end table
|
|
748
|
14
|
749 :: WORK :: Document netscape emulation
|
20
|
750 Uh, turn this into pretty tables about what keys are emulated.
|
|
751
|
|
752 @example
|
|
753 (define-key w3-netscape-emulation-minor-mode-map "\M-s" 'w3-save-as)
|
|
754 (define-key w3-netscape-emulation-minor-mode-map "\M-m" 'w3-mailto)
|
|
755 (define-key w3-netscape-emulation-minor-mode-map "\M-n" 'make-frame)
|
|
756 (define-key w3-netscape-emulation-minor-mode-map "\M-l" 'w3-fetch)
|
|
757 (define-key w3-netscape-emulation-minor-mode-map "\M-o" 'w3-open-local)
|
|
758 (define-key w3-netscape-emulation-minor-mode-map "\M-p" 'w3-print-this-url)
|
|
759 (define-key w3-netscape-emulation-minor-mode-map "\M-q" 'w3-quit)
|
|
760 (define-key w3-netscape-emulation-minor-mode-map "\M-f" 'w3-search-forward)
|
|
761 (define-key w3-netscape-emulation-minor-mode-map "\M-g" 'w3-search-again)
|
|
762 (define-key w3-netscape-emulation-minor-mode-map "\M-r" 'w3-reload-document)
|
|
763 (define-key w3-netscape-emulation-minor-mode-map "\M-i" 'w3-load-delayed-images)
|
|
764 (define-key w3-netscape-emulation-minor-mode-map "\M-a" 'w3-hotlist-add-document)
|
|
765 (define-key w3-netscape-emulation-minor-mode-map "\M-b" 'w3-show-hotlist)
|
|
766 (define-key w3-netscape-emulation-minor-mode-map "\M-h" 'w3-show-history-list)
|
|
767
|
|
768 @end example
|
0
|
769
|
|
770 @node Hotlist Handling, Session History, Emulation, Compatibility
|
|
771 @section Hotlist Handling
|
26
|
772
|
0
|
773 :: WORK :: Document that it supports different types of hotlist formats
|
|
774 :: WORK :: Make sure everything hotlist related can be accessed via 'h'
|
|
775 In order to avoid having to traverse many documents to get to the same
|
44
|
776 document over and over, Emacs/W3 supports a ``hotlist'' like Mosaic. This is
|
20
|
777 a file that contains @sc{url}s and aliases. Hotlists allow quick access to any
|
0
|
778 document in the Web, providing it has been visited and added to the hotlist.
|
|
779 The variable @code{w3-hotlist-file} determines where this information
|
|
780 is saved. The structure of the file is compatible with Mosaic's
|
|
781 hotlist file, so this defaults to @file{~/.mosaic-hotlist-default}.
|
|
782
|
|
783 Hotlist commands are:
|
|
784 @table @kbd
|
|
785 @kindex hi
|
|
786 @findex w3-hotlist-add-document
|
|
787 @vindex w3-hotlist-file
|
|
788 @item a
|
|
789 Adds the current document to the hotlist, with the buffer name as its
|
|
790 identifier. Modifies the file specified by @code{w3-hotlist-file}. If
|
20
|
791 this is given a prefix-argument (via @kbd{C-u}), the title is prompted
|
|
792 for instead of automatically defaulting to the document title.
|
0
|
793
|
|
794 @findex w3-hotlist-refresh
|
|
795 @vindex w3-hotlist-file
|
|
796 @kindex hR
|
|
797 @item hR
|
|
798 This rereads the default hostlist file specified by
|
|
799 @code{w3-hotlist-file}.
|
|
800 @findex w3-hotlist-delete
|
|
801 @vindex w3-hotlist-file
|
|
802 @kindex hd
|
|
803 @item d
|
|
804 Prompts for the alias of the entry to kill. Pressing the spacebar or
|
|
805 tab will list out partial completions. The internal representation of
|
|
806 the hotlist and the file specified by @code{w3-hotlist-file} are
|
|
807 updated.
|
|
808 @item hr
|
|
809 @kindex hr
|
|
810 @findex w3-hotlist-rename-entry
|
|
811 @vindex w3-hotlist-file
|
|
812 Some hotlist item names can be very unwieldy (`Mosaic for X level 2 fill
|
|
813 out form support'), or uninformative (`Index of /'). Prompts for the
|
|
814 item to rename in the minibuffer---use the spacebar or tab key for
|
|
815 completion. After having chosen an item to rename, prompts for a new
|
|
816 title until a unique title is entered. Modifies the file specified by
|
|
817 @code{w3-hotlist-file}.
|
|
818
|
|
819 @item hu
|
|
820 @kindex hu
|
|
821 @findex w3-use-hotlist
|
|
822 Prompts for the alias to jump to. Pressing the @key{spacebar} or
|
|
823 @key{tab} key shows partial completions.
|
|
824
|
|
825 @item hv
|
|
826 @kindex hv
|
|
827 @findex w3-show-hotlist
|
20
|
828 Converts the hotlist into @sc{html} and displays it.
|
0
|
829 @item ha
|
|
830 @kindex ha
|
|
831 @findex w3-hotlist-apropos
|
|
832 Shows the hotlist entries matching a regular expression.
|
|
833 @item hA
|
|
834 @kindex hA
|
|
835 @findex w3-hotlist-append
|
|
836 Appends another hotlist file to the one currently in memory.
|
|
837 @end table
|
|
838 @node Session History, Global History, Hotlist Handling, Compatibility
|
|
839 @section History
|
|
840 @cindex History Lists
|
26
|
841
|
20
|
842 Almost all web browsers keep track of the @sc{url}s followed from a page, so
|
0
|
843 that it can provide @b{forward} and @b{back} buttons to keep a @i{path}
|
20
|
844 of @sc{url}s that can be traversed easily.
|
26
|
845
|
0
|
846 @vindex url-keep-history
|
44
|
847 If the variable @code{url-keep-history} is @code{t}, then Emacs/W3
|
20
|
848 keeps a list of all the @sc{url}s visited in a session.
|
26
|
849
|
0
|
850 @findex w3-show-history
|
44
|
851 To view a listing of the history for this session of Emacs/W3, use
|
|
852 @code{M-x w3-show-history} from any buffer, and Emacs/W3 generates an
|
20
|
853 @sc{html} document showing every @sc{url} visited since Emacs started (or
|
0
|
854 cleared the history list), and then format it. Any of the links can
|
|
855 be chosen and followed to the original document. To clear the history
|
|
856 list, choose 'Clear History' from the 'Options' menu.
|
|
857
|
|
858 @findex w3-forward-in-history
|
|
859 @findex w3-backward-in-history
|
|
860 @findex w3-fetch
|
|
861 Another twist on the history list mechanism is the fact that all
|
44
|
862 Emacs/W3 buffers remember what @sc{url}, buffer, and buffer position of the
|
0
|
863 last document, and also keeps track of the next location jumped @b{to}
|
|
864 from that buffer. This means that the user can go forwards and
|
|
865 backwards very easily along the path taken to reach a particular
|
|
866 document. To go forward, use the function @code{w3-forward-in-history},
|
|
867 to go backward, use the function @code{w3-backward-in-history}.
|
|
868
|
26
|
869 @node Global History, , Session History, Compatibility
|
0
|
870 @section Global History
|
26
|
871
|
0
|
872 :: WORK :: Document that the global history can have diff. formats
|
20
|
873 Most web browsers also support the idea of a ``history'' of @sc{url}s the
|
0
|
874 user has visited, and it displays them in a different style than normal
|
20
|
875 @sc{url}s.
|
0
|
876
|
|
877 @vindex url-keep-history
|
|
878 @vindex url-global-history-file
|
44
|
879 If the variable @code{url-keep-history} is @code{t}, then Emacs/W3
|
20
|
880 keeps a list of all the @sc{url}s visited in a session. The file is
|
0
|
881 automatically written to disk when exiting emacs. The list is added to
|
|
882 those already in the file specified by @code{url-global-history-file},
|
|
883 which defaults to @file{~/.mosaic-global-history}.
|
|
884
|
20
|
885 If any @sc{url} in the list is found in the file, it is not saved, but new
|
0
|
886 ones are added at the end of the file.
|
|
887
|
|
888 The function that saves the global history list is smart enough to
|
44
|
889 notice what style of history list is being used (Netscape, Emacs/W3, or
|
0
|
890 XMosaic), and writes out the new additions appropriately.
|
|
891
|
|
892 @cindex Completion of URLs
|
|
893 @cindex Usefulness of global history
|
44
|
894 One of the nice things about keeping a global history files is that Emacs/W3
|
0
|
895 can use it as a completion table. When doing @kbd{M-x w3-fetch}, pressing
|
|
896 the @kbd{tab} or @kbd{space} key will show all completions for a
|
20
|
897 partial @sc{url}. This is very useful, especially for very long @sc{url}s that
|
0
|
898 are not in a hotlist, or for seeing all the pages from a particular web
|
|
899 site before choosing which to retrieve.
|
|
900
|
26
|
901 @node Stylesheets, Supported URLs, Compatibility, Top
|
20
|
902 @chapter Stylesheets
|
44
|
903 The way in which Emacs/W3 formats a document is very customizable. All
|
14
|
904 formatting is now controlled by a default stylesheet set by the user
|
44
|
905 with the @code{w3-default-stylesheet} variable. Emacs/W3 currently
|
22
|
906 supports the @sc{W3C} recommendation for Cascading Style Sheets, Level 1
|
|
907 (commonly known as @sc{CSS1}) with a few experimental items from other
|
44
|
908 W3C proposals. Wherever Emacs/W3 diverges from the specification, it
|
22
|
909 will be clearly documented, and will be changed once a full standard is
|
|
910 available.
|
0
|
911
|
22
|
912 Support for @sc{DSSSL} is progressing, but spare time is at an all-time
|
|
913 low. If anyone would like to help, please contact the author.
|
|
914
|
|
915 The following sections closely parallel the @sc{CSS1} specification so
|
44
|
916 it should be very easy to look up what Emacs/W3 supports when browsing
|
22
|
917 through the @sc{CSS1} specification. Please note that a lot of the text
|
|
918 in the following sections comes directly from the specification as
|
|
919 well.
|
0
|
920
|
|
921 @menu
|
22
|
922 * Terminology:: Terms used in the rest of this chapter.
|
|
923 * Basic Concepts:: Why are stylesheets useful? Getting started.
|
|
924 * Pseudo-Classes/Elements:: Special classes for elements.
|
|
925 * The Cascade:: How stylesheets are combined.
|
|
926 * Properties:: What properties you can set on elements.
|
|
927 * Units:: What you can set them to.
|
0
|
928 @end menu
|
22
|
929
|
|
930 @node Terminology, Basic Concepts, Stylesheets, Stylesheets
|
|
931 @section Terminology
|
0
|
932
|
22
|
933 @table @dfn
|
|
934 @item attribute
|
|
935 HTML attribute, ie: @samp{align=center} - align is the attribute.
|
|
936 @item author
|
|
937 The author of an HTML document.
|
|
938 @item block-level element
|
|
939 An element which has a line break before and after (e.g. 'H1' in @sc{HTML}).
|
|
940 @item canvas
|
|
941 The part of the UA's drawing surface onto which documents are rendered.
|
|
942 @item child element
|
|
943 A subelement in @sc{sgml} terminology.
|
|
944 @item contextual selector
|
|
945 A selector that matches elements based on their position in the document
|
|
946 structure. A contextual selector consists of several simple
|
|
947 selectors. E.g., the contextual selector 'H1.initial B' consists of two
|
|
948 simple selectors, 'H1.initial' and 'B'.
|
|
949 @item @sc{css}
|
|
950 Cascading Style Sheets.
|
|
951 @item declaration
|
|
952 A property (e.g. 'font-size') and a corresponding value (e.g. '12pt').
|
|
953 @item designer
|
|
954 The designer of a style sheet.
|
|
955 @item document
|
|
956 @sc{html} document.
|
|
957 @item element
|
|
958 @sc{html} element.
|
|
959 @item element type
|
|
960 A generic identifier in @sc{sgml} terminology.
|
|
961 @item fictional tag sequence
|
|
962 A tool for describing the behavior of pseudo-classes and pseudo-elements.
|
|
963 @item font size
|
|
964 The size for which a font is designed. Typically, the size of a font is
|
|
965 approximately equal to the distance from the bottom of the lowest letter
|
|
966 with a descender to the top of the tallest letter with an ascender and
|
|
967 (optionally) with a diacritical mark.
|
|
968 @item @sc{html} extension
|
|
969 Markup introduced by UA vendors, most often to support certain visual
|
|
970 effects. The @sc{font}, @sc{center} and @sc{blink} elements are examples
|
|
971 of HTML extensions, as is the @sc{bgcolor} attribute. One of the goals
|
|
972 of @sc{css} is to provide an alternative to @sc{html} extensions.
|
|
973 @item inline element
|
|
974 An element which does not have a line break before and after
|
|
975 (e.g. '@sc{strong}' in @sc{html})
|
|
976 @item intrinsic dimensions
|
|
977 The width and height as defined by the element itself, not imposed by
|
|
978 the surroundings. In this specification it is assumed that all replaced
|
|
979 elements -- and only replaced elements -- come with intrinsic
|
|
980 dimensions.
|
|
981 @item parent element
|
|
982 The containing element in @sc{sgml} terminology.
|
|
983 @item pseudo-element
|
|
984 Pseudo-elements are used in @sc{css} selectors to address typographical
|
|
985 items (e.g. the first line of an element) rather than structural
|
|
986 elements.
|
|
987 @item pseudo-class
|
|
988 Pseudo-classes are used in @sc{css} selectors to allow information
|
|
989 external to the @sc{html} source (e.g. the fact that an anchor has been
|
|
990 visited or not) to classify elements.
|
|
991 @item property
|
|
992 A stylistic parameter that can be influenced through @sc{css}.
|
|
993 @item reader
|
|
994 The person for whom the document is rendered.
|
|
995 @item replaced element
|
|
996 An element that the @sc{css} formatter only knows the intrinsic
|
|
997 dimensions of. In @sc{html}, @sc{img}, @sc{input}, @sc{textarea},
|
|
998 @sc{select} and @sc{object} elements can be examples of replaced
|
|
999 elements. E.g., the content of the @sc{img} element is often replaced by
|
|
1000 the image that the @sc{src} attribute points to. @sc{css1} does not
|
|
1001 define how the intrinsic dimensions are found.
|
|
1002 @item rule
|
|
1003 A declaration (e.g. 'font-family: helvetica') and its selector
|
|
1004 (e.g. @sc{'H1'}).
|
|
1005 @item selector
|
|
1006 A string that identifies what elements the corresponding rule applies
|
|
1007 to. A selector can either be a simple selector (e.g. 'H1') or a
|
|
1008 contextual selector (e.g. @sc{'h1 b'}) which consists of several simple
|
|
1009 selectors.
|
|
1010 @item @sc{sgml}
|
|
1011 Standard Generalized Markup Language, of which @sc{html} is an
|
|
1012 application.
|
|
1013 @item simple selector
|
|
1014 A selector that matches elements based on the element type and/or
|
30
|
1015 attributes, and not the element's position in the document
|
22
|
1016 structure. E.g., 'H1.initial' is a simple selector.
|
|
1017 @item style sheet
|
|
1018 A collection of rules.
|
|
1019 @item @sc{ua}
|
|
1020 User Agent, often a web browser or web client.
|
|
1021 @item user
|
|
1022 Synonymous with reader.
|
|
1023 @item weight
|
|
1024 The priority of a rule.
|
|
1025 @end table
|
0
|
1026
|
22
|
1027 @node Basic Concepts, Pseudo-Classes/Elements, Terminology, Stylesheets
|
|
1028 @section Basic Concepts
|
26
|
1029
|
22
|
1030 Designing simple style sheets is easy. One needs only to know a little
|
|
1031 HTML and some basic desktop publishing terminology. E.g., to set the
|
|
1032 text color of 'H1' elements to blue, one can say:
|
|
1033
|
|
1034 @example
|
|
1035 H1 @{ color: blue @}
|
|
1036 @end example
|
|
1037
|
|
1038 The example above is a simple CSS rule. A rule consists of two main
|
|
1039 parts: selector ('H1') and declaration ('color: blue'). The declaration
|
|
1040 has two parts: property ('color') and value ('blue'). While the example
|
|
1041 above tries to influence only one of the properties needed for rendering
|
|
1042 an HTML document, it qualifies as a style sheet on its own. Combined
|
|
1043 with other style sheets (one fundamental feature of CSS is that style
|
|
1044 sheets are combined) it will determine the final presentation of the
|
|
1045 document.
|
|
1046
|
|
1047 The selector is the link between the HTML document and the style sheet, and
|
|
1048 all HTML element types are possible selectors.
|
|
1049
|
|
1050 @node Pseudo-Classes/Elements, The Cascade, Basic Concepts, Stylesheets
|
|
1051 @section Pseudo-Classes/Elements
|
26
|
1052
|
22
|
1053 In @sc{css1}, style is normally attached to an element based on its
|
|
1054 position in the document structure. This simple model is sufficient for
|
|
1055 a wide variety of styles, but doesn't cover some common effects. The
|
|
1056 concept of pseudo-classes and pseudo-elements extend addressing in
|
|
1057 @sc{css1} to allow external information to influence the formatting
|
|
1058 process.
|
0
|
1059
|
22
|
1060 Pseudo-classes and pseudo-elements can be used in @sc{css} selectors,
|
|
1061 but do not exist in the @sc{html} source. Rather, they are "inserted" by
|
|
1062 the @sc{ua} under certain conditions to be used for addressing in style
|
|
1063 sheets. They are referred to as "classes" and "elements" since this is a
|
|
1064 convenient way of describing their behavior. More specifically, their
|
|
1065 behavior is defined by a fictional tag sequence.
|
|
1066
|
|
1067 Pseudo-elements are used to address sub-parts of elements, while
|
|
1068 pseudo-classes allow style sheets to differentiate between different
|
|
1069 element types.
|
|
1070
|
44
|
1071 The only support pseudo-classes in Emacs/W3 are on the anchor tag
|
22
|
1072 (<a>...</a>).
|
|
1073
|
|
1074 User agents commonly display newly visited anchors differently from
|
|
1075 older ones. In @sc{css1}, this is handled through pseudo-classes on the
|
|
1076 'A' element:
|
|
1077
|
|
1078 @example
|
|
1079 A:link @{ color: red @} /* unvisited link */
|
|
1080 A:visited @{ color: blue @} /* visited links */
|
|
1081 A:active @{ color: lime @} /* active links */
|
|
1082 @end example
|
|
1083
|
|
1084 All 'A' elements with an 'HREF' attribute will be put into one and only
|
|
1085 one of these groups (i.e. target anchors are not affected). UAs may
|
|
1086 choose to move an element from 'visited' to 'link' after a certain
|
|
1087 time. An 'active' link is one that is currently being selected (e.g. by
|
|
1088 a mouse button press) by the reader.
|
0
|
1089
|
22
|
1090 The formatting of an anchor pseudo-class is as if the class had been
|
|
1091 inserted manually. A @sc{ua} is not required to reformat a currently
|
|
1092 displayed document due to anchor pseudo-class transitions. E.g., a style
|
|
1093 sheet can legally specify that the 'font-size' of an 'active' link
|
|
1094 should be larger that a 'visited' link, but the UA is not required to
|
|
1095 dynamically reformat the document when the reader selects the 'visited'
|
|
1096 link.
|
|
1097
|
|
1098 Pseudo-class selectors do not match normal classes, and vice versa. The
|
|
1099 style rule in the example below will therefore not have any influence:
|
|
1100
|
|
1101 @example
|
|
1102 A:link @{ color: red @}
|
|
1103
|
|
1104 <A CLASS=link NAME=target5> ... </A>
|
|
1105 @end example
|
0
|
1106
|
22
|
1107 In @sc{css1}, anchor pseudo-classes have no effect on elements other
|
|
1108 than 'A'. Therefore, the element type can be omitted from the selector:
|
|
1109
|
|
1110 @example
|
|
1111 A:link @{ color: red @}
|
|
1112 :link @{ color: red @}
|
|
1113 @end example
|
|
1114
|
|
1115 The two selectors above will select the same elements in CSS1.
|
|
1116
|
|
1117 Pseudo-class names are case-insensitive.
|
|
1118
|
|
1119 Pseudo-classes can be used in contextual selectors:
|
|
1120
|
|
1121 @example
|
|
1122 A:link IMG @{ border: solid blue @}
|
|
1123 @end example
|
0
|
1124
|
22
|
1125 Also, pseudo-classes can be combined with normal classes:
|
|
1126
|
|
1127 @example
|
|
1128 A.external:visited @{ color: blue @}
|
|
1129
|
|
1130 <A CLASS=external HREF="http://out.side/">external link</A>
|
|
1131 @end example
|
|
1132
|
|
1133 If the link in the above example has been visited, it will be rendered
|
|
1134 in blue. Note that normal class names precede pseudo-classes in the
|
|
1135 selector.
|
0
|
1136
|
22
|
1137 @node The Cascade, Properties, Pseudo-Classes/Elements, Stylesheets
|
|
1138 @section The Cascade
|
|
1139
|
|
1140 In @sc{css}, more than one style sheet can influence the presentation
|
|
1141 simultaneously. There are two main reasons for this feature: modularity
|
|
1142 and author/reader balance.
|
0
|
1143
|
22
|
1144 @table @i
|
|
1145 @item modularity
|
|
1146 A style sheet designer can combine several (partial) style sheets to
|
|
1147 reduce redundancy:
|
|
1148
|
|
1149 @example
|
|
1150 @@import url(http://www.style.org/pastoral);
|
|
1151 @@import url(http://www.style.org/marine);
|
0
|
1152
|
22
|
1153 H1 @{ color: red @} /* override imported sheets */
|
|
1154 @end example
|
|
1155 @item author/reader balance
|
|
1156 Both readers and authors can influence the presentation through style
|
|
1157 sheets. To do so, they use the same style sheet language thus reflecting
|
|
1158 a fundamental feature of the web: everyone can become a publisher. The
|
|
1159 @sc{ua} is free to choose the mechanism for referencing personal style
|
|
1160 sheets.
|
|
1161 @end table
|
|
1162
|
|
1163 Sometimes conflicts will arise between the style sheets that influence
|
|
1164 the presentation. Conflict resolution is based on each style rule having
|
|
1165 a weight. By default, the weights of the reader's rules are less than
|
|
1166 the weights of rules in the author's documents. I.e., if there are
|
|
1167 conflicts between the style sheets of an incoming document and the
|
|
1168 reader's personal sheets, the author's rules will be used. Both reader
|
|
1169 and author rules override the @sc{ua}'s default values.
|
0
|
1170
|
22
|
1171 The imported style sheets also cascade with each other, in the order
|
|
1172 they are imported, according to the cascading rules defined below. Any
|
|
1173 rules specified in the style sheet itself override rules in imported
|
|
1174 style sheets. That is, imported style sheets are lower in the cascading
|
|
1175 order than rules in the style sheet itself. Imported style sheets can
|
|
1176 themselves import and override other style sheets, recursively.
|
|
1177
|
|
1178 In @sc{css1}, all '@@import' statements must occur at the start of a
|
|
1179 style sheet, before any declarations. This makes it easy to see that
|
|
1180 rules in the style sheet itself override rules in the imported style
|
|
1181 sheets.
|
|
1182
|
|
1183 NOTE: The use of !important in @sc{css} stylesheets is unsupported at
|
|
1184 this time.
|
|
1185
|
|
1186 Conflicting rules are intrinsic to the CSS mechanism. To find the value
|
|
1187 for an element/property combination, the following algorithm must be
|
|
1188 followed:
|
0
|
1189
|
|
1190 @enumerate
|
|
1191 @item
|
22
|
1192 Find all declarations that apply to the element/property in
|
|
1193 question. Declarations apply if the selector matches the element in
|
|
1194 question. If no declarations apply, the inherited value is used. If
|
|
1195 there is no inherited value (this is the case for the 'HTML' element and
|
|
1196 for properties that do not inherit), the initial value is used.
|
|
1197 @item
|
|
1198 Sort the declarations by explicit weight: declarations marked
|
|
1199 '!important' carry more weight than unmarked (normal) declarations.
|
0
|
1200 @item
|
22
|
1201 Sort by origin: the author's style sheets override the reader's style
|
|
1202 sheet which override the UA's default values. An imported style sheet
|
|
1203 has the same origin as the style sheet from which it is imported.
|
0
|
1204 @item
|
22
|
1205 Sort by specificity of selector: more specific selectors will override
|
|
1206 more general ones. To find the specificity, count the number of ID
|
|
1207 attributes in the selector (a), the number of CLASS attributes in the
|
|
1208 selector (b), and the number of tag names in the selector
|
|
1209 (c). Concatenating the three numbers (in a number system with a large
|
|
1210 base) gives the specificity. Some examples:
|
|
1211 @example
|
|
1212 LI @{...@} /* a=0 b=0 c=1 -> specificity = 1 */
|
|
1213 UL LI @{...@} /* a=0 b=0 c=2 -> specificity = 2 */
|
|
1214 UL OL LI @{...@} /* a=0 b=0 c=3 -> specificity = 3 */
|
|
1215 LI.red @{...@} /* a=0 b=1 c=1 -> specificity = 11 */
|
|
1216 UL OL LI.red @{...@} /* a=0 b=1 c=3 -> specificity = 13 */
|
|
1217 #x34y @{...@} /* a=1 b=0 c=0 -> specificity = 100 */
|
|
1218 @end example
|
|
1219 Pseudo-elements and pseudo-classes are counted as normal elements and
|
|
1220 classes, respectively.
|
0
|
1221 @item
|
22
|
1222 Sort by order specified: if two rules have the same weight, the latter
|
|
1223 specified wins. Rules in imported style sheets are considered to be
|
|
1224 before any rules in the style sheet itself.
|
0
|
1225 @end enumerate
|
|
1226
|
22
|
1227 The search for the property value can be terminated whenever one rule
|
|
1228 has a higher weight than the other rules that apply to the same
|
|
1229 element/property combination.
|
|
1230
|
|
1231 This strategy gives author's style sheets considerably higher weight
|
|
1232 than those of the reader. It is therefore important that the reader has
|
|
1233 the ability to turn off the influence of a certain style sheet,
|
|
1234 e.g. through a pull-down menu.
|
|
1235
|
|
1236 A declaration in the 'STYLE' attribute of an element has the same weight
|
|
1237 as a declaration with an ID-based selector that is specified at the end
|
|
1238 of the style sheet:
|
|
1239
|
|
1240 @example
|
|
1241 <STYLE TYPE="text/css">
|
|
1242 #x97z @{ color: blue @}
|
|
1243 </STYLE>
|
|
1244
|
|
1245 <P ID=x97z STYLE="color: red">
|
|
1246 @end example
|
|
1247
|
|
1248 In the above example, the color of the 'P' element would be
|
|
1249 red. Although the specificity is the same for both declarations, the
|
|
1250 declaration in the 'STYLE' attribute will override the one in the
|
|
1251 'STYLE' element because of cascading rule number 5.
|
|
1252
|
24
|
1253 The @sc{ua} may choose to honor other stylistic @sc{html} attributes,
|
|
1254 for example 'ALIGN'. If so, these attributes are translated to the
|
|
1255 corresponding @sc{css} rules with specificity equal to 1. The rules are
|
|
1256 assumed to be at the start of the author style sheet and may be
|
|
1257 overridden by subsequent style sheet rules. In a transition phase, this
|
|
1258 policy will make it easier for stylistic attributes to coexist with
|
|
1259 style sheets.
|
22
|
1260
|
26
|
1261 @node Properties, Units, The Cascade, Stylesheets
|
22
|
1262 @section Properties
|
24
|
1263
|
|
1264 In the text below, the allowed values for each property are listed
|
|
1265 with a syntax like the following:
|
|
1266
|
|
1267 @example
|
|
1268 Value: N | NW | NE
|
|
1269 Value: [ <length> | thick | thin ]@{1,4@}
|
|
1270 Value: <uri>? <color> [ / <color> ]?
|
|
1271 Value: <uri> || <color>
|
|
1272 @end example
|
|
1273
|
|
1274 The words between < and > give a type of value. The most common types
|
|
1275 are <length>, <percentage>, <url>, <number>and <color> these are
|
|
1276 described in the section on [[units]]. The more specialized types
|
|
1277 (e.g. <font-family>and <border-style>) are described under the property
|
|
1278 where they appear.
|
|
1279
|
|
1280 Other words are keywords that must appear literally, without quotes. The
|
|
1281 slash (/) and the comma (,) must also appear literally.
|
|
1282
|
|
1283 Several things juxtaposed mean that all of them must occur, in the given
|
|
1284 order. A bar (|) separates alternatives: one of them must occur. A
|
|
1285 double bar (A || B) means that either A or B or both must occur, in any
|
|
1286 order. Brackets ([]) are for grouping. Juxtaposition is stronger than
|
|
1287 the double bar, and the double bar is stronger than the bar. Thus "a b |
|
|
1288 c || d e" is equivalent to "[ a b ] | [ c || [ d e ]]".
|
|
1289
|
|
1290 Every type, keyword, or bracketed group may be followed by one of the
|
|
1291 following modifiers:
|
|
1292
|
|
1293 @itemize @bullet
|
|
1294 @item
|
|
1295 An asterisk (*) indicates that the preceding type, word or group is
|
|
1296 repeated zero or more times.
|
|
1297 @item
|
|
1298 A plus (+) indicates that the preceding type, word or group is repeated
|
|
1299 one or more times.
|
|
1300 @item
|
|
1301 A question mark (?) indicates that the preceding type, word or group is
|
|
1302 optional.
|
|
1303 @item
|
|
1304 A pair of numbers in curly braces (@{A,B@}) indicates that the preceding
|
|
1305 type, word or group is repeated at least A and at most B times.
|
|
1306 @end itemize
|
|
1307
|
|
1308 Other than the value the following information is also shown.
|
|
1309
|
|
1310 @multitable @columnfractions .20 .8
|
|
1311 @item Supported Values: @tab If this is present, it lists the parts of
|
44
|
1312 the specification that Emacs/W3 currently supports.
|
24
|
1313 @item Unsupported Values: @tab If this is present, it represents the
|
44
|
1314 parts of the specifcation that Emacs/W3 does not support.
|
24
|
1315 @item Initial: @tab The default value for the property, unless
|
|
1316 explicitly set in a stylesheet.
|
|
1317 @item Applies to: @tab What type of elements this property can be attached to.
|
|
1318 @item Inherited: @tab Yes or no
|
|
1319 @item Percentage values: @tab What a percentage value applies to when given.
|
|
1320 @end multitable
|
|
1321
|
22
|
1322 @menu
|
|
1323 * Font Properties:: Selecting fonts, styles, and sizes.
|
|
1324 * Colors and Backgrounds:: Controlling colors, front and back.
|
|
1325 * Text Properties:: Alignment, decoration, and more!
|
|
1326 * Box Properties:: Borders, padding, and margins, oh my!
|
|
1327 * Classification:: Changing whitespace and display policies.
|
24
|
1328 * Media Selection:: Conditionalize stylesheets on media-type.
|
|
1329 * Speech Properties:: Speech output controlled by stylesheets.
|
22
|
1330 @end menu
|
26
|
1331
|
|
1332 @node Font Properties, Colors and Backgrounds, Properties, Properties
|
22
|
1333 @subsection Font Properties
|
26
|
1334
|
22
|
1335 Setting font properties will be among the most common uses of style
|
|
1336 sheets. Unfortunately, there exists no well-defined and universally
|
|
1337 accepted taxonomy for classifying fonts, and terms that apply to one
|
|
1338 font family may not be appropriate for others. E.g. 'italic' is commonly
|
|
1339 used to label slanted text, but slanted text may also be labeled as
|
|
1340 being @b{Oblique}, @b{Slanted}, @b{Incline}, @b{Cursive} or
|
|
1341 @b{Kursiv}. Therefore it is not a simple problem to map typical font
|
|
1342 selection properties to a specific font.
|
|
1343
|
|
1344 The properties defined by CSS1 are described in the following sections.
|
|
1345 @menu
|
|
1346 * font-family:: Groups of fonts.
|
|
1347 * font-style:: Normal, italic, or oblique?
|
|
1348 * font-variant:: Small-caps, etc.
|
|
1349 * font-weight:: How bold can you go?
|
|
1350 * font-size:: How big is yours?
|
|
1351 * font:: Shorthand for all of the above.
|
|
1352 @end menu
|
|
1353
|
|
1354 @node font-family, font-style, Font Properties, Font Properties
|
|
1355 @subsubsection font-family
|
|
1356
|
|
1357 @multitable @columnfractions .20 .8
|
|
1358 @item Supported Values: @tab [[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
|
|
1359 @item Initial: @tab User specific
|
|
1360 @item Applies to: @tab all elements
|
|
1361 @item Inherited: @tab yes
|
|
1362 @item Percentage values: @tab N/A
|
|
1363 @end multitable
|
|
1364 The value is a prioritized list of font family names and/or generic
|
|
1365 family names. Unlike most other CSS1 properties, values are separated
|
|
1366 by a comma to indicate that they are alternatives:
|
|
1367
|
|
1368 @example
|
|
1369 BODY @{ font-family: gill, helvetica, sans-serif @}
|
|
1370 @end example
|
|
1371
|
|
1372 There are two types of list values:
|
|
1373
|
|
1374 @table @b
|
|
1375 @item <family-name>
|
|
1376 The name of a font family of choice. In the last example, "gill" and
|
|
1377 "helvetica" are font families.
|
|
1378 @item <generic-family>
|
|
1379 In the example above, the last value is a generic family name. The
|
|
1380 following generic families are defined:
|
|
1381 @itemize @bullet
|
|
1382 @item
|
|
1383 'serif' (e.g. Times)
|
|
1384 @item
|
|
1385 'sans-serif' (e.g. Helvetica)
|
|
1386 @item
|
|
1387 'cursive' (e.g. Zapf-Chancery)
|
|
1388 @item
|
|
1389 'fantasy' (e.g. Western)
|
|
1390 @item
|
|
1391 'monospace' (e.g. Courier)
|
|
1392 @end itemize
|
|
1393 @end table
|
0
|
1394
|
22
|
1395 Style sheet designers are encouraged to offer a generic font family as a
|
|
1396 last alternative.
|
|
1397
|
|
1398 Font names containing whitespace should be quoted:
|
|
1399
|
|
1400 @example
|
|
1401 BODY @{ font-family: "new century schoolbook", serif @}
|
|
1402
|
|
1403 <BODY STYLE="font-family: 'My own font', fantasy">
|
|
1404 @end example
|
|
1405
|
|
1406 If quoting is omitted, any whitespace characters before and after the
|
|
1407 font name are ignored and any sequence of whitespace characters inside
|
|
1408 the font name is converted to a single space.
|
|
1409
|
|
1410 @node font-style, font-variant, font-family, Font Properties
|
|
1411 @subsubsection font-style
|
|
1412
|
|
1413 @multitable @columnfractions .2 .8
|
|
1414 @item Supported Values: @tab normal | italic | oblique
|
|
1415 @item Initial: @tab normal
|
|
1416 @item Applies to: @tab all elements
|
|
1417 @item Inherited: @tab yes
|
|
1418 @item Percentage values: @tab N/A
|
|
1419 @end multitable
|
|
1420
|
|
1421 The 'font-style' property selects between normal (sometimes referred to
|
|
1422 as "roman" or "upright"), italic and oblique faces within a font family.
|
|
1423
|
|
1424 A value of 'normal' selects a font that is classified as 'normal' in the
|
|
1425 UA's font database, while 'oblique' selects a font that is labeled
|
|
1426 'oblique'. A value of 'italic' selects a font that is labeled 'italic',
|
|
1427 or, if that is not available, one labeled 'oblique'.
|
|
1428
|
|
1429 The font that is labeled 'oblique' in the UA's font database may
|
|
1430 actually have been generated by electronically slanting a normal font.
|
|
1431
|
|
1432 Fonts with Oblique, Slanted or Incline in their names will typically be
|
|
1433 labeled 'oblique' in the UA's font database. Fonts with Italic, Cursive
|
|
1434 or Kursiv in their names will typically be labeled 'italic'.
|
|
1435
|
|
1436 @example
|
|
1437 H1, H2, H3 @{ font-style: italic @}
|
|
1438 H1 EM @{ font-style: normal @}
|
|
1439 @end example
|
|
1440
|
|
1441 In the example above, emphasized text within 'H1' will appear in a
|
|
1442 normal face.
|
|
1443
|
|
1444 @node font-variant, font-weight, font-style, Font Properties
|
|
1445 @subsubsection font-variant
|
0
|
1446
|
22
|
1447 @multitable @columnfractions .2 .8
|
|
1448 @item Value: @tab normal | small-caps
|
|
1449 @item Initial: @tab normal
|
|
1450 @item Applies to: @tab all elements
|
|
1451 @item Inherited: @tab yes
|
|
1452 @item Percentage values: @tab N/A
|
|
1453 @end multitable
|
|
1454
|
|
1455 Another type of variation within a font family is the small-caps. In a
|
|
1456 small-caps font the lower case letters look similar to the uppercase
|
|
1457 ones, but in a smaller size and with slightly different proportions. The
|
|
1458 'font-variant' property selects that font.
|
|
1459
|
|
1460 A value of 'normal' selects a font that is not a small-caps font,
|
|
1461 'small-caps' selects a small-caps font. It is acceptable (but not
|
|
1462 required) in CSS1 if the small-caps font is a created by taking a normal
|
|
1463 font and replacing the lower case letters by scaled uppercase
|
|
1464 characters. As a last resort, uppercase letters will be used as
|
|
1465 replacement for a small-caps font.
|
|
1466
|
|
1467 The following example results in an 'H3' element in small-caps, with
|
|
1468 emphasized words in oblique small-caps:
|
|
1469
|
|
1470 @example
|
|
1471 H3 @{ font-variant: small-caps @}
|
|
1472 EM @{ font-style: oblique @}
|
|
1473 @end example
|
0
|
1474
|
22
|
1475 There may be other variants in the font family as well, such as fonts
|
|
1476 with old-style numerals, small-caps numerals, condensed or expanded
|
|
1477 letters, etc. CSS1 has no properties that select those.
|
|
1478
|
|
1479 @node font-weight, font-size, font-variant, Font Properties
|
|
1480 @subsubsection font-weight
|
|
1481
|
|
1482 @multitable @columnfractions .2 .8
|
|
1483 @item Supported Values: @tab normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
|
|
1484 @item Unsupported Values: @tab bolder | lighter
|
|
1485 @item Initial: @tab normal
|
|
1486 @item Applies to: @tab all elements
|
|
1487 @item Inherited: @tab yes
|
|
1488 @item Percentage values: @tab N/A
|
|
1489 @end multitable
|
|
1490
|
|
1491 The 'font-weight' property selects the weight of the font. The values
|
|
1492 '100' to '900' form an ordered sequence, where each number indicates a
|
|
1493 weight that is at least as dark as its predecessor. The keyword 'normal'
|
|
1494 is synonymous with '400', and 'bold' is synonymous with '700'. Keywords
|
|
1495 other than 'normal' and 'bold' have been shown to be often confused with
|
|
1496 font names and a numerical scale was therefore chosen for the 9-value
|
|
1497 list.
|
|
1498
|
0
|
1499 @example
|
22
|
1500 P @{ font-weight: normal @} /* 400 */
|
|
1501 H1 @{ font-weight: 700 @} /* bold */
|
|
1502 @end example
|
|
1503
|
|
1504 The 'bolder' and 'lighter' values select font weights that are relative
|
|
1505 to the weight inherited from the parent:
|
|
1506
|
|
1507 @example
|
|
1508 STRONG @{ font-weight: bolder @}
|
0
|
1509 @end example
|
|
1510
|
22
|
1511 There is no guarantee that there will be a darker face for each of the
|
|
1512 'font-weight' values; for example, some fonts may have only a normal and
|
|
1513 a bold face, others may have eight different face weights. There is no
|
|
1514 guarantee on how a UA will map font faces within a family to weight
|
|
1515 values. The only guarantee is that a face of a given value will be no
|
|
1516 less dark than the faces of lighter values.
|
|
1517
|
|
1518 @node font-size, font, font-weight, Font Properties
|
|
1519 @subsubsection font-size
|
|
1520
|
|
1521 @multitable @columnfractions .2 .8
|
|
1522 @item Supported Values: @tab <absolute-size> | <length>
|
|
1523 @item Unsupported Values: @tab <percentage> | <relative-size>
|
|
1524 @item Initial: @tab medium
|
|
1525 @item Applies to: @tab all elements
|
|
1526 @item Inherited: @tab yes
|
|
1527 @item Percentage values: @tab relative to parent element's font size
|
|
1528 @end multitable
|
|
1529
|
|
1530 @table @b
|
|
1531 @item <absolute-size>
|
|
1532 An <absolute-size> keyword is an index to a table of font sizes computed
|
|
1533 and kept by the UA. Possible values are:
|
|
1534 @itemize @bullet
|
|
1535 @item
|
|
1536 xx-small
|
|
1537 @item
|
|
1538 x-small
|
|
1539 @item
|
|
1540 small
|
|
1541 @item
|
|
1542 medium
|
|
1543 @item
|
|
1544 large
|
|
1545 @item
|
|
1546 x-large
|
|
1547 @item
|
|
1548 xx-large
|
|
1549 @end itemize
|
|
1550
|
|
1551 On a computer screen a scaling factor of 1.5 is suggested between
|
|
1552 adjacent indexes; if the 'medium' font is 10pt, the 'large' font could
|
|
1553 be 15pt. Different media may need different scaling factors. Also, the
|
|
1554 UA should take the quality and availability of fonts into account when
|
|
1555 computing the table. The table may be different from one font family to
|
|
1556 another.
|
|
1557 @item <relative-size>
|
|
1558 A <relative-size> keyword is interpreted relative to the table of font
|
|
1559 sizes and the font size of the parent element. Possible values are
|
|
1560 @b{larger} or @b{smaller}. For example, if the parent element has a font
|
|
1561 size of 'medium', a value of 'larger' will make the font size of the
|
|
1562 current element be 'large'. If the parent element's size is not close to
|
|
1563 a table entry, the UA is free to interpolate between table entries or
|
|
1564 round off to the closest one. The UA may have to extrapolate table
|
|
1565 values if the numerical value goes beyond the keywords.
|
|
1566 @end table
|
|
1567
|
|
1568 Length and percentage values should not take the font size table into
|
|
1569 account when calculating the font size of the element.
|
|
1570
|
|
1571 Negative values are not allowed.
|
|
1572
|
|
1573 On all other properties, 'em' and 'ex' length values refer to the font
|
|
1574 size of the current element. On the 'font-size' property, these length
|
|
1575 units refer to the font size of the parent element.
|
|
1576
|
|
1577 Note that an application may reinterpret an explicit size, depending on
|
|
1578 the context. E.g., inside a VR scene a font may get a different size
|
|
1579 because of perspective distortion.
|
|
1580
|
|
1581 Examples:
|
|
1582
|
|
1583 @example
|
|
1584 P @{ font-size: 12pt; @}
|
|
1585 BLOCKQUOTE @{ font-size: larger @}
|
|
1586 EM @{ font-size: 150% @}
|
|
1587 EM @{ font-size: 1.5em @}
|
|
1588 @end example
|
|
1589
|
|
1590 If the suggested scaling factor of 1.5 is used, the last three
|
|
1591 declarations are identical.
|
|
1592
|
26
|
1593 @node font, , font-size, Font Properties
|
22
|
1594 @subsubsection font
|
|
1595
|
|
1596 @multitable @columnfractions .2 .8
|
|
1597 @item Value: @tab [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family>
|
|
1598 @item Initial: @tab not defined for shorthand properties
|
|
1599 @item Applies to: @tab all elements
|
|
1600 @item Inherited: @tab yes
|
|
1601 @item Percentage values: @tab allowed on <font-size> and <line-height>
|
|
1602 @end multitable
|
|
1603 The 'font' property is a shorthand property for setting 'font-style'
|
|
1604 'font-variant' 'font-weight' 'font-size', 'line-height' and
|
|
1605 'font-family' at the same place in the style sheet. The syntax of this
|
|
1606 property is based on a traditional typographical shorthand notation to
|
|
1607 set multiple properties related to fonts.
|
|
1608
|
|
1609 For a definition of allowed and initial values, see the previously
|
|
1610 defined properties. Properties for which no values are given are set to
|
|
1611 their initial value.
|
|
1612
|
|
1613 @example
|
|
1614 P @{ font: 12pt/14pt sans-serif @}
|
|
1615 P @{ font: 80% sans-serif @}
|
|
1616 P @{ font: x-large/110% "new century schoolbook", serif @}
|
|
1617 P @{ font: bold italic large Palatino, serif @}
|
|
1618 P @{ font: normal small-caps 120%/120% fantasy @}
|
|
1619 @end example
|
|
1620
|
|
1621 In the second rule, the font size percentage value ('80%') refers to the
|
|
1622 font size of the parent element. In the third rule, the line height
|
|
1623 percentage refers to the font size of the element itself.
|
|
1624
|
|
1625 In the first three rules above, the 'font-style', 'font-variant' and
|
|
1626 'font-weight' are not explicitly mentioned, which means they are all
|
|
1627 three set to their initial value ('normal'). The fourth rule sets the
|
|
1628 'font-weight' to 'bold', the 'font-style' to 'italic' and implicitly
|
|
1629 sets 'font-variant' to 'normal'.
|
|
1630
|
|
1631 The fifth rule sets the 'font-variant' ('small-caps'), the 'font-size'
|
|
1632 (120% of the parent's font), the 'line-height' (120% times the font
|
|
1633 size) and the 'font-family' ('fantasy'). It follows that the keyword
|
|
1634 'normal' applies to the two remaining properties: 'font-style' and
|
|
1635 'font-weight'.
|
|
1636
|
26
|
1637 @node Colors and Backgrounds, Text Properties, Font Properties, Properties
|
22
|
1638 @subsection Colors and Backgrounds
|
26
|
1639
|
22
|
1640 These properties describe the color (often called foreground color) and
|
|
1641 background of an element (i.e. the surface onto which the content is
|
|
1642 rendered). One can set a background color and/or a background image. The
|
|
1643 position of the image, if/how it is repeated, and whether it is fixed or
|
|
1644 scrolled relative to the canvas can also be set.
|
|
1645
|
|
1646 The 'color' property inherits normally. The background properties do not
|
|
1647 inherit, but the parent element's background will shine through by
|
|
1648 default because of the initial 'transparent' value on
|
|
1649 'background-color'.
|
|
1650
|
44
|
1651 NOTE: Currently, Emacs/W3 can only show background images under XEmacs.
|
22
|
1652 Emacs 19 doesn't have the support in its display code yet.
|
|
1653
|
|
1654 @menu
|
26
|
1655 * color:: Foreground colors.
|
|
1656 * background-color:: Background colors.
|
|
1657 * background-image:: Background images.
|
|
1658 * background-repeat:: Controlling repeating of background images.
|
|
1659 * background-attachment:: Where background images are drawn.
|
|
1660 * background-position:: Where background images are drawn.
|
|
1661 * background:: Shorthand for all background properties.
|
22
|
1662 @end menu
|
|
1663
|
|
1664 @node color, background-color, Colors and Backgrounds, Colors and Backgrounds
|
|
1665 @subsubsection color
|
26
|
1666
|
22
|
1667 @multitable @columnfractions .2 .8
|
|
1668 @item Value: @tab <color>
|
|
1669 @item Initial: @tab User specific
|
|
1670 @item Applies to: @tab all elements
|
|
1671 @item Inherited: @tab yes
|
|
1672 @item Percentage values: @tab N/A
|
|
1673 @end multitable
|
|
1674
|
|
1675 This property describes the text color of an element (often referred to
|
|
1676 as the foreground color). There are different ways to specify red:
|
|
1677
|
|
1678 @example
|
|
1679 EM @{ color: red @} /* natural language */
|
|
1680 EM @{ color: rgb(255,0,0) @} /* RGB range 0-255 */
|
|
1681 @end example
|
|
1682
|
|
1683 See @ref{Color Units} for a description of possible color values.
|
0
|
1684
|
22
|
1685 @node background-color, background-image, color, Colors and Backgrounds
|
|
1686 @subsubsection background-color
|
26
|
1687
|
22
|
1688 @multitable @columnfractions .2 .8
|
|
1689 @item Value: @tab <color> | transparent
|
|
1690 @item Initial: @tab transparent
|
|
1691 @item Applies to: @tab all elements
|
|
1692 @item Inherited: @tab no
|
|
1693 @item Percentage values: @tab N/A
|
|
1694 @end multitable
|
|
1695
|
|
1696 This property sets the background color of an element.
|
|
1697
|
|
1698 @example
|
|
1699 H1 @{ background-color: #F00 @}
|
|
1700 @end example
|
|
1701
|
|
1702 @node background-image, background-repeat, background-color, Colors and Backgrounds
|
|
1703 @subsubsection background-image
|
26
|
1704
|
22
|
1705 @multitable @columnfractions .2 .8
|
|
1706 @item Value: @tab <url> | none
|
|
1707 @item Initial: @tab none
|
|
1708 @item Applies to: @tab all elements
|
|
1709 @item Inherited: @tab no
|
|
1710 @item Percentage values: @tab N/A
|
|
1711 @end multitable
|
|
1712
|
|
1713 This property sets the background image of an element. When setting a
|
|
1714 background image, one should also set a background color that will be
|
|
1715 used when the image is unavailable. When the image is available, it is
|
|
1716 overlaid on top of the background color.
|
|
1717
|
|
1718 @example
|
24
|
1719 BODY @{ background-image: url(marble.png) @}
|
22
|
1720 P @{ background-image: none @}
|
|
1721 @end example
|
|
1722
|
|
1723 @node background-repeat, background-attachment, background-image, Colors and Backgrounds
|
|
1724 @subsubsection background-repeat
|
26
|
1725
|
44
|
1726 This property is not supported at all under Emacs/W3.
|
22
|
1727
|
|
1728 @node background-attachment, background-position, background-repeat, Colors and Backgrounds
|
|
1729 @subsubsection background-attachment
|
26
|
1730
|
44
|
1731 This property is not supported at all under Emacs/W3.
|
22
|
1732
|
|
1733 @node background-position, background, background-attachment, Colors and Backgrounds
|
|
1734 @subsubsection background-position
|
26
|
1735
|
44
|
1736 This property is not supported at all under Emacs/W3.
|
22
|
1737
|
26
|
1738 @node background, , background-position, Colors and Backgrounds
|
22
|
1739 @subsubsection background
|
26
|
1740
|
22
|
1741 @multitable @columnfractions .2 .8
|
|
1742 @item Value: @tab <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
|
|
1743 @item Initial: @tab not defined for shorthand properties
|
|
1744 @item Applies to: @tab all elements
|
|
1745 @item Inherited: @tab no
|
|
1746 @item Percentage values: @tab allowed on <background-position>
|
|
1747 @end multitable
|
|
1748
|
|
1749 The 'background' property is a shorthand property for setting the
|
|
1750 individual background properties (i.e., 'background-color',
|
|
1751 'background-image', 'background-repeat', 'background-attachment' and
|
|
1752 'background-position') at the same place in the style sheet.
|
|
1753
|
|
1754 Possible values on the 'background' properties are the set of all
|
|
1755 possible values on the individual properties.
|
|
1756
|
|
1757 @example
|
|
1758 BODY @{ background: red @}
|
|
1759 P @{ background: url(chess.png) gray 50% repeat fixed @}
|
|
1760 @end example
|
|
1761
|
|
1762 The 'background' property always sets all the individual background
|
|
1763 properties. In the first rule of the above example, only a value for
|
|
1764 'background-color' has been given and the other individual properties
|
|
1765 are set to their initial value. In the second rule, all individual
|
|
1766 properties have been specified.
|
|
1767
|
26
|
1768 @node Text Properties, Box Properties, Colors and Backgrounds, Properties
|
22
|
1769 @subsection Text Properties
|
|
1770
|
|
1771 @menu
|
|
1772 * word-spacing::
|
|
1773 * letter-spacing::
|
|
1774 * text-decoration::
|
|
1775 * vertical-align::
|
|
1776 * text-transform::
|
|
1777 * text-align::
|
|
1778 * text-indent::
|
|
1779 * line-height::
|
|
1780 @end menu
|
0
|
1781
|
22
|
1782 @node word-spacing, letter-spacing, Text Properties, Text Properties
|
|
1783 @subsubsection word-spacing
|
26
|
1784
|
22
|
1785 @multitable @columnfractions .2 .8
|
24
|
1786 @item Supported Values: @tab normal
|
|
1787 @item Unsupported Values: @tab <length>
|
|
1788 @item Initial: @tab normal
|
|
1789 @item Applies to: @tab all elements
|
|
1790 @item Inherited: @tab yes
|
|
1791 @item Percentage values: @tab N/A
|
22
|
1792 @end multitable
|
|
1793
|
24
|
1794 The length unit indicates an addition to the default space between
|
|
1795 words. Values can be negative, but there may be implementation-specific
|
|
1796 limits. The UA is free to select the exact spacing algorithm. The word
|
|
1797 spacing may also be influenced by justification (which is a value of the
|
|
1798 'align' property).
|
|
1799
|
|
1800 @example
|
|
1801 H1 @{ word-spacing: 0.4em @}
|
|
1802 @end example
|
|
1803
|
|
1804 Here, the word-spacing between each word in 'H1' elements would be
|
|
1805 increased by '1em'.
|
|
1806
|
44
|
1807 NOTE: Emacs/W3 cannot currently support this, due to limitations in
|
24
|
1808 Emacs. It may be implemented in the future.
|
|
1809
|
22
|
1810 @node letter-spacing, text-decoration, word-spacing, Text Properties
|
|
1811 @subsubsection letter-spacing
|
26
|
1812
|
22
|
1813 @multitable @columnfractions .2 .8
|
26
|
1814 @item Supported Values: @tab normal
|
24
|
1815 @item Unsupported Values: @tab <length>
|
|
1816 @item Initial: @tab normal
|
|
1817 @item Applies to: @tab all elements
|
|
1818 @item Inherited: @tab yes
|
|
1819 @item Percentage values: @tab N/A
|
22
|
1820 @end multitable
|
|
1821
|
24
|
1822 The length unit indicates an addition to the default space between
|
|
1823 characters. Values can be negative, but there may be
|
|
1824 implementation-specific limits. The UA is free to select the exact
|
|
1825 spacing algorithm. The letter spacing may also be influenced by
|
|
1826 justification (which is a value of the 'align' property).
|
|
1827
|
|
1828 @example
|
|
1829 BLOCKQUOTE @{ letter-spacing: 0.1em @}
|
|
1830 @end example
|
|
1831
|
|
1832 Here, the letter-spacing between each character in 'BLOCKQUOTE' elements
|
|
1833 would be increased by '0.1em'.
|
|
1834
|
44
|
1835 NOTE: Emacs/W3 cannot currently support this, due to limitations in
|
24
|
1836 Emacs. It may be implemented in the future.
|
|
1837
|
26
|
1838 @node text-decoration, vertical-align, letter-spacing, Text Properties
|
22
|
1839 @subsubsection text-decoration
|
26
|
1840
|
22
|
1841 @multitable @columnfractions .2 .8
|
24
|
1842 @item Supported Values: @tab none | underline | line-through | blink
|
|
1843 @item Unsupported Values: @tab overline
|
|
1844 @item Initial: @tab none
|
|
1845 @item Applies to: @tab all elements
|
|
1846 @item Inherited: @tab no, but see clarification below
|
|
1847 @item Percentage values: @tab N/A
|
22
|
1848 @end multitable
|
|
1849
|
24
|
1850 This property describes decorations that are added to the text of an
|
|
1851 element. If the element has no text (e.g. the 'IMG' element in HTML) or
|
|
1852 is an empty element (e.g. '<EM></EM>'), this property has no effect. A
|
|
1853 value of 'blink' causes the text to blink.
|
|
1854
|
|
1855 The color(s) required for the text decoration should be derived from the
|
|
1856 'color' property value.
|
|
1857
|
|
1858 This property is not inherited, but elements should match their
|
|
1859 parent. E.g., if an element is underlined, the line should span the
|
|
1860 child elements. The color of the underlining will remain the same even
|
|
1861 if descendant elements have different 'color' values.
|
|
1862
|
|
1863 @example
|
|
1864 A:link, A:visited, A:active @{ text-decoration: underline @}
|
|
1865 @end example
|
|
1866
|
|
1867 The example above would underline the text of all links (i.e., all 'A'
|
|
1868 elements with a 'HREF' attribute).
|
|
1869
|
|
1870 NOTE: The 'line-through' property is only supported under XEmacs
|
|
1871 currently. A patch has been sent to the Emacs maintainers to add
|
|
1872 support for this, but it has not made it into the main distribution
|
|
1873 yet.
|
|
1874
|
22
|
1875 @node vertical-align, text-transform, text-decoration, Text Properties
|
|
1876 @subsubsection vertical-align
|
26
|
1877
|
44
|
1878 This is currently unsupported in Emacs/W3.
|
22
|
1879
|
|
1880 @node text-transform, text-align, vertical-align, Text Properties
|
|
1881 @subsubsection text-transform
|
26
|
1882
|
22
|
1883 @multitable @columnfractions .2 .8
|
24
|
1884 @item Supported Values: @tab none
|
|
1885 @item Unsupported Values: @tab capitalize | uppercase | lowercase
|
|
1886 @item Initial: @tab none
|
|
1887 @item Applies to: @tab all elements
|
|
1888 @item Inherited: @tab yes
|
|
1889 @item Percentage values: @tab N/A
|
22
|
1890 @end multitable
|
|
1891
|
24
|
1892 @table @b
|
|
1893 @item 'capitalize'
|
|
1894 Uppercases the first character of each word.
|
|
1895 @item 'uppercase'
|
|
1896 Uppercases all letters of the element.
|
|
1897 @item 'lowercase'
|
|
1898 Lowercases all letters of the element.
|
|
1899 @item 'none'
|
|
1900 Neutralizes inherited value.
|
|
1901 @end table
|
|
1902
|
|
1903 The actual transformation in each case is human language dependent.
|
|
1904
|
|
1905 @example
|
|
1906 H1 @{ text-transform: uppercase @}
|
|
1907 @end example
|
|
1908
|
|
1909 The example above would put 'H1' elements in uppercase text.
|
|
1910
|
44
|
1911 NOTE: This capability was in the previous version of Emacs/W3, but has
|
24
|
1912 not been reimplemented in the new display code yet. Please feel free to
|
|
1913 send me patches.
|
|
1914
|
22
|
1915 @node text-align, text-indent, text-transform, Text Properties
|
|
1916 @subsubsection text-align
|
26
|
1917
|
22
|
1918 @multitable @columnfractions .2 .8
|
24
|
1919 @item Value: @tab left | right | center | justify
|
|
1920 @item Initial: @tab User specific
|
|
1921 @item Applies to: @tab block-level elements
|
|
1922 @item Inherited: @tab yes
|
|
1923 @item Percentage values: @tab N/A
|
22
|
1924 @end multitable
|
|
1925
|
24
|
1926 This property describes how text is aligned within the element. The
|
|
1927 actual justification algorithm used is UA and human language dependent.
|
|
1928
|
|
1929 Example:
|
|
1930 @example
|
|
1931 DIV.center @{ text-align: center @}
|
|
1932 @end example
|
|
1933
|
|
1934 Since 'text-align' inherits, all block-level elements inside the 'DIV'
|
|
1935 element with 'CLASS=center' will be centered. Note that alignments are
|
|
1936 relative to the width of the element, not the canvas.
|
|
1937
|
22
|
1938 @node text-indent, line-height, text-align, Text Properties
|
24
|
1939 @subsubsection text-indent
|
26
|
1940
|
44
|
1941 Not currently implemented in Emacs/W3.
|
22
|
1942
|
26
|
1943 @node line-height, , text-indent, Text Properties
|
24
|
1944 @subsubsection line-height
|
26
|
1945
|
44
|
1946 Not currently implemented in Emacs/W3.
|
22
|
1947
|
26
|
1948 @node Box Properties, Classification, Text Properties, Properties
|
22
|
1949 @subsection Box Properties
|
26
|
1950
|
22
|
1951 @multitable @columnfractions .2 .8
|
|
1952 @end multitable
|
0
|
1953
|
26
|
1954 @node Classification, Media Selection, Box Properties, Properties
|
22
|
1955 @subsection Classification
|
26
|
1956
|
24
|
1957 These properties classify elements into categories more than they set
|
|
1958 specific visual parameters.
|
|
1959
|
|
1960 The list-style properties describe how list items (i.e. elements with a
|
|
1961 'display' value of 'list-item') are formatted. The list-style properties
|
|
1962 can be set on any element, and it will inherit normally down the
|
|
1963 tree. However, they will only be have effect on elements with a
|
|
1964 'display' value of 'list-item'. In HTML this is typically the case for
|
|
1965 the 'LI' element.
|
|
1966
|
|
1967 @menu
|
26
|
1968 * display::
|
|
1969 * white-space::
|
|
1970 * list-style-type::
|
|
1971 * list-style-image::
|
|
1972 * list-style-position::
|
|
1973 * list-style::
|
24
|
1974 @end menu
|
|
1975
|
|
1976 @node display, white-space, Classification, Classification
|
|
1977 @subsubsection display
|
26
|
1978
|
24
|
1979 @multitable @columnfractions .2 .8
|
|
1980 @item Value: @tab block | inline | list-item | none
|
|
1981 @item Extensions: @tab line
|
|
1982 @item Initial: @tab inline
|
|
1983 @item Applies to: @tab all elements
|
|
1984 @item Inherited: @tab no
|
|
1985 @item Percentage values: @tab N/A
|
|
1986 @end multitable
|
|
1987
|
|
1988 This property describes how/if an element is displayed on the canvas
|
|
1989 (which may be on a printed page, a computer display etc.).
|
|
1990
|
|
1991 An element with a 'display' value of 'block' opens whitespace suitable
|
|
1992 for a paragraph break. Typically, elements like 'H1' and 'P' are of
|
|
1993 type 'block'. A value of 'list-item' is similar to 'block' except that a
|
|
1994 list-item marker is added. In HTML, 'LI' will typically have this value.
|
|
1995
|
|
1996 An element with a 'display' value of 'inline' results in a new inline
|
|
1997 box on the same line as the previous content.
|
|
1998
|
|
1999 A value of 'none' turns off the display of the element, including
|
|
2000 children elements and the surrounding box.
|
|
2001
|
|
2002 @example
|
|
2003 P @{ display: block @}
|
|
2004 EM @{ display: inline @}
|
|
2005 LI @{ display: list-item @}
|
|
2006 IMG @{ display: none @}
|
|
2007 @end example
|
|
2008
|
|
2009 The last rule turns off the display of images.
|
|
2010
|
44
|
2011 A value of 'line' results in a single line break. Emacs/W3 needs this
|
24
|
2012 extension to be able to fully specify the behaviour of @sc{br} and
|
|
2013 @sc{hr} elements within a stylesheet.
|
|
2014
|
44
|
2015 NOTE: Emacs/W3 defaults to using 'inline' for this property, which is a
|
24
|
2016 slight deviation from the specification.
|
|
2017
|
|
2018 @node white-space, list-style-type, display, Classification
|
|
2019 @subsubsection white-space
|
26
|
2020
|
24
|
2021 @multitable @columnfractions .2 .8
|
|
2022 @item Value: @tab normal | pre | nowrap
|
|
2023 @item Initial: @tab normal
|
|
2024 @item Applies to: @tab block-level elements
|
|
2025 @item Inherited: @tab yes
|
|
2026 @item Percentage values: @tab N/A
|
|
2027 @end multitable
|
|
2028
|
|
2029 This property declares how whitespace inside the element is handled: the
|
|
2030 'normal' way (where whitespace is collapsed), as 'pre' (which behaves
|
|
2031 like the 'PRE' element in HTML) or as 'nowrap' (where wrapping is done
|
|
2032 only through BR elements):
|
|
2033
|
|
2034 @example
|
|
2035 PRE @{ white-space: pre @}
|
|
2036 P @{ white-space: normal @}
|
|
2037 @end example
|
|
2038
|
|
2039 @node list-style-type, list-style-image, white-space, Classification
|
|
2040 @subsubsection list-style-type
|
26
|
2041
|
24
|
2042 @multitable @columnfractions .2 .8
|
|
2043 @item Value: @tab disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none
|
|
2044 @item Initial: @tab disc
|
|
2045 @item Applies to: @tab elements with 'display' value 'list-item'
|
|
2046 @item Inherited: @tab yes
|
|
2047 @item Percentage values: @tab N/A
|
|
2048 @end multitable
|
|
2049
|
|
2050 This property is used to determine the appearance of the list-item
|
|
2051 marker if 'list-style-image' is 'none' or if the image pointed to by the
|
|
2052 URL cannot be displayed.
|
|
2053
|
|
2054 Fo example:
|
|
2055 @example
|
|
2056 OL @{ list-style-type: decimal @} /* 1 2 3 4 5 etc. */
|
|
2057 OL @{ list-style-type: lower-alpha @} /* a b c d e etc. */
|
|
2058 OL @{ list-style-type: lower-roman @} /* i ii iii iv v etc. */
|
|
2059 @end example
|
|
2060
|
|
2061 @node list-style-image, list-style-position, list-style-type, Classification
|
|
2062 @subsubsection list-style-image
|
26
|
2063
|
24
|
2064 @multitable @columnfractions .2 .8
|
|
2065 @item Value: @tab <url> | none
|
|
2066 @item Initial: @tab none
|
|
2067 @item Applies to: @tab elements with 'display' value 'list-item'
|
|
2068 @item Inherited: @tab yes
|
|
2069 @item Percentage values: @tab N/A
|
|
2070 @end multitable
|
|
2071
|
|
2072 This property sets the image that will be used as the list-item
|
|
2073 marker. When the image is available it will replace the marker set with
|
|
2074 the 'list-style-type' marker.
|
|
2075
|
44
|
2076 NOTE: This is currently unimplemented in Emacs/W3.
|
24
|
2077
|
|
2078 @example
|
|
2079 UL @{ list-style-image: url(http://png.com/ellipse.png) @}
|
|
2080 @end example
|
|
2081
|
|
2082 @node list-style-position, list-style, list-style-image, Classification
|
|
2083 @subsubsection list-style-position
|
26
|
2084
|
24
|
2085 @multitable @columnfractions .2 .8
|
|
2086 @item Supported Values: @tab outside
|
|
2087 @item Unsupported Values: @tab inside
|
|
2088 @item Initial: @tab outside
|
|
2089 @item Applies to: @tab elements with 'display' value 'list-item'
|
|
2090 @item Inherited: @tab yes
|
|
2091 @item Percentage values: @tab N/A
|
|
2092 @end multitable
|
|
2093
|
|
2094 The value of 'list-style-position' determines how the list-item marker
|
|
2095 is drawn with regard to the content. For a formatting example see
|
|
2096 section 4.1.3.
|
|
2097
|
26
|
2098 @node list-style, , list-style-position, Classification
|
24
|
2099 @subsubsection list-style
|
26
|
2100
|
24
|
2101 @multitable @columnfractions .2 .8
|
26
|
2102 @item Value: @tab <keyword> || <position> || <url>
|
24
|
2103 @item Initial: @tab not defined for shorthand properties
|
|
2104 @item Applies to: @tab elements with 'display' value 'list-item'
|
|
2105 @item Inherited: @tab yes
|
|
2106 @item Percentage values: @tab N/A
|
|
2107 @end multitable
|
|
2108
|
|
2109 The 'list-style' property is a shorthand notation for setting the three
|
|
2110 properties 'list-style-type', 'list-style-image' and
|
|
2111 'list-style-position' at the same place in the style sheet.
|
|
2112
|
|
2113 @example
|
|
2114 UL @{ list-style: upper-roman inside @}
|
|
2115 UL UL @{ list-style: circle outside @}
|
|
2116 LI.square @{ list-style: square @}
|
|
2117 @end example
|
|
2118
|
|
2119 Setting 'list-style' directly on 'LI' elements can have unexpected
|
|
2120 results. Consider:
|
|
2121
|
|
2122 @example
|
|
2123 <STYLE TYPE="text/css">
|
|
2124 OL.alpha LI @{ list-style: lower-alpha @}
|
|
2125 UL LI @{ list-style: disc @}
|
|
2126 </STYLE>
|
|
2127 <BODY>
|
|
2128 <OL CLASS=alpha>
|
|
2129 <LI>level 1
|
|
2130 <UL>
|
|
2131 <LI>level 2
|
|
2132 </UL>
|
|
2133 </OL>
|
|
2134 </BODY>
|
|
2135 @end example
|
|
2136
|
|
2137 Since the specificity (as defined in the cascading order) is higher for
|
|
2138 the first rule in the style sheet in the example above, it will override
|
|
2139 the second rule on all 'LI' elements and only 'lower-alpha' list styles
|
|
2140 will be used. It is therefore recommended to set 'list-style' only on
|
|
2141 the list type elements:
|
|
2142
|
|
2143 @example
|
|
2144 OL.alpha @{ list-style: lower-alpha @}
|
|
2145 UL @{ list-style: disc @}
|
|
2146 @end example
|
|
2147
|
|
2148 In the above example, inheritance will transfer the 'list-style' values
|
|
2149 from 'OL' and 'UL' elements to 'LI' elements.
|
|
2150
|
|
2151 A URL value can be combined with any other value:
|
|
2152
|
|
2153 @example
|
|
2154 UL @{ list-style: url(http://png.com/ellipse.png) disc @}
|
|
2155 @end example
|
|
2156
|
|
2157 In the example above, the 'disc' will be used when the image is
|
|
2158 unavailable.
|
|
2159
|
26
|
2160 @node Media Selection, Speech Properties, Classification, Properties
|
24
|
2161 @subsection Media Selection
|
26
|
2162
|
24
|
2163 To specify that a stylesheet declaration should only apply when using a
|
|
2164 certain media type (ie: different font families preferred when printing
|
|
2165 versus on-screen presentation), the declarations should be wrapped in
|
|
2166 the proposed @b{@@media} directive.
|
|
2167
|
|
2168 The @@media directive takes two arguments, the media type, and a block
|
|
2169 of style declarations.
|
|
2170
|
|
2171 @example
|
|
2172 @@media print @{
|
|
2173 BODY @{ font-size: 10pt @}
|
|
2174 H1 @{ font-size: 14pt @}
|
|
2175 @}
|
|
2176 @end example
|
|
2177 The '@@media' construct also allows to put include style sheet rules
|
|
2178 for various media in the same style sheet:
|
|
2179
|
|
2180 @example
|
|
2181 @@media print @{
|
|
2182 BODY @{ font-size: 10pt @}
|
|
2183 @}
|
|
2184 @@media screen @{
|
|
2185 BODY @{ font-size: 12pt @}
|
|
2186 @}
|
|
2187 @end example
|
|
2188
|
|
2189 Currently, the following media types are defined.
|
|
2190 @table @b
|
|
2191 @item Print
|
|
2192 Output for paged opaque material, and for documents viewed on screen in
|
|
2193 print preview mode.
|
|
2194 @item Screen
|
|
2195 A continuous presentation for computer screens.
|
|
2196 @item Projector
|
|
2197 Paged presentation for projected presentations.
|
|
2198 @item Braille
|
|
2199 For braille tactile feedback devices.
|
|
2200 @item Speech
|
|
2201 Aural presentation.
|
|
2202 @item Emacs
|
|
2203 The stylesheet will only be applied if the user is running in Emacs 19.
|
|
2204 @item XEmacs
|
|
2205 The stylesheet will only be applied if the user is running in XEmacs 19.
|
|
2206 @item All
|
|
2207 The default value, the style sheet applies to all output devices
|
|
2208 @end table
|
|
2209
|
26
|
2210 @node Speech Properties, , Media Selection, Properties
|
24
|
2211 @subsection Speech Properties
|
26
|
2212
|
24
|
2213 Those of us who are sighted are accustomed to visual presentation of
|
|
2214 @sc{html} documents, frequently on a bitmapped display. This is not the
|
|
2215 only possible presentation method, however. Aural presentation, using a
|
|
2216 combination of speech synthesis and 'audio icons', provides an
|
|
2217 alternative presentation. This form of presentation is in current use by
|
|
2218 the blind and print-impaired communities.
|
|
2219
|
|
2220 Often such aural presentation occurs by converting the document to plain
|
|
2221 text and feeding this to a 'screen reader' -- software or hardware that
|
|
2222 simply reads all the characters on the screen. This results in less
|
|
2223 effective presentation than would be the case if the document structure
|
|
2224 were retained.
|
|
2225
|
|
2226 There are other large markets for aural presentation, including in-car
|
|
2227 and home entertainment use; aurual or mixed aural/visual presentation is
|
|
2228 thus likely to increase in importance over the next few years. Realizing
|
|
2229 that that the aural rendering is essentially independent of the visual
|
|
2230 rendering:
|
|
2231
|
|
2232 @itemize @bullet
|
|
2233 @item
|
|
2234 Allows orthogonal aural and visual views.
|
|
2235 @item
|
|
2236 Allows browsers to optionally implement both aural and visual views to
|
|
2237 produce truly multimodal documents.
|
|
2238 @end itemize
|
|
2239
|
|
2240 @menu
|
26
|
2241 * volume::
|
|
2242 * pause-before::
|
|
2243 * pause-after::
|
|
2244 * pause::
|
|
2245 * cue-before::
|
|
2246 * cue-after::
|
|
2247 * cue::
|
|
2248 * play-during::
|
|
2249 * speed::
|
|
2250 * voice-family::
|
|
2251 * pitch::
|
|
2252 * pitch-range::
|
|
2253 * stress::
|
|
2254 * richness::
|
|
2255 * speak-punctuation::
|
|
2256 * speak-date::
|
|
2257 * speak-numeral::
|
|
2258 * speak-time::
|
24
|
2259 @end menu
|
|
2260
|
|
2261 @node volume, pause-before, Speech Properties, Speech Properties
|
|
2262 @subsubsection volume
|
26
|
2263
|
24
|
2264 @multitable @columnfractions .2 .8
|
|
2265 @item Value: @tab <percentage> | mute | x-soft | soft | medium | loud | x-loud
|
|
2266 @item Initial: @tab medium
|
|
2267 @item Applies to: @tab all elements
|
|
2268 @item Inherited: @tab yes
|
|
2269 @item Percentage values: @tab relative to user-specified mapping
|
|
2270 @end multitable
|
|
2271
|
|
2272 The legal range of percentage values is 0% to 100%. There is a fixed
|
|
2273 mapping between keyword values and percentages:
|
|
2274
|
|
2275 @itemize @bullet
|
|
2276 @item
|
|
2277 'x-soft' = '0%'
|
|
2278 @item
|
|
2279 'soft' = '25%'
|
|
2280 @item
|
|
2281 'medium' = '50%'
|
|
2282 @item
|
|
2283 'loud' = '75%'
|
|
2284 @item
|
|
2285 'x-loud' = '100%'
|
|
2286 @end itemize
|
|
2287
|
|
2288 Volume refers to the median volume of the waveform. In other words, a
|
|
2289 highly inflected voice at a volume of 50 might peak well above
|
|
2290 that. Note that '0%' does not mean the same as "mute". 0% represents the
|
|
2291 minimum audible volume level and 100% corresponds to the maximum
|
|
2292 comfortable level. The UA should allow the values corresponding to 0%
|
|
2293 and 100% to be set by the user. Suitable values depend on the equipment
|
|
2294 in use (speakers, headphones), the environment (in car, home theater,
|
|
2295 library) and personal preferences. Some examples:
|
|
2296
|
|
2297 @itemize @bullet
|
|
2298 @item
|
|
2299 A browser for in-car use has a setting for when there is lots of
|
|
2300 background noise . 0% would map to a fairly high level and 100% to a
|
|
2301 quite high level. The overall values are likely to be human adjustable
|
|
2302 for comfort, for example with a physical volume control: what this
|
|
2303 proposal does is adjust the dynamic range.
|
|
2304 @item
|
|
2305 Another speech browser is being used in the home, late at night, (don't
|
|
2306 annoy the neighbors) or in a shared study room. 0% is set to very quiet
|
|
2307 and 100% to a fairly quiet level, too. As with the first example, there
|
|
2308 is a low slope; the dynamic range is reduced. The actual volumes are low
|
|
2309 here, wheras they were high in the first example.
|
|
2310 @item
|
|
2311 In a quiet and isolated house, an expensive hifi home theatre setup. 0%
|
|
2312 is set fairly low and 100% to quite high; there is wide dynamic range.
|
|
2313 @end itemize
|
|
2314
|
|
2315 The same authors stylesheet could be used in all cases, simply by
|
|
2316 mapping the 0 and 100 points suitably at the client side.
|
|
2317
|
|
2318 @node pause-before, pause-after, volume, Speech Properties
|
|
2319 @subsubsection pause-before
|
26
|
2320
|
24
|
2321 @multitable @columnfractions .2 .8
|
|
2322 @item Value: @tab <time> | <percentage>
|
|
2323 @item Initial: @tab UA specific
|
|
2324 @item Applies to: @tab all elements
|
|
2325 @item Inherited: @tab no
|
|
2326 @item Percentage values: @tab speed
|
|
2327 @end multitable
|
|
2328
|
|
2329 This property specifies the pause before elements. It may be given in an
|
|
2330 absolute units (seconds, milliseconds) or as a relative value in which
|
|
2331 case it is relative to the reciprocal of the 'speed' property: if speed
|
|
2332 is 120 words per minute (ie a word takes half a second -- 500
|
|
2333 milliseconds) then a pause-before of 100% means a pause of 500 ms and a
|
|
2334 pause-before of 20% means 100ms.
|
|
2335
|
|
2336 Using relative units gives more robust stylesheets in the face of large
|
|
2337 changes in speed.
|
|
2338
|
|
2339 @node pause-after, pause, pause-before, Speech Properties
|
|
2340 @subsubsection pause-after
|
26
|
2341
|
24
|
2342 @multitable @columnfractions .2 .8
|
|
2343 @item Value: @tab <time> | <percentage>
|
|
2344 @item Applies to: @tab all elements
|
|
2345 @item Inherited: @tab no
|
|
2346 @item Percentage values: @tab speed
|
|
2347 @end multitable
|
|
2348
|
|
2349 This property specifies the pause after elements. Values are specified
|
|
2350 the same way as 'pause-before'.
|
|
2351
|
|
2352 @node pause, cue-before, pause-after, Speech Properties
|
|
2353 @subsubsection pause
|
26
|
2354
|
24
|
2355 @multitable @columnfractions .2 .8
|
|
2356 @item Value: @tab [<time> | <percentage> ]@{1,2@};
|
|
2357 @item Applies to: @tab all elements
|
|
2358 @item Inherited: @tab no
|
|
2359 @item Percentage values: @tab speed
|
|
2360 @end multitable
|
|
2361
|
|
2362 The 'pause' property is a shorthand for setting 'pause-before' and
|
|
2363 'pause-after'. The first value is pause-before and the second is
|
|
2364 pause-after. If only one value is given, it applies to both properties.
|
|
2365
|
|
2366 Examples:
|
|
2367
|
|
2368 @example
|
|
2369 H1 @{ pause: 20ms @} /* pause-before: 20ms; pause-after: 20ms */
|
|
2370 H2 @{ pause: 30ms 40ms @} /* pause-before: 30ms; pause-after: 40ms */
|
|
2371 H3 @{ pause-after: 10ms @} /* pause-before: ?; pause-after: 10ms */
|
|
2372 @end example
|
|
2373
|
|
2374 @node cue-before, cue-after, pause, Speech Properties
|
|
2375 @subsubsection cue-before
|
26
|
2376
|
24
|
2377 @multitable @columnfractions .2 .8
|
|
2378 @item Value: @tab <url> | none
|
|
2379 @item Initial: @tab none
|
|
2380 @item Applies to: @tab all elements
|
|
2381 @item Inherited: @tab no
|
|
2382 @end multitable
|
|
2383 Auditory icons are another way to distinguish semantic elements. Sounds
|
|
2384 may be played before, and/or after the element to delimit it. The same
|
|
2385 sound can be used both before and after, using the cue property.
|
|
2386
|
|
2387 Examples:
|
|
2388
|
|
2389 @example
|
|
2390 A @{ cue-before: url(bell.aiff); cue-after: url(dong.wav) @}
|
|
2391 H1 @{ cue-before: url(pop.au); cue-after: url(pop.au) @}
|
|
2392 H1 @{ cue: url(pop.au) @} /* same as previous */
|
|
2393 @end example
|
|
2394
|
|
2395 @node cue-after, cue, cue-before, Speech Properties
|
|
2396 @subsubsection cue-after
|
26
|
2397
|
24
|
2398 @xref{cue-before}
|
|
2399
|
|
2400 @node cue, play-during, cue-after, Speech Properties
|
|
2401 @subsubsection cue
|
26
|
2402
|
24
|
2403 @xref{cue-before}
|
|
2404
|
|
2405 @node play-during, speed, cue, Speech Properties
|
|
2406 @subsubsection cue-during
|
26
|
2407
|
24
|
2408 @multitable @columnfractions .2 .8
|
|
2409 @item Value: @tab <url> | mix | none
|
|
2410 @item Initial: @tab mix
|
|
2411 @item Applies to: @tab all elements
|
|
2412 @item Inherited: @tab no
|
|
2413 @end multitable
|
|
2414 Similar to the cue-before and cue-after properties, this indicates sound
|
|
2415 to be played during an element as a background (ie the sound is mixed in
|
|
2416 with the speech).
|
|
2417
|
|
2418 Examples:
|
|
2419
|
|
2420 @example
|
|
2421 BLOCKQUOTE.sad @{ cue-during: url(violins.aiff) @}
|
|
2422 @end example
|
|
2423
|
|
2424 @node speed, voice-family, play-during, Speech Properties
|
|
2425 @subsubsection speed
|
26
|
2426
|
24
|
2427 @multitable @columnfractions .2 .8
|
|
2428 @item Value: @tab <words-per-minute> | x-slow | slow | medium | fast | x-fast | faster | slower
|
|
2429 @item Initial: @tab medium
|
|
2430 @item Applies to: @tab all elements
|
|
2431 @item Inherited: @tab yes
|
|
2432 @end multitable
|
|
2433
|
|
2434 Specifies the speaking rate. Note that both absolute and relative
|
|
2435 keyword values are allowed (compare with @ref{font-weight}).
|
|
2436
|
|
2437 @node voice-family, pitch, speed, Speech Properties
|
|
2438 @subsubsection voice-family
|
26
|
2439
|
24
|
2440 @multitable @columnfractions .2 .8
|
|
2441 @item Value: @tab [[<specific-voice> | <generic-voice>],]* [<specific-voice> | <generic-voice>]
|
|
2442 @item Initial: @tab device-specific
|
|
2443 @item Applies to: @tab all elements
|
|
2444 @item Inherited: @tab yes
|
|
2445 @end multitable
|
|
2446
|
|
2447 The value is a prioritized list of voice family names. Generic families
|
|
2448 are male, female, and child.
|
|
2449
|
|
2450 Examples of specific voice families are: comedian, paul, lisa
|
|
2451
|
|
2452 Examples
|
|
2453
|
|
2454 @example
|
|
2455 H1 @{ voice-family: announcer, male @}
|
|
2456 P.part.romeo @{ voice-family: romeo, male @}
|
|
2457 P.part.juliet @{ voice-family: juliet, female @}
|
|
2458 @end example
|
|
2459
|
|
2460 @node pitch, pitch-range, voice-family, Speech Properties
|
|
2461 @subsubsection pitch
|
26
|
2462
|
22
|
2463 @multitable @columnfractions .2 .8
|
|
2464 @end multitable
|
|
2465
|
24
|
2466 @node pitch-range, stress, pitch, Speech Properties
|
|
2467 @subsubsection pitch-range
|
26
|
2468
|
22
|
2469 @multitable @columnfractions .2 .8
|
|
2470 @end multitable
|
|
2471
|
24
|
2472 @node stress, richness, pitch-range, Speech Properties
|
|
2473 @subsubsection stress
|
26
|
2474
|
24
|
2475 @multitable @columnfractions .2 .8
|
|
2476 @item Value: @tab <percentage>
|
|
2477 @item Initial: @tab medium
|
|
2478 @item Applies to: @tab all elements
|
|
2479 @item Inherited: @tab yes
|
|
2480 @end multitable
|
|
2481
|
|
2482 Specifies the level of stress (assertiveness or emphasis) of the
|
|
2483 speaking voice. English is a stressed language, and different parts of a
|
|
2484 sentence are assigned primary, secondary or tertiary stress. The value
|
|
2485 of property 'stress' controls the amount of inflection that results from
|
|
2486 these stress markers.
|
|
2487
|
|
2488 Increasing the value of this property results in the speech being more
|
|
2489 strongly inflected. It is in a sense dual to property 'pitch-range' and
|
|
2490 is provided to allow developers to exploit higher-end auditory displays.
|
|
2491
|
|
2492 @node richness, speak-punctuation, stress, Speech Properties
|
|
2493 @subsubsection richness
|
26
|
2494
|
24
|
2495 @multitable @columnfractions .2 .8
|
|
2496 @item Value: @tab <percentage>
|
|
2497 @item Initial: @tab medium (50%)
|
|
2498 @item Applies to: @tab all elements
|
|
2499 @item Inherited: @tab yes
|
|
2500 @end multitable
|
|
2501
|
|
2502 Specifies the richness (brightness) of the speaking voice. Different
|
|
2503 speech devices may require the setting of one or more device-specific
|
|
2504 parameters to achieve this effect.
|
|
2505
|
|
2506 The effect of increasing richness is to produce a voice that carries --
|
|
2507 reducing richness produces a soft, mellifluous voice.
|
|
2508
|
|
2509 @node speak-punctuation, speak-date, richness, Speech Properties
|
|
2510 @subsubsection speak-punctuation
|
26
|
2511
|
22
|
2512 @multitable @columnfractions .2 .8
|
24
|
2513 @item Value: @tab code | none
|
|
2514 @item Initial: @tab none
|
|
2515 @item Applies to: @tab all elements
|
|
2516 @item Inherited: @tab yes
|
22
|
2517 @end multitable
|
|
2518
|
24
|
2519 'code' indicates that punctuation such as semicolons, braces, and so on
|
|
2520 are to be spoken literally. The default value of 'none' means that
|
|
2521 punctuation is not spoken but instead is rendered naturally as various
|
|
2522 pauses.
|
|
2523
|
|
2524 @node speak-date, speak-numeral, speak-punctuation, Speech Properties
|
|
2525 @subsubsection speak-date
|
26
|
2526
|
24
|
2527 @multitable @columnfractions .2 .8
|
|
2528 @item Value: @tab myd | dmy | ymd | none
|
|
2529 @item Initial: @tab none
|
|
2530 @item Applies to: @tab all elements
|
|
2531 @item Inherited: @tab no
|
|
2532 @end multitable
|
|
2533
|
|
2534 This is a hint that the element contains a date and also how that date
|
|
2535 should be spoken. month-day-year is common in the USA, while
|
|
2536 day-month-year is common in Europe and year-month-day is also used.
|
|
2537
|
|
2538 This should really be an HTML tag not a stylesheet property, since it
|
|
2539 gives semantic information about the content.
|
|
2540
|
|
2541 @node speak-numeral, speak-time, speak-date, Speech Properties
|
|
2542 @subsubsection speak-numeral
|
26
|
2543
|
24
|
2544 @multitable @columnfractions .2 .8
|
|
2545 @item Value: @tab digits | continous
|
|
2546 @item Initial: @tab none
|
|
2547 @item Applies to: @tab all elements
|
|
2548 @item Inherited: @tab yes
|
|
2549 @end multitable
|
|
2550
|
26
|
2551 @node speak-time, , speak-numeral, Speech Properties
|
24
|
2552 @subsubsection speak-time
|
26
|
2553
|
24
|
2554 @multitable @columnfractions .2 .8
|
|
2555 @item Value: @tab 24 | 12 | none
|
|
2556 @item Initial: @tab none
|
|
2557 @item Applies to: @tab all elements
|
|
2558 @item Inherited: @tab yes
|
|
2559 @end multitable
|
|
2560
|
26
|
2561 @node Units, , Properties, Stylesheets
|
22
|
2562 @section Units
|
|
2563
|
|
2564 @menu
|
26
|
2565 * Length Units::
|
|
2566 * Percentage Units::
|
|
2567 * Color Units::
|
|
2568 * URLs::
|
|
2569 * Angle Units::
|
|
2570 * Time Units::
|
22
|
2571 @end menu
|
|
2572
|
|
2573 @node Length Units, Percentage Units, Units, Units
|
|
2574 @subsection Length Units
|
|
2575
|
|
2576 @node Percentage Units, Color Units, Length Units, Units
|
|
2577 @subsection Percentage Units
|
|
2578
|
|
2579 @node Color Units, URLs, Percentage Units, Units
|
|
2580 @subsection color Units
|
|
2581
|
|
2582 @node URLs, Angle Units, Color Units, Units
|
|
2583 @subsection URLs
|
|
2584
|
|
2585 @node Angle Units, Time Units, URLs, Units
|
|
2586 @subsection Angle Units
|
26
|
2587
|
24
|
2588 These are the legal angle units:
|
|
2589 @itemize @bullet
|
|
2590 @item
|
|
2591 deg: degrees
|
|
2592 @item
|
|
2593 grad
|
|
2594 @item
|
|
2595 rad: radians
|
|
2596 @end itemize
|
22
|
2597
|
26
|
2598 @node Time Units, , Angle Units, Units
|
22
|
2599 @subsection Time Units
|
26
|
2600
|
24
|
2601 These are the legal time units:
|
|
2602
|
|
2603 @itemize @bullet
|
|
2604 @item
|
|
2605 ms: milliseconds
|
|
2606 @item
|
|
2607 s: seconds
|
|
2608 @end itemize
|
22
|
2609
|
26
|
2610 @node Supported URLs, MIME Support, Stylesheets, Top
|
22
|
2611 @chapter Supported URLs
|
|
2612
|
|
2613 ::WORK:: List supported URL types, specific RFCs, etc.
|
|
2614
|
24
|
2615 @menu
|
26
|
2616 * file:: Local file access.
|
|
2617 * ftp:: Remote file access via ftp.
|
|
2618 * nfs:: Remote file access via NFS.
|
|
2619 * info:: Access to the Emacs Info system.
|
|
2620 * http/https:: @sc{http/1.0} support.
|
|
2621 * mailto:: Sending simple electronic mail.
|
|
2622 * news/nntp/snews:: Reading and sending Usenet news.
|
|
2623 * rlogin/telnet/tn3270:: Legacy host connections.
|
|
2624 * irc:: Internet Relay Chat.
|
|
2625 * data:: Embedding the data within the URL itself.
|
|
2626 * mailserver:: Slightly more complicated electronic mail.
|
|
2627 * gopher:: Gopher and Gopher+.
|
|
2628 * finger:: The old favorite.
|
24
|
2629 @end menu
|
26
|
2630
|
|
2631 @node file, ftp, Supported URLs, Supported URLs
|
|
2632 @section file
|
|
2633
|
|
2634 @node ftp, nfs, file, Supported URLs
|
|
2635 @section ftp
|
|
2636
|
|
2637 @node nfs, info, ftp, Supported URLs
|
|
2638 @section nfs
|
|
2639
|
|
2640 @node info, http/https, nfs, Supported URLs
|
|
2641 @section info
|
|
2642
|
|
2643 @node http/https, mailto, info, Supported URLs
|
|
2644 @section http/https
|
|
2645
|
|
2646 @node mailto, news/nntp/snews, http/https, Supported URLs
|
|
2647 @section mailto
|
|
2648
|
|
2649 @node news/nntp/snews, rlogin/telnet/tn3270, mailto, Supported URLs
|
|
2650 @section news/nntp/snews
|
|
2651
|
|
2652 @node rlogin/telnet/tn3270, irc, news/nntp/snews, Supported URLs
|
|
2653 @section rlogin/telnet/tn3270
|
|
2654
|
|
2655 @node irc, data, rlogin/telnet/tn3270, Supported URLs
|
|
2656 @section irc
|
|
2657
|
|
2658 @node data, mailserver, irc, Supported URLs
|
|
2659 @section data
|
|
2660
|
|
2661 @node mailserver, gopher, data, Supported URLs
|
|
2662 @section mailserver
|
|
2663
|
|
2664 @node gopher, finger, mailserver, Supported URLs
|
|
2665 @section gopher
|
|
2666
|
|
2667 @node finger, , gopher, Supported URLs
|
|
2668 @section finger
|
|
2669
|
|
2670 @node MIME Support, Security, Supported URLs, Top
|
0
|
2671 @chapter MIME Support
|
20
|
2672 @sc{mime} is an emerging standard for multimedia mail. It offers a very
|
0
|
2673 flexible typing mechanism. The type of a file or message is specified
|
|
2674 in two parts, separated by a '/'. The first part is the general
|
|
2675 category of the data (text, application, image, etc.). The second part
|
24
|
2676 is the specific type of data (postscript, png, jpeg, etc.). So
|
20
|
2677 @samp{text/html} specifies an @sc{html} document, whereas
|
0
|
2678 @samp{image/x-xwindowdump} specifies an image of an Xwindow taken with
|
|
2679 the @file{xwd} program.
|
|
2680
|
|
2681
|
20
|
2682 This typing allows much more flexibility in naming files. @sc{http}/1.0
|
0
|
2683 servers can now send back content-type headers in response to a request,
|
20
|
2684 and not have the client second-guess it based on file extensions. @sc{html}
|
24
|
2685 files can now be named @file{something.png} (not a great idea, but
|
0
|
2686 possible).
|
|
2687
|
|
2688 @menu
|
|
2689 * Adding MIME types based on file extensions:: How to map file
|
|
2690 extensions onto MIME
|
24
|
2691 types (e.g., @samp{.png ->
|
|
2692 image/png)}.
|
26
|
2693 * Specifying Viewers:: How to specify external and internal viewers
|
44
|
2694 for files that Emacs/W3 cannot handle natively.
|
0
|
2695 @end menu
|
|
2696
|
|
2697 @node Adding MIME types based on file extensions, Specifying Viewers, MIME Support, MIME Support
|
|
2698 @section Adding MIME types based on file extensions
|
26
|
2699
|
0
|
2700 @vindex mm-mime-extensions
|
|
2701 For some protocols however, it is still necessary to guess the content
|
|
2702 of a file based on the file extension. This type of guess-work should
|
20
|
2703 only be needed when accessing files via @sc{ftp}, local file access, or old
|
|
2704 @sc{http}/0.9 servers.
|
0
|
2705
|
|
2706 Instead of specifying how to view things twice, once based on
|
|
2707 content-type and once based on the file extension, it is easier to map
|
|
2708 file extensions to MIME content-types. The variable that controls this
|
|
2709 is @code{mm-mime-extensions}.
|
|
2710
|
|
2711 This variable is an assoc list of file extensions and the corresponding
|
|
2712 MIME content-type. A sample entry looks like: @samp{(".movie"
|
|
2713 . "video/x-sgi-movie")} This makes all files that end in @file{.movie}
|
|
2714 (@file{foo.movie} and @file{bar.movie}) be interpreted as SGI animation
|
|
2715 files. If a content-type is defined for the document, then this is
|
|
2716 over-ridden. Regular expressions can @b{NOT} be used.
|
|
2717
|
|
2718 @cindex mime-types file
|
|
2719 @findex mm-parse-mimetypes
|
20
|
2720 Both Mosaic and the NCSA @sc{http} daemon rely on a separate file for mapping
|
44
|
2721 file extensions to MIME types. Instead of having the users of Emacs/W3
|
0
|
2722 duplicate this in lisp, this file can be parsed using the
|
|
2723 @code{url-parse-mimetypes} function. This function is called each time
|
|
2724 w3 is loaded. It tries to locate mimetype files in several places. If
|
|
2725 the environment variable @code{MIMETYPES} is nonempty, then this is
|
|
2726 assumed to specify a UNIX-like path of mimetype files (this is a colon
|
|
2727 separated string of pathnames). If the @code{MIMETYPES} environment
|
44
|
2728 variable is empty, then Emacs/W3 looks for these files:
|
0
|
2729
|
|
2730 @enumerate
|
|
2731 @item
|
|
2732 @file{~/.mime-types}
|
|
2733 @item
|
|
2734 @file{/etc/mime-types}
|
|
2735 @item
|
|
2736 @file{/usr/etc/mime-types}
|
|
2737 @item
|
|
2738 @file{/usr/local/etc/mime-types}
|
|
2739 @item
|
|
2740 @file{/usr/local/www/conf/mime-types}
|
|
2741 @end enumerate
|
|
2742
|
20
|
2743 Each line contains information for one @sc{http} type. These types resemble
|
0
|
2744 MIME types. To add new ones, use subtypes beginning with x-, such as
|
|
2745 application/x-myprogram. Lines beginning with # are comment lines, and
|
|
2746 suitably ignored. Each line consists of:
|
|
2747
|
|
2748 type/subtype ext1 ext2 ... ext@var{n}
|
|
2749
|
|
2750 type/subtype is the MIME-like type of the document. ext* is any number
|
|
2751 of space-separated filename extensions which correspond to the MIME
|
|
2752 type.
|
|
2753
|
26
|
2754 @node Specifying Viewers, , Adding MIME types based on file extensions, MIME Support
|
0
|
2755 @section Specifying Viewers
|
26
|
2756
|
20
|
2757 Not all files look as they should when parsed as an @sc{html} document
|
0
|
2758 (whitespace is stripped, paragraphs are reformatted, and lots of little
|
|
2759 changes that make the document look unrecognizable). Files may be
|
|
2760 passed to external programs or Emacs Lisp functions to be viewed.
|
|
2761
|
24
|
2762 Not all files can be viewed accurately from within an Emacs session (PNG
|
0
|
2763 files for example, or audio files). For this reason, the user can
|
|
2764 specify file "viewers" based on MIME content-types. This is done with
|
|
2765 a standard mailcap file. @xref{Mailcap Files}
|
|
2766
|
|
2767 @findex mm-add-mailcap-entry
|
|
2768 As an alternative, the function @code{mm-add-mailcap-entry} can also be
|
|
2769 used from an appropriate hook.@xref{Hooks} This functions takes three
|
24
|
2770 arguments, the major type ("@i{image}"), the minor type ("@i{png}"), and
|
20
|
2771 an assoc list of information about the viewer. Please see the @sc{url}
|
0
|
2772 documentation for more specific information on what this assoc list
|
|
2773 should look like.
|
|
2774
|
26
|
2775 @node Security, Non-Unix Operating Systems, MIME Support, Top
|
0
|
2776 @chapter Security
|
|
2777 @cindex Security
|
|
2778 @cindex Paranoia
|
|
2779 There are an increasing number of ways to authenticate a user to a web
|
44
|
2780 service. Emacs/W3 tries to support as many as possible. Emacs/W3
|
0
|
2781 currently supports:
|
|
2782
|
|
2783 @table @b
|
|
2784 @item Basic Authentication
|
|
2785 @cindex Security, Basic
|
|
2786 @cindex HTTP/1.0 Authentication
|
|
2787 @cindex Authentication, Basic
|
|
2788 The weakest authentication available, not recommended if serious
|
|
2789 security is necessary. This is simply a string that looks like
|
|
2790 @samp{user:password} that has been Base64 encoded, as defined in RFC
|
|
2791 1421.
|
|
2792 @item Digest Authentication
|
|
2793 @cindex Security, Digest
|
|
2794 @cindex HTTP/1.0 Authentication
|
|
2795 @cindex Authentication, Digest
|
|
2796 Jeffery L. Hostetler, John Franks, Philip Hallam-Baker, Ari Luotonen,
|
|
2797 Eric W. Sink, and Lawrence C. Stewart have an internet draft for a new
|
|
2798 authentication mechanism. For the complete specification, please see
|
|
2799 draft-ietf-http-digest-aa-01.txt in the nearest internet drafts
|
|
2800 archive@footnote{One is ftp://ds.internic.net/internet-drafts}.
|
|
2801 @item SSL Encryption
|
|
2802 @cindex HTTP/1.0 Authentication
|
|
2803 @cindex Secure Sockets Layer
|
|
2804 @cindex SSL
|
|
2805 @cindex Gag Puke Retch
|
|
2806 @cindex Exportability
|
|
2807 @cindex Export Restrictions
|
|
2808 SSL is the @code{Secure Sockets Layer} interface developed by Netscape
|
44
|
2809 Communications @footnote{http://www.netscape.com/}. Emacs/W3 supports
|
20
|
2810 @sc{http} transfers over an SSL encrypted channel, if the appropriate files
|
0
|
2811 have been installed.@xref{Installing SSL}
|
|
2812 @end table
|
|
2813
|
26
|
2814 @node Non-Unix Operating Systems, Speech Integration, Security, Top
|
0
|
2815 @chapter Non-Unix Operating Systems
|
|
2816 @cindex Non-Unix Operating Systems
|
26
|
2817
|
0
|
2818 @menu
|
26
|
2819 * VMS:: The wonderful world of VAX|AXP-VMS!
|
|
2820 * OS/2:: The next-best thing to Unix.
|
|
2821 * MS-DOS:: The wonderful world of MS-DOG!
|
|
2822 * Windows:: Windows NT, Chicago/Windows 95.
|
0
|
2823 @end menu
|
|
2824
|
|
2825 @node VMS, OS/2, Non-Unix Operating Systems, Non-Unix Operating Systems
|
|
2826 @section VMS
|
|
2827 @cindex VAX-VMS
|
|
2828 @cindex AXP-VMS
|
|
2829 @cindex Digital VMS
|
|
2830 @cindex VMS
|
26
|
2831
|
0
|
2832 :: WORK :: VMS Specific instriuctions
|
|
2833
|
|
2834 @node OS/2, MS-DOS, VMS, Non-Unix Operating Systems
|
|
2835 @section OS/2
|
|
2836 @cindex OS/2
|
|
2837 @cindex Warp
|
26
|
2838
|
0
|
2839 :: WORK :: OS/2 Specific instructions
|
|
2840
|
20
|
2841 @node MS-DOS, Windows, OS/2, Non-Unix Operating Systems
|
0
|
2842 @section MS-DOS
|
|
2843 @cindex MS-DOS
|
|
2844 @cindex Microsloth
|
|
2845 @cindex DOS
|
|
2846 @cindex MS-DOG
|
26
|
2847
|
0
|
2848 :: WORK :: DOS Specific instructions
|
|
2849
|
26
|
2850 @node Windows, , MS-DOS, Non-Unix Operating Systems
|
20
|
2851 @section Windows
|
0
|
2852 @cindex Windows (32-Bit)
|
|
2853 @cindex 32-Bit Windows
|
|
2854 @cindex Microsloth
|
|
2855 @cindex Windows '95
|
26
|
2856
|
0
|
2857 :: WORK :: 32bit Windows Specific instructions
|
|
2858
|
26
|
2859 @node Speech Integration, Advanced Features, Non-Unix Operating Systems, Top
|
20
|
2860 @chapter Speech Integration
|
26
|
2861
|
20
|
2862 :: WORK :: Emacspeak integration
|
0
|
2863
|
26
|
2864 @node Advanced Features, More Help, Speech Integration, Top
|
0
|
2865 @chapter Advanced Features
|
|
2866
|
|
2867 @menu
|
26
|
2868 * Disk Caching:: Improving performance by using a local disk cache
|
|
2869 * Interfacing to Mail/News:: How to make VM understand hypertext links
|
44
|
2870 * Debugging HTML:: How to make Emacs/W3 display warnings about invalid
|
26
|
2871 @sc{html}/@sc{html}+ constructs.
|
44
|
2872 * Hooks:: Various hooks to use throughout Emacs/W3
|
26
|
2873 * Other Variables:: Miscellaneous variables that control the real
|
44
|
2874 guts of Emacs/W3.
|
0
|
2875 @end menu
|
26
|
2876
|
|
2877 @node Disk Caching, Interfacing to Mail/News, Advanced Features, Advanced Features
|
0
|
2878 @section Disk Caching
|
|
2879 @cindex Caching
|
|
2880 @cindex Persistent Cache
|
|
2881 @cindex Disk Cache
|
26
|
2882
|
0
|
2883 A cache stores the information on a page on the local machine. When
|
44
|
2884 requesting a page that is in the cache, Emacs/W3 can retrieve the page
|
0
|
2885 from the cache more quickly than retrieving the page again from its
|
|
2886 location out on the network. With a well-populated cache, browsing the
|
|
2887 web is dramatically faster.
|
|
2888
|
44
|
2889 The first time a page is requested, Emacs/W3 retrieves the page from the
|
|
2890 network. When requesting a page that is in the cache, Emacs/W3 checks
|
0
|
2891 to see if the page has changed since it was last retrieved from the
|
|
2892 remote machine. If it has not changed, the local copy is used, saving
|
|
2893 the transmission of the file over the network.
|
|
2894
|
|
2895 @vindex url-automatic-caching
|
|
2896 @cindex Turning on caching
|
|
2897 @cindex Cleaning the cache
|
|
2898 @cindex Clearing the cache
|
|
2899 @cindex Cache cleaning
|
|
2900 @cindex Limiting the size of the cache
|
|
2901 To turn on disk caching, set the variable @code{url-automatic-caching}
|
|
2902 to non-@code{nil}, or choose the 'Caching' menu item (under `Options').
|
|
2903 That is all there is to it. Running the @code{clean-cache} shell script
|
|
2904 fist is recommended, to allow for future cleaning of the cache. This
|
|
2905 shell script will remove all files that have not been accessed since it
|
|
2906 was last run. To keep the cache pared down, it is recommended that this
|
|
2907 script be run from @i{at} or @i{cron} (see the manual pages for
|
|
2908 crontab(5) or at(1) for more information)
|
|
2909
|
|
2910
|
|
2911 @cindex Relying on cache
|
|
2912 @cindex Cache only mode
|
|
2913 @cindex Standalone mode
|
|
2914 @cindex Browsing with no network connection
|
|
2915 @cindex Netless browsing
|
|
2916 @vindex url-standalone-mode
|
|
2917 With a large cache of documents on the local disk, it can be very handy
|
|
2918 when traveling, or any other time the network connection is not active
|
44
|
2919 (a laptop with a dial-on-demand PPP connection, etc). Emacs/W3 can rely
|
0
|
2920 solely on its cache, and avoid checking to see if the page has changed
|
|
2921 on the remote server. In the case of a dial-on-demand PPP connection,
|
|
2922 this will keep the phone line free as long as possible, only bringing up
|
|
2923 the PPP connection when asking for a page that is not located in the
|
|
2924 cache. This is very useful for demonstrations as well. To turn this
|
|
2925 feature on, set the variable @code{url-standalone-mode} to
|
|
2926 non-@code{nil}, or choose the `Use Cache Only' menu item (under
|
|
2927 `Options')
|
|
2928
|
|
2929 @node Interfacing to Mail/News, Debugging HTML, Disk Caching, Advanced Features
|
|
2930 @section Interfacing to Mail/News
|
|
2931 @cindex Interfacing to Mail/News
|
|
2932 @cindex VM
|
44
|
2933 @cindex Using Emacs/W3 with VM
|
0
|
2934 @cindex GNUS
|
44
|
2935 @cindex Using Emacs/W3 with Gnus
|
0
|
2936 @cindex RMAIL
|
44
|
2937 @cindex Using Emacs/W3 with RMAIL
|
26
|
2938
|
20
|
2939 More and more people are including @sc{url}s in their signatures, and within
|
0
|
2940 the body of mail messages. It can get quite tedious to type these into
|
|
2941 the minibuffer to follow one.
|
|
2942
|
2
|
2943 @vindex browse-url-browser-function
|
|
2944 With the latest versions of VM (the 5.9x series of betas) and Gnus
|
20
|
2945 (5.x), @sc{url}s are automatically highlighted, and can be followed with the
|
|
2946 mouse or the return key. How the @sc{url}s are viewed is determined by the
|
2
|
2947 variable @code{browse-url-browser-function}, and it should be set to the
|
|
2948 symbol @code{browse-url-w3}.
|
0
|
2949
|
20
|
2950 To access @sc{url}s from within RMAIL, the following hook should do the
|
0
|
2951 trick.
|
|
2952 @example
|
|
2953 (add-hook 'rmail-mode-hook
|
|
2954 (function
|
|
2955 (lambda ()
|
|
2956 (define-key rmail-mode-map [mouse-2] 'w3-maybe-follow-link-mouse)
|
|
2957 (define-key rmail-mode-map "\r" 'w3-maybe-follow-link))))
|
|
2958 @end example
|
|
2959
|
26
|
2960 @node Debugging HTML, Hooks, Interfacing to Mail/News, Advanced Features
|
0
|
2961 @section Debugging HTML
|
|
2962 @cindex Debugging
|
|
2963 @cindex Invalid HTML
|
|
2964 @cindex Bad HTML
|
|
2965 @vindex w3-debug-buffer
|
|
2966 @vindex w3-debug-html
|
26
|
2967
|
0
|
2968 For those people that are adventurous, or are just as anal as I am about
|
20
|
2969 people writing valid @sc{html}, set the variable @code{w3-debug-html} to
|
0
|
2970 @code{t} and see what happens.
|
|
2971
|
|
2972
|
44
|
2973 If a Emacs/W3 thinks it has encountered invalid @sc{html}, then a debugging
|
0
|
2974 message is displayed.
|
|
2975
|
|
2976 :: WORK :: Need to list the different values w3-debug-html can have, and
|
|
2977 :: WORK :: what they do ::
|
|
2978
|
26
|
2979 @node Hooks, Other Variables, Debugging HTML, Advanced Features
|
0
|
2980 @section Hooks
|
|
2981 @cindex Hooks
|
26
|
2982
|
0
|
2983 These are the various hooks that can be used to customize some of
|
44
|
2984 Emacs/W3's behavior. They are arranged in the order in which they would
|
30
|
2985 happen when retrieving a document. These are all 'normal hooks' in
|
|
2986 standard Emacs-terminology, meaning they are functions (or lists of
|
|
2987 functions) that are called consecutively.
|
0
|
2988
|
|
2989 @table @code
|
30
|
2990 @vindex w3-load-hook
|
|
2991 @item w3-load-hook
|
|
2992 These hooks are run the first time a @sc{url} is fetched. All the
|
44
|
2993 Emacs/W3 variables are initialized before this hook is run.
|
30
|
2994 @item w3-mode-hook
|
0
|
2995 These hooks are run after a buffer has been parsed and displayed, but
|
|
2996 before any inlined images are downloaded and converted.
|
30
|
2997 @item w3-source-file-hook
|
|
2998 These hooks are run after displaying a document's source.
|
0
|
2999 @end table
|
|
3000
|
26
|
3001 @node Other Variables, , Hooks, Advanced Features
|
0
|
3002 @section Miscellaneous variables
|
26
|
3003
|
44
|
3004 There are lots of variables that control the real nitty-gritty of Emacs/W3
|
0
|
3005 that the beginning user probably shouldn't mess with. Here they are.
|
|
3006
|
|
3007 @table @code
|
|
3008 @item url-bad-port-list
|
|
3009 @vindex url-bad-port-list
|
|
3010 List of ports to warn the user about connecting to. Defaults to just
|
20
|
3011 the mail and @sc{nntp} ports so a malicious @sc{html} author cannot spoof mail or
|
0
|
3012 news to other people.
|
|
3013 @item url-confirmation-func
|
|
3014 @vindex url-confirmation-func
|
|
3015 What function to use for asking yes or no functions. Possible values
|
|
3016 are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes
|
|
3017 a single argument (the prompt), and returns @code{t} only if a positive
|
|
3018 answer is gotten. Defaults to @code{'yes-or-no-p}.
|
|
3019 @item w3-default-action
|
|
3020 @vindex w3-default-action
|
|
3021 A lisp symbol specifying what action to take for files with extensions
|
|
3022 that are not in the @code{mm-mime-extensions} assoc list. This is
|
44
|
3023 useful in case Emacs/W3 ever run across files with weird extensions
|
0
|
3024 (.foo, .README, .READMEFIRST, etc.). In most circumstances, this should
|
|
3025 not be required anymore.
|
|
3026
|
|
3027 Possible values: any lisp symbol. Should be a function that takes no
|
|
3028 arguments. The return value does not matter, it is ignored. Some examples
|
|
3029 are @code{'w3-prepare-buffer} or @code{'indented-text-mode}.
|
|
3030 @ignore
|
|
3031 @item w3-icon-directory-list
|
|
3032 @vindex w3-icon-directory-list
|
|
3033 A list of directorys to look in for the w3 standard icons... must end
|
|
3034 in a /! If the directory @code{data-directory}/w3 exists, then this is
|
|
3035 automatically added to the default value of
|
|
3036 http://cs.indiana.edu/elisp/w3/icons/.
|
|
3037 @end ignore
|
|
3038 @item w3-keep-old-buffers
|
|
3039 @vindex w3-keep-old-buffers
|
|
3040 Whether to keep old buffers around when following links. To avoid lots
|
|
3041 of buffers in one Emacs session, set this variable to @code{nil}. I
|
|
3042 recommend setting it to @code{t}, so that backtracking from one link to
|
|
3043 another is faster.
|
|
3044
|
|
3045 @item url-passwd-entry-func
|
|
3046 @vindex url-passwd-entry-func
|
|
3047 This is a symbol indicating which function to call to read in a
|
|
3048 password. If this variable is @code{nil} at startup, it is initialized
|
|
3049 depending on whether @dfn{EFS} or @dfn{ange-ftp} is being used. This
|
|
3050 function should accept the prompt string as its first argument, and the
|
|
3051 default value as its second argument.
|
|
3052
|
|
3053 @item w3-reuse-buffers
|
|
3054 @vindex w3-reuse-buffers
|
|
3055 Determines what happens when @code{w3-fetch} is called on a document
|
|
3056 that has already been loaded into another buffer. Possible values are:
|
|
3057 @code{nil}, @code{yes}, and @code{no}. @code{nil} will ask the user if
|
44
|
3058 Emacs/W3 should reuse the buffer (this is the default value). A value of
|
0
|
3059 @code{yes} means assume the user wants to always reuse the buffer. A
|
|
3060 value of @code{no} means assume the user always wants to re-fetch the
|
|
3061 document.
|
|
3062 @item w3-show-headers
|
|
3063 @vindex w3-show-headers
|
20
|
3064 This is a list of @sc{http}/1.0 headers to show at the end of a buffer. All
|
0
|
3065 the headers should be in lowercase. They are inserted at the end of the
|
|
3066 buffer in a <UL> list. Alternatively, if this is simply @code{t}, then
|
20
|
3067 all the @sc{http}/1.0 headers are shown. The default value is
|
0
|
3068 @code{nil}.
|
|
3069 @item w3-show-status, url-show-status
|
|
3070 @vindex url-show-status
|
|
3071 @vindex w3-show-status
|
|
3072 Whether to show progress messages in the minibuffer.
|
|
3073 @code{w3-show-status} controls if messages about the parsing are
|
|
3074 displayed, and @code{url-show-status} controls if a running total of the
|
|
3075 number of bytes transferred is displayed. These Can cause a large
|
|
3076 performance hit if using a remote X display over a slow link, or a
|
|
3077 terminal with a slow modem.
|
|
3078 @item mm-content-transfer-encodings
|
|
3079 @vindex mm-content-transfer-encodings
|
|
3080 An assoc list of @var{Content-Transfer-Encodings} or
|
|
3081 @var{Content-Encodings} and the appropriate decoding algorithms for each.
|
|
3082 If the @code{cdr} of a node is a list, then this specifies the decoder is
|
|
3083 an external program, with the program as the first item in the list, and
|
|
3084 the rest of the list specifying arguments to be passed on the command line.
|
|
3085 If using an external decoder, it must accept its input from @code{stdin}
|
|
3086 and send its output to @code{stdout}.
|
|
3087
|
|
3088 If the @code{cdr} of a node is a symbol whose function definition is
|
|
3089 non-@code{nil}, then that encoding can be handled internally. The function
|
|
3090 is called with 2 arguments, buffer positions bounding the region to be
|
|
3091 decoded. The function should completely replace that region with the
|
|
3092 unencoded information.
|
|
3093
|
|
3094 Currently supported transfer encodings are: base64, x-gzip, 7bit, 8bit,
|
|
3095 binary, x-compress, x-hqx, and quoted-printable.
|
|
3096 @item url-uncompressor-alist
|
|
3097 @vindex url-uncompressor-alist
|
|
3098 An assoc list of file extensions and the appropriate uncompression
|
|
3099 programs for each. This is used to build the Accept-encoding header for
|
20
|
3100 @sc{http}/1.0 requests.
|
0
|
3101 @end table
|
|
3102
|
26
|
3103 @node More Help, Future Directions, Advanced Features, Top
|
0
|
3104 @chapter More Help
|
|
3105 @cindex Relevant Newsgroups
|
|
3106 @cindex Newsgroups
|
|
3107 @cindex Support
|
44
|
3108 For more help on Emacs/W3, please send me mail
|
0
|
3109 (@i{wmperry@@cs.indiana.edu}). Several discussion lists have also been
|
44
|
3110 created for Emacs/W3. To subscribe, send mail to
|
0
|
3111 @i{majordomo@@indiana.edu}, with the body of the message 'subscribe
|
|
3112 @var{listname} @var{<email addres>}'. All other mail should go to
|
|
3113 @i{<listname>@@indiana.edu}.
|
|
3114
|
|
3115
|
|
3116 @itemize @bullet
|
|
3117 @item
|
44
|
3118 w3-announce -- this list is for anyone interested in Emacs/W3, and
|
0
|
3119 should in general only be used by me. The gnu.emacs.sources newsgroup
|
|
3120 and a few other mailing lists are included on this. Please only use
|
44
|
3121 this list for major package releases related to Emacs/W3.
|
0
|
3122 (@i{www-announce@@w3.org} is included on this list).
|
|
3123 @item
|
44
|
3124 w3-beta -- this list is for beta testers of Emacs/W3. These brave souls test
|
0
|
3125 out not-quite stable code.
|
|
3126 @item
|
|
3127 w3-dev -- a list consisting of myself and a few other people who are
|
44
|
3128 interested in the internals of Emacs/W3, and doing active development work.
|
0
|
3129 Pretty dead right now, but I hope it will grow.
|
|
3130 @end itemize
|
|
3131
|
|
3132 For more help on the World Wide Web in general, please refer to the
|
|
3133 comp.infosystems.www.* newsgroups. There are also several discussion
|
|
3134 lists concerning the Web. Send mail to @i{<listname>-request@@w3.org}
|
|
3135 with a subject line of 'subscribe <listname>'. All mail should go to
|
|
3136 @i{<listname>@@w3.org}. Administrative mail should go to
|
|
3137 @i{www-admin@@w3.org}. The lists are:
|
|
3138
|
|
3139
|
|
3140 @itemize @bullet
|
|
3141 @item
|
|
3142 www-talk -- for general discussion of the World Wide Web, where its
|
|
3143 going, new features, etc. All the major developers are subscribed to
|
|
3144 this list.
|
|
3145 @item
|
|
3146 www-announce -- for announcements concerning the World Wide Web. Server
|
|
3147 changes, new servers, new software, etc.
|
|
3148 @end itemize
|
|
3149
|
|
3150 As a last resort, mail me. I'll try to answer as quickly as I can.
|
|
3151
|
2
|
3152 @node Future Directions, Reporting Bugs, More Help, Top
|
0
|
3153 @chapter Future Directions
|
|
3154 Changes are constantly being made to the Emacs browser (hopefully all
|
|
3155 for the better). This is a list of the things that are being worked on
|
|
3156 right now.
|
|
3157
|
|
3158 :: WORK :: Revamp the todo list
|
|
3159
|
22
|
3160 @node Reporting Bugs, Dealing with Firewalls, Future Directions, Top
|
0
|
3161 @appendix Reporting Bugs
|
|
3162 @cindex Reporting Bugs
|
|
3163 @cindex Bugs
|
|
3164 @cindex Contacting the author
|
|
3165
|
44
|
3166 If any bugs are discovered in Emacs/W3, please report them to the
|
20
|
3167 mailing list @t{w3-beta@@indiana.edu} - this is where the brave souls
|
44
|
3168 who beta test the latest versions of Emacs/W3 reside, and are generally
|
20
|
3169 very responsive to bug reports.
|
|
3170
|
|
3171 @kindex w
|
44
|
3172 Please make sure to use the bug submission feature of Emacs/W3, so that
|
20
|
3173 all relevant information will be sent along with your bug report. By
|
44
|
3174 default this is bound to the `@key{w}' key when in an Emacs/W3 buffer,
|
20
|
3175 or you can use @key{M-x w3-submit-bug} from anywhere within Emacs.
|
|
3176
|
|
3177 For problems that are causing emacs to signal and error, please send a
|
|
3178 backtrace. You can get a backtrace by @kbd{M-x setvariable RET
|
|
3179 debug-on-error RET t RET}, and then reproduce the error.
|
0
|
3180
|
20
|
3181 If the problem is visual, please capture a copy of the output and mail
|
|
3182 it along with the bug report (preferably as a MIME attachment, but
|
|
3183 anything will do). You can use the @code{xwd} program under X-windows
|
|
3184 for this, or @key{Alt-PrintScreen} under Windows 95/NT. Sorry, but I
|
|
3185 don't remember what the magic incarnation is for doing a screen dump
|
|
3186 under NeXTstep or OS/2.
|
|
3187
|
|
3188 If the problem is actually causing Emacs to crash, then you will need to
|
|
3189 also mail the maintainers of the various Emacs distributions with the
|
|
3190 bug. Please use the @t{gnu.emacs.bug} newgroup for reporting bugs with
|
|
3191 GNU Emacs 19, and @t{comp.emacs.xemacs} for reporting bugs with XEmacs
|
|
3192 19 or XEmacs 20. I am actively involved with the beta testing of the
|
|
3193 latest versions of both branches of Emacs, and if I can reproduce the
|
|
3194 problem, I will do my best to see it gets fixed in the next release.
|
|
3195
|
|
3196 It is also important to always maintain as much context as possible in
|
|
3197 your responses. I get so much email from my various Emacs-activities
|
|
3198 and work, that I cannot remember everything. If you send a bug report,
|
|
3199 and I send you a reply, and you reply with 'no that didn't work', then
|
|
3200 odds are I will have no clue what didn't work, much less what that was
|
|
3201 trying to fix in the first place. It will be much quicker and less
|
|
3202 painful if I don't have to waste a round-trip email exchange saying
|
|
3203 'what are you talking about'.
|
|
3204
|
22
|
3205 @node Dealing with Firewalls, Proxy Gateways, Reporting Bugs, Top
|
|
3206 @appendix Dealing with Firewalls
|
|
3207 By default, Emacs can support standard @sc{tcp}/@sc{ip} network
|
|
3208 connections on almost all the platforms it runs on (Unix, @sc{vms},
|
|
3209 Windows, etc). However, there are several situations where it is not
|
|
3210 sufficient.
|
|
3211
|
|
3212 @table @b
|
|
3213 @cindex Firewalls
|
|
3214 @item Firewalls
|
|
3215 It is becoming more and more common to be behind a firewall or some
|
|
3216 other system that restricts your outbound network activity, especially
|
|
3217 if you are like me and away from the wonderful world of academia.
|
44
|
3218 Emacs/W3 has several different methods to get around firewalls (not to
|
22
|
3219 worry though - none of them should get you in trouble with the local
|
|
3220 @sc{mis} department.)
|
|
3221
|
|
3222 @item Emacs cannot resolve hostnames.
|
|
3223 @cindex Faulty hostname resolvers
|
|
3224 @cindex Broken SunOS libc
|
|
3225 @cindex Hostname resolution
|
|
3226 This happens quite often on SunOS workstations and some ULTRIX machines.
|
|
3227 Some C libraries do not include the hostname resolver routines in their
|
|
3228 static libraries. If Emacs was linked statically, and was not linked
|
|
3229 with the resolver libraries, it wil not be able to get to any machines
|
|
3230 off the local network. This is characterized by being able to reach
|
|
3231 someplace with a raw ip number, but not its hostname
|
|
3232 (@url{http://129.79.254.191/} works, but
|
|
3233 @url{http://www.cs.indiana.edu/} doesn't).
|
|
3234
|
|
3235 The best solution for this problem is to recompile Emacs, making sure to
|
|
3236 either link dynamically (if available on your operating system), or
|
|
3237 include the @file{-lresolv}.
|
|
3238
|
|
3239 @cindex url-gateway-broken-resolution
|
|
3240 If you do not have the disk space or the appropriate permissions to
|
|
3241 recompile Emacs, another alternative is using the @file{nslookup}
|
|
3242 program to do hostname resolution. To turn this on, set the variable
|
|
3243 @code{url-gateway-broken-resolution} in your @file{~/.emacs} file. This
|
|
3244 runs the program specified by @code{url-gateway-nslookup-program} (by
|
|
3245 default "@code{nslookup}" to do hostname resolution. This program should
|
|
3246 expect a single argument on the command line - the hostname to resolve,
|
|
3247 and should produce output similar to the standard Unix @file{nslookup}
|
|
3248 program:
|
|
3249
|
|
3250 @example
|
|
3251 Name: www.cs.indiana.ed
|
|
3252 Address: 129.79.254.191
|
|
3253 @end example
|
|
3254
|
|
3255 @cindex @sc{term}
|
|
3256 @item Using @sc{term} (or @sc{term}-like) Networking Software
|
|
3257 @sc{term} @footnote{@sc{term} is a user-level protocol for emulating
|
|
3258 @sc{ip} over a serial line. More information is available at
|
|
3259 @url{ftp://sunsite.unc.edu/pub/Linux/apps/comm/term}} for slip-like
|
|
3260 access to the internet.
|
|
3261
|
|
3262 @sc{note}: XEmacs and Emacs 19.22 or later have patches to enable native
|
|
3263 @sc{term} networking. To enable it, @code{#define TERM} in the
|
|
3264 appropriate s/*.h file for the operating system, then change the
|
|
3265 @code{SYSTEM_LIBS} definition to include the @file{termnet} library that
|
|
3266 comes with the latest versions of @sc{term}.
|
|
3267
|
|
3268 If you run into any problems with the native @sc{term} networking
|
|
3269 support in Emacs or XEmacs, please let @t{wmperry@@cs.indiana.edu} know,
|
|
3270 as he is responsible for the original support.
|
|
3271 @end table
|
|
3272
|
|
3273 @vindex url-gateway-local-host-regexp
|
44
|
3274 Emacs/W3 has support for using the gateway mechanism for certain
|
22
|
3275 domains, and directly connecting to others. The variable
|
|
3276 @code{url-gateway-local-host-regexp} controls this behaviour. This is a
|
|
3277 regular expression @footnote{Please see the full Emacs distribution for
|
|
3278 a description of regular expressions} that matches local hosts that do
|
|
3279 not require the use of a gateway. If @code{nil}, then all connections
|
|
3280 are made through the gateway.
|
|
3281
|
|
3282 @vindex url-gateway-method
|
44
|
3283 Emacs/W3 supports several methods of getting around gateways. The
|
22
|
3284 variable @code{url-gateway-method} controls which of these methods is
|
|
3285 used. This variable can have several values (use these as symbol names,
|
|
3286 not strings), ie: @samp{(setq url-gateway-method 'telnet)}. Possible
|
|
3287 values are:
|
|
3288
|
|
3289 @table @dfn
|
|
3290 @item telnet
|
|
3291 Use this method if you must first telnet and log into a gateway host,
|
|
3292 and then run telnet from that host to connect to outside machines.
|
|
3293
|
|
3294 :: WORK :: document telnet gw variables
|
|
3295 This section needs more information, specifically documenting the
|
|
3296 following variables. For now, please do @key{C-h v} on the variable for
|
|
3297 more information.
|
|
3298
|
|
3299 @table @code
|
|
3300 @item url-gateway-telnet-host
|
|
3301 @item url-gateway-telnet-parameters
|
|
3302 @item url-gateway-telnet-password-prompt
|
|
3303 @item url-gateway-telnet-puser-name
|
|
3304 @item url-gateway-prompt-pattern
|
|
3305 @end table
|
|
3306
|
|
3307 @item rlogin
|
|
3308 This method is identical to the @code{telnet} method, but uses
|
|
3309 @file{rlogin} to log into the remote machine without having to send the
|
|
3310 username and password over the wire every time.
|
|
3311
|
|
3312 :: WORK :: document rlogin gw variables
|
|
3313 This section needs more information, specifically documenting the
|
|
3314 following variables. For now, please do @key{C-h v} on the variable for
|
|
3315 more information.
|
|
3316
|
|
3317 @table @code
|
|
3318 @item url-gateway-rlogin-host
|
|
3319 @item url-gateway-rlogin-parameters
|
|
3320 @item url-gateway-rlogin-user-name
|
|
3321 @item url-gateway-prompt-pattern
|
|
3322 @end table
|
|
3323
|
|
3324 @item tcp
|
|
3325 Masanobu UMEDA (@i{umerin@@mse.kyutech.ac.jp}) has written a very small
|
|
3326 application that you can run in a subprocess to do the network
|
|
3327 connections.
|
|
3328
|
|
3329 @item @sc{socks}
|
|
3330 Use if the firewall has a @sc{socks} gateway running on it.
|
|
3331
|
|
3332 :: WORK :: document socks variables
|
|
3333 This section needs more information, specifically documenting the
|
|
3334 following variables. For now, please do @key{C-h v} on the variable for
|
|
3335 more information.
|
|
3336
|
|
3337 @table @code
|
|
3338 @item socks-host
|
|
3339 @item socks-password
|
|
3340 @item socks-username
|
|
3341 @item socks-port
|
|
3342 @item socks-timeout
|
|
3343 @end table
|
|
3344
|
|
3345 @c @item ssl
|
|
3346 @c This probably shouldn't be documented
|
|
3347
|
|
3348 @item native
|
44
|
3349 This means that Emacs/W3 should use the builtin networking code of
|
22
|
3350 Emacs. This should be used only if there is no firewall, or the Emacs
|
|
3351 source has already been hacked to get around the firewall.
|
|
3352 @end table
|
|
3353
|
44
|
3354 Emacs/W3 should now be able to get outside the local network. If none
|
22
|
3355 of this makes sense, its probably my fault. Please check with the
|
|
3356 network administrators to see if they have a program that does most of
|
|
3357 this already, since somebody somewhere at the company has probably been
|
|
3358 through something similar to this before, and would be much more
|
|
3359 helpful/knowledgeable about the local setup than I would be. But feel
|
|
3360 free to mail me as a last resort.
|
|
3361
|
|
3362 @node Proxy Gateways, Installing SSL, Dealing with Firewalls, Top
|
|
3363 @appendix Proxy Gateways
|
|
3364 @vindex url-proxy-services
|
|
3365 @cindex Proxy Servers
|
|
3366 @cindex Proxies
|
|
3367 @cindex Proxies, environment variables
|
|
3368 @cindex HTTP Proxy
|
|
3369
|
|
3370 In late January 1993, Kevin Altis and Lou Montulli proposed and
|
|
3371 implemented a new proxy service. This service requires the use of
|
|
3372 environment variables to specify a gateway server/port # to send
|
|
3373 protocol requests to. Each protocol (@sc{http}, @sc{wais}, gopher,
|
|
3374 @sc{ftp}, etc.) can have a different gateway server. The environment
|
|
3375 variables are @code{PROTOCOL}_proxy, where @code{PROTOCOL} is one of the
|
|
3376 supported network protocols (gopher, file, @sc{http}, @sc{ftp}, etc.)
|
|
3377
|
|
3378 @cindex No Proxy
|
|
3379 @cindex Proxies, exclusion lists
|
|
3380 @vindex NO_PROXY
|
|
3381 For companies with internal intranets, it will usually be helpful to
|
|
3382 define a list of hosts that should be contacted directly, @b{not} sent
|
|
3383 through the proxy. The @code{NO_PROXY} environment variable controls
|
|
3384 what hosts are able to be contacted directly. This should be a comma
|
|
3385 separated list of hostnames, domain names, or a mixture of both.
|
|
3386 Asterisks can be used as a wildcard. For example:
|
|
3387
|
|
3388 @example
|
|
3389 NO_PROXY=*.aventail.com,home.com,*.seanet.com
|
|
3390 @end example
|
|
3391
|
44
|
3392 tells Emacs/W3 to contact all machines in the @b{aventail.com} and
|
22
|
3393 @b{seanet.com} domains directly, as well as the machine named
|
|
3394 @b{home.com}.
|
|
3395
|
|
3396 @vindex url-proxy-services
|
|
3397 @cindex Proxies, setting from lisp
|
|
3398 For those adventurous souls who enjoy writing regular expressions, all
|
|
3399 the proxy settings can be manipulated from Emacs-Lisp. The variable
|
|
3400 @code{url-proxy-services} controls this. This is an assoc list, keyed
|
|
3401 on the protocol type (@sc{http}, gopher, etc) in all lowercase. The
|
|
3402 @code{cdr} of each entry should be the fully-specified @sc{url} of the proxy
|
|
3403 server to contact, or, in the case of the special "no_proxy" entry, a
|
|
3404 regular expression that matches any hostnames that should be contacted
|
|
3405 directly.
|
|
3406
|
|
3407 @example
|
|
3408 (setq url-proxy-services '(("http" . "http://proxy.aventail.com/")
|
|
3409 ("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com")))
|
|
3410 @end example
|
|
3411
|
26
|
3412 @node Installing SSL, Mailcap Files, Proxy Gateways, Top
|
0
|
3413 @appendix Installing SSL
|
|
3414 @cindex HTTP/1.0 Authentication
|
|
3415 @cindex Secure Sockets Layer
|
|
3416 @cindex SSL
|
|
3417 @cindex Gag Puke Retch
|
|
3418 @cindex Exportability
|
|
3419 @cindex Export Restrictions
|
44
|
3420 In order to use SSL in Emacs/W3, an implementation of SSL is necessary.
|
0
|
3421 These are the implementations that I am aware of:
|
|
3422
|
|
3423 @table @code
|
|
3424 @item SSLRef 2.0
|
|
3425 Available from Netscape Communications @footnote{http://www.netscape.com/newsref/std/sslref.html}. This requires the
|
|
3426 RSARef library, which is not exportable. The RSARef library is
|
|
3427 available from ftp://ftp.rsa.com/rsaref/
|
|
3428 @item SSLeay 0.4
|
|
3429 An implementation by Eric Young (eay@@mincom.oz.au) that is free for
|
|
3430 commerial or noncommercial use, and was developed completely outside the
|
|
3431 US by a non-US citizen. More information can be found at
|
|
3432 ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL/
|
|
3433 @end table
|
|
3434
|
44
|
3435 Currently, an external in order to use SSL from within Emacs/W3. This
|
32
|
3436 program should be able to take command line parameters for the hostname
|
|
3437 and port number to connect to, and read/write to standard input/output
|
|
3438 (similar to telnet, but without the annoying status messages).
|
|
3439
|
|
3440 The following variables control how the external program is invoked.
|
|
3441
|
|
3442 @table @code
|
|
3443 @item ssl-program-name
|
0
|
3444 @vindex ssl-program-name
|
32
|
3445 The name of the program to run, as a string.
|
|
3446
|
|
3447 @example
|
|
3448 (setq ssl-program-name "s_client")
|
|
3449 @end example
|
|
3450
|
|
3451 @item ssl-program-arguments
|
|
3452 @vindex ssl-program-arguments
|
|
3453 This should be used if your SSL program needs command line switches to
|
|
3454 specify any behaviour (certificate file locations, etc). This is a list
|
|
3455 of strings and symbols.
|
|
3456
|
|
3457 The special symbols 'host and 'port may be used in the list of arguments
|
|
3458 and will be replaced with the hostname and service/port that will be
|
|
3459 connected to.
|
|
3460
|
|
3461 @example
|
|
3462 (setq ssl-program-arguments '("-host" host "-port" service "-verify" "4"
|
|
3463 "-CApath /usr/local/ssl/certs"))
|
|
3464 @end example
|
|
3465 @end table
|
0
|
3466
|
22
|
3467 @node Mailcap Files, Down with DoubleClick, Installing SSL, Top
|
0
|
3468 @appendix Mailcap Files
|
|
3469 NCSA Mosaic and almost all other WWW browsers rely on a separate file
|
|
3470 for mapping MIME types to external viewing programs. This takes some of
|
|
3471 the burden off of browser developers, so each browser does not have to
|
|
3472 support all image formats, or postscript, etc. Instead of having the
|
44
|
3473 users of Emacs/W3 duplicate this in lisp, this file can be parsed using
|
0
|
3474 the @code{mm-parse-mailcaps} function. This function is called each
|
44
|
3475 time Emacs/W3 is loaded. It tries to locate mimetype files in several
|
0
|
3476 places. If the environment variable @code{MAILCAPS} is nonempty, then
|
|
3477 this is assumed to specify a UNIX-like path of mimetype files (this is a
|
|
3478 colon separated string of pathnames). If the @code{MAILCAPS}
|
44
|
3479 environment variable is empty, then Emacs/W3 looks for these
|
0
|
3480 files:
|
|
3481
|
|
3482 @enumerate
|
|
3483 @item
|
|
3484 @file{~/.mailcap}
|
|
3485 @item
|
|
3486 @file{/etc/mailcap}
|
|
3487 @item
|
|
3488 @file{/usr/etc/mailcap}
|
|
3489 @item
|
|
3490 @file{/usr/local/etc/mailcap}
|
|
3491 @end enumerate
|
|
3492
|
|
3493 This format of this file is specified in RFC 1343, but a brief synopsis
|
|
3494 follows (this is taken verbatim from sections of RFC 1343).
|
|
3495
|
|
3496 Each mailcap file consists of a set of entries that describe the proper
|
|
3497 handling of one media type at the local site. For example, one line
|
|
3498 might tell how to display a message in Group III fax format. A mailcap
|
|
3499 file consists of a sequence of such individual entries, separated by
|
|
3500 newlines (according to the operating system's newline
|
|
3501 conventions). Blank lines and lines that start with the "#" character
|
|
3502 (ASCII 35) are considered comments, and are ignored. Long entries may
|
|
3503 be continued on multiple lines if each non-terminal line ends with a
|
|
3504 backslash character ('\', ASCII 92), in which case the multiple lines
|
|
3505 are to be treated as a single mailcap entry. Note that for such
|
|
3506 "continued" lines, the backslash must be the last character on the line
|
|
3507 to be continued.
|
|
3508
|
|
3509 Each mailcap entry consists of a number of fields, separated by
|
|
3510 semi-colons. The first two fields are required, and must occur in the
|
|
3511 specified order. The remaining fields are optional, and may appear in
|
|
3512 any order.
|
|
3513
|
|
3514 The first field is the content-type, which indicates the type of data
|
|
3515 this mailcap entry describes how to handle. It is to be matched against
|
|
3516 the type/subtype specification in the "Content-Type" header field of an
|
|
3517 Internet mail message. If the subtype is specified as "*", it is
|
|
3518 intended to match all subtypes of the named content-type.
|
|
3519
|
|
3520 The second field, view-command, is a specification of how the message or
|
|
3521 body part can be viewed at the local site. Although the syntax of this
|
|
3522 field is fully specified, the semantics of program execution are
|
|
3523 necessarily somewhat operating system dependent.
|
|
3524
|
|
3525 The optional fields, which may be given in any order, are as follows:
|
|
3526 @itemize @bullet
|
|
3527 @item
|
|
3528 The "compose" field may be used to specify a program that can be used to
|
|
3529 compose a new body or body part in the given format. Its intended use
|
|
3530 is to support mail composing agents that support the composition of
|
|
3531 multiple types of mail using external composing agents. As with the
|
|
3532 view- command, the semantics of program execution are operating system
|
|
3533 dependent. The result of the composing program may be data that is not
|
|
3534 yet suitable for mail transport---that is, a Content-Transfer-Encoding
|
|
3535 may need to be applied to the data.
|
|
3536 @item
|
|
3537 The "composetyped" field is similar to the "compose" field, but is to be
|
|
3538 used when the composing program needs to specify the Content-type header
|
|
3539 field to be applied to the composed data. The "compose" field is
|
|
3540 simpler, and is preferred for use with existing (non-mail-oriented)
|
|
3541 programs for composing data in a given format. The "composetyped" field
|
|
3542 is necessary when the Content-type information must include auxilliary
|
|
3543 parameters, and the composition program must then know enough about mail
|
|
3544 formats to produce output that includes the mail type
|
|
3545 information.
|
|
3546 @item
|
|
3547 The "edit" field may be used to specify a program that can be used to
|
|
3548 edit a body or body part in the given format. In many cases, it may be
|
|
3549 identical in content to the "compose" field, and shares the
|
|
3550 operating-system dependent semantics for program execution.
|
|
3551 @item
|
|
3552 The "print" field may be used to specify a program that can be used to
|
|
3553 print a message or body part in the given format. As with the
|
|
3554 view-command, the semantics of program execution are operating system
|
|
3555 dependent.
|
|
3556 @item
|
|
3557 The "test" field may be used to test some external condition (e.g. the
|
|
3558 machine architecture, or the window system in use) to determine whether
|
|
3559 or not the mailcap line applies. It specifies a program to be run to
|
|
3560 test some condition. The semantics of execution and of the value
|
|
3561 returned by the test program are operating system dependent. If the
|
|
3562 test fails, a subsequent mailcap entry should be sought. Multiple test
|
|
3563 fields are not permitted---since a test can call a program, it can
|
|
3564 already be arbitrarily complex.
|
|
3565 @item
|
|
3566 The "needsterminal" field indicates that the view-command must be run on
|
|
3567 an interactive terminal. This is needed to inform window-oriented user
|
|
3568 agents that an interactive terminal is needed. (The decision is not
|
|
3569 left exclusively to the view-command because in some circumstances it
|
|
3570 may not be possible for such programs to tell whether or not they are on
|
|
3571 interactive terminals.) The needsterminal command should be assumed to
|
|
3572 apply to the compose and edit commands, too, if they exist. Note that
|
|
3573 this is NOT a test---it is a requirement for the environment in which
|
|
3574 the program will be executed, and should typically cause the creation of
|
|
3575 a terminal window when not executed on either a real terminal or a
|
|
3576 terminal window.
|
|
3577 @item
|
|
3578 The "copiousoutput" field indicates that the output from the
|
|
3579 view-command will be an extended stream of output, and is to be
|
|
3580 interpreted as advice to the UA (User Agent mail- reading program) that
|
|
3581 the output should be either paged or made scrollable. Note that it is
|
|
3582 probably a mistake if needsterminal and copiousoutput are both
|
|
3583 specified.
|
|
3584 @item
|
|
3585 The "description" field simply provides a textual description,
|
|
3586 optionally quoted, that describes the type of data, to be used
|
|
3587 optionally by mail readers that wish to describe the data before
|
|
3588 offering to display it.
|
|
3589 @item
|
|
3590 The "x11-bitmap" field names a file, in X11 bitmap (xbm) format, which
|
|
3591 points to an appropriate icon to be used to visually denote the presence
|
|
3592 of this kind of data.
|
|
3593 @item
|
|
3594 Any other fields beginning with "x-" may be included for local or
|
|
3595 mailer-specific extensions of this format. Implementations should
|
|
3596 simply ignore all such unrecognized fields to permit such extensions,
|
|
3597 some of which might be standardized in a future version of this
|
|
3598 document.
|
|
3599 @end itemize
|
|
3600
|
22
|
3601 @node Down with DoubleClick, General Index, Mailcap Files, Top
|
|
3602 @appendix Down with DoubleClick
|
|
3603 :: WORK :: Document why doubleclick is evil
|
|
3604 :: WORK :: Document how you can never see another ad from them again
|
|
3605
|
|
3606 @node General Index, Key Index, Down with DoubleClick, Top
|
0
|
3607 @appendix General Index
|
|
3608 @printindex fn
|
26
|
3609 @node Key Index, , General Index, Top
|
0
|
3610 @appendix Key Index
|
|
3611 @printindex ky
|
|
3612 @contents
|
|
3613 @bye
|