cgi.el: Make this work without cl-seq.el.
[muse-el.git] / muse.texi
blob193ca00c1277d89d7fe247d7d365aa104283543c
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.90 (3.03 RC1).
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.
95 Publishing Various Types of Documents
97 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
98 * Book::                        Publishing entries into a compilation.
99 * DocBook::                     Publishing in DocBook XML form.
100 * HTML::                        Publishing in HTML or XHTML form.
101 * Journal::                     Keeping a journal or blog.
102 * LaTeX::                       Publishing LaTeX documents.
103 * Poem::                        Publish a poem to LaTex or PDF.
104 * Texinfo::                     Publish entries to Texinfo format or PDF.
106 Integrating Muse and pyblosxom.cgi
108 * Blosxom Requirements::        Other tools needed to the Blosxom style.
109 * Blosxom Entries::             Format of a Blosxom entry and automation.
110 * Blosxom Options::             Blosxom styles and options provided.
112 Making your own publishing styles
114 * Common Elements::             Common functionality shared by styles.
115 * Deriving Styles::             Deriving a new style from an existing
116                                   one.
118 Common functionality shared by styles
120 * Markup Functions::            Specifying functions to marking up text.
121 * Markup Regexps::              Markup rules for publishing.
122 * Markup Strings::              Strings specific to a publishing style.
123 * Markup Tags::                 Tag specifications for special markup.
124 * Style Elements::              Parameters used for defining styles.
126 @end detailmenu
127 @end menu
129 @node Preface, Introduction, Top, Top
130 @comment  node-name,  next,  previous,  up
131 @chapter About the documentation
133 This document describes Muse, which was written by John Wiegley
134 and is now maintained by Michael Olson.  Several versions of it are
135 available on-line.
137 @itemize @bullet
138 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
139 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
140 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
141 @end itemize
143 @node Introduction, Obtaining Muse, Preface, Top
144 @comment  node-name,  next,  previous,  up
145 @chapter What is Muse?
147 Emacs Muse is an authoring and publishing environment for Emacs.  It
148 simplifies the process of writing documents and publishing them to
149 various output formats.
151 Muse consists of two main parts: an enhanced text-mode for authoring
152 documents and navigating within Muse projects, and a set of publishing
153 styles for generating different kinds of output.
155 This idea is not in any way new. Numerous systems exist -- even one
156 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
157 more modular environment, with a rather simple core, in which "styles"
158 are derived from to create new styles. Much of Muse's overall
159 functionality is optional. For example, you can use the publisher
160 without the major-mode, or the mode without doing any publishing; or if
161 you don't load the Texinfo or LaTeX modules, those styles won't be
162 available.
164 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
165 code has been restructured and rewritten, especially its publishing
166 functions. The focus in this revision is on the authoring and publishing
167 aspects, and the "wikiness" has been removed as a default behavior
168 (available in the optional @file{muse-wiki} module). CamelCase words are
169 no longer special by default.
171 @node Obtaining Muse, Installation, Introduction, Top
172 @comment  node-name,  next,  previous,  up
173 @chapter How to Get Muse Releases and Development Changes
175 @menu
176 * Releases::                    Released versions of Muse.
177 * Development::                 Latest unreleased development changes.
178 @end menu
180 @node Releases, Development, Obtaining Muse, Obtaining Muse
181 @comment  node-name,  next,  previous,  up
182 @section Released versions of Muse
184 Choose to install a release if you want to minimize risk.
186 Errors are corrected in development first.  User-visible changes will be
187 announced on the @email{emacs-wiki-discuss@@nongnu.org} mailing list.
188 This mailing list also provides support for @command{Planner} and
189 @command{emacs-wiki}, which is the predecessor of Muse.
190 @pxref{Getting Help and Reporting Bugs}.
192 @cindex releases, Debian package
193 @cindex Debian package for Muse
194 Debian users can get Muse via apt-get.  The @file{muse-el} package is
195 available both at Michael Olson's Debian repository and the official
196 Debian repository.  To make use of the former, add the following line to
197 your @file{/etc/apt/sources.list} file and run @code{apt-get install
198 muse}.
200 @example
201 deb http://www.mwolson.org/debian/ ./
202 @end example
204 @cindex releases, from source
205 Alternatively, you can download the latest release from
206 @uref{http://www.mwolson.org/static/dist/muse/} .
208 @node Development,  , Releases, Obtaining Muse
209 @comment  node-name,  next,  previous,  up
210 @section Latest unreleased development changes
211 @cindex development
213 Choose the development version if you want to live on the bleeding edge
214 of Muse development or try out new features before release.
216 @cindex arch revision control system, using
217 The Arch revision control system allows you to retrieve previous
218 versions and select specific features and bug fixes.  If you would like
219 to contribute to Muse development, it is highly recommended that you use
220 Arch, but this is not a requirement.
222 If you are new to Arch, you might find this tutorial helpful:
223 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
225 Downloading the Muse module with Arch and staying up-to-date involves
226 the following steps.
228 @enumerate
229 @item Install arch
231 @itemize @bullet
232 @item Debian: @kbd{apt-get install tla}.
233 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
234 @end itemize
236 @item Register the archive.
237 @example
238 tla register-archive -f http://www.mwolson.org/archives/2005
239 @end example
241 @item Download the Muse package.
242 @example
243 # Download Muse into the @file{muse} directory.
244 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
245 @end example
247 @item List upstream changes that are missing from your local copy.
248 Do this whenever you want to see whether new changes have been committed
249 to Muse.
251 @example
252 # Change to the source directory you are interested in.
253 cd muse/
255 # Display the summary of changes
256 tla missing --summary
257 @end example
259 @cindex updating Muse with Arch
260 @item Update to the latest version by replaying missing changes.
261 @example
262 cd muse
263 tla replay
264 @end example
266 @end enumerate
268 There are other ways to interact with the Muse archive.
270 @itemize
271 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
272 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
273 @end itemize
275 The latest development snapshot will be kept up-to-date since it is
276 updated at the same time as the Arch repository.
278 @node Installation, Getting Started, Obtaining Muse, Top
279 @comment  node-name,  next,  previous,  up
280 @chapter Compiling and Installing Muse
282 Muse may be compiled and installed on your machine.
284 @subsubheading Compilation
286 This is an optional step, since Emacs Lisp source code does not
287 necessarily have to be byte-compiled.  It will yield a speed increase,
288 though.
290 A working copy of Emacs or XEmacs is needed in order to compile the
291 Emacs Muse.  By default, the program that is installed with the name
292 @command{emacs} will be used.
294 If you want to use the @command{xemacs} binary to perform the
295 compilation, you would need to edit @file{Makefile.defs} in the
296 top-level directory as follows.  You can put either a full path to an
297 Emacs or XEmacs binary or just the command name, as long as it is in the
298 @env{PATH}.
300 @example
301 EMACS    = xemacs
302 SITEFLAG = -no-site-file
303 @end example
305 Running @code{make} should compile the Muse source files in the
306 @file{lisp} directory.
308 @subsubheading Installation
310 Muse may be installed into your file hierarchy by doing the following.
312 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
313 where you want the source and compiled Muse files to be installed and
314 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
315 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
316 Compilation section if you are using XEmacs.
318 If you are installing Muse on a Debian system, you might want to change
319 the value of @env{INSTALLINFO} as specified in @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 @c PRE3_03: Give more examples
408 @c PRE3_03: Describe :set and other options fully
410 @node Keystroke Summary, Markup Rules, Projects, Top
411 @comment  node-name,  next,  previous,  up
412 @chapter Keys Used in Muse Mode
413 @cindex keystrokes
415 This is a summary of keystrokes available in every Muse buffer.
417 @table @kbd
419 @item C-c C-a (`muse-index')
420 Display an index of all known Muse pages.
422 @item C-c C-b (`muse-browse-result')
423 Show the published result of this page.
425 @item C-c C-e (`muse-edit-link-at-point')
426 Edit link at point.
428 @item C-c C-f (`muse-project-find-file'), also C-c C-v
429 Open another Muse page.  Prompt for the name.
431 @item C-c C-l (`font-lock-mode')
432 Highlight/refresh the current buffer.
434 @item C-c C-p (`muse-project-publish')
435 Publish any Muse pages that have changed.
437 @item C-c C-v (`muse-project-find-file'), also C-c C-f
438 Open another Muse page.  Prompt for the name.
440 @item C-c = (`muse-what-changed')
441 Diff this page against the last backup version.
443 @item C-c TAB (`muse-insert-tag')
444 Insert a tag interactively.
446 @item TAB
447 Move to the next Wiki reference.
449 @item S-TAB
450 Move to the previous Wiki reference.
452 @end table
455 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
456 @comment  node-name,  next,  previous,  up
457 @chapter Rules for Using Markup
458 @cindex markup
460 A Muse document uses special, contextual markup rules to determine how
461 to format the output result.  For example, if a paragraph is indented,
462 Muse assumes it should be quoted.
464 There are not too many markup rules, and all of them strive to be as
465 simple as possible so that you can focus on document creation, rather
466 than formatting.
468 @menu
469 * Paragraphs::                  Paragraphs: centering and quoting.
470 * Headings::                    Levels of headings.
471 * Directives::                  Directives at the beginning of a
472                                   document.
473 * Emphasizing Text::            Bold, italicized, and underlined text.
474 * Footnotes::                   Making notes to be shown at the end.
475 * Verse::                       Indicating poetic stanzas.
476 * Lists::                       Lists of items.
477 * Tables::                      Generation of data tables.
478 * Explicit Links::              Hyperlinks and email addresses with
479                                   descriptions.
480 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
481                                   links.
482 * Images::                      Publishing and displaying images.
483 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
484 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
485                                   for extensibility.
486 * Comments::                    Lines to omit from published output.
487 @end menu
489 @node Paragraphs, Headings, Markup Rules, Markup Rules
490 @comment  node-name,  next,  previous,  up
491 @section Paragraphs: centering and quoting
492 @cindex paragraphs
494 Paragraphs in Muse must be separated by a blank line.
496 @cindex paragraphs, centered
497 @strong{Centered paragraphs and quotations}
499 A line that begins with six or more columns of whitespace (either tabs
500 or spaces) indicates a centered paragraph.
502 @cindex paragraphs, quoted
503 @cindex quotations
504 But if a line begins with whitespace, though less than six columns, it
505 indicates a quoted paragraph.
507 @cindex examples
508 @cindex monospace, rendering blocks
509 @cindex HTML, rendering blocks in monospace
510 @strong{Literal paragraphs}
512 The @verb{|<example>|} tag is used for examples, where whitespace should
513 be preserved, the text rendered in monospace, and any characters special
514 to the output style escaped.
516 @cindex literal text
517 @cindex HTML, inserting a raw block
518 There is also the @verb{|<literal>|} tag, which causes a marked block to
519 be entirely left alone.  This can be used for inserting a hand-coded
520 HTML blocks into HTML output, for example.
522 @node Headings, Directives, Paragraphs, Markup Rules
523 @comment  node-name,  next,  previous,  up
524 @section Levels of headings
525 @cindex headings
527 A heading becomes a chapter or section in printed output -- depending on
528 the style.  To indicate a heading, start a new paragraph with one or
529 more asterices, followed by a space and the heading title.  Then begin
530 another paragraph to enter the text for that section.
532 All levels of headings will be published.  Most publishing styles only
533 distinguish the between the first 4 levels, however.
535 @example
536 * First level
538 ** Second level
540 *** Third level
542 **** Fourth level
543 @end example
545 @node Directives, Emphasizing Text, Headings, Markup Rules
546 @comment  node-name,  next,  previous,  up
547 @section Directives at the beginning of a document
548 @cindex directives
550 Directives are lines beginning with the @samp{#} character that come
551 before any paragraphs or sections in the document.  Directives are of
552 the form ``#directive content of directive''.  You can use any
553 combination of uppercase and lowercase letters for directives, even if
554 the directive is not in the list below.
556 The @code{muse-publishing-directive} function may be used in header and
557 footer text to access directives.  For example, to access the
558 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
560 The following is a list of directives that Muse uses.
562 @table @code
563 @cindex #author
564 @item #author
565 The author of this document.
567 If this is not specified, Muse will attempt to figure it out from the
568 @code{user-full-name} variable.
570 @cindex #date
571 @item #date
572 The date that the document was last modified.
574 This is used by publishing styles that are able to embed the date
575 information.
577 @cindex #desc
578 @item #desc
579 A short description of this document.
581 This is used by the @code{journal} publishing style to embed information
582 inside of an RSS/RDF feed.
584 @cindex #title
585 @item #title
586 The title of this document.
588 If this is not specified, the name of the file is used.
590 @end table
592 @node Emphasizing Text, Footnotes, Directives, Markup Rules
593 @comment  node-name,  next,  previous,  up
594 @section Bold, italicized, and underlined text
595 @cindex emphasizing text
596 @cindex underlining text
597 @cindex italicizing text
598 @cindex verbatim text
599 @cindex monospace, rendering words
601 To emphasize text, surround it with certain specially recognized
602 characters.
604 @example
605 *emphasis*
606 **strong emphasis**
607 ***very strong emphasis***
608 _underlined_
609 =verbatim and monospace=
610 @end example
612 @cindex WYSIWYG
613 While editing a Muse document in Muse mode, these forms of emphasis will
614 be highlighted in a WYSIWYG manner.  Each of these forms may span
615 multiple lines.
617 Verbatim text will be colored as gray by default.  To change this,
618 customize @code{muse-verbatim-face}.
620 You can also use the @verb{|<code>|} tag to indicate verbatim and
621 monospace text.  This is handy for regions that have an ``='' in them.
623 @node Footnotes, Verse, Emphasizing Text, Markup Rules
624 @comment  node-name,  next,  previous,  up
625 @section Making notes to be shown at the end
626 @cindex footnotes
628 A footnote reference is simply a number in square brackets.  To define
629 the footnote, place this definition at the bottom of your file.
630 @samp{footnote-mode} can be used to greatly facilitate the creation of
631 these kinds of footnotes.
633 Footnotes are defined by the same number in brackets occurring at the
634 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
635 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
636 the point of insertion.
638 @node Verse, Lists, Footnotes, Markup Rules
639 @comment  node-name,  next,  previous,  up
640 @section Indicating poetic stanzas
641 @cindex verses
642 @cindex poetry
644 Poetry requires that whitespace be preserved, but without resorting to
645 monospace.  To indicate this, use the following markup, reminiscent of
646 email quotations.
648 @example
649 > A line of Emacs verse;
650 >   forgive its being so terse.
651 @end example
653 You can also use the @verb{|<verse>|} tag, if you prefer.
655 @example
656 <verse>
657 A line of Emacs verse;
658   forgive its being so terse.
659 </verse>
660 @end example
662 @cindex verses, multiple stanzas
663 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
664 follows.
666 @example
667 <verse>
668 A line of Emacs verse;
669   forgive its being so terse.
671 In terms of terse verse,
672   you could do worse.
673 </verse>
674 @end example
676 @node Lists, Tables, Verse, Markup Rules
677 @comment  node-name,  next,  previous,  up
678 @section Lists of items
679 @cindex lists
681 Lists are given using special characters at the beginning of a line.
682 Whitespace must occur before bullets or numbered items, to distinguish
683 from the possibility of those characters occurring in a real sentence.
685 @cindex lists, bullets
686 These are rendered as a bullet list.
688 @example
689 - bullet item one
690 - bullet item two
691 @end example
693 @cindex lists, enumerated
694 An enumerated list follows.
696 @example
697 1. Enum item one
698 2. Enum item two
699 @end example
701 @cindex lists, definitions
702 Here is a definition list.
704 @example
705 Term1 ::
706   This is a first definition
707   And it has two lines;
708   no, make that three.
710 Term2 ::
711   This is a second definition
712 @end example
714 @node Tables, Explicit Links, Lists, Markup Rules
715 @comment  node-name,  next,  previous,  up
716 @section Generation of data tables
717 @cindex tables
719 @cindex tables, simple
720 Only very simple tables are supported.  The syntax is as follows.
722 @example
723 Double bars  || Separate header fields
725 Single bars   | Separate body fields
726 Here are more | body fields
728 Triple bars ||| Separate footer fields
729 @end example
731 Some publishing styles require header fields to come first, then footer
732 fields, and then the body fields.  You can use any order for these
733 sections that you like, and Muse will re-order them for you at
734 publish-time.
736 If you wish to disable table generation for one Muse file, add the
737 directive @samp{#disable-tables t} to the top of the file.
739 @node Explicit Links, Implicit Links, Tables, Markup Rules
740 @comment  node-name,  next,  previous,  up
741 @section Hyperlinks and email addresses with descriptions
742 @cindex links, explicit
744 A hyperlink can reference a URL, or another page within a Muse
745 project.  In addition, descriptive text can be specified, which should
746 be displayed rather than the link text in output styles that supports
747 link descriptions.  The syntax is as follows.
749 @example
750 [[link target][link description]]
751 [[link target without description]]
752 @end example
754 Thus, the current maintainer's homepage for Muse can be found
755 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
756 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
758 @node Implicit Links, Images, Explicit Links, Markup Rules
759 @comment  node-name,  next,  previous,  up
760 @section Bare URLs, WikiNames, and InterWiki links
761 @cindex links, implicit
762 @cindex links, raw
763 @cindex URLs
764 @cindex Email addresses
766 A URL or email address encountered in the input text is published as a
767 hyperlink.  These kind of links are called @dfn{implicit links} because
768 they are not separated from the rest of the Muse document in any way.
770 @cindex WikiNames
771 If the @command{muse-wiki} module is loaded, another form of implicit
772 link will be made available.  WikiNames, which are typed in camelcase,
773 will be highlighted and published as links, provided that the file they
774 refer to exists.
776 Customization of WikiName recognition may be accomplished by editing the
777 @code{muse-wiki-wikiword-regexp} option and subsequently running
778 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
779 If you use the Customize interface, the latter will be done
780 automatically.
782 @cindex InterWiki links
783 @cindex inter-project links
784 The @command{muse-wiki} module also allows for InterWiki links.  These
785 are similar to WikiWords, but they specify both the project and page of
786 a file.  The names of your project entries in @code{muse-project-alist}
787 will be used as InterWiki names by default.  Several examples follow.
789 @example
790 Blog::DocumentingMuse
791 Projects#EmacsMuse
792 Website
793 @end example
795 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
796 the project name, and @samp{DocumentingMuse} is the page name.  In the
797 second example, @samp{#} is the interwiki delimiter.  If the name of a
798 project occurs by itself in text, like the third case, it will be
799 colorized and published as a link to the default page of the given
800 project.
802 Customization of interwiki links may be accomplished by editing the
803 @code{muse-wiki-interwiki-alist} option.
805 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
806 @comment  node-name,  next,  previous,  up
807 @section Publishing and displaying images
808 @cindex images
809 @cindex links, with images
810 @strong{Image links}
812 Links to images may be used in either the target or the description, or
813 both.  Thus, the following code will publish as a clickable image that
814 points to @url{http://www.mwolson.org/}.
816 @example
817 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
818 @end example
820 @cindex images, displaying
821 @cindex images, inlined
822 @cindex images, local
823 If a link to a locally-available image is encountered in the link
824 description, Muse mode will attempt to display it if your version of
825 Emacs permits this.  The following example will display correctly and
826 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
827 exists in the @file{../pics/} directory.
829 @example
830 [[TestPage][../pics/TestLogo.png]]
831 @end example
833 @cindex images, without a description
834 An image link is not required to have a description.  The link
835 @samp{[[../myimage.png]]} will display and publish as expected.
837 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
838 @comment  node-name,  next,  previous,  up
839 @section Inserting a horizontal line or anchor
841 @cindex horizontal rules
842 @cindex dashes
843 @strong{Horizontal Rules}
845 Four or more dashes indicate a horizontal rule.  Be sure to put blank
846 lines around it, or it will be considered part of the proceeding or
847 following paragraph!
849 @cindex anchors
850 @cindex links, with target on same page
851 @strong{Anchors}
853 If you begin a line with "#anchor" -- where "anchor" can be any word
854 that doesn't contain whitespace -- it defines an anchor at that point
855 into the document.  This point can be referenced using "page#anchor" as
856 the target in a Muse link.
858 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
859 @comment  node-name,  next,  previous,  up
860 @section Evaluating Emacs Lisp code in documents for extensibility
861 @cindex lisp, embedded
863 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
864 which is the only Muse tag supported in a style's header and footer
865 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
866 text you wish.  The inserted output will get marked up, if the
867 @verb{|<lisp>|} tag appears within the main text of the document.
869 @example
870 <lisp>(concat "This form gets " "inserted")</lisp>
871 @end example
873 @cindex lisp, and insert command
874 Note that you should not use the @code{insert} command within a set of
875 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
876 tags will be automatically inserted into the document.
878 @node Comments, , Embedded Lisp, Markup Rules
879 @comment  node-name,  next,  previous,  up
880 @section Lines to omit from published output
881 @cindex comments
882 @cindex publishing, omitting lines
884 Use the following syntax to indicate a comment.  Comments will not be
885 published.
887 @example
888 ; Comment text goes here.
889 @end example
891 That is, only a semi-colon at the beginning of a line, followed by a
892 literal space, will cause that line to be treated as a comment.
894 @node Publishing Styles, Extending Muse, Markup Rules, Top
895 @comment  node-name,  next,  previous,  up
896 @chapter Publishing Various Types of Documents
897 @cindex publishing styles
899 One of the principle features of Muse is the ability to publish a simple
900 input text to a variety of different output styles.  Muse also makes it
901 easy to create new styles, or derive from an existing style.
903 @menu
904 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
905 * Book::                        Publishing entries into a compilation.
906 * DocBook::                     Publishing in DocBook XML form.
907 * HTML::                        Publishing in HTML or XHTML form.
908 * Journal::                     Keeping a journal or blog.
909 * LaTeX::                       Publishing LaTeX documents.
910 * Poem::                        Publish a poem to LaTex or PDF.
911 * Texinfo::                     Publish entries to Texinfo format or PDF.
912 @end menu
914 @node Blosxom, Book, Publishing Styles, Publishing Styles
915 @comment  node-name,  next,  previous,  up
916 @section Integrating Muse and pyblosxom.cgi
917 @cindex blog, one-file-per-entry style
919 The Blosxom publishing style publishes a tree of categorised files to a
920 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
921 In other words, each blog entry corresponds with one file.
923 @menu
924 * Blosxom Requirements::        Other tools needed to the Blosxom style.
925 * Blosxom Entries::             Format of a Blosxom entry and automation.
926 * Blosxom Options::             Blosxom styles and options provided.
927 @end menu
929 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
930 @comment  node-name,  next,  previous,  up
931 @subsection Other tools needed to the Blosxom style
933 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
934 installed on a machine that you have upload access to.
936 The following additional components are required in order to make the
937 date of blog entries display as something sensible.
939 @enumerate
940 @item
941 A script to gather date directives from the entire blog tree into a
942 single file.  The file must associate a blog entry with a date.
944 @item
945 A plugin for (py)blosxom that reads this file.
946 @end enumerate
948 These 2 things are provided for @command{pyblosxom.cgi} in the
949 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
950 former service, while @file{hardcodedates.py} provides the latter
951 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
952 script will be found/written.
954 Here is a sample listing from my @file{timestamps} file, which maps
955 each file to a date.  This can really be in any format, as long as your
956 date-gathering script and your plugin can both understand it.
958 @example
959 2005-04-01-14-16 personal/paper_cranes
960 2005-03-21 personal/spring_break_over
961 2004-10-24 personal/finished_free_culture
962 @end example
964 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
965 @comment  node-name,  next,  previous,  up
966 @subsection Format of a Blosxom entry and automation
968 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
969 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
970 plus whatever normal content is desired.
972 The date directive is not used directly by @command{pyblosxom.cgi} or
973 this program.  You need to have the two additional items from the former
974 section to make use of this feature.
976 There is a function called @code{muse-blosxom-new-entry} that will
977 automate the process of making a new blog entry.  To make use of it, do
978 the following.
980 @itemize @bullet
981 @item
982 Customize @code{muse-blosxom-base-directory} to the location that your
983 blog entries are stored.
985 @item
986 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
987 use the following code to assign this function to @kbd{C-c p l'}.
989 @example
990 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
991 @end example
993 @item
994 You should create your directory structure ahead of time under your base
995 directory.  These directories, which correspond with category names, may
996 be nested.
998 @item
999 When you enter this key sequence, you will be prompted for the category
1000 of your entry and its title.  Upon entering this information, a new file
1001 will be created that corresponds with the title, but in lowercase
1002 letters and having special characters converted to underscores.  The
1003 title and date directives will be inserted automatically.
1004 @end itemize
1006 @node Blosxom Options, , Blosxom Entries, Blosxom
1007 @comment  node-name,  next,  previous,  up
1008 @subsection Blosxom styles and options provided
1010 The following styles and options are available in the Blosxom publishing
1011 style.
1013 @subsubheading Styles provided
1015 @table @code
1017 @cindex publishing styles, blosxom-html
1018 @item blosxom-html
1019 Publish Blosxom entries in HTML form.
1021 @cindex publishing styles, blosxom-xhtml
1022 @item blosxom-xhtml
1023 Publish Blosxom entries in XHTML form.
1025 @end table
1027 @subsubheading Options provided
1029 @table @code
1031 @item muse-blosxom-extension
1032 Default file extension for publishing Blosxom files.
1034 @item muse-blosxom-header
1035 Header used for publishing Blosxom files.
1037 This may be text or a filename.
1039 @item muse-blosxom-footer
1040 Footer used for publishing Blosxom files.
1042 This may be text or a filename.
1044 @item muse-blosxom-base-directory
1045 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1047 This is the top-level directory where your blog entries may be found
1048 locally.
1050 @end table
1052 @node Book, DocBook, Blosxom, Publishing Styles
1053 @comment  node-name,  next,  previous,  up
1054 @section Publishing entries into a compilation
1056 This publishing style is used to output ``books'' in LaTeX or PDF
1057 format.
1059 Each page will become a separate chapter in the book, unless the style
1060 keyword @option{:nochapters} is used, in which case they are all run
1061 together as if one giant chapter.
1063 You will need to call the @code{muse-book-publish-project} function in
1064 order to publish this style.  An example of this may be found in John
1065 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
1067 @subsubheading Styles provided
1069 @table @code
1071 @cindex publishing styles, book-latex
1072 @item book-latex
1073 Publish a book in LaTeX form.  The header and footer are different than
1074 the normal LaTeX publishing mode.
1076 @cindex publishing styles, book-pdf
1077 @item book-pdf
1078 Publish a book in PDF form.  The header and footer are different than
1079 the normal PDF publishing mode.
1081 @end table
1083 @subsubheading Options provided
1085 @table @code
1087 @item muse-book-before-publish-hook
1088 A hook run in the book buffer before it is marked up.
1090 @item muse-book-after-publish-hook
1091 A hook run in the book buffer after it is marked up.
1093 @item muse-book-latex-header
1094 Header used for publishing books to LaTeX.
1096 This may be text or a filename.
1098 @item muse-book-latex-footer
1099 Footer used for publishing books to LaTeX.
1101 This may be text or a filename.
1103 @end table
1105 @node DocBook, HTML, Book, Publishing Styles
1106 @comment  node-name,  next,  previous,  up
1107 @section Publishing in DocBook XML form
1109 This publishing style is used to generate DocBook XML files.
1111 @subsubheading Styles provided
1113 @table @code
1115 @cindex publishing styles, docbook
1116 @item docbook
1118 @end table
1120 @subsubheading Options provided
1122 @table @code
1124 @item muse-docbook-extension
1125 Default file extension for publishing DocBook XML files.
1127 @item muse-docbook-header
1128 Header used for publishing DocBook XML files.
1130 This may be text or a filename.
1132 @item muse-docbook-footer
1133 Footer used for publishing DocBook XML files.
1135 This may be text or a filename.
1137 @item muse-docbook-markup-regexps
1138 List of markup rules for publishing a Muse page to DocBook XML.
1140 @item muse-docbook-markup-functions
1141 An alist of style types to custom functions for that kind of text.
1143 @item muse-docbook-markup-strings
1144 Strings used for marking up text.
1146 These cover the most basic kinds of markup, the handling of which
1147 differs little between the various styles.
1149 @item muse-docbook-markup-specials
1150 A table of characters which must be represented specially.
1152 @item muse-docbook-encoding-default
1153 The default Emacs buffer encoding to use in published files.
1154 This will be used if no special characters are found.
1156 @item muse-docbook-charset-default
1157 The default DocBook XML charset to use if no translation is
1158 found in @code{muse-docbook-encoding-map}.
1160 @item muse-docbook-encoding-map
1161 An alist mapping emacs coding systems to appropriate DocBook charsets.
1162 Use the base name of the coding system (i.e. without the -unix).
1164 @end table
1166 @node HTML, Journal, DocBook, Publishing Styles
1167 @comment  node-name,  next,  previous,  up
1168 @section Publishing in HTML or XHTML form
1170 This publishing style is capable of producing HTML or XHTML documents.
1172 @subsubheading Styles provided
1174 @table @code
1176 @cindex publishing styles, html
1177 @item html
1178 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1180 @item xhtml
1181 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1183 @end table
1185 @subsubheading Options provided
1187 If an HTML option does not have a corresponding XHTML option, it will
1188 be used for both of these publishing styles.
1190 @table @code
1192 @item muse-html-extension
1193 Default file extension for publishing HTML files.
1195 @item muse-xhtml-extension
1196 Default file extension for publishing XHTML files.
1198 @item muse-html-style-sheet
1199 Store your stylesheet definitions here.
1201 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1202 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1203 @verb{|<lisp>|} markup tags.
1205 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1206 properly.
1208 @item muse-html-header
1209 Header used for publishing HTML files.
1211 This may be text or a filename.
1213 @item muse-html-footer
1214 Footer used for publishing HTML files.
1216 This may be text or a filename.
1218 @item muse-xhtml-header
1219 Header used for publishing XHTML files.
1221 This may be text or a filename.
1223 @item muse-xhtml-footer
1224 Footer used for publishing XHTML files.
1226 This may be text or a filename.
1228 @item muse-html-anchor-on-word
1229 When true, anchors surround the closest word.
1231 This allows you to select them in a browser (i.e. for pasting), but has
1232 the side-effect of marking up headers in multiple colors if your header
1233 style is different from your link style.
1235 @item muse-html-table-attributes
1236 The attribute to be used with HTML @verb{|<table>|} tags.
1238 Note that since Muse supports direct insertion of HTML tags, you can
1239 easily create any kind of table you want, as long as each line begins at
1240 column 0 (to prevent it from being blockquoted).
1242 @item muse-html-markup-regexps
1243 List of markup rules for publishing a Muse page to HTML.
1245 @item muse-html-markup-functions
1246 An alist of style types to custom functions for that kind of text.
1248 @item muse-html-markup-strings
1249 Strings used for marking up text as HTML.
1251 These cover the most basic kinds of markup, the handling of which
1252 differs little between the various styles.
1254 @item muse-xhtml-markup-strings
1255 Strings used for marking up text as XHTML.
1257 These cover the most basic kinds of markup, the handling of which
1258 differs little between the various styles.
1260 @item muse-html-markup-tags
1261 A list of tag specifications, for specially marking up HTML.
1262 @xref{muse-publish-markup-tags}, for more information.
1264 @item muse-html-markup-specials
1265 A table of characters which must be represented specially.  By default,
1266 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1268 @item muse-html-meta-http-equiv
1269 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1271 @item muse-html-meta-content-type
1272 The content type used for the HTML @verb{|<meta>|} tag.
1274 If you are striving for XHTML 1.1 compliance, you may want to change
1275 this to ``application/xhtml+xml''.
1277 @item muse-html-meta-content-encoding
1278 The charset to append to the HTML @verb{|<meta>|} tag.
1280 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1281 and determine the HTML charset from emacs's coding.  If set to a string,
1282 this string will be used to force a particular charset.
1284 @item muse-html-charset-default
1285 The default HTML meta charset to use if no translation is found in
1286 @code{muse-html-encoding-map}.
1288 @item muse-html-encoding-default
1289 The default Emacs buffer encoding to use in published files.
1290 This will be used if no special characters are found.
1292 @item muse-html-encoding-map
1293 An alist mapping emacs coding systems to appropriate HTML charsets.
1294 Use the base name of the coding system (i.e. without the -unix).
1296 @end table
1298 @node Journal, LaTeX, HTML, Publishing Styles
1299 @comment  node-name,  next,  previous,  up
1300 @section Keeping a journal or blog
1301 @cindex journal
1302 @cindex blog, journal style
1304 The module facilitates the keeping and publication of a journal.  When
1305 publishing to HTML, it assumes the form of a web log, or blog.
1307 The input format for each entry is as follows.
1309 @example
1310 * 20040317: Title of entry
1312 text for the entry.
1314 <qotd>
1315 "You know who you are. It comes down to a simple gut check: You
1316 either love what you do or you don't. Period." -- P. Bronson
1317 </qotd>
1318 @end example
1320 The "qotd", or Quote of the Day, is entirely optional.  When generated
1321 to HTML, this entry is rendered as the following.
1323 @example
1324 <div class="entry">
1325   <div class="entry-qotd">
1326     <h3>Quote of the Day:</h3>
1327     <p>"You know who you are. It comes down to a simple gut
1328       check: You either love what you do or you don't. Period."
1329       -- P. Bronson</p>
1330   </div>
1331   <div class="entry-body">
1332     <div class="entry-head">
1333       <div class="entry-date">
1334         <span class="date">March 17, 2004</span>
1335       </div>
1336       <div class="entry-title">
1337         <h2>Title of entry</h2>
1338       </div>
1339     </div>
1340     <div class="entry-text">
1341       <p>Text for the entry.</p>
1342     </div>
1343   </div>
1344 </div>
1345 @end example
1347 The plurality of "div" tags makes it possible to display the entries in
1348 any form you wish, using a CSS style.
1350 Also, an .RDF file can be generated from your journal by publishing it
1351 with the "rdf" style.  It uses the first two sentences of the first
1352 paragraph of each entry as its "description", and auto-generates tags
1353 for linking to the various entries.
1355 @subsubheading Styles provided
1357 @table @code
1359 @cindex publishing styles, journal-html
1360 @item journal-html
1361 Publish journal entries as an HTML document.
1363 @cindex publishing styles, journal-xhtml
1364 @item journal-xhtml
1365 Publish journal entries as an XHTML document.
1367 @cindex publishing styles, journal-latex
1368 @item journal-latex
1369 Publish journal entries as a LaTeX document.
1371 @cindex publishing styles, journal-pdf
1372 @item journal-pdf
1373 Publish journal entries as a PDF document.
1375 @cindex publishing styles, journal-book-latex
1376 @item journal-book-latex
1377 Publish journal entries as a LaTeX book.
1379 @cindex publishing styles, journal-book-pdf
1380 @item journal-book-pdf
1381 Publish journal entries as a PDF book.
1383 @cindex publishing styles, journal-rdf
1384 @cindex publishing styles, RSS 1.0
1385 @item journal-rdf
1386 Publish journal entries as an RDF file (RSS 1.0).
1388 @cindex publishing styles, journal-rss
1389 @cindex publishing styles, RSS 2.0
1390 @item journal-rss
1391 Publish journal entries as an RSS file (RSS 2.0).
1393 @end table
1395 @subsubheading Options provided
1397 @table @code
1399 @item muse-journal-heading-regexp
1400 A regexp that matches a journal heading.
1402 Paren group 1 is the ISO date, group 2 is the optional category, and
1403 group 3 is the optional heading for the entry.
1405 @item muse-journal-date-format
1406 Date format to use for journal entries.
1408 @item muse-journal-html-heading-regexp
1409 A regexp that matches a journal heading from an HTML document.
1411 Paren group 1 is the ISO date, group 2 is the optional category, and
1412 group 3 is the optional heading for the entry.
1414 @item muse-journal-html-entry-template
1415 Template used to publish individual journal entries as HTML.
1417 @item muse-journal-latex-section
1418 Template used to publish a LaTeX section.
1420 @item muse-journal-latex-subsection
1421 Template used to publish a LaTeX subsection.
1423 @item muse-journal-latex-markup-tags
1424 A list of tag specifications, for specially marking up LaTeX.
1426 @xref{muse-publish-markup-tags}, for more information.
1428 @item muse-journal-rdf-extension
1429 Default file extension for publishing RDF (RSS 1.0) files.
1431 @item muse-journal-rdf-base-url
1432 The base URL of the website referenced by the RDF file.
1434 @item muse-journal-rdf-header
1435 Header used for publishing RDF (RSS 1.0) files.
1437 This may be text or a filename.
1439 @item muse-journal-rdf-footer
1440 Footer used for publishing RDF (RSS 1.0) files.
1442 This may be text or a filename.
1444 @item muse-journal-rdf-date-format
1445 Date format to use for RDF entries.
1447 @item muse-journal-rdf-entry-template
1448 Template used to publish individual journal entries as RDF.
1450 @item muse-journal-rdf-summarize-entries
1451 If non-nil, include only summaries in the RDF file, not the full data.
1453 @item muse-journal-rss-extension
1454 Default file extension for publishing RSS 2.0 files.
1456 @item muse-journal-rss-base-url
1457 The base URL of the website referenced by the RSS file.
1459 @item muse-journal-rss-header
1460 Header used for publishing RSS 2.0 files.
1462 This may be text or a filename.
1464 @item muse-journal-rss-footer
1465 Footer used for publishing RSS 2.0 files.
1467 This may be text or a filename.
1469 @item muse-journal-rss-date-format
1470 Date format to use for RSS 2.0 entries.
1472 @item muse-journal-rss-entry-template
1473 Template used to publish individual journal entries as RSS 2.0.
1475 @item muse-journal-rss-enclosure-types-alist
1476 File types that are accepted as RSS enclosures.
1478 This is an alist that maps file extension to content type.
1480 Useful for podcasting.
1482 @item muse-journal-rss-summarize-entries
1483 If non-nil, include only summaries in the RSS file, not the full data.
1485 Many RSS subscribers find this annoying.
1487 @item muse-journal-rss-markup-regexps
1488 List of markup rules for publishing a Muse journal page to RSS.
1490 For more information on the structure of this list,
1491 @xref{muse-publish-markup-regexps}.
1493 @item muse-journal-rss-markup-functions
1494 An alist of style types to custom functions for that kind of text.
1496 For more on the structure of this list,
1497 @xref{muse-publish-markup-functions}.
1499 @end table
1501 @node LaTeX, Poem, Journal, Publishing Styles
1502 @comment  node-name,  next,  previous,  up
1503 @section Publishing LaTeX documents
1505 This publishing style is capable of producing LaTeX or PDF documents.
1507 If you wish to publish PDF documents, you will need to have a good TeX
1508 installation.  For Debian, this can be accomplished by installing the
1509 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1511 @subsubheading Styles provided
1513 @table @code
1515 @cindex publishing styles, latex
1516 @item latex
1517 Publish a LaTeX document.
1519 @cindex publishing styles, pdf
1520 @item pdf
1521 Publish a PDF document, using an external LaTeX document conversion
1522 tool.
1524 @cindex publishing styles, latexcjk
1525 @item latexcjk
1526 Publish a LaTeX document with CJK (Chinese) encodings.
1528 @cindex publishing styles, pdfcjk
1529 @item pdfcjk
1530 Publish a PDF document with CJK (Chinese) encodings, using an external
1531 LaTeX document conversion tool.
1533 @end table
1535 @subsubheading Options provided
1537 @table @code
1539 @item muse-latex-extension
1540 Default file extension for publishing LaTeX files.
1542 @item muse-latex-pdf-extension
1543 Default file extension for publishing LaTeX files to PDF.
1545 @item muse-latex-header
1546 Header used for publishing LaTeX files.
1548 This may be text or a filename.
1550 @item muse-latex-footer
1551 Footer used for publishing LaTeX files.
1553 This may be text or a filename.
1555 @item muse-latexcjk-header
1556 Header used for publishing LaTeX files (CJK).
1558 This may be text or a filename.
1560 @item muse-latexcjk-footer
1561 Footer used for publishing LaTeX files (CJK).
1563 This may be text or a filename.
1565 @item muse-latex-markup-regexps
1566 List of markup regexps for identifying regions in a Muse page.
1568 For more on the structure of this list,
1569 @xref{muse-publish-markup-regexps}.
1571 @item muse-latex-markup-functions
1572 An alist of style types to custom functions for that kind of text.
1574 For more on the structure of this list,
1575 @xref{muse-publish-markup-functions}.
1577 @item muse-latex-markup-strings
1578 Strings used for marking up text.
1580 These cover the most basic kinds of markup, the handling of which
1581 differs little between the various styles.
1583 @item muse-latexcjk-encoding-map
1584 An alist mapping emacs coding systems to appropriate CJK codings.
1585 Use the base name of the coding system (ie, without the -unix).
1587 @item muse-latexcjk-encoding-default
1588 The default Emacs buffer encoding to use in published files.
1590 This will be used if no special characters are found.
1592 @item muse-latex-markup-specials
1593 A table of characters which must be represented specially.
1595 @end table
1597 @node Poem, Texinfo, LaTeX, Publishing Styles
1598 @comment  node-name,  next,  previous,  up
1599 @section Publish a poem to LaTex or PDF
1601 The @code{muse-poem} module makes it easy to attractively publish and
1602 reference poems in the following format, using the "memoir" module for
1603 LaTeX publishing.  It will also markup poems for every other output
1604 style, though none are nearly as pretty.
1606 @example
1607 Title
1610 Body of poem
1613 Annotations, history, notes, etc.
1614 @end example
1616 Once a poem is written in this format, just publish it to PDF using the
1617 @code{poem-pdf} style.  To make an inlined reference to a poem that
1618 you've written -- for example, from a blog page -- there is a "poem" tag
1619 defined by this module.
1621 @example
1622 <poem title="name.of.poem.page">
1623 @end example
1625 Let's assume the template above was called @file{name.of.poem.page};
1626 then the above tag would result in this inclusion.
1628 @example
1629 ** Title
1631 > Body of poem
1632 @end example
1634 John Wiegley uses this module for publishing all of the poems on his
1635 website, which are at
1636 @uref{http://www.newartisans.com/johnw/poems.html}.
1638 @subsubheading Styles provided
1640 @table @code
1642 @cindex publishing styles, poem-latex
1643 @item poem-latex
1644 Publish a poem in LaTeX form.
1646 @cindex publishing styles, poem-pdf
1647 @item poem-pdf
1648 Publish a poem to a PDF document.
1650 @cindex publishing styles, chapbook-latex
1651 @item chapbook-latex
1652 Publish a book of poems in LaTeX form.
1654 @cindex publishing styles, chapbook-pdf
1655 @item chapbook-pdf
1656 Publish a book of poems to a PDF document.
1658 @end table
1660 @subsubheading Options provided
1662 @table @code
1664 @item muse-poem-latex-header
1665 Header used for publishing LaTeX poems.
1667 This may be text or a filename.
1669 @item muse-poem-latex-footer
1670 Footer used for publishing LaTeX files.
1672 This may be text or a filename.
1674 @item muse-poem-markup-strings
1675 Strings used for marking up poems.
1677 These cover the most basic kinds of markup, the handling of which
1678 differs little between the various styles.
1680 @item muse-chapbook-latex-header
1681 Header used for publishing a book of poems in LaTeX form.
1683 This may be text or a filename.
1685 @item muse-chapbook-latex-footer
1686 Footer used for publishing a book of poems in LaTeX form.
1688 This may be text or a filename.
1690 @item muse-poem-chapbook-strings
1691 Strings used for marking up books of poems.
1693 These cover the most basic kinds of markup, the handling of which
1694 differs little between the various styles.
1696 @end table
1698 @node Texinfo, , Poem, Publishing Styles
1699 @comment  node-name,  next,  previous,  up
1700 @section Publish entries to Texinfo format or PDF
1702 Rules for publishing a Muse file as a Texinfo article.
1704 @subsubheading Styles provided
1706 @table @code
1708 @cindex publishing styles, texi
1709 @item texi
1710 Publish a file in Texinfo form.
1712 @cindex publishing styles, texi
1713 @item info
1714 Generate an Info file from a Muse file.
1716 @cindex publishing styles, info-pdf
1717 @item info-pdf
1718 Publish a file in PDF form.
1720 @end table
1722 @subsubheading Options provided
1724 @table @code
1726 @item muse-texinfo-process-natively
1727 If non-nil, use the Emacs `texinfmt' module to make Info files.
1729 @item muse-texinfo-extension
1730 Default file extension for publishing Texinfo files.
1732 @item muse-texinfo-info-extension
1733 Default file extension for publishing Info files.
1735 @item muse-texinfo-pdf-extension
1736 Default file extension for publishing PDF files.
1738 @item muse-texinfo-header
1739 Text to prepend to a Muse page being published as Texinfo.
1741 This may be text or a filename.
1742 It may contain @verb{|<lisp>|} markup tags.
1744 @item muse-texinfo-footer
1745 Text to append to a Muse page being published as Texinfo.
1747 This may be text or a filename.
1748 It may contain @verb{|<lisp>|} markup tags.
1750 @item muse-texinfo-markup-regexps
1751 List of markup rules for publishing a Muse page to Texinfo.
1753 For more on the structure of this list,
1754 @xref{muse-publish-markup-regexps}.
1756 @item muse-texinfo-markup-functions
1757 An alist of style types to custom functions for that kind of text.
1759 For more on the structure of this list, see
1760 @xref{muse-publish-markup-functions}.
1762 @item muse-texinfo-markup-strings
1763 Strings used for marking up text.
1765 These cover the most basic kinds of markup, the handling of which
1766 differs little between the various styles.
1768 @item muse-texinfo-markup-specials
1769 A table of characters which must be represented specially.
1771 @end table
1774 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
1775 @comment  node-name,  next,  previous,  up
1776 @chapter Making your own publishing styles
1778 @menu
1779 * Common Elements::             Common functionality shared by styles.
1780 * Deriving Styles::             Deriving a new style from an existing
1781                                   one.
1782 @end menu
1784 @node Common Elements, Deriving Styles, , Extending Muse
1785 @comment  node-name,  next,  previous,  up
1786 @section Common functionality shared by styles
1787 @cindex publishing styles, common
1789 @menu
1790 * Markup Functions::            Specifying functions to marking up text.
1791 * Markup Regexps::              Markup rules for publishing.
1792 * Markup Strings::              Strings specific to a publishing style.
1793 * Markup Tags::                 Tag specifications for special markup.
1794 * Style Elements::              Parameters used for defining styles.
1795 @end menu
1797 @node Markup Functions, Markup Regexps, , Common Elements
1798 @comment  node-name,  next,  previous,  up
1799 @subsection Specifying functions to mark up text
1800 @cindex publishing, markup functions
1802 @anchor{muse-publish-markup-functions}
1803 @code{muse-publish-markup-functions}
1805 An alist of style types to custom functions for that kind of text.
1807 This is used by publishing styles to attempt to minimize the amount of
1808 custom regexps that each has to define.  @file{muse-publish} provides
1809 rules for the most common types of markup.
1811 Each member of the list is of the following form.
1813 @example
1814 (SYMBOL FUNCTION)
1815 @end example
1817 @itemize @bullet
1818 @item SYMBOL
1819 Describes the type of text to associate with this rule.
1820 @code{muse-publish-markup-regexps} maps regexps to these symbols.
1822 @item FUNCTION
1823 Function to use to mark up this kind of rule if no suitable function is
1824 found through the @option{:functions} tag of the current style.
1825 @end itemize
1827 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
1828 @comment  node-name,  next,  previous,  up
1829 @subsection Markup rules for publishing
1830 @cindex publishing, markup regexps
1831 @cindex publishing, rules
1833 @anchor{muse-publish-markup-regexps}
1834 @code{muse-publish-markup-regexps}
1836 List of markup rules for publishing a page with Muse.
1838 The rules given in this variable are invoked first, followed by whatever
1839 rules are specified by the current style.
1841 Each member of the list is either a function, or a list of the following
1842 form.
1844 @example
1845 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
1846 @end example
1848 @itemize @bullet
1849 @item REGEXP
1850 A regular expression, or symbol whose value is a regular expression,
1851 which is searched for using `re-search-forward'.
1853 @item TEXT-BEGIN-GROUP
1854 The matching group within that regexp which denotes the beginning of the
1855 actual text to be marked up.
1857 @item REPLACEMENT-TEXT
1858 A string that will be passed to `replace-match'.
1860 If it is not a string, but a function, it will be called to determine
1861 what the replacement text should be (it must return a string).  If it is
1862 a symbol, the value of that symbol should be a string.
1863 @end itemize
1865 The replacements are done in order, one rule at a time.  Writing
1866 the regular expressions can be a tricky business.  Note that case
1867 is never ignored.  `case-fold-search' is always bound to nil
1868 while processing the markup rules.
1870 @subsubheading Publishing order
1872 This is the order that the publishing rules are consulted, by default.
1873 This may be changed by customizing @code{muse-publish-markup-regexps}.
1875 @table @code
1877 @item trailing and leading whitespace
1878 Remove trailing and leading whitespace from a file.
1880 @item directive
1881 @samp{#directive}
1883 This is only recognized at the beginning of a file.
1885 @item tag
1886 @samp{<tag>}
1888 @item comment
1889 @samp{; comment}
1891 @item anchor
1892 @samp{#anchor}
1894 @item explicit links
1895 Prevent emphasis characters in explicit links from being marked up.
1897 Don't actually publish them here, just add a special no-emphasis text
1898 property.
1900 @item word
1901 Whitespace-delimited word, possibly with emphasis characters
1903 This function is responsible for marking up emphasis and escaping some
1904 specials.
1906 @item emdash
1907 @samp{--}
1909 2-wide dash
1911 @item heading
1912 @samp{** Heading}
1914 Outline-mode style headings.
1916 @item enddots
1917 @samp{....}
1919 These are ellipses with a dot at end.
1921 @item dots
1922 @samp{...}
1924 Ellipses.
1926 @item rule
1927 @samp{----}
1929 Horizontal rule or section separator.
1931 @item fn-sep
1932 @samp{Footnotes:}
1934 beginning of footnotes section
1936 @item footnote
1937 @samp{[1]}
1939 Footnote definition or reference.  If at beginning of line, it is a
1940 definition.
1942 @item list
1943 @itemize @bullet
1944 @item
1945 @samp{ 1. }
1947 @item
1948 @samp{ - }
1950 @item
1951 @samp{term :: }
1952 @end itemize
1954 Numbered list, item list, or term definition list.
1956 @item quote
1957 spaces before beginning of text
1959 Blockquotes.
1961 @item verse
1962 @samp{> verse text}
1964 @item table
1965 @samp{table | cells}
1967 @item link
1968 @samp{[[explicit][links]]}
1970 @item url
1971 @samp{http://example.com/}
1973 @item email
1974 @samp{bare-email@@example.com}
1976 @end table
1978 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
1979 @comment  node-name,  next,  previous,  up
1980 @subsection Strings specific to a publishing style
1981 @cindex publishing, markup strings
1983 @dfn{Markup strings} are strings used for marking up text for a
1984 particular style.
1986 These cover the most basic kinds of markup, the handling of which
1987 differs little between the various styles.
1989 @subsubheading Available markup strings
1991 @table @code
1993 @item image-with-desc
1994 An image and a description.
1996 Argument 1: image.  Argument 2: description.
1998 @item image-link
1999 A link to an image.
2001 Argument 1: image link.
2003 @item url-with-image
2004 A URL with an image.
2006 Argument 1: link.  Argument 2: image.
2008 @item url-link
2009 A link with a description.
2011 Argument 1: link.  Argument 2: description if one exists, or the
2012 original link otherwise.
2014 @item internal-link
2015 A link that refers to an internal anchor.
2017 Argument 1: internal link.  Argument 2: description if one exists, or
2018 the original link otherwise.
2020 @item email-addr
2021 A link to an email address.
2023 Argument 1: email address.  Argument 2: email address.
2025 @item emdash
2026 A 2-length dash.
2028 @item rule
2029 A horizontal line or space.
2031 @item footnote
2032 Beginning of footnote.
2034 @item footnote-end
2035 End of footnote.
2037 @item footnotemark
2038 Mark a reference for the current footnote.
2040 Argument 1: number of this footnote.
2042 @item footnotetext
2043 Indicate the text of the current footnote.
2045 Argument 1: number of this footnote.
2047 @item footnotetext-end
2048 End of a footnote text line.
2050 @item fn-sep
2051 Text used to replace ``Footnotes:'' line.
2053 @item enddots
2054 4 dots.
2056 @item dots
2057 3 dots.
2059 @item part
2060 Beginning of a part indicator line.  This is used by book publishing.
2062 @item part-end
2063 End of a part indicator line.  This is used by book publishing.
2065 @item chapter
2066 Beginning of a chapter indicator line.  This is used by book publishing.
2068 @item chapter-end
2069 End of a chapter indicator line.  This is used by book publishing.
2071 @item section
2072 Beginning of level 1 section indicator line.
2074 Argument 1: level of section; always 1.
2076 @item section-end
2077 End of level 1 section indicator line.
2079 Argument 1: level of section; always 1.
2081 @item subsection
2082 Beginning of level 2 section indicator line.
2084 Argument 1: level of section; always 2.
2086 @item subsection-end
2087 End of level 2 section indicator line.
2089 Argument 1: level of section; always 2.
2091 @item subsubsection
2092 Beginning of level 3 section indicator line.
2094 Argument 1: level of section; always 3.
2096 @item subsubsection-end
2097 End of level 3 section indicator line.
2099 Argument 1: level of section; always 3.
2101 @item section-other
2102 Beginning of section indicator line, where level is greater than 3.
2104 Argument 1: level of section.
2106 @item section-other-end
2107 Beginning of section indicator line, where level is greater than 3.
2109 Argument 1: level of section.
2111 @item begin-underline
2112 Beginning of underlined text.
2114 @item end-underline
2115 End of underlined text.
2117 @item begin-literal
2118 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2119 =teletype text=.
2121 @item end-literal
2122 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2123 text=.
2125 @item begin-emph
2126 Beginning of the first level of emphasized text.
2128 @item end-emph
2129 End of the first level of emphasized text.
2131 @item begin-more-emph
2132 Beginning of the second level of emphasized text.
2134 @item end-more-emph
2135 End of the second level of emphasized text.
2137 @item begin-most-emph
2138 Beginning of the third (and final) level of emphasized text.
2140 @item end-most-emph
2141 End of the third (and final) level of emphasized text.
2143 @item begin-verse
2144 Beginning of verse text.
2146 @item verse-space
2147 String used to each space that is further indented than the beginning of
2148 the verse.
2150 @item begin-verse-line
2151 Beginning of a line of verse.
2153 @item empty-verse-line
2154 End of a line of verse.
2156 @item begin-last-stanza-line
2157 Beginning of the last line of a verse stanza.
2159 @item end-last-stanza-line
2160 End of the last line of a verse stanza.
2162 @item end-verse
2163 End of verse text.
2165 @item begin-example
2166 Beginning of an example region.  To make use of this, an
2167 @samp{<example>} tag is needed.
2169 @item end-example
2170 End of an example region.  To make use of this, an @samp{</example>} tag
2171 is needed.
2173 @item begin-center
2174 Begin a centered line.
2176 @item end-center
2177 End a centered line.
2179 @item begin-quote
2180 Begin a quoted region.
2182 @item end-quote
2183 End a quoted region.
2185 @item begin-uli
2186 Begin an unordered list.
2188 @item end-uli
2189 End an unordered list.
2191 @item begin-oli
2192 Begin an ordered list.
2194 @item end-oli
2195 End an ordered list.
2197 @item begin-ddt
2198 Begin a definition list.
2200 @item start-dde
2201 Begin a term in a definition list.
2203 @item end-ddt
2204 End a definition list.
2206 @end table
2208 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2209 @comment  node-name,  next,  previous,  up
2210 @subsection Tag specifications for special markup
2211 @cindex publishing, markup tags
2213 @anchor{muse-publish-markup-tags}
2214 @code{muse-publish-markup-tags}
2216 A list of tag specifications, for specially marking up text.
2218 XML-style tags are the best way to add custom markup to Muse.  This is
2219 easily accomplished by customizing this list of markup tags.
2221 For each entry, the name of the tag is given, whether it expects a
2222 closing tag and/or an optional set of attributes, and a function that
2223 performs whatever action is desired within the delimited region.
2225 The tags themselves are deleted during publishing, before the function
2226 is called.  The function is called with three arguments, the beginning
2227 and end of the region surrounded by the tags.  If properties are
2228 allowed, they are passed as a third argument in the form of an alist.
2229 The `end' argument to the function is always a marker.
2231 Point is always at the beginning of the region within the tags, when the
2232 function is called.  Wherever point is when the function finishes is
2233 where tag markup will resume.
2235 These tag rules are processed once at the beginning of markup, and once
2236 at the end, to catch any tags which may have been inserted in-between.
2238 @node Style Elements, , Markup Tags, Common Elements
2239 @comment  node-name,  next,  previous,  up
2240 @subsection Parameters used for defining styles
2241 @cindex publishing, style elements
2243 Style elements are tags that define a style.  Use
2244 @code{muse-define-style} to create a new style.
2246 @example
2247 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2248 @end example
2250 @subsubheading Usable elements
2252 @table @option
2254 @item :suffix
2255 File extension to use for publishing files with this style.
2257 @item :link-suffix
2258 File extension to use for publishing links to Muse files with this
2259 style.
2261 @item :osuffix
2262 File extension to use for publishing second-stage files with this style.
2264 For example, PDF publishing generates a LaTeX file first, then a PDF
2265 from that LaTeX file.
2267 @item :regexps
2268 List of markup rules for publishing a page with Muse.
2269 @xref{muse-publish-markup-regexps}.
2271 @item :functions
2272 An alist of style types to custom functions for that kind of text.
2273 @xref{muse-publish-markup-functions}.
2275 @item :strings
2276 Strings used for marking up text with this style.
2278 These cover the most basic kinds of markup, the handling of which
2279 differs little between the various styles.
2281 @item :tags
2282 A list of tag specifications, used for handling extra tags.
2283 @xref{muse-publish-markup-tags}.
2285 @item :specials
2286 A table of characters which must be represented specially.
2288 @item :before
2289 A function that is to be executed on the newly-created publishing buffer
2290 (or the current region) before any publishing occurs.
2292 This is used to set extra parameters that direct the publishing process.
2294 @item :before-end
2295 A function that is to be executed on the publishing buffer (or the
2296 current region) immediately after applying all of the markup regexps.
2298 This is used to fix the order of table elements (header, footer, body)
2299 in XML-ish styles.
2301 @item :after
2302 A function that is to be executed on the publishing buffer after
2303 :before-end, and immediately after inserting the header and footer.
2305 This is used for generating the table of contents as well as setting the
2306 file coding system.
2308 @item :final
2309 A function that is to be executed after saving the published file, but
2310 while still in its buffer.
2312 This is used for generating second-stage documents like PDF files from
2313 just-published LaTeX files.
2315 @item :header
2316 Header used for publishing files of this style.
2318 This may be a variable, text, or a filename.  It is inserted at the
2319 beginning of a file, after evaluating the publishing markup.
2321 @item :footer
2322 Footer used for publishing files of this style.
2324 This may be a variable, text, or a filename.  It is inserted at the end
2325 of a file, after evaluating the publishing markup.
2327 @item :style-sheet
2328 Style sheet used for publishing files of this style.
2330 This may be a variable or text.  It is used in the header of HTML and
2331 XHTML based publishing styles.
2333 @item :browser
2334 The function used to browse the published result of files of this style.
2336 @end table
2338 @node Deriving Styles, , Common Elements, Extending Muse
2339 @comment  node-name,  next,  previous,  up
2340 @section Deriving a new style from an existing one
2341 @cindex publishing styles, deriving
2343 To create a new style from an existing one, use @code{muse-derive-style}
2344 as follows.  This is a good way to fix something you don't like about a
2345 particular publishing style, or to personalize it.
2347 @example
2348 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2349 @end example
2351 The derived name is a string defining the new style, such as "my-html".
2352 The base name must identify an existing style, such as "html" -- if you
2353 have loaded @file{muse-html}.  The style parameters are the same as
2354 those used to create a style, except that they override whatever
2355 definitions exist in the base style.  However, some definitions only
2356 partially override.  The following parameters support partial
2357 overriding.
2359 @xref{Style Elements}, for a complete list of all parameters.
2361 @table @option
2363 @item :functions
2364 If a markup function is not found in the derived style's function list,
2365 the base style's function list will be queried.
2367 @item :regexps
2368 All regexps in the current style and the base style(s) will be used.
2370 @item :strings
2371 If a markup string is not found in the derived style's string list, the
2372 base style's string list will be queried.
2374 @end table
2377 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
2378 @comment  node-name,  next,  previous,  up
2379 @chapter Getting Help and Reporting Bugs
2380 @cindex help, getting
2381 @cindex bugs, reporting
2383 After you have read this guide, if you still have questions about
2384 Muse, or if you have bugs to report, there are several places you can
2387 @itemize @bullet
2389 @item
2390 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
2391 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2392 to it.
2394 @item
2395 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2396 that Michael Olson (the current maintainer) made for Muse.
2398 @item
2399 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
2400 using the subscription form at
2401 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
2402 This mailing list provides support for Muse, @command{Planner} and
2403 @command{emacs-wiki}, which is the predecessor of Muse.
2405 There are additional methods for accessing the mailing list, adding
2406 content to it, and searching it.  Consult
2407 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
2408 more information.
2410 @item
2411 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2412 contributors are frequently around and willing to answer your
2413 questions.  The @samp{#muse} channel is also available for
2414 Muse-specific help, and its current maintainer hangs out there.
2416 @item
2417 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2418 @email{mwolson@@gnu.org}.
2420 @end itemize
2422 @node History, Contributors, Getting Help and Reporting Bugs, Top
2423 @comment  node-name,  next,  previous,  up
2424 @chapter History of This Document
2425 @cindex history, of Muse
2427 @itemize
2428 @item 2004
2429 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2430 limitations. Around February 2004, he started making "emacs-wiki version
2431 3.00 APLHA", which eventually became known as Muse.
2433 Most of those who frequent the emacs-wiki mailing list continued to use
2434 emacs-wiki, mainly because Planner hasn't been ported over to it.
2436 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2437 John Wiegley's request.
2439 @item 2005
2440 Michael Olson overhauled this document and added many new sections in
2441 preparation for the first release of Muse (3.01).
2443 @end itemize
2445 @node Contributors, GNU General Public License, History, Top
2446 @comment  node-name,  next,  previous,  up
2447 @chapter Contributors to This Documentation
2448 @cindex contributors
2450 The first draft of this document was taken from the emacs-wiki texinfo
2451 manual.  Michael Olson adapted it for Muse and added most of its
2452 content.
2454 John Sullivan did a majority of the work on the emacs-wiki texinfo
2455 manual.
2457 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2458 emacs-wiki texinfo manual.
2460 @node GNU General Public License, Concept Index, Contributors, Top
2461 @comment  node-name,  next,  previous,  up
2462 @appendix GNU GENERAL PUBLIC LICENSE
2463 @center Version 2, June 1991
2464 @cindex GPL
2465 @cindex GNU General Public License
2467 @c This file is intended to be included in another file.
2469 @display
2470 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2471 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2473 Everyone is permitted to copy and distribute verbatim copies
2474 of this license document, but changing it is not allowed.
2475 @end display
2477 @appendixsec Preamble
2479   The licenses for most software are designed to take away your
2480 freedom to share and change it.  By contrast, the GNU General Public
2481 License is intended to guarantee your freedom to share and change free
2482 software---to make sure the software is free for all its users.  This
2483 General Public License applies to most of the Free Software
2484 Foundation's software and to any other program whose authors commit to
2485 using it.  (Some other Free Software Foundation software is covered by
2486 the GNU Library General Public License instead.)  You can apply it to
2487 your programs, too.
2489   When we speak of free software, we are referring to freedom, not
2490 price.  Our General Public Licenses are designed to make sure that you
2491 have the freedom to distribute copies of free software (and charge for
2492 this service if you wish), that you receive source code or can get it
2493 if you want it, that you can change the software or use pieces of it
2494 in new free programs; and that you know you can do these things.
2496   To protect your rights, we need to make restrictions that forbid
2497 anyone to deny you these rights or to ask you to surrender the rights.
2498 These restrictions translate to certain responsibilities for you if you
2499 distribute copies of the software, or if you modify it.
2501   For example, if you distribute copies of such a program, whether
2502 gratis or for a fee, you must give the recipients all the rights that
2503 you have.  You must make sure that they, too, receive or can get the
2504 source code.  And you must show them these terms so they know their
2505 rights.
2507   We protect your rights with two steps: (1) copyright the software, and
2508 (2) offer you this license which gives you legal permission to copy,
2509 distribute and/or modify the software.
2511   Also, for each author's protection and ours, we want to make certain
2512 that everyone understands that there is no warranty for this free
2513 software.  If the software is modified by someone else and passed on, we
2514 want its recipients to know that what they have is not the original, so
2515 that any problems introduced by others will not reflect on the original
2516 authors' reputations.
2518   Finally, any free program is threatened constantly by software
2519 patents.  We wish to avoid the danger that redistributors of a free
2520 program will individually obtain patent licenses, in effect making the
2521 program proprietary.  To prevent this, we have made it clear that any
2522 patent must be licensed for everyone's free use or not licensed at all.
2524   The precise terms and conditions for copying, distribution and
2525 modification follow.
2527 @iftex
2528 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2529 @end iftex
2530 @ifinfo
2531 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2532 @end ifinfo
2534 @enumerate 0
2535 @item
2536 This License applies to any program or other work which contains
2537 a notice placed by the copyright holder saying it may be distributed
2538 under the terms of this General Public License.  The ``Program'', below,
2539 refers to any such program or work, and a ``work based on the Program''
2540 means either the Program or any derivative work under copyright law:
2541 that is to say, a work containing the Program or a portion of it,
2542 either verbatim or with modifications and/or translated into another
2543 language.  (Hereinafter, translation is included without limitation in
2544 the term ``modification''.)  Each licensee is addressed as ``you''.
2546 Activities other than copying, distribution and modification are not
2547 covered by this License; they are outside its scope.  The act of
2548 running the Program is not restricted, and the output from the Program
2549 is covered only if its contents constitute a work based on the
2550 Program (independent of having been made by running the Program).
2551 Whether that is true depends on what the Program does.
2553 @item
2554 You may copy and distribute verbatim copies of the Program's
2555 source code as you receive it, in any medium, provided that you
2556 conspicuously and appropriately publish on each copy an appropriate
2557 copyright notice and disclaimer of warranty; keep intact all the
2558 notices that refer to this License and to the absence of any warranty;
2559 and give any other recipients of the Program a copy of this License
2560 along with the Program.
2562 You may charge a fee for the physical act of transferring a copy, and
2563 you may at your option offer warranty protection in exchange for a fee.
2565 @item
2566 You may modify your copy or copies of the Program or any portion
2567 of it, thus forming a work based on the Program, and copy and
2568 distribute such modifications or work under the terms of Section 1
2569 above, provided that you also meet all of these conditions:
2571 @enumerate a
2572 @item
2573 You must cause the modified files to carry prominent notices
2574 stating that you changed the files and the date of any change.
2576 @item
2577 You must cause any work that you distribute or publish, that in
2578 whole or in part contains or is derived from the Program or any
2579 part thereof, to be licensed as a whole at no charge to all third
2580 parties under the terms of this License.
2582 @item
2583 If the modified program normally reads commands interactively
2584 when run, you must cause it, when started running for such
2585 interactive use in the most ordinary way, to print or display an
2586 announcement including an appropriate copyright notice and a
2587 notice that there is no warranty (or else, saying that you provide
2588 a warranty) and that users may redistribute the program under
2589 these conditions, and telling the user how to view a copy of this
2590 License.  (Exception: if the Program itself is interactive but
2591 does not normally print such an announcement, your work based on
2592 the Program is not required to print an announcement.)
2593 @end enumerate
2595 These requirements apply to the modified work as a whole.  If
2596 identifiable sections of that work are not derived from the Program,
2597 and can be reasonably considered independent and separate works in
2598 themselves, then this License, and its terms, do not apply to those
2599 sections when you distribute them as separate works.  But when you
2600 distribute the same sections as part of a whole which is a work based
2601 on the Program, the distribution of the whole must be on the terms of
2602 this License, whose permissions for other licensees extend to the
2603 entire whole, and thus to each and every part regardless of who wrote it.
2605 Thus, it is not the intent of this section to claim rights or contest
2606 your rights to work written entirely by you; rather, the intent is to
2607 exercise the right to control the distribution of derivative or
2608 collective works based on the Program.
2610 In addition, mere aggregation of another work not based on the Program
2611 with the Program (or with a work based on the Program) on a volume of
2612 a storage or distribution medium does not bring the other work under
2613 the scope of this License.
2615 @item
2616 You may copy and distribute the Program (or a work based on it,
2617 under Section 2) in object code or executable form under the terms of
2618 Sections 1 and 2 above provided that you also do one of the following:
2620 @enumerate a
2621 @item
2622 Accompany it with the complete corresponding machine-readable
2623 source code, which must be distributed under the terms of Sections
2624 1 and 2 above on a medium customarily used for software interchange; or,
2626 @item
2627 Accompany it with a written offer, valid for at least three
2628 years, to give any third party, for a charge no more than your
2629 cost of physically performing source distribution, a complete
2630 machine-readable copy of the corresponding source code, to be
2631 distributed under the terms of Sections 1 and 2 above on a medium
2632 customarily used for software interchange; or,
2634 @item
2635 Accompany it with the information you received as to the offer
2636 to distribute corresponding source code.  (This alternative is
2637 allowed only for noncommercial distribution and only if you
2638 received the program in object code or executable form with such
2639 an offer, in accord with Subsection b above.)
2640 @end enumerate
2642 The source code for a work means the preferred form of the work for
2643 making modifications to it.  For an executable work, complete source
2644 code means all the source code for all modules it contains, plus any
2645 associated interface definition files, plus the scripts used to
2646 control compilation and installation of the executable.  However, as a
2647 special exception, the source code distributed need not include
2648 anything that is normally distributed (in either source or binary
2649 form) with the major components (compiler, kernel, and so on) of the
2650 operating system on which the executable runs, unless that component
2651 itself accompanies the executable.
2653 If distribution of executable or object code is made by offering
2654 access to copy from a designated place, then offering equivalent
2655 access to copy the source code from the same place counts as
2656 distribution of the source code, even though third parties are not
2657 compelled to copy the source along with the object code.
2659 @item
2660 You may not copy, modify, sublicense, or distribute the Program
2661 except as expressly provided under this License.  Any attempt
2662 otherwise to copy, modify, sublicense or distribute the Program is
2663 void, and will automatically terminate your rights under this License.
2664 However, parties who have received copies, or rights, from you under
2665 this License will not have their licenses terminated so long as such
2666 parties remain in full compliance.
2668 @item
2669 You are not required to accept this License, since you have not
2670 signed it.  However, nothing else grants you permission to modify or
2671 distribute the Program or its derivative works.  These actions are
2672 prohibited by law if you do not accept this License.  Therefore, by
2673 modifying or distributing the Program (or any work based on the
2674 Program), you indicate your acceptance of this License to do so, and
2675 all its terms and conditions for copying, distributing or modifying
2676 the Program or works based on it.
2678 @item
2679 Each time you redistribute the Program (or any work based on the
2680 Program), the recipient automatically receives a license from the
2681 original licensor to copy, distribute or modify the Program subject to
2682 these terms and conditions.  You may not impose any further
2683 restrictions on the recipients' exercise of the rights granted herein.
2684 You are not responsible for enforcing compliance by third parties to
2685 this License.
2687 @item
2688 If, as a consequence of a court judgment or allegation of patent
2689 infringement or for any other reason (not limited to patent issues),
2690 conditions are imposed on you (whether by court order, agreement or
2691 otherwise) that contradict the conditions of this License, they do not
2692 excuse you from the conditions of this License.  If you cannot
2693 distribute so as to satisfy simultaneously your obligations under this
2694 License and any other pertinent obligations, then as a consequence you
2695 may not distribute the Program at all.  For example, if a patent
2696 license would not permit royalty-free redistribution of the Program by
2697 all those who receive copies directly or indirectly through you, then
2698 the only way you could satisfy both it and this License would be to
2699 refrain entirely from distribution of the Program.
2701 If any portion of this section is held invalid or unenforceable under
2702 any particular circumstance, the balance of the section is intended to
2703 apply and the section as a whole is intended to apply in other
2704 circumstances.
2706 It is not the purpose of this section to induce you to infringe any
2707 patents or other property right claims or to contest validity of any
2708 such claims; this section has the sole purpose of protecting the
2709 integrity of the free software distribution system, which is
2710 implemented by public license practices.  Many people have made
2711 generous contributions to the wide range of software distributed
2712 through that system in reliance on consistent application of that
2713 system; it is up to the author/donor to decide if he or she is willing
2714 to distribute software through any other system and a licensee cannot
2715 impose that choice.
2717 This section is intended to make thoroughly clear what is believed to
2718 be a consequence of the rest of this License.
2720 @item
2721 If the distribution and/or use of the Program is restricted in
2722 certain countries either by patents or by copyrighted interfaces, the
2723 original copyright holder who places the Program under this License
2724 may add an explicit geographical distribution limitation excluding
2725 those countries, so that distribution is permitted only in or among
2726 countries not thus excluded.  In such case, this License incorporates
2727 the limitation as if written in the body of this License.
2729 @item
2730 The Free Software Foundation may publish revised and/or new versions
2731 of the General Public License from time to time.  Such new versions will
2732 be similar in spirit to the present version, but may differ in detail to
2733 address new problems or concerns.
2735 Each version is given a distinguishing version number.  If the Program
2736 specifies a version number of this License which applies to it and ``any
2737 later version'', you have the option of following the terms and conditions
2738 either of that version or of any later version published by the Free
2739 Software Foundation.  If the Program does not specify a version number of
2740 this License, you may choose any version ever published by the Free Software
2741 Foundation.
2743 @item
2744 If you wish to incorporate parts of the Program into other free
2745 programs whose distribution conditions are different, write to the author
2746 to ask for permission.  For software which is copyrighted by the Free
2747 Software Foundation, write to the Free Software Foundation; we sometimes
2748 make exceptions for this.  Our decision will be guided by the two goals
2749 of preserving the free status of all derivatives of our free software and
2750 of promoting the sharing and reuse of software generally.
2752 @iftex
2753 @heading NO WARRANTY
2754 @end iftex
2755 @ifinfo
2756 @center NO WARRANTY
2757 @end ifinfo
2759 @item
2760 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2761 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2762 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2763 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2764 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2765 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2766 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2767 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2768 REPAIR OR CORRECTION.
2770 @item
2771 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2772 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2773 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2774 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2775 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2776 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2777 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2778 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2779 POSSIBILITY OF SUCH DAMAGES.
2780 @end enumerate
2782 @iftex
2783 @heading END OF TERMS AND CONDITIONS
2784 @end iftex
2785 @ifinfo
2786 @center END OF TERMS AND CONDITIONS
2787 @end ifinfo
2789 @page
2790 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2792   If you develop a new program, and you want it to be of the greatest
2793 possible use to the public, the best way to achieve this is to make it
2794 free software which everyone can redistribute and change under these terms.
2796   To do so, attach the following notices to the program.  It is safest
2797 to attach them to the start of each source file to most effectively
2798 convey the exclusion of warranty; and each file should have at least
2799 the ``copyright'' line and a pointer to where the full notice is found.
2801 @smallexample
2802 @var{one line to give the program's name and a brief idea of what it does.}
2803 Copyright (C) @var{yyyy}  @var{name of author}
2805 This program is free software; you can redistribute it and/or modify
2806 it under the terms of the GNU General Public License as published by
2807 the Free Software Foundation; either version 2 of the License, or
2808 (at your option) any later version.
2810 This program is distributed in the hope that it will be useful,
2811 but WITHOUT ANY WARRANTY; without even the implied warranty of
2812 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2813 GNU General Public License for more details.
2815 You should have received a copy of the GNU General Public License along
2816 with this program; if not, write to the Free Software Foundation, Inc.,
2817 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2818 @end smallexample
2820 Also add information on how to contact you by electronic and paper mail.
2822 If the program is interactive, make it output a short notice like this
2823 when it starts in an interactive mode:
2825 @smallexample
2826 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2827 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2828 This is free software, and you are welcome to redistribute it
2829 under certain conditions; type `show c' for details.
2830 @end smallexample
2832 The hypothetical commands @samp{show w} and @samp{show c} should show
2833 the appropriate parts of the General Public License.  Of course, the
2834 commands you use may be called something other than @samp{show w} and
2835 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2836 suits your program.
2838 You should also get your employer (if you work as a programmer) or your
2839 school, if any, to sign a ``copyright disclaimer'' for the program, if
2840 necessary.  Here is a sample; alter the names:
2842 @example
2843 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2844 `Gnomovision' (which makes passes at compilers) written by James Hacker.
2846 @var{signature of Ty Coon}, 1 April 1989
2847 Ty Coon, President of Vice
2848 @end example
2850 This General Public License does not permit incorporating your program into
2851 proprietary programs.  If your program is a subroutine library, you may
2852 consider it more useful to permit linking proprietary applications with the
2853 library.  If this is what you want to do, use the GNU Library General
2854 Public License instead of this License.
2857 @node Concept Index,  , GNU General Public License, Top
2858 @comment  node-name,  next,  previous,  up
2859 @unnumbered Index
2861 @printindex cp
2863 @bye