Do some bookkeeping
[muse-el.git] / muse.texi
blob07dc8e870f6d0af3feb994ab50664940c28f98dd
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename muse.info
4 @settitle Muse
5 @c %**end of header
7 @dircategory Emacs
8 @direntry
9 * Muse: (muse). Authoring and publishing environment for Emacs.
10 @end direntry
12 @syncodeindex fn cp
14 @copying
15 This manual is for the Emacs Muse version 3.02.92 (3.03 RC2).
17 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc.
19 @quotation
20 Permission is granted to copy, distribute and/or modify this document
21 under the terms of the GNU General Public License.
22 @end quotation
23 @end copying
25 @titlepage
26 @title Muse manual
27 @subtitle an authoring and publishing environment
28 @subtitle for GNU Emacs and XEmacs
30 @c The following two commands
31 @c start the copyright page.
32 @page
33 @vskip 0pt plus 1filll
34 @insertcopying
35 @end titlepage
37 @c So the toc is printed at the start
38 @contents
40 @ifnottex
41 @node Top, Preface, (dir), (dir)
42 @comment  node-name,  next,  previous,  up
43 @top Muse
45 @insertcopying
46 @end ifnottex
48 @menu
49 * Preface::                     About the documentation.
50 * Introduction::                What is Muse?
51 * Obtaining Muse::              How to get Muse releases and development
52                                   changes.
53 * Installation::                Compiling and installing Muse.
54 * Getting Started::             Settings for Muse.
55 * Projects::                    Creating and managing Muse projects.
56 * Keystroke Summary::           Keys used in Muse mode.
57 * Markup Rules::                Rules for using markup.
58 * Publishing Styles::           Publishing various types of documents.
59 * Extending Muse::              Making your own publishing styles.
60 * Getting Help and Reporting Bugs::  
61 * History::                     History of this document.
62 * Contributors::                Contributors to this documentation.
63 * GNU General Public License::  The license for this manual and Muse.
64 * Concept Index::               Search for terms.
66 @detailmenu
67  --- The Detailed Node Listing ---
69 How to Get Muse Releases and Development Changes
71 * Releases::                    Released versions of Muse.
72 * Development::                 Latest unreleased development changes.
74 Rules for Using Markup
76 * Paragraphs::                  Paragraphs: centering and quoting.
77 * Headings::                    Levels of headings.
78 * Directives::                  Directives at the beginning of a
79                                   document.
80 * Emphasizing Text::            Bold, italicized, and underlined text.
81 * Footnotes::                   Making notes to be shown at the end.
82 * Verse::                       Indicating poetic stanzas.
83 * Lists::                       Lists of items.
84 * Tables::                      Generation of data tables.
85 * Explicit Links::              Hyperlinks and email addresses with
86                                   descriptions.
87 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
88                                   links.
89 * Images::                      Publishing and displaying images.
90 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
91 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
92                                   for extensibility.
93 * Comments::                    Lines to omit from published output.
94 * Tag Summary::                 Tags that Muse recognizes.
96 Publishing Various Types of Documents
98 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
99 * Book::                        Publishing entries into a compilation.
100 * DocBook::                     Publishing in DocBook XML form.
101 * HTML::                        Publishing in HTML or XHTML form.
102 * Journal::                     Keeping a journal or blog.
103 * LaTeX::                       Publishing LaTeX documents.
104 * Poem::                        Publish a poem to LaTex or PDF.
105 * Texinfo::                     Publish entries to Texinfo format or PDF.
107 Integrating Muse and pyblosxom.cgi
109 * Blosxom Requirements::        Other tools needed for the Blosxom style.
110 * Blosxom Entries::             Format of a Blosxom entry and automation.
111 * Blosxom Options::             Blosxom styles and options provided.
113 Making your own publishing styles
115 * Common Elements::             Common functionality shared by styles.
116 * Deriving Styles::             Deriving a new style from an existing
117                                   one.
119 Common functionality shared by styles
121 * Markup Functions::            Specifying functions to marking up text.
122 * Markup Regexps::              Markup rules for publishing.
123 * Markup Strings::              Strings specific to a publishing style.
124 * Markup Tags::                 Tag specifications for special markup.
125 * Style Elements::              Parameters used for defining styles.
127 @end detailmenu
128 @end menu
130 @node Preface, Introduction, Top, Top
131 @comment  node-name,  next,  previous,  up
132 @chapter About the documentation
134 This document describes Muse, which was written by John Wiegley
135 and is now maintained by Michael Olson.  Several versions of it are
136 available on-line.
138 @itemize @bullet
139 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
140 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
141 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
142 @end itemize
144 @node Introduction, Obtaining Muse, Preface, Top
145 @comment  node-name,  next,  previous,  up
146 @chapter What is Muse?
148 Emacs Muse is an authoring and publishing environment for Emacs.  It
149 simplifies the process of writing documents and publishing them to
150 various output formats.
152 Muse consists of two main parts: an enhanced text-mode for authoring
153 documents and navigating within Muse projects, and a set of publishing
154 styles for generating different kinds of output.
156 This idea is not in any way new. Numerous systems exist -- even one
157 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
158 more modular environment, with a rather simple core, in which "styles"
159 are derived from to create new styles. Much of Muse's overall
160 functionality is optional. For example, you can use the publisher
161 without the major-mode, or the mode without doing any publishing; or if
162 you don't load the Texinfo or LaTeX modules, those styles won't be
163 available.
165 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
166 code has been restructured and rewritten, especially its publishing
167 functions. The focus in this revision is on the authoring and publishing
168 aspects, and the "wikiness" has been removed as a default behavior
169 (available in the optional @file{muse-wiki} module). CamelCase words are
170 no longer special by default.
172 @node Obtaining Muse, Installation, Introduction, Top
173 @comment  node-name,  next,  previous,  up
174 @chapter How to Get Muse Releases and Development Changes
176 @menu
177 * Releases::                    Released versions of Muse.
178 * Development::                 Latest unreleased development changes.
179 @end menu
181 @node Releases, Development, Obtaining Muse, Obtaining Muse
182 @comment  node-name,  next,  previous,  up
183 @section Released versions of Muse
185 Choose to install a release if you want to minimize risk.
187 Errors are corrected in development first.  User-visible changes will be
188 announced on the @email{muse-el-discuss@@gna.org} mailing list.
189 @xref{Getting Help and Reporting Bugs}.
191 @cindex releases, Debian package
192 @cindex Debian package for Muse
193 Debian and Ubuntu users can get Muse via apt-get.  The @file{muse-el}
194 package is available both at Michael Olson's APT repository and the
195 official Debian and Ubuntu repositories.  To make use of the former, add
196 the following line to your @file{/etc/apt/sources.list} file and run
197 @code{apt-get install muse}.
199 @example
200 deb http://www.mwolson.org/debian/ ./
201 @end example
203 @cindex releases, from source
204 Alternatively, you can download the latest release from
205 @uref{http://www.mwolson.org/static/dist/muse/} .
207 @node Development,  , Releases, Obtaining Muse
208 @comment  node-name,  next,  previous,  up
209 @section Latest unreleased development changes
210 @cindex development
212 Choose the development version if you want to live on the bleeding edge
213 of Muse development or try out new features before release.
215 @cindex arch revision control system, using
216 The Arch revision control system allows you to retrieve previous
217 versions and select specific features and bug fixes.  If you would like
218 to contribute to Muse development, it is highly recommended that you use
219 Arch, but this is not a requirement.
221 If you are new to Arch, you might find this tutorial helpful:
222 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
224 Downloading the Muse module with Arch and staying up-to-date involves
225 the following steps.
227 @enumerate
228 @item Install arch
230 @itemize @bullet
231 @item Debian and Ubuntu: @kbd{apt-get install tla}.
232 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
233 @end itemize
235 @item Register the archive.
236 @example
237 tla register-archive -f http://www.mwolson.org/archives/2005
238 @end example
240 @item Download the Muse package.
241 @example
242 # Download Muse into the @file{muse} directory.
243 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
244 @end example
246 @item List upstream changes that are missing from your local copy.
247 Do this whenever you want to see whether new changes have been committed
248 to Muse.
250 @example
251 # Change to the source directory you are interested in.
252 cd muse/
254 # Display the summary of changes
255 tla missing --summary
256 @end example
258 @cindex updating Muse with Arch
259 @item Update to the latest version by replaying missing changes.
260 @example
261 cd muse
262 tla replay
263 @end example
265 @end enumerate
267 There are other ways to interact with the Muse archive.
269 @itemize
270 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
271 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
272 @end itemize
274 The latest development snapshot will be kept up-to-date since it is
275 updated at the same time as the Arch repository.
277 @node Installation, Getting Started, Obtaining Muse, Top
278 @comment  node-name,  next,  previous,  up
279 @chapter Compiling and Installing Muse
281 Muse may be compiled and installed on your machine.
283 @subheading Compilation
285 This is an optional step, since Emacs Lisp source code does not
286 necessarily have to be byte-compiled.  It will yield a speed increase,
287 though.
289 A working copy of Emacs or XEmacs is needed in order to compile the
290 Emacs Muse.  By default, the program that is installed with the name
291 @command{emacs} will be used.
293 If you want to use the @command{xemacs} binary to perform the
294 compilation, you would need to edit @file{Makefile.defs} in the
295 top-level directory as follows.  You can put either a full path to an
296 Emacs or XEmacs binary or just the command name, as long as it is in the
297 @env{PATH}.
299 @example
300 EMACS    = xemacs
301 SITEFLAG = -no-site-file
302 @end example
304 Running @code{make} should compile the Muse source files in the
305 @file{lisp} directory.
307 @subheading Installation
309 Muse may be installed into your file hierarchy by doing the following.
311 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
312 where you want the source and compiled Muse files to be installed and
313 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
314 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
315 Compilation section if you are using XEmacs.
317 If you are installing Muse on a Debian or Ubuntu system, you might want
318 to change the value of @env{INSTALLINFO} as specified in
319 @file{Makefile.defs}.
321 If you wish to install Muse to different locations than the defaults
322 specify, edit @file{Makefile.defs} accordingly.
324 Run @code{make} as a normal user.
326 Run @code{make install} as the root user if you have chosen installation
327 locations that require this.
330 @node Getting Started, Projects, Installation, Top
331 @comment  node-name,  next,  previous,  up
332 @chapter Getting Started
333 @cindex settings
335 To use Muse, add the directory containing its files to your
336 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
337 the authoring mode, and the styles you wish to publish to.  An example
338 follows.
340 @lisp
341 (add-to-list 'load-path "<path to Muse>")
343 (require 'muse-mode)     ; load authoring mode
345 (require 'muse-html)     ; load publishing styles I use
346 (require 'muse-latex)
347 (require 'muse-texinfo)
348 (require 'muse-docbook)
349 @end lisp
351 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
352 an input document to any available style.  If you enable
353 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
354 command will be bound to @kbd{C-c C-t}.
356 If the currently opened file is part of a defined project in
357 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
359 You should also type @kbd{M-x customize-group}, and give the name
360 @samp{muse}.  Each of the options has its own documentation.
363 @node Projects, Keystroke Summary, Getting Started, Top
364 @comment  node-name,  next,  previous,  up
365 @chapter Creating and Managing Muse Projects
366 @cindex projects
368 Often you will want to publish all the files within a directory to a
369 particular set of output styles automatically.  To support, Muse
370 allows for the creations of "projects".  Here is a sample project, to
371 be defined in your @file{.emacs} file.
373 @lisp
374 (require 'muse-project)
376 (setq muse-project-alist
377       '(("website"                      ; my various writings
378          ("~/Pages" :default "index")
379          (:base "html" :path "~/public_html")
380          (:base "pdf" :path "~/public_html/pdf"))))
381 @end lisp
383 The above defines a project named "website", whose files are located
384 in the directory @file{~/Pages}.  The default page to visit is
385 @file{index}.  When this project is published, each page will be
386 output as HTML to the directory @file{~/public_html}, and as PDF to
387 the directory @file{~/public_html/pdf}.  Within any project page, you
388 may create a link to other pages using the syntax @samp{[[pagename]]}.
390 By default, Muse expects all project files to have the file extension
391 @file{.muse}. Files without this extension will not be associated with
392 Muse mode and will not be considered part of any project, even if they
393 are within a project directory.
395 If you don't want to use @file{.muse}, you can customize the extension
396 by setting the value of @code{muse-file-extension}.
398 If you don't want to use any extension at all, and want Muse to
399 autodetect project files based on their location, then add the following
400 to your Muse settings file.
402 @lisp
403 (setq muse-file-extension nil
404       muse-mode-auto-p t)
405 @end lisp
407 If you would like to include only some files from a directory in a Muse
408 project, you may use a regexp in place of @file{~/Pages} in the example.
410 @c PRE3_03: Give more examples
411 @c PRE3_03: Describe :set and other options fully
413 @node Keystroke Summary, Markup Rules, Projects, Top
414 @comment  node-name,  next,  previous,  up
415 @chapter Keys Used in Muse Mode
416 @cindex keystrokes
418 This is a summary of keystrokes available in every Muse buffer.
420 @table @kbd
422 @item C-c C-a (`muse-index')
423 Display an index of all known Muse pages.
425 @item C-c C-b (`muse-find-backlinks')
426 Find all pages that link to this page.
428 @item C-c C-c (`muse-follow-name-at-point')
429 Visit the link at point.
431 @item C-c C-e (`muse-edit-link-at-point')
432 Edit link at point.
434 @item C-c C-f (`muse-project-find-file')
435 Open another Muse page.  Prompt for the name.
437 @item C-c C-i (`muse-insert-tag')
438 Insert a tag interactively.
440 @item C-c C-l (`font-lock-mode')
441 Toggle font lock / highlighting for the current buffer.
443 @item C-c C-p (`muse-project-publish')
444 Publish any Muse pages that have changed.
446 @item C-c C-s (`muse-search')
447 Find text in all files of the current project.
449 @item C-c C-t (`muse-project-publish-this-file')
450 Publish the currently-visited file.  Prompt for the style if the current
451 file can be published using more than one style.
453 @item C-c C-T (`muse-publish-this-file')
454 Publish the currently-visited file.  Prompt for both the style and
455 output directory.
457 @item C-c C-v (`muse-browse-result')
458 Show the published result of this page.
460 @item C-c = (`muse-what-changed')
461 Diff this page against the last backup version.
463 @item C-c TAB l (`muse-insert-relative-link-to-file')
464 Insert a link to a file interactively.
466 @item C-c TAB t (`muse-insert-tag')
467 Insert a tag interactively.
469 @item C-c TAB u (`muse-insert-url')
470 Insert a URL interactively.
472 @item TAB
473 Move to the next Wiki reference.
475 @item S-TAB
476 Move to the previous Wiki reference.
478 @item M-TAB
479 Complete the name of a page from the current project at point.
481 @item M-RET
482 Insert a new list item at point, indenting properly.
484 @item C-<
485 Decrease the indentation of the list item at point.
487 @item C->
488 Increase the indentation of the list item at point.
490 @end table
493 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
494 @comment  node-name,  next,  previous,  up
495 @chapter Rules for Using Markup
496 @cindex markup
498 A Muse document uses special, contextual markup rules to determine how
499 to format the output result.  For example, if a paragraph is indented,
500 Muse assumes it should be quoted.
502 There are not too many markup rules, and all of them strive to be as
503 simple as possible so that you can focus on document creation, rather
504 than formatting.
506 @menu
507 * Paragraphs::                  Paragraphs: centering and quoting.
508 * Headings::                    Levels of headings.
509 * Directives::                  Directives at the beginning of a
510                                   document.
511 * Emphasizing Text::            Bold, italicized, and underlined text.
512 * Footnotes::                   Making notes to be shown at the end.
513 * Verse::                       Indicating poetic stanzas.
514 * Lists::                       Lists of items.
515 * Tables::                      Generation of data tables.
516 * Explicit Links::              Hyperlinks and email addresses with
517                                   descriptions.
518 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
519                                   links.
520 * Images::                      Publishing and displaying images.
521 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
522 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
523                                   for extensibility.
524 * Comments::                    Lines to omit from published output.
525 * Tag Summary::                 Tags that Muse recognizes.
526 @end menu
528 @node Paragraphs, Headings, Markup Rules, Markup Rules
529 @comment  node-name,  next,  previous,  up
530 @section Paragraphs: centering and quoting
531 @cindex paragraphs
533 Paragraphs in Muse must be separated by a blank line.
535 @cindex paragraphs, centered
536 @subheading Centered paragraphs and quotations
538 A line that begins with six or more columns of whitespace (either tabs
539 or spaces) indicates a centered paragraph.  Alternatively, you can use
540 the @verb{|<center>|} tag to surround regions that are to be published as
541 centered paragraphs.
543 @cindex paragraphs, quoted
544 @cindex quotations
545 But if a line begins with whitespace, though less than six columns, it
546 indicates a quoted paragraph.  Alternatively, you can use the
547 @verb{|<quote>|} tag to surround regions that are to be published as
548 quoted paragraphs.
550 @cindex examples
551 @cindex monospace, rendering blocks
552 @cindex HTML, rendering blocks in monospace
553 @subheading Literal paragraphs
555 The @verb{|<example>|} tag is used for examples, where whitespace should
556 be preserved, the text rendered in monospace, and any characters special
557 to the output style escaped.
559 @cindex literal text
560 @cindex HTML, inserting a raw block
561 There is also the @verb{|<literal>|} tag, which causes a marked block to
562 be entirely left alone.  This can be used for inserting a hand-coded
563 HTML blocks into HTML output, for example.
565 @node Headings, Directives, Paragraphs, Markup Rules
566 @comment  node-name,  next,  previous,  up
567 @section Levels of headings
568 @cindex headings
570 A heading becomes a chapter or section in printed output -- depending on
571 the style.  To indicate a heading, start a new paragraph with one or
572 more asterices, followed by a space and the heading title.  Then begin
573 another paragraph to enter the text for that section.
575 All levels of headings will be published.  Most publishing styles only
576 distinguish the between the first 4 levels, however.
578 @example
579 * First level
581 ** Second level
583 *** Third level
585 **** Fourth level
586 @end example
588 @node Directives, Emphasizing Text, Headings, Markup Rules
589 @comment  node-name,  next,  previous,  up
590 @section Directives at the beginning of a document
591 @cindex directives
593 Directives are lines beginning with the @samp{#} character that come
594 before any paragraphs or sections in the document.  Directives are of
595 the form ``#directive content of directive''.  You can use any
596 combination of uppercase and lowercase letters for directives, even if
597 the directive is not in the list below.
599 The @code{muse-publishing-directive} function may be used in header and
600 footer text to access directives.  For example, to access the
601 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
603 The following is a list of directives that Muse uses.
605 @table @code
606 @cindex #author
607 @item #author
608 The author of this document.
610 If this is not specified, Muse will attempt to figure it out from the
611 @code{user-full-name} variable.
613 @cindex #date
614 @item #date
615 The date that the document was last modified.
617 This is used by publishing styles that are able to embed the date
618 information.
620 @cindex #desc
621 @item #desc
622 A short description of this document.
624 This is used by the @code{journal} publishing style to embed information
625 inside of an RSS/RDF feed.
627 @cindex #title
628 @item #title
629 The title of this document.
631 If this is not specified, the name of the file is used.
633 @end table
635 @node Emphasizing Text, Footnotes, Directives, Markup Rules
636 @comment  node-name,  next,  previous,  up
637 @section Bold, italicized, and underlined text
638 @cindex emphasizing text
639 @cindex underlining text
640 @cindex italicizing text
641 @cindex verbatim text
642 @cindex monospace, rendering words
644 To emphasize text, surround it with certain specially recognized
645 characters.
647 @example
648 *emphasis*
649 **strong emphasis**
650 ***very strong emphasis***
651 _underlined_
652 =verbatim and monospace=
653 @end example
655 @cindex WYSIWYG
656 While editing a Muse document in Muse mode, these forms of emphasis will
657 be highlighted in a WYSIWYG manner.  Each of these forms may span
658 multiple lines.
660 Verbatim text will be colored as gray by default.  To change this,
661 customize @code{muse-verbatim-face}.
663 You can also use the @verb{|<code>|} tag to indicate verbatim and
664 monospace text.  This is handy for regions that have an ``='' in them.
666 @node Footnotes, Verse, Emphasizing Text, Markup Rules
667 @comment  node-name,  next,  previous,  up
668 @section Making notes to be shown at the end
669 @cindex footnotes
671 A footnote reference is simply a number in square brackets.  To define
672 the footnote, place this definition at the bottom of your file.
673 @samp{footnote-mode} can be used to greatly facilitate the creation of
674 these kinds of footnotes.
676 Footnotes are defined by the same number in brackets occurring at the
677 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
678 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
679 the point of insertion.
681 @node Verse, Lists, Footnotes, Markup Rules
682 @comment  node-name,  next,  previous,  up
683 @section Indicating poetic stanzas
684 @cindex verses
685 @cindex poetry
687 Poetry requires that whitespace be preserved, but without resorting to
688 monospace.  To indicate this, use the following markup, reminiscent of
689 email quotations.
691 @example
692 > A line of Emacs verse;
693 >   forgive its being so terse.
694 @end example
696 You can also use the @verb{|<verse>|} tag, if you prefer.
698 @example
699 <verse>
700 A line of Emacs verse;
701   forgive its being so terse.
702 </verse>
703 @end example
705 @cindex verses, multiple stanzas
706 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
707 follows.
709 @example
710 <verse>
711 A line of Emacs verse;
712   forgive its being so terse.
714 In terms of terse verse,
715   you could do worse.
716 </verse>
717 @end example
719 @node Lists, Tables, Verse, Markup Rules
720 @comment  node-name,  next,  previous,  up
721 @section Lists of items
722 @cindex lists
724 Lists are given using special characters at the beginning of a line.
725 Whitespace must occur before bullets or numbered items, to distinguish
726 from the possibility of those characters occurring in a real sentence.
728 @cindex lists, bullets
729 These are rendered as a bullet list.
731 @example
732 - bullet item one
733 - bullet item two
734 @end example
736 @cindex lists, enumerated
737 An enumerated list follows.
739 @example
740 1. Enum item one
741 2. Enum item two
742 @end example
744 @cindex lists, definitions
745 Here is a definition list.
747 @example
748 Term1 ::
749   This is a first definition
750   And it has two lines;
751   no, make that three.
753 Term2 ::
754   This is a second definition
755 @end example
757 @node Tables, Explicit Links, Lists, Markup Rules
758 @comment  node-name,  next,  previous,  up
759 @section Generation of data tables
760 @cindex tables
762 @cindex tables, simple
763 Only very simple tables are supported.  The syntax is as follows.
765 @example
766 Double bars  || Separate header fields
768 Single bars   | Separate body fields
769 Here are more | body fields
771 Triple bars ||| Separate footer fields
772 @end example
774 Some publishing styles require header fields to come first, then footer
775 fields, and then the body fields.  You can use any order for these
776 sections that you like, and Muse will re-order them for you at
777 publish-time.
779 If you wish to disable table generation for one Muse file, add the
780 directive @samp{#disable-tables t} to the top of the file.
782 @node Explicit Links, Implicit Links, Tables, Markup Rules
783 @comment  node-name,  next,  previous,  up
784 @section Hyperlinks and email addresses with descriptions
785 @cindex links, explicit
787 A hyperlink can reference a URL, or another page within a Muse
788 project.  In addition, descriptive text can be specified, which should
789 be displayed rather than the link text in output styles that supports
790 link descriptions.  The syntax is as follows.
792 @example
793 [[link target][link description]]
794 [[link target without description]]
795 @end example
797 Thus, the current maintainer's homepage for Muse can be found
798 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
799 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
801 @node Implicit Links, Images, Explicit Links, Markup Rules
802 @comment  node-name,  next,  previous,  up
803 @section Bare URLs, WikiNames, and InterWiki links
804 @cindex links, implicit
805 @cindex links, raw
807 @cindex URLs
808 @cindex Email addresses
810 A URL or email address encountered in the input text is published as a
811 hyperlink.  These kind of links are called @dfn{implicit links} because
812 they are not separated from the rest of the Muse document in any way.
814 Some characters in URLs will prevent Muse from recognizing them as
815 implicit links. If you want to link to a URL containing spaces or any of
816 the characters ``][,"'`()<>^'', you will have to make the link
817 explicit. The punctuation characters ``.,;:'' are also not recognized as
818 part of a URL when they appear at its end. For information on how to
819 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
820 addresses with descriptions}.
822 @cindex WikiNames
823 If the @command{muse-wiki} module is loaded, another form of implicit
824 link will be made available.  WikiNames, which are typed in CamelCase,
825 are highlighted and published as links, provided that the file they
826 refer to exists.
828 Customization of WikiName recognition may be accomplished by editing the
829 @code{muse-wiki-wikiword-regexp} option and subsequently running
830 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
831 If you use the Customize interface, the latter will be done
832 automatically.
834 @cindex InterWiki links
835 @cindex inter-project links
836 The @command{muse-wiki} module also allows for InterWiki links.  These
837 are similar to WikiWords, but they specify both the project and page of
838 a file.  The names of your project entries in @code{muse-project-alist}
839 will be used as InterWiki names by default.  Several examples follow.
841 @example
842 Blog::DocumentingMuse
843 Projects#EmacsMuse
844 Website
845 @end example
847 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
848 the project name, and @samp{DocumentingMuse} is the page name.  In the
849 second example, @samp{#} is the interwiki delimiter.  If the name of a
850 project occurs by itself in text, like the third case, it will be
851 colorized and published as a link to the default page of the given
852 project.
854 Customization of interwiki links may be accomplished by editing the
855 @code{muse-wiki-interwiki-alist} option.
857 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
858 @comment  node-name,  next,  previous,  up
859 @section Publishing and displaying images
860 @cindex images
861 @cindex links, with images
862 @subheading Image links
864 Links to images may be used in either the target or the description, or
865 both.  Thus, the following code will publish as a clickable image that
866 points to @url{http://www.mwolson.org/}.
868 @example
869 [[http://www.mwolson.org/][/static/logos/site-logo.png]]
870 @end example
872 @cindex images, displaying
873 @cindex images, local
874 @subheading Displaying images in Muse mode
875 If a link to a locally-available image is encountered in the link
876 description, Muse mode will attempt to display it if your version of
877 Emacs permits this.
879 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
880 by setting the @code{muse-colors-inline-images} option to @code{nil}.
882 The method for finding images may be altered by customizing the
883 @code{muse-colors-inline-image-method} option.  One useful value for
884 this option is @code{muse-colors-use-publishing-directory}, which tells
885 Muse mode to look in the directory where the current file will be
886 published.  The default is to look in the current directory.  Relative
887 paths like @samp{../pics/} should work for either setting.
889 Eventually, it is hoped that Muse will be able to copy images from the a
890 ``source'' directory to a publishing directory by customizing
891 @code{muse-project-alist}, but this has not been implemented yet.
893 @cindex images, without descriptions
894 @cindex images, inlined
895 @subheading Publishing simple images
896 The following example will display correctly and publish correctly if a
897 @acronym{PNG} file called @file{TestLogo.png} exists in the
898 @file{../pics/} directory.  If text is on the same line as the picture,
899 it will remain so in the output.
901 @example
902 [[../myimage.png]]
903 @end example
905 @cindex images, captions
906 @subheading Publishing images with captions
907 If you want to add a caption to an image, use the following syntax.
908 This will center the image (if the output format supports it) and add a
909 centered caption below the picture.  Formats that do not support
910 centering the image will instead leave it against the left margin.
912 @example
913 [[../pics/mycat.png][My cat Dexter]]
914 @end example
916 Images with captions may only occur in their own paragraphs, with no
917 text on the same line.  Otherwise, the published output will not be
918 syntactically correct.
920 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
921 @comment  node-name,  next,  previous,  up
922 @section Inserting a horizontal line or anchor
924 @cindex horizontal rules
925 @cindex dashes
926 @subheading Horizontal Rules
928 Four or more dashes indicate a horizontal rule.  Be sure to put blank
929 lines around it, or it will be considered part of the proceeding or
930 following paragraph!
932 @cindex anchors
933 @cindex links, with target on same page
934 @subheading Anchors
936 If you begin a line with "#anchor" -- where "anchor" can be any word
937 that doesn't contain whitespace -- it defines an anchor at that point
938 into the document.  This point can be referenced using "page#anchor" as
939 the target in a Muse link.
941 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
942 @comment  node-name,  next,  previous,  up
943 @section Evaluating Emacs Lisp code in documents for extensibility
944 @cindex lisp, embedded
946 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
947 which is the only Muse tag supported in a style's header and footer
948 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
949 text you wish.  The inserted output will get marked up, if the
950 @verb{|<lisp>|} tag appears within the main text of the document.
952 @example
953 <lisp>(concat "This form gets " "inserted")</lisp>
954 @end example
956 @cindex lisp, and insert command
957 Note that you should not use the @code{insert} command within a set of
958 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
959 tags will be automatically inserted into the document.
961 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
962 @comment  node-name,  next,  previous,  up
963 @section Lines to omit from published output
964 @cindex comments
965 @cindex publishing, omitting lines
967 Use the following syntax to indicate a comment.  Comments will not be
968 published.
970 @example
971 ; Comment text goes here.
972 @end example
974 That is, only a semi-colon at the beginning of a line, followed by a
975 literal space, will cause that line to be treated as a comment.
977 @node Tag Summary, , Comments, Markup Rules
978 @comment  node-name,  next,  previous,  up
979 @section Tags that Muse recognizes
980 @cindex tags
981 @cindex inserting files at publish time
982 @cindex publishing, including markup in headers and footers
983 @cindex publishing, inserting files
985 Muse has several built-in tags that may prove useful during publishing.
986 @xref{muse-publish-markup-tags}, to see how to customize the tags that
987 Muse uses, as well as make your own tags.
989 @subheading Syntax
991 If a tag takes arguments, it will look like this, where ``tagname'' is
992 the name of the tag.
994 @example
995 <tagname arg1="string1" arg2="string2">
996 @end example
998 If you want the tag to look like it came straight from an XHTML
999 document, you can alternatively do the following.
1001 @example
1002 <tagname arg1="string1" arg2="string2" />
1003 @end example
1005 If a tag surrounds some text, it will look like this.
1007 @example
1008 <tagname>Some text</tagname>
1009 @end example
1011 If a tag surrounds a large region, it will look like this.
1013 @example
1014 <tagname>
1015 Some text.
1016 Some more text.
1017 </tagname>
1018 @end example
1020 @subheading Tag listing
1022 This is the complete list of tags that Muse accepts, including those
1023 that were mentioned in previous sections.
1025 @table @samp
1027 @item <class>
1028 If publishing to HTML, surround the given text with a @verb{|<span>|}
1029 tag.  It takes one argument called ``name'' that specifies the class
1030 attribute of the @verb{|<span>|} tag.
1032 If publishing to a different format, do nothing extra to the text.
1034 @item <code>
1035 Treat the text surrounded by the tag as if they were enclosed in equal
1036 signs, that is, make it monospace.
1038 @item <command>
1039 Run a command on the region, replacing the region with the result of the
1040 command.  The command is specified with the ``interp'' argument.  If no
1041 value for ``interp'' is given, pass the entire region to the shell.
1043 The ``markup'' argument controls how this section is marked up.
1045 If it is omitted, publish the region with the normal Muse rules.
1047 If "nil", do not mark up the region at all, but prevent Muse from
1048 further interpreting it.
1050 If "example", treat the region as if it was surrounded by the
1051 @verb{|<example>|} tag.
1053 If "verse", treat the region as if it was surrounded by the
1054 @verb{|<verse>|} tag, to preserve newlines.
1056 Otherwise, it should be the name of a function to call, with the buffer
1057 narrowed to the region.
1059 @item <comment>
1060 Treat the entire region as a comment.  If the option
1061 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1062 publish it using the comment syntax of the current publishing style.
1064 @item <contents>
1065 Publish a Table of Contents.  This will either be inserted in-place or
1066 at the beginning of the document, depending on your publishing style.
1067 It does not have a delimiting tag.
1069 By default, only 2 levels of headings will be included in the generated
1070 Table of Contents.  To change this globally, customize the
1071 @var{muse-publish-contents-depth} option.  To change this only for the
1072 current tag, use the ``depth'' argument.
1074 @item <example>
1075 Publish the region in monospace, preserving the newlines in the region.
1076 This is useful for snippets of code.
1078 @item <include>
1079 Insert the given file at the current location during publishing.  The
1080 basic use of this tag is as follows, replacing ``included_file'' with
1081 the name of the file that you want to include.
1083 @example
1084 <include file="included_file">
1085 @end example
1087 The ``markup'' argument controls how this section is marked up.
1089 If it is omitted, publish the included text with the normal Muse
1090 rules.
1092 If "nil", do not mark up the included text at all.
1094 If "example", treat the included text as if it was surrounded by the
1095 @verb{|<example>|} tag.
1097 If "verse", treat the included text as if it was surrounded by the
1098 @verb{|<verse>|} tag, to preserve newlines.
1100 Otherwise, it should be the name of a function to call after inserting
1101 the file with the buffer narrowed to the section inserted.
1103 @item <lisp>
1104 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1105 The result is then inserted into the document, so you do not need to
1106 explicitly call @code{insert}.  All text properties are removed from the
1107 resulting text.
1109 This tag takes the ``markup'' argument.  See the description of
1110 @verb{|<command>|} for details.
1112 @item <literal>
1113 Make sure that the text enclosed by this tag is published without
1114 escaping it in any way.  This is useful for inserting markup directly
1115 into the published document, when Muse does not provide the desired
1116 functionality.
1118 @item <markup>
1119 Mark up the text between the initial and ending tags.  The markup
1120 command to use may be specified by the ``function'' argument.  The
1121 standard Muse markup routines are used by default if no ``function''
1122 argument is provided.
1124 This is useful for marking up regions in headers and footers.  One
1125 example that comes to mind is generating a published index of all of the
1126 files in the current project by doing the following.
1128 @example
1129 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1130 @end example
1132 @item <perl>
1133 Run the @command{perl} language interpreter on the region, replacing the
1134 region with the result of the command.
1136 This tag takes the ``markup'' argument.  See the description of
1137 @verb{|<command>|} for details.
1139 @item <python>
1140 Run the @command{python} language interpreter on the region, replacing
1141 the region with the result of the command.
1143 This tag takes the ``markup'' argument.  See the description of
1144 @verb{|<command>|} for details.
1146 @item <quote>
1147 Publish the region as a blockquote.  This will either be inserted
1148 in-place or at the beginning of the document, depending on your
1149 publishing style.  It does not have a delimiting tag.
1151 @item <ruby>
1152 Run the @command{ruby} language interpreter on the region, replacing the
1153 region with the result of the command.
1155 This tag takes the ``markup'' argument.  See the description of
1156 @verb{|<command>|} for details.
1158 @item <verbatim>
1159 This is used when you want to prevent Muse from trying to interpret some
1160 markup.  Surround the markup in @verb{|<verbatim>|} and
1161 @verb{|</verbatim>|}, and it will not be interpreted.
1163 This tag was used often in previous versions of Muse because they did
1164 not support whole-document escaping of specials.  Now, it will only be
1165 needed for other tags, and perhaps footnotes as well.
1167 @item <verse>
1168 Preserve the newlines in the region.  In formats like HTML, newlines are
1169 removed by default, hence the need for this tag.  In other publishing
1170 styles, this tag may cause the text to be indented slightly in a way
1171 that looks nice for poetry and prose.
1173 @end table
1175 @node Publishing Styles, Extending Muse, Markup Rules, Top
1176 @comment  node-name,  next,  previous,  up
1177 @chapter Publishing Various Types of Documents
1178 @cindex publishing styles
1180 One of the principle features of Muse is the ability to publish a simple
1181 input text to a variety of different output styles.  Muse also makes it
1182 easy to create new styles, or derive from an existing style.
1184 @menu
1185 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1186 * Book::                        Publishing entries into a compilation.
1187 * DocBook::                     Publishing in DocBook XML form.
1188 * HTML::                        Publishing in HTML or XHTML form.
1189 * Journal::                     Keeping a journal or blog.
1190 * LaTeX::                       Publishing LaTeX documents.
1191 * Poem::                        Publish a poem to LaTex or PDF.
1192 * Texinfo::                     Publish entries to Texinfo format or PDF.
1193 @end menu
1195 @node Blosxom, Book, Publishing Styles, Publishing Styles
1196 @comment  node-name,  next,  previous,  up
1197 @section Integrating Muse and pyblosxom.cgi
1198 @cindex blog, one-file-per-entry style
1200 The Blosxom publishing style publishes a tree of categorised files to a
1201 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1202 In other words, each blog entry corresponds with one file.
1204 @menu
1205 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1206 * Blosxom Entries::             Format of a Blosxom entry and automation.
1207 * Blosxom Options::             Blosxom styles and options provided.
1208 @end menu
1210 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1211 @comment  node-name,  next,  previous,  up
1212 @subsection Other tools needed for the Blosxom style
1214 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1215 installed on a machine that you have upload access to.
1217 The following additional components are required in order to make the
1218 date of blog entries display as something sensible.
1220 @enumerate
1221 @item
1222 A script to gather date directives from the entire blog tree into a
1223 single file.  The file must associate a blog entry with a date.
1225 @item
1226 A plugin for (py)blosxom that reads this file.
1227 @end enumerate
1229 These 2 things are provided for @command{pyblosxom.cgi} in the
1230 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1231 former service, while @file{hardcodedates.py} provides the latter
1232 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1233 script will be found/written.
1235 Here is a sample listing from my @file{timestamps} file, which maps
1236 each file to a date.  This can really be in any format, as long as your
1237 date-gathering script and your plugin can both understand it.
1239 @example
1240 2005-04-01-14-16 personal/paper_cranes
1241 2005-03-21 personal/spring_break_over
1242 2004-10-24 personal/finished_free_culture
1243 @end example
1245 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1246 @file{getstamps.py}.  Note that you will need to set the current
1247 directory to where your Muse files are, execute @file{getstamps.py}, and
1248 then move the generated timestamps file to your publishing directory.
1250 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1251 @comment  node-name,  next,  previous,  up
1252 @subsection Format of a Blosxom entry and automation
1254 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1255 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1256 plus whatever normal content is desired.
1258 The date directive is not used directly by @command{pyblosxom.cgi} or
1259 this program.  You need to have the two additional items from the former
1260 section to make use of this feature.
1262 There is a function called @code{muse-blosxom-new-entry} that will
1263 automate the process of making a new blog entry.  To make use of it, do
1264 the following.
1266 @itemize @bullet
1267 @item
1268 Customize @code{muse-blosxom-base-directory} to the location that your
1269 blog entries are stored.
1271 @item
1272 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1273 use the following code to assign this function to @kbd{C-c p l'}.
1275 @example
1276 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1277 @end example
1279 @item
1280 You should create your directory structure ahead of time under your base
1281 directory.  These directories, which correspond with category names, may
1282 be nested.
1284 @item
1285 When you enter this key sequence, you will be prompted for the category
1286 of your entry and its title.  Upon entering this information, a new file
1287 will be created that corresponds with the title, but in lowercase
1288 letters and having special characters converted to underscores.  The
1289 title and date directives will be inserted automatically.
1290 @end itemize
1292 @node Blosxom Options, , Blosxom Entries, Blosxom
1293 @comment  node-name,  next,  previous,  up
1294 @subsection Blosxom styles and options provided
1296 The following styles and options are available in the Blosxom publishing
1297 style.
1299 @subheading Styles provided
1301 @table @code
1303 @cindex publishing styles, blosxom-html
1304 @item blosxom-html
1305 Publish Blosxom entries in HTML form.
1307 @cindex publishing styles, blosxom-xhtml
1308 @item blosxom-xhtml
1309 Publish Blosxom entries in XHTML form.
1311 @end table
1313 @subheading Options provided
1315 @table @code
1317 @item muse-blosxom-extension
1318 Default file extension for publishing Blosxom files.
1320 @item muse-blosxom-header
1321 Header used for publishing Blosxom files.
1323 This may be text or a filename.
1325 @item muse-blosxom-footer
1326 Footer used for publishing Blosxom files.
1328 This may be text or a filename.
1330 @item muse-blosxom-base-directory
1331 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1333 This is the top-level directory where your blog entries may be found
1334 locally.
1336 @end table
1338 @node Book, DocBook, Blosxom, Publishing Styles
1339 @comment  node-name,  next,  previous,  up
1340 @section Publishing entries into a compilation
1342 This publishing style is used to output ``books'' in LaTeX or PDF
1343 format.
1345 Each page will become a separate chapter in the book, unless the style
1346 keyword @option{:nochapters} is used, in which case they are all run
1347 together as if one giant chapter.
1349 You will need to call the @code{muse-book-publish-project} function in
1350 order to publish this style.  An example of this may be found in John
1351 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
1353 @subheading Styles provided
1355 @table @code
1357 @cindex publishing styles, book-latex
1358 @item book-latex
1359 Publish a book in LaTeX form.  The header and footer are different than
1360 the normal LaTeX publishing mode.
1362 @cindex publishing styles, book-pdf
1363 @item book-pdf
1364 Publish a book in PDF form.  The header and footer are different than
1365 the normal PDF publishing mode.
1367 @end table
1369 @subheading Options provided
1371 @table @code
1373 @item muse-book-before-publish-hook
1374 A hook run in the book buffer before it is marked up.
1376 @item muse-book-after-publish-hook
1377 A hook run in the book buffer after it is marked up.
1379 @item muse-book-latex-header
1380 Header used for publishing books to LaTeX.
1382 This may be text or a filename.
1384 @item muse-book-latex-footer
1385 Footer used for publishing books to LaTeX.
1387 This may be text or a filename.
1389 @end table
1391 @node DocBook, HTML, Book, Publishing Styles
1392 @comment  node-name,  next,  previous,  up
1393 @section Publishing in DocBook XML form
1395 This publishing style is used to generate DocBook XML files.
1397 @subheading Styles provided
1399 @table @code
1401 @cindex publishing styles, docbook
1402 @item docbook
1404 @end table
1406 @subheading Options provided
1408 @table @code
1410 @item muse-docbook-extension
1411 Default file extension for publishing DocBook XML files.
1413 @item muse-docbook-header
1414 Header used for publishing DocBook XML files.
1416 This may be text or a filename.
1418 @item muse-docbook-footer
1419 Footer used for publishing DocBook XML files.
1421 This may be text or a filename.
1423 @item muse-docbook-markup-regexps
1424 List of markup rules for publishing a Muse page to DocBook XML.
1426 @item muse-docbook-markup-functions
1427 An alist of style types to custom functions for that kind of text.
1429 @item muse-docbook-markup-strings
1430 Strings used for marking up text.
1432 These cover the most basic kinds of markup, the handling of which
1433 differs little between the various styles.
1435 @item muse-docbook-markup-specials
1436 A table of characters which must be represented specially.
1438 @item muse-docbook-encoding-default
1439 The default Emacs buffer encoding to use in published files.
1440 This will be used if no special characters are found.
1442 @item muse-docbook-charset-default
1443 The default DocBook XML charset to use if no translation is
1444 found in @code{muse-docbook-encoding-map}.
1446 @item muse-docbook-encoding-map
1447 An alist mapping emacs coding systems to appropriate DocBook charsets.
1448 Use the base name of the coding system (i.e. without the -unix).
1450 @end table
1452 @node HTML, Journal, DocBook, Publishing Styles
1453 @comment  node-name,  next,  previous,  up
1454 @section Publishing in HTML or XHTML form
1456 This publishing style is capable of producing HTML or XHTML documents.
1458 @subheading Styles provided
1460 @table @code
1462 @cindex publishing styles, html
1463 @item html
1464 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1466 @item xhtml
1467 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1469 @end table
1471 @subheading Options provided
1473 If an HTML option does not have a corresponding XHTML option, it will
1474 be used for both of these publishing styles.
1476 @table @code
1478 @item muse-html-extension
1479 Default file extension for publishing HTML files.
1481 @item muse-xhtml-extension
1482 Default file extension for publishing XHTML files.
1484 @item muse-html-style-sheet
1485 Store your stylesheet definitions here.
1487 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1488 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1489 @verb{|<lisp>|} markup tags.
1491 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1492 properly.
1494 @item muse-html-header
1495 Header used for publishing HTML files.
1497 This may be text or a filename.
1499 @item muse-html-footer
1500 Footer used for publishing HTML files.
1502 This may be text or a filename.
1504 @item muse-xhtml-header
1505 Header used for publishing XHTML files.
1507 This may be text or a filename.
1509 @item muse-xhtml-footer
1510 Footer used for publishing XHTML files.
1512 This may be text or a filename.
1514 @item muse-html-anchor-on-word
1515 When true, anchors surround the closest word.
1517 This allows you to select them in a browser (i.e. for pasting), but has
1518 the side-effect of marking up headers in multiple colors if your header
1519 style is different from your link style.
1521 @item muse-html-table-attributes
1522 The attribute to be used with HTML @verb{|<table>|} tags.
1524 If you want to make more-complicated tables in HTML, surround the HTML
1525 with the @verb{|literal|} tag, so that it does not get escaped.
1527 @item muse-html-markup-regexps
1528 List of markup rules for publishing a Muse page to HTML.
1530 @item muse-html-markup-functions
1531 An alist of style types to custom functions for that kind of text.
1533 @item muse-html-markup-strings
1534 Strings used for marking up text as HTML.
1536 These cover the most basic kinds of markup, the handling of which
1537 differs little between the various styles.
1539 @item muse-xhtml-markup-strings
1540 Strings used for marking up text as XHTML.
1542 These cover the most basic kinds of markup, the handling of which
1543 differs little between the various styles.
1545 @item muse-html-markup-tags
1546 A list of tag specifications, for specially marking up HTML.
1547 @xref{muse-publish-markup-tags}, for more information.
1549 @item muse-html-markup-specials
1550 A table of characters which must be represented specially.  By default,
1551 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1553 @item muse-html-meta-http-equiv
1554 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1556 @item muse-html-meta-content-type
1557 The content type used for the HTML @verb{|<meta>|} tag.
1559 If you are striving for XHTML 1.1 compliance, you may want to change
1560 this to ``application/xhtml+xml''.
1562 @item muse-html-meta-content-encoding
1563 The charset to append to the HTML @verb{|<meta>|} tag.
1565 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1566 and determine the HTML charset from emacs's coding.  If set to a string,
1567 this string will be used to force a particular charset.
1569 @item muse-html-charset-default
1570 The default HTML meta charset to use if no translation is found in
1571 @code{muse-html-encoding-map}.
1573 @item muse-html-encoding-default
1574 The default Emacs buffer encoding to use in published files.
1575 This will be used if no special characters are found.
1577 @item muse-html-encoding-map
1578 An alist mapping emacs coding systems to appropriate HTML charsets.
1579 Use the base name of the coding system (i.e. without the -unix).
1581 @end table
1583 @node Journal, LaTeX, HTML, Publishing Styles
1584 @comment  node-name,  next,  previous,  up
1585 @section Keeping a journal or blog
1586 @cindex journal
1587 @cindex blog, journal style
1589 The module facilitates the keeping and publication of a journal.  When
1590 publishing to HTML, it assumes the form of a web log, or blog.
1592 The input format for each entry is as follows.
1594 @example
1595 * 20040317: Title of entry
1597 text for the entry.
1599 <qotd>
1600 "You know who you are. It comes down to a simple gut check: You
1601 either love what you do or you don't. Period." -- P. Bronson
1602 </qotd>
1603 @end example
1605 The "qotd", or Quote of the Day, is entirely optional.  When generated
1606 to HTML, this entry is rendered as the following.
1608 @example
1609 <div class="entry">
1610   <div class="entry-qotd">
1611     <h3>Quote of the Day:</h3>
1612     <p>"You know who you are. It comes down to a simple gut
1613       check: You either love what you do or you don't. Period."
1614       -- P. Bronson</p>
1615   </div>
1616   <div class="entry-body">
1617     <div class="entry-head">
1618       <div class="entry-date">
1619         <span class="date">March 17, 2004</span>
1620       </div>
1621       <div class="entry-title">
1622         <h2>Title of entry</h2>
1623       </div>
1624     </div>
1625     <div class="entry-text">
1626       <p>Text for the entry.</p>
1627     </div>
1628   </div>
1629 </div>
1630 @end example
1632 The plurality of "div" tags makes it possible to display the entries in
1633 any form you wish, using a CSS style.
1635 Also, an .RDF file can be generated from your journal by publishing it
1636 with the "rdf" style.  It uses the first two sentences of the first
1637 paragraph of each entry as its "description", and auto-generates tags
1638 for linking to the various entries.
1640 @subheading Styles provided
1642 @table @code
1644 @cindex publishing styles, journal-html
1645 @item journal-html
1646 Publish journal entries as an HTML document.
1648 @cindex publishing styles, journal-xhtml
1649 @item journal-xhtml
1650 Publish journal entries as an XHTML document.
1652 @cindex publishing styles, journal-latex
1653 @item journal-latex
1654 Publish journal entries as a LaTeX document.
1656 @cindex publishing styles, journal-pdf
1657 @item journal-pdf
1658 Publish journal entries as a PDF document.
1660 @cindex publishing styles, journal-book-latex
1661 @item journal-book-latex
1662 Publish journal entries as a LaTeX book.
1664 @cindex publishing styles, journal-book-pdf
1665 @item journal-book-pdf
1666 Publish journal entries as a PDF book.
1668 @cindex publishing styles, journal-rdf
1669 @cindex publishing styles, RSS 1.0
1670 @item journal-rdf
1671 Publish journal entries as an RDF file (RSS 1.0).
1673 @cindex publishing styles, journal-rss
1674 @cindex publishing styles, RSS 2.0
1675 @item journal-rss
1676 Publish journal entries as an RSS file (RSS 2.0).
1678 @end table
1680 @subheading Options provided
1682 @table @code
1684 @item muse-journal-heading-regexp
1685 A regexp that matches a journal heading.
1687 Paren group 1 is the ISO date, group 2 is the optional category, and
1688 group 3 is the optional heading for the entry.
1690 @item muse-journal-date-format
1691 Date format to use for journal entries.
1693 @item muse-journal-html-heading-regexp
1694 A regexp that matches a journal heading from an HTML document.
1696 Paren group 1 is the ISO date, group 2 is the optional category, and
1697 group 3 is the optional heading for the entry.
1699 @item muse-journal-html-entry-template
1700 Template used to publish individual journal entries as HTML.
1702 @item muse-journal-latex-section
1703 Template used to publish a LaTeX section.
1705 @item muse-journal-latex-subsection
1706 Template used to publish a LaTeX subsection.
1708 @item muse-journal-latex-markup-tags
1709 A list of tag specifications, for specially marking up LaTeX.
1711 @xref{muse-publish-markup-tags}, for more information.
1713 @item muse-journal-rdf-extension
1714 Default file extension for publishing RDF (RSS 1.0) files.
1716 @item muse-journal-rdf-base-url
1717 The base URL of the website referenced by the RDF file.
1719 @item muse-journal-rdf-header
1720 Header used for publishing RDF (RSS 1.0) files.
1722 This may be text or a filename.
1724 @item muse-journal-rdf-footer
1725 Footer used for publishing RDF (RSS 1.0) files.
1727 This may be text or a filename.
1729 @item muse-journal-rdf-date-format
1730 Date format to use for RDF entries.
1732 @item muse-journal-rdf-entry-template
1733 Template used to publish individual journal entries as RDF.
1735 @item muse-journal-rdf-summarize-entries
1736 If non-nil, include only summaries in the RDF file, not the full data.
1738 @item muse-journal-rss-extension
1739 Default file extension for publishing RSS 2.0 files.
1741 @item muse-journal-rss-base-url
1742 The base URL of the website referenced by the RSS file.
1744 @item muse-journal-rss-header
1745 Header used for publishing RSS 2.0 files.
1747 This may be text or a filename.
1749 @item muse-journal-rss-footer
1750 Footer used for publishing RSS 2.0 files.
1752 This may be text or a filename.
1754 @item muse-journal-rss-date-format
1755 Date format to use for RSS 2.0 entries.
1757 @item muse-journal-rss-entry-template
1758 Template used to publish individual journal entries as RSS 2.0.
1760 @item muse-journal-rss-enclosure-types-alist
1761 File types that are accepted as RSS enclosures.
1763 This is an alist that maps file extension to content type.
1765 Useful for podcasting.
1767 @item muse-journal-rss-summarize-entries
1768 If non-nil, include only summaries in the RSS file, not the full data.
1770 Many RSS subscribers find this annoying.
1772 @item muse-journal-rss-markup-regexps
1773 List of markup rules for publishing a Muse journal page to RSS.
1775 For more information on the structure of this list,
1776 @xref{muse-publish-markup-regexps}.
1778 @item muse-journal-rss-markup-functions
1779 An alist of style types to custom functions for that kind of text.
1781 For more on the structure of this list,
1782 @xref{muse-publish-markup-functions}.
1784 @end table
1786 @node LaTeX, Poem, Journal, Publishing Styles
1787 @comment  node-name,  next,  previous,  up
1788 @section Publishing LaTeX documents
1790 This publishing style is capable of producing LaTeX or PDF documents.
1792 If you wish to publish PDF documents, you will need to have a good TeX
1793 installation.  For Debian and Ubuntu, this can be accomplished by
1794 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
1795 are also a must.
1797 @subheading Styles provided
1799 @table @code
1801 @cindex publishing styles, latex
1802 @item latex
1803 Publish a LaTeX document.
1805 @cindex publishing styles, pdf
1806 @item pdf
1807 Publish a PDF document, using an external LaTeX document conversion
1808 tool.
1810 @cindex publishing styles, latexcjk
1811 @item latexcjk
1812 Publish a LaTeX document with CJK (Chinese) encodings.
1814 @cindex publishing styles, pdfcjk
1815 @item pdfcjk
1816 Publish a PDF document with CJK (Chinese) encodings, using an external
1817 LaTeX document conversion tool.
1819 @end table
1821 @subheading Options provided
1823 @table @code
1825 @item muse-latex-extension
1826 Default file extension for publishing LaTeX files.
1828 @item muse-latex-pdf-extension
1829 Default file extension for publishing LaTeX files to PDF.
1831 @item muse-latex-header
1832 Header used for publishing LaTeX files.
1834 This may be text or a filename.
1836 @item muse-latex-footer
1837 Footer used for publishing LaTeX files.
1839 This may be text or a filename.
1841 @item muse-latexcjk-header
1842 Header used for publishing LaTeX files (CJK).
1844 This may be text or a filename.
1846 @item muse-latexcjk-footer
1847 Footer used for publishing LaTeX files (CJK).
1849 This may be text or a filename.
1851 @item muse-latex-markup-regexps
1852 List of markup regexps for identifying regions in a Muse page.
1854 For more on the structure of this list,
1855 @xref{muse-publish-markup-regexps}.
1857 @item muse-latex-markup-functions
1858 An alist of style types to custom functions for that kind of text.
1860 For more on the structure of this list,
1861 @xref{muse-publish-markup-functions}.
1863 @item muse-latex-markup-strings
1864 Strings used for marking up text.
1866 These cover the most basic kinds of markup, the handling of which
1867 differs little between the various styles.
1869 @item muse-latexcjk-encoding-map
1870 An alist mapping emacs coding systems to appropriate CJK codings.
1871 Use the base name of the coding system (ie, without the -unix).
1873 @item muse-latexcjk-encoding-default
1874 The default Emacs buffer encoding to use in published files.
1876 This will be used if no special characters are found.
1878 @item muse-latex-markup-specials-example
1879 A table of characters which must be represented specially.
1880 These are applied to @verb{|example>|} regions.
1882 With the default interpretation of @verb{|<example>|} regions, no
1883 specials need to be escaped.
1885 @item muse-latex-markup-specials-document
1886 A table of characters which must be represented specially.
1887 These are applied to the entire document, sans already-escaped
1888 regions.
1890 @item muse-latex-markup-specials-literal
1891 A table of characters which must be represented specially.
1892 This applies to =monospaced text= and @verb{|<code>|} regions.
1894 @item muse-latex-markup-specials-url
1895 A table of characters which must be represented specially.
1896 These are applied to URLs.
1898 @item muse-latex-permit-contents-tag
1899 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
1900 contents.
1902 Most of the time, it is best to have a table of contents on the
1903 first page, with a new page immediately following.  To make this
1904 work with documents published in both HTML and LaTeX, we need to
1905 ignore the @verb{|<contents>|} tag.
1907 If you don't agree with this, then set this option to non-nil,
1908 and it will do what you expect.
1910 @end table
1912 @node Poem, Texinfo, LaTeX, Publishing Styles
1913 @comment  node-name,  next,  previous,  up
1914 @section Publish a poem to LaTex or PDF
1916 The @code{muse-poem} module makes it easy to attractively publish and
1917 reference poems in the following format, using the "memoir" module for
1918 LaTeX publishing.  It will also markup poems for every other output
1919 style, though none are nearly as pretty.
1921 @example
1922 Title
1925 Body of poem
1928 Annotations, history, notes, etc.
1929 @end example
1931 Once a poem is written in this format, just publish it to PDF using the
1932 @code{poem-pdf} style.  To make an inlined reference to a poem that
1933 you've written -- for example, from a blog page -- there is a "poem" tag
1934 defined by this module.
1936 @example
1937 <poem title="name.of.poem.page">
1938 @end example
1940 Let's assume the template above was called @file{name.of.poem.page};
1941 then the above tag would result in this inclusion.
1943 @example
1944 ** Title
1946 > Body of poem
1947 @end example
1949 John Wiegley uses this module for publishing all of the poems on his
1950 website, which are at
1951 @uref{http://www.newartisans.com/johnw/poems.html}.
1953 @subheading Styles provided
1955 @table @code
1957 @cindex publishing styles, poem-latex
1958 @item poem-latex
1959 Publish a poem in LaTeX form.
1961 @cindex publishing styles, poem-pdf
1962 @item poem-pdf
1963 Publish a poem to a PDF document.
1965 @cindex publishing styles, chapbook-latex
1966 @item chapbook-latex
1967 Publish a book of poems in LaTeX form.
1969 @cindex publishing styles, chapbook-pdf
1970 @item chapbook-pdf
1971 Publish a book of poems to a PDF document.
1973 @end table
1975 @subheading Options provided
1977 @table @code
1979 @item muse-poem-latex-header
1980 Header used for publishing LaTeX poems.
1982 This may be text or a filename.
1984 @item muse-poem-latex-footer
1985 Footer used for publishing LaTeX files.
1987 This may be text or a filename.
1989 @item muse-poem-markup-strings
1990 Strings used for marking up poems.
1992 These cover the most basic kinds of markup, the handling of which
1993 differs little between the various styles.
1995 @item muse-chapbook-latex-header
1996 Header used for publishing a book of poems in LaTeX form.
1998 This may be text or a filename.
2000 @item muse-chapbook-latex-footer
2001 Footer used for publishing a book of poems in LaTeX form.
2003 This may be text or a filename.
2005 @item muse-poem-chapbook-strings
2006 Strings used for marking up books of poems.
2008 These cover the most basic kinds of markup, the handling of which
2009 differs little between the various styles.
2011 @end table
2013 @node Texinfo, , Poem, Publishing Styles
2014 @comment  node-name,  next,  previous,  up
2015 @section Publish entries to Texinfo format or PDF
2017 Rules for publishing a Muse file as a Texinfo article.
2019 @subheading Styles provided
2021 @table @code
2023 @cindex publishing styles, texi
2024 @item texi
2025 Publish a file in Texinfo form.
2027 @cindex publishing styles, texi
2028 @item info
2029 Generate an Info file from a Muse file.
2031 @cindex publishing styles, info-pdf
2032 @item info-pdf
2033 Publish a file in PDF form.
2035 @end table
2037 @subheading Options provided
2039 @table @code
2041 @item muse-texinfo-process-natively
2042 If non-nil, use the Emacs `texinfmt' module to make Info files.
2044 @item muse-texinfo-extension
2045 Default file extension for publishing Texinfo files.
2047 @item muse-texinfo-info-extension
2048 Default file extension for publishing Info files.
2050 @item muse-texinfo-pdf-extension
2051 Default file extension for publishing PDF files.
2053 @item muse-texinfo-header
2054 Text to prepend to a Muse page being published as Texinfo.
2056 This may be text or a filename.
2057 It may contain @verb{|<lisp>|} markup tags.
2059 @item muse-texinfo-footer
2060 Text to append to a Muse page being published as Texinfo.
2062 This may be text or a filename.
2063 It may contain @verb{|<lisp>|} markup tags.
2065 @item muse-texinfo-markup-regexps
2066 List of markup rules for publishing a Muse page to Texinfo.
2068 For more on the structure of this list,
2069 @xref{muse-publish-markup-regexps}.
2071 @item muse-texinfo-markup-functions
2072 An alist of style types to custom functions for that kind of text.
2074 For more on the structure of this list, see
2075 @xref{muse-publish-markup-functions}.
2077 @item muse-texinfo-markup-strings
2078 Strings used for marking up text.
2080 These cover the most basic kinds of markup, the handling of which
2081 differs little between the various styles.
2083 @item muse-texinfo-markup-specials
2084 A table of characters which must be represented specially.
2086 @end table
2089 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
2090 @comment  node-name,  next,  previous,  up
2091 @chapter Making your own publishing styles
2093 @menu
2094 * Common Elements::             Common functionality shared by styles.
2095 * Deriving Styles::             Deriving a new style from an existing
2096                                   one.
2097 @end menu
2099 @node Common Elements, Deriving Styles, , Extending Muse
2100 @comment  node-name,  next,  previous,  up
2101 @section Common functionality shared by styles
2102 @cindex publishing styles, common
2104 @menu
2105 * Markup Functions::            Specifying functions to marking up text.
2106 * Markup Regexps::              Markup rules for publishing.
2107 * Markup Strings::              Strings specific to a publishing style.
2108 * Markup Tags::                 Tag specifications for special markup.
2109 * Style Elements::              Parameters used for defining styles.
2110 @end menu
2112 @node Markup Functions, Markup Regexps, , Common Elements
2113 @comment  node-name,  next,  previous,  up
2114 @subsection Specifying functions to mark up text
2115 @cindex publishing, markup functions
2117 @anchor{muse-publish-markup-functions}
2118 @code{muse-publish-markup-functions}
2120 An alist of style types to custom functions for that kind of text.
2122 This is used by publishing styles to attempt to minimize the amount of
2123 custom regexps that each has to define.  @file{muse-publish} provides
2124 rules for the most common types of markup.
2126 Each member of the list is of the following form.
2128 @example
2129 (SYMBOL FUNCTION)
2130 @end example
2132 @itemize @bullet
2133 @item SYMBOL
2134 Describes the type of text to associate with this rule.
2135 @code{muse-publish-markup-regexps} maps regexps to these symbols.
2137 @item FUNCTION
2138 Function to use to mark up this kind of rule if no suitable function is
2139 found through the @option{:functions} tag of the current style.
2140 @end itemize
2142 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
2143 @comment  node-name,  next,  previous,  up
2144 @subsection Markup rules for publishing
2145 @cindex publishing, markup regexps
2146 @cindex publishing, rules
2148 @anchor{muse-publish-markup-regexps}
2149 @code{muse-publish-markup-regexps}
2151 List of markup rules for publishing a page with Muse.
2153 The rules given in this variable are invoked first, followed by whatever
2154 rules are specified by the current style.
2156 Each member of the list is either a function, or a list of the following
2157 form.
2159 @example
2160 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
2161 @end example
2163 @itemize @bullet
2164 @item REGEXP
2165 A regular expression, or symbol whose value is a regular expression,
2166 which is searched for using `re-search-forward'.
2168 @item TEXT-BEGIN-GROUP
2169 The matching group within that regexp which denotes the beginning of the
2170 actual text to be marked up.
2172 @item REPLACEMENT-TEXT
2173 A string that will be passed to `replace-match'.
2175 If it is not a string, but a function, it will be called to determine
2176 what the replacement text should be (it must return a string).  If it is
2177 a symbol, the value of that symbol should be a string.
2178 @end itemize
2180 The replacements are done in order, one rule at a time.  Writing
2181 the regular expressions can be a tricky business.  Note that case
2182 is never ignored.  `case-fold-search' is always bound to nil
2183 while processing the markup rules.
2185 @subheading Publishing order
2187 This is the order that the publishing rules are consulted, by default.
2188 This may be changed by customizing @code{muse-publish-markup-regexps}.
2190 @table @code
2192 @item trailing and leading whitespace
2193 Remove trailing and leading whitespace from a file.
2195 @item directive
2196 @samp{#directive}
2198 This is only recognized at the beginning of a file.
2200 @item tag
2201 @samp{<tag>}
2203 @item comment
2204 @samp{; comment}
2206 @item anchor
2207 @samp{#anchor}
2209 @item explicit links
2210 Prevent emphasis characters in explicit links from being marked up.
2212 Don't actually publish them here, just add a special no-emphasis text
2213 property.
2215 @item word
2216 Whitespace-delimited word, possibly with emphasis characters
2218 This function is responsible for marking up emphasis and escaping some
2219 specials.
2221 @item emdash
2222 @samp{--}
2224 2-wide dash
2226 @item heading
2227 @samp{** Heading}
2229 Outline-mode style headings.
2231 @item enddots
2232 @samp{....}
2234 These are ellipses with a dot at end.
2236 @item dots
2237 @samp{...}
2239 Ellipses.
2241 @item rule
2242 @samp{----}
2244 Horizontal rule or section separator.
2246 @item fn-sep
2247 @samp{Footnotes:}
2249 beginning of footnotes section
2251 @item footnote
2252 @samp{[1]}
2254 Footnote definition or reference.  If at beginning of line, it is a
2255 definition.
2257 @item list
2258 @itemize @bullet
2259 @item
2260 @samp{ 1. }
2262 @item
2263 @samp{ - }
2265 @item
2266 @samp{term :: }
2267 @end itemize
2269 Numbered list, item list, or term definition list.
2271 @item quote
2272 spaces before beginning of text
2274 Blockquotes.
2276 @item verse
2277 @samp{> verse text}
2279 @item table
2280 @samp{table | cells}
2282 @item link
2283 @samp{[[explicit][links]]}
2285 @item url
2286 @samp{http://example.com/}
2288 @item email
2289 @samp{bare-email@@example.com}
2291 @end table
2293 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
2294 @comment  node-name,  next,  previous,  up
2295 @subsection Strings specific to a publishing style
2296 @cindex publishing, markup strings
2298 @dfn{Markup strings} are strings used for marking up text for a
2299 particular style.
2301 These cover the most basic kinds of markup, the handling of which
2302 differs little between the various styles.
2304 @subheading Available markup strings
2306 @table @code
2308 @item image-with-desc
2309 An image and a description.
2311 Argument 1: image without extension.  Argument 2: image extension.
2312 Argument 3: description.
2314 @item image
2315 An inlined image.
2317 Argument 1: image without extension.  Argument 2: image extension.
2319 @item image-link
2320 A link to an image.
2322 Argument 1: link.  Argument 2: image without extension.
2323 Argument 3: image extension.
2325 @item anchor-ref
2326 A reference to an anchor on the current page.
2328 Argument 1: anchor name.  Argument 2: description if one exists, or the
2329 original link otherwise.
2331 @item url
2332 A URL without a description.
2334 Argument 1: URL.
2336 @item link
2337 A link with a description.
2339 Argument 1: link.  Argument 2: description if one exists, or the
2340 original link otherwise.
2342 @item link-and-anchor
2343 A link to a page with an anchor, and a description.
2345 Argument 1: link.  Argument 2: anchor name.
2346 Argument 3: description if one exists, or the original link otherwise.
2348 @item email-addr
2349 A link to an email address.
2351 Argument 1: email address.  Argument 2: email address.
2353 @item emdash
2354 A 2-length dash.
2356 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
2358 @item comment-begin
2359 Beginning of a comment.
2361 @item comment-end
2362 End of a comment.
2364 @item rule
2365 A horizontal line or space.
2367 @item no-break-space
2368 A space that separates two words which are not to be separated.
2370 @item footnote
2371 Beginning of footnote.
2373 @item footnote-end
2374 End of footnote.
2376 @item footnotemark
2377 Mark a reference for the current footnote.
2379 Argument 1: number of this footnote.
2381 @item footnotemark-end
2382 End of a reference for the current footnote.
2384 @item footnotetext
2385 Indicate the text of the current footnote.
2387 Argument 1: number of this footnote.
2389 @item footnotetext-end
2390 End of a footnote text line.
2392 @item fn-sep
2393 Text used to replace ``Footnotes:'' line.
2395 @item dots
2396 3 dots.
2398 @item enddots
2399 4 dots.
2401 @item part
2402 Beginning of a part indicator line.  This is used by book publishing.
2404 @item part-end
2405 End of a part indicator line.  This is used by book publishing.
2407 @item chapter
2408 Beginning of a chapter indicator line.  This is used by book publishing.
2410 @item chapter-end
2411 End of a chapter indicator line.  This is used by book publishing.
2413 @item section
2414 Beginning of level 1 section indicator line.
2416 Argument 1: level of section; always 1.
2418 @item section-end
2419 End of level 1 section indicator line.
2421 Argument 1: level of section; always 1.
2423 @item subsection
2424 Beginning of level 2 section indicator line.
2426 Argument 1: level of section; always 2.
2428 @item subsection-end
2429 End of level 2 section indicator line.
2431 Argument 1: level of section; always 2.
2433 @item subsubsection
2434 Beginning of level 3 section indicator line.
2436 Argument 1: level of section; always 3.
2438 @item subsubsection-end
2439 End of level 3 section indicator line.
2441 Argument 1: level of section; always 3.
2443 @item section-other
2444 Beginning of section indicator line, where level is greater than 3.
2446 Argument 1: level of section.
2448 @item section-other-end
2449 Beginning of section indicator line, where level is greater than 3.
2451 Argument 1: level of section.
2453 @item begin-underline
2454 Beginning of underlined text.
2456 @item end-underline
2457 End of underlined text.
2459 @item begin-literal
2460 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2461 =teletype text=.
2463 @item end-literal
2464 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2465 text=.
2467 @item begin-emph
2468 Beginning of the first level of emphasized text.
2470 @item end-emph
2471 End of the first level of emphasized text.
2473 @item begin-more-emph
2474 Beginning of the second level of emphasized text.
2476 @item end-more-emph
2477 End of the second level of emphasized text.
2479 @item begin-most-emph
2480 Beginning of the third (and final) level of emphasized text.
2482 @item end-most-emph
2483 End of the third (and final) level of emphasized text.
2485 @item begin-verse
2486 Beginning of verse text.
2488 @item verse-space
2489 String used to each space that is further indented than the beginning of
2490 the verse.
2492 @item begin-verse-line
2493 Beginning of a line of verse.
2495 @item empty-verse-line
2496 End of a line of verse.
2498 @item begin-last-stanza-line
2499 Beginning of the last line of a verse stanza.
2501 @item end-last-stanza-line
2502 End of the last line of a verse stanza.
2504 @item end-verse
2505 End of verse text.
2507 @item begin-example
2508 Beginning of an example region.  To make use of this, an
2509 @samp{<example>} tag is needed.
2511 @item end-example
2512 End of an example region.  To make use of this, an @samp{</example>} tag
2513 is needed.
2515 @item begin-center
2516 Begin a centered line.
2518 @item end-center
2519 End a centered line.
2521 @item begin-quote
2522 Begin a quoted region.
2524 @item end-quote
2525 End a quoted region.
2527 @item begin-uli
2528 Begin an unordered list.
2530 @item end-uli
2531 End an unordered list.
2533 @item begin-uli-item
2534 Begin an unordered list item.
2536 @item end-uli-item
2537 End an unordered list item.
2539 @item begin-oli
2540 Begin an ordered list.
2542 @item end-oli
2543 End an ordered list.
2545 @item begin-oli-item
2546 Begin an ordered list item.
2548 @item end-oli-item
2549 End an ordered list item.
2551 @item begin-dl
2552 Begin a definition list.
2554 @item end-dl
2555 End a definition list.
2557 @item begin-dl-item
2558 Begin a definition list item.
2560 @item end-dl-item
2561 End a definition list item.
2563 @item begin-ddt
2564 Begin a definition list term.
2566 @item end-ddt
2567 End a definition list term.
2569 @item begin-dde
2570 Begin a definition list entry.
2572 @item end-dde
2573 End a definition list entry.
2575 @item begin-table
2576 Begin a table.
2578 @item end-table
2579 End a table.
2581 @item begin-table-group
2582 Begin a table grouping.
2584 @item end-table-group
2585 End a table grouping.
2587 @item begin-table-row
2588 Begin a table row.
2590 @item end-table-row
2591 End a table row.
2593 @item begin-table-entry
2594 Begin a table entry.
2596 @item end-table-entry
2597 End a table entry.
2599 @end table
2601 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2602 @comment  node-name,  next,  previous,  up
2603 @subsection Tag specifications for special markup
2604 @cindex publishing, markup tags
2606 @anchor{muse-publish-markup-tags}
2607 @code{muse-publish-markup-tags}
2609 A list of tag specifications, for specially marking up text.
2611 XML-style tags are the best way to add custom markup to Muse.  This is
2612 easily accomplished by customizing this list of markup tags.
2614 For each entry, the name of the tag is given, whether it expects a
2615 closing tag and/or an optional set of attributes, whether it is
2616 nestable, and a function that performs whatever action is desired within
2617 the delimited region.
2619 The tags themselves are deleted during publishing, before the function
2620 is called.  The function is called with three arguments, the beginning
2621 and end of the region surrounded by the tags.  If properties are
2622 allowed, they are passed as a third argument in the form of an alist.
2623 The `end' argument to the function is always a marker.
2625 Point is always at the beginning of the region within the tags, when the
2626 function is called.  Wherever point is when the function finishes is
2627 where tag markup will resume.
2629 These tag rules are processed once at the beginning of markup, and once
2630 at the end, to catch any tags which may have been inserted in-between.
2632 @node Style Elements, , Markup Tags, Common Elements
2633 @comment  node-name,  next,  previous,  up
2634 @subsection Parameters used for defining styles
2635 @cindex publishing, style elements
2637 Style elements are tags that define a style.  Use
2638 @code{muse-define-style} to create a new style.
2640 @example
2641 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2642 @end example
2644 @subheading Usable elements
2646 @table @option
2648 @item :suffix
2649 File extension to use for publishing files with this style.
2651 @item :link-suffix
2652 File extension to use for publishing links to Muse files with this
2653 style.
2655 @item :osuffix
2656 File extension to use for publishing second-stage files with this style.
2658 For example, PDF publishing generates a LaTeX file first, then a PDF
2659 from that LaTeX file.
2661 @item :regexps
2662 List of markup rules for publishing a page with Muse.
2663 @xref{muse-publish-markup-regexps}.
2665 @item :functions
2666 An alist of style types to custom functions for that kind of text.
2667 @xref{muse-publish-markup-functions}.
2669 @item :strings
2670 Strings used for marking up text with this style.
2672 These cover the most basic kinds of markup, the handling of which
2673 differs little between the various styles.
2675 @item :tags
2676 A list of tag specifications, used for handling extra tags.
2677 @xref{muse-publish-markup-tags}.
2679 @item :specials
2680 A table of characters which must be represented specially.
2682 @item :before
2683 A function that is to be executed on the newly-created publishing buffer
2684 (or the current region) before any publishing occurs.
2686 This is used to set extra parameters that direct the publishing process.
2688 @item :before-end
2689 A function that is to be executed on the publishing buffer (or the
2690 current region) immediately after applying all of the markup regexps.
2692 This is used to fix the order of table elements (header, footer, body)
2693 in XML-ish styles.
2695 @item :after
2696 A function that is to be executed on the publishing buffer after
2697 :before-end, and immediately after inserting the header and footer.
2699 This is used for generating the table of contents as well as setting the
2700 file coding system.
2702 @item :final
2703 A function that is to be executed after saving the published file, but
2704 while still in its buffer.
2706 This is used for generating second-stage documents like PDF files from
2707 just-published LaTeX files.
2709 @item :header
2710 Header used for publishing files of this style.
2712 This may be a variable, text, or a filename.  It is inserted at the
2713 beginning of a file, after evaluating the publishing markup.
2715 @item :footer
2716 Footer used for publishing files of this style.
2718 This may be a variable, text, or a filename.  It is inserted at the end
2719 of a file, after evaluating the publishing markup.
2721 @item :style-sheet
2722 Style sheet used for publishing files of this style.
2724 This may be a variable or text.  It is used in the header of HTML and
2725 XHTML based publishing styles.
2727 @item :browser
2728 The function used to browse the published result of files of this style.
2730 @end table
2732 @node Deriving Styles, , Common Elements, Extending Muse
2733 @comment  node-name,  next,  previous,  up
2734 @section Deriving a new style from an existing one
2735 @cindex publishing styles, deriving
2737 To create a new style from an existing one, use @code{muse-derive-style}
2738 as follows.  This is a good way to fix something you don't like about a
2739 particular publishing style, or to personalize it.
2741 @example
2742 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2743 @end example
2745 The derived name is a string defining the new style, such as "my-html".
2746 The base name must identify an existing style, such as "html" -- if you
2747 have loaded @file{muse-html}.  The style parameters are the same as
2748 those used to create a style, except that they override whatever
2749 definitions exist in the base style.  However, some definitions only
2750 partially override.  The following parameters support partial
2751 overriding.
2753 @xref{Style Elements}, for a complete list of all parameters.
2755 @table @option
2757 @item :functions
2758 If a markup function is not found in the derived style's function list,
2759 the base style's function list will be queried.
2761 @item :regexps
2762 All regexps in the current style and the base style(s) will be used.
2764 @item :strings
2765 If a markup string is not found in the derived style's string list, the
2766 base style's string list will be queried.
2768 @end table
2771 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
2772 @comment  node-name,  next,  previous,  up
2773 @chapter Getting Help and Reporting Bugs
2774 @cindex help, getting
2775 @cindex bugs, reporting
2777 After you have read this guide, if you still have questions about
2778 Muse, or if you have bugs to report, there are several places you can
2781 @itemize @bullet
2783 @item
2784 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
2785 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2786 to it.
2788 @item
2789 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2790 that Michael Olson (the current maintainer) made for Muse.
2792 @item
2793 Muse has four mailing lists.
2795 @table @samp
2797 @item muse-el-announce
2798 Low-traffic list for Muse-related announcements.
2800 You can join this mailing list (@email{muse-el-announce@@gna.org})
2801 using the subscription form at
2802 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
2803 mailing list is also available via Gmane (@url{http://gmane.org/}). The
2804 group is called @samp{gmane.emacs.muse.announce}.
2806 @item muse-el-discuss
2807 Discussion, bugfixes, suggestions, tips, and the like for Muse.
2808 This mailing list also includes the content of muse-el-announce.
2810 You can join this mailing list (@email{muse-el-discuss@@gna.org})
2811 using the subscription form at
2812 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
2813 list is also available via Gmane with the identifier
2814 @samp{gmane.emacs.muse.general}.
2816 @item muse-el-commits
2817 Log messages for changes committed to Muse.
2819 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
2820 the subscription form at
2821 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
2822 is also available via Gmane with the identifier
2823 @samp{gmane.emacs.muse.cvs}.
2825 @item muse-el-internationalization
2826 Discussion of translation of the Muse website and documentation into
2827 many languages.
2829 You can join this mailing list
2830 (@email{muse-el-internationalization@@gna.org}) using the subscription
2831 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
2832 mailing list is also available via Gmane with the identifier
2833 @samp{gmane.emacs.muse.internationalization}.
2835 @end table
2837 @item
2838 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2839 contributors are frequently around and willing to answer your
2840 questions.  The @samp{#muse} channel is also available for
2841 Muse-specific help, and its current maintainer hangs out there.
2843 @item
2844 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2845 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
2846 it is often better to use the muse-el-discuss mailing list.
2848 @end itemize
2850 @node History, Contributors, Getting Help and Reporting Bugs, Top
2851 @comment  node-name,  next,  previous,  up
2852 @chapter History of This Document
2853 @cindex history, of Muse
2855 @itemize
2856 @item 2004
2857 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2858 limitations. Around February 2004, he started making "emacs-wiki version
2859 3.00 APLHA", which eventually became known as Muse.
2861 Most of those who frequent the emacs-wiki mailing list continued to use
2862 emacs-wiki, mainly because Planner hasn't been ported over to it.
2864 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2865 John Wiegley's request.
2867 @item 2005
2868 Michael Olson overhauled this document and added many new sections in
2869 preparation for the first release of Muse (3.01).
2871 @end itemize
2873 @node Contributors, GNU General Public License, History, Top
2874 @comment  node-name,  next,  previous,  up
2875 @chapter Contributors to This Documentation
2876 @cindex contributors
2878 The first draft of this document was taken from the emacs-wiki texinfo
2879 manual.  Michael Olson adapted it for Muse and added most of its
2880 content.
2882 John Sullivan did a majority of the work on the emacs-wiki texinfo
2883 manual.
2885 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2886 emacs-wiki texinfo manual.
2888 @node GNU General Public License, Concept Index, Contributors, Top
2889 @comment  node-name,  next,  previous,  up
2890 @appendix GNU GENERAL PUBLIC LICENSE
2891 @center Version 2, June 1991
2892 @cindex GPL
2893 @cindex GNU General Public License
2895 @c This file is intended to be included in another file.
2897 @display
2898 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2899 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2901 Everyone is permitted to copy and distribute verbatim copies
2902 of this license document, but changing it is not allowed.
2903 @end display
2905 @appendixsec Preamble
2907   The licenses for most software are designed to take away your
2908 freedom to share and change it.  By contrast, the GNU General Public
2909 License is intended to guarantee your freedom to share and change free
2910 software---to make sure the software is free for all its users.  This
2911 General Public License applies to most of the Free Software
2912 Foundation's software and to any other program whose authors commit to
2913 using it.  (Some other Free Software Foundation software is covered by
2914 the GNU Library General Public License instead.)  You can apply it to
2915 your programs, too.
2917   When we speak of free software, we are referring to freedom, not
2918 price.  Our General Public Licenses are designed to make sure that you
2919 have the freedom to distribute copies of free software (and charge for
2920 this service if you wish), that you receive source code or can get it
2921 if you want it, that you can change the software or use pieces of it
2922 in new free programs; and that you know you can do these things.
2924   To protect your rights, we need to make restrictions that forbid
2925 anyone to deny you these rights or to ask you to surrender the rights.
2926 These restrictions translate to certain responsibilities for you if you
2927 distribute copies of the software, or if you modify it.
2929   For example, if you distribute copies of such a program, whether
2930 gratis or for a fee, you must give the recipients all the rights that
2931 you have.  You must make sure that they, too, receive or can get the
2932 source code.  And you must show them these terms so they know their
2933 rights.
2935   We protect your rights with two steps: (1) copyright the software, and
2936 (2) offer you this license which gives you legal permission to copy,
2937 distribute and/or modify the software.
2939   Also, for each author's protection and ours, we want to make certain
2940 that everyone understands that there is no warranty for this free
2941 software.  If the software is modified by someone else and passed on, we
2942 want its recipients to know that what they have is not the original, so
2943 that any problems introduced by others will not reflect on the original
2944 authors' reputations.
2946   Finally, any free program is threatened constantly by software
2947 patents.  We wish to avoid the danger that redistributors of a free
2948 program will individually obtain patent licenses, in effect making the
2949 program proprietary.  To prevent this, we have made it clear that any
2950 patent must be licensed for everyone's free use or not licensed at all.
2952   The precise terms and conditions for copying, distribution and
2953 modification follow.
2955 @iftex
2956 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2957 @end iftex
2958 @ifinfo
2959 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2960 @end ifinfo
2962 @enumerate 0
2963 @item
2964 This License applies to any program or other work which contains
2965 a notice placed by the copyright holder saying it may be distributed
2966 under the terms of this General Public License.  The ``Program'', below,
2967 refers to any such program or work, and a ``work based on the Program''
2968 means either the Program or any derivative work under copyright law:
2969 that is to say, a work containing the Program or a portion of it,
2970 either verbatim or with modifications and/or translated into another
2971 language.  (Hereinafter, translation is included without limitation in
2972 the term ``modification''.)  Each licensee is addressed as ``you''.
2974 Activities other than copying, distribution and modification are not
2975 covered by this License; they are outside its scope.  The act of
2976 running the Program is not restricted, and the output from the Program
2977 is covered only if its contents constitute a work based on the
2978 Program (independent of having been made by running the Program).
2979 Whether that is true depends on what the Program does.
2981 @item
2982 You may copy and distribute verbatim copies of the Program's
2983 source code as you receive it, in any medium, provided that you
2984 conspicuously and appropriately publish on each copy an appropriate
2985 copyright notice and disclaimer of warranty; keep intact all the
2986 notices that refer to this License and to the absence of any warranty;
2987 and give any other recipients of the Program a copy of this License
2988 along with the Program.
2990 You may charge a fee for the physical act of transferring a copy, and
2991 you may at your option offer warranty protection in exchange for a fee.
2993 @item
2994 You may modify your copy or copies of the Program or any portion
2995 of it, thus forming a work based on the Program, and copy and
2996 distribute such modifications or work under the terms of Section 1
2997 above, provided that you also meet all of these conditions:
2999 @enumerate a
3000 @item
3001 You must cause the modified files to carry prominent notices
3002 stating that you changed the files and the date of any change.
3004 @item
3005 You must cause any work that you distribute or publish, that in
3006 whole or in part contains or is derived from the Program or any
3007 part thereof, to be licensed as a whole at no charge to all third
3008 parties under the terms of this License.
3010 @item
3011 If the modified program normally reads commands interactively
3012 when run, you must cause it, when started running for such
3013 interactive use in the most ordinary way, to print or display an
3014 announcement including an appropriate copyright notice and a
3015 notice that there is no warranty (or else, saying that you provide
3016 a warranty) and that users may redistribute the program under
3017 these conditions, and telling the user how to view a copy of this
3018 License.  (Exception: if the Program itself is interactive but
3019 does not normally print such an announcement, your work based on
3020 the Program is not required to print an announcement.)
3021 @end enumerate
3023 These requirements apply to the modified work as a whole.  If
3024 identifiable sections of that work are not derived from the Program,
3025 and can be reasonably considered independent and separate works in
3026 themselves, then this License, and its terms, do not apply to those
3027 sections when you distribute them as separate works.  But when you
3028 distribute the same sections as part of a whole which is a work based
3029 on the Program, the distribution of the whole must be on the terms of
3030 this License, whose permissions for other licensees extend to the
3031 entire whole, and thus to each and every part regardless of who wrote it.
3033 Thus, it is not the intent of this section to claim rights or contest
3034 your rights to work written entirely by you; rather, the intent is to
3035 exercise the right to control the distribution of derivative or
3036 collective works based on the Program.
3038 In addition, mere aggregation of another work not based on the Program
3039 with the Program (or with a work based on the Program) on a volume of
3040 a storage or distribution medium does not bring the other work under
3041 the scope of this License.
3043 @item
3044 You may copy and distribute the Program (or a work based on it,
3045 under Section 2) in object code or executable form under the terms of
3046 Sections 1 and 2 above provided that you also do one of the following:
3048 @enumerate a
3049 @item
3050 Accompany it with the complete corresponding machine-readable
3051 source code, which must be distributed under the terms of Sections
3052 1 and 2 above on a medium customarily used for software interchange; or,
3054 @item
3055 Accompany it with a written offer, valid for at least three
3056 years, to give any third party, for a charge no more than your
3057 cost of physically performing source distribution, a complete
3058 machine-readable copy of the corresponding source code, to be
3059 distributed under the terms of Sections 1 and 2 above on a medium
3060 customarily used for software interchange; or,
3062 @item
3063 Accompany it with the information you received as to the offer
3064 to distribute corresponding source code.  (This alternative is
3065 allowed only for noncommercial distribution and only if you
3066 received the program in object code or executable form with such
3067 an offer, in accord with Subsection b above.)
3068 @end enumerate
3070 The source code for a work means the preferred form of the work for
3071 making modifications to it.  For an executable work, complete source
3072 code means all the source code for all modules it contains, plus any
3073 associated interface definition files, plus the scripts used to
3074 control compilation and installation of the executable.  However, as a
3075 special exception, the source code distributed need not include
3076 anything that is normally distributed (in either source or binary
3077 form) with the major components (compiler, kernel, and so on) of the
3078 operating system on which the executable runs, unless that component
3079 itself accompanies the executable.
3081 If distribution of executable or object code is made by offering
3082 access to copy from a designated place, then offering equivalent
3083 access to copy the source code from the same place counts as
3084 distribution of the source code, even though third parties are not
3085 compelled to copy the source along with the object code.
3087 @item
3088 You may not copy, modify, sublicense, or distribute the Program
3089 except as expressly provided under this License.  Any attempt
3090 otherwise to copy, modify, sublicense or distribute the Program is
3091 void, and will automatically terminate your rights under this License.
3092 However, parties who have received copies, or rights, from you under
3093 this License will not have their licenses terminated so long as such
3094 parties remain in full compliance.
3096 @item
3097 You are not required to accept this License, since you have not
3098 signed it.  However, nothing else grants you permission to modify or
3099 distribute the Program or its derivative works.  These actions are
3100 prohibited by law if you do not accept this License.  Therefore, by
3101 modifying or distributing the Program (or any work based on the
3102 Program), you indicate your acceptance of this License to do so, and
3103 all its terms and conditions for copying, distributing or modifying
3104 the Program or works based on it.
3106 @item
3107 Each time you redistribute the Program (or any work based on the
3108 Program), the recipient automatically receives a license from the
3109 original licensor to copy, distribute or modify the Program subject to
3110 these terms and conditions.  You may not impose any further
3111 restrictions on the recipients' exercise of the rights granted herein.
3112 You are not responsible for enforcing compliance by third parties to
3113 this License.
3115 @item
3116 If, as a consequence of a court judgment or allegation of patent
3117 infringement or for any other reason (not limited to patent issues),
3118 conditions are imposed on you (whether by court order, agreement or
3119 otherwise) that contradict the conditions of this License, they do not
3120 excuse you from the conditions of this License.  If you cannot
3121 distribute so as to satisfy simultaneously your obligations under this
3122 License and any other pertinent obligations, then as a consequence you
3123 may not distribute the Program at all.  For example, if a patent
3124 license would not permit royalty-free redistribution of the Program by
3125 all those who receive copies directly or indirectly through you, then
3126 the only way you could satisfy both it and this License would be to
3127 refrain entirely from distribution of the Program.
3129 If any portion of this section is held invalid or unenforceable under
3130 any particular circumstance, the balance of the section is intended to
3131 apply and the section as a whole is intended to apply in other
3132 circumstances.
3134 It is not the purpose of this section to induce you to infringe any
3135 patents or other property right claims or to contest validity of any
3136 such claims; this section has the sole purpose of protecting the
3137 integrity of the free software distribution system, which is
3138 implemented by public license practices.  Many people have made
3139 generous contributions to the wide range of software distributed
3140 through that system in reliance on consistent application of that
3141 system; it is up to the author/donor to decide if he or she is willing
3142 to distribute software through any other system and a licensee cannot
3143 impose that choice.
3145 This section is intended to make thoroughly clear what is believed to
3146 be a consequence of the rest of this License.
3148 @item
3149 If the distribution and/or use of the Program is restricted in
3150 certain countries either by patents or by copyrighted interfaces, the
3151 original copyright holder who places the Program under this License
3152 may add an explicit geographical distribution limitation excluding
3153 those countries, so that distribution is permitted only in or among
3154 countries not thus excluded.  In such case, this License incorporates
3155 the limitation as if written in the body of this License.
3157 @item
3158 The Free Software Foundation may publish revised and/or new versions
3159 of the General Public License from time to time.  Such new versions will
3160 be similar in spirit to the present version, but may differ in detail to
3161 address new problems or concerns.
3163 Each version is given a distinguishing version number.  If the Program
3164 specifies a version number of this License which applies to it and ``any
3165 later version'', you have the option of following the terms and conditions
3166 either of that version or of any later version published by the Free
3167 Software Foundation.  If the Program does not specify a version number of
3168 this License, you may choose any version ever published by the Free Software
3169 Foundation.
3171 @item
3172 If you wish to incorporate parts of the Program into other free
3173 programs whose distribution conditions are different, write to the author
3174 to ask for permission.  For software which is copyrighted by the Free
3175 Software Foundation, write to the Free Software Foundation; we sometimes
3176 make exceptions for this.  Our decision will be guided by the two goals
3177 of preserving the free status of all derivatives of our free software and
3178 of promoting the sharing and reuse of software generally.
3180 @iftex
3181 @heading NO WARRANTY
3182 @end iftex
3183 @ifinfo
3184 @center NO WARRANTY
3185 @end ifinfo
3187 @item
3188 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
3189 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
3190 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
3191 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
3192 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3193 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
3194 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
3195 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
3196 REPAIR OR CORRECTION.
3198 @item
3199 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
3200 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
3201 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
3202 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
3203 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
3204 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
3205 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
3206 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
3207 POSSIBILITY OF SUCH DAMAGES.
3208 @end enumerate
3210 @iftex
3211 @heading END OF TERMS AND CONDITIONS
3212 @end iftex
3213 @ifinfo
3214 @center END OF TERMS AND CONDITIONS
3215 @end ifinfo
3217 @page
3218 @appendixsec Appendix: How to Apply These Terms to Your New Programs
3220   If you develop a new program, and you want it to be of the greatest
3221 possible use to the public, the best way to achieve this is to make it
3222 free software which everyone can redistribute and change under these terms.
3224   To do so, attach the following notices to the program.  It is safest
3225 to attach them to the start of each source file to most effectively
3226 convey the exclusion of warranty; and each file should have at least
3227 the ``copyright'' line and a pointer to where the full notice is found.
3229 @smallexample
3230 @var{one line to give the program's name and a brief idea of what it does.}
3231 Copyright (C) @var{yyyy}  @var{name of author}
3233 This program is free software; you can redistribute it and/or modify
3234 it under the terms of the GNU General Public License as published by
3235 the Free Software Foundation; either version 2 of the License, or
3236 (at your option) any later version.
3238 This program is distributed in the hope that it will be useful,
3239 but WITHOUT ANY WARRANTY; without even the implied warranty of
3240 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3241 GNU General Public License for more details.
3243 You should have received a copy of the GNU General Public License along
3244 with this program; if not, write to the Free Software Foundation, Inc.,
3245 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3246 @end smallexample
3248 Also add information on how to contact you by electronic and paper mail.
3250 If the program is interactive, make it output a short notice like this
3251 when it starts in an interactive mode:
3253 @smallexample
3254 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
3255 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
3256 This is free software, and you are welcome to redistribute it
3257 under certain conditions; type `show c' for details.
3258 @end smallexample
3260 The hypothetical commands @samp{show w} and @samp{show c} should show
3261 the appropriate parts of the General Public License.  Of course, the
3262 commands you use may be called something other than @samp{show w} and
3263 @samp{show c}; they could even be mouse-clicks or menu items---whatever
3264 suits your program.
3266 You should also get your employer (if you work as a programmer) or your
3267 school, if any, to sign a ``copyright disclaimer'' for the program, if
3268 necessary.  Here is a sample; alter the names:
3270 @example
3271 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
3272 `Gnomovision' (which makes passes at compilers) written by James Hacker.
3274 @var{signature of Ty Coon}, 1 April 1989
3275 Ty Coon, President of Vice
3276 @end example
3278 This General Public License does not permit incorporating your program into
3279 proprietary programs.  If your program is a subroutine library, you may
3280 consider it more useful to permit linking proprietary applications with the
3281 library.  If this is what you want to do, use the GNU Library General
3282 Public License instead of this License.
3285 @node Concept Index,  , GNU General Public License, Top
3286 @comment  node-name,  next,  previous,  up
3287 @unnumbered Index
3289 @printindex cp
3291 @bye