diff options
| author | Glenn Morris | 2013-01-04 01:39:40 -0800 |
|---|---|---|
| committer | Glenn Morris | 2013-01-04 01:39:40 -0800 |
| commit | b55349fbd859656ee4747f261f90b56d01d4084c (patch) | |
| tree | 8e3af4ef9e0c42c895f3702e108e3aa2e7b3a718 | |
| parent | 7fca93e239d479eb24bfbf043c8aa76d34d8879c (diff) | |
| download | emacs-b55349fbd859656ee4747f261f90b56d01d4084c.tar.gz emacs-b55349fbd859656ee4747f261f90b56d01d4084c.zip | |
* doc/misc/htmlfontify.texi: Miscellaneous fixes and updates.
Set copyright to FSF, update license to GFDL 1.3+.
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/htmlfontify.texi | 987 |
2 files changed, 301 insertions, 691 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index fe1d81e77e2..a7afa9a1cd4 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-01-04 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * htmlfontify.texi: Miscellaneous fixes and updates. | ||
| 4 | Set copyright to FSF, update license to GFDL 1.3+. | ||
| 5 | |||
| 1 | 2013-01-04 Vivek Dasmohapatra <vivek@etla.org> | 6 | 2013-01-04 Vivek Dasmohapatra <vivek@etla.org> |
| 2 | 7 | ||
| 3 | * htmlfontify.texi: New file. | 8 | * htmlfontify.texi: New file. |
diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi index 03a849fab2c..d6904740778 100644 --- a/doc/misc/htmlfontify.texi +++ b/doc/misc/htmlfontify.texi | |||
| @@ -1,35 +1,33 @@ | |||
| 1 | \input texinfo | 1 | \input texinfo |
| 2 | @c documentation for htmlfontify | 2 | @comment %**start of header |
| 3 | @c written by Vivek Dasmohapatra | 3 | @setfilename ../../info/htmlfontify |
| 4 | |||
| 5 | @comment %**start of header (This is for running Texinfo on a region.) | ||
| 6 | |||
| 7 | @setfilename htmlfontify.info | ||
| 8 | @settitle Htmlfontify User Manual | 4 | @settitle Htmlfontify User Manual |
| 9 | |||
| 10 | @dircategory Emacs | ||
| 11 | @direntry | ||
| 12 | * Htmlfontify: (htmlfontify). A source code -> linked html + css transformer | ||
| 13 | @end direntry | ||
| 14 | |||
| 15 | @exampleindent 2 | 5 | @exampleindent 2 |
| 16 | @comment %**end of header (This is for running Texinfo on a region.) | 6 | @comment %**end of header |
| 17 | 7 | ||
| 18 | @ifinfo | 8 | @copying |
| 19 | 9 | This manual documents Htmlfontify, a source code -> crosslinked + | |
| 20 | This file documents Htmlfontify, a source code -> crosslinked + formatted + | 10 | formatted + syntax colorised html transformer. |
| 21 | syntax colourised html transformer. | 11 | |
| 22 | 12 | Copyright @copyright{} 2002, 2003, 2013 Free Software Foundation, Inc. | |
| 23 | Copyright (c) 2002,2003 Vivek Dasmohapatra <vivek@@etla.org> | 13 | |
| 24 | 14 | @quotation | |
| 25 | Permission is granted to copy, distribute and/or modify this | 15 | Permission is granted to copy, distribute and/or modify this document |
| 26 | document under the terms of the GNU Free Documentation Licence, | 16 | under the terms of the GNU Free Documentation License, Version 1.3 or |
| 27 | Version 1.1 or any later version published by the Free Software | 17 | any later version published by the Free Software Foundation; with no |
| 28 | Foundation; with no Invariant Sections, no Front-Cover Texts and | 18 | Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' |
| 29 | no Back-Cover Texts. A copy of the licence is included in the | 19 | and with the Back-Cover Texts as in (a) below. A copy of the license |
| 30 | section entitled "GNU Free Documentation Licence". | 20 | is included in the section entitled ``GNU Free Documentation License''. |
| 31 | 21 | ||
| 32 | @end ifinfo | 22 | (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and |
| 23 | modify this GNU manual.'' | ||
| 24 | @end quotation | ||
| 25 | @end copying | ||
| 26 | |||
| 27 | @dircategory Emacs misc features | ||
| 28 | @direntry | ||
| 29 | * Htmlfontify: (htmlfontify). Convert source code to html. | ||
| 30 | @end direntry | ||
| 33 | 31 | ||
| 34 | @titlepage | 32 | @titlepage |
| 35 | @title Htmlfontify User Manual | 33 | @title Htmlfontify User Manual |
| @@ -43,66 +41,64 @@ section entitled "GNU Free Documentation Licence". | |||
| 43 | 41 | ||
| 44 | @vskip 0pt plus 1filll | 42 | @vskip 0pt plus 1filll |
| 45 | @noindent | 43 | @noindent |
| 46 | Copyright @copyright{} 2002 Vivek Dasmohapatra <vivek@@etla.org> | 44 | @insertcopying |
| 45 | @end titlepage | ||
| 47 | 46 | ||
| 48 | Permission is granted to copy, distribute and/or modify this document | 47 | @contents |
| 49 | under the terms of the GNU Free Documentation Licence, Version 1.1 or | ||
| 50 | any later version published by the Free Software Foundation; with no | ||
| 51 | Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A | ||
| 52 | copy of the licence is included in the section entitled "GNU Free | ||
| 53 | Documentation Licence". | ||
| 54 | 48 | ||
| 55 | @end titlepage | 49 | @ifnottex |
| 56 | @page | 50 | @node Top |
| 51 | @top Htmlfontify | ||
| 57 | 52 | ||
| 58 | @node Top, Introduction, (dir), (dir) | 53 | @insertcopying |
| 54 | @end ifnottex | ||
| 59 | 55 | ||
| 60 | @menu | 56 | @menu |
| 61 | * Introduction:: About Htmlfontify. | 57 | * Introduction:: About Htmlfontify. |
| 62 | * Usage & Examples:: How to use Htmlfontify. | 58 | * Usage & Examples:: How to use Htmlfontify. |
| 63 | * Customisation:: Fine tuning Htmlfontify's behaviour. | 59 | * Customisation:: Fine-tuning Htmlfontify's behaviour. |
| 64 | * Requirements:: External programs used by Htmlfontify. | 60 | * Requirements:: External programs used by Htmlfontify. |
| 65 | * Index:: Index of Contents. | 61 | * GNU Free Documentation License:: The license for this documentation. |
| 66 | * COPYING:: The GNU Free Documentation Licence. | 62 | * Index:: Index of contents. |
| 67 | @end menu | 63 | @end menu |
| 68 | 64 | ||
| 69 | @node Introduction, Usage & Examples, Top, Top | 65 | @node Introduction |
| 70 | @chapter Introduction | 66 | @chapter Introduction |
| 71 | @cindex Introduction | 67 | @cindex Introduction |
| 72 | 68 | ||
| 73 | Htmlfontify provides a means of converting individual emacs buffers, | 69 | Htmlfontify provides a means of converting individual Emacs buffers, |
| 74 | source files, or entire source trees to html, preserving formatting | 70 | source files, or entire source trees to html, preserving formatting |
| 75 | and emacs colourisation / syntax highlighting as much as possible | 71 | and Emacs colorisation / syntax highlighting as much as possible |
| 76 | through careful application of CSS stylesheets and html tags. | 72 | through careful application of CSS stylesheets and html tags. |
| 77 | 73 | ||
| 78 | It can also turn instances of functions, methods and ( for some | 74 | It can also turn instances of functions, methods and (for some |
| 79 | languages ) variables and other constructs and items into links | 75 | languages) variables and other constructs and items into links |
| 80 | to their definitions, and create an index file ( or files ) of | 76 | to their definitions, and create an index file (or files) of |
| 81 | all such symbols, also linked to their points of definition. | 77 | all such symbols, also linked to their points of definition. |
| 82 | 78 | ||
| 83 | Htmlfontify also provides several customisation items, which should | 79 | Htmlfontify also provides several customisation items, which should |
| 84 | allow it to mesh more-or-less seamlessly with various templating or | 80 | allow it to mesh more-or-less seamlessly with various templating or |
| 85 | publishing systems ( in the event, for instance, that you don't want | 81 | publishing systems (in the event, for instance, that you don't want |
| 86 | to produce the html pages directly ). | 82 | to produce the html pages directly). |
| 87 | 83 | ||
| 88 | @node Usage & Examples, Customisation, Introduction, Top | 84 | @node Usage & Examples |
| 89 | @chapter Usage & Examples | 85 | @chapter Usage & Examples |
| 90 | @cindex Usage & Examples | 86 | @cindex Usage & Examples |
| 91 | 87 | ||
| 92 | Htmlfontify can be used both interactively and as part of another | 88 | Htmlfontify can be used both interactively and as part of another |
| 93 | elisp function. If you're running it in emacs21 ( its native land, | 89 | elisp function. If you're running it in a modern Emacs, it will also |
| 94 | it were ), it will also run when attached to a terminal ( ie w/o X ) | 90 | run when attached to a terminal (i.e., without X) or even when in |
| 95 | or even when in batch mode. | 91 | batch mode. |
| 96 | 92 | ||
| 97 | @menu | 93 | @menu |
| 98 | * Interactive:: Using htmlfontify interactively. | 94 | * Interactive:: Using Htmlfontify interactively. |
| 99 | * Non-interactive:: Using htmlfontify from elisp. | 95 | * Non-interactive:: Using Htmlfontify from elisp. |
| 100 | * Variables:: Variables (other than customisation entries). | 96 | * Variables:: Variables (other than customisation entries). |
| 101 | * Data Structures:: Important Data Structures. | 97 | * Data Structures:: Important data structures. |
| 102 | * Examples:: Example(s) of htmlfontify in use. | 98 | * Examples:: Example(s) of Htmlfontify in use. |
| 103 | @end menu | 99 | @end menu |
| 104 | 100 | ||
| 105 | @node Interactive, Non-interactive, , Usage & Examples | 101 | @node Interactive |
| 106 | @section Interactive | 102 | @section Interactive |
| 107 | @cindex Interactive | 103 | @cindex Interactive |
| 108 | @cindex functions (interactive) | 104 | @cindex functions (interactive) |
| @@ -120,18 +116,18 @@ Htmlfontify provides the following interactive functions: | |||
| 120 | @end lisp | 116 | @end lisp |
| 121 | 117 | ||
| 122 | Create a new buffer, named for the current buffer + a .html extension, | 118 | Create a new buffer, named for the current buffer + a .html extension, |
| 123 | containing an inline css-stylesheet and formatted css-markup html that | 119 | containing an inline CSS-stylesheet and formatted CSS-markup html that |
| 124 | reproduces the look of the current emacs buffer as closely as possible. | 120 | reproduces the look of the current Emacs buffer as closely as possible. |
| 125 | 121 | ||
| 126 | ``Dangerous'' characters in the existing buffer are turned into html | 122 | ``Dangerous'' characters in the existing buffer are turned into html |
| 127 | entities, so you should even be able to do html-within-html fontified | 123 | entities, so you should even be able to do html-within-html fontified |
| 128 | display. | 124 | display. |
| 129 | 125 | ||
| 130 | You should, however, note that random control or eight-bit characters | 126 | You should, however, note that random control or eight-bit characters |
| 131 | such as ^L (\x0c) or ¤ (\xa4) won't get mapped yet. | 127 | such as ^L (\x0c) or ¤ (\xa4) won't get mapped yet. |
| 132 | 128 | ||
| 133 | If the @var{srcdir} and @var{file} arguments are set, lookup etags | 129 | If the @var{srcdir} and @var{file} arguments are set, lookup etags |
| 134 | derived entries in the @ref{hfy-tags-cache} and add html anchors | 130 | derived entries in the @ref{hfy-tags-cache} and add html anchors |
| 135 | and hyperlinks as appropriate. | 131 | and hyperlinks as appropriate. |
| 136 | 132 | ||
| 137 | @item htmlfontify-run-etags | 133 | @item htmlfontify-run-etags |
| @@ -143,7 +139,7 @@ and hyperlinks as appropriate. | |||
| 143 | (htmlfontify-run-etags @var{srcdir}) | 139 | (htmlfontify-run-etags @var{srcdir}) |
| 144 | @end lisp | 140 | @end lisp |
| 145 | 141 | ||
| 146 | Load the etags cache for @var{srcdir}. See @ref{hfy-load-tags-cache}. | 142 | Load the etags cache for @var{srcdir}. See @ref{hfy-load-tags-cache}. |
| 147 | 143 | ||
| 148 | @item htmlfontify-copy-and-link-dir | 144 | @item htmlfontify-copy-and-link-dir |
| 149 | @findex htmlfontify-copy-and-link-dir | 145 | @findex htmlfontify-copy-and-link-dir |
| @@ -154,8 +150,8 @@ Load the etags cache for @var{srcdir}. See @ref{hfy-load-tags-cache}. | |||
| 154 | (htmlfontify-copy-and-link-dir @var{srcdir} @var{dstdir} &optional @var{f-ext} @var{l-ext}) | 150 | (htmlfontify-copy-and-link-dir @var{srcdir} @var{dstdir} &optional @var{f-ext} @var{l-ext}) |
| 155 | @end lisp | 151 | @end lisp |
| 156 | 152 | ||
| 157 | Trawl @var{srcdir} and write fontified-and-hyperlinked output in | 153 | Trawl @var{srcdir} and write fontified-and-hyperlinked output in |
| 158 | @var{dstdir} @var{f-ext} and @var{l-ext} specify values for | 154 | @var{dstdir}. @var{f-ext} and @var{l-ext} specify values for |
| 159 | @ref{hfy-extn} and @ref{hfy-link-extn}. | 155 | @ref{hfy-extn} and @ref{hfy-link-extn}. |
| 160 | 156 | ||
| 161 | You may also want to set @ref{hfy-page-header} and @ref{hfy-page-footer}. | 157 | You may also want to set @ref{hfy-page-header} and @ref{hfy-page-footer}. |
| @@ -169,15 +165,15 @@ You may also want to set @ref{hfy-page-header} and @ref{hfy-page-footer}. | |||
| 169 | (htmlfontify-load-rgb-file &optional @var{file}) | 165 | (htmlfontify-load-rgb-file &optional @var{file}) |
| 170 | @end lisp | 166 | @end lisp |
| 171 | 167 | ||
| 172 | Load an X11 style rgb.txt file (search @code{hfy-rgb-load-path} if | 168 | Load an X11 style rgb.txt file (search @code{hfy-rgb-load-path} if |
| 173 | @var{file} is not specified). | 169 | @var{file} is not specified). |
| 174 | 170 | ||
| 175 | Note that this is not necessary if all you want is the standard X11 | 171 | Note that this is not necessary if all you want is the standard X11 |
| 176 | (XFree86 4.1.0) colour name -> rgb triplet mapping, htmlfontify has | 172 | (XFree86 4.1.0) color name -> rgb triplet mapping. Htmlfontify has |
| 177 | a copy built in, for use when it cannot contact an X server. | 173 | a copy built in, for use when it cannot contact an X server. |
| 178 | 174 | ||
| 179 | Loads the variable @code{hfy-rgb-txt-colour-map}, which is used by | 175 | Loads the variable @code{hfy-rgb-txt-color-map}, which is used by |
| 180 | @ref{hfy-fallback-colour-values}. | 176 | @ref{hfy-fallback-color-values}. |
| 181 | 177 | ||
| 182 | @item htmlfontify-unload-rgb-file | 178 | @item htmlfontify-unload-rgb-file |
| 183 | @findex htmlfontify-unload-rgb-file | 179 | @findex htmlfontify-unload-rgb-file |
| @@ -188,15 +184,15 @@ Loads the variable @code{hfy-rgb-txt-colour-map}, which is used by | |||
| 188 | (htmlfontify-unload-rgb-file) | 184 | (htmlfontify-unload-rgb-file) |
| 189 | @end lisp | 185 | @end lisp |
| 190 | 186 | ||
| 191 | Unload the currently loaded X11 style rgb.txt file ( if any ). | 187 | Unload the currently loaded X11 style rgb.txt file (if any). |
| 192 | @end table | 188 | @end table |
| 193 | 189 | ||
| 194 | @node Non-interactive, Variables, Interactive, Usage & Examples | 190 | @node Non-interactive |
| 195 | @section Non-interactive | 191 | @section Non-interactive |
| 196 | @cindex Noninteractive | 192 | @cindex Noninteractive |
| 197 | @cindex functions (noninteractive) | 193 | @cindex functions (noninteractive) |
| 198 | 194 | ||
| 199 | In addition to the aforementioned interactive methods, htmlfontify | 195 | In addition to the aforementioned interactive methods, Htmlfontify |
| 200 | provides the following non-interactive ones: | 196 | provides the following non-interactive ones: |
| 201 | 197 | ||
| 202 | @table @code | 198 | @table @code |
| @@ -212,23 +208,23 @@ provides the following non-interactive ones: | |||
| 212 | @end lisp | 208 | @end lisp |
| 213 | 209 | ||
| 214 | Take @var{fn}, a font or @code{defface} style font specification, | 210 | Take @var{fn}, a font or @code{defface} style font specification, |
| 215 | (as returned by @code{face-attr-construct} or @ref{hfy-face-attr-for-class}) | 211 | (as returned by @code{face-attr-construct} or @ref{hfy-face-attr-for-class}) |
| 216 | and return a @ref{hfy-style-assoc}. | 212 | and return a @ref{hfy-style-assoc}. |
| 217 | 213 | ||
| 218 | See also: @ref{hfy-face-to-style-i}, @ref{hfy-flatten-style}. | 214 | See also: @ref{hfy-face-to-style-i}, @ref{hfy-flatten-style}. |
| 219 | 215 | ||
| 220 | @item hfy-fallback-colour-values | 216 | @item hfy-fallback-color-values |
| 221 | @findex hfy-fallback-colour-values | 217 | @findex hfy-fallback-color-values |
| 222 | @anchor{hfy-fallback-colour-values} | 218 | @anchor{hfy-fallback-color-values} |
| 223 | 219 | ||
| 224 | @lisp | 220 | @lisp |
| 225 | 221 | ||
| 226 | (hfy-fallback-colour-values @var{colour-string}) | 222 | (hfy-fallback-color-values @var{color-string}) |
| 227 | @end lisp | 223 | @end lisp |
| 228 | 224 | ||
| 229 | Use a fallback method for obtaining the rgb values for a colour. | 225 | Use a fallback method for obtaining the rgb values for a color. |
| 230 | If @ref{htmlfontify-load-rgb-file} has been called, it uses the | 226 | If @ref{htmlfontify-load-rgb-file} has been called, it uses the |
| 231 | colour map specified, otherwise it uses htmlfontify's built in map. | 227 | color map specified, otherwise it uses Htmlfontify's built in map. |
| 232 | 228 | ||
| 233 | @item hfy-combined-face-spec | 229 | @item hfy-combined-face-spec |
| 234 | @findex hfy-combined-face-spec | 230 | @findex hfy-combined-face-spec |
| @@ -239,8 +235,8 @@ colour map specified, otherwise it uses htmlfontify's built in map. | |||
| 239 | (hfy-combined-face-spec @var{face}) | 235 | (hfy-combined-face-spec @var{face}) |
| 240 | @end lisp | 236 | @end lisp |
| 241 | 237 | ||
| 242 | Return a @code{defface} style alist of possible specifications for | 238 | Return a @code{defface} style alist of possible specifications for |
| 243 | @var{face}, with any entries resulting from user customisation | 239 | @var{face}, with any entries resulting from user customisation |
| 244 | (@code{custom-set-faces}) taking precedence. | 240 | (@code{custom-set-faces}) taking precedence. |
| 245 | 241 | ||
| 246 | See also: @ref{hfy-default-face-def} | 242 | See also: @ref{hfy-default-face-def} |
| @@ -254,8 +250,8 @@ See also: @ref{hfy-default-face-def} | |||
| 254 | (hfy-word-regex @var{string}) | 250 | (hfy-word-regex @var{string}) |
| 255 | @end lisp | 251 | @end lisp |
| 256 | 252 | ||
| 257 | Return a regex that matches @var{string} as the first @code{match-string}, | 253 | Return a regex that matches @var{string} as the first @code{match-string}, |
| 258 | with non word characters on either side (vaguely emulating the perl @code{\b} | 254 | with non word characters on either side (vaguely emulating the perl @code{\b} |
| 259 | regex atom). | 255 | regex atom). |
| 260 | 256 | ||
| 261 | @item hfy-force-fontification | 257 | @item hfy-force-fontification |
| @@ -267,16 +263,16 @@ regex atom). | |||
| 267 | (hfy-force-fontification) | 263 | (hfy-force-fontification) |
| 268 | @end lisp | 264 | @end lisp |
| 269 | 265 | ||
| 270 | Emacs' fontification is designed for interactive use. As such, it sometimes | 266 | Emacs's fontification is designed for interactive use. As such, it sometimes |
| 271 | does things like deferring fontification until a section of the buffer is | 267 | does things like deferring fontification until a section of the buffer is |
| 272 | exposed and rendered, or until emacs is idle for a while. Sometimes, in | 268 | exposed and rendered, or until Emacs is idle for a while. Sometimes, in |
| 273 | non-interactive circumstances, or if it can't see X, it doesn't bother | 269 | non-interactive circumstances, or if it can't see X, it doesn't bother |
| 274 | with some of the harder stuff. While this is all great from the perspective | 270 | with some of the harder stuff. While this is all great from the perspective |
| 275 | of a user waiting for emacs to load a 20000 line file and colourise it, | 271 | of a user waiting for Emacs to load a 20000 line file and colorise it, |
| 276 | it's a pain from the point of view from non-interactive code. This function | 272 | it's a pain from the point of view from non-interactive code. This function |
| 277 | lies, cheats, steals and generally bullies emacs into fontifying a buffer | 273 | lies, cheats, steals and generally bullies Emacs into fontifying a buffer |
| 278 | from start to finish, with all the extra frills, whether it thinks it nneds | 274 | from start to finish, with all the extra frills, whether it thinks it nneds |
| 279 | to or not. Oh yes: it operates on the current buffer. | 275 | to or not. Oh yes: it operates on the current buffer. |
| 280 | 276 | ||
| 281 | @item hfy-link-style-string | 277 | @item hfy-link-style-string |
| 282 | @findex hfy-link-style-string | 278 | @findex hfy-link-style-string |
| @@ -287,8 +283,8 @@ to or not. Oh yes: it operates on the current buffer. | |||
| 287 | (hfy-link-style-string @var{style-string}) | 283 | (hfy-link-style-string @var{style-string}) |
| 288 | @end lisp | 284 | @end lisp |
| 289 | 285 | ||
| 290 | Replace the end of a css style declaration @var{style-string} with the contents | 286 | Replace the end of a CSS style declaration @var{style-string} with the contents |
| 291 | of the variable @ref{hfy-src-doc-link-style}, removing text matching the | 287 | of the variable @ref{hfy-src-doc-link-style}, removing text matching the |
| 292 | regex @ref{hfy-src-doc-link-unstyle} first, if necessary. | 288 | regex @ref{hfy-src-doc-link-unstyle} first, if necessary. |
| 293 | 289 | ||
| 294 | 290 | ||
| @@ -302,8 +298,8 @@ regex @ref{hfy-src-doc-link-unstyle} first, if necessary. | |||
| 302 | @end lisp | 298 | @end lisp |
| 303 | 299 | ||
| 304 | Prepare a tags index buffer for @var{srcdir}. | 300 | Prepare a tags index buffer for @var{srcdir}. |
| 305 | @ref{hfy-tags-cache} must already have an entry for @var{srcdir} for | 301 | @ref{hfy-tags-cache} must already have an entry for @var{srcdir} for |
| 306 | this to work. @ref{hfy-page-header}, @ref{hfy-page-footer}, | 302 | this to work. @ref{hfy-page-header}, @ref{hfy-page-footer}, |
| 307 | @ref{hfy-link-extn} and @ref{hfy-extn} all play a part here. | 303 | @ref{hfy-link-extn} and @ref{hfy-extn} all play a part here. |
| 308 | 304 | ||
| 309 | If @var{stub} is set, prepare an (appropriately named) index buffer | 305 | If @var{stub} is set, prepare an (appropriately named) index buffer |
| @@ -331,8 +327,8 @@ Trawl the current buffer, construct and return a @ref{hfy-sheet-assoc}. | |||
| 331 | (hfy-css-name @var{fn}) | 327 | (hfy-css-name @var{fn}) |
| 332 | @end lisp | 328 | @end lisp |
| 333 | 329 | ||
| 334 | Strip some of the boring bits from a font-name and return a css style | 330 | Strip some of the boring bits from a font-name and return a CSS style |
| 335 | name. If @var{fn} is a @code{defface} attribute list, either construct | 331 | name. If @var{fn} is a @code{defface} attribute list, either construct |
| 336 | a name for it, store it in the cache, and return it, or just fetch it | 332 | a name for it, store it in the cache, and return it, or just fetch it |
| 337 | from the cache if it's already there. | 333 | from the cache if it's already there. |
| 338 | 334 | ||
| @@ -345,7 +341,7 @@ from the cache if it's already there. | |||
| 345 | (hfy-make-directory @var{dir}) | 341 | (hfy-make-directory @var{dir}) |
| 346 | @end lisp | 342 | @end lisp |
| 347 | 343 | ||
| 348 | Approx equivalent of mkdir -p @var{dir} | 344 | Approximate equivalent of @code{mkdir -p @var{dir}}. |
| 349 | 345 | ||
| 350 | @item hfy-triplet | 346 | @item hfy-triplet |
| 351 | @findex hfy-triplet | 347 | @findex hfy-triplet |
| @@ -353,14 +349,14 @@ Approx equivalent of mkdir -p @var{dir} | |||
| 353 | 349 | ||
| 354 | @lisp | 350 | @lisp |
| 355 | 351 | ||
| 356 | (hfy-triplet @var{colour}) | 352 | (hfy-triplet @var{color}) |
| 357 | @end lisp | 353 | @end lisp |
| 358 | 354 | ||
| 359 | Takes a colour name (string) and return a CSS rgb(R, G, B) triplet string. | 355 | Takes a color name (string) and return a CSS rgb(R, G, B) triplet string. |
| 360 | Uses the definition of "white" to map the numbers to the 0-255 range, so | 356 | Uses the definition of ``white'' to map the numbers to the 0-255 range, so |
| 361 | if you've redefined white, (esp if you've redefined it to have a triplet | 357 | if you've redefined white, (especially if you've redefined it to have |
| 362 | member lower than that of the colour you are processing, strange things | 358 | a triplet member lower than that of the color you are processing, |
| 363 | may happen). | 359 | strange things may happen). |
| 364 | 360 | ||
| 365 | @item hfy-default-footer | 361 | @item hfy-default-footer |
| 366 | @findex hfy-default-footer | 362 | @findex hfy-default-footer |
| @@ -383,20 +379,20 @@ Default value for @ref{hfy-page-footer} | |||
| 383 | @end lisp | 379 | @end lisp |
| 384 | 380 | ||
| 385 | Return a list of files under @var{directory}. | 381 | Return a list of files under @var{directory}. |
| 386 | Strips any leading "./" from each filename. | 382 | Strips any leading @samp{./} from each filename. |
| 387 | 383 | ||
| 388 | @item hfy-colour-vals | 384 | @item hfy-color-vals |
| 389 | @findex hfy-colour-vals | 385 | @findex hfy-color-vals |
| 390 | @anchor{hfy-colour-vals} | 386 | @anchor{hfy-color-vals} |
| 391 | 387 | ||
| 392 | @lisp | 388 | @lisp |
| 393 | 389 | ||
| 394 | (hfy-colour-vals @var{colour}) | 390 | (hfy-color-vals @var{color}) |
| 395 | @end lisp | 391 | @end lisp |
| 396 | 392 | ||
| 397 | Where @var{colour} is a colour name or #XXXXXX style triplet, return a list of | 393 | Where @var{color} is a color name or #XXXXXX style triplet, return a list of |
| 398 | 3 (16 bit) rgb values for said colour. If a window system is unavailable, | 394 | 3 (16 bit) rgb values for said color. If a window system is unavailable, |
| 399 | calls @ref{hfy-fallback-colour-values}. | 395 | calls @ref{hfy-fallback-color-values}. |
| 400 | 396 | ||
| 401 | @item hfy-href-stub | 397 | @item hfy-href-stub |
| 402 | @findex hfy-href-stub | 398 | @findex hfy-href-stub |
| @@ -407,17 +403,17 @@ calls @ref{hfy-fallback-colour-values}. | |||
| 407 | (hfy-href-stub @var{this-file} @var{def-files} @var{tag}) | 403 | (hfy-href-stub @var{this-file} @var{def-files} @var{tag}) |
| 408 | @end lisp | 404 | @end lisp |
| 409 | 405 | ||
| 410 | Return an href stub for a tag href: if @var{def-files} (list of files | 406 | Return an href stub for a tag href: if @var{def-files} (list of files |
| 411 | containing definitions for the tag in question) contains only one entry, | 407 | containing definitions for the tag in question) contains only one entry, |
| 412 | the href should link straight to that file. Otherwise, the link should | 408 | the href should link straight to that file. Otherwise, the link should |
| 413 | be to the index file. | 409 | be to the index file. |
| 414 | 410 | ||
| 415 | We are not yet concerned with the file extensions/tag line number and | 411 | We are not yet concerned with the file extensions/tag line number and |
| 416 | so on at this point. | 412 | so on at this point. |
| 417 | 413 | ||
| 418 | If @ref{hfy-split-index} is set, and the href wil be to an index file | 414 | If @ref{hfy-split-index} is set, and the href will be to an index file |
| 419 | rather than a source file, append a .X to @ref{hfy-index-file}, where | 415 | rather than a source file, append a @samp{.X} to @ref{hfy-index-file}, where |
| 420 | X is the uppercased first character of @var{tag}. | 416 | @samp{X} is the uppercased first character of @var{tag}. |
| 421 | 417 | ||
| 422 | See also: @ref{hfy-relstub}, @ref{hfy-index-file}. | 418 | See also: @ref{hfy-relstub}, @ref{hfy-index-file}. |
| 423 | 419 | ||
| @@ -441,7 +437,7 @@ Returns the line number of the point in the current buffer. | |||
| 441 | (hfy-merge-adjacent-spans @var{face-map}) | 437 | (hfy-merge-adjacent-spans @var{face-map}) |
| 442 | @end lisp | 438 | @end lisp |
| 443 | 439 | ||
| 444 | Where @var{face-map} is a @ref{hfy-facemap-assoc} for the current buffer, | 440 | Where @var{face-map} is a @ref{hfy-facemap-assoc} for the current buffer, |
| 445 | this function merges adjacent style blocks which are of the same value | 441 | this function merges adjacent style blocks which are of the same value |
| 446 | and are separated by nothing more interesting than whitespace. | 442 | and are separated by nothing more interesting than whitespace. |
| 447 | 443 | ||
| @@ -462,8 +458,8 @@ Returns a modified copy of @var{face-map} (also a @ref{hfy-facemap-assoc}). | |||
| 462 | (hfy-mark-tag-names @var{srcdir} @var{file}) | 458 | (hfy-mark-tag-names @var{srcdir} @var{file}) |
| 463 | @end lisp | 459 | @end lisp |
| 464 | 460 | ||
| 465 | Mark tags in @var{file} (lookup @var{srcdir} in @ref{hfy-tags-cache}) with the | 461 | Mark tags in @var{file} (lookup @var{srcdir} in @ref{hfy-tags-cache}) with the |
| 466 | 'hfy-anchor property, with a value of "tag.line-number". | 462 | @code{hfy-anchor} property, with a value of @samp{tag.line-number}. |
| 467 | 463 | ||
| 468 | @item hfy-weight | 464 | @item hfy-weight |
| 469 | @findex hfy-weight | 465 | @findex hfy-weight |
| @@ -474,7 +470,7 @@ Mark tags in @var{file} (lookup @var{srcdir} in @ref{hfy-tags-cache}) with the | |||
| 474 | (hfy-weight @var{weight}) | 470 | (hfy-weight @var{weight}) |
| 475 | @end lisp | 471 | @end lisp |
| 476 | 472 | ||
| 477 | Derive a font-weight css specifier from an emacs weight spec symbol. | 473 | Derive a font-weight CSS specifier from an Emacs weight specification symbol. |
| 478 | 474 | ||
| 479 | @item hfy-size | 475 | @item hfy-size |
| 480 | @findex hfy-size | 476 | @findex hfy-size |
| @@ -485,7 +481,7 @@ Derive a font-weight css specifier from an emacs weight spec symbol. | |||
| 485 | (hfy-size @var{height}) | 481 | (hfy-size @var{height}) |
| 486 | @end lisp | 482 | @end lisp |
| 487 | 483 | ||
| 488 | Derive a css font-size specifier from an emacs font :height attribute. | 484 | Derive a CSS font-size specifier from an Emacs font @code{:height} attribute. |
| 489 | Does not cope with the case where height is a function to be applied to | 485 | Does not cope with the case where height is a function to be applied to |
| 490 | the height of the underlying font. | 486 | the height of the underlying font. |
| 491 | 487 | ||
| @@ -509,7 +505,7 @@ Default value for @ref{hfy-page-header} | |||
| 509 | (hfy-family @var{family}) | 505 | (hfy-family @var{family}) |
| 510 | @end lisp | 506 | @end lisp |
| 511 | 507 | ||
| 512 | Derives a css font-family specifier from an emacs :family attribute. | 508 | Derives a CSS font-family specifier from an Emacs @code{:family} attribute. |
| 513 | 509 | ||
| 514 | @item hfy-mark-tag-hrefs | 510 | @item hfy-mark-tag-hrefs |
| 515 | @findex hfy-mark-tag-hrefs | 511 | @findex hfy-mark-tag-hrefs |
| @@ -520,13 +516,13 @@ Derives a css font-family specifier from an emacs :family attribute. | |||
| 520 | (hfy-mark-tag-hrefs @var{srcdir} @var{file}) | 516 | (hfy-mark-tag-hrefs @var{srcdir} @var{file}) |
| 521 | @end lisp | 517 | @end lisp |
| 522 | 518 | ||
| 523 | Mark href start points with the 'hfy-link prop (value: href string) | 519 | Mark href start points with the @code{hfy-link} property (value: href string). |
| 524 | 520 | ||
| 525 | Mark href end points with the 'hfy-endl prop (value t) | 521 | Mark href end points with the @code{hfy-endl} property (value @code{t}). |
| 526 | 522 | ||
| 527 | Avoid overlapping links, and mark links in descending length of | 523 | Avoid overlapping links, and mark links in descending length of |
| 528 | tag name in order to prevent subtags from usurping supertags, | 524 | tag name in order to prevent subtags from usurping supertags; |
| 529 | (eg "term" for "terminal"). | 525 | e.g., ``term'' for ``terminal''). |
| 530 | 526 | ||
| 531 | @item hfy-box | 527 | @item hfy-box |
| 532 | @findex hfy-box | 528 | @findex hfy-box |
| @@ -537,7 +533,7 @@ tag name in order to prevent subtags from usurping supertags, | |||
| 537 | (hfy-box @var{box}) | 533 | (hfy-box @var{box}) |
| 538 | @end lisp | 534 | @end lisp |
| 539 | 535 | ||
| 540 | Derive CSS border-* attributes from the emacs :box attribute. | 536 | Derive CSS border-* attributes from the Emacs @code{:box} attribute. |
| 541 | 537 | ||
| 542 | @item hfy-box-to-style | 538 | @item hfy-box-to-style |
| 543 | @findex hfy-box-to-style | 539 | @findex hfy-box-to-style |
| @@ -548,9 +544,9 @@ Derive CSS border-* attributes from the emacs :box attribute. | |||
| 548 | (hfy-box-to-style @var{spec}) | 544 | (hfy-box-to-style @var{spec}) |
| 549 | @end lisp | 545 | @end lisp |
| 550 | 546 | ||
| 551 | Convert a complex :box emacs font attribute set to a list of CSS border-* | 547 | Convert a complex @code{:box} Emacs font attribute set to a list of |
| 552 | attributes. Don't call this directly - it is called by @ref{hfy-box} | 548 | CSS border-* attributes. Don't call this directly---it is called by |
| 553 | when necessary. | 549 | @ref{hfy-box} when necessary. |
| 554 | 550 | ||
| 555 | @item hfy-html-enkludge-buffer | 551 | @item hfy-html-enkludge-buffer |
| 556 | @findex hfy-html-enkludge-buffer | 552 | @findex hfy-html-enkludge-buffer |
| @@ -561,7 +557,7 @@ when necessary. | |||
| 561 | (hfy-html-enkludge-buffer) | 557 | (hfy-html-enkludge-buffer) |
| 562 | @end lisp | 558 | @end lisp |
| 563 | 559 | ||
| 564 | Mark dangerous ["<>] characters with the 'hfy-quoteme property. | 560 | Mark dangerous @samp{["<>]} characters with the @code{hfy-quoteme} property. |
| 565 | 561 | ||
| 566 | See also @ref{hfy-html-dekludge-buffer}. | 562 | See also @ref{hfy-html-dekludge-buffer}. |
| 567 | 563 | ||
| @@ -574,8 +570,8 @@ See also @ref{hfy-html-dekludge-buffer}. | |||
| 574 | (hfy-buffer) | 570 | (hfy-buffer) |
| 575 | @end lisp | 571 | @end lisp |
| 576 | 572 | ||
| 577 | Generate and return an htmlfontify html output buffer for the current | 573 | Generate and return an Htmlfontify html output buffer for the current |
| 578 | buffer. May trample an existing buffer. | 574 | buffer. May trample an existing buffer. |
| 579 | 575 | ||
| 580 | @item hfy-fontified-p | 576 | @item hfy-fontified-p |
| 581 | @findex hfy-fontified-p | 577 | @findex hfy-fontified-p |
| @@ -586,9 +582,9 @@ buffer. May trample an existing buffer. | |||
| 586 | (hfy-fontified-p) | 582 | (hfy-fontified-p) |
| 587 | @end lisp | 583 | @end lisp |
| 588 | 584 | ||
| 589 | @code{font-lock} doesn't like to say a buffer's been fontified when in | 585 | @code{font-lock} doesn't like to say a buffer's been fontified when in |
| 590 | batch mode, but we want to know if we should fontify or raw copy, so in | 586 | batch mode, but we want to know if we should fontify or raw copy, so in |
| 591 | batch mode we check for non-default face properties. Otherwise we test | 587 | batch mode we check for non-default face properties. Otherwise we test |
| 592 | @code{font-lock-mode} and @code{font-lock-fontified} for truth. | 588 | @code{font-lock-mode} and @code{font-lock-fontified} for truth. |
| 593 | 589 | ||
| 594 | @item hfy-lookup | 590 | @item hfy-lookup |
| @@ -600,7 +596,7 @@ batch mode we check for non-default face properties. Otherwise we test | |||
| 600 | (hfy-lookup @var{face} @var{style}) | 596 | (hfy-lookup @var{face} @var{style}) |
| 601 | @end lisp | 597 | @end lisp |
| 602 | 598 | ||
| 603 | Where @var{style} is a @ref{hfy-sheet-assoc} and @var{face} is an emacs face, | 599 | Where @var{style} is a @ref{hfy-sheet-assoc} and @var{face} is an Emacs face, |
| 604 | return the relevant @var{css} style name. | 600 | return the relevant @var{css} style name. |
| 605 | 601 | ||
| 606 | @item hfy-fontify-buffer | 602 | @item hfy-fontify-buffer |
| @@ -612,18 +608,18 @@ return the relevant @var{css} style name. | |||
| 612 | (hfy-fontify-buffer &optional @var{srcdir} @var{file}) | 608 | (hfy-fontify-buffer &optional @var{srcdir} @var{file}) |
| 613 | @end lisp | 609 | @end lisp |
| 614 | 610 | ||
| 615 | Implement the guts of @ref{htmlfontify-buffer} | 611 | Implement the guts of @ref{htmlfontify-buffer}. |
| 616 | 612 | ||
| 617 | @item hfy-colour | 613 | @item hfy-color |
| 618 | @findex hfy-colour | 614 | @findex hfy-color |
| 619 | @anchor{hfy-colour} | 615 | @anchor{hfy-color} |
| 620 | 616 | ||
| 621 | @lisp | 617 | @lisp |
| 622 | 618 | ||
| 623 | (hfy-colour @var{colour}) | 619 | (hfy-color @var{color}) |
| 624 | @end lisp | 620 | @end lisp |
| 625 | 621 | ||
| 626 | Convert an emacs :foreground property to a CSS colour property. | 622 | Convert an Emacs :foreground property to a CSS color property. |
| 627 | 623 | ||
| 628 | @item hfy-flatten-style | 624 | @item hfy-flatten-style |
| 629 | @findex hfy-flatten-style | 625 | @findex hfy-flatten-style |
| @@ -634,10 +630,10 @@ Convert an emacs :foreground property to a CSS colour property. | |||
| 634 | (hfy-flatten-style @var{style}) | 630 | (hfy-flatten-style @var{style}) |
| 635 | @end lisp | 631 | @end lisp |
| 636 | 632 | ||
| 637 | Take @var{style} (see @ref{hfy-face-to-style-i}, @ref{hfy-face-to-style}) | 633 | Take @var{style} (see @ref{hfy-face-to-style-i}, @ref{hfy-face-to-style}) |
| 638 | and merge any multiple attributes appropriately. Currently only font-size is | 634 | and merge any multiple attributes appropriately. Currently only font-size is |
| 639 | merged down to a single occurrence - others may need special handling, but I | 635 | merged down to a single occurrence---others may need special handling, but I |
| 640 | haven't encountered them yet. Returns a @ref{hfy-style-assoc}. | 636 | haven't encountered them yet. Returns a @ref{hfy-style-assoc}. |
| 641 | 637 | ||
| 642 | @item hfy-size-to-int | 638 | @item hfy-size-to-int |
| 643 | @findex hfy-size-to-int | 639 | @findex hfy-size-to-int |
| @@ -648,8 +644,9 @@ haven't encountered them yet. Returns a @ref{hfy-style-assoc}. | |||
| 648 | (hfy-size-to-int @var{spec}) | 644 | (hfy-size-to-int @var{spec}) |
| 649 | @end lisp | 645 | @end lisp |
| 650 | 646 | ||
| 651 | Convert @var{spec}, a css font-size specifier, back to an emacs :height attribute | 647 | Convert @var{spec}, a CSS font-size specifier, back to an Emacs |
| 652 | value. Used while merging multiple font-size attributes. | 648 | @code{:height} attribute value. Used while merging multiple font-size |
| 649 | attributes. | ||
| 653 | 650 | ||
| 654 | @item hfy-sprintf-stylesheet | 651 | @item hfy-sprintf-stylesheet |
| 655 | @findex hfy-sprintf-stylesheet | 652 | @findex hfy-sprintf-stylesheet |
| @@ -660,8 +657,8 @@ value. Used while merging multiple font-size attributes. | |||
| 660 | (hfy-sprintf-stylesheet @var{css} @var{file}) | 657 | (hfy-sprintf-stylesheet @var{css} @var{file}) |
| 661 | @end lisp | 658 | @end lisp |
| 662 | 659 | ||
| 663 | Generates a header, via @ref{hfy-page-header}, for @var{file}, containing the | 660 | Generates a header, via @ref{hfy-page-header}, for @var{file}, containing the |
| 664 | stylesheet derived from @var{css}, which is a @ref{hfy-sheet-assoc}. Returns a | 661 | stylesheet derived from @var{css}, which is a @ref{hfy-sheet-assoc}. Returns a |
| 665 | string containing the same. | 662 | string containing the same. |
| 666 | 663 | ||
| 667 | @item hfy-relstub | 664 | @item hfy-relstub |
| @@ -673,8 +670,8 @@ string containing the same. | |||
| 673 | (hfy-relstub @var{file} &optional @var{start}) | 670 | (hfy-relstub @var{file} &optional @var{start}) |
| 674 | @end lisp | 671 | @end lisp |
| 675 | 672 | ||
| 676 | Return a "../" stub of the appropriate length for the current source | 673 | Return a @samp{../} stub of the appropriate length for the current source |
| 677 | tree depth (as determined from @var{file}). iyswim. | 674 | tree depth (as determined from @var{file}). @c iyswim. |
| 678 | 675 | ||
| 679 | @item hfy-compile-face-map | 676 | @item hfy-compile-face-map |
| 680 | @findex hfy-compile-face-map | 677 | @findex hfy-compile-face-map |
| @@ -708,9 +705,9 @@ Uses @ref{hfy-prepare-index-i} to do this. | |||
| 708 | (hfy-prepare-tag-map @var{srcdir} @var{dstdir}) | 705 | (hfy-prepare-tag-map @var{srcdir} @var{dstdir}) |
| 709 | @end lisp | 706 | @end lisp |
| 710 | 707 | ||
| 711 | Prepare the counterpart(s) to the index buffer(s) - a list of buffers with | 708 | Prepare the counterpart(s) to the index buffer(s)---a list of buffers with |
| 712 | the same structure, but listing ( and linking to ) instances of tags ( as | 709 | the same structure, but listing (and linking to) instances of tags (as |
| 713 | opposed to their definitions ). | 710 | opposed to their definitions). |
| 714 | 711 | ||
| 715 | See also: @ref{hfy-prepare-index}, @ref{hfy-split-index} | 712 | See also: @ref{hfy-prepare-index}, @ref{hfy-split-index} |
| 716 | 713 | ||
| @@ -723,7 +720,7 @@ See also: @ref{hfy-prepare-index}, @ref{hfy-split-index} | |||
| 723 | (hfy-subtract-maps @var{srcdir}) | 720 | (hfy-subtract-maps @var{srcdir}) |
| 724 | @end lisp | 721 | @end lisp |
| 725 | 722 | ||
| 726 | Internal function - strips definitions of tags from the instance map. | 723 | Internal function---strips definitions of tags from the instance map. |
| 727 | See: @ref{hfy-tags-cache} and @ref{hfy-tags-rmap} | 724 | See: @ref{hfy-tags-cache} and @ref{hfy-tags-rmap} |
| 728 | 725 | ||
| 729 | @item hfy-face-to-style-i | 726 | @item hfy-face-to-style-i |
| @@ -735,12 +732,12 @@ See: @ref{hfy-tags-cache} and @ref{hfy-tags-rmap} | |||
| 735 | (hfy-face-to-style-i @var{fn}) | 732 | (hfy-face-to-style-i @var{fn}) |
| 736 | @end lisp | 733 | @end lisp |
| 737 | 734 | ||
| 738 | The guts of @ref{hfy-face-to-style}: @var{fn} should be a @code{defface} | 735 | The guts of @ref{hfy-face-to-style}. @var{fn} should be a @code{defface} |
| 739 | font specification, as returned by @code{face-attr-construct} or | 736 | font specification, as returned by @code{face-attr-construct} or |
| 740 | @ref{hfy-face-attr-for-class}. Note that this function does not get | 737 | @ref{hfy-face-attr-for-class}. Note that this function does not get |
| 741 | font-sizes right if they are based on inherited modifiers (via the | 738 | font-sizes right if they are based on inherited modifiers (via the |
| 742 | :inherit) attribute, and any other modifiers that are cumulative if they | 739 | :inherit) attribute, and any other modifiers that are cumulative if they |
| 743 | appear multiple times need to be merged by the user - @ref{hfy-flatten-style} | 740 | appear multiple times need to be merged by the user---@ref{hfy-flatten-style} |
| 744 | should do this. | 741 | should do this. |
| 745 | 742 | ||
| 746 | @item hfy-face-to-css | 743 | @item hfy-face-to-css |
| @@ -752,7 +749,7 @@ should do this. | |||
| 752 | (hfy-face-to-css @var{fn}) | 749 | (hfy-face-to-css @var{fn}) |
| 753 | @end lisp | 750 | @end lisp |
| 754 | 751 | ||
| 755 | Take @var{fn}, a font or @code{defface} specification (cf. | 752 | Take @var{fn}, a font or @code{defface} specification (c.f. |
| 756 | @code{face-attr-construct}) and return a CSS style specification. | 753 | @code{face-attr-construct}) and return a CSS style specification. |
| 757 | 754 | ||
| 758 | See also: @ref{hfy-face-to-style} | 755 | See also: @ref{hfy-face-to-style} |
| @@ -766,7 +763,8 @@ See also: @ref{hfy-face-to-style} | |||
| 766 | (hfy-html-quote @var{char-string}) | 763 | (hfy-html-quote @var{char-string}) |
| 767 | @end lisp | 764 | @end lisp |
| 768 | 765 | ||
| 769 | Map a string (usu. 1 char long) to an html safe string (entity) if need be. | 766 | Map a string (usually 1 character long) to an html safe string |
| 767 | (entity) if need be. | ||
| 770 | 768 | ||
| 771 | @item hfy-link-style | 769 | @item hfy-link-style |
| 772 | @findex hfy-link-style | 770 | @findex hfy-link-style |
| @@ -777,7 +775,7 @@ Map a string (usu. 1 char long) to an html safe string (entity) if need be. | |||
| 777 | (hfy-link-style @var{style-string}) | 775 | (hfy-link-style @var{style-string}) |
| 778 | @end lisp | 776 | @end lisp |
| 779 | 777 | ||
| 780 | Convert the CSS style spec @var{style-string} to it's equivalent | 778 | Convert the CSS style spec @var{style-string} to its equivalent |
| 781 | hyperlink style. | 779 | hyperlink style. |
| 782 | 780 | ||
| 783 | See: @ref{hfy-link-style-fun}. | 781 | See: @ref{hfy-link-style-fun}. |
| @@ -791,7 +789,7 @@ See: @ref{hfy-link-style-fun}. | |||
| 791 | (hfy-p-to-face @var{props}) | 789 | (hfy-p-to-face @var{props}) |
| 792 | @end lisp | 790 | @end lisp |
| 793 | 791 | ||
| 794 | Given @var{props}, a list of text-properties, return the value of the | 792 | Given @var{props}, a list of text-properties, return the value of the |
| 795 | face property, or nil. | 793 | face property, or nil. |
| 796 | 794 | ||
| 797 | @item hfy-box-to-border-assoc | 795 | @item hfy-box-to-border-assoc |
| @@ -814,18 +812,18 @@ Helper function for @ref{hfy-box-to-style}. | |||
| 814 | (hfy-face-attr-for-class @var{face} &optional @var{class}) | 812 | (hfy-face-attr-for-class @var{face} &optional @var{class}) |
| 815 | @end lisp | 813 | @end lisp |
| 816 | 814 | ||
| 817 | Return the face attributes for @var{face}. If @var{class} is set, it | 815 | Return the face attributes for @var{face}. If @var{class} is set, it |
| 818 | must be a @code{defface} alist key [see below]. Prior to version 0.18, | 816 | must be a @code{defface} alist key [see below]. Prior to version 0.18, |
| 819 | the first face specification returned by @ref{hfy-combined-face-spec} | 817 | the first face specification returned by @ref{hfy-combined-face-spec} |
| 820 | which @emph{didn't} clash with @var{class} was returned. In versions | 818 | which @emph{didn't} clash with @var{class} was returned. In versions |
| 821 | from 0.18 onwards, each font attribute list is scored, and the | 819 | from 0.18 onwards, each font attribute list is scored, and the |
| 822 | non-conflicting list with the highest score is returned. ( A specification | 820 | non-conflicting list with the highest score is returned. (A specification |
| 823 | with a class of @code{t} is considered to match any class you specify: | 821 | with a class of @code{t} is considered to match any class you specify. |
| 824 | This matches emacs' behaviour when deciding on which face attributes to | 822 | This matches Emacs's behaviour when deciding on which face attributes to |
| 825 | use, to the best of my understanding ). | 823 | use, to the best of my understanding ). |
| 826 | 824 | ||
| 827 | If @var{class} is nil, then you just get get whatever | 825 | If @var{class} is nil, then you just get get whatever |
| 828 | @code{face-attr-construct} returns, ie the current specification in | 826 | @code{face-attr-construct} returns; i.e., the current specification in |
| 829 | effect for @var{face}. | 827 | effect for @var{face}. |
| 830 | 828 | ||
| 831 | See @ref{hfy-display-class} for details of valid values for @var{class}. | 829 | See @ref{hfy-display-class} for details of valid values for @var{class}. |
| @@ -839,7 +837,7 @@ See @ref{hfy-display-class} for details of valid values for @var{class}. | |||
| 839 | (hfy-face-at P) | 837 | (hfy-face-at P) |
| 840 | @end lisp | 838 | @end lisp |
| 841 | 839 | ||
| 842 | Find face in effect at point P. If overlays are to be considered | 840 | Find face in effect at point P. If overlays are to be considered |
| 843 | (see @ref{hfy-optimisations}) then this may return a @code{defface} style | 841 | (see @ref{hfy-optimisations}) then this may return a @code{defface} style |
| 844 | list of face properties instead of a face symbol. | 842 | list of face properties instead of a face symbol. |
| 845 | 843 | ||
| @@ -849,10 +847,10 @@ list of face properties instead of a face symbol. | |||
| 849 | 847 | ||
| 850 | @lisp | 848 | @lisp |
| 851 | 849 | ||
| 852 | (hfy-bgcol @var{colour}) | 850 | (hfy-bgcol @var{color}) |
| 853 | @end lisp | 851 | @end lisp |
| 854 | 852 | ||
| 855 | As per @ref{hfy-colour} but for background colours. | 853 | As per @ref{hfy-color} but for background colors. |
| 856 | 854 | ||
| 857 | @item hfy-kludge-cperl-mode | 855 | @item hfy-kludge-cperl-mode |
| 858 | @findex hfy-kludge-cperl-mode | 856 | @findex hfy-kludge-cperl-mode |
| @@ -864,7 +862,7 @@ As per @ref{hfy-colour} but for background colours. | |||
| 864 | @end lisp | 862 | @end lisp |
| 865 | 863 | ||
| 866 | cperl mode does its damndest not to do some of its fontification when not | 864 | cperl mode does its damndest not to do some of its fontification when not |
| 867 | in a windowing system - we try to trick it... | 865 | in a windowing system---we try to trick it@dots{} |
| 868 | 866 | ||
| 869 | @item hfy-href | 867 | @item hfy-href |
| 870 | @findex hfy-href | 868 | @findex hfy-href |
| @@ -893,7 +891,7 @@ Return a relative href to the tag in question, based on | |||
| 893 | (hfy-shell) | 891 | (hfy-shell) |
| 894 | @end lisp | 892 | @end lisp |
| 895 | 893 | ||
| 896 | Returns a best guess at a bourne compatible shell to use: If the current | 894 | Returns a best guess at a Bourne compatible shell to use: If the current |
| 897 | shell doesn't look promising, fall back to @ref{hfy-shell-file-name}. | 895 | shell doesn't look promising, fall back to @ref{hfy-shell-file-name}. |
| 898 | 896 | ||
| 899 | @item hfy-load-tags-cache | 897 | @item hfy-load-tags-cache |
| @@ -928,7 +926,7 @@ Parse a @var{buffer} containing etags formatted output, loading the | |||
| 928 | (hfy-interq @var{set-a} @var{set-b}) | 926 | (hfy-interq @var{set-a} @var{set-b}) |
| 929 | @end lisp | 927 | @end lisp |
| 930 | 928 | ||
| 931 | Return the intersection ( using @code{eq} ) of 2 lists. | 929 | Return the intersection (using @code{eq}) of 2 lists. |
| 932 | 930 | ||
| 933 | @item hfy-text-p | 931 | @item hfy-text-p |
| 934 | @findex hfy-text-p | 932 | @findex hfy-text-p |
| @@ -939,7 +937,7 @@ Return the intersection ( using @code{eq} ) of 2 lists. | |||
| 939 | (hfy-text-p @var{srcdir} @var{file}) | 937 | (hfy-text-p @var{srcdir} @var{file}) |
| 940 | @end lisp | 938 | @end lisp |
| 941 | 939 | ||
| 942 | Is @var{srcdir}/@var{file} text? Uses @ref{hfy-istext-command} to determine this. | 940 | Is @var{srcdir}/@var{file} text? Uses @ref{hfy-istext-command} to determine this. |
| 943 | 941 | ||
| 944 | @item hfy-opt | 942 | @item hfy-opt |
| 945 | @findex hfy-opt | 943 | @findex hfy-opt |
| @@ -961,8 +959,8 @@ Is @ref{hfy-optimisations} member @var{symbol} set or not? | |||
| 961 | (hfy-dirname @var{file}) | 959 | (hfy-dirname @var{file}) |
| 962 | @end lisp | 960 | @end lisp |
| 963 | 961 | ||
| 964 | Return everything preceding the last "/" from a relative filename, | 962 | Return everything preceding the last @samp{/} from a relative filename, |
| 965 | on the assumption that this will produce a relative directory name. Hardly | 963 | on the assumption that this will produce a relative directory name. Hardly |
| 966 | bombproof, but good enough in the context in which it is being used. | 964 | bombproof, but good enough in the context in which it is being used. |
| 967 | 965 | ||
| 968 | @item hfy-html-dekludge-buffer | 966 | @item hfy-html-dekludge-buffer |
| @@ -974,7 +972,7 @@ bombproof, but good enough in the context in which it is being used. | |||
| 974 | (hfy-html-dekludge-buffer) | 972 | (hfy-html-dekludge-buffer) |
| 975 | @end lisp | 973 | @end lisp |
| 976 | 974 | ||
| 977 | Transform all dangerous characters marked with the 'hfy-quoteme property | 975 | Transform all dangerous characters marked with the @code{hfy-quoteme} property |
| 978 | using @ref{hfy-html-quote} | 976 | using @ref{hfy-html-quote} |
| 979 | 977 | ||
| 980 | See also @ref{hfy-html-enkludge-buffer}. | 978 | See also @ref{hfy-html-enkludge-buffer}. |
| @@ -988,9 +986,9 @@ See also @ref{hfy-html-enkludge-buffer}. | |||
| 988 | (hfy-copy-and-fontify-file @var{srcdir} @var{dstdir} @var{file}) | 986 | (hfy-copy-and-fontify-file @var{srcdir} @var{dstdir} @var{file}) |
| 989 | @end lisp | 987 | @end lisp |
| 990 | 988 | ||
| 991 | open @var{file} in @var{srcdir} - if fontified, write a fontified copy to @var{dstdir} | 989 | Open @var{file} in @var{srcdir}---if fontified, write a fontified copy to @var{dstdir} |
| 992 | adding an extension of @ref{hfy-extn}. Fontification is actually done by | 990 | adding an extension of @ref{hfy-extn}. Fontification is actually done by |
| 993 | @ref{htmlfontify-buffer}. If the buffer is not fontified, just copy it. | 991 | @ref{htmlfontify-buffer}. If the buffer is not fontified, just copy it. |
| 994 | 992 | ||
| 995 | @item hfy-decor | 993 | @item hfy-decor |
| 996 | @findex hfy-decor | 994 | @findex hfy-decor |
| @@ -1001,7 +999,7 @@ adding an extension of @ref{hfy-extn}. Fontification is actually done by | |||
| 1001 | (hfy-decor @var{tag} @var{val}) | 999 | (hfy-decor @var{tag} @var{val}) |
| 1002 | @end lisp | 1000 | @end lisp |
| 1003 | 1001 | ||
| 1004 | Derive CSS text-decoration specifiers from various emacs font attributes. | 1002 | Derive CSS text-decoration specifiers from various Emacs font attributes. |
| 1005 | 1003 | ||
| 1006 | @item hfy-slant | 1004 | @item hfy-slant |
| 1007 | @findex hfy-slant | 1005 | @findex hfy-slant |
| @@ -1012,9 +1010,9 @@ Derive CSS text-decoration specifiers from various emacs font attributes. | |||
| 1012 | (hfy-slant @var{slant}) | 1010 | (hfy-slant @var{slant}) |
| 1013 | @end lisp | 1011 | @end lisp |
| 1014 | 1012 | ||
| 1015 | Derive a font-style css specifier from the emacs :slant attribute - | 1013 | Derive a font-style CSS specifier from the Emacs :slant |
| 1016 | CSS does not define the reverse-* styles, so just maps those to the | 1014 | attribute---CSS does not define the reverse-* styles, so just maps |
| 1017 | regular specifiers. | 1015 | those to the regular specifiers. |
| 1018 | 1016 | ||
| 1019 | @item hfy-tags-for-file | 1017 | @item hfy-tags-for-file |
| 1020 | @findex hfy-tags-for-file | 1018 | @findex hfy-tags-for-file |
| @@ -1025,7 +1023,7 @@ regular specifiers. | |||
| 1025 | (hfy-tags-for-file @var{srcdir} @var{file}) | 1023 | (hfy-tags-for-file @var{srcdir} @var{file}) |
| 1026 | @end lisp | 1024 | @end lisp |
| 1027 | 1025 | ||
| 1028 | List of etags tags that have definitions in this @var{file}. Looks up | 1026 | List of etags tags that have definitions in this @var{file}. Looks up |
| 1029 | the tags cache in @ref{hfy-tags-cache} using @var{srcdir} as the key. | 1027 | the tags cache in @ref{hfy-tags-cache} using @var{srcdir} as the key. |
| 1030 | 1028 | ||
| 1031 | @item hfy-width | 1029 | @item hfy-width |
| @@ -1037,16 +1035,16 @@ the tags cache in @ref{hfy-tags-cache} using @var{srcdir} as the key. | |||
| 1037 | (hfy-width @var{width}) | 1035 | (hfy-width @var{width}) |
| 1038 | @end lisp | 1036 | @end lisp |
| 1039 | 1037 | ||
| 1040 | Convert an emacs :width attribute to a CSS font-stretch attribute. | 1038 | Convert an Emacs @code{:width} attribute to a CSS font-stretch attribute. |
| 1041 | 1039 | ||
| 1042 | @comment /AUTOGENERATED BLOCK | 1040 | @comment /AUTOGENERATED BLOCK |
| 1043 | @end table | 1041 | @end table |
| 1044 | 1042 | ||
| 1045 | @node Variables, Data Structures, Non-interactive, Usage & Examples | 1043 | @node Variables |
| 1046 | @section Variables | 1044 | @section Variables |
| 1047 | @cindex variables | 1045 | @cindex variables |
| 1048 | 1046 | ||
| 1049 | Important variables which are not customisation items: | 1047 | Important variables that are not customisation items: |
| 1050 | 1048 | ||
| 1051 | @table @code | 1049 | @table @code |
| 1052 | 1050 | ||
| @@ -1057,16 +1055,16 @@ Important variables which are not customisation items: | |||
| 1057 | This is an alist of the form: | 1055 | This is an alist of the form: |
| 1058 | 1056 | ||
| 1059 | @example | 1057 | @example |
| 1060 | (("/src/dir/0" . tag-hash0) ("/src/dir/1" tag-hash1) ...) | 1058 | (("/src/dir/0" . tag-hash0) ("/src/dir/1" tag-hash1) @dots{} ) |
| 1061 | @end example | 1059 | @end example |
| 1062 | 1060 | ||
| 1063 | Each tag hash entry then contains entries of the form: | 1061 | Each tag hash entry then contains entries of the form: |
| 1064 | 1062 | ||
| 1065 | @example | 1063 | @example |
| 1066 | "tag_string" => (("file/name.ext" line char) ... ) | 1064 | "tag_string" => (("file/name.ext" line char) @dots{} ) |
| 1067 | @end example | 1065 | @end example |
| 1068 | 1066 | ||
| 1069 | ie an alist mapping (relative) file paths to line and character offsets. | 1067 | i.e., an alist mapping (relative) file paths to line and character offsets. |
| 1070 | 1068 | ||
| 1071 | See @ref{hfy-load-tags-cache}. | 1069 | See @ref{hfy-load-tags-cache}. |
| 1072 | 1070 | ||
| @@ -1096,7 +1094,7 @@ tagged items, not the locations of their definitions. | |||
| 1096 | @code{hfy-tags-sortl} is an alist of the form: | 1094 | @code{hfy-tags-sortl} is an alist of the form: |
| 1097 | 1095 | ||
| 1098 | @example | 1096 | @example |
| 1099 | (("/src/dir" . (tag0 tag1 tag2)) ... ) | 1097 | (("/src/dir" . (tag0 tag1 tag2)) @dots{} ) |
| 1100 | @end example | 1098 | @end example |
| 1101 | 1099 | ||
| 1102 | Where the tags are stored in descending order of length. | 1100 | Where the tags are stored in descending order of length. |
| @@ -1105,7 +1103,7 @@ See: @ref{hfy-load-tags-cache}. | |||
| 1105 | 1103 | ||
| 1106 | @end table | 1104 | @end table |
| 1107 | 1105 | ||
| 1108 | @node Data Structures, Examples, Variables, Usage & Examples | 1106 | @node Data Structures |
| 1109 | @section Data Structures | 1107 | @section Data Structures |
| 1110 | @cindex Data Structures | 1108 | @cindex Data Structures |
| 1111 | 1109 | ||
| @@ -1117,11 +1115,11 @@ Some of the (informal) data structures used in Htmlfontify are detailed here: | |||
| 1117 | @cindex hfy-style-assoc | 1115 | @cindex hfy-style-assoc |
| 1118 | @anchor{hfy-style-assoc} | 1116 | @anchor{hfy-style-assoc} |
| 1119 | 1117 | ||
| 1120 | An assoc representing/describing an emacs face. Properties may be repeated, | 1118 | An assoc representing/describing an Emacs face. Properties may be repeated, |
| 1121 | In which case later properties should be treated as if they were inherited | 1119 | in which case later properties should be treated as if they were inherited |
| 1122 | from a 'parent' font. (For some properties, only the first encountered value | 1120 | from a ``parent'' font. (For some properties, only the first encountered value |
| 1123 | is of any importance, for others the values might be cumulative, and for | 1121 | is of any importance, for others the values might be cumulative, and for |
| 1124 | others they might be cumulative in a complex way). | 1122 | others they might be cumulative in a complex way.) |
| 1125 | 1123 | ||
| 1126 | Some examples: | 1124 | Some examples: |
| 1127 | 1125 | ||
| @@ -1149,7 +1147,7 @@ Some examples: | |||
| 1149 | @cindex hfy-sheet-assoc | 1147 | @cindex hfy-sheet-assoc |
| 1150 | @anchor{hfy-sheet-assoc} | 1148 | @anchor{hfy-sheet-assoc} |
| 1151 | 1149 | ||
| 1152 | An assoc with elements of the form (face-name style-name . stlye-string): | 1150 | An assoc with elements of the form @samp{(face-name style-name . style-string)}. |
| 1153 | The actual stylesheet for each page is derived from one of these. | 1151 | The actual stylesheet for each page is derived from one of these. |
| 1154 | 1152 | ||
| 1155 | @lisp | 1153 | @lisp |
| @@ -1157,18 +1155,19 @@ The actual stylesheet for each page is derived from one of these. | |||
| 1157 | (font-lock-string-face "string" . "@{ color: rgb(64,224,208) @}")) | 1155 | (font-lock-string-face "string" . "@{ color: rgb(64,224,208) @}")) |
| 1158 | @end lisp | 1156 | @end lisp |
| 1159 | 1157 | ||
| 1160 | @item hfy-facemap-assoc | 1158 | @item hfy-facemap-assoc |
| 1161 | @cindex hfy-facemap-assoc | 1159 | @cindex hfy-facemap-assoc |
| 1162 | @anchor{hfy-facemap-assoc} | 1160 | @anchor{hfy-facemap-assoc} |
| 1163 | 1161 | ||
| 1164 | An assoc of (point . @var{face-symbol}) or | 1162 | An assoc of @code{(point . @var{face-symbol})} or |
| 1165 | (point . @code{defface} attribute list) and (point . 'end) elements, in | 1163 | @code{(point . @code{defface} attribute list)} and @code{(point |
| 1166 | descending order of point value (ie from the file's end to its beginning). | 1164 | . end)} elements, in descending order of point value (i.e., from the |
| 1167 | The map is in reverse order because inserting a <style> tag (or any other | 1165 | file's end to its beginning). The map is in reverse order because |
| 1168 | string) at @var{point} invalidates the map for all entries with a greater | 1166 | inserting a @samp{<style>} tag (or any other string) at @var{point} |
| 1169 | value of point. By traversing the map from greatest to least @var{point}, | 1167 | invalidates the map for all entries with a greater value of point. By |
| 1170 | we still invalidate the map as we go, but only those points we have already | 1168 | traversing the map from greatest to least @var{point}, we still |
| 1171 | dealt with ( and therefore no longer care about ) will be invalid at any | 1169 | invalidate the map as we go, but only those points we have already |
| 1170 | dealt with (and therefore no longer care about) will be invalid at any | ||
| 1172 | time. | 1171 | time. |
| 1173 | 1172 | ||
| 1174 | @lisp | 1173 | @lisp |
| @@ -1179,7 +1178,7 @@ time. | |||
| 1179 | (64630 . end) | 1178 | (64630 . end) |
| 1180 | (64623 . font-lock-string-face) | 1179 | (64623 . font-lock-string-face) |
| 1181 | (64449 . end) | 1180 | (64449 . end) |
| 1182 | ;; big similar section elided. You get the idea. | 1181 | ;; Big similar section elided. You get the idea. |
| 1183 | (5459 . end) | 1182 | (5459 . end) |
| 1184 | (5431 . (:inherit font-lock-keyword-face :background "7e7e7e")) | 1183 | (5431 . (:inherit font-lock-keyword-face :background "7e7e7e")) |
| 1185 | (5431 . end) | 1184 | (5431 . end) |
| @@ -1194,18 +1193,18 @@ time. | |||
| 1194 | 1193 | ||
| 1195 | @end table | 1194 | @end table |
| 1196 | 1195 | ||
| 1197 | @node Examples, , Data Structures, Usage & Examples | 1196 | @node Examples |
| 1198 | @section Examples | 1197 | @section Examples |
| 1199 | @cindex Examples | 1198 | @cindex Examples |
| 1200 | 1199 | ||
| 1201 | The following is a lump of code I use to fontify source code on my | 1200 | The following is a lump of code I use to fontify source code on my |
| 1202 | site, @url{http://rtfm.etla.org/} ( which was the reason, incidentally, | 1201 | site, @url{http://rtfm.etla.org/} (which was the reason, incidentally, |
| 1203 | that htmlfontify was written in the first place ). | 1202 | that Htmlfontify was written in the first place). |
| 1204 | 1203 | ||
| 1205 | @lisp | 1204 | @lisp |
| 1206 | (defvar rtfm-section nil) | 1205 | (defvar rtfm-section nil) |
| 1207 | 1206 | ||
| 1208 | ;; constructs an appropriate header string to fit in with rtfm's | 1207 | ;; Constructs an appropriate header string to fit in with rtfm's |
| 1209 | ;; templating system, based on the file and the stylesheet string | 1208 | ;; templating system, based on the file and the stylesheet string |
| 1210 | (defun rtfm-build-page-header (file style) | 1209 | (defun rtfm-build-page-header (file style) |
| 1211 | (format "#define TEMPLATE red+black.html | 1210 | (format "#define TEMPLATE red+black.html |
| @@ -1213,7 +1212,7 @@ that htmlfontify was written in the first place ). | |||
| 1213 | #include <build/menu-dirlist|>\n | 1212 | #include <build/menu-dirlist|>\n |
| 1214 | html-css-url := /css/red+black.css | 1213 | html-css-url := /css/red+black.css |
| 1215 | title := rtfm.etla.org ( %s / src/%s ) | 1214 | title := rtfm.etla.org ( %s / src/%s ) |
| 1216 | bodytag := | 1215 | bodytag := |
| 1217 | head <=STYLESHEET;\n | 1216 | head <=STYLESHEET;\n |
| 1218 | %s | 1217 | %s |
| 1219 | STYLESHEET | 1218 | STYLESHEET |
| @@ -1233,7 +1232,7 @@ main-content <=MAIN_CONTENT;\n" rtfm-section file style rtfm-section file)) | |||
| 1233 | ) | 1232 | ) |
| 1234 | ) | 1233 | ) |
| 1235 | 1234 | ||
| 1236 | ;; here's the function I catually call - it asks me for a section label, | 1235 | ;; Here's the function I actually call---it asks me for a section label, |
| 1237 | ;; and source and destination directories, and then binds a couple of | 1236 | ;; and source and destination directories, and then binds a couple of |
| 1238 | ;; customisation variable in a let before calling htmlfontify: | 1237 | ;; customisation variable in a let before calling htmlfontify: |
| 1239 | (defun rtfm-build-source-docs (section srcdir destdir) | 1238 | (defun rtfm-build-source-docs (section srcdir destdir) |
| @@ -1253,7 +1252,7 @@ main-content <=MAIN_CONTENT;\n" rtfm-section file style rtfm-section file)) | |||
| 1253 | (htmlfontify-copy-and-link-dir srcdir destdir ".src" ".html"))) | 1252 | (htmlfontify-copy-and-link-dir srcdir destdir ".src" ".html"))) |
| 1254 | @end lisp | 1253 | @end lisp |
| 1255 | 1254 | ||
| 1256 | @node Customisation, Requirements, Usage & Examples, Top | 1255 | @node Customisation |
| 1257 | @chapter Customisation | 1256 | @chapter Customisation |
| 1258 | @cindex variables (customisation) | 1257 | @cindex variables (customisation) |
| 1259 | 1258 | ||
| @@ -1267,7 +1266,7 @@ Htmlfontify provides the following variable and customisation entries: | |||
| 1267 | @anchor{hfy-link-style-fun} | 1266 | @anchor{hfy-link-style-fun} |
| 1268 | 1267 | ||
| 1269 | Set this to a function, which will be called with one argument | 1268 | Set this to a function, which will be called with one argument |
| 1270 | (a "@{ foo: bar; ...@}" css style-string) - it should return a copy of | 1269 | (a @samp{@{ foo: bar; @dots{}@}} CSS style-string)---it should return a copy of |
| 1271 | its argument, altered so as to make any changes you want made for text which | 1270 | its argument, altered so as to make any changes you want made for text which |
| 1272 | is a hyperlink, in addition to being in the class to which that style would | 1271 | is a hyperlink, in addition to being in the class to which that style would |
| 1273 | normally be applied. | 1272 | normally be applied. |
| @@ -1277,7 +1276,7 @@ normally be applied. | |||
| 1277 | @anchor{hfy-html-quote-regex} | 1276 | @anchor{hfy-html-quote-regex} |
| 1278 | 1277 | ||
| 1279 | Regex to match (with a single back-reference per match) strings in HTML | 1278 | Regex to match (with a single back-reference per match) strings in HTML |
| 1280 | which should be quoted with @ref{hfy-html-quote} | 1279 | which should be quoted with @ref{hfy-html-quote} |
| 1281 | (and @pxref{hfy-html-quote-map}) to make them safe. | 1280 | (and @pxref{hfy-html-quote-map}) to make them safe. |
| 1282 | 1281 | ||
| 1283 | @item hfy-page-footer | 1282 | @item hfy-page-footer |
| @@ -1292,8 +1291,8 @@ As @ref{hfy-page-header}, but generates the output footer | |||
| 1292 | @anchor{hfy-display-class} | 1291 | @anchor{hfy-display-class} |
| 1293 | 1292 | ||
| 1294 | Display class to use to determine which display class to use when | 1293 | Display class to use to determine which display class to use when |
| 1295 | calculating a face's attributes. This is useful when, for example, you | 1294 | calculating a face's attributes. This is useful when, for example, you |
| 1296 | are running emacs on a tty or in batch mode, and want htmlfontify to have | 1295 | are running Emacs on a tty or in batch mode, and want Htmlfontify to have |
| 1297 | access to the face spec you would use if you were connected to an X display. | 1296 | access to the face spec you would use if you were connected to an X display. |
| 1298 | 1297 | ||
| 1299 | Some valid class specification elements are: | 1298 | Some valid class specification elements are: |
| @@ -1329,8 +1328,9 @@ and so on. | |||
| 1329 | 1328 | ||
| 1330 | Function called with two arguments (the filename relative to the top | 1329 | Function called with two arguments (the filename relative to the top |
| 1331 | level source directory being etag'd and fontified), and a string containing | 1330 | level source directory being etag'd and fontified), and a string containing |
| 1332 | the <style>...</style> text to embed in the document- the string returned will | 1331 | the @samp{<style>@dots{}</style>} text to embed in the document---the string |
| 1333 | be used as the header for the htmlfontified version of the source file. | 1332 | returned will be used as the header for the htmlfontified version of |
| 1333 | the source file. | ||
| 1334 | 1334 | ||
| 1335 | See also: @ref{hfy-page-footer} | 1335 | See also: @ref{hfy-page-footer} |
| 1336 | 1336 | ||
| @@ -1338,7 +1338,7 @@ See also: @ref{hfy-page-footer} | |||
| 1338 | @vindex hfy-src-doc-link-style | 1338 | @vindex hfy-src-doc-link-style |
| 1339 | @anchor{hfy-src-doc-link-style} | 1339 | @anchor{hfy-src-doc-link-style} |
| 1340 | 1340 | ||
| 1341 | String to add to the '<style> a' variant of an htmlfontify css class. | 1341 | String to add to the @samp{<style> a} variant of an Htmlfontify CSS class. |
| 1342 | 1342 | ||
| 1343 | @item hfy-fast-lock-save | 1343 | @item hfy-fast-lock-save |
| 1344 | @vindex hfy-fast-lock-save | 1344 | @vindex hfy-fast-lock-save |
| @@ -1352,8 +1352,8 @@ Only buffers more than this can have associated Font Lock cache files saved. | |||
| 1352 | 1352 | ||
| 1353 | If nil, means cache files are never created. | 1353 | If nil, means cache files are never created. |
| 1354 | 1354 | ||
| 1355 | If a list, each element should be a cons pair of the form | 1355 | If a list, each element should be a cons pair of the form |
| 1356 | @code{(@var{major-mode} . @var{size})}, where @var{major-mode} | 1356 | @code{(@var{major-mode} . @var{size})}, where @var{major-mode} |
| 1357 | is a symbol or t (meaning the default). For example: | 1357 | is a symbol or t (meaning the default). For example: |
| 1358 | 1358 | ||
| 1359 | @lisp | 1359 | @lisp |
| @@ -1363,14 +1363,14 @@ is a symbol or t (meaning the default). For example: | |||
| 1363 | @end lisp | 1363 | @end lisp |
| 1364 | 1364 | ||
| 1365 | means that the minimum size is 25K for buffers in C or C++ modes, one megabyte | 1365 | means that the minimum size is 25K for buffers in C or C++ modes, one megabyte |
| 1366 | for buffers in Rmail mode, and size is irrelevant (ie no saves) otherwise. | 1366 | for buffers in Rmail mode, and size is irrelevant (i.e., no saves) otherwise. |
| 1367 | 1367 | ||
| 1368 | @item hfy-split-index | 1368 | @item hfy-split-index |
| 1369 | @vindex hfy-split-index | 1369 | @vindex hfy-split-index |
| 1370 | @anchor{hfy-split-index} | 1370 | @anchor{hfy-split-index} |
| 1371 | 1371 | ||
| 1372 | Whether or not to split the index @ref{hfy-index-file} alphabetically | 1372 | Whether or not to split the index @ref{hfy-index-file} alphabetically |
| 1373 | on the first letter of each tag. Useful when the index would otherwise | 1373 | on the first letter of each tag. Useful when the index would otherwise |
| 1374 | be large and take a long time to render or be difficult to navigate. | 1374 | be large and take a long time to render or be difficult to navigate. |
| 1375 | 1375 | ||
| 1376 | @item hfy-find-cmd | 1376 | @item hfy-find-cmd |
| @@ -1389,12 +1389,12 @@ File extension used for output files | |||
| 1389 | @vindex hfy-default-face-def | 1389 | @vindex hfy-default-face-def |
| 1390 | @anchor{hfy-default-face-def} | 1390 | @anchor{hfy-default-face-def} |
| 1391 | 1391 | ||
| 1392 | Fallback @code{defface} specification for the face @code{default}, used | 1392 | Fallback @code{defface} specification for the face @code{default}, used |
| 1393 | when @ref{hfy-display-class} has been set ( the normal htmlfontify way of | 1393 | when @ref{hfy-display-class} has been set (the normal Htmlfontify way of |
| 1394 | extracting potentially non-current face information doesn't necessarily | 1394 | extracting potentially non-current face information doesn't necessarily |
| 1395 | work for @code{default} ). | 1395 | work for @code{default}). |
| 1396 | 1396 | ||
| 1397 | Example: I customise this to: | 1397 | For example, I customise this to: |
| 1398 | 1398 | ||
| 1399 | @lisp | 1399 | @lisp |
| 1400 | ((t :background "black" :foreground "white" :family "misc-fixed")) | 1400 | ((t :background "black" :foreground "white" :family "misc-fixed")) |
| @@ -1412,20 +1412,20 @@ when not running under a window system. | |||
| 1412 | @vindex hfy-shell-file-name | 1412 | @vindex hfy-shell-file-name |
| 1413 | @anchor{hfy-shell-file-name} | 1413 | @anchor{hfy-shell-file-name} |
| 1414 | 1414 | ||
| 1415 | Should be set to a bourne compatible shell, which will be invoked | 1415 | Should be set to a Bourne compatible shell, which will be invoked |
| 1416 | for the more complex shell interactions needed by htmlfontify. | 1416 | for the more complex shell interactions needed by Htmlfontify. |
| 1417 | Currently this is only required/used when using GNU etags, see | 1417 | Currently this is only required/used when using GNU etags, see |
| 1418 | @ref{hfy-etags-cmd-alist} for details. | 1418 | @ref{hfy-etags-cmd-alist} for details. |
| 1419 | 1419 | ||
| 1420 | @item hfy-optimisations | 1420 | @item hfy-optimisations |
| 1421 | @vindex hfy-optimisations | 1421 | @vindex hfy-optimisations |
| 1422 | @anchor{hfy-optimisations} | 1422 | @anchor{hfy-optimisations} |
| 1423 | 1423 | ||
| 1424 | Optimisations to turn on: So far, the following have been implemented: | 1424 | Optimisations to turn on. So far, the following have been implemented: |
| 1425 | 1425 | ||
| 1426 | @table @option | 1426 | @table @option |
| 1427 | @item merge-adjacent-tags | 1427 | @item merge-adjacent-tags |
| 1428 | If two (or more) span tags are adjacent, identical and separated by nothing | 1428 | If two (or more) span tags are adjacent, identical and separated by nothing |
| 1429 | more than whitespace, they will be merged into one span. | 1429 | more than whitespace, they will be merged into one span. |
| 1430 | 1430 | ||
| 1431 | @item zap-comment-links | 1431 | @item zap-comment-links |
| @@ -1435,13 +1435,13 @@ Suppress hyperlinking of tags found in comments. | |||
| 1435 | Suppress hyperlinking of tags found in strings. | 1435 | Suppress hyperlinking of tags found in strings. |
| 1436 | 1436 | ||
| 1437 | @item div-wrapper | 1437 | @item div-wrapper |
| 1438 | Add <div class="default"> </div> tags around the fontified body. | 1438 | Add @samp{<div class="default"> </div>} tags around the fontified body. |
| 1439 | ( some people like this because they cut and paste the html into | 1439 | (Some people like this because they cut and paste the html into |
| 1440 | a page with different colours than the fontified code. ) | 1440 | a page with different colors than the fontified code.) |
| 1441 | 1441 | ||
| 1442 | @item keep-overlays | 1442 | @item keep-overlays |
| 1443 | preserve overlay highlighting (cf @code{ediff} or @code{goo-font-lock}) | 1443 | Preserve overlay highlighting (c.f. @code{ediff} or @code{goo-font-lock}) |
| 1444 | as well as basic faces. Can result in extremely verbose highlighting | 1444 | as well as basic faces. Can result in extremely verbose highlighting |
| 1445 | if there are many overlays (as is the case with @code{goo-font-lock}). | 1445 | if there are many overlays (as is the case with @code{goo-font-lock}). |
| 1446 | 1446 | ||
| 1447 | @end table | 1447 | @end table |
| @@ -1456,22 +1456,22 @@ Suppress hyperlinking between files highlighted by different modes. | |||
| 1456 | 1456 | ||
| 1457 | Note: like compiler optimisations, these optimise the _output_ of the code, | 1457 | Note: like compiler optimisations, these optimise the _output_ of the code, |
| 1458 | not the processing of the source itself, and are therefore likely to slow | 1458 | not the processing of the source itself, and are therefore likely to slow |
| 1459 | htmlfontify down, at least a little. Except for skip-refontification, | 1459 | Htmlfontify down, at least a little. Except for skip-refontification, |
| 1460 | which can never slow you down, but may result in incomplete fontification. | 1460 | which can never slow you down, but may result in incomplete fontification. |
| 1461 | 1461 | ||
| 1462 | @item hfy-src-doc-link-unstyle | 1462 | @item hfy-src-doc-link-unstyle |
| 1463 | @vindex hfy-src-doc-link-unstyle | 1463 | @vindex hfy-src-doc-link-unstyle |
| 1464 | @anchor{hfy-src-doc-link-unstyle} | 1464 | @anchor{hfy-src-doc-link-unstyle} |
| 1465 | 1465 | ||
| 1466 | Regex to remove from the <style> a variant of an htmlfontify css class. | 1466 | Regex to remove from the <style> a variant of an Htmlfontify CSS class. |
| 1467 | 1467 | ||
| 1468 | @item hfy-link-extn | 1468 | @item hfy-link-extn |
| 1469 | @vindex hfy-link-extn | 1469 | @vindex hfy-link-extn |
| 1470 | @anchor{hfy-link-extn} | 1470 | @anchor{hfy-link-extn} |
| 1471 | 1471 | ||
| 1472 | File extension used for href links - Useful where the htmlfontify | 1472 | File extension used for href links---useful where the Htmlfontify |
| 1473 | output files are going to be processed again, with a rersulting change | 1473 | output files are going to be processed again, with a rersulting change |
| 1474 | in file extension. If @code{nil}, then any code using this should fall back | 1474 | in file extension. If @code{nil}, then any code using this should fall back |
| 1475 | to @ref{hfy-extn}. | 1475 | to @ref{hfy-extn}. |
| 1476 | 1476 | ||
| 1477 | @item hfy-istext-command | 1477 | @item hfy-istext-command |
| @@ -1479,38 +1479,38 @@ to @ref{hfy-extn}. | |||
| 1479 | @anchor{hfy-istext-command} | 1479 | @anchor{hfy-istext-command} |
| 1480 | 1480 | ||
| 1481 | Command to run with the name of a file, to see whether it is a text file | 1481 | Command to run with the name of a file, to see whether it is a text file |
| 1482 | or not. The command should emit a string containing the word 'text' if | 1482 | or not. The command should emit a string containing the word @samp{text} if |
| 1483 | the file is a text file, and a string not containing 'text' otherwise. | 1483 | the file is a text file, and a string not containing @samp{text} otherwise. |
| 1484 | 1484 | ||
| 1485 | @item hfy-etags-cmd-alist | 1485 | @item hfy-etags-cmd-alist |
| 1486 | @vindex hfy-etags-cmd-alist | 1486 | @vindex hfy-etags-cmd-alist |
| 1487 | @anchor{hfy-etags-cmd-alist} | 1487 | @anchor{hfy-etags-cmd-alist} |
| 1488 | 1488 | ||
| 1489 | An alist of possible shell commands that will generate etags output that | 1489 | An alist of possible shell commands that will generate etags output that |
| 1490 | Htmlfontify can use. '%s' will be replaced by @ref{hfy-etags-bin}. | 1490 | Htmlfontify can use. @samp{%s} will be replaced by @ref{hfy-etags-bin}. |
| 1491 | 1491 | ||
| 1492 | @item hfy-etags-bin | 1492 | @item hfy-etags-bin |
| 1493 | @vindex hfy-etags-bin | 1493 | @vindex hfy-etags-bin |
| 1494 | @anchor{hfy-etags-bin} | 1494 | @anchor{hfy-etags-bin} |
| 1495 | 1495 | ||
| 1496 | The Location of the etags binary (we begin by assuming it's in your path). | 1496 | The location of the etags binary (we begin by assuming it's in your path). |
| 1497 | 1497 | ||
| 1498 | Note that if etags is not in your path, you will need to alter the shell | 1498 | Note that if etags is not in your path, you will need to alter the shell |
| 1499 | commands in @ref{hfy-etags-cmd-alist}. | 1499 | commands in @ref{hfy-etags-cmd-alist}. |
| 1500 | 1500 | ||
| 1501 | [ As of version 0.17, this requirement has been removed: It should | 1501 | [As of version 0.17, this requirement has been removed: it should |
| 1502 | all just work(tm) ] | 1502 | all just work(tm).] |
| 1503 | 1503 | ||
| 1504 | @item hfy-etags-cmd | 1504 | @item hfy-etags-cmd |
| 1505 | @vindex hfy-etags-cmd | 1505 | @vindex hfy-etags-cmd |
| 1506 | @anchor{hfy-etags-cmd} | 1506 | @anchor{hfy-etags-cmd} |
| 1507 | 1507 | ||
| 1508 | An etags shell command to run in the source directory to generate a tags | 1508 | An etags shell command to run in the source directory to generate a tags |
| 1509 | file for the whole source tree from there on down. The command should emit | 1509 | file for the whole source tree from there on down. The command should emit |
| 1510 | the etags output on standard output. | 1510 | the etags output on standard output. |
| 1511 | 1511 | ||
| 1512 | Two canned commands are provided - they drive emacs' etags and | 1512 | Two canned commands are provided---they drive Emacs's etags and |
| 1513 | exuberant-ctags' etags respectively. | 1513 | exuberant-ctags's etags respectively. |
| 1514 | 1514 | ||
| 1515 | @item hfy-etag-regex | 1515 | @item hfy-etag-regex |
| 1516 | @vindex hfy-etag-regex | 1516 | @vindex hfy-etag-regex |
| @@ -1522,14 +1522,14 @@ in order, to: | |||
| 1522 | @enumerate | 1522 | @enumerate |
| 1523 | The tag | 1523 | The tag |
| 1524 | The line | 1524 | The line |
| 1525 | The char (point) at which the tag occurs | 1525 | The character (point) at which the tag occurs |
| 1526 | @end enumerate | 1526 | @end enumerate |
| 1527 | 1527 | ||
| 1528 | @item hfy-index-file | 1528 | @item hfy-index-file |
| 1529 | @vindex hfy-index-file | 1529 | @vindex hfy-index-file |
| 1530 | @anchor{hfy-index-file} | 1530 | @anchor{hfy-index-file} |
| 1531 | 1531 | ||
| 1532 | Name (sans extension) of the index file produced during | 1532 | Name (sans extension) of the index file produced during |
| 1533 | fontification-and-hyperlinking. | 1533 | fontification-and-hyperlinking. |
| 1534 | 1534 | ||
| 1535 | @item hfy-instance-file | 1535 | @item hfy-instance-file |
| @@ -1543,12 +1543,12 @@ fontification-and-hyperlinking. | |||
| 1543 | @vindex hfy-html-quote-map | 1543 | @vindex hfy-html-quote-map |
| 1544 | @anchor{hfy-html-quote-map} | 1544 | @anchor{hfy-html-quote-map} |
| 1545 | 1545 | ||
| 1546 | An alist of char -> entity mappings used to make the text html-safe. | 1546 | An alist of character -> entity mappings used to make the text html-safe. |
| 1547 | 1547 | ||
| 1548 | @comment /AUTOGENERATED BLOCK | 1548 | @comment /AUTOGENERATED BLOCK |
| 1549 | @end table | 1549 | @end table |
| 1550 | 1550 | ||
| 1551 | @node Requirements, Index, Customisation, Top | 1551 | @node Requirements |
| 1552 | @chapter Requirements | 1552 | @chapter Requirements |
| 1553 | @cindex Requirements, Prerequisites | 1553 | @cindex Requirements, Prerequisites |
| 1554 | 1554 | ||
| @@ -1559,34 +1559,38 @@ Htmlfontify has a couple of external requirements: | |||
| 1559 | @item | 1559 | @item |
| 1560 | GNU Emacs 20.7+ or 21.1+ | 1560 | GNU Emacs 20.7+ or 21.1+ |
| 1561 | 1561 | ||
| 1562 | Other versions may work - these have been used successfully by the | 1562 | Other versions may work---these have been used successfully by the |
| 1563 | author. If you intend to use Htmlfontify in batch mode, 21.1+ is | 1563 | author. If you intend to use Htmlfontify in batch mode, 21.1+ is |
| 1564 | pretty much required. The author does not know if XEmacs, NTemacs, | 1564 | pretty much required. The author does not know if XEmacs, NTemacs, |
| 1565 | or J.Random Emacs will run Htmlfontify, but reports/patches/bags of | 1565 | or J.Random Emacs will run Htmlfontify, but reports/patches/bags of |
| 1566 | money are always welcome. | 1566 | money are always welcome. |
| 1567 | 1567 | ||
| 1568 | @item | 1568 | @item |
| 1569 | A copy of etags ( exuberant-ctags or GNU etags ). Htmlfontify attempts | 1569 | A copy of etags (exuberant-ctags or GNU etags). Htmlfontify attempts |
| 1570 | to autodetect the version you have and customise itself accordingly, | 1570 | to autodetect the version you have and customise itself accordingly, |
| 1571 | but you should be able to override this. | 1571 | but you should be able to override this. |
| 1572 | 1572 | ||
| 1573 | See: @ref{Customisation} | 1573 | See: @ref{Customisation} |
| 1574 | 1574 | ||
| 1575 | @item | 1575 | @item |
| 1576 | A copy of find (eg GNU find) that provides the @code{-path} predicate. | 1576 | A copy of find (e.g., GNU find) that provides the @code{-path} predicate. |
| 1577 | 1577 | ||
| 1578 | You may be able to work around this with a suitable clever shell | 1578 | You may be able to work around this with a suitable clever shell |
| 1579 | command and the customisation entry: @ref{hfy-find-cmd} | 1579 | command and the customisation entry: @ref{hfy-find-cmd} |
| 1580 | 1580 | ||
| 1581 | @item | 1581 | @item |
| 1582 | A copy of sed (eg GNU sed). | 1582 | A copy of sed (e.g., GNU sed). |
| 1583 | 1583 | ||
| 1584 | @item | 1584 | @item |
| 1585 | A copy of the @code{file} command. | 1585 | A copy of the @code{file} command. |
| 1586 | 1586 | ||
| 1587 | @end itemize | 1587 | @end itemize |
| 1588 | 1588 | ||
| 1589 | @node Index, , Requirements, Top | 1589 | @node GNU Free Documentation License |
| 1590 | @appendix GNU Free Documentation License | ||
| 1591 | @include doclicense.texi | ||
| 1592 | |||
| 1593 | @node Index | ||
| 1590 | @unnumbered Index | 1594 | @unnumbered Index |
| 1591 | 1595 | ||
| 1592 | @table @var | 1596 | @table @var |
| @@ -1601,404 +1605,5 @@ A copy of the @code{file} command. | |||
| 1601 | 1605 | ||
| 1602 | @end table | 1606 | @end table |
| 1603 | 1607 | ||
| 1604 | @node COPYING, , , Top | ||
| 1605 | @appendix GNU Free Documentation Licence | ||
| 1606 | |||
| 1607 | @cindex FDL, GNU Free Documentation License | ||
| 1608 | @center Version 1.1, March 2000 | ||
| 1609 | |||
| 1610 | @display | ||
| 1611 | Copyright @copyright{} 2000 Free Software Foundation, Inc. | ||
| 1612 | 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA | ||
| 1613 | |||
| 1614 | Everyone is permitted to copy and distribute verbatim copies | ||
| 1615 | of this license document, but changing it is not allowed. | ||
| 1616 | @end display | ||
| 1617 | |||
| 1618 | @enumerate 0 | ||
| 1619 | @item | ||
| 1620 | PREAMBLE | ||
| 1621 | |||
| 1622 | The purpose of this License is to make a manual, textbook, or other | ||
| 1623 | written document @dfn{free} in the sense of freedom: to assure everyone | ||
| 1624 | the effective freedom to copy and redistribute it, with or without | ||
| 1625 | modifying it, either commercially or noncommercially. Secondarily, | ||
| 1626 | this License preserves for the author and publisher a way to get | ||
| 1627 | credit for their work, while not being considered responsible for | ||
| 1628 | modifications made by others. | ||
| 1629 | |||
| 1630 | This License is a kind of ``copyleft'', which means that derivative | ||
| 1631 | works of the document must themselves be free in the same sense. It | ||
| 1632 | complements the GNU General Public License, which is a copyleft | ||
| 1633 | license designed for free software. | ||
| 1634 | |||
| 1635 | We have designed this License in order to use it for manuals for free | ||
| 1636 | software, because free software needs free documentation: a free | ||
| 1637 | program should come with manuals providing the same freedoms that the | ||
| 1638 | software does. But this License is not limited to software manuals; | ||
| 1639 | it can be used for any textual work, regardless of subject matter or | ||
| 1640 | whether it is published as a printed book. We recommend this License | ||
| 1641 | principally for works whose purpose is instruction or reference. | ||
| 1642 | |||
| 1643 | @item | ||
| 1644 | APPLICABILITY AND DEFINITIONS | ||
| 1645 | |||
| 1646 | This License applies to any manual or other work that contains a | ||
| 1647 | notice placed by the copyright holder saying it can be distributed | ||
| 1648 | under the terms of this License. The ``Document'', below, refers to any | ||
| 1649 | such manual or work. Any member of the public is a licensee, and is | ||
| 1650 | addressed as ``you''. | ||
| 1651 | |||
| 1652 | A ``Modified Version'' of the Document means any work containing the | ||
| 1653 | Document or a portion of it, either copied verbatim, or with | ||
| 1654 | modifications and/or translated into another language. | ||
| 1655 | |||
| 1656 | A ``Secondary Section'' is a named appendix or a front-matter section of | ||
| 1657 | the Document that deals exclusively with the relationship of the | ||
| 1658 | publishers or authors of the Document to the Document's overall subject | ||
| 1659 | (or to related matters) and contains nothing that could fall directly | ||
| 1660 | within that overall subject. (For example, if the Document is in part a | ||
| 1661 | textbook of mathematics, a Secondary Section may not explain any | ||
| 1662 | mathematics.) The relationship could be a matter of historical | ||
| 1663 | connection with the subject or with related matters, or of legal, | ||
| 1664 | commercial, philosophical, ethical or political position regarding | ||
| 1665 | them. | ||
| 1666 | |||
| 1667 | The ``Invariant Sections'' are certain Secondary Sections whose titles | ||
| 1668 | are designated, as being those of Invariant Sections, in the notice | ||
| 1669 | that says that the Document is released under this License. | ||
| 1670 | |||
| 1671 | The ``Cover Texts'' are certain short passages of text that are listed, | ||
| 1672 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that | ||
| 1673 | the Document is released under this License. | ||
| 1674 | |||
| 1675 | A ``Transparent'' copy of the Document means a machine-readable copy, | ||
| 1676 | represented in a format whose specification is available to the | ||
| 1677 | general public, whose contents can be viewed and edited directly and | ||
| 1678 | straightforwardly with generic text editors or (for images composed of | ||
| 1679 | pixels) generic paint programs or (for drawings) some widely available | ||
| 1680 | drawing editor, and that is suitable for input to text formatters or | ||
| 1681 | for automatic translation to a variety of formats suitable for input | ||
| 1682 | to text formatters. A copy made in an otherwise Transparent file | ||
| 1683 | format whose markup has been designed to thwart or discourage | ||
| 1684 | subsequent modification by readers is not Transparent. A copy that is | ||
| 1685 | not ``Transparent'' is called ``Opaque''. | ||
| 1686 | |||
| 1687 | Examples of suitable formats for Transparent copies include plain | ||
| 1688 | @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, | ||
| 1689 | @acronym{SGML} or @acronym{XML} using a publicly available | ||
| 1690 | @acronym{DTD}, and standard-conforming simple @acronym{HTML} designed | ||
| 1691 | for human modification. Opaque formats include PostScript, | ||
| 1692 | @acronym{PDF}, proprietary formats that can be read and edited only by | ||
| 1693 | proprietary word processors, @acronym{SGML} or @acronym{XML} for which | ||
| 1694 | the @acronym{DTD} and/or processing tools are not generally available, | ||
| 1695 | and the machine-generated @acronym{HTML} produced by some word | ||
| 1696 | processors for output purposes only. | ||
| 1697 | |||
| 1698 | The ``Title Page'' means, for a printed book, the title page itself, | ||
| 1699 | plus such following pages as are needed to hold, legibly, the material | ||
| 1700 | this License requires to appear in the title page. For works in | ||
| 1701 | formats which do not have any title page as such, ``Title Page'' means | ||
| 1702 | the text near the most prominent appearance of the work's title, | ||
| 1703 | preceding the beginning of the body of the text. | ||
| 1704 | |||
| 1705 | @item | ||
| 1706 | VERBATIM COPYING | ||
| 1707 | |||
| 1708 | You may copy and distribute the Document in any medium, either | ||
| 1709 | commercially or noncommercially, provided that this License, the | ||
| 1710 | copyright notices, and the license notice saying this License applies | ||
| 1711 | to the Document are reproduced in all copies, and that you add no other | ||
| 1712 | conditions whatsoever to those of this License. You may not use | ||
| 1713 | technical measures to obstruct or control the reading or further | ||
| 1714 | copying of the copies you make or distribute. However, you may accept | ||
| 1715 | compensation in exchange for copies. If you distribute a large enough | ||
| 1716 | number of copies you must also follow the conditions in section 3. | ||
| 1717 | |||
| 1718 | You may also lend copies, under the same conditions stated above, and | ||
| 1719 | you may publicly display copies. | ||
| 1720 | |||
| 1721 | @item | ||
| 1722 | COPYING IN QUANTITY | ||
| 1723 | |||
| 1724 | If you publish printed copies of the Document numbering more than 100, | ||
| 1725 | and the Document's license notice requires Cover Texts, you must enclose | ||
| 1726 | the copies in covers that carry, clearly and legibly, all these Cover | ||
| 1727 | Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on | ||
| 1728 | the back cover. Both covers must also clearly and legibly identify | ||
| 1729 | you as the publisher of these copies. The front cover must present | ||
| 1730 | the full title with all words of the title equally prominent and | ||
| 1731 | visible. You may add other material on the covers in addition. | ||
| 1732 | Copying with changes limited to the covers, as long as they preserve | ||
| 1733 | the title of the Document and satisfy these conditions, can be treated | ||
| 1734 | as verbatim copying in other respects. | ||
| 1735 | |||
| 1736 | If the required texts for either cover are too voluminous to fit | ||
| 1737 | legibly, you should put the first ones listed (as many as fit | ||
| 1738 | reasonably) on the actual cover, and continue the rest onto adjacent | ||
| 1739 | pages. | ||
| 1740 | |||
| 1741 | If you publish or distribute Opaque copies of the Document numbering | ||
| 1742 | more than 100, you must either include a machine-readable Transparent | ||
| 1743 | copy along with each Opaque copy, or state in or with each Opaque copy | ||
| 1744 | a publicly-accessible computer-network location containing a complete | ||
| 1745 | Transparent copy of the Document, free of added material, which the | ||
| 1746 | general network-using public has access to download anonymously at no | ||
| 1747 | charge using public-standard network protocols. If you use the latter | ||
| 1748 | option, you must take reasonably prudent steps, when you begin | ||
| 1749 | distribution of Opaque copies in quantity, to ensure that this | ||
| 1750 | Transparent copy will remain thus accessible at the stated location | ||
| 1751 | until at least one year after the last time you distribute an Opaque | ||
| 1752 | copy (directly or through your agents or retailers) of that edition to | ||
| 1753 | the public. | ||
| 1754 | |||
| 1755 | It is requested, but not required, that you contact the authors of the | ||
| 1756 | Document well before redistributing any large number of copies, to give | ||
| 1757 | them a chance to provide you with an updated version of the Document. | ||
| 1758 | |||
| 1759 | @item | ||
| 1760 | MODIFICATIONS | ||
| 1761 | |||
| 1762 | You may copy and distribute a Modified Version of the Document under | ||
| 1763 | the conditions of sections 2 and 3 above, provided that you release | ||
| 1764 | the Modified Version under precisely this License, with the Modified | ||
| 1765 | Version filling the role of the Document, thus licensing distribution | ||
| 1766 | and modification of the Modified Version to whoever possesses a copy | ||
| 1767 | of it. In addition, you must do these things in the Modified Version: | ||
| 1768 | |||
| 1769 | @enumerate A | ||
| 1770 | @item | ||
| 1771 | Use in the Title Page (and on the covers, if any) a title distinct | ||
| 1772 | from that of the Document, and from those of previous versions | ||
| 1773 | (which should, if there were any, be listed in the History section | ||
| 1774 | of the Document). You may use the same title as a previous version | ||
| 1775 | if the original publisher of that version gives permission. | ||
| 1776 | |||
| 1777 | @item | ||
| 1778 | List on the Title Page, as authors, one or more persons or entities | ||
| 1779 | responsible for authorship of the modifications in the Modified | ||
| 1780 | Version, together with at least five of the principal authors of the | ||
| 1781 | Document (all of its principal authors, if it has less than five). | ||
| 1782 | |||
| 1783 | @item | ||
| 1784 | State on the Title page the name of the publisher of the | ||
| 1785 | Modified Version, as the publisher. | ||
| 1786 | |||
| 1787 | @item | ||
| 1788 | Preserve all the copyright notices of the Document. | ||
| 1789 | |||
| 1790 | @item | ||
| 1791 | Add an appropriate copyright notice for your modifications | ||
| 1792 | adjacent to the other copyright notices. | ||
| 1793 | |||
| 1794 | @item | ||
| 1795 | Include, immediately after the copyright notices, a license notice | ||
| 1796 | giving the public permission to use the Modified Version under the | ||
| 1797 | terms of this License, in the form shown in the Addendum below. | ||
| 1798 | |||
| 1799 | @item | ||
| 1800 | Preserve in that license notice the full lists of Invariant Sections | ||
| 1801 | and required Cover Texts given in the Document's license notice. | ||
| 1802 | |||
| 1803 | @item | ||
| 1804 | Include an unaltered copy of this License. | ||
| 1805 | |||
| 1806 | @item | ||
| 1807 | Preserve the section entitled ``History'', and its title, and add to | ||
| 1808 | it an item stating at least the title, year, new authors, and | ||
| 1809 | publisher of the Modified Version as given on the Title Page. If | ||
| 1810 | there is no section entitled ``History'' in the Document, create one | ||
| 1811 | stating the title, year, authors, and publisher of the Document as | ||
| 1812 | given on its Title Page, then add an item describing the Modified | ||
| 1813 | Version as stated in the previous sentence. | ||
| 1814 | |||
| 1815 | @item | ||
| 1816 | Preserve the network location, if any, given in the Document for | ||
| 1817 | public access to a Transparent copy of the Document, and likewise | ||
| 1818 | the network locations given in the Document for previous versions | ||
| 1819 | it was based on. These may be placed in the ``History'' section. | ||
| 1820 | You may omit a network location for a work that was published at | ||
| 1821 | least four years before the Document itself, or if the original | ||
| 1822 | publisher of the version it refers to gives permission. | ||
| 1823 | |||
| 1824 | @item | ||
| 1825 | In any section entitled ``Acknowledgments'' or ``Dedications'', | ||
| 1826 | preserve the section's title, and preserve in the section all the | ||
| 1827 | substance and tone of each of the contributor acknowledgments | ||
| 1828 | and/or dedications given therein. | ||
| 1829 | |||
| 1830 | @item | ||
| 1831 | Preserve all the Invariant Sections of the Document, | ||
| 1832 | unaltered in their text and in their titles. Section numbers | ||
| 1833 | or the equivalent are not considered part of the section titles. | ||
| 1834 | |||
| 1835 | @item | ||
| 1836 | Delete any section entitled ``Endorsements''. Such a section | ||
| 1837 | may not be included in the Modified Version. | ||
| 1838 | |||
| 1839 | @item | ||
| 1840 | Do not retitle any existing section as ``Endorsements'' | ||
| 1841 | or to conflict in title with any Invariant Section. | ||
| 1842 | @end enumerate | ||
| 1843 | |||
| 1844 | If the Modified Version includes new front-matter sections or | ||
| 1845 | appendices that qualify as Secondary Sections and contain no material | ||
| 1846 | copied from the Document, you may at your option designate some or all | ||
| 1847 | of these sections as invariant. To do this, add their titles to the | ||
| 1848 | list of Invariant Sections in the Modified Version's license notice. | ||
| 1849 | These titles must be distinct from any other section titles. | ||
| 1850 | |||
| 1851 | You may add a section entitled ``Endorsements'', provided it contains | ||
| 1852 | nothing but endorsements of your Modified Version by various | ||
| 1853 | parties---for example, statements of peer review or that the text has | ||
| 1854 | been approved by an organization as the authoritative definition of a | ||
| 1855 | standard. | ||
| 1856 | |||
| 1857 | You may add a passage of up to five words as a Front-Cover Text, and a | ||
| 1858 | passage of up to 25 words as a Back-Cover Text, to the end of the list | ||
| 1859 | of Cover Texts in the Modified Version. Only one passage of | ||
| 1860 | Front-Cover Text and one of Back-Cover Text may be added by (or | ||
| 1861 | through arrangements made by) any one entity. If the Document already | ||
| 1862 | includes a cover text for the same cover, previously added by you or | ||
| 1863 | by arrangement made by the same entity you are acting on behalf of, | ||
| 1864 | you may not add another; but you may replace the old one, on explicit | ||
| 1865 | permission from the previous publisher that added the old one. | ||
| 1866 | |||
| 1867 | The author(s) and publisher(s) of the Document do not by this License | ||
| 1868 | give permission to use their names for publicity for or to assert or | ||
| 1869 | imply endorsement of any Modified Version. | ||
| 1870 | |||
| 1871 | @item | ||
| 1872 | COMBINING DOCUMENTS | ||
| 1873 | |||
| 1874 | You may combine the Document with other documents released under this | ||
| 1875 | License, under the terms defined in section 4 above for modified | ||
| 1876 | versions, provided that you include in the combination all of the | ||
| 1877 | Invariant Sections of all of the original documents, unmodified, and | ||
| 1878 | list them all as Invariant Sections of your combined work in its | ||
| 1879 | license notice. | ||
| 1880 | |||
| 1881 | The combined work need only contain one copy of this License, and | ||
| 1882 | multiple identical Invariant Sections may be replaced with a single | ||
| 1883 | copy. If there are multiple Invariant Sections with the same name but | ||
| 1884 | different contents, make the title of each such section unique by | ||
| 1885 | adding at the end of it, in parentheses, the name of the original | ||
| 1886 | author or publisher of that section if known, or else a unique number. | ||
| 1887 | Make the same adjustment to the section titles in the list of | ||
| 1888 | Invariant Sections in the license notice of the combined work. | ||
| 1889 | |||
| 1890 | In the combination, you must combine any sections entitled ``History'' | ||
| 1891 | in the various original documents, forming one section entitled | ||
| 1892 | ``History''; likewise combine any sections entitled ``Acknowledgments'', | ||
| 1893 | and any sections entitled ``Dedications''. You must delete all sections | ||
| 1894 | entitled ``Endorsements.'' | ||
| 1895 | |||
| 1896 | @item | ||
| 1897 | COLLECTIONS OF DOCUMENTS | ||
| 1898 | |||
| 1899 | You may make a collection consisting of the Document and other documents | ||
| 1900 | released under this License, and replace the individual copies of this | ||
| 1901 | License in the various documents with a single copy that is included in | ||
| 1902 | the collection, provided that you follow the rules of this License for | ||
| 1903 | verbatim copying of each of the documents in all other respects. | ||
| 1904 | |||
| 1905 | You may extract a single document from such a collection, and distribute | ||
| 1906 | it individually under this License, provided you insert a copy of this | ||
| 1907 | License into the extracted document, and follow this License in all | ||
| 1908 | other respects regarding verbatim copying of that document. | ||
| 1909 | |||
| 1910 | @item | ||
| 1911 | AGGREGATION WITH INDEPENDENT WORKS | ||
| 1912 | |||
| 1913 | A compilation of the Document or its derivatives with other separate | ||
| 1914 | and independent documents or works, in or on a volume of a storage or | ||
| 1915 | distribution medium, does not as a whole count as a Modified Version | ||
| 1916 | of the Document, provided no compilation copyright is claimed for the | ||
| 1917 | compilation. Such a compilation is called an ``aggregate'', and this | ||
| 1918 | License does not apply to the other self-contained works thus compiled | ||
| 1919 | with the Document, on account of their being thus compiled, if they | ||
| 1920 | are not themselves derivative works of the Document. | ||
| 1921 | |||
| 1922 | If the Cover Text requirement of section 3 is applicable to these | ||
| 1923 | copies of the Document, then if the Document is less than one quarter | ||
| 1924 | of the entire aggregate, the Document's Cover Texts may be placed on | ||
| 1925 | covers that surround only the Document within the aggregate. | ||
| 1926 | Otherwise they must appear on covers around the whole aggregate. | ||
| 1927 | |||
| 1928 | @item | ||
| 1929 | TRANSLATION | ||
| 1930 | |||
| 1931 | Translation is considered a kind of modification, so you may | ||
| 1932 | distribute translations of the Document under the terms of section 4. | ||
| 1933 | Replacing Invariant Sections with translations requires special | ||
| 1934 | permission from their copyright holders, but you may include | ||
| 1935 | translations of some or all Invariant Sections in addition to the | ||
| 1936 | original versions of these Invariant Sections. You may include a | ||
| 1937 | translation of this License provided that you also include the | ||
| 1938 | original English version of this License. In case of a disagreement | ||
| 1939 | between the translation and the original English version of this | ||
| 1940 | License, the original English version will prevail. | ||
| 1941 | |||
| 1942 | @item | ||
| 1943 | TERMINATION | ||
| 1944 | |||
| 1945 | You may not copy, modify, sublicense, or distribute the Document except | ||
| 1946 | as expressly provided for under this License. Any other attempt to | ||
| 1947 | copy, modify, sublicense or distribute the Document is void, and will | ||
| 1948 | automatically terminate your rights under this License. However, | ||
| 1949 | parties who have received copies, or rights, from you under this | ||
| 1950 | License will not have their licenses terminated so long as such | ||
| 1951 | parties remain in full compliance. | ||
| 1952 | |||
| 1953 | @item | ||
| 1954 | FUTURE REVISIONS OF THIS LICENSE | ||
| 1955 | |||
| 1956 | The Free Software Foundation may publish new, revised versions | ||
| 1957 | of the GNU Free Documentation License from time to time. Such new | ||
| 1958 | versions will be similar in spirit to the present version, but may | ||
| 1959 | differ in detail to address new problems or concerns. See | ||
| 1960 | @uref{http://www.gnu.org/copyleft/}. | ||
| 1961 | |||
| 1962 | Each version of the License is given a distinguishing version number. | ||
| 1963 | If the Document specifies that a particular numbered version of this | ||
| 1964 | License ``or any later version'' applies to it, you have the option of | ||
| 1965 | following the terms and conditions either of that specified version or | ||
| 1966 | of any later version that has been published (not as a draft) by the | ||
| 1967 | Free Software Foundation. If the Document does not specify a version | ||
| 1968 | number of this License, you may choose any version ever published (not | ||
| 1969 | as a draft) by the Free Software Foundation. | ||
| 1970 | @end enumerate | ||
| 1971 | |||
| 1972 | @page | ||
| 1973 | @appendixsubsec ADDENDUM: How to use this License for your documents | ||
| 1974 | |||
| 1975 | To use this License in a document you have written, include a copy of | ||
| 1976 | the License in the document and put the following copyright and | ||
| 1977 | license notices just after the title page: | ||
| 1978 | |||
| 1979 | @smallexample | ||
| 1980 | @group | ||
| 1981 | Copyright (C) @var{year} @var{your name}. | ||
| 1982 | Permission is granted to copy, distribute and/or modify this document | ||
| 1983 | under the terms of the GNU Free Documentation License, Version 1.1 | ||
| 1984 | or any later version published by the Free Software Foundation; | ||
| 1985 | with the Invariant Sections being @var{list their titles}, with the | ||
| 1986 | Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. | ||
| 1987 | A copy of the license is included in the section entitled ``GNU | ||
| 1988 | Free Documentation License''. | ||
| 1989 | @end group | ||
| 1990 | @end smallexample | ||
| 1991 | |||
| 1992 | If you have no Invariant Sections, write ``with no Invariant Sections'' | ||
| 1993 | instead of saying which ones are invariant. If you have no | ||
| 1994 | Front-Cover Texts, write ``no Front-Cover Texts'' instead of | ||
| 1995 | ``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts. | ||
| 1996 | |||
| 1997 | If your document contains nontrivial examples of program code, we | ||
| 1998 | recommend releasing these examples in parallel under your choice of | ||
| 1999 | free software license, such as the GNU General Public License, | ||
| 2000 | to permit their use in free software. | ||
| 2001 | |||
| 2002 | @setchapternewpage odd | 1608 | @setchapternewpage odd |
| 2003 | @contents | ||
| 2004 | @bye | 1609 | @bye |