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