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