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