comparison man/w3.texi @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 6a378aca36af
children 4be1180a9e89
comparison
equal deleted inserted replaced
97:498bf5da1c90 98:0d2f883870bc
1 \input texinfo 1 \input texinfo
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
5 @c releases (I currently use version 3.9 from ftp://prep.ai.mit.edu/pub/gnu
6 @c
7 @c Please do not send in bug reports about not being able to format the
8 @c document with 'makeinfo' or 'tex', just upgrade your installation.
9 @c
10 @c Info formatted files are provided in the distribution, and you can
11 @c retrieve dvi, postscript, and PDF versions from the web site or ftp
12 @c site: http://www.cs.indiana.edu/elisp/w3/docs.html
13 @c
2 @setfilename w3.info 14 @setfilename w3.info
3 @settitle Emacs-W3 User's Manual 15 @settitle Emacs-W3 User's Manual
4 @iftex 16 @iftex
5 @finalout 17 @finalout
6 @end iftex 18 @end iftex
18 * W3: (w3). Emacs-W3 World Wide Web browser. 30 * W3: (w3). Emacs-W3 World Wide Web browser.
19 @end direntry 31 @end direntry
20 @ifinfo 32 @ifinfo
21 This file documents the Emacs-W3 World Wide Web browser. 33 This file documents the Emacs-W3 World Wide Web browser.
22 34
23 Copyright (C) 1993, 1994, 1995 William M. Perry 35 Copyright (C) 1993, 1994, 1995, 1996 William M. Perry
24 Copyright (C) 1996 Free Software Foundation 36 Copyright (C) 1996, 1997 Free Software Foundation
25 37
26 Permission is granted to make and distribute verbatim copies of 38 Permission is granted to make and distribute verbatim copies of
27 this manual provided the copyright notice and this permission notice 39 this manual provided the copyright notice and this permission notice
28 are preserved on all copies. 40 are preserved on all copies.
29 41
41 @center @titlefont{Emacs-W3} 53 @center @titlefont{Emacs-W3}
42 @center @titlefont{User's Manual} 54 @center @titlefont{User's Manual}
43 @sp 4 55 @sp 4
44 @center Third Edition, Emacs-W3 Version 3.0 56 @center Third Edition, Emacs-W3 Version 3.0
45 @sp 1 57 @sp 1
46 @center December 1996 58 @center February 1997
47 @sp 5 59 @sp 5
48 @center William M. Perry 60 @center William M. Perry
49 @center @i{wmperry@@cs.indiana.edu} 61 @center @i{wmperry@@cs.indiana.edu}
50 @page 62 @page
51 @vskip 0pt plus 1filll 63 @vskip 0pt plus 1filll
52 Copyright @copyright{} 1993, 1994, 1995 William M. Perry@* 64 Copyright @copyright{} 1993, 1994, 1995 William M. Perry@*
53 Copyright @copyright{} 1996 Free Software Foundation 65 Copyright @copyright{} 1996, 1997 Free Software Foundation
54 66
55 Permission is granted to make and distribute verbatim copies of@* 67 Permission is granted to make and distribute verbatim copies of@*
56 this manual provided the copyright notice and this permission notice@* 68 this manual provided the copyright notice and this permission notice@*
57 are preserved on all copies. 69 are preserved on all copies.
58 70
59 @end titlepage 71 @end titlepage
60 @page 72 @page
61 @ifinfo 73 @ifinfo
62 @node Top, Introduction,, (DIR) 74 @node Top, Getting Started,, (DIR)
63 This manual documents the Emacs-W3 World Wide Web browser, a Lisp program 75 Users can browse the World Wide Web from within Emacs by using Emacs-W3.
64 which runs as a subsystem under Emacs. The manual is divided into the 76 All of the widely used (and even some not very widely used) @sc{url}
65 following chapters. 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}
66 90
67 @menu 91 @menu
68 * Introduction:: Overview of Emacs-W3.
69 * Getting Started:: Getting up and running with Emacs-W3 92 * Getting Started:: Getting up and running with Emacs-W3
70 * Basic Usage:: Basic movement and usage of Emacs-W3. 93 * Basic Usage:: Basic movement and usage of Emacs-W3.
71 * Compatibility:: Explanation of compatibility with 94 * Compatibility:: Explanation of compatibility with
72 other web browsers. 95 other browsers.
73 * Controlling Formatting:: How to control HTML formatting 96 * Stylesheets:: How to control the look of web pages
74 * MIME Support:: Support for MIME 97 * Supported URLs:: What @sc{URL} schemes are supported.
75 * Security:: Various forms of security 98 * MIME Support:: Support for @sc{mime}
99 * Security:: Various security methods supported
76 * Non-Unix Operating Systems:: Special considerations necessary to get 100 * Non-Unix Operating Systems:: Special considerations necessary to get
77 up and running correctly under non-unix 101 up and running correctly under non-unix
78 OS's. 102 OS's.
103 * Speech Integration:: Outputting to a speech synthesizer.
79 * Advanced Features:: Some of the more arcane features. 104 * Advanced Features:: Some of the more arcane features.
80 * More Help:: How to get more help---mailing lists, 105 * More Help:: How to get more help---mailing lists,
81 newsgroups, etc. 106 newsgroups, etc.
82 * Future Directions:: Plans for future revisions 107 * Future Directions:: Plans for future revisions
83 108
84 Appendices: 109 Appendices:
85 * Reporting Bugs:: How to report a bug in Emacs-W3 110 * Reporting Bugs:: How to report a bug in Emacs-W3.
86 * Installing SSL:: Turning on SSL support 111 * Dealing with Firewalls:: How to get around your firewall.
87 * Using PGP/PEM:: Turning on PGP/PEM encryption support 112 * Proxy Gateways:: Using a proxy gateway with Emacs-W3.
88 * Mailcap Files:: An explanation of Mailcap files 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!
89 116
90 Indices: 117 Indices:
91 * General Index:: General Index 118 * General Index:: General Index.
92 * Key Index:: Menus of command keys and their references 119 * Key Index:: Menus of command keys and their references.
93 @end menu 120 @end menu
94 @end ifinfo 121 @end ifinfo
95 122
96 @node Introduction, Getting Started, Top, Top 123 @node Getting Started, Basic Usage, Top, Top
97 @chapter Introduction
98 @cindex World Wide Web
99
100 :: WORK :: Basic info on what Emacs-W3 is, including copyrights, etc.
101
102 @ifinfo
103 Here is some more specific information about what languages and
104 protocols Emacs-W3 supports.
105 @menu
106 * Markup Languages Supported:: Markup languages supported by Emacs-W3
107 * Stylesheets:: Stylesheet languages supported by Emacs-W3
108 * Supported Protocols:: Network protocols supported by Emacs-W3
109 @end menu
110 @end ifinfo
111 @node Markup Languages Supported, Stylesheets, Introduction, Introduction
112 @chapter Supported Markup Languages
113 Several different markup languages, and various extensions to those
114 languages, are supported by Emacs-W3.
115 @ifinfo
116 @center ----------
117 @center HTML 2.0
118 @center ----------
119 @end ifinfo
120 @iftex
121 @section HTML 2.0
122 @end iftex
123 @cindex HTML 2.0
124
125 :: WORK :: Reference to the HTML 2.0 RFC
126 :: WORK :: Basic explanation of HTML, tag structure, etc.
127
128 @ifinfo
129 @center ----------
130 @center HTML 3.2
131 @center ----------
132 @end ifinfo
133 @iftex
134 @section HTML 3.2
135 @end iftex
136 @cindex HTML 3.2
137 The HTML 3.2 language is an extension of HTML, with a large degree of
138 backward compatibility with HTML 2.0. This basically documents current
139 practice as of January, 1996.
140
141 @ifinfo
142 @center ----------
143 @center SGML Features
144 @center ----------
145 @end ifinfo
146 @iftex
147 @section SGML Features
148 @end iftex
149 @cindex SGML Features
150 @cindex Entity Definitions
151 @cindex Marked Sections
152
153 :: WORK :: Document marked sections, SGML features
154
155 @ifinfo
156 @center ----------
157 @center Extras
158 @center ----------
159 @end ifinfo
160 @iftex
161 @section Extra Markup
162 @end iftex
163 @cindex Easter Eggs
164 @cindex Fluff
165 @cindex Pomp & Circumstance
166 There are several different markup elements that are not officially part
167 of HTML or HTML 3.2 that Emacs-W3 supports. These are either items that
168 were dropped from HTML 3.@var{x} after I had implemented them, things I
169 find just completely hilarious, or experimental parts of HTML that
170 should not be counted as "official" or long lived.
171 @itemize @bullet
172 @item
173 FLAME support. For truly interesting dynamic documents. This is
174 replaced with a random quote from Mr. Angry (see @kbd{M-x flame} for a
175 sample).
176 @item
177 The top ten tags that did not make it into netscape. These tags were
178 posted to the newsgroup comp.infosystems.www.misc by Laura Lemay
179 (@i{lemay@@netcom.com}). Much thanks to her for the humor.
180 @table @b
181 @item <wired>...</wired>
182 Renders the enclosed text in a suitably ugly font/color combination. If
183 no default has been set up by the user, this is the default font, with
184 red text on a yellow background.
185 @item <roach>...</roach>
186 When selected, the enclosed text runs and hides under the nearest
187 window. OR, giggles a lot and demands nachos, depending on the
188 definition of "roach." (the formal definition, of course, to be
189 determined by the Official Honorary Internet Standards Committee For
190 Moving Really Slowly.)
191 @item <pinhead>
192 Inserts "zippyisms" into the enclosed text. Perfect for those professional
193 documents. This is sure to be a favorite of mine!
194 @item <secret>...</secret>
195 Must use secret spy decoder glasses (available direct from Netscape for
196 a reasonable fee) in order to read the enclosed text. Can also be read
197 by holding the computer in front of a full moon during the autumn
198 solstice.
199
200 In Emacs-W3, this displays the text using rot13 encoding.
201 @item <hype>
202 Causes Marc Andreesen to magically appear and grant an interview (wanted
203 or not). Please use this tag sparingly.
204 @item <peek>....</peek>
205 @item <poke>...</poke>
206 Need more control over screen layout in HTML? Well, here ya go.
207 n
208 Actually, <peek> could almost be considered useful. The VARIABLE
209 attribute can be used to insert the value of an emacs variable into the
210 current document. Things like 'Welcome to my page, <peek
211 variable=user-mail-address>' can be useful in spreading fear,
212 uncertainty, and doubt among users.
213 @item <yogsothoth>
214 @cindex Gates Bill
215 @cindex Yogsothoth
216 Summons the elder gods to suck away your immortal soul. Or Bill Gates,
217 if the elder gods are busy. Unpredictable (but amusing) results occur
218 when the <YOGSOTHOTH> and <HYPE> tags are used in close proximity.
219
220 @item <blink>...</blink>
221 Causes the enclosed text to .... ooops that one made it in.
222 @end table
223 @end itemize
224
225 @node Stylesheets, Supported Protocols, Markup Languages Supported,Introduction
226 @chapter Stylesheets
227 @cindex Stylesheets
228 @cindex Cascading Style Sheets
229 @cindex Aural Cascading Style Sheets
230 @cindex CSS
231 @cindex DSSSL
232 :: WORK :: Document CSS support
233 CSS Information at http://www.w3.org/pub/WWW/TR/REC-CSS1
234 Style guide at http://www.htmlhelp.com/reference/css/
235 :: WORK :: Document ACSS support
236 ACSS Information at http://www.w3.org/pub/WWW/Style/CSS/Speech/NOTE-ACSS
237 :: WORK :: Document DSSSL support
238
239 @node Supported Protocols, , Stylesheets, Introduction
240 @chapter Supported Protocols
241 @cindex Network Protocols
242 @cindex Protocols Supported
243 @cindex Supported Protocols
244 Emacs-W3 supports the following protocols
245 @table @b
246 @item Usenet News
247 Can either display an entire newsgroup or specific articles by
248 Message-ID: header. Instead of rewriting a newsreader, this integrates
249 with the Gnus newsreader. It requires at least Gnus 5.0, but it is
250 always safest to use the latest version. Gnus supports some very
251 advanced features, including virtual newsgroups, mail and news
252 integration, and reading news from multiple servers. @inforef{Gnus,
253 Top,gnus}, for more info.
254
255 To be more in line with the other URL schemes, the hostname and port of
256 an NNTP server can be specified. URLs of the form
257 news://hostname:port/messageID work, but might not work in some other
258 browsers.
259
260 @item HTTP
261 Supports the HTTP/0.9, HTTP/1.0, and parts of the HTTP/1.1 protocols.
262 @item Gopher
263 Support for all gopher types, including CSO queries.
264 @item Gopher+
265 Support for Gopher+ retrievals. Support for converting ASK blocks into
266 HTML 3.0 FORMS and submitting them back to the server.
267 @item FTP
268 FTP is handled by either ange-ftp or efs.
269 @inforef{Ange-FTP,Top,ange-ftp}, for more information on Ange-FTP, or
270 @inforef{EFS, Top,efs}, for information on EFS.
271 @item Local files
272 Local files are of course handled, and MIME content-types are derived
273 from the file extensions.
274 @item telnet, tn3270, rlogin
275 Telnet, tn3270, and rogin are handled by running the appropriate program
276 in an emacs buffer, or running an external process.
277 @item mailto
278 Causes a mail message to be started to a specific address. Supports the
279 Netscape @i{extensions} to specify arbitrary headers on the message.
280 @item data
281 A quick and easy way to `inline' small pieces of information that you do
282 not necessarily want to download over the net separately. Can speed up
283 display of small icons, stylesheet information, etc. See the internet
284 draft draft-masinter-url-data-02.txt for more information.
285 @item mailserver
286 A more powerful version of mailto, which allows the author to specify
287 the subject and body text of the mail message. This type of link is
288 never fully executed without user confirmation, because it is possible
289 to insert insulting or threatening (and possibly illegal) data into the
290 message. The mail message is displayed, and the user must confirm the
291 message before it is sent.
292 @item x-exec
293 A URL can cause a local executable to be run, and its output interpreted
294 as if it had come from an HTTP server. This is very useful, but is
295 still an experimental protocol, hence the X- prefix. This URL protocol
296 is deprecated, but might be useful in the future.
297 @item NFS
298 Retrieves information over NFS. This requires that your operating
299 system support auto-mounting of NFS volumes.
300 @item finger
301 Retrieves information about a user via the 'finger' protocol.
302 @item Info
303 Creates a link to an GNU-style info file. @inforef{Info,Top,info}, for more
304 information on the Info format.
305 @item SSL
306 SSL requires a set of patches to the Emacs C code and SSLRef 2.0, or an
307 external program to run in a subprocess (similar to the @file{tcp.el}
308 package that comes with GNUS. @xref{Installing SSL}
309 @end table
310
311 @node Getting Started, Getting Emacs, Introduction, Top
312 @chapter Getting Started 124 @chapter Getting Started
313 @cindex Clueless in Seattle 125 @cindex Clueless in Seattle
314 @cindex Getting Started 126 @cindex Getting Started
315 This section of the manual deals with getting, compiling, and 127 @kindex M-x w3
316 configuring @i{Emacs-W3}. 128 @vindex w3-default-homepage
317 :: WORK :: Introduction to 'Getting Started' 129 @findex w3
318 130 If installed correctly, starting Emacs-W3 is quite painless. Just type
319 @ifinfo 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.
134
135 If the default page is not retrieved correctly at startup, you will have
136 to do some customization.
137
320 @menu 138 @menu
321 * Getting Emacs:: Where to get Emacs 139 * Downloading:: Where to download Emacs-W3.
322 * Getting Emacs-W3:: Where to get Emacs-W3 140 * Building and Installing:: Compiling and installing from source.
323 * Basic Setup:: Basic setup that most people want to do 141 * Startup Files:: What is where, and why.
324 * Firewalls:: Integrating Emacs-W3 with a firewall setup. 142 * Preferences Panel:: Quick configuration of common options.
325 * Proxy Gateways:: Using a proxy server
326 @end menu 143 @end menu
327 @end ifinfo 144
328 145 @node Downloading, Building and Installing, Getting Started, Getting Started
329 @node Getting Emacs, Getting Emacs-W3, Getting Started, Getting Started 146 @section Downloading
330 @section Getting Emacs 147 :: WORK :: What you need, and why
331 @cindex Getting Emacs 148 :: WORK :: Where to download Emacs, XEmacs, various platforms
332 @cindex Source code availability 149 :: WORK :: Where to download Emacs-W3
333 :: WORK :: Explanation of Emacs, XEmacs, and where to get both 150 :: WORK :: Where to download related utilities (netpbm, xv, gimp, etc.)
334 151
335 @node Getting Emacs-W3, Basic Setup, Getting Emacs, Getting Started 152 @node Building and Installing, Startup Files, Downloading, Getting Started
336 @section Getting Emacs-W3 153 @section Building and Installing
337 @cindex FTP'in the distribution 154 :: WORK :: Document makefile variables
338 @cindex Source code availability 155 :: WORK :: Document what gets installed where, why
339 :: WORK :: Explanation of Emacs, XEmacs, and where to get both 156
340 157 @node Startup Files, Preferences Panel, Building and Installing, Getting Started
341 @node Basic Setup, Firewalls, Getting Emacs-W3, Getting Started 158 @section Startup Files
342 @section Basic Setup 159 @cindex Startup files
343 For most people, Emacs-W3 will be ready to run straight out of the box. 160 @cindex Default stylesheet
344 Once the user is more familiar with the web and how it integrates with 161 :: WORK :: startup files
345 Emacs, there are a few basic configuration variables that most people 162 This section should document where emacs-w3 looks for its startup files,
346 will want to personalize. 163 and what each one does. 'profile' 'stylesheet' 'hotlist' 'history' etc.
347 164
348 @table @code 165 @node Preferences Panel, , Startup Files, Getting Started
349 @item w3-default-homepage 166 @section Preferences Panel
350 @vindex w3-default-homepage 167 @cindex Preferences
351 The URL to open at startup. This defaults to the environment variable 168 @kindex M-x w3-preferences-edit
352 WWW_HOME if it is not set it in the users @file{.emacs} file. If 169 :: WORK :: pref panel
353 WWW_HOME is undefined, then it defaults to the hypertext documentation 170 This should document the quick preferences panel. M-x w3-preferences-edit
354 for Emacs-W3. 171
355 172 @node Basic Usage, Movement , Getting Started, Top
356 @item w3-delay-image-loads
357 @vindex w3-delay-image-loads
358 Controls the loading of inlined images. If non-@code{nil}, images are
359 not loaded. If the correct image converters are not installed or the
360 network connection is very slow, it is best to set this to @code{t}.
361 Defaults to @code{nil}.
362 @item url-global-history-file
363 @vindex url-global-history-file
364 The global history file used by both Mosaic/X and Emacs-W3. This file
365 contains a list of all the URLs that have been visited. This file is parsed
366 at startup and used to provide URL completion. Emacs-W3 can read and
367 write Mosaic/X or Netscape 1.x style history files, or use its own
368 internal format (faster). The file type is determined automatically, or
369 prompted for if the file does not exist.
370 @item w3-hotlist-file
371 @vindex w3-hotlist-file
372 Hotlist filename. This should be the name of a file that is stored in
373 NCSA's Mosaic/X or Netscape's format. It is used to keep a listing of
374 commonly accessed URLs.
375 @item w3-personal-annotation-directory
376 @vindex w3-personal-annotation-directory
377 The directory where Emacs-W3 looks for personal annotations. This is a
378 directory that should hold the personal annotations stored in a
379 Mosaic/X-compatible format.
380 @item url-pgp/pem-entity
381 @findex user-real-login-name
382 @findex system-name
383 The name by which the user is known to PGP and/or PEM entities. If this
384 is not set when Emacs-W3 is loaded, it defaults to
385 @code{user-mail-address} if it is set, otherwise @code{(user-real-login-name)}@@@code{(system-name)}.
386 @item url-personal-mail-address
387 @vindex url-personal-mail-address
388 @vindex url-pgp/pem-entity
389 User's full email address. This is what is sent to HTTP/1.0 servers as
390 the FROM header. If this is not set when Emacs-W3 is loaded, then it
391 defaults to the value of @code{url-pgp/pem-entity}.
392
393 @item w3-right-border
394 @vindex w3-right-border
395 @findex window-width
396 Amount of space to leave on right margin of WWW buffers. This amount is
397 subtracted from the width of the window for each new WWW buffer and used
398 as the new @code{fill-column}.
399
400 @item w3-track-mouse
401 @vindex w3-track-mouse
402 Controls whether to track the mouse and message the url under the mouse.
403 If this is non-@code{nil}, then a description of the hypertext area
404 under the mouse is shown in the minibuffer. This shows what type of
405 link (inlined image, form entry area, delayed image, delayed MPEG, or
406 hypertext reference) is under the cursor, and the destination.
407 @item w3-echo-link
408 @vindex w3-echo-link
409 Controls how a URL is shown when a link is reached with @key{f},
410 @key{b}, or the mouse moves over it. Possible values are:
411 @table @b
412 @item url
413 Displays the URL (ie: @samp{http://www.cs.indiana.edu/}).
414 @item text
415 Displays the text of the link (ie: @samp{A link to Indiana University}).
416 @item title
417 Displays the title of the link, if any, otherwise behaves the same as @code{url}.
418 @item nil
419 Show nothing.
420 @end table
421 @item w3-use-forms-index
422 @vindex w3-use-forms-index
423 @cindex ISINDEX handling
424 @cindex Forms based searching
425 @cindex Searching with forms
426 Non-@code{nil} means translate <ISINDEX> tags into a hypertext form. A
427 single text entry box is shown where the ISINDEX tag appears.
428 @item url-use-hypertext-gopher
429 @vindex url-use-hypertext-gopher
430 @cindex Gopher+
431 Controls how gopher documents are retrieved. If non-@code{nil}, the
432 gopher pages are converted into HTML and parsed just like any other
433 page. If @code{nil}, the requests are passed off to the
434 @file{gopher.el} package by Scott Snyder. Using the @file{gopher.el}
435 package loses the gopher+ support, and inlined searching.
436 @item url-xterm-command
437 @vindex url-xterm-command
438 Command used to start a windowed shell, similar to an xterm. This
439 string is passed through @code{format}, and should expect four strings:
440 the title of the window, the program name to execute, and the server and
441 port number. The default is for xterm, which is very UNIX and
442 XWindows-centric.
443 @end table
444 @node Firewalls, Proxy Gateways, Basic Setup, Getting Started
445 @section Firewalls
446 @cindex Gateways
447 There are several different reasons why the gateway support might be
448 required.
449 @enumerate
450 @cindex Firewalls
451 @item
452 Stuck behind a firewall. This is usually the case at large corporations
453 with paranoid system-administrators.
454
455 @cindex TERM
456 @item
457 Using TERM @footnote{TERM is a user-level protocol for emulating IP over
458 a serial line. More information is available at
459 ftp://sunsite.unc.edu/pub/Linux/apps/comm/term} for slip-like access to
460 the internet.
461
462 NOTE: XEmacs and Emacs 19.22 or later have patches to enable native TERM
463 networking. To enable it, #define TERM in the appropriate s/*.h file
464 for the operating system, then change the SYSTEM_LIBS define to include
465 the @file{termnet} library that comes with the latest versions of TERM.
466
467 @item
468 @cindex Faulty hostname resolvers
469 @cindex Broken SUN libc
470 @cindex Can't resolve hostnames
471 Emacs cannot resolve hostnames. This happens quite often on Sun
472 workstations and some ULTRIX machines. Some C libraries do not include
473 the hostname resolver routines in their static libraries. If Emacs was
474 linked statically, this means it won't be able to get to any machines
475 off the local network. This is characterized by being able to reach
476 someplace with a raw ip number, but not its hostname
477 (http://129.79.254.191/ works, but http://www.cs.indiana.edu/ doesn't).
478
479 If for some reason it is not feasible to recompile Emacs with the
480 @file{-lresolv} library or dynamic linking, it is just like being behind
481 a firewall. Another alternative is to set the variable
482 @code{url-broken-resolution} - this will use the support in ange-ftp or
483 EFS to use @file{nslookup} in a subprocess to do all hostname resolving.
484 See the variables @code{efs-nslookup-program},
485 @code{efs-nslookup-on-connect}, and @code{efs-nslookup-threshold} if are
486 using EFS, or @code{ange-ftp-nslookup-program} if using Ange-FTP.
487
488 @end enumerate
489
490 @vindex url-gateway-local-host-regexp
491 Emacs-W3 has support for using the gateway mechanism for certain
492 domains, and directly connecting to others. To use this, change the
493 value of @code{url-gateway-local-host-regexp}. This should be a regular
494 expression @footnote{Please see the full Emacs distribution for a
495 description of regular expressions} that matches local hosts that do not
496 require the use of a gateway. If @code{nil}, then all connections are
497 made through the gateway.
498
499
500 @vindex url-gateway-method
501 Emacs-W3 supports several methods of getting around gateways. The variable
502 @code{url-gateway-method} controls which of these methods is used. This
503 variable can have several values (use these as symbol names, not
504 strings):
505 @table @dfn
506 @item program
507 Run a program in a subprocess to connect to remote hosts (examples are
508 @i{itelnet}@footnote{Itelnet is a standard name for a telnet executable
509 that is capable of escaping the firewall. Check with system
510 administrators to see if anything similar is available}, an
511 @i{expect}@footnote{Expect is a scripting language that allows control
512 of interactive programs (like telnet) very easily. It is available from
513 gatekeeper.dec.com:/pub/GNU/expect-3.24.0.tar.gz} script, etc.).
514
515 @item tcp
516 Masanobu UMEDA (@i{umerin@@mse.kyutech.ac.jp}) has written a very nice
517 replacement for the standard networking in Emacs. This does basically
518 the same thing that a method of @code{program} does, but is slightly
519 more transparent to the user.
520 @item native
521 This means that Emacs-W3 should use the builtin networking code of Emacs.
522 This should be used only if there is no firewall, or the Emacs source
523 has already been hacked to get around the firewall.
524 @end table
525 One of these needs a bit more explanation than that:
526 @vindex url-gateway-telnet-ready-regexp
527 @vindex url-gateway-telnet-program
528 When running a program in a subprocess to emulate a network connection,
529 a few extra variables need to be set. The variable
530 @code{url-gateway-telnet-program} should point to an executable that
531 accepts a hostname and port # as its arguments, and passes standard
532 input to the remote host. This can be either the full path to the
533 executable or just the basename. The variable
534 @code{url-gateway-telnet-ready-regexp} controls how long Emacs-W3 should
535 wait after spawning the subprocess to start sending to its standard
536 input. This gets around a bug where telnet would miss the beginning of
537 requests becausse it did not buffer its input before opening a
538 connection. This should be a regular expression to watch for that
539 signifies the end of the setup of @code{url-gateway-telnet-program}.
540 The default should work fine for telnet.
541
542 Emacs-W3 should now be able to get outside the local network. If none
543 of this makes sense, its probably my fault. Please check with the
544 network administrators to see if they have a program that does most of
545 this already, since somebody somewhere at the company has probably been
546 through something similar to this before, and would be much more
547 helpful/knowledgeable about the local setup than I would be. But feel
548 free to mail me as a last resort.
549
550 @node Proxy Gateways, Basic Usage, Firewalls, Getting Started
551 @section Proxy Gateways
552 @vindex url-proxy-services
553 @cindex Proxy Servers
554 @cindex Proxies
555 @cindex Proxies, environment variables
556 @cindex HTTP Proxy
557 In late January 1993, Kevin Altis and Lou Montulli proposed and
558 implemented a new proxy service. This service requires the use of
559 environment variables to specify a gateway server/port # to send
560 protocol requests to. Each protocol (HTTP, WAIS, gopher, FTP, etc.@:)
561 can have a different gateway server. The environment variables are
562 @var{PROTOCOL}_proxy, where @var{PROTOCOL} is one of the supported
563 network protocols (gopher, file, HTTP, FTP, etc.)
564
565 @cindex No Proxy
566 @cindex Proxies, exclusion lists
567 @vindex NO_PROXY
568 For companies with internal intranets, it will usually be helpful to
569 define a list of hosts that should be contacted directly, @b{not} sent
570 through the proxy. The @var{NO_PROXY} environment variable controls
571 what hosts are able to be contacted directly. This should be a comma
572 separated list of hostnames, domain names, or a mixture of both.
573 Asterisks can be used as a wildcard. For example:
574
575 @example
576 NO_PROXY=*.aventail.com,home.com,*.seanet.com
577 @end example
578
579 tells Emacs-W3 to contact all machines in the @b{aventail.com} and
580 @b{seanet.com} domains directly, as well as the machine named
581 @b{home.com}.
582
583 @vindex url-proxy-services
584 @cindex Proxies, setting from lisp
585 For those adventurous souls who enjoy writing regular expressions, all
586 the proxy settings can be manipulated from Emacs-Lisp. The variable
587 @code{url-proxy-services} controls this. This is an assoc list, keyed
588 on the protocol type (http, gopher, etc) in all lowercase. The
589 @code{cdr} of each entry should be the fully-specified URL of the proxy
590 server to contact, or, in the case of the special "no_proxy" entry, a
591 regular expression that matches any hostnames that should be contacted
592 directly.
593
594 @example
595 (setq url-proxy-services '(("http" . "http://proxy.aventail.com/")
596 ("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com")))
597 @end example
598
599 @node Basic Usage, , Proxy Gateways, Top
600 @chapter Basic Usage 173 @chapter Basic Usage
601 Emacs-W3 is similar to the Info package all Emacs users hold near and dear to 174 @cindex Basic Usage
602 their hearts (@xref{Top,,Info,info, The Info Manual}, for a description 175 @kindex space
603 of Info). Basically, @kbd{space} and @kbd{backspace} control scrolling, 176 @kindex backspace
604 and @kbd{return} or @kbd{mouse2} follows a hypertext link. The @kbd{f} 177 @kindex return
605 and @kbd{b} keys maneuver around the various links on the page. 178 @kindex tab
606 179 @kindex M-tab
607 @b{NOTE:} To enter data into a form entry area, select it using 180 Emacs-W3 is similar to the Info package all Emacs users hold near and
608 @kbd{return} or the middle mouse button, just like a hypertext link. 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.
186
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.
609 193
610 By default, hypertext links are surrounded by '[[' and ']]' on 194 By default, hypertext links are surrounded by '[[' and ']]' on
611 non-graphic terminals (VT100, DOS window, etc.). On a graphics 195 non-graphic terminals (VT100, DOS window, etc.). On a graphics
612 terminal, the links are in shown in different colors. @xref{Controlling 196 terminal, the links are in shown in different colors.
613 Formatting} for information on how to change this, or for help on 197 @xref{Stylesheets} for information on how to change this.
614 getting the highlighting to work on graphics terminals.
615 198
616 There are approximately 50 keys bound to special Emacs-W3 functions. 199 There are approximately 50 keys bound to special Emacs-W3 functions.
617 The basic rule of thumb regarding keybindings in Emacs-W3 is that a 200 The basic rule of thumb regarding keybindings in Emacs-W3 is that a
618 lowercase key takes an action on the @b{current document}, and an 201 lowercase key takes an action on the @b{current document}, and an
619 uppercase key takes an action on the document pointed to by the 202 uppercase key takes an action on the document pointed to by the
622 There are several areas that the keybindings fall into: movement, 205 There are several areas that the keybindings fall into: movement,
623 information, action, and miscellaneous. 206 information, action, and miscellaneous.
624 207
625 @ifinfo 208 @ifinfo
626 @menu 209 @menu
627 * Movement:: Moving around in a Emacs-W3 buffer 210 * Movement:: Moving around in the buffer.
628 * Information:: Getting information about the Emacs-W3 document being 211 * Information:: Getting information about a document.
629 viewed, and/or links within that document. 212 * Action:: Following links, printing, etc.
630 * Action:: Taking actions in a Emacs-W3 buffer (following links, 213 * Miscellaneous:: Everything else.
631 printing, etc.)
632 * Miscellaneous:: Miscellaneous keybindings
633 @end menu 214 @end menu
634 @end ifinfo 215 @end ifinfo
635 @node Movement, Information, Basic Usage, Basic Usage 216 @node Movement, Information, Basic Usage, Basic Usage
636 @section Movement 217 @section Movement
637 :: WORK :: Document the 'h' and 'a' keymaps 218 All the standard Emacs bindings for movement are still in effect, with a
219 few additions for convenience.
220
638 @table @kbd 221 @table @kbd
639 @findex scroll-up 222 @findex w3-scroll-up
640 @kindex SPC 223 @kindex space
641 @item SPC 224 @item space
642 Scroll downward in the buffer. With prefix arg, scroll down that many 225 Scroll downward in the buffer. With prefix arg, scroll down that many
643 screenfuls. 226 screenfuls.
644 @kindex DEL 227 @kindex backspace
645 @findex scroll-down 228 @findex scroll-down
646 @item DEL 229 @item backspace
647 Scroll upward in the buffer. With prefix arg, scroll up that many 230 Scroll upward in the buffer. With prefix arg, scroll up that many
648 screenfuls. 231 screenfuls.
649 @kindex < 232 @kindex <
650 @findex w3-start-of-document 233 @findex w3-start-of-document
651 @item < 234 @item <
653 @kindex > 236 @kindex >
654 @findex w3-end-of-document 237 @findex w3-end-of-document
655 @item > 238 @item >
656 Goes to the end of document 239 Goes to the end of document
657 @kindex b 240 @kindex b
658 @kindex Shift-TAB 241 @kindex Meta-tab
659 @findex w3-back-link 242 @findex w3-widget-backward
660 @item Shift-TAB, b 243 @item Meta-tab, b
661 Attempts to move backward one link area in the current document. 244 Attempts to move backward one link area in the current document.
662 Signals an error if no previous links are found. 245 Signals an error if no previous links are found.
663 @kindex hl 246 @kindex f
664 @findex w3-show-hotlist 247 @kindex tab
665 @item hl 248 @kindex n
666 Displays a complete listing of the items in the hotlist. 249 @findex w3-widget-forward
667 @kindex hu 250 @item tab, f, n
668 @findex w3-use-hotlist 251 Attempts to move forward one link area in the current document. Signals
669 @item hu 252 an error if no more links are found.
670 Go to a link in the hotlist. 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
671 @kindex m 327 @kindex m
672 @findex w3-complete-link 328 @findex w3-complete-link
673 @item m 329 @item m
674 Choose a link from the current buffer and follow it. A completing-read 330 Choose a link from the current buffer and follow it. A completing-read
675 is done on all the links, so @kbd{space} and @kbd{TAB} can be used for 331 is done on all the links, so @kbd{space} and @kbd{TAB} can be used for
676 completion. 332 completion.
677 @kindex f
678 @kindex TAB
679 @kindex n
680 @findex w3-forward-link
681 @item TAB, f, n
682 Attempts to move forward one link area in the current document. Signals
683 an error if no more links are found.
684 @end table
685 @node Information, Action, Movement, Basic Usage
686 @section Information
687 These functions relate information about one or more links on the
688 current document.
689 @table @kbd
690 @kindex v
691 @findex url-view-url
692 @item v
693 This shows the URL of the current document in the minibuffer.
694 @kindex V
695 @findex w3-view-this-url
696 @item V
697 This shows the URL of the hypertext link under point in the minibuffer.
698 If there is not a hypertext link under point, then it shows the type of
699 form entry area under point. If there is no form entry area under
700 point, then it shows the inlined image's URL that is under point, if
701 any.
702 @kindex i
703 @findex w3-document-information
704 @item i
705 Shows miscellaneous information about the currently displayed document.
706 This includes the URL, the last modified date, MIME headers, the HTTP
707 response code, and any relationships to other documents. Any security
708 information is also displayed.
709 @kindex I
710 @findex w3-document-information-this-url
711 @item I
712 Shows information about the URL at point.
713 @kindex s
714 @findex w3-source-document
715 @item s
716 This shows the HTML source of the current document in a separate buffer.
717 The buffer's name is based on the document's URL.
718 @kindex S
719 @findex w3-source-document-at-point
720 @item S
721 Shows the HTML source of the hypertext link under point in a separate
722 buffer. The buffer's name is based on the document's URL.
723 @kindex k
724 @findex w3-save-url
725 @item k
726 This stores the current document's URL in the kill ring, and also in the
727 current window-system's clipboard, if possible.
728 @kindex K
729 @findex w3-save-this-url
730 @item K
731 Stores the URL of the document under point in the kill ring, and also in
732 the current window-system's clipboard, if possible.
733 @end table
734 @node Action, Miscellaneous, Information, Basic Usage
735 @section Action
736 First, here are the keys and functions that bring up a new hypertext
737 page, usually creating a new buffer.
738 @table @kbd
739 @kindex return 333 @kindex return
740 @findex w3-follow-link 334 @findex w3-follow-link
741 @item return 335 @item return
742 Pressing return when over a hyperlink attempts to follow the link 336 Pressing return when over a hyperlink attempts to follow the link
743 under the cursor. With a prefix argument (@kbd{C-u}), this forces the 337 under the cursor. With a prefix argument (@kbd{C-u}), this forces the
744 file to be saved to disk instead of being passed off to other viewers 338 file to be saved to disk instead of being passed off to other viewers
745 or being parsed as HTML. 339 or being parsed as @sc{html}.
746 340
747 Pressing return when over a form input field will prompt in the 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
748 minibuffer for the data to insert into the input field. Type checking 345 minibuffer for the data to insert into the input field. Type checking
749 is done, and the data is only entered into the form when data of the 346 is done, and the data is only entered into the form when data of the
750 correct type is entered (ie: cannot enter 44 for 'date' field, etc). 347 correct type is entered (ie: cannot enter 44 for 'date' field, etc).
751 348
752 @kindex Middle Mouse Button 349 @kindex Middle Mouse Button
769 366
770 @kindex p 367 @kindex p
771 @findex w3-print-this-url 368 @findex w3-print-this-url
772 @item p 369 @item p
773 Prints out the current buffer in a variety of formats, including 370 Prints out the current buffer in a variety of formats, including
774 PostScript, HTML source, or formatted text. 371 PostScript, @sc{html} source, or formatted text.
775 @kindex P 372 @kindex P
776 @findex w3-print-url-under-point 373 @findex w3-print-url-under-point
777 @item P 374 @item P
778 Prints out the URL under point in a variety of formats, including 375 Prints out the @sc{url} under point in a variety of formats, including
779 PostScript, HTML source, or formatted text. 376 PostScript, @sc{html} source, or formatted text.
780 @kindex m 377 @kindex m
781 @findex w3-complete-link 378 @findex w3-complete-link
782 @item m 379 @item m
783 Selects a destination from a list of all the hyperlinks in the current 380 Selects a destination from a list of all the hyperlinks in the current
784 buffer. Use @kbd{space} and @kbd{tab} to complete on the links. 381 buffer. Use @kbd{space} and @kbd{tab} to complete on the links.
793 unconditional reload from the remote server - the locally cached copy is 390 unconditional reload from the remote server - the locally cached copy is
794 not consulted. 391 not consulted.
795 @kindex C-o 392 @kindex C-o
796 @findex w3-fetch 393 @findex w3-fetch
797 @item C-o 394 @item C-o
798 Prompts for a URL in the minibuffer, and attempts to fetch 395 Prompts for a @sc{url} in the minibuffer, and attempts to fetch
799 it. If there are any errors, or Emacs-W3 cannot understand the type of link 396 it. If there are any errors, or Emacs-W3 cannot understand the type of link
800 requested, the errors are displayed in a hypertext buffer. 397 requested, the errors are displayed in a hypertext buffer.
801 @kindex o 398 @kindex o
802 @findex w3-open-local 399 @findex w3-open-local
803 @vindex url-use-hypertext-dired 400 @vindex url-use-hypertext-dired
814 @findex w3-search 411 @findex w3-search
815 @item M-s 412 @item M-s
816 Perform a search, if this is a searchable index. Searching requires a 413 Perform a search, if this is a searchable index. Searching requires a
817 server - Emacs-W3 can not do local file searching, as there are too many 414 server - Emacs-W3 can not do local file searching, as there are too many
818 possible types of searches people could want to do. Generally, the only 415 possible types of searches people could want to do. Generally, the only
819 URL types that allow searching are HTTP, gopher, and X-EXEC. 416 @sc{url} types that allow searching are @sc{http}, gopher, and X-EXEC.
820 @kindex Hv 417 @kindex Hv
821 @findex w3-show-history-list 418 @findex w3-show-history-list
822 @vindex w3-keep-history 419 @vindex w3-keep-history
823 @item Hv 420 @item Hv
824 If @code{url-keep-history} is non-@code{nil}, then Emacs-W3 keeps track 421 If @code{url-keep-history} is non-@code{nil}, then Emacs-W3 keeps track
825 of all the URLs visited in an Emacs session. This function takes all 422 of all the @sc{url}s visited in an Emacs session. This function takes all
826 the links that are in that internal list, and formats them as hypertext 423 the links that are in that internal list, and formats them as hypertext
827 links in a list. 424 links in a list.
828 @end table 425 @end table
829 426
830 @cindex Buffer movement 427 @cindex Buffer movement
861 @item HF, F 458 @item HF, F
862 Takes one step forward along the path in the current history. Has no 459 Takes one step forward along the path in the current history. Has no
863 effect if at the end of the session history. 460 effect if at the end of the session history.
864 @end table 461 @end table
865 462
866 @node Miscellaneous, , Action, Basic Usage 463 @node Miscellaneous, Compatibility, Action, Basic Usage
867 @section Miscellaneous 464 @section Miscellaneous
868 @table @kbd 465 @table @kbd
869 @kindex M-m 466 @kindex M-m
870 @findex w3-mail-current-document 467 @findex w3-mail-current-document
871 @item M-m 468 @item M-m
872 Mails the current document to someone. Choose from several different 469 Mails the current document to someone. Choose from several different
873 formats to mail: formatted text, HTML source, PostScript, or LaTeX source. 470 formats to mail: formatted text, @sc{html} source, PostScript, or LaTeX source.
874 When the HTML source is mailed, then an appropriate <base> tag is inserted 471 When the @sc{html} source is mailed, then an appropriate <base> tag is inserted
875 at the beginning of the document so that relative links may be followed 472 at the beginning of the document so that relative links may be followed
876 correctly by whoever receives the mail. 473 correctly by whoever receives the mail.
877 @kindex M-M 474 @kindex M-M
878 @findex w3-mail-document-under-point 475 @findex w3-mail-document-under-point
879 @item M-M 476 @item M-M
880 Mails the document pointed to by the hypertext link under point to someone. 477 Mails the document pointed to by the hypertext link under point to someone.
881 Choose from several different formats to mail: formatted text, HTML source, 478 Choose from several different formats to mail: formatted text, @sc{html} source,
882 PostScript, or LaTeX source. When the HTML source is mailed, then an 479 PostScript, or LaTeX source. When the @sc{html} source is mailed, then an
883 appropriate <base> tag is inserted at the beginning of the document so that 480 appropriate <base> tag is inserted at the beginning of the document so that
884 relative links may be followed correctly by whoever receives the 481 relative links may be followed correctly by whoever receives the
885 mail. 482 mail.
886 @kindex p 483 @kindex p
887 @findex w3-print-this-url 484 @findex w3-print-this-url
888 @item p 485 @item p
889 Prints the current document. Choose from several different formats to 486 Prints the current document. Choose from several different formats to
890 print: formatted text, HTML source, PostScript (with ps-print), or by using 487 print: formatted text, @sc{html} source, PostScript (with ps-print), or by using
891 LaTeX and dvips). 488 LaTeX and dvips).
892 489
893 @findex lpr-buffer 490 @findex lpr-buffer
894 @vindex lpr-command 491 @vindex lpr-command
895 @vindex lpr-switches 492 @vindex lpr-switches
896 When the formatted text is printed, the normal @code{lpr-buffer} function 493 When the formatted text is printed, the normal @code{lpr-buffer} function
897 is called, and the variables @code{lpr-command} and @code{lpr-switches} 494 is called, and the variables @code{lpr-command} and @code{lpr-switches}
898 control how the document is printed. 495 control how the document is printed.
899 496
900 When the HTML source is printed, then an appropriate <base> tag is 497 When the @sc{html} source is printed, then an appropriate <base> tag is
901 inserted at the beginning of the document. 498 inserted at the beginning of the document.
902 @vindex w3-print-commnad 499 @vindex w3-print-commnad
903 @vindex w3-latex-docstyle 500 @vindex w3-latex-docstyle
904 When postscript is printed, then the HTML source of the document is 501 When postscript is printed, then the @sc{html} source of the document is
905 converted into LaTeX source. There are several variables controlling 502 converted into LaTeX source. There are several variables controlling
906 what the final LaTeX document looks like. 503 what the final LaTeX document looks like.
907 504
908 :: WORK :: Document the new LaTeX backend 505 :: WORK :: Document the new LaTeX backend
909 506
913 If non-@code{nil}, configures the LaTeX engine to use the LaTeX2e 510 If non-@code{nil}, configures the LaTeX engine to use the LaTeX2e
914 syntax. A @code{nil} value indicates that LaTeX 2.0.9 compabibility 511 syntax. A @code{nil} value indicates that LaTeX 2.0.9 compabibility
915 will be used instead. 512 will be used instead.
916 @item w3-latex-docstyle 513 @item w3-latex-docstyle
917 @vindex w3-latex-docstyle 514 @vindex w3-latex-docstyle
918 The document style to use when printing or mailing converted HTML files 515 The document style to use when printing or mailing converted @sc{html} files
919 in LaTeX. Good defaults are: @{article@}, [psfig,twocolumn]@{article@}, 516 in LaTeX. Good defaults are: @{article@}, [psfig,twocolumn]@{article@},
920 etc. 517 etc.
921 @item w3-latex-packages 518 @item w3-latex-packages
922 @vindex w3-latex-packages 519 @vindex w3-latex-packages
923 List of LaTeX packages to include. Currently this is only used if 520 List of LaTeX packages to include. Currently this is only used if
926 @vindex w3-latex-use-maketitle 523 @vindex w3-latex-use-maketitle
927 If non-@code{nil}, the LaTeX engine will use real LaTeX title pages for 524 If non-@code{nil}, the LaTeX engine will use real LaTeX title pages for
928 document titles. 525 document titles.
929 @item w3-latex-print-links 526 @item w3-latex-print-links
930 @vindex w3-latex-print-links 527 @vindex w3-latex-print-links
931 If non-@code{nil}, prints the URLs of hypertext links as endnotes at the 528 If non-@code{nil}, prints the @sc{url}s of hypertext links as endnotes at the
932 end of the document. If set to @code{footnote}, prints the URL's as 529 end of the document. If set to @code{footnote}, prints the @sc{url}'s as
933 footnotes on each page. 530 footnotes on each page.
934 @end table 531 @end table
935 532
936 @kindex P 533 @kindex P
937 @findex w3-print-url-under-point 534 @findex w3-print-url-under-point
939 Prints the document pointed to by the hypertext link under point. 536 Prints the document pointed to by the hypertext link under point.
940 Please see the previous item for more information. 537 Please see the previous item for more information.
941 @kindex M-x w3-insert-formatted-url 538 @kindex M-x w3-insert-formatted-url
942 @findex w3-insert-formatted-url 539 @findex w3-insert-formatted-url
943 @item M-x w3-insert-formatted-url 540 @item M-x w3-insert-formatted-url
944 Insert a fully formatted HTML link into another buffer. This gets the 541 Insert a fully formatted @sc{html} link into another buffer. This gets the
945 name and URL of either the current buffer, or, with a prefix arg, of the 542 name and @sc{url} of either the current buffer, or, with a prefix arg, of the
946 link under point, and construct the appropriate <a...>...</a> markup and 543 link under point, and construct the appropriate <a...>...</a> markup and
947 insert it into the desired buffer. 544 insert it into the desired buffer.
948 @kindex M-tab 545 @kindex M-tab
949 @findex w3-insert-this-url 546 @findex w3-insert-this-url
950 @item M-tab 547 @item M-tab
951 Inserts the URL of the current document into another buffer. Buffer is 548 Inserts the @sc{url} of the current document into another buffer. Buffer is
952 prompted for in the minibuffer. With prefix arg, uses the URL of the 549 prompted for in the minibuffer. With prefix arg, uses the @sc{url} of the
953 link under point. 550 link under point.
954 @kindex U 551 @kindex U
955 @findex w3-use-links 552 @findex w3-use-links
956 @item U 553 @item U
957 Selects one of the <LINK> tags from this document and fetch it. Links 554 Selects one of the <LINK> tags from this document and fetch it. Links
964 first asks what type of link to follow (Normal or Reverse), then does 561 first asks what type of link to follow (Normal or Reverse), then does
965 a @code{completing-read} on only the links that have that type of 562 a @code{completing-read} on only the links that have that type of
966 relationship. 563 relationship.
967 @end table 564 @end table
968 565
969 @node Compatibility, , , Top 566 @node Compatibility, Emulation, Miscellaneous, Top
970 @chapter Compatibility with other Browsers 567 @chapter Compatibility with other Browsers
971 Due to the popularity of several other browsers, Emacs-W3 offers an easy 568 Due to the popularity of several other browsers, Emacs-W3 offers an easy
972 transition to its much better way of life. This ranges from being able 569 transition to its much better way of life. This ranges from being able
973 to share the same preferences files and disk cache to actually emulating 570 to share the same preferences files and disk cache to actually emulating
974 the keybindings used in other browsers. 571 the keybindings used in other browsers.
983 * Session History:: Keeping a history of documents visited 580 * Session History:: Keeping a history of documents visited
984 in one Emacs sessions allows the use of 581 in one Emacs sessions allows the use of
985 'forward' and 'back' buttons easily. 582 'forward' and 'back' buttons easily.
986 * Global History:: Keeping a history of all the places ever 583 * Global History:: Keeping a history of all the places ever
987 visited on the web. 584 visited on the web.
988 * Annotations:: Annotations allow comments on other
989 people's Web documents without needing
990 to change the document.
991 @end menu 585 @end menu
992 @end ifinfo 586 @end ifinfo
993 @node Emulation, Hotlist Handling, Compatibility, Compatibility 587 @node Emulation, Hotlist Handling, Compatibility, Compatibility
994 @section Emulation 588 @section Emulation
995 @cindex Browser emulation 589 @cindex Browser emulation
1000 @findex turn-on-lynx-emulation 594 @findex turn-on-lynx-emulation
1001 @findex w3-netscape-emulation-minor-mode 595 @findex w3-netscape-emulation-minor-mode
1002 @findex w3-lynx-emulation-minor-mode 596 @findex w3-lynx-emulation-minor-mode
1003 @vindex w3-mode-hook 597 @vindex w3-mode-hook
1004 :: WORK :: Document lynx emulation 598 :: WORK :: Document lynx emulation
599 @table @key
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
1005 :: WORK :: Document netscape emulation 704 :: WORK :: Document netscape emulation
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
1006 724
1007 @node Hotlist Handling, Session History, Emulation, Compatibility 725 @node Hotlist Handling, Session History, Emulation, Compatibility
1008 @section Hotlist Handling 726 @section Hotlist Handling
1009 :: WORK :: Document that it supports different types of hotlist formats 727 :: WORK :: Document that it supports different types of hotlist formats
1010 :: WORK :: Make sure everything hotlist related can be accessed via 'h' 728 :: WORK :: Make sure everything hotlist related can be accessed via 'h'
1011 In order to avoid having to traverse many documents to get to the same 729 In order to avoid having to traverse many documents to get to the same
1012 document over and over, Emacs-W3 supports a ``hotlist'' like Mosaic. This is 730 document over and over, Emacs-W3 supports a ``hotlist'' like Mosaic. This is
1013 a file that contains URLs and aliases. Hotlists allow quick access to any 731 a file that contains @sc{url}s and aliases. Hotlists allow quick access to any
1014 document in the Web, providing it has been visited and added to the hotlist. 732 document in the Web, providing it has been visited and added to the hotlist.
1015 The variable @code{w3-hotlist-file} determines where this information 733 The variable @code{w3-hotlist-file} determines where this information
1016 is saved. The structure of the file is compatible with Mosaic's 734 is saved. The structure of the file is compatible with Mosaic's
1017 hotlist file, so this defaults to @file{~/.mosaic-hotlist-default}. 735 hotlist file, so this defaults to @file{~/.mosaic-hotlist-default}.
1018 736
1022 @findex w3-hotlist-add-document 740 @findex w3-hotlist-add-document
1023 @vindex w3-hotlist-file 741 @vindex w3-hotlist-file
1024 @item a 742 @item a
1025 Adds the current document to the hotlist, with the buffer name as its 743 Adds the current document to the hotlist, with the buffer name as its
1026 identifier. Modifies the file specified by @code{w3-hotlist-file}. If 744 identifier. Modifies the file specified by @code{w3-hotlist-file}. If
1027 this is given a @var{prefix-argument} (via @kbd{C-u}), the title is 745 this is given a prefix-argument (via @kbd{C-u}), the title is prompted
1028 prompted for instead of automatically defaulting to the 746 for instead of automatically defaulting to the document title.
1029 document title.
1030 747
1031 @findex w3-hotlist-refresh 748 @findex w3-hotlist-refresh
1032 @vindex w3-hotlist-file 749 @vindex w3-hotlist-file
1033 @kindex hR 750 @kindex hR
1034 @item hR 751 @item hR
1060 @key{tab} key shows partial completions. 777 @key{tab} key shows partial completions.
1061 778
1062 @item hv 779 @item hv
1063 @kindex hv 780 @kindex hv
1064 @findex w3-show-hotlist 781 @findex w3-show-hotlist
1065 Converts the hotlist into HTML and displays it. 782 Converts the hotlist into @sc{html} and displays it.
1066 @item ha 783 @item ha
1067 @kindex ha 784 @kindex ha
1068 @findex w3-hotlist-apropos 785 @findex w3-hotlist-apropos
1069 Shows the hotlist entries matching a regular expression. 786 Shows the hotlist entries matching a regular expression.
1070 @item hA 787 @item hA
1073 Appends another hotlist file to the one currently in memory. 790 Appends another hotlist file to the one currently in memory.
1074 @end table 791 @end table
1075 @node Session History, Global History, Hotlist Handling, Compatibility 792 @node Session History, Global History, Hotlist Handling, Compatibility
1076 @section History 793 @section History
1077 @cindex History Lists 794 @cindex History Lists
1078 Almost all web browsers keep track of the URLs followed from a page, so 795 Almost all web browsers keep track of the @sc{url}s followed from a page, so
1079 that it can provide @b{forward} and @b{back} buttons to keep a @i{path} 796 that it can provide @b{forward} and @b{back} buttons to keep a @i{path}
1080 of URLs that can be traversed easily. 797 of @sc{url}s that can be traversed easily.
1081 @vindex url-keep-history 798 @vindex url-keep-history
1082 If the variable @code{url-keep-history} is @code{t}, then Emacs-W3 799 If the variable @code{url-keep-history} is @code{t}, then Emacs-W3
1083 keeps a list of all the URLs visited in a session. 800 keeps a list of all the @sc{url}s visited in a session.
1084 @findex w3-show-history 801 @findex w3-show-history
1085 To view a listing of the history for this session of Emacs-W3, use 802 To view a listing of the history for this session of Emacs-W3, use
1086 @code{M-x w3-show-history} from any buffer, and Emacs-W3 generates an 803 @code{M-x w3-show-history} from any buffer, and Emacs-W3 generates an
1087 HTML document showing every URL visited since Emacs started (or 804 @sc{html} document showing every @sc{url} visited since Emacs started (or
1088 cleared the history list), and then format it. Any of the links can 805 cleared the history list), and then format it. Any of the links can
1089 be chosen and followed to the original document. To clear the history 806 be chosen and followed to the original document. To clear the history
1090 list, choose 'Clear History' from the 'Options' menu. 807 list, choose 'Clear History' from the 'Options' menu.
1091 808
1092 @findex w3-forward-in-history 809 @findex w3-forward-in-history
1093 @findex w3-backward-in-history 810 @findex w3-backward-in-history
1094 @findex w3-fetch 811 @findex w3-fetch
1095 Another twist on the history list mechanism is the fact that all 812 Another twist on the history list mechanism is the fact that all
1096 Emacs-W3 buffers remember what URL, buffer, and buffer position of the 813 Emacs-W3 buffers remember what @sc{url}, buffer, and buffer position of the
1097 last document, and also keeps track of the next location jumped @b{to} 814 last document, and also keeps track of the next location jumped @b{to}
1098 from that buffer. This means that the user can go forwards and 815 from that buffer. This means that the user can go forwards and
1099 backwards very easily along the path taken to reach a particular 816 backwards very easily along the path taken to reach a particular
1100 document. To go forward, use the function @code{w3-forward-in-history}, 817 document. To go forward, use the function @code{w3-forward-in-history},
1101 to go backward, use the function @code{w3-backward-in-history}. 818 to go backward, use the function @code{w3-backward-in-history}.
1102 819
1103 @node Global History, Annotations, Session History, Compatibility 820 @node Global History, Stylesheets, Session History, Compatibility
1104 @section Global History 821 @section Global History
1105 :: WORK :: Document that the global history can have diff. formats 822 :: WORK :: Document that the global history can have diff. formats
1106 Most web browsers also support the idea of a ``history'' of URLs the 823 Most web browsers also support the idea of a ``history'' of @sc{url}s the
1107 user has visited, and it displays them in a different style than normal 824 user has visited, and it displays them in a different style than normal
1108 URLs. 825 @sc{url}s.
1109 826
1110 @vindex url-keep-history 827 @vindex url-keep-history
1111 @vindex url-global-history-file 828 @vindex url-global-history-file
1112 If the variable @code{url-keep-history} is @code{t}, then Emacs-W3 829 If the variable @code{url-keep-history} is @code{t}, then Emacs-W3
1113 keeps a list of all the URLs visited in a session. The file is 830 keeps a list of all the @sc{url}s visited in a session. The file is
1114 automatically written to disk when exiting emacs. The list is added to 831 automatically written to disk when exiting emacs. The list is added to
1115 those already in the file specified by @code{url-global-history-file}, 832 those already in the file specified by @code{url-global-history-file},
1116 which defaults to @file{~/.mosaic-global-history}. 833 which defaults to @file{~/.mosaic-global-history}.
1117 834
1118 If any URL in the list is found in the file, it is not saved, but new 835 If any @sc{url} in the list is found in the file, it is not saved, but new
1119 ones are added at the end of the file. 836 ones are added at the end of the file.
1120 837
1121 The function that saves the global history list is smart enough to 838 The function that saves the global history list is smart enough to
1122 notice what style of history list is being used (Netscape, Emacs-W3, or 839 notice what style of history list is being used (Netscape, Emacs-W3, or
1123 XMosaic), and writes out the new additions appropriately. 840 XMosaic), and writes out the new additions appropriately.
1125 @cindex Completion of URLs 842 @cindex Completion of URLs
1126 @cindex Usefulness of global history 843 @cindex Usefulness of global history
1127 One of the nice things about keeping a global history files is that Emacs-W3 844 One of the nice things about keeping a global history files is that Emacs-W3
1128 can use it as a completion table. When doing @kbd{M-x w3-fetch}, pressing 845 can use it as a completion table. When doing @kbd{M-x w3-fetch}, pressing
1129 the @kbd{tab} or @kbd{space} key will show all completions for a 846 the @kbd{tab} or @kbd{space} key will show all completions for a
1130 partial URL. This is very useful, especially for very long URLs that 847 partial @sc{url}. This is very useful, especially for very long @sc{url}s that
1131 are not in a hotlist, or for seeing all the pages from a particular web 848 are not in a hotlist, or for seeing all the pages from a particular web
1132 site before choosing which to retrieve. 849 site before choosing which to retrieve.
1133 850
1134 @node Annotations, Group Annotations, Global History, Compatibility 851 @node Stylesheets, Terminology, Global History, Top
1135 @section Annotations 852 @chapter Stylesheets
1136 @cindex Annotations 853 The way in which Emacs-W3 formats a document is very customizable. All
1137 Mosaic can @i{annotate} documents. Annotations are comments about the 854 formatting is now controlled by a default stylesheet set by the user
1138 current document, and these annotations appear as a link to the comments 855 with the @code{w3-default-stylesheet} variable. Emacs-W3 currently
1139 at the end of the document. The original file is not changed. 856 supports the @sc{W3C} recommendation for Cascading Style Sheets, Level 1
1140 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.
861
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.
870
1141 @ifinfo 871 @ifinfo
1142 @menu 872 @menu
1143 * Group Annotations:: Annotations accessible by everyone 873 * Terminology:: Terms used in the rest of this chapter.
1144 * Personal Annotations:: Private annotations only accessible 874 * Basic Concepts:: Why are stylesheets useful? Getting started.
1145 to the user who created them 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.
1146 @end menu 879 @end menu
1147 @end ifinfo 880 @end ifinfo
1148 @node Group Annotations, Personal Annotations, Annotations, Annotations 881
1149 @subsection Group Annotations 882 @node Terminology, Basic Concepts, Stylesheets, Stylesheets
1150 @cindex Group Annotations 883 @section Terminology
1151 @b{@i{NOTE}}: The group annotation experiment has been terminated. It 884
1152 will be replaced with support on the server side for adding <LINK> tags 885 @table @dfn
1153 to documents. 886 @item attribute
1154 887 HTML attribute, ie: @samp{align=center} - align is the attribute.
1155 @node Personal Annotations, , Group Annotations, Annotations 888 @item author
1156 @subsection Personal Annotations 889 The author of an HTML document.
1157 @cindex Personal Annotations 890 @item block-level element
1158 @vindex w3-personal-annotation-directory 891 An element which has a line break before and after (e.g. 'H1' in @sc{HTML}).
1159 Emacs-W3 looks in the directory specified by 892 @item canvas
1160 @code{w3-personal-annotation-directory} (defaults to 893 The part of the UA's drawing surface onto which documents are rendered.
1161 @file{~/.mosaic-personal-annotations}). Any personal annotations for a 894 @item child element
1162 document are automatically appended when it is retrieved. 895 A subelement in @sc{sgml} terminology.
1163 896 @item contextual selector
1164 :: WORK :: Document the new 'a' prefix keymap 897 A selector that matches elements based on their position in the document
1165 :: WORK :: Tell where the annotations are stored 898 structure. A contextual selector consists of several simple
1166 899 selectors. E.g., the contextual selector 'H1.initial B' consists of two
1167 @findex w3-add-personal-annotation 900 simple selectors, 'H1.initial' and 'B'.
1168 @vindex w3-annotation-mode 901 @item @sc{css}
1169 To add a new personal annotation, type @kbd{M-x 902 Cascading Style Sheets.
1170 w3-add-personal-annotation}. This creates a new buffer, in the mode 903 @item declaration
1171 specified by @code{w3-annotation-mode}. This defaults to 904 A property (e.g. 'font-size') and a corresponding value (e.g. '12pt').
1172 @code{html-mode}. If this variable is @code{nil}, or it points to an 905 @item designer
1173 undefined function, then @code{default-major-mode} is consulted. 906 The designer of a style sheet.
1174 907 @item document
1175 A minor mode redefines @kbd{C-c C-c} to complete the annotation and 908 @sc{html} document.
1176 store it on the local disk. 909 @item element
1177 910 @sc{html} element.
1178 @findex w3-delete-personal-annotation 911 @item element type
1179 To delete a personal annotation, it must be the current page. Once 912 A generic identifier in @sc{sgml} terminology.
1180 reading the annotation, @kbd{M-x w3-delete-personal-annotation} will 913 @item fictional tag sequence
1181 remove it. This deletes the file containing the annotation, and any 914 A tool for describing the behavior of pseudo-classes and pseudo-elements.
1182 references to it in the annotation log file. 915 @item font size
1183 916 The size for which a font is designed. Typically, the size of a font is
1184 Editing personal annotations is not yet supported. 917 approximately equal to the distance from the bottom of the lowest letter
1185 918 with a descender to the top of the tallest letter with an ascender and
1186 @node Controlling Formatting, General Formatting, Top, Top 919 (optionally) with a diacritical mark.
1187 @chapter Controlling Formatting 920 @item @sc{html} extension
1188 @cindex Customizing formatting 921 Markup introduced by UA vendors, most often to support certain visual
1189 @cindex Specifying Fonts 922 effects. The @sc{font}, @sc{center} and @sc{blink} elements are examples
1190 @cindex Fonts 923 of HTML extensions, as is the @sc{bgcolor} attribute. One of the goals
1191 @cindex Colors 924 of @sc{css} is to provide an alternative to @sc{html} extensions.
1192 How Emacs-W3 formats a document is very customizable. All control over 925 @item inline element
1193 formatting is now controlled by a default stylesheet set by the user 926 An element which does not have a line break before and after
1194 with the @code{w3-default-sheet} variable. 927 (e.g. '@sc{strong}' in @sc{html})
1195 928 @item intrinsic dimensions
1196 The following sections describe in more detail how to change the 929 The width and height as defined by the element itself, not imposed by
1197 formatting of a document. 930 the surroundings. In this specification it is assumed that all replaced
1198 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
978
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.
1009
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.
1039
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
1056
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
1074
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.
1086
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.
1093
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);
1102
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.
1120
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:
1139
1140 @enumerate
1141 @item
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.
1150 @item
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.
1154 @item
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.
1171 @item
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.
1175 @end enumerate
1176
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
1203 The UA may choose to honor other stylistic HTML attributes, for example
1204 'ALIGN'. If so, these attributes are translated to the corresponding CSS
1205 rules with specificity equal to 1. The rules are assumed to be at the
1206 start of the author style sheet and may be overridden by subsequent
1207 style sheet rules. In a transition phase, this policy will make it
1208 easier for stylistic attributes to coexist with style sheets.
1209
1210 @node Properties, Font Properties, The Cascade, Stylesheets
1211 @section Properties
1199 @ifinfo 1212 @ifinfo
1200 @menu 1213 @menu
1201 * General Formatting:: Changing general things about a 1214 * Font Properties:: Selecting fonts, styles, and sizes.
1202 document. 1215 * Colors and Backgrounds:: Controlling colors, front and back.
1203 * Character based terminals:: Changing how a document is 1216 * Text Properties:: Alignment, decoration, and more!
1204 displayed on a non-graphics 1217 * Box Properties:: Borders, padding, and margins, oh my!
1205 terminal (vt100, etc.@:) or if 1218 * Classification:: Changing whitespace and display policies.
1206 @code{w3-delimit-emphasis} is @code{t}. 1219 * Media Selection::
1207 * Graphics workstations:: Changing how a document is 1220 * Speech Properties::
1208 displayed on a graphics terminal
1209 (Xwindows, Windows, NeXTstep,
1210 OS/2, etc.)
1211 * Inlined images:: How to specify how Emacs-W3
1212 handles inlined images/mpegs.
1213 @end menu 1221 @end menu
1214 @end ifinfo 1222 @end ifinfo
1215 @node General Formatting, Character based terminals, Controlling Formatting, Controlling Formatting 1223
1216 @section General formatting conventions 1224 @node Font Properties, font-family, Properties, Properties
1217 @iftex 1225 @subsection Font Properties
1218 @heading Setting the fill column 1226 Setting font properties will be among the most common uses of style
1219 @end iftex 1227 sheets. Unfortunately, there exists no well-defined and universally
1228 accepted taxonomy for classifying fonts, and terms that apply to one
1229 font family may not be appropriate for others. E.g. 'italic' is commonly
1230 used to label slanted text, but slanted text may also be labeled as
1231 being @b{Oblique}, @b{Slanted}, @b{Incline}, @b{Cursive} or
1232 @b{Kursiv}. Therefore it is not a simple problem to map typical font
1233 selection properties to a specific font.
1234
1235 The properties defined by CSS1 are described in the following sections.
1220 @ifinfo 1236 @ifinfo
1221 @center -------------------- 1237 @menu
1222 @center Setting the right margin 1238 * font-family:: Groups of fonts.
1223 @center -------------------- 1239 * font-style:: Normal, italic, or oblique?
1240 * font-variant:: Small-caps, etc.
1241 * font-weight:: How bold can you go?
1242 * font-size:: How big is yours?
1243 * font:: Shorthand for all of the above.
1244 @end menu
1224 @end ifinfo 1245 @end ifinfo
1225 @cindex Margins 1246
1226 @vindex fill-column 1247 @node font-family, font-style, Font Properties, Font Properties
1227 @vindex w3-right-border 1248 @subsubsection font-family
1228 Each time a document is parsed, the right margin is recalculated 1249
1229 using the width of the current window and @code{w3-right-border}. 1250 @multitable @columnfractions .20 .8
1230 @code{w3-right-border} is an integer specifying how much room at the 1251 @item Supported Values: @tab [[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
1231 right edge of the screen to leave blank. The @code{fill-column} is set 1252 @item Initial: @tab User specific
1232 to @code{(- (window-width) @code{w3-right-border})}. 1253 @item Applies to: @tab all elements
1233 @iftex 1254 @item Inherited: @tab yes
1234 @heading Formatting of directory listings 1255 @item Percentage values: @tab N/A
1235 @end iftex 1256 @end multitable
1257 The value is a prioritized list of font family names and/or generic
1258 family names. Unlike most other CSS1 properties, values are separated
1259 by a comma to indicate that they are alternatives:
1260
1261 @example
1262 BODY @{ font-family: gill, helvetica, sans-serif @}
1263 @end example
1264
1265 There are two types of list values:
1266
1267 @table @b
1268 @item <family-name>
1269 The name of a font family of choice. In the last example, "gill" and
1270 "helvetica" are font families.
1271 @item <generic-family>
1272 In the example above, the last value is a generic family name. The
1273 following generic families are defined:
1274 @itemize @bullet
1275 @item
1276 'serif' (e.g. Times)
1277 @item
1278 'sans-serif' (e.g. Helvetica)
1279 @item
1280 'cursive' (e.g. Zapf-Chancery)
1281 @item
1282 'fantasy' (e.g. Western)
1283 @item
1284 'monospace' (e.g. Courier)
1285 @end itemize
1286 @end table
1287
1288 Style sheet designers are encouraged to offer a generic font family as a
1289 last alternative.
1290
1291 Font names containing whitespace should be quoted:
1292
1293 @example
1294 BODY @{ font-family: "new century schoolbook", serif @}
1295
1296 <BODY STYLE="font-family: 'My own font', fantasy">
1297 @end example
1298
1299 If quoting is omitted, any whitespace characters before and after the
1300 font name are ignored and any sequence of whitespace characters inside
1301 the font name is converted to a single space.
1302
1303 @node font-style, font-variant, font-family, Font Properties
1304 @subsubsection font-style
1305
1306 @multitable @columnfractions .2 .8
1307 @item Supported Values: @tab normal | italic | oblique
1308 @item Initial: @tab normal
1309 @item Applies to: @tab all elements
1310 @item Inherited: @tab yes
1311 @item Percentage values: @tab N/A
1312 @end multitable
1313
1314 The 'font-style' property selects between normal (sometimes referred to
1315 as "roman" or "upright"), italic and oblique faces within a font family.
1316
1317 A value of 'normal' selects a font that is classified as 'normal' in the
1318 UA's font database, while 'oblique' selects a font that is labeled
1319 'oblique'. A value of 'italic' selects a font that is labeled 'italic',
1320 or, if that is not available, one labeled 'oblique'.
1321
1322 The font that is labeled 'oblique' in the UA's font database may
1323 actually have been generated by electronically slanting a normal font.
1324
1325 Fonts with Oblique, Slanted or Incline in their names will typically be
1326 labeled 'oblique' in the UA's font database. Fonts with Italic, Cursive
1327 or Kursiv in their names will typically be labeled 'italic'.
1328
1329 @example
1330 H1, H2, H3 @{ font-style: italic @}
1331 H1 EM @{ font-style: normal @}
1332 @end example
1333
1334 In the example above, emphasized text within 'H1' will appear in a
1335 normal face.
1336
1337 @node font-variant, font-weight, font-style, Font Properties
1338 @subsubsection font-variant
1339
1340 @multitable @columnfractions .2 .8
1341 @item Value: @tab normal | small-caps
1342 @item Initial: @tab normal
1343 @item Applies to: @tab all elements
1344 @item Inherited: @tab yes
1345 @item Percentage values: @tab N/A
1346 @end multitable
1347
1348 Another type of variation within a font family is the small-caps. In a
1349 small-caps font the lower case letters look similar to the uppercase
1350 ones, but in a smaller size and with slightly different proportions. The
1351 'font-variant' property selects that font.
1352
1353 A value of 'normal' selects a font that is not a small-caps font,
1354 'small-caps' selects a small-caps font. It is acceptable (but not
1355 required) in CSS1 if the small-caps font is a created by taking a normal
1356 font and replacing the lower case letters by scaled uppercase
1357 characters. As a last resort, uppercase letters will be used as
1358 replacement for a small-caps font.
1359
1360 The following example results in an 'H3' element in small-caps, with
1361 emphasized words in oblique small-caps:
1362
1363 @example
1364 H3 @{ font-variant: small-caps @}
1365 EM @{ font-style: oblique @}
1366 @end example
1367
1368 There may be other variants in the font family as well, such as fonts
1369 with old-style numerals, small-caps numerals, condensed or expanded
1370 letters, etc. CSS1 has no properties that select those.
1371
1372 @node font-weight, font-size, font-variant, Font Properties
1373 @subsubsection font-weight
1374
1375 @multitable @columnfractions .2 .8
1376 @item Supported Values: @tab normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
1377 @item Unsupported Values: @tab bolder | lighter
1378 @item Initial: @tab normal
1379 @item Applies to: @tab all elements
1380 @item Inherited: @tab yes
1381 @item Percentage values: @tab N/A
1382 @end multitable
1383
1384 The 'font-weight' property selects the weight of the font. The values
1385 '100' to '900' form an ordered sequence, where each number indicates a
1386 weight that is at least as dark as its predecessor. The keyword 'normal'
1387 is synonymous with '400', and 'bold' is synonymous with '700'. Keywords
1388 other than 'normal' and 'bold' have been shown to be often confused with
1389 font names and a numerical scale was therefore chosen for the 9-value
1390 list.
1391
1392 @example
1393 P @{ font-weight: normal @} /* 400 */
1394 H1 @{ font-weight: 700 @} /* bold */
1395 @end example
1396
1397 The 'bolder' and 'lighter' values select font weights that are relative
1398 to the weight inherited from the parent:
1399
1400 @example
1401 STRONG @{ font-weight: bolder @}
1402 @end example
1403
1404 There is no guarantee that there will be a darker face for each of the
1405 'font-weight' values; for example, some fonts may have only a normal and
1406 a bold face, others may have eight different face weights. There is no
1407 guarantee on how a UA will map font faces within a family to weight
1408 values. The only guarantee is that a face of a given value will be no
1409 less dark than the faces of lighter values.
1410
1411 @node font-size, font, font-weight, Font Properties
1412 @subsubsection font-size
1413
1414 @multitable @columnfractions .2 .8
1415 @item Supported Values: @tab <absolute-size> | <length>
1416 @item Unsupported Values: @tab <percentage> | <relative-size>
1417 @item Initial: @tab medium
1418 @item Applies to: @tab all elements
1419 @item Inherited: @tab yes
1420 @item Percentage values: @tab relative to parent element's font size
1421 @end multitable
1422
1423 @table @b
1424 @item <absolute-size>
1425 An <absolute-size> keyword is an index to a table of font sizes computed
1426 and kept by the UA. Possible values are:
1427 @itemize @bullet
1428 @item
1429 xx-small
1430 @item
1431 x-small
1432 @item
1433 small
1434 @item
1435 medium
1436 @item
1437 large
1438 @item
1439 x-large
1440 @item
1441 xx-large
1442 @end itemize
1443
1444 On a computer screen a scaling factor of 1.5 is suggested between
1445 adjacent indexes; if the 'medium' font is 10pt, the 'large' font could
1446 be 15pt. Different media may need different scaling factors. Also, the
1447 UA should take the quality and availability of fonts into account when
1448 computing the table. The table may be different from one font family to
1449 another.
1450 @item <relative-size>
1451 A <relative-size> keyword is interpreted relative to the table of font
1452 sizes and the font size of the parent element. Possible values are
1453 @b{larger} or @b{smaller}. For example, if the parent element has a font
1454 size of 'medium', a value of 'larger' will make the font size of the
1455 current element be 'large'. If the parent element's size is not close to
1456 a table entry, the UA is free to interpolate between table entries or
1457 round off to the closest one. The UA may have to extrapolate table
1458 values if the numerical value goes beyond the keywords.
1459 @end table
1460
1461 Length and percentage values should not take the font size table into
1462 account when calculating the font size of the element.
1463
1464 Negative values are not allowed.
1465
1466 On all other properties, 'em' and 'ex' length values refer to the font
1467 size of the current element. On the 'font-size' property, these length
1468 units refer to the font size of the parent element.
1469
1470 Note that an application may reinterpret an explicit size, depending on
1471 the context. E.g., inside a VR scene a font may get a different size
1472 because of perspective distortion.
1473
1474 Examples:
1475
1476 @example
1477 P @{ font-size: 12pt; @}
1478 BLOCKQUOTE @{ font-size: larger @}
1479 EM @{ font-size: 150% @}
1480 EM @{ font-size: 1.5em @}
1481 @end example
1482
1483 If the suggested scaling factor of 1.5 is used, the last three
1484 declarations are identical.
1485
1486 @node font, Colors and Backgrounds, font-size, Font Properties
1487 @subsubsection font
1488
1489 @multitable @columnfractions .2 .8
1490 @item Value: @tab [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family>
1491 @item Initial: @tab not defined for shorthand properties
1492 @item Applies to: @tab all elements
1493 @item Inherited: @tab yes
1494 @item Percentage values: @tab allowed on <font-size> and <line-height>
1495 @end multitable
1496 The 'font' property is a shorthand property for setting 'font-style'
1497 'font-variant' 'font-weight' 'font-size', 'line-height' and
1498 'font-family' at the same place in the style sheet. The syntax of this
1499 property is based on a traditional typographical shorthand notation to
1500 set multiple properties related to fonts.
1501
1502 For a definition of allowed and initial values, see the previously
1503 defined properties. Properties for which no values are given are set to
1504 their initial value.
1505
1506 @example
1507 P @{ font: 12pt/14pt sans-serif @}
1508 P @{ font: 80% sans-serif @}
1509 P @{ font: x-large/110% "new century schoolbook", serif @}
1510 P @{ font: bold italic large Palatino, serif @}
1511 P @{ font: normal small-caps 120%/120% fantasy @}
1512 @end example
1513
1514 In the second rule, the font size percentage value ('80%') refers to the
1515 font size of the parent element. In the third rule, the line height
1516 percentage refers to the font size of the element itself.
1517
1518 In the first three rules above, the 'font-style', 'font-variant' and
1519 'font-weight' are not explicitly mentioned, which means they are all
1520 three set to their initial value ('normal'). The fourth rule sets the
1521 'font-weight' to 'bold', the 'font-style' to 'italic' and implicitly
1522 sets 'font-variant' to 'normal'.
1523
1524 The fifth rule sets the 'font-variant' ('small-caps'), the 'font-size'
1525 (120% of the parent's font), the 'line-height' (120% times the font
1526 size) and the 'font-family' ('fantasy'). It follows that the keyword
1527 'normal' applies to the two remaining properties: 'font-style' and
1528 'font-weight'.
1529
1530 @node Colors and Backgrounds, color, font, Properties
1531 @subsection Colors and Backgrounds
1532 These properties describe the color (often called foreground color) and
1533 background of an element (i.e. the surface onto which the content is
1534 rendered). One can set a background color and/or a background image. The
1535 position of the image, if/how it is repeated, and whether it is fixed or
1536 scrolled relative to the canvas can also be set.
1537
1538 The 'color' property inherits normally. The background properties do not
1539 inherit, but the parent element's background will shine through by
1540 default because of the initial 'transparent' value on
1541 'background-color'.
1542
1543 NOTE: Currently, Emacs-W3 can only show background images under XEmacs.
1544 Emacs 19 doesn't have the support in its display code yet.
1545
1236 @ifinfo 1546 @ifinfo
1237 @center -------------------- 1547 @menu
1238 @center Formatting of directory listings 1548 * color:: Foreground colors.
1239 @center -------------------- 1549 * background-color:: Background colors.
1550 * background-image:: Background images.
1551 * background-repeat:: Controlling repeating of background images.
1552 * background-attachment:: Where background images are drawn.
1553 * background-position:: Where background images are drawn.
1554 * background:: Shorthand for all background properties.
1555 @end menu
1240 @end ifinfo 1556 @end ifinfo
1241 @vindex url-use-hypertext-dired 1557
1242 When Emacs-W3 encounters a link to a directory (whether by local file access 1558 @node color, background-color, Colors and Backgrounds, Colors and Backgrounds
1243 or via FTP), it can either create an HTML document on the fly, or use 1559 @subsubsection color
1244 @code{dired-mode} to peruse the listing. The variable 1560 @multitable @columnfractions .2 .8
1245 @code{url-use-hypertext-dired} controls this behavior. 1561 @item Value: @tab <color>
1246 1562 @item Initial: @tab User specific
1247 If the value is @code{t}, Emacs-W3 uses @code{directory-files} to list them 1563 @item Applies to: @tab all elements
1248 out and transform the directory into a hypertext document, then pass it 1564 @item Inherited: @tab yes
1249 through the parser like any other document. 1565 @item Percentage values: @tab N/A
1250 1566 @end multitable
1251 If the value is @code{nil}, just pass the directory off to dired using 1567
1252 @code{find-file}. Using this option loses all the hypertext abilities 1568 This property describes the text color of an element (often referred to
1253 of Emacs-W3, and the users is unable to load documents in the directory 1569 as the foreground color). There are different ways to specify red:
1254 directly into Emacs-W3 by clicking with the mouse, etc. 1570
1255 1571 @example
1256 @iftex 1572 EM @{ color: red @} /* natural language */
1257 @heading Formatting of gopher directories 1573 EM @{ color: rgb(255,0,0) @} /* RGB range 0-255 */
1258 @end iftex 1574 @end example
1575
1576 See @ref{Color Units} for a description of possible color values.
1577
1578 @node background-color, background-image, color, Colors and Backgrounds
1579 @subsubsection background-color
1580 @multitable @columnfractions .2 .8
1581 @item Value: @tab <color> | transparent
1582 @item Initial: @tab transparent
1583 @item Applies to: @tab all elements
1584 @item Inherited: @tab no
1585 @item Percentage values: @tab N/A
1586 @end multitable
1587
1588 This property sets the background color of an element.
1589
1590 @example
1591 H1 @{ background-color: #F00 @}
1592 @end example
1593
1594 @node background-image, background-repeat, background-color, Colors and Backgrounds
1595 @subsubsection background-image
1596 @multitable @columnfractions .2 .8
1597 @item Value: @tab <url> | none
1598 @item Initial: @tab none
1599 @item Applies to: @tab all elements
1600 @item Inherited: @tab no
1601 @item Percentage values: @tab N/A
1602 @end multitable
1603
1604 This property sets the background image of an element. When setting a
1605 background image, one should also set a background color that will be
1606 used when the image is unavailable. When the image is available, it is
1607 overlaid on top of the background color.
1608
1609 @example
1610 BODY @{ background-image: url(marble.gif) @}
1611 P @{ background-image: none @}
1612 @end example
1613
1614 @node background-repeat, background-attachment, background-image, Colors and Backgrounds
1615 @subsubsection background-repeat
1616 This property is not supported at all under Emacs-W3.
1617
1618 @node background-attachment, background-position, background-repeat, Colors and Backgrounds
1619 @subsubsection background-attachment
1620 This property is not supported at all under Emacs-W3.
1621
1622 @node background-position, background, background-attachment, Colors and Backgrounds
1623 @subsubsection background-position
1624 This property is not supported at all under Emacs-W3.
1625
1626 @node background, Text Properties, background-position, Colors and Backgrounds
1627 @subsubsection background
1628 @multitable @columnfractions .2 .8
1629 @item Value: @tab <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
1630 @item Initial: @tab not defined for shorthand properties
1631 @item Applies to: @tab all elements
1632 @item Inherited: @tab no
1633 @item Percentage values: @tab allowed on <background-position>
1634 @end multitable
1635
1636 The 'background' property is a shorthand property for setting the
1637 individual background properties (i.e., 'background-color',
1638 'background-image', 'background-repeat', 'background-attachment' and
1639 'background-position') at the same place in the style sheet.
1640
1641 Possible values on the 'background' properties are the set of all
1642 possible values on the individual properties.
1643
1644 @example
1645 BODY @{ background: red @}
1646 P @{ background: url(chess.png) gray 50% repeat fixed @}
1647 @end example
1648
1649 The 'background' property always sets all the individual background
1650 properties. In the first rule of the above example, only a value for
1651 'background-color' has been given and the other individual properties
1652 are set to their initial value. In the second rule, all individual
1653 properties have been specified.
1654
1655 @node Text Properties, word-spacing, background, Properties
1656 @subsection Text Properties
1657
1259 @ifinfo 1658 @ifinfo
1260 @center -------------------- 1659 @menu
1261 @center Formatting of gopher directories 1660 * word-spacing::
1262 @center -------------------- 1661 * letter-spacing::
1662 * text-decoration::
1663 * vertical-align::
1664 * text-transform::
1665 * text-align::
1666 * text-indent::
1667 * line-height::
1668 @end menu
1263 @end ifinfo 1669 @end ifinfo
1264 @vindex w3-use-hypertext-gopher 1670
1265 @cindex Gopher+ 1671 @node word-spacing, letter-spacing, Text Properties, Text Properties
1266 @cindex ASK blocks 1672 @subsubsection word-spacing
1267 There are two different ways of viewing gopher links. The built-in 1673 @multitable @columnfractions .2 .8
1268 support that converts gopher directories into HTML, or the 1674 @end multitable
1269 @file{gopher.el} package by Scott Snyder (@i{snyder@@fnald0.fnal.gov}). 1675
1270 The variable that controls this is @code{w3-use-hypertext-gopher}. If 1676 @node letter-spacing, text-decoration, word-spacing, Text Properties
1271 set to @code{nil}, then @file{gopher.el} is used. Any other value 1677 @subsubsection letter-spacing
1272 causes Emacs-W3 to use its internal gopher support. If using 1678 @multitable @columnfractions .2 .8
1273 @file{gopher.el}, all the hypertext capabilities of Emacs-W3 are lost. 1679 @end multitable
1274 All the functionality of @file{gopher.el} is now available in the 1680
1275 hypertext version, and the hypertext version supports Gopher+ and ASK 1681 @node text-decoration, vertical-align, letter-spacing , Text Properties
1276 blocks. 1682 @subsubsection text-decoration
1277 1683 @multitable @columnfractions .2 .8
1278 @vindex w3-gopher-labels 1684 @end multitable
1279 The main way to control the display of gopher directories is by the 1685
1280 variable @code{w3-gopher-labels}. This variable controls the text that 1686 @node vertical-align, text-transform, text-decoration, Text Properties
1281 is inserted at the front of each item. This is an assoc list of gopher 1687 @subsubsection vertical-align
1282 types (as one character strings), and a string to insert just after the 1688 @multitable @columnfractions .2 .8
1283 list item. All the normal gopher types are defined. Entries should be 1689 @end multitable
1284 similar to: @samp{("0" . "(TXT)")}. I have tried to keep all the tags 1690
1285 to three characters plus two parentheses. 1691 @node text-transform, text-align, vertical-align, Text Properties
1286 @iftex 1692 @subsubsection text-transform
1287 @heading Creating a horizontal rule 1693 @multitable @columnfractions .2 .8
1288 @end iftex 1694 @end multitable
1695
1696 @node text-align, text-indent, text-transform, Text Properties
1697 @subsubsection text-align
1698 @multitable @columnfractions .2 .8
1699 @end multitable
1700
1701 @node text-indent, line-height, text-align, Text Properties
1702 @subsubsection
1703 @multitable @columnfractions .2 .8
1704 @end multitable
1705
1706 @node line-height, Box Properties, text-indent, Text Properties
1707 @subsubsection
1708 @multitable @columnfractions .2 .8
1709 @end multitable
1710
1711 @node Box Properties, Classification, line-height, Properties
1712 @subsection Box Properties
1713 @multitable @columnfractions .2 .8
1714 @end multitable
1715
1716 @node Classification, Media Selection, Box Properties, Properties
1717 @subsection Classification
1718 @multitable @columnfractions .2 .8
1719 @end multitable
1720
1721 @node Media Selection, Speech Properties, Classification, Properties
1722 @subsection Media Selection
1723 @multitable @columnfractions .2 .8
1724 @end multitable
1725
1726 @node Speech Properties, Units, Media Selection, Properties
1727 @subsection Speech Properties
1728 @multitable @columnfractions .2 .8
1729 @end multitable
1730
1731 @node Units, Length Units, Speech Properties, Stylesheets
1732 @section Units
1733
1289 @ifinfo 1734 @ifinfo
1290 @center -------------------- 1735 @menu
1291 @center Creating a horizontal rule 1736 * Length Units::
1292 @center -------------------- 1737 * Percentage Units::
1738 * Color Units::
1739 * URLs::
1740 * Angle Units::
1741 * Time Units::
1742 @end menu
1293 @end ifinfo 1743 @end ifinfo
1294 @vindex w3-horizontal-rule-char 1744
1295 Horizontal rules (@b{<HR>} tags in HTML[+]) are used to separate chunks 1745 @node Length Units, Percentage Units, Units, Units
1296 of a document, and is meant to be rendered as a solid line across the 1746 @subsection Length Units
1297 page. Some terminals display characters differently, so the variable 1747
1298 @code{w3-horizontal-rule-char} controls which character is used to draw 1748 @node Percentage Units, Color Units, Length Units, Units
1299 a horizontal bar. This variable must be the ASCII value of the 1749 @subsection Percentage Units
1300 character, @b{not a string}. The variable is passed through 1750
1301 @code{make-string} whenever a horizontal rule of a certain width is 1751 @node Color Units, URLs, Percentage Units, Units
1302 necessary. 1752 @subsection color Units
1303 1753
1304 @node Character based terminals, Graphics workstations, General Formatting, Controlling Formatting 1754 @node URLs, Angle Units, Color Units, Units
1305 @section On character based terminals 1755 @subsection URLs
1306 @vindex w3-delimit-emphasis 1756
1307 On character based terminals, there is no easy way to show that a 1757 @node Angle Units, Time Units, URLs, Units
1308 certain range of text is in bold or italics. If the variable 1758 @subsection Angle Units
1309 @code{w3-delimit-emphasis} is non-@code{nil}, then Emacs-W3 can insert 1759
1310 characters before and after character formatting commands in HTML 1760 @node Time Units, Supported URLs, Angle Units, Units
1311 documents. The defaul value of @code{w3-delimit-emphasis} is 1761 @subsection Time Units
1312 automatically set based on the type of window system and version of 1762
1313 Emacs being used. 1763 @node Supported URLs, MIME Support, Time Units, Top
1314 1764 @chapter Supported URLs
1315 @vindex w3-header-chars-assoc 1765
1316 :: WORK :: 1766 ::WORK:: List supported URL types, specific RFCs, etc.
1317 1767
1318 @findex w3-upcase-region 1768 @node MIME Support, Adding MIME types based on file extensions, Supported URLs, Top
1319 @code{w3-header-chars-assoc} is an assoc list of header tags and a list
1320 of formatting instructions. The @code{car} of the list is the level of
1321 the header (1--6). The rest of the list should contain three items.
1322 The first item is text to insert before the header. The second item is
1323 text to insert after the header. Both should have reserved characters
1324 converted to their HTML[+] entity definitions. The third item is a
1325 function to call on the area the header is in. This function is called
1326 with arguments specifying the start and ending character positions of
1327 the header. The starting point is always first. To convert a region to
1328 upper case, please use @code{w3-upcase-region} instead of
1329 @code{upcase-region}, so that entities are converted properly.
1330
1331 @node Graphics workstations, Inlined images, Character based terminals, Controlling Formatting
1332 @section With graphics workstations
1333 Starting with the first public release of version 2.3.0, all formatting
1334 is controlled by the use of stylesheets.
1335
1336 :: WORK :: Graphic workstation stuff - redo for stylesheets
1337
1338 @node Inlined images, , Graphics workstations, Controlling Formatting
1339 @cindex Inlined images
1340 @cindex Images
1341 @cindex Movies
1342 @cindex Inlined MPEGs
1343 @cindex MPEGs
1344 When running in Lucid Emacs 19.10 or XEmacs 19.11 and higher, Emacs-W3 can
1345 display inlined images and MPEG movies. There are several variables that
1346 control how and when the images are displayed.
1347
1348 @cindex Netpbm
1349 @cindex Pbmplus
1350 @vindex w3-graphic-converter-alist
1351 Since Lucid/XEmacs only natively understands XPixmaps and XBitmaps, GIFs
1352 and other image types must first be converted to one of these formats.
1353 To do this, the @b{netpbm utilities}@footnote{Available via anonymous
1354 ftp from ftp.x.org:/R5contrib/netpbm-1mar1994.tar.gz, and most large ftp
1355 sites.} programs are normally used. This is a suite of freeware image
1356 conversion tools. The variable @code{w3-graphic-converter-alist}
1357 controls how each image type is converted. This is an assoc list, keyed
1358 on the MIME content-type. The @code{car} is the content-type, and the
1359 @code{cdr} is a string suitable to pass to @code{format}. A %s in this
1360 string will be replaced with a converter from the ppm image format to an
1361 XPixmap (or XBitmap, if being run on a monochrome display). By default,
1362 the Emacs-W3 browser has converters for:
1363
1364 @enumerate
1365 @item
1366 image/x-xbitmap
1367 @item
1368 image/xbitmap
1369 @item
1370 image/xbm
1371 @item
1372 image/gif
1373 @item
1374 image/jpeg
1375 @item
1376 image/x-fax
1377 @item
1378 image/x-raster
1379 @item
1380 image/windowdump
1381 @item
1382 image/x-icon
1383 @item
1384 image/portable-graymap
1385 @item
1386 image/portable-pixmap
1387 @item
1388 image/x-pixmap
1389 @item
1390 image/x-xpixmap
1391 @item
1392 image/pict
1393 @item
1394 image/x-macpaint
1395 @item
1396 image/x-targa
1397 @item
1398 image/tiff
1399 @end enumerate
1400
1401 @vindex w3-color-max-blue
1402 @vindex w3-color-max-green
1403 @vindex w3-color-max-red
1404 @vindex w3-color-use-reducing
1405 @vindex w3-color-filter
1406 Since most displays are (sadly) not 24-bit, Emacs-W3 can automatically
1407 dither an image, so that it does not fill up the application' colormap too
1408 quickly. If @code{w3-color-use-reducing} is non-@code{nil}, then the
1409 images will use reduced colors. If @code{w3-color-filter} is @code{eq} to
1410 @code{'ppmquant}, then the ppmquant program will be used. If @code{eq} to
1411 @code{'ppmdither}, then the ppmdither program will be used. The ppmdither
1412 program tends to give better results. The values of
1413 @code{w3-color-max-red}, @code{w3-color-max-blue}, and
1414 @code{w3-color-max-green} control how many colors the inlined images can
1415 use. If using ppmquant, then the product of these three variables is used
1416 as the maximum number of colors per image. If using ppmdither, then only
1417 the set number of color cells can be allocated per image. See the man
1418 pages for ppmdither and ppmquant for more information on how the dithering
1419 is actually done. @code{w3-color-filter} may also be a string, specifying
1420 exactly what external filter to use. An example is: @samp{ppmquant -fs
1421 -map ~/pixmaps/colormap.ppm}.
1422
1423 @cindex MPEGs
1424 @cindex Inlined animations
1425 When running in XEmacs 19.11 or XEmacs 19.12, Emacs-W3 can insert an
1426 MPEG movie in the middle of a buffer.
1427
1428 :: WORK :: Need a pointer to the new EMBED Internet Draft ::
1429
1430 The basic syntax is:
1431 @example
1432 <embed href="somevideo.mpg" type="video/mpeg">
1433 @end example
1434
1435 @vindex w3-mpeg-args
1436 @vindex w3-mpeg-program
1437 This requires a special version of the standard @file{mpeg_play} mpeg
1438 player. Patches against the 2.0 version are available at
1439 ftp://ftp.cs.indiana.edu/pub/elisp/w3/mpeg_patch. The variable
1440 @code{w3-mpeg-program} should point to this executable, and
1441 @code{w3-mpeg-args} should be a list of any additional arguments to be
1442 passed to the player. By default, this includes @var{-loop}, so the
1443 mpeg plays continuously.
1444
1445 @cindex Delaying inlined images
1446 @cindex Delaying inlined animations
1447 @vindex w3-delay-image-loads
1448 @vindex w3-delay-mpeg-loads
1449 Because images and movies can take up an incredible amount of bandwidth,
1450 it is useful to be able to control whether they are loaded or not. By
1451 default, images and movies are loaded automatically, but the variables
1452 @code{w3-delay-image-loads} and @code{w3-delay-mpeg-loads} control this.
1453 If set to non-@code{nil}, then the images or movies are not
1454 loaded until explicitly requested by the user.
1455
1456 @cindex Loading delayed images
1457 @cindex Loading delayed movies
1458 @findex w3-load-delayed-images
1459 @findex w3-load-delayed-mpegs
1460 To load any delayed images, use the function
1461 @code{w3-load-delayed-images}. Its counterpart for delayed movies is
1462 @code{w3-load-delayed-mpegs}
1463
1464 @node MIME Support, Adding MIME types based on file extensions, , Top
1465 @chapter MIME Support 1769 @chapter MIME Support
1466 MIME is an emerging standard for multimedia mail. It offers a very 1770 @sc{mime} is an emerging standard for multimedia mail. It offers a very
1467 flexible typing mechanism. The type of a file or message is specified 1771 flexible typing mechanism. The type of a file or message is specified
1468 in two parts, separated by a '/'. The first part is the general 1772 in two parts, separated by a '/'. The first part is the general
1469 category of the data (text, application, image, etc.). The second part 1773 category of the data (text, application, image, etc.). The second part
1470 is the specific type of data (postscript, gif, jpeg, etc.). So 1774 is the specific type of data (postscript, gif, jpeg, etc.). So
1471 @samp{text/html} specifies an HTML document, whereas 1775 @samp{text/html} specifies an @sc{html} document, whereas
1472 @samp{image/x-xwindowdump} specifies an image of an Xwindow taken with 1776 @samp{image/x-xwindowdump} specifies an image of an Xwindow taken with
1473 the @file{xwd} program. 1777 the @file{xwd} program.
1474 1778
1475 1779
1476 This typing allows much more flexibility in naming files. HTTP/1.0 1780 This typing allows much more flexibility in naming files. @sc{http}/1.0
1477 servers can now send back content-type headers in response to a request, 1781 servers can now send back content-type headers in response to a request,
1478 and not have the client second-guess it based on file extensions. HTML 1782 and not have the client second-guess it based on file extensions. @sc{html}
1479 files can now be named @file{something.gif} (not a great idea, but 1783 files can now be named @file{something.gif} (not a great idea, but
1480 possible). 1784 possible).
1481 1785
1482 @ifinfo 1786 @ifinfo
1483 @menu 1787 @menu
1493 @node Adding MIME types based on file extensions, Specifying Viewers, MIME Support, MIME Support 1797 @node Adding MIME types based on file extensions, Specifying Viewers, MIME Support, MIME Support
1494 @section Adding MIME types based on file extensions 1798 @section Adding MIME types based on file extensions
1495 @vindex mm-mime-extensions 1799 @vindex mm-mime-extensions
1496 For some protocols however, it is still necessary to guess the content 1800 For some protocols however, it is still necessary to guess the content
1497 of a file based on the file extension. This type of guess-work should 1801 of a file based on the file extension. This type of guess-work should
1498 only be needed when accessing files via FTP, local file access, or old 1802 only be needed when accessing files via @sc{ftp}, local file access, or old
1499 HTTP/0.9 servers. 1803 @sc{http}/0.9 servers.
1500 1804
1501 Instead of specifying how to view things twice, once based on 1805 Instead of specifying how to view things twice, once based on
1502 content-type and once based on the file extension, it is easier to map 1806 content-type and once based on the file extension, it is easier to map
1503 file extensions to MIME content-types. The variable that controls this 1807 file extensions to MIME content-types. The variable that controls this
1504 is @code{mm-mime-extensions}. 1808 is @code{mm-mime-extensions}.
1510 files. If a content-type is defined for the document, then this is 1814 files. If a content-type is defined for the document, then this is
1511 over-ridden. Regular expressions can @b{NOT} be used. 1815 over-ridden. Regular expressions can @b{NOT} be used.
1512 1816
1513 @cindex mime-types file 1817 @cindex mime-types file
1514 @findex mm-parse-mimetypes 1818 @findex mm-parse-mimetypes
1515 Both Mosaic and the NCSA HTTP daemon rely on a separate file for mapping 1819 Both Mosaic and the NCSA @sc{http} daemon rely on a separate file for mapping
1516 file extensions to MIME types. Instead of having the users of Emacs-W3 1820 file extensions to MIME types. Instead of having the users of Emacs-W3
1517 duplicate this in lisp, this file can be parsed using the 1821 duplicate this in lisp, this file can be parsed using the
1518 @code{url-parse-mimetypes} function. This function is called each time 1822 @code{url-parse-mimetypes} function. This function is called each time
1519 w3 is loaded. It tries to locate mimetype files in several places. If 1823 w3 is loaded. It tries to locate mimetype files in several places. If
1520 the environment variable @code{MIMETYPES} is nonempty, then this is 1824 the environment variable @code{MIMETYPES} is nonempty, then this is
1533 @file{/usr/local/etc/mime-types} 1837 @file{/usr/local/etc/mime-types}
1534 @item 1838 @item
1535 @file{/usr/local/www/conf/mime-types} 1839 @file{/usr/local/www/conf/mime-types}
1536 @end enumerate 1840 @end enumerate
1537 1841
1538 Each line contains information for one http type. These types resemble 1842 Each line contains information for one @sc{http} type. These types resemble
1539 MIME types. To add new ones, use subtypes beginning with x-, such as 1843 MIME types. To add new ones, use subtypes beginning with x-, such as
1540 application/x-myprogram. Lines beginning with # are comment lines, and 1844 application/x-myprogram. Lines beginning with # are comment lines, and
1541 suitably ignored. Each line consists of: 1845 suitably ignored. Each line consists of:
1542 1846
1543 type/subtype ext1 ext2 ... ext@var{n} 1847 type/subtype ext1 ext2 ... ext@var{n}
1546 of space-separated filename extensions which correspond to the MIME 1850 of space-separated filename extensions which correspond to the MIME
1547 type. 1851 type.
1548 1852
1549 @node Specifying Viewers, ,Adding MIME types based on file extensions, MIME Support 1853 @node Specifying Viewers, ,Adding MIME types based on file extensions, MIME Support
1550 @section Specifying Viewers 1854 @section Specifying Viewers
1551 Not all files look as they should when parsed as an HTML document 1855 Not all files look as they should when parsed as an @sc{html} document
1552 (whitespace is stripped, paragraphs are reformatted, and lots of little 1856 (whitespace is stripped, paragraphs are reformatted, and lots of little
1553 changes that make the document look unrecognizable). Files may be 1857 changes that make the document look unrecognizable). Files may be
1554 passed to external programs or Emacs Lisp functions to be viewed. 1858 passed to external programs or Emacs Lisp functions to be viewed.
1555 1859
1556 Not all files can be viewed accurately from within an Emacs session (GIF 1860 Not all files can be viewed accurately from within an Emacs session (GIF
1560 1864
1561 @findex mm-add-mailcap-entry 1865 @findex mm-add-mailcap-entry
1562 As an alternative, the function @code{mm-add-mailcap-entry} can also be 1866 As an alternative, the function @code{mm-add-mailcap-entry} can also be
1563 used from an appropriate hook.@xref{Hooks} This functions takes three 1867 used from an appropriate hook.@xref{Hooks} This functions takes three
1564 arguments, the major type ("@i{image}"), the minor type ("@i{gif}"), and 1868 arguments, the major type ("@i{image}"), the minor type ("@i{gif}"), and
1565 an assoc list of information about the viewer. Please see the URL 1869 an assoc list of information about the viewer. Please see the @sc{url}
1566 documentation for more specific information on what this assoc list 1870 documentation for more specific information on what this assoc list
1567 should look like. 1871 should look like.
1568 1872
1569 @node Security, Non-Unix Operating Systems, , Top 1873 @node Security, Non-Unix Operating Systems, , Top
1570 @chapter Security 1874 @chapter Security
1599 @cindex Gag Puke Retch 1903 @cindex Gag Puke Retch
1600 @cindex Exportability 1904 @cindex Exportability
1601 @cindex Export Restrictions 1905 @cindex Export Restrictions
1602 SSL is the @code{Secure Sockets Layer} interface developed by Netscape 1906 SSL is the @code{Secure Sockets Layer} interface developed by Netscape
1603 Communications @footnote{http://www.netscape.com/}. Emacs-W3 supports 1907 Communications @footnote{http://www.netscape.com/}. Emacs-W3 supports
1604 HTTP transfers over an SSL encrypted channel, if the appropriate files 1908 @sc{http} transfers over an SSL encrypted channel, if the appropriate files
1605 have been installed.@xref{Installing SSL} 1909 have been installed.@xref{Installing SSL}
1606 @item PGP/PEM
1607 @cindex HTTP/1.0 Authentication
1608 @cindex Public Key Cryptography
1609 @cindex Authentication, PGP
1610 @cindex Authentication, PEM
1611 @cindex RIPEM
1612 @cindex Public Key Cryptography
1613 @cindex PGP
1614 @cindex Pretty Good Privacy
1615 @cindex Encryption
1616 @cindex Security
1617 @cindex ITAR must die
1618 @cindex Stupid export restrictions
1619 @cindex Support your local crypto-anarchist
1620 @cindex NSA freaks
1621 A few servers still support this method of authentication, but it has
1622 been superseded by SSL and Secure-HTTP.@xref{Using PGP/PEM}
1623 @end table 1910 @end table
1624 1911
1625 @node Non-Unix Operating Systems, VMS, Security, Top 1912 @node Non-Unix Operating Systems, VMS, Security, Top
1626 @chapter Non-Unix Operating Systems 1913 @chapter Non-Unix Operating Systems
1627 @cindex Non-Unix Operating Systems 1914 @cindex Non-Unix Operating Systems
1628 @ifinfo 1915 @ifinfo
1629 @menu 1916 @menu
1630 * VMS:: The wonderful world of VAX|AXP-VMS! 1917 * VMS:: The wonderful world of VAX|AXP-VMS!
1631 * OS/2:: The next-best thing to Unix. 1918 * OS/2:: The next-best thing to Unix.
1632 * MS-DOS:: The wonderful world of MS-DOG! 1919 * MS-DOS:: The wonderful world of MS-DOG!
1633 * 32-Bit Windows:: Windows NT, Chicago/Windows 95. 1920 * Windows:: Windows NT, Chicago/Windows 95.
1634 * Amiga:: The Amiga, for those who still love them.
1635 @end menu 1921 @end menu
1636 @end ifinfo 1922 @end ifinfo
1637 1923
1638 @node VMS, OS/2, Non-Unix Operating Systems, Non-Unix Operating Systems 1924 @node VMS, OS/2, Non-Unix Operating Systems, Non-Unix Operating Systems
1639 @section VMS 1925 @section VMS
1647 @section OS/2 1933 @section OS/2
1648 @cindex OS/2 1934 @cindex OS/2
1649 @cindex Warp 1935 @cindex Warp
1650 :: WORK :: OS/2 Specific instructions 1936 :: WORK :: OS/2 Specific instructions
1651 1937
1652 @node MS-DOS, 32-Bit Windows, OS/2, Non-Unix Operating Systems 1938 @node MS-DOS, Windows, OS/2, Non-Unix Operating Systems
1653 @section MS-DOS 1939 @section MS-DOS
1654 @cindex MS-DOS 1940 @cindex MS-DOS
1655 @cindex Microsloth 1941 @cindex Microsloth
1656 @cindex DOS 1942 @cindex DOS
1657 @cindex MS-DOG 1943 @cindex MS-DOG
1658 :: WORK :: DOS Specific instructions 1944 :: WORK :: DOS Specific instructions
1659 1945
1660 @node 32-Bit Windows, Amiga, MS-DOS, Non-Unix Operating Systems 1946 @node Windows, Speech Integration , MS-DOS, Non-Unix Operating Systems
1661 @section 32-Bit Windows 1947 @section Windows
1662 @cindex Windows (32-Bit) 1948 @cindex Windows (32-Bit)
1663 @cindex 32-Bit Windows 1949 @cindex 32-Bit Windows
1664 @cindex Microsloth 1950 @cindex Microsloth
1665 @cindex Windows '95 1951 @cindex Windows '95
1666 :: WORK :: 32bit Windows Specific instructions 1952 :: WORK :: 32bit Windows Specific instructions
1667 1953
1668 @node Amiga, Advanced Features, 32-Bit Windows, Non-Unix Operating Systems 1954 @node Speech Integration, Advanced Features, Windows, Top
1669 @section Amiga 1955 @chapter Speech Integration
1670 @cindex Amiga 1956 :: WORK :: Emacspeak integration
1671 @cindex Commodore 1957
1672 :: WORK :: Amiga specific instructions 1958 @node Advanced Features, Style Sheets, Speech Integration, Top
1673
1674 @node Advanced Features, Style Sheets, Amiga, Top
1675 @chapter Advanced Features 1959 @chapter Advanced Features
1676 1960
1677 @ifinfo 1961 @ifinfo
1678 @menu 1962 @menu
1679 * Style Sheets:: Formatting control, the right way 1963 * Style Sheets:: Formatting control, the right way
1680 * Disk Caching:: Improving performance by using a local disk cache 1964 * Disk Caching:: Improving performance by using a local disk cache
1681 * Interfacing to Mail/News:: How to make VM understand hypertext links 1965 * Interfacing to Mail/News:: How to make VM understand hypertext links
1682 * Debugging HTML:: How to make Emacs-W3 display warnings about invalid 1966 * Debugging HTML:: How to make Emacs-W3 display warnings about invalid
1683 HTML/HTML+ constructs. 1967 @sc{html}/@sc{html}+ constructs.
1684 * Native WAIS Support:: How to make Emacs-W3 understand WAIS links without 1968 * Native WAIS Support:: How to make Emacs-W3 understand WAIS links without
1685 using a gateway. 1969 using a gateway.
1686 * Rating Links:: How to make Emacs-W3 put an 'interestingness' value 1970 * Rating Links:: How to make Emacs-W3 put an 'interestingness' value
1687 next to each link. 1971 next to each link.
1688 * Gopher Plus Support:: How Emacs-W3 makes use of the Gopher+ protocol. 1972 * Gopher Plus Support:: How Emacs-W3 makes use of the Gopher+ protocol.
1728 2012
1729 @cindex <style> 2013 @cindex <style>
1730 To include a stylesheet into a document, simply use the <style> tag. 2014 To include a stylesheet into a document, simply use the <style> tag.
1731 Use the @b{notation} attribute to specify what language the stylesheet 2015 Use the @b{notation} attribute to specify what language the stylesheet
1732 is specified in. The default is @b{css}. The data between the <style> 2016 is specified in. The default is @b{css}. The data between the <style>
1733 and </style> tags is the stylsheet proper - no HTML parsing is done to 2017 and </style> tags is the stylsheet proper - no @sc{html} parsing is done to
1734 this data - it is treated similar to an <XMP> section of text. To 2018 this data - it is treated similar to an <XMP> section of text. To
1735 reference an external stylesheet, use the <link> tag. 2019 reference an external stylesheet, use the <link> tag.
1736 @example 2020 @example
1737 <link rel="stylesheet" href="/bill.style"> 2021 <link rel="stylesheet" href="/bill.style">
1738 @end example 2022 @end example
1739 If these two mechanisms are mixed, then the URL is resolved first, and 2023 If these two mechanisms are mixed, then the @sc{url} is resolved first, and
1740 the contents of the <style> tag take precedence if there are any 2024 the contents of the <style> tag take precedence if there are any
1741 conflicting directives. 2025 conflicting directives.
1742 2026
1743 @cindex DSSSL 2027 @cindex DSSSL
1744 @cindex DSSSL-lite 2028 @cindex DSSSL-lite
1802 @cindex Caching options 2086 @cindex Caching options
1803 @cindex Alternate caching method 2087 @cindex Alternate caching method
1804 Emacs-W3 caches files under the temporary directory specified by 2088 Emacs-W3 caches files under the temporary directory specified by
1805 @code{url-temporary-directory}, in a user-specific subdirectory 2089 @code{url-temporary-directory}, in a user-specific subdirectory
1806 (determined by the @code{user-real-login-name} function). The cache 2090 (determined by the @code{user-real-login-name} function). The cache
1807 files are stored under their original names, so a URL like: 2091 files are stored under their original names, so a @sc{url} like:
1808 http://www.aventail.com/foo/bar/baz.html would be stored in a cache file 2092 http://www.aventail.com/foo/bar/baz.html would be stored in a cache file
1809 named: /tmp/wmperry/com/aventail/www/foo/bar/baz.html. Sometimes, 2093 named: /tmp/wmperry/com/aventail/www/foo/bar/baz.html. Sometimes,
1810 espcially with gopher links, there will be name conflicts, and an error 2094 espcially with gopher links, there will be name conflicts, and an error
1811 will be signalled. This cannot be avoided, and still have reasonable 2095 will be signalled. This cannot be avoided, and still have reasonable
1812 performance at startup time (reading in an index file of all the cached 2096 performance at startup time (reading in an index file of all the cached
1836 @cindex Using Emacs-W3 with VM 2120 @cindex Using Emacs-W3 with VM
1837 @cindex GNUS 2121 @cindex GNUS
1838 @cindex Using Emacs-W3 with Gnus 2122 @cindex Using Emacs-W3 with Gnus
1839 @cindex RMAIL 2123 @cindex RMAIL
1840 @cindex Using Emacs-W3 with RMAIL 2124 @cindex Using Emacs-W3 with RMAIL
1841 More and more people are including URLs in their signatures, and within 2125 More and more people are including @sc{url}s in their signatures, and within
1842 the body of mail messages. It can get quite tedious to type these into 2126 the body of mail messages. It can get quite tedious to type these into
1843 the minibuffer to follow one. 2127 the minibuffer to follow one.
1844 2128
1845 @vindex browse-url-browser-function 2129 @vindex browse-url-browser-function
1846 With the latest versions of VM (the 5.9x series of betas) and Gnus 2130 With the latest versions of VM (the 5.9x series of betas) and Gnus
1847 (5.x), URLs are automatically highlighted, and can be followed with the 2131 (5.x), @sc{url}s are automatically highlighted, and can be followed with the
1848 mouse or the return key. How the URLs are viewed is determined by the 2132 mouse or the return key. How the @sc{url}s are viewed is determined by the
1849 variable @code{browse-url-browser-function}, and it should be set to the 2133 variable @code{browse-url-browser-function}, and it should be set to the
1850 symbol @code{browse-url-w3}. 2134 symbol @code{browse-url-w3}.
1851 2135
1852 To access URLs from within RMAIL, the following hook should do the 2136 To access @sc{url}s from within RMAIL, the following hook should do the
1853 trick. 2137 trick.
1854 @example 2138 @example
1855 (add-hook 'rmail-mode-hook 2139 (add-hook 'rmail-mode-hook
1856 (function 2140 (function
1857 (lambda () 2141 (lambda ()
1865 @cindex Invalid HTML 2149 @cindex Invalid HTML
1866 @cindex Bad HTML 2150 @cindex Bad HTML
1867 @vindex w3-debug-buffer 2151 @vindex w3-debug-buffer
1868 @vindex w3-debug-html 2152 @vindex w3-debug-html
1869 For those people that are adventurous, or are just as anal as I am about 2153 For those people that are adventurous, or are just as anal as I am about
1870 people writing valid HTML, set the variable @code{w3-debug-html} to 2154 people writing valid @sc{html}, set the variable @code{w3-debug-html} to
1871 @code{t} and see what happens. 2155 @code{t} and see what happens.
1872 2156
1873 2157
1874 If a Emacs-W3 thinks it has encountered invalid HTML, then a debugging 2158 If a Emacs-W3 thinks it has encountered invalid @sc{html}, then a debugging
1875 message is displayed. 2159 message is displayed.
1876 2160
1877 :: WORK :: Need to list the different values w3-debug-html can have, and 2161 :: WORK :: Need to list the different values w3-debug-html can have, and
1878 :: WORK :: what they do :: 2162 :: WORK :: what they do ::
1879 2163
1890 @vindex url-wais-gateway-port 2174 @vindex url-wais-gateway-port
1891 The variable @code{url-waisq-prog} must point to this executable, and 2175 The variable @code{url-waisq-prog} must point to this executable, and
1892 one of @code{url-wais-gateway-server} or @code{url-wais-gateway-port} 2176 one of @code{url-wais-gateway-server} or @code{url-wais-gateway-port}
1893 should be @code{nil}. 2177 should be @code{nil}.
1894 2178
1895 When a WAIS URL is encountered, a form will be automatically generated 2179 When a WAIS @sc{url} is encountered, a form will be automatically generated
1896 and displayed. After typing in the search term, the query will be sent 2180 and displayed. After typing in the search term, the query will be sent
1897 to the server by running the @code{url-waisq-prog} in a subprocess. The 2181 to the server by running the @code{url-waisq-prog} in a subprocess. The
1898 results will be converted into HTML and displayed. 2182 results will be converted into @sc{html} and displayed.
1899 2183
1900 @node Rating Links, Gopher Plus Support, Native WAIS Support, Advanced Features 2184 @node Rating Links, Gopher Plus Support, Native WAIS Support, Advanced Features
1901 @section Rating Links 2185 @section Rating Links
1902 The @code{w3-link-info-display-function} variable can be used to 'rate' a URL 2186 The @code{w3-link-info-display-function} variable can be used to 'rate' a @sc{url}
1903 when it shows up in an HTML page. If non-@code{nil}, then this should 2187 when it shows up in an @sc{html} page. If non-@code{nil}, then this should
1904 be a list specifying (or a symbol specifying the name) of a function. 2188 be a list specifying (or a symbol specifying the name) of a function.
1905 This function should expect one argument, a fully specified URL, and 2189 This function should expect one argument, a fully specified @sc{url}, and
1906 should return a string. This string is inserted after the link 2190 should return a string. This string is inserted after the link
1907 text. 2191 text.
1908 2192
1909 If a user has decided that all links served from blort.com are too laden 2193 If a user has decided that all links served from blort.com are too laden
1910 with images, and wants to be warned that a link points at this host, 2194 with images, and wants to be warned that a link points at this host,
1923 2207
1924 @node Gopher Plus Support, Hooks, Rating Links, Advanced Features 2208 @node Gopher Plus Support, Hooks, Rating Links, Advanced Features
1925 @section Gopher+ Support 2209 @section Gopher+ Support
1926 @cindex Gopher+ 2210 @cindex Gopher+
1927 The gopher+ support in Emacs-W3 is limited to the conversion of ASK 2211 The gopher+ support in Emacs-W3 is limited to the conversion of ASK
1928 blocks into HTML 3.0 forms, and the usage of the content-length given by 2212 blocks into @sc{html} 3.0 forms, and the usage of the content-length given by
1929 the gopher+ server to give a nice status bar on the bottom of the 2213 the gopher+ server to give a nice status bar on the bottom of the
1930 screen. 2214 screen.
1931 2215
1932 This will hopefully be extended to include the Gopher+ method of 2216 This will hopefully be extended to include the Gopher+ method of
1933 content-type negotiation, but this may be a while. 2217 content-type negotiation, but this may be a while.
1941 of functions) that are called consecutively. 2225 of functions) that are called consecutively.
1942 2226
1943 @table @code 2227 @table @code
1944 @vindex w3-load-hooks 2228 @vindex w3-load-hooks
1945 @item w3-load-hooks 2229 @item w3-load-hooks
1946 These hooks are run by @code{w3-do-setup} the first time a URL is 2230 These hooks are run by @code{w3-do-setup} the first time a @sc{url} is
1947 fetched. All the w3 variables are initialized before this hook is 2231 fetched. All the w3 variables are initialized before this hook is
1948 run. 2232 run.
1949 @item w3-file-done-hooks 2233 @item w3-file-done-hooks
1950 These hooks are run by @code{w3-prepare-buffer} after all parsing on a 2234 These hooks are run by @code{w3-prepare-buffer} after all parsing on a
1951 document has been done. All @code{url-current-}@var{*} and 2235 document has been done. All @code{url-current-}@var{*} and
1952 @code{w3-current-}@var{*} variables are initialized when this hook is run. 2236 @code{w3-current-}@var{*} variables are initialized when this hook is run.
1953 This is run before the buffer is shown, and before any inlined images 2237 This is run before the buffer is shown, and before any inlined images
1954 are downloaded and converted. 2238 are downloaded and converted.
1955 @item w3-file-prepare-hooks 2239 @item w3-file-prepare-hooks
1956 These hooks are run by @code{w3-prepare-buffer} before any parsing is 2240 These hooks are run by @code{w3-prepare-buffer} before any parsing is
1957 done on the HTML file. The HTTP/1.0 headers specified by 2241 done on the @sc{html} file. The @sc{http}/1.0 headers specified by
1958 @code{w3-show-headers} have been inserted, the syntax table has been set 2242 @code{w3-show-headers} have been inserted, and the syntax table has been
1959 to @code{w3-parse-args-syntax-table}, and any personal annotations have 2243 set to @code{w3-parse-args-syntax-table} by the time this hook is run.
1960 been inserted by the time this hook is run.
1961 @item w3-mode-hooks 2244 @item w3-mode-hooks
1962 These hooks are run after a buffer has been parsed and displayed, but 2245 These hooks are run after a buffer has been parsed and displayed, but
1963 before any inlined images are downloaded and converted. 2246 before any inlined images are downloaded and converted.
1964 @item w3-source-file-hooks 2247 @item w3-source-file-hooks
1965 These hooks are run after displaying a document's source 2248 These hooks are run after displaying a document's source
1972 2255
1973 @table @code 2256 @table @code
1974 @item url-bad-port-list 2257 @item url-bad-port-list
1975 @vindex url-bad-port-list 2258 @vindex url-bad-port-list
1976 List of ports to warn the user about connecting to. Defaults to just 2259 List of ports to warn the user about connecting to. Defaults to just
1977 the mail and NNTP ports so a malicious HTML author cannot spoof mail or 2260 the mail and @sc{nntp} ports so a malicious @sc{html} author cannot spoof mail or
1978 news to other people. 2261 news to other people.
1979 @item url-confirmation-func 2262 @item url-confirmation-func
1980 @vindex url-confirmation-func 2263 @vindex url-confirmation-func
1981 What function to use for asking yes or no functions. Possible values 2264 What function to use for asking yes or no functions. Possible values
1982 are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes 2265 are @code{'yes-or-no-p} or @code{'y-or-n-p}, or any function that takes
2025 @code{yes} means assume the user wants to always reuse the buffer. A 2308 @code{yes} means assume the user wants to always reuse the buffer. A
2026 value of @code{no} means assume the user always wants to re-fetch the 2309 value of @code{no} means assume the user always wants to re-fetch the
2027 document. 2310 document.
2028 @item w3-show-headers 2311 @item w3-show-headers
2029 @vindex w3-show-headers 2312 @vindex w3-show-headers
2030 This is a list of HTTP/1.0 headers to show at the end of a buffer. All 2313 This is a list of @sc{http}/1.0 headers to show at the end of a buffer. All
2031 the headers should be in lowercase. They are inserted at the end of the 2314 the headers should be in lowercase. They are inserted at the end of the
2032 buffer in a <UL> list. Alternatively, if this is simply @code{t}, then 2315 buffer in a <UL> list. Alternatively, if this is simply @code{t}, then
2033 all the HTTP/1.0 headers are shown. The default value is 2316 all the @sc{http}/1.0 headers are shown. The default value is
2034 @code{nil}. 2317 @code{nil}.
2035 @item w3-show-status, url-show-status 2318 @item w3-show-status, url-show-status
2036 @vindex url-show-status 2319 @vindex url-show-status
2037 @vindex w3-show-status 2320 @vindex w3-show-status
2038 Whether to show progress messages in the minibuffer. 2321 Whether to show progress messages in the minibuffer.
2061 binary, x-compress, x-hqx, and quoted-printable. 2344 binary, x-compress, x-hqx, and quoted-printable.
2062 @item url-uncompressor-alist 2345 @item url-uncompressor-alist
2063 @vindex url-uncompressor-alist 2346 @vindex url-uncompressor-alist
2064 An assoc list of file extensions and the appropriate uncompression 2347 An assoc list of file extensions and the appropriate uncompression
2065 programs for each. This is used to build the Accept-encoding header for 2348 programs for each. This is used to build the Accept-encoding header for
2066 HTTP/1.0 requests. 2349 @sc{http}/1.0 requests.
2067 @item url-waisq-prog 2350 @item url-waisq-prog
2068 @vindex url-waisq-prog 2351 @vindex url-waisq-prog
2069 Name of the waisq executable on this system. This should be the 2352 Name of the waisq executable on this system. This should be the
2070 @file{waisq} program from think.com's wais8-b5.1 distribution. 2353 @file{waisq} program from think.com's wais8-b5.1 distribution.
2071 @end table 2354 @end table
2125 for the better). This is a list of the things that are being worked on 2408 for the better). This is a list of the things that are being worked on
2126 right now. 2409 right now.
2127 2410
2128 :: WORK :: Revamp the todo list 2411 :: WORK :: Revamp the todo list
2129 2412
2130 @node Reporting Bugs, Installing SSL, Future Directions, Top 2413 @node Reporting Bugs, Dealing with Firewalls, Future Directions, Top
2131 @appendix Reporting Bugs 2414 @appendix Reporting Bugs
2132 @cindex Reporting Bugs 2415 @cindex Reporting Bugs
2133 @cindex Bugs 2416 @cindex Bugs
2134 @cindex Contacting the author 2417 @cindex Contacting the author
2135 2418
2136 :: WORK :: Reporting bugs needs work. 2419 If any bugs are discovered in Emacs-W3, please report them to the
2137 2420 mailing list @t{w3-beta@@indiana.edu} - this is where the brave souls
2138 @node Installing SSL, Using PGP/PEM, Reporting Bugs, Top 2421 who beta test the latest versions of Emacs-W3 reside, and are generally
2422 very responsive to bug reports.
2423
2424 @kindex w
2425 Please make sure to use the bug submission feature of Emacs-W3, so that
2426 all relevant information will be sent along with your bug report. By
2427 default this is bound to the `@key{w}' key when in an Emacs-W3 buffer,
2428 or you can use @key{M-x w3-submit-bug} from anywhere within Emacs.
2429
2430 For problems that are causing emacs to signal and error, please send a
2431 backtrace. You can get a backtrace by @kbd{M-x setvariable RET
2432 debug-on-error RET t RET}, and then reproduce the error.
2433
2434 If the problem is visual, please capture a copy of the output and mail
2435 it along with the bug report (preferably as a MIME attachment, but
2436 anything will do). You can use the @code{xwd} program under X-windows
2437 for this, or @key{Alt-PrintScreen} under Windows 95/NT. Sorry, but I
2438 don't remember what the magic incarnation is for doing a screen dump
2439 under NeXTstep or OS/2.
2440
2441 If the problem is actually causing Emacs to crash, then you will need to
2442 also mail the maintainers of the various Emacs distributions with the
2443 bug. Please use the @t{gnu.emacs.bug} newgroup for reporting bugs with
2444 GNU Emacs 19, and @t{comp.emacs.xemacs} for reporting bugs with XEmacs
2445 19 or XEmacs 20. I am actively involved with the beta testing of the
2446 latest versions of both branches of Emacs, and if I can reproduce the
2447 problem, I will do my best to see it gets fixed in the next release.
2448
2449 It is also important to always maintain as much context as possible in
2450 your responses. I get so much email from my various Emacs-activities
2451 and work, that I cannot remember everything. If you send a bug report,
2452 and I send you a reply, and you reply with 'no that didn't work', then
2453 odds are I will have no clue what didn't work, much less what that was
2454 trying to fix in the first place. It will be much quicker and less
2455 painful if I don't have to waste a round-trip email exchange saying
2456 'what are you talking about'.
2457
2458 @node Dealing with Firewalls, Proxy Gateways, Reporting Bugs, Top
2459 @appendix Dealing with Firewalls
2460 By default, Emacs can support standard @sc{tcp}/@sc{ip} network
2461 connections on almost all the platforms it runs on (Unix, @sc{vms},
2462 Windows, etc). However, there are several situations where it is not
2463 sufficient.
2464
2465 @table @b
2466 @cindex Firewalls
2467 @item Firewalls
2468 It is becoming more and more common to be behind a firewall or some
2469 other system that restricts your outbound network activity, especially
2470 if you are like me and away from the wonderful world of academia.
2471 Emacs-W3 has several different methods to get around firewalls (not to
2472 worry though - none of them should get you in trouble with the local
2473 @sc{mis} department.)
2474
2475 @item Emacs cannot resolve hostnames.
2476 @cindex Faulty hostname resolvers
2477 @cindex Broken SunOS libc
2478 @cindex Hostname resolution
2479 This happens quite often on SunOS workstations and some ULTRIX machines.
2480 Some C libraries do not include the hostname resolver routines in their
2481 static libraries. If Emacs was linked statically, and was not linked
2482 with the resolver libraries, it wil not be able to get to any machines
2483 off the local network. This is characterized by being able to reach
2484 someplace with a raw ip number, but not its hostname
2485 (@url{http://129.79.254.191/} works, but
2486 @url{http://www.cs.indiana.edu/} doesn't).
2487
2488 The best solution for this problem is to recompile Emacs, making sure to
2489 either link dynamically (if available on your operating system), or
2490 include the @file{-lresolv}.
2491
2492 @cindex url-gateway-broken-resolution
2493 If you do not have the disk space or the appropriate permissions to
2494 recompile Emacs, another alternative is using the @file{nslookup}
2495 program to do hostname resolution. To turn this on, set the variable
2496 @code{url-gateway-broken-resolution} in your @file{~/.emacs} file. This
2497 runs the program specified by @code{url-gateway-nslookup-program} (by
2498 default "@code{nslookup}" to do hostname resolution. This program should
2499 expect a single argument on the command line - the hostname to resolve,
2500 and should produce output similar to the standard Unix @file{nslookup}
2501 program:
2502
2503 @example
2504 Name: www.cs.indiana.ed
2505 Address: 129.79.254.191
2506 @end example
2507
2508 @cindex @sc{term}
2509 @item Using @sc{term} (or @sc{term}-like) Networking Software
2510 @sc{term} @footnote{@sc{term} is a user-level protocol for emulating
2511 @sc{ip} over a serial line. More information is available at
2512 @url{ftp://sunsite.unc.edu/pub/Linux/apps/comm/term}} for slip-like
2513 access to the internet.
2514
2515 @sc{note}: XEmacs and Emacs 19.22 or later have patches to enable native
2516 @sc{term} networking. To enable it, @code{#define TERM} in the
2517 appropriate s/*.h file for the operating system, then change the
2518 @code{SYSTEM_LIBS} definition to include the @file{termnet} library that
2519 comes with the latest versions of @sc{term}.
2520
2521 If you run into any problems with the native @sc{term} networking
2522 support in Emacs or XEmacs, please let @t{wmperry@@cs.indiana.edu} know,
2523 as he is responsible for the original support.
2524 @end table
2525
2526 @vindex url-gateway-local-host-regexp
2527 Emacs-W3 has support for using the gateway mechanism for certain
2528 domains, and directly connecting to others. The variable
2529 @code{url-gateway-local-host-regexp} controls this behaviour. This is a
2530 regular expression @footnote{Please see the full Emacs distribution for
2531 a description of regular expressions} that matches local hosts that do
2532 not require the use of a gateway. If @code{nil}, then all connections
2533 are made through the gateway.
2534
2535 @vindex url-gateway-method
2536 Emacs-W3 supports several methods of getting around gateways. The
2537 variable @code{url-gateway-method} controls which of these methods is
2538 used. This variable can have several values (use these as symbol names,
2539 not strings), ie: @samp{(setq url-gateway-method 'telnet)}. Possible
2540 values are:
2541
2542 @table @dfn
2543 @item telnet
2544 Use this method if you must first telnet and log into a gateway host,
2545 and then run telnet from that host to connect to outside machines.
2546
2547 :: WORK :: document telnet gw variables
2548 This section needs more information, specifically documenting the
2549 following variables. For now, please do @key{C-h v} on the variable for
2550 more information.
2551
2552 @table @code
2553 @item url-gateway-telnet-host
2554 @item url-gateway-telnet-parameters
2555 @item url-gateway-telnet-password-prompt
2556 @item url-gateway-telnet-puser-name
2557 @item url-gateway-prompt-pattern
2558 @end table
2559
2560 @item rlogin
2561 This method is identical to the @code{telnet} method, but uses
2562 @file{rlogin} to log into the remote machine without having to send the
2563 username and password over the wire every time.
2564
2565 :: WORK :: document rlogin gw variables
2566 This section needs more information, specifically documenting the
2567 following variables. For now, please do @key{C-h v} on the variable for
2568 more information.
2569
2570 @table @code
2571 @item url-gateway-rlogin-host
2572 @item url-gateway-rlogin-parameters
2573 @item url-gateway-rlogin-user-name
2574 @item url-gateway-prompt-pattern
2575 @end table
2576
2577 @item tcp
2578 Masanobu UMEDA (@i{umerin@@mse.kyutech.ac.jp}) has written a very small
2579 application that you can run in a subprocess to do the network
2580 connections.
2581
2582 @item @sc{socks}
2583 Use if the firewall has a @sc{socks} gateway running on it.
2584
2585 :: WORK :: document socks variables
2586 This section needs more information, specifically documenting the
2587 following variables. For now, please do @key{C-h v} on the variable for
2588 more information.
2589
2590 @table @code
2591 @item socks-host
2592 @item socks-password
2593 @item socks-username
2594 @item socks-port
2595 @item socks-timeout
2596 @end table
2597
2598 @c @item ssl
2599 @c This probably shouldn't be documented
2600
2601 @item native
2602 This means that Emacs-W3 should use the builtin networking code of
2603 Emacs. This should be used only if there is no firewall, or the Emacs
2604 source has already been hacked to get around the firewall.
2605 @end table
2606
2607 Emacs-W3 should now be able to get outside the local network. If none
2608 of this makes sense, its probably my fault. Please check with the
2609 network administrators to see if they have a program that does most of
2610 this already, since somebody somewhere at the company has probably been
2611 through something similar to this before, and would be much more
2612 helpful/knowledgeable about the local setup than I would be. But feel
2613 free to mail me as a last resort.
2614
2615 @node Proxy Gateways, Installing SSL, Dealing with Firewalls, Top
2616 @appendix Proxy Gateways
2617 @vindex url-proxy-services
2618 @cindex Proxy Servers
2619 @cindex Proxies
2620 @cindex Proxies, environment variables
2621 @cindex HTTP Proxy
2622
2623 In late January 1993, Kevin Altis and Lou Montulli proposed and
2624 implemented a new proxy service. This service requires the use of
2625 environment variables to specify a gateway server/port # to send
2626 protocol requests to. Each protocol (@sc{http}, @sc{wais}, gopher,
2627 @sc{ftp}, etc.) can have a different gateway server. The environment
2628 variables are @code{PROTOCOL}_proxy, where @code{PROTOCOL} is one of the
2629 supported network protocols (gopher, file, @sc{http}, @sc{ftp}, etc.)
2630
2631 @cindex No Proxy
2632 @cindex Proxies, exclusion lists
2633 @vindex NO_PROXY
2634 For companies with internal intranets, it will usually be helpful to
2635 define a list of hosts that should be contacted directly, @b{not} sent
2636 through the proxy. The @code{NO_PROXY} environment variable controls
2637 what hosts are able to be contacted directly. This should be a comma
2638 separated list of hostnames, domain names, or a mixture of both.
2639 Asterisks can be used as a wildcard. For example:
2640
2641 @example
2642 NO_PROXY=*.aventail.com,home.com,*.seanet.com
2643 @end example
2644
2645 tells Emacs-W3 to contact all machines in the @b{aventail.com} and
2646 @b{seanet.com} domains directly, as well as the machine named
2647 @b{home.com}.
2648
2649 @vindex url-proxy-services
2650 @cindex Proxies, setting from lisp
2651 For those adventurous souls who enjoy writing regular expressions, all
2652 the proxy settings can be manipulated from Emacs-Lisp. The variable
2653 @code{url-proxy-services} controls this. This is an assoc list, keyed
2654 on the protocol type (@sc{http}, gopher, etc) in all lowercase. The
2655 @code{cdr} of each entry should be the fully-specified @sc{url} of the proxy
2656 server to contact, or, in the case of the special "no_proxy" entry, a
2657 regular expression that matches any hostnames that should be contacted
2658 directly.
2659
2660 @example
2661 (setq url-proxy-services '(("http" . "http://proxy.aventail.com/")
2662 ("no_proxy" . "^.*\\(aventail\\|seanet\\)\.com")))
2663 @end example
2664
2665 @node Installing SSL, Mailcap Files, Proxy Gateways, Top
2139 @appendix Installing SSL 2666 @appendix Installing SSL
2140 @cindex HTTP/1.0 Authentication 2667 @cindex HTTP/1.0 Authentication
2141 @cindex Secure Sockets Layer 2668 @cindex Secure Sockets Layer
2142 @cindex SSL 2669 @cindex SSL
2143 @cindex Gag Puke Retch 2670 @cindex Gag Puke Retch
2169 2696
2170 This should be all the configuration necessary. In the future, I will 2697 This should be all the configuration necessary. In the future, I will
2171 be distributing a set of patches to Emacs 19.xx and XEmacs 19.xx to 2698 be distributing a set of patches to Emacs 19.xx and XEmacs 19.xx to
2172 SSL-enable them, for the sake of speed. 2699 SSL-enable them, for the sake of speed.
2173 2700
2174 @node Using PGP/PEM, Mailcap Files, Installing SSL, Top 2701 @node Mailcap Files, Down with DoubleClick, Installing SSL, Top
2175 @appendix Using PGP/PEM
2176 @cindex HTTP/1.0 Authentication
2177 @cindex Public Key Cryptography
2178 @cindex Authentication, PGP
2179 @cindex Authentication, PEM
2180 @cindex RIPEM
2181 @cindex Public Key Cryptography
2182 @cindex PGP
2183 @cindex Pretty Good Privacy
2184 @cindex Encryption
2185 @cindex Security
2186 @cindex ITAR must die
2187 @cindex Stupid export restrictions
2188 @cindex Support your local crypto-anarchist
2189 @cindex NSA freaks
2190 Most of this chapter has been reproduced from the original documentation
2191 written by Rob McCool (@i{robm@@netscape.com})@footnote{See
2192 http://hoohoo.ncsa.uiuc.edu/docs/PEMPGP.html for the original}.
2193
2194 RIPEM is 'Riordan's Internet Privacy Enhanced Mail', and is currently on
2195 version 1.2b3. US citizens can ftp it from
2196 ftp://ripem.msu.edu/pub/crypt/ripem.
2197
2198 PGP is 'Pretty Good Privacy', and is currently on version 2.6. The
2199 legal controversies that plagued earlier versions have been resolved, so
2200 this is a competely legal program now. There is also a legal version
2201 for european users, called 2.6ui (the Unofficial International
2202 version).
2203
2204 PGP and PEM are programs that allow two parties to communicate in a way
2205 which does not allow third parties to read them, and which certify that
2206 the person who sent the message is really who they claim they are.
2207
2208
2209 PGP and PEM both use RSA encryption. The U.S. government has strict
2210 export controls over foreign use of this technology, so people outside
2211 the U.S. may have a difficult time finding programs which perform the
2212 encryption.
2213
2214 A working copy of either Pretty Good Privacy or RIPEM is required. You
2215 should be familiar with the program and have generated a public/private
2216 key pair.
2217
2218
2219 Currently, the protocol has been implemented with PEM and PGP using
2220 local key files on the server side, and on the client side with PEM
2221 using finger to retrieve the server's public key.
2222
2223 Parties who wish to use Emacs-W3 with PEM or PGP encryption will need to
2224 communicate beforehand and find a tamper-proof way to exchange their
2225 public keys.
2226
2227 Pioneers get shot full of arrows. This work is currently in the
2228 experimental stages and thus may have some problems that I have
2229 overlooked. The only known problem that I know about is that the
2230 messages are currently not timestamped. This means that a malicious
2231 user could record the encrypted message with a packet sniffer and repeat
2232 it back to the server ad nauseum. Although they would not be able to
2233 read the reply, if the request was for something being charged for, this
2234 could be very inconvenient.
2235
2236 This protocol is almost word-for-word a copy of Tony Sander's RIPEM
2237 based scheme, generalized a little. Below, wherever PEM is used,
2238 replace it with PGP, and the behaviour should remain the same.
2239
2240 @example
2241 *Client:*
2242
2243 GET /docs/protected.html HTTP/1.0
2244 UserAgent: Emacs-W3/2.1.x
2245
2246 *Server:*
2247
2248 HTTP/1.0 401 Unauthorized
2249 WWW-Authenticate: PEM entity="webmaster@@hoohoo.ncsa.uiuc.edu"
2250 Server: NCSA/1.1
2251
2252 *Client:*
2253
2254 GET / HTTP/1.0
2255 Authorization: PEM entity="robm@@ncsa.uiuc.edu"
2256 Content-type: application/x-www-pem-request
2257
2258 --- BEGIN PRIVACY-ENHANCED MESSAGE ---
2259 this is the real request, encrypted
2260 --- END PRIVACY-ENHANCED MESSAGE ---
2261
2262 *Server:*
2263
2264 HTTP/1.0 200 OK
2265 Content-type: application/x-www-pem-reply
2266
2267 --- BEGIN PRIVACY-ENHANCED MESSAGE ---
2268 this is the real reply, encrypted
2269 --- END PRIVACY-ENHANCED MESSAGE ---
2270 That's it.
2271 @end example
2272
2273 @cindex Mailcrypt
2274 Emacs-W3 uses the excellent @i{mailcrypt}@footnote{Available from
2275 http://www.cs.indiana.edu/LCD/cover.html?mailcrypt} package written by
2276 Jin S Choi (@i{jsc@@mit.edu}). This package takes care of calling ripem
2277 and/or pgp with the correct arguments. Please see the documentation at
2278 the top of mailcrypt.el for instructions on using mailcrypt. All bug
2279 reports about mailcrypt should go to Jin S Choi, but bugs about how I
2280 use it in Emacs-W3 should of course be directed to me.
2281
2282 @node Mailcap Files, General Index, Using PGP/PEM, Top
2283 @appendix Mailcap Files 2702 @appendix Mailcap Files
2284 NCSA Mosaic and almost all other WWW browsers rely on a separate file 2703 NCSA Mosaic and almost all other WWW browsers rely on a separate file
2285 for mapping MIME types to external viewing programs. This takes some of 2704 for mapping MIME types to external viewing programs. This takes some of
2286 the burden off of browser developers, so each browser does not have to 2705 the burden off of browser developers, so each browser does not have to
2287 support all image formats, or postscript, etc. Instead of having the 2706 support all image formats, or postscript, etc. Instead of having the
2411 simply ignore all such unrecognized fields to permit such extensions, 2830 simply ignore all such unrecognized fields to permit such extensions,
2412 some of which might be standardized in a future version of this 2831 some of which might be standardized in a future version of this
2413 document. 2832 document.
2414 @end itemize 2833 @end itemize
2415 2834
2416 @node General Index, Key Index, Mailcap Files, Top 2835 @node Down with DoubleClick, General Index, Mailcap Files, Top
2836 @appendix Down with DoubleClick
2837 :: WORK :: Document why doubleclick is evil
2838 :: WORK :: Document how you can never see another ad from them again
2839
2840 @node General Index, Key Index, Down with DoubleClick, Top
2417 @appendix General Index 2841 @appendix General Index
2418 @printindex fn 2842 @printindex fn
2419 @node Key Index, , General Index, Top 2843 @node Key Index, , General Index, Top
2420 @appendix Key Index 2844 @appendix Key Index
2421 @printindex ky 2845 @printindex ky
2422 @contents 2846 @contents
2423 @bye 2847 @bye
2848
2849 @c @node Supported Protocols, , Stylesheets, Introduction
2850 @c @chapter Supported Protocols
2851 @c @cindex Network Protocols
2852 @c @cindex Protocols Supported
2853 @c @cindex Supported Protocols
2854 @c Emacs-W3 supports the following protocols
2855 @c @table @b
2856 @c @item Usenet News
2857 @c Can either display an entire newsgroup or specific articles by
2858 @c Message-ID: header. Instead of rewriting a newsreader, this integrates
2859 @c with the Gnus newsreader. It requires at least Gnus 5.0, but it is
2860 @c always safest to use the latest version. Gnus supports some very
2861 @c advanced features, including virtual newsgroups, mail and news
2862 @c integration, and reading news from multiple servers. @inforef{Gnus,
2863 @c Top,gnus}, for more info.
2864
2865 @c To be more in line with the other @sc{url} schemes, the hostname and port of
2866 @c an @sc{nntp} server can be specified. @sc{url}s of the form
2867 @c news://hostname:port/messageID work, but might not work in some other
2868 @c browsers.
2869
2870 @c @item @sc{http}
2871 @c Supports the @sc{http}/0.9, @sc{http}/1.0, and parts of the @sc{http}/1.1 protocols.
2872 @c @item Gopher
2873 @c Support for all gopher types, including CSO queries.
2874 @c @item Gopher+
2875 @c Support for Gopher+ retrievals. Support for converting ASK blocks into
2876 @c HTML forms and submitting them back to the server.
2877 @c @item @sc{ftp}
2878 @c @sc{ftp} is handled by either ange-ftp or efs.
2879 @c @inforef{Ange-FTP,Top,ange-ftp}, for more information on Ange-FTP, or
2880 @c @inforef{EFS, Top,efs}, for information on EFS.
2881 @c @item Local files
2882 @c Local files are of course handled, and MIME content-types are derived
2883 @c from the file extensions.
2884 @c @item telnet, tn3270, rlogin
2885 @c Telnet, tn3270, and rogin are handled by running the appropriate program
2886 @c in an emacs buffer, or running an external process.
2887 @c @item mailto
2888 @c Causes a mail message to be started to a specific address. Supports the
2889 @c Netscape @i{extensions} to specify arbitrary headers on the message.
2890 @c @item data
2891 @c A quick and easy way to `inline' small pieces of information that you do
2892 @c not necessarily want to download over the net separately. Can speed up
2893 @c display of small icons, stylesheet information, etc. See the internet
2894 @c draft draft-masinter-url-data-02.txt for more information.
2895 @c @item mailserver
2896 @c A more powerful version of mailto, which allows the author to specify
2897 @c the subject and body text of the mail message. This type of link is
2898 @c never fully executed without user confirmation, because it is possible
2899 @c to insert insulting or threatening (and possibly illegal) data into the
2900 @c message. The mail message is displayed, and the user must confirm the
2901 @c message before it is sent.
2902 @c @item x-exec
2903 @c A @sc{url} can cause a local executable to be run, and its output interpreted
2904 @c as if it had come from an @sc{http} server. This is very useful, but is
2905 @c still an experimental protocol, hence the X- prefix. This @sc{url} protocol
2906 @c is deprecated, but might be useful in the future.
2907 @c @item @sc{nfs}
2908 @c Retrieves information over @sc{nfs}. This requires that your operating
2909 @c system support auto-mounting of @sc{nfs} volumes.
2910 @c @item finger
2911 @c Retrieves information about a user via the 'finger' protocol.
2912 @c @item Info
2913 @c Creates a link to an GNU-style info file. @inforef{Info,Top,info}, for more
2914 @c information on the Info format.
2915 @c @item SSL
2916 @c SSL requires a set of patches to the Emacs C code and SSLRef 2.0, or an
2917 @c external program to run in a subprocess (similar to the @file{tcp.el}
2918 @c package that comes with GNUS. @xref{Installing SSL}
2919 @c @end table
2920