Make faces more robust and namespace-conforming.
[muse-el.git] / muse.texi
blobc5fb04f1778c791cc3f2dc5030faaa08a2a2080f
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.6.
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 * Getting Help and Reporting Bugs::  
60 * History::                     History of this document.
61 * Contributors::                Contributors to this documentation.
62 * GNU General Public License::  The license for this manual and Muse.
63 * Concept Index::               Search for terms.
65 @detailmenu
66  --- The Detailed Node Listing ---
68 How to Get Muse Releases and Development Changes
70 * Releases::                    Released versions of Muse.
71 * Development::                 Latest unreleased development changes.
73 Rules for Using Markup
75 * Paragraphs::                  Paragraphs: centering and quoting.
76 * Headings::                    Levels of headings.
77 * Directives::                  Directives at the beginning of a
78                                   document.
79 * Emphasizing Text::            Bold, italicized, and underlined text.
80 * Footnotes::                   Making notes to be shown at the end.
81 * Verse::                       Indicating poetic stanzas.
82 * Lists::                       Lists of items.
83 * Tables::                      Generation of data tables.
84 * Explicit Links::              Hyperlinks and email addresses with
85                                   descriptions.
86 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
87                                   links.
88 * Images::                      Publishing and displaying images.
89 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
90 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
91                                   for extensibility.
92 * Comments::                    Lines to omit from published output.
94 Publishing Various Types of Documents
96 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
97 * Book::                        Publishing entries into a compilation.
98 * DocBook::                     Publishing in DocBook XML form.
99 * HTML::                        Publishing in HTML or XHTML form.
100 * Journal::                     Keeping a journal or blog.
101 * LaTeX::                       Publishing LaTeX documents.
102 * Poem::                        Publish a poem to LaTex or PDF.
103 * Texinfo::                     Publish entries to Texinfo format or PDF.
104 * Common Elements::             Common functionality shared by styles.
105 * Deriving Styles::             Deriving a new style from an existing
106                                   one.
108 Integrating Muse and pyblosxom.cgi
110 * Blosxom Requirements::        Other tools needed to the Blosxom style.
111 * Blosxom Entries::             Format of a Blosxom entry and automation.
112 * Blosxom Options::             Blosxom styles and options provided.
114 Common functionality shared by styles
116 * Markup Functions::            Specifying functions to marking up text.
117 * Markup Regexps::              Markup rules for publishing.
118 * Markup Strings::              Strings specific to a publishing style.
119 * Markup Tags::                 Tag specifications for special markup.
120 * Style Elements::              Parameters used for defining styles.
122 @end detailmenu
123 @end menu
125 @node Preface, Introduction, Top, Top
126 @comment  node-name,  next,  previous,  up
127 @chapter About the documentation
129 This document describes Muse, which was written by John Wiegley
130 and is now maintained by Michael Olson.  Several versions of it are
131 available on-line.
133 @itemize @bullet
134 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
135 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
136 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
137 @end itemize
139 @node Introduction, Obtaining Muse, Preface, Top
140 @comment  node-name,  next,  previous,  up
141 @chapter What is Muse?
143 Emacs Muse is an authoring and publishing environment for Emacs.  It
144 simplifies the process of writing documents and publishing them to
145 various output formats.
147 Muse consists of two main parts: an enhanced text-mode for authoring
148 documents and navigating within Muse projects, and a set of publishing
149 styles for generating different kinds of output.
151 This idea is not in any way new. Numerous systems exist -- even one
152 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
153 more modular environment, with a rather simple core, in which "styles"
154 are derived from to create new styles. Much of Muse's overall
155 functionality is optional. For example, you can use the publisher
156 without the major-mode, or the mode without doing any publishing; or if
157 you don't load the Texinfo or LaTeX modules, those styles won't be
158 available.
160 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
161 code has been restructured and rewritten, especially its publishing
162 functions. The focus in this revision is on the authoring and publishing
163 aspects, and the "wikiness" has been removed as a default behavior
164 (available in the optional @file{muse-wiki} module). CamelCase words are
165 no longer special by default.
167 @node Obtaining Muse, Installation, Introduction, Top
168 @comment  node-name,  next,  previous,  up
169 @chapter How to Get Muse Releases and Development Changes
171 @menu
172 * Releases::                    Released versions of Muse.
173 * Development::                 Latest unreleased development changes.
174 @end menu
176 @node Releases, Development, Obtaining Muse, Obtaining Muse
177 @comment  node-name,  next,  previous,  up
178 @section Released versions of Muse
180 Choose to install a release if you want to minimize risk.
182 Errors are corrected in development first.  User-visible changes will be
183 announced on the @email{emacs-wiki-discuss@@nongnu.org} mailing list.
184 This mailing list also provides support for @command{Planner} and
185 @command{emacs-wiki}, which is the predecessor of Muse.
186 @pxref{Getting Help and Reporting Bugs}.
188 @cindex releases, Debian package
189 @cindex Debian package for Muse
190 Debian users can get Muse via apt-get.  The @file{muse-el} package is
191 available both at Michael Olson's Debian repository and the official
192 Debian repository.  To make use of the former, add the following line to
193 your @file{/etc/apt/sources.list} file and run @code{apt-get install
194 muse}.
196 @example
197 deb http://www.mwolson.org/debian/ ./
198 @end example
200 @cindex releases, from source
201 Alternatively, you can download the latest release from
202 @uref{http://www.mwolson.org/static/dist/muse/} .
204 @node Development,  , Releases, Obtaining Muse
205 @comment  node-name,  next,  previous,  up
206 @section Latest unreleased development changes
207 @cindex development
209 Choose the development version if you want to live on the bleeding edge
210 of Muse development or try out new features before release.
212 @cindex arch revision control system, using
213 The Arch revision control system allows you to retrieve previous
214 versions and select specific features and bug fixes.  If you would like
215 to contribute to Muse development, it is highly recommended that you use
216 Arch, but this is not a requirement.
218 If you are new to Arch, you might find this tutorial helpful:
219 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
221 Downloading the Muse module with Arch and staying up-to-date involves
222 the following steps.
224 @enumerate
225 @item Install arch
227 @itemize @bullet
228 @item Debian: @kbd{apt-get install tla}.
229 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
230 @end itemize
232 @item Register the archive.
233 @example
234 tla register-archive -f http://www.mwolson.org/archives/2005
235 @end example
237 @item Download the Muse package.
238 @example
239 # Download Muse into the @file{muse} directory.
240 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
241 @end example
243 @item List upstream changes that are missing from your local copy.
244 Do this whenever you want to see whether new changes have been committed
245 to Muse.
247 @example
248 # Change to the source directory you are interested in.
249 cd muse/
251 # Display the summary of changes
252 tla missing --summary
253 @end example
255 @cindex updating Muse with Arch
256 @item Update to the latest version by replaying missing changes.
257 @example
258 cd muse
259 tla replay
260 @end example
262 @end enumerate
264 There are other ways to interact with the Muse archive.
266 @itemize
267 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
268 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
269 @end itemize
271 The latest development snapshot will be kept up-to-date since it is
272 updated at the same time as the Arch repository.
274 @node Installation, Getting Started, Obtaining Muse, Top
275 @comment  node-name,  next,  previous,  up
276 @chapter Compiling and Installing Muse
278 Muse may be compiled and installed on your machine.
280 @subsubheading Compilation
282 This is an optional step, since Emacs Lisp source code does not
283 necessarily have to be byte-compiled.  It will yield a speed increase,
284 though.
286 A working copy of Emacs or XEmacs is needed in order to compile the
287 Emacs Muse.  By default, the program that is installed with the name
288 @command{emacs} will be used.
290 If you want to use the @command{xemacs} binary to perform the
291 compilation, you would need to edit @file{Makefile.defs} in the
292 top-level directory as follows.  You can put either a full path to an
293 Emacs or XEmacs binary or just the command name, as long as it is in the
294 @env{PATH}.
296 @example
297 EMACS    = xemacs
298 SITEFLAG = -no-site-file
299 @end example
301 Running @code{make} should compile the Muse source files in the
302 @file{lisp} directory.
304 @subsubheading Installation
306 Muse may be installed into your file hierarchy by doing the following.
308 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
309 where you want the source and compiled Muse files to be installed and
310 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
311 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
312 Compilation section if you are using XEmacs.
314 If you are installing Muse on a Debian system, you might want to change
315 the value of @env{INSTALLINFO} as specified in @file{Makefile.defs}.
317 If you wish to install Muse to different locations than the defaults
318 specify, edit @file{Makefile.defs} accordingly.
320 Run @code{make} as a normal user.
322 Run @code{make install} as the root user if you have chosen installation
323 locations that require this.
326 @node Getting Started, Projects, Installation, Top
327 @comment  node-name,  next,  previous,  up
328 @chapter Getting Started
329 @cindex settings
331 To use Muse, add the directory containing its files to your
332 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
333 the authoring mode, and the styles you wish to publish to.  An example
334 follows.
336 @lisp
337 (add-to-list 'load-path "<path to Muse>")
339 (require 'muse-mode)     ; load authoring mode
341 (require 'muse-html)     ; load publishing styles I use
342 (require 'muse-latex)
343 (require 'muse-texinfo)
344 (require 'muse-docbook)
345 @end lisp
347 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
348 an input document to any available style.  If you enable
349 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
350 command will be bound to @kbd{C-c C-t}.
352 If the currently opened file is part of a defined project in
353 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
355 You should also type @kbd{M-x customize-group}, and give the name
356 @samp{muse}.  Each of the options has its own documentation.
359 @node Projects, Keystroke Summary, Getting Started, Top
360 @comment  node-name,  next,  previous,  up
361 @chapter Creating and Managing Muse Projects
362 @cindex projects
364 Often you will want to publish all the files within a directory to a
365 particular set of output styles automatically.  To support, Muse
366 allows for the creations of "projects".  Here is a sample project, to
367 be defined in your @file{.emacs} file.
369 @lisp
370 (require 'muse-project)
372 (setq muse-project-alist
373       '(("website"                      ; my various writings
374          ("~/Pages" :default "index")
375          (:base "html" :path "~/public_html")
376          (:base "pdf" :path "~/public_html/pdf"))))
377 @end lisp
379 The above defines a project named "website", whose files are located
380 in the directory @file{~/Pages}.  The default page to visit is
381 @file{index}.  When this project is published, each page will be
382 output as HTML to the directory @file{~/public_html}, and as PDF to
383 the directory @file{~/public_html/pdf}.  Within any project page, you
384 may create a link to other pages using the syntax @samp{[[pagename]]}.
386 By default, Muse expects all project files to have the file extension
387 @file{.muse}. Files without this extension will not be associated with
388 Muse mode and will not be considered part of any project, even if they
389 are within a project directory.
391 If you don't want to use @file{.muse}, you can customize the extension
392 by setting the value of @code{muse-file-extension}.
394 If you don't want to use any extension at all, and want Muse to
395 autodetect project files based on their location, then use:
397 @lisp
398 (setq muse-file-extension nil
399       muse-mode-auto-p t)
400 @end lisp
402 If you set these options directly in your @file{.emacs} outside of the
403 Customize interface, then you will also need to add:
405 @lisp
406 (add-hook 'find-file-hooks 'muse-mode-maybe)
407 @end lisp
409 @c PRE3_03: Give more examples
410 @c PRE3_03: Describe :set and other options fully
412 @node Keystroke Summary, Markup Rules, Projects, Top
413 @comment  node-name,  next,  previous,  up
414 @chapter Keys Used in Muse Mode
415 @cindex keystrokes
417 This is a summary of keystrokes available in every Muse buffer.
419 @table @kbd
421 @item C-c C-a (`muse-index')
422 Display an index of all known Muse pages.
424 @item C-c C-b (`muse-browse-result')
425 Show the published result of this page.
427 @item C-c C-e (`muse-edit-link-at-point')
428 Edit link at point.
430 @item C-c C-f (`muse-project-find-file'), also C-c C-v
431 Open another Muse page.  Prompt for the name.
433 @item C-c C-l (`font-lock-mode')
434 Highlight/refresh the current buffer.
436 @item C-c C-p (`muse-project-publish')
437 Publish any Muse pages that have changed.
439 @item C-c C-v (`muse-project-find-file'), also C-c C-f
440 Open another Muse page.  Prompt for the name.
442 @item C-c = (`muse-what-changed')
443 Diff this page against the last backup version.
445 @item C-c TAB (`muse-insert-tag')
446 Insert a tag interactively.
448 @item TAB
449 Move to the next Wiki reference.
451 @item S-TAB
452 Move to the previous Wiki reference.
454 @end table
457 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
458 @comment  node-name,  next,  previous,  up
459 @chapter Rules for Using Markup
460 @cindex markup
462 A Muse document uses special, contextual markup rules to determine how
463 to format the output result.  For example, if a paragraph is indented,
464 Muse assumes it should be quoted.
466 There are not too many markup rules, and all of them strive to be as
467 simple as possible so that you can focus on document creation, rather
468 than formatting.
470 @menu
471 * Paragraphs::                  Paragraphs: centering and quoting.
472 * Headings::                    Levels of headings.
473 * Directives::                  Directives at the beginning of a
474                                   document.
475 * Emphasizing Text::            Bold, italicized, and underlined text.
476 * Footnotes::                   Making notes to be shown at the end.
477 * Verse::                       Indicating poetic stanzas.
478 * Lists::                       Lists of items.
479 * Tables::                      Generation of data tables.
480 * Explicit Links::              Hyperlinks and email addresses with
481                                   descriptions.
482 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
483                                   links.
484 * Images::                      Publishing and displaying images.
485 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
486 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
487                                   for extensibility.
488 * Comments::                    Lines to omit from published output.
489 @end menu
491 @node Paragraphs, Headings, Markup Rules, Markup Rules
492 @comment  node-name,  next,  previous,  up
493 @section Paragraphs: centering and quoting
494 @cindex paragraphs
496 Paragraphs in Muse must be separated by a blank line.
498 @cindex paragraphs, centered
499 @strong{Centered paragraphs and quotations}
501 A line that begins with six or more columns of whitespace (either tabs
502 or spaces) indicates a centered paragraph.
504 @cindex paragraphs, quoted
505 @cindex quotations
506 But if a line begins with whitespace, though less than six columns, it
507 indicates a quoted paragraph.
509 @cindex examples
510 @cindex monospace, rendering blocks
511 @cindex HTML, rendering blocks in monospace
512 @strong{Literal paragraphs}
514 The @verb{|<example>|} tag is used for examples, where whitespace should
515 be preserved, the text rendered in monospace, and any characters special
516 to the output style escaped.
518 @cindex literal text
519 @cindex HTML, inserting a raw block
520 There is also the @verb{|<literal>|} tag, which causes a marked block to
521 be entirely left alone.  This can be used for inserting a hand-coded
522 HTML blocks into HTML output, for example.
524 @node Headings, Directives, Paragraphs, Markup Rules
525 @comment  node-name,  next,  previous,  up
526 @section Levels of headings
527 @cindex headings
529 A heading becomes a chapter or section in printed output -- depending on
530 the style.  To indicate a heading, start a new paragraph with one or
531 more asterices, followed by a space and the heading title.  Then begin
532 another paragraph to enter the text for that section.
534 All levels of headings will be published.  Most publishing styles only
535 distinguish the between the first 4 levels, however.
537 @example
538 * First level
540 ** Second level
542 *** Third level
544 **** Fourth level
545 @end example
547 @node Directives, Emphasizing Text, Headings, Markup Rules
548 @comment  node-name,  next,  previous,  up
549 @section Directives at the beginning of a document
550 @cindex directives
552 Directives are lines beginning with the @samp{#} character that come
553 before any paragraphs or sections in the document.  Directives are of
554 the form ``#directive content of directive''.  You can use any
555 combination of uppercase and lowercase letters for directives, even if
556 the directive is not in the list below.
558 The @code{muse-publishing-directive} function may be used in header and
559 footer text to access directives.  For example, to access the
560 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
562 The following is a list of directives that Muse uses.
564 @table @code
565 @cindex #author
566 @item #author
567 The author of this document.
569 If this is not specified, Muse will attempt to figure it out from the
570 @code{user-full-name} variable.
572 @cindex #date
573 @item #date
574 The date that the document was last modified.
576 This is used by publishing styles that are able to embed the date
577 information.
579 @cindex #desc
580 @item #desc
581 A short description of this document.
583 This is used by the @code{journal} publishing style to embed information
584 inside of an RSS/RDF feed.
586 @cindex #title
587 @item #title
588 The title of this document.
590 If this is not specified, the name of the file is used.
592 @end table
594 @node Emphasizing Text, Footnotes, Directives, Markup Rules
595 @comment  node-name,  next,  previous,  up
596 @section Bold, italicized, and underlined text
597 @cindex emphasizing text
598 @cindex underlining text
599 @cindex italicizing text
600 @cindex verbatim text
601 @cindex monospace, rendering words
603 To emphasize text, surround it with certain specially recognized
604 characters.
606 @example
607 *emphasis*
608 **strong emphasis**
609 ***very strong emphasis***
610 _underlined_
611 =verbatim and monospace=
612 @end example
614 @cindex WYSIWYG
615 While editing a Muse document in Muse mode, these forms of emphasis will
616 be highlighted in a WYSIWYG manner.  Each of these forms may span
617 multiple lines.
619 Verbatim text will be colored as gray by default.  To change this,
620 customize @code{muse-verbatim-face}.
622 You can also use the @verb{|<code>|} tag to indicate verbatim and
623 monospace text.  This is handy for regions that have an ``='' in them.
625 @node Footnotes, Verse, Emphasizing Text, Markup Rules
626 @comment  node-name,  next,  previous,  up
627 @section Making notes to be shown at the end
628 @cindex footnotes
630 A footnote reference is simply a number in square brackets.  To define
631 the footnote, place this definition at the bottom of your file.
632 @samp{footnote-mode} can be used to greatly facilitate the creation of
633 these kinds of footnotes.
635 Footnotes are defined by the same number in brackets occurring at the
636 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
637 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
638 the point of insertion.
640 @node Verse, Lists, Footnotes, Markup Rules
641 @comment  node-name,  next,  previous,  up
642 @section Indicating poetic stanzas
643 @cindex verses
644 @cindex poetry
646 Poetry requires that whitespace be preserved, but without resorting to
647 monospace.  To indicate this, use the following markup, reminiscent of
648 email quotations.
650 @example
651 > A line of Emacs verse;
652 >   forgive its being so terse.
653 @end example
655 You can also use the @verb{|<verse>|} tag, if you prefer.
657 @example
658 <verse>
659 A line of Emacs verse;
660   forgive its being so terse.
661 </verse>
662 @end example
664 @cindex verses, multiple stanzas
665 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
666 follows.
668 @example
669 <verse>
670 A line of Emacs verse;
671   forgive its being so terse.
673 In terms of terse verse,
674   you could do worse.
675 </verse>
676 @end example
678 @node Lists, Tables, Verse, Markup Rules
679 @comment  node-name,  next,  previous,  up
680 @section Lists of items
681 @cindex lists
683 Lists are given using special characters at the beginning of a line.
684 Whitespace must occur before bullets or numbered items, to distinguish
685 from the possibility of those characters occurring in a real sentence.
687 @cindex lists, bullets
688 These are rendered as a bullet list.
690 @example
691 - bullet item one
692 - bullet item two
693 @end example
695 @cindex lists, enumerated
696 An enumerated list follows.
698 @example
699 1. Enum item one
700 2. Enum item two
701 @end example
703 @cindex lists, definitions
704 Here is a definition list.
706 @example
707 Term1 ::
708   This is a first definition
709   And it has two lines;
710   no, make that three.
712 Term2 ::
713   This is a second definition
714 @end example
716 @node Tables, Explicit Links, Lists, Markup Rules
717 @comment  node-name,  next,  previous,  up
718 @section Generation of data tables
719 @cindex tables
721 @cindex tables, simple
722 Only very simple tables are supported.  The syntax is as follows.
724 @example
725 Double bars  || Separate header fields
727 Single bars   | Separate body fields
728 Here are more | body fields
730 Triple bars ||| Separate footer fields
731 @end example
733 Some publishing styles require header fields to come first, then footer
734 fields, and then the body fields.  You can use any order for these
735 sections that you like, and Muse will re-order them for you at
736 publish-time.
738 @node Explicit Links, Implicit Links, Tables, Markup Rules
739 @comment  node-name,  next,  previous,  up
740 @section Hyperlinks and email addresses with descriptions
741 @cindex links, explicit
743 A hyperlink can reference a URL, or another page within a Muse
744 project.  In addition, descriptive text can be specified, which should
745 be displayed rather than the link text in output styles that supports
746 link descriptions.  The syntax is as follows.
748 @example
749 [[link target][link description]]
750 [[link target without description]]
751 @end example
753 Thus, the current maintainer's homepage for Muse can be found
754 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
755 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
757 @node Implicit Links, Images, Explicit Links, Markup Rules
758 @comment  node-name,  next,  previous,  up
759 @section Bare URLs, WikiNames, and InterWiki links
760 @cindex links, implicit
761 @cindex links, raw
762 @cindex URLs
763 @cindex Email addresses
765 A URL or email address encountered in the input text is published as a
766 hyperlink.  These kind of links are called @dfn{implicit links} because
767 they are not separated from the rest of the Muse document in any way.
769 @cindex WikiNames
770 If the @command{muse-wiki} module is loaded, another form of implicit
771 link will be made available.  WikiNames, which are typed in camelcase,
772 will be highlighted and published as links, provided that the file they
773 refer to exists.
775 Customization of WikiName recognition may be accomplished by editing the
776 @code{muse-wiki-wikiword-regexp} option and subsequently running
777 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
778 If you use the Customize interface, the latter will be done
779 automatically.
781 @cindex InterWiki links
782 @cindex inter-project links
783 The @command{muse-wiki} module also allows for InterWiki links.  These
784 are similar to WikiWords, but they specify both the project and page of
785 a file.  The names of your project entries in @code{muse-project-alist}
786 will be used as InterWiki names by default.  Several examples follow.
788 @example
789 Blog::DocumentingMuse
790 Projects#EmacsMuse
791 Website
792 @end example
794 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
795 the project name, and @samp{DocumentingMuse} is the page name.  In the
796 second example, @samp{#} is the interwiki delimiter.  If the name of a
797 project occurs by itself in text, like the third case, it will be
798 colorized and published as a link to the default page of the given
799 project.
801 Customization of interwiki links may be accomplished by editing the
802 @code{muse-wiki-interwiki-alist} option.
804 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
805 @comment  node-name,  next,  previous,  up
806 @section Publishing and displaying images
807 @cindex images
808 @cindex links, with images
809 @strong{Image links}
811 Links to images may be used in either the target or the description, or
812 both.  Thus, the following code will publish as a clickable image that
813 points to @url{http://www.mwolson.org/}.
815 @example
816 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
817 @end example
819 @cindex images, displaying
820 @cindex images, inlined
821 @cindex images, local
822 If a link to a locally-available image is encountered in the link
823 description, Muse mode will attempt to display it if your version of
824 Emacs permits this.  The following example will display correctly and
825 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
826 exists in the @file{../pics/} directory.
828 @example
829 [[TestPage][../pics/TestLogo.png]]
830 @end example
832 @cindex images, without a description
833 An image link is not required to have a description.  The link
834 @samp{[[../myimage.png]]} will display and publish as expected.
836 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
837 @comment  node-name,  next,  previous,  up
838 @section Inserting a horizontal line or anchor
840 @cindex horizontal rules
841 @cindex dashes
842 @strong{Horizontal Rules}
844 Four or more dashes indicate a horizontal rule.  Be sure to put blank
845 lines around it, or it will be considered part of the proceeding or
846 following paragraph!
848 @cindex anchors
849 @cindex links, with target on same page
850 @strong{Anchors}
852 If you begin a line with "#anchor" -- where "anchor" can be any word
853 that doesn't contain whitespace -- it defines an anchor at that point
854 into the document.  This point can be referenced using "page#anchor" as
855 the target in a Muse link.
857 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
858 @comment  node-name,  next,  previous,  up
859 @section Evaluating Emacs Lisp code in documents for extensibility
860 @cindex lisp, embedded
862 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
863 which is the only Muse tag supported in a style's header and footer
864 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
865 text you wish.  The inserted output will get marked up, if the
866 @verb{|<lisp>|} tag appears within the main text of the document.
868 @example
869 <lisp>(concat "This form gets " "inserted")</lisp>
870 @end example
872 @cindex lisp, and insert command
873 Note that you should not use the @code{insert} command within a set of
874 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
875 tags will be automatically inserted into the document.
877 @node Comments, , Embedded Lisp, Markup Rules
878 @comment  node-name,  next,  previous,  up
879 @section Lines to omit from published output
880 @cindex comments
881 @cindex publishing, omitting lines
883 Use the following syntax to indicate a comment.  Comments will not be
884 published.
886 @example
887 ; Comment text goes here.
888 @end example
890 That is, only a semi-colon at the beginning of a line, followed by a
891 literal space, will cause that line to be treated as a comment.
893 @node Publishing Styles, Getting Help and Reporting Bugs, Markup Rules, Top
894 @comment  node-name,  next,  previous,  up
895 @chapter Publishing Various Types of Documents
896 @cindex publishing styles
898 One of the principle features of Muse is the ability to publish a simple
899 input text to a variety of different output styles.  Muse also makes it
900 easy to create new styles, or derive from an existing style.
902 @menu
903 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
904 * Book::                        Publishing entries into a compilation.
905 * DocBook::                     Publishing in DocBook XML form.
906 * HTML::                        Publishing in HTML or XHTML form.
907 * Journal::                     Keeping a journal or blog.
908 * LaTeX::                       Publishing LaTeX documents.
909 * Poem::                        Publish a poem to LaTex or PDF.
910 * Texinfo::                     Publish entries to Texinfo format or PDF.
911 * Common Elements::             Common functionality shared by styles.
912 * Deriving Styles::             Deriving a new style from an existing
913                                   one.
914 @end menu
916 @node Blosxom, Book, Publishing Styles, Publishing Styles
917 @comment  node-name,  next,  previous,  up
918 @section Integrating Muse and pyblosxom.cgi
919 @cindex blog, one-file-per-entry style
921 The Blosxom publishing style publishes a tree of categorised files to a
922 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
923 In other words, each blog entry corresponds with one file.
925 @menu
926 * Blosxom Requirements::        Other tools needed to the Blosxom style.
927 * Blosxom Entries::             Format of a Blosxom entry and automation.
928 * Blosxom Options::             Blosxom styles and options provided.
929 @end menu
931 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
932 @comment  node-name,  next,  previous,  up
933 @subsection Other tools needed to the Blosxom style
935 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
936 installed on a machine that you have upload access to.
938 The following additional components are required in order to make the
939 date of blog entries display as something sensible.
941 @enumerate
942 @item
943 A script to gather date directives from the entire blog tree into a
944 single file.  The file must associate a blog entry with a date.
946 @item
947 A plugin for (py)blosxom that reads this file.
948 @end enumerate
950 These 2 things are provided for @command{pyblosxom.cgi} in the
951 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
952 former service, while @file{hardcodedates.py} provides the latter
953 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
954 script will be found/written.
956 Here is a sample listing from my @file{timestamps} file, which maps
957 each file to a date.  This can really be in any format, as long as your
958 date-gathering script and your plugin can both understand it.
960 @example
961 2005-04-01-14-16 personal/paper_cranes
962 2005-03-21 personal/spring_break_over
963 2004-10-24 personal/finished_free_culture
964 @end example
966 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
967 @comment  node-name,  next,  previous,  up
968 @subsection Format of a Blosxom entry and automation
970 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
971 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
972 plus whatever normal content is desired.
974 The date directive is not used directly by @command{pyblosxom.cgi} or
975 this program.  You need to have the two additional items from the former
976 section to make use of this feature.
978 There is a function called @code{muse-blosxom-new-entry} that will
979 automate the process of making a new blog entry.  To make use of it, do
980 the following.
982 @itemize @bullet
983 @item
984 Customize @code{muse-blosxom-base-directory} to the location that your
985 blog entries are stored.
987 @item
988 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
989 use the following code to assign this function to @kbd{C-c p l'}.
991 @example
992 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
993 @end example
995 @item
996 You should create your directory structure ahead of time under your base
997 directory.  These directories, which correspond with category names, may
998 be nested.
1000 @item
1001 When you enter this key sequence, you will be prompted for the category
1002 of your entry and its title.  Upon entering this information, a new file
1003 will be created that corresponds with the title, but in lowercase
1004 letters and having special characters converted to underscores.  The
1005 title and date directives will be inserted automatically.
1006 @end itemize
1008 @node Blosxom Options, , Blosxom Entries, Blosxom
1009 @comment  node-name,  next,  previous,  up
1010 @subsection Blosxom styles and options provided
1012 The following styles and options are available in the Blosxom publishing
1013 style.
1015 @subsubheading Styles provided
1017 @table @code
1019 @cindex publishing styles, blosxom-html
1020 @item blosxom-html
1021 Publish Blosxom entries in HTML form.
1023 @cindex publishing styles, blosxom-xhtml
1024 @item blosxom-xhtml
1025 Publish Blosxom entries in XHTML form.
1027 @end table
1029 @subsubheading Options provided
1031 @table @code
1033 @item muse-blosxom-extension
1034 Default file extension for publishing Blosxom files.
1036 @item muse-blosxom-header
1037 Header used for publishing Blosxom files.
1039 This may be text or a filename.
1041 @item muse-blosxom-footer
1042 Footer used for publishing Blosxom files.
1044 This may be text or a filename.
1046 @item muse-blosxom-base-directory
1047 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1049 This is the top-level directory where your blog entries may be found
1050 locally.
1052 @end table
1054 @node Book, DocBook, Blosxom, Publishing Styles
1055 @comment  node-name,  next,  previous,  up
1056 @section Publishing entries into a compilation
1058 This publishing style is used to output ``books'' in LaTeX or PDF
1059 format.
1061 Each page will become a separate chapter in the book, unless the style
1062 keyword @option{:nochapters} is used, in which case they are all run
1063 together as if one giant chapter.
1065 You will need to call the @code{muse-book-publish-project} function in
1066 order to publish this style.  An example of this may be found in John
1067 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
1069 @subsubheading Styles provided
1071 @table @code
1073 @cindex publishing styles, book-latex
1074 @item book-latex
1075 Publish a book in LaTeX form.  The header and footer are different than
1076 the normal LaTeX publishing mode.
1078 @cindex publishing styles, book-pdf
1079 @item book-pdf
1080 Publish a book in PDF form.  The header and footer are different than
1081 the normal PDF publishing mode.
1083 @end table
1085 @subsubheading Options provided
1087 @table @code
1089 @item muse-book-before-publish-hook
1090 A hook run in the book buffer before it is marked up.
1092 @item muse-book-after-publish-hook
1093 A hook run in the book buffer after it is marked up.
1095 @item muse-book-latex-header
1096 Header used for publishing books to LaTeX.
1098 This may be text or a filename.
1100 @item muse-book-latex-footer
1101 Footer used for publishing books to LaTeX.
1103 This may be text or a filename.
1105 @end table
1107 @node DocBook, HTML, Book, Publishing Styles
1108 @comment  node-name,  next,  previous,  up
1109 @section Publishing in DocBook XML form
1111 This publishing style is used to generate DocBook XML files.
1113 @subsubheading Styles provided
1115 @table @code
1117 @cindex publishing styles, docbook
1118 @item docbook
1120 @end table
1122 @subsubheading Options provided
1124 @table @code
1126 @item muse-docbook-extension
1127 Default file extension for publishing DocBook XML files.
1129 @item muse-docbook-header
1130 Header used for publishing DocBook XML files.
1132 This may be text or a filename.
1134 @item muse-docbook-footer
1135 Footer used for publishing DocBook XML files.
1137 This may be text or a filename.
1139 @item muse-docbook-markup-regexps
1140 List of markup rules for publishing a Muse page to DocBook XML.
1142 @item muse-docbook-markup-functions
1143 An alist of style types to custom functions for that kind of text.
1145 @item muse-docbook-markup-strings
1146 Strings used for marking up text.
1148 These cover the most basic kinds of markup, the handling of which
1149 differs little between the various styles.
1151 @item muse-docbook-markup-specials
1152 A table of characters which must be represented specially.
1154 @item muse-docbook-encoding-default
1155 The default Emacs buffer encoding to use in published files.
1156 This will be used if no special characters are found.
1158 @item muse-docbook-charset-default
1159 The default DocBook XML charset to use if no translation is
1160 found in @code{muse-docbook-encoding-map}.
1162 @item muse-docbook-encoding-map
1163 An alist mapping emacs coding systems to appropriate DocBook charsets.
1164 Use the base name of the coding system (i.e. without the -unix).
1166 @end table
1168 @node HTML, Journal, DocBook, Publishing Styles
1169 @comment  node-name,  next,  previous,  up
1170 @section Publishing in HTML or XHTML form
1172 This publishing style is capable of producing HTML or XHTML documents.
1174 @subsubheading Styles provided
1176 @table @code
1178 @cindex publishing styles, html
1179 @item html
1180 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1182 @item xhtml
1183 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1185 @end table
1187 @subsubheading Options provided
1189 If an HTML option does not have a corresponding XHTML option, it will
1190 be used for both of these publishing styles.
1192 @table @code
1194 @item muse-html-extension
1195 Default file extension for publishing HTML files.
1197 @item muse-xhtml-extension
1198 Default file extension for publishing XHTML files.
1200 @item muse-html-style-sheet
1201 Store your stylesheet definitions here.
1203 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1204 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1205 @verb{|<lisp>|} markup tags.
1207 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1208 properly.
1210 @item muse-html-header
1211 Header used for publishing HTML files.
1213 This may be text or a filename.
1215 @item muse-html-footer
1216 Footer used for publishing HTML files.
1218 This may be text or a filename.
1220 @item muse-xhtml-header
1221 Header used for publishing XHTML files.
1223 This may be text or a filename.
1225 @item muse-xhtml-footer
1226 Footer used for publishing XHTML files.
1228 This may be text or a filename.
1230 @item muse-html-anchor-on-word
1231 When true, anchors surround the closest word.
1233 This allows you to select them in a browser (i.e. for pasting), but has
1234 the side-effect of marking up headers in multiple colors if your header
1235 style is different from your link style.
1237 @item muse-html-table-attributes
1238 The attribute to be used with HTML @verb{|<table>|} tags.
1240 Note that since Muse supports direct insertion of HTML tags, you can
1241 easily create any kind of table you want, as long as each line begins at
1242 column 0 (to prevent it from being blockquoted).
1244 @item muse-html-markup-regexps
1245 List of markup rules for publishing a Muse page to HTML.
1247 @item muse-html-markup-functions
1248 An alist of style types to custom functions for that kind of text.
1250 @item muse-html-markup-strings
1251 Strings used for marking up text as HTML.
1253 These cover the most basic kinds of markup, the handling of which
1254 differs little between the various styles.
1256 @item muse-xhtml-markup-strings
1257 Strings used for marking up text as XHTML.
1259 These cover the most basic kinds of markup, the handling of which
1260 differs little between the various styles.
1262 @item muse-html-markup-tags
1263 A list of tag specifications, for specially marking up HTML.
1264 @xref{muse-publish-markup-tags}, for more information.
1266 @item muse-html-markup-specials
1267 A table of characters which must be represented specially.  By default,
1268 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1270 @item muse-html-meta-http-equiv
1271 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1273 @item muse-html-meta-content-type
1274 The content type used for the HTML @verb{|<meta>|} tag.
1276 If you are striving for XHTML 1.1 compliance, you may want to change
1277 this to ``application/xhtml+xml''.
1279 @item muse-html-meta-content-encoding
1280 The charset to append to the HTML @verb{|<meta>|} tag.
1282 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1283 and determine the HTML charset from emacs's coding.  If set to a string,
1284 this string will be used to force a particular charset.
1286 @item muse-html-charset-default
1287 The default HTML meta charset to use if no translation is found in
1288 @code{muse-html-encoding-map}.
1290 @item muse-html-encoding-default
1291 The default Emacs buffer encoding to use in published files.
1292 This will be used if no special characters are found.
1294 @item muse-html-encoding-map
1295 An alist mapping emacs coding systems to appropriate HTML charsets.
1296 Use the base name of the coding system (i.e. without the -unix).
1298 @end table
1300 @node Journal, LaTeX, HTML, Publishing Styles
1301 @comment  node-name,  next,  previous,  up
1302 @section Keeping a journal or blog
1303 @cindex journal
1304 @cindex blog, journal style
1306 The module facilitates the keeping and publication of a journal.  When
1307 publishing to HTML, it assumes the form of a web log, or blog.
1309 The input format for each entry is as follows.
1311 @example
1312 * 20040317: Title of entry
1314 text for the entry.
1316 <qotd>
1317 "You know who you are. It comes down to a simple gut check: You
1318 either love what you do or you don't. Period." -- P. Bronson
1319 </qotd>
1320 @end example
1322 The "qotd", or Quote of the Day, is entirely optional.  When generated
1323 to HTML, this entry is rendered as the following.
1325 @example
1326 <div class="entry">
1327   <div class="entry-qotd">
1328     <h3>Quote of the Day:</h3>
1329     <p>"You know who you are. It comes down to a simple gut
1330       check: You either love what you do or you don't. Period."
1331       -- P. Bronson</p>
1332   </div>
1333   <div class="entry-body">
1334     <div class="entry-head">
1335       <div class="entry-date">
1336         <span class="date">March 17, 2004</span>
1337       </div>
1338       <div class="entry-title">
1339         <h2>Title of entry</h2>
1340       </div>
1341     </div>
1342     <div class="entry-text">
1343       <p>Text for the entry.</p>
1344     </div>
1345   </div>
1346 </div>
1347 @end example
1349 The plurality of "div" tags makes it possible to display the entries in
1350 any form you wish, using a CSS style.
1352 Also, an .RDF file can be generated from your journal by publishing it
1353 with the "rdf" style.  It uses the first two sentences of the first
1354 paragraph of each entry as its "description", and auto-generates tags
1355 for linking to the various entries.
1357 @subsubheading Styles provided
1359 @table @code
1361 @cindex publishing styles, journal-html
1362 @item journal-html
1363 Publish journal entries as an HTML document.
1365 @cindex publishing styles, journal-xhtml
1366 @item journal-xhtml
1367 Publish journal entries as an XHTML document.
1369 @cindex publishing styles, journal-latex
1370 @item journal-latex
1371 Publish journal entries as a LaTeX document.
1373 @cindex publishing styles, journal-pdf
1374 @item journal-pdf
1375 Publish journal entries as a PDF document.
1377 @cindex publishing styles, journal-book-latex
1378 @item journal-book-latex
1379 Publish journal entries as a LaTeX book.
1381 @cindex publishing styles, journal-book-pdf
1382 @item journal-book-pdf
1383 Publish journal entries as a PDF book.
1385 @cindex publishing styles, journal-rdf
1386 @cindex publishing styles, RSS 1.0
1387 @item journal-rdf
1388 Publish journal entries as an RDF file (RSS 1.0).
1390 @cindex publishing styles, journal-rss
1391 @cindex publishing styles, RSS 2.0
1392 @item journal-rss
1393 Publish journal entries as an RSS file (RSS 2.0).
1395 @end table
1397 @subsubheading Options provided
1399 @table @code
1401 @item muse-journal-heading-regexp
1402 A regexp that matches a journal heading.
1404 Paren group 1 is the ISO date, group 2 is the optional category, and
1405 group 3 is the optional heading for the entry.
1407 @item muse-journal-date-format
1408 Date format to use for journal entries.
1410 @item muse-journal-html-heading-regexp
1411 A regexp that matches a journal heading from an HTML document.
1413 Paren group 1 is the ISO date, group 2 is the optional category, and
1414 group 3 is the optional heading for the entry.
1416 @item muse-journal-html-entry-template
1417 Template used to publish individual journal entries as HTML.
1419 @item muse-journal-latex-section
1420 Template used to publish a LaTeX section.
1422 @item muse-journal-latex-subsection
1423 Template used to publish a LaTeX subsection.
1425 @item muse-journal-latex-markup-tags
1426 A list of tag specifications, for specially marking up LaTeX.
1428 @xref{muse-publish-markup-tags}, for more information.
1430 @item muse-journal-rdf-extension
1431 Default file extension for publishing RDF (RSS 1.0) files.
1433 @item muse-journal-rdf-base-url
1434 The base URL of the website referenced by the RDF file.
1436 @item muse-journal-rdf-header
1437 Header used for publishing RDF (RSS 1.0) files.
1439 This may be text or a filename.
1441 @item muse-journal-rdf-footer
1442 Footer used for publishing RDF (RSS 1.0) files.
1444 This may be text or a filename.
1446 @item muse-journal-rdf-date-format
1447 Date format to use for RDF entries.
1449 @item muse-journal-rdf-entry-template
1450 Template used to publish individual journal entries as RDF.
1452 @item muse-journal-rdf-summarize-entries
1453 If non-nil, include only summaries in the RDF file, not the full data.
1455 @item muse-journal-rss-extension
1456 Default file extension for publishing RSS 2.0 files.
1458 @item muse-journal-rss-base-url
1459 The base URL of the website referenced by the RSS file.
1461 @item muse-journal-rss-header
1462 Header used for publishing RSS 2.0 files.
1464 This may be text or a filename.
1466 @item muse-journal-rss-footer
1467 Footer used for publishing RSS 2.0 files.
1469 This may be text or a filename.
1471 @item muse-journal-rss-date-format
1472 Date format to use for RSS 2.0 entries.
1474 @item muse-journal-rss-entry-template
1475 Template used to publish individual journal entries as RSS 2.0.
1477 @item muse-journal-rss-enclosure-types-alist
1478 File types that are accepted as RSS enclosures.
1480 This is an alist that maps file extension to content type.
1482 Useful for podcasting.
1484 @item muse-journal-rss-summarize-entries
1485 If non-nil, include only summaries in the RSS file, not the full data.
1487 Many RSS subscribers find this annoying.
1489 @item muse-journal-rss-markup-regexps
1490 List of markup rules for publishing a Muse journal page to RSS.
1492 For more information on the structure of this list,
1493 @xref{muse-publish-markup-regexps}.
1495 @item muse-journal-rss-markup-functions
1496 An alist of style types to custom functions for that kind of text.
1498 For more on the structure of this list,
1499 @xref{muse-publish-markup-functions}.
1501 @end table
1503 @node LaTeX, Poem, Journal, Publishing Styles
1504 @comment  node-name,  next,  previous,  up
1505 @section Publishing LaTeX documents
1507 This publishing style is capable of producing LaTeX or PDF documents.
1509 If you wish to publish PDF documents, you will need to have a good TeX
1510 installation.  For Debian, this can be accomplished by installing the
1511 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1513 @subsubheading Styles provided
1515 @table @code
1517 @cindex publishing styles, latex
1518 @item latex
1519 Publish a LaTeX document.
1521 @cindex publishing styles, pdf
1522 @item pdf
1523 Publish a PDF document, using an external LaTeX document conversion
1524 tool.
1526 @cindex publishing styles, latexcjk
1527 @item latexcjk
1528 Publish a LaTeX document with CJK (Chinese) encodings.
1530 @cindex publishing styles, pdfcjk
1531 @item pdfcjk
1532 Publish a PDF document with CJK (Chinese) encodings, using an external
1533 LaTeX document conversion tool.
1535 @end table
1537 @subsubheading Options provided
1539 @table @code
1541 @item muse-latex-extension
1542 Default file extension for publishing LaTeX files.
1544 @item muse-latex-pdf-extension
1545 Default file extension for publishing LaTeX files to PDF.
1547 @item muse-latex-header
1548 Header used for publishing LaTeX files.
1550 This may be text or a filename.
1552 @item muse-latex-footer
1553 Footer used for publishing LaTeX files.
1555 This may be text or a filename.
1557 @item muse-latexcjk-header
1558 Header used for publishing LaTeX files (CJK).
1560 This may be text or a filename.
1562 @item muse-latexcjk-footer
1563 Footer used for publishing LaTeX files (CJK).
1565 This may be text or a filename.
1567 @item muse-latex-markup-regexps
1568 List of markup regexps for identifying regions in a Muse page.
1570 For more on the structure of this list,
1571 @xref{muse-publish-markup-regexps}.
1573 @item muse-latex-markup-functions
1574 An alist of style types to custom functions for that kind of text.
1576 For more on the structure of this list,
1577 @xref{muse-publish-markup-functions}.
1579 @item muse-latex-markup-strings
1580 Strings used for marking up text.
1582 These cover the most basic kinds of markup, the handling of which
1583 differs little between the various styles.
1585 @item muse-latexcjk-encoding-map
1586 An alist mapping emacs coding systems to appropriate CJK codings.
1587 Use the base name of the coding system (ie, without the -unix).
1589 @item muse-latexcjk-encoding-default
1590 The default Emacs buffer encoding to use in published files.
1592 This will be used if no special characters are found.
1594 @item muse-latex-markup-specials
1595 A table of characters which must be represented specially.
1597 @end table
1599 @node Poem, Texinfo, LaTeX, Publishing Styles
1600 @comment  node-name,  next,  previous,  up
1601 @section Publish a poem to LaTex or PDF
1603 The @code{muse-poem} module makes it easy to attractively publish and
1604 reference poems in the following format, using the "memoir" module for
1605 LaTeX publishing.  It will also markup poems for every other output
1606 style, though none are nearly as pretty.
1608 @example
1609 Title
1612 Body of poem
1615 Annotations, history, notes, etc.
1616 @end example
1618 Once a poem is written in this format, just publish it to PDF using the
1619 @code{poem-pdf} style.  To make an inlined reference to a poem that
1620 you've written -- for example, from a blog page -- there is a "poem" tag
1621 defined by this module.
1623 @example
1624 <poem title="name.of.poem.page">
1625 @end example
1627 Let's assume the template above was called @file{name.of.poem.page};
1628 then the above tag would result in this inclusion.
1630 @example
1631 ** Title
1633 > Body of poem
1634 @end example
1636 John Wiegley uses this module for publishing all of the poems on his
1637 website, which are at
1638 @uref{http://www.newartisans.com/johnw/poems.html}.
1640 @subsubheading Styles provided
1642 @table @code
1644 @cindex publishing styles, poem-latex
1645 @item poem-latex
1646 Publish a poem in LaTeX form.
1648 @cindex publishing styles, poem-pdf
1649 @item poem-pdf
1650 Publish a poem to a PDF document.
1652 @cindex publishing styles, chapbook-latex
1653 @item chapbook-latex
1654 Publish a book of poems in LaTeX form.
1656 @cindex publishing styles, chapbook-pdf
1657 @item chapbook-pdf
1658 Publish a book of poems to a PDF document.
1660 @end table
1662 @subsubheading Options provided
1664 @table @code
1666 @item muse-poem-latex-header
1667 Header used for publishing LaTeX poems.
1669 This may be text or a filename.
1671 @item muse-poem-latex-footer
1672 Footer used for publishing LaTeX files.
1674 This may be text or a filename.
1676 @item muse-poem-markup-strings
1677 Strings used for marking up poems.
1679 These cover the most basic kinds of markup, the handling of which
1680 differs little between the various styles.
1682 @item muse-chapbook-latex-header
1683 Header used for publishing a book of poems in LaTeX form.
1685 This may be text or a filename.
1687 @item muse-chapbook-latex-footer
1688 Footer used for publishing a book of poems in LaTeX form.
1690 This may be text or a filename.
1692 @item muse-poem-chapbook-strings
1693 Strings used for marking up books of poems.
1695 These cover the most basic kinds of markup, the handling of which
1696 differs little between the various styles.
1698 @end table
1700 @node Texinfo, Common Elements, Poem, Publishing Styles
1701 @comment  node-name,  next,  previous,  up
1702 @section Publish entries to Texinfo format or PDF
1704 Rules for publishing a Muse file as a Texinfo article.
1706 @subsubheading Styles provided
1708 @table @code
1710 @cindex publishing styles, texi
1711 @item texi
1712 Publish a file in Texinfo form.
1714 @cindex publishing styles, texi
1715 @item info
1716 Generate an Info file from a Muse file.
1718 @cindex publishing styles, info-pdf
1719 @item info-pdf
1720 Publish a file in PDF form.
1722 @end table
1724 @subsubheading Options provided
1726 @table @code
1728 @item muse-texinfo-process-natively
1729 If non-nil, use the Emacs `texinfmt' module to make Info files.
1731 @item muse-texinfo-extension
1732 Default file extension for publishing Texinfo files.
1734 @item muse-texinfo-info-extension
1735 Default file extension for publishing Info files.
1737 @item muse-texinfo-pdf-extension
1738 Default file extension for publishing PDF files.
1740 @item muse-texinfo-header
1741 Text to prepend to a Muse page being published as Texinfo.
1743 This may be text or a filename.
1744 It may contain @verb{|<lisp>|} markup tags.
1746 @item muse-texinfo-footer
1747 Text to append to a Muse page being published as Texinfo.
1749 This may be text or a filename.
1750 It may contain @verb{|<lisp>|} markup tags.
1752 @item muse-texinfo-markup-regexps
1753 List of markup rules for publishing a Muse page to Texinfo.
1755 For more on the structure of this list,
1756 @xref{muse-publish-markup-regexps}.
1758 @item muse-texinfo-markup-functions
1759 An alist of style types to custom functions for that kind of text.
1761 For more on the structure of this list, see
1762 @xref{muse-publish-markup-functions}.
1764 @item muse-texinfo-markup-strings
1765 Strings used for marking up text.
1767 These cover the most basic kinds of markup, the handling of which
1768 differs little between the various styles.
1770 @item muse-texinfo-markup-specials
1771 A table of characters which must be represented specially.
1773 @end table
1775 @node Common Elements, Deriving Styles, Texinfo, Publishing Styles
1776 @comment  node-name,  next,  previous,  up
1777 @section Common functionality shared by styles
1778 @cindex publishing styles, common
1780 @menu
1781 * Markup Functions::            Specifying functions to marking up text.
1782 * Markup Regexps::              Markup rules for publishing.
1783 * Markup Strings::              Strings specific to a publishing style.
1784 * Markup Tags::                 Tag specifications for special markup.
1785 * Style Elements::              Parameters used for defining styles.
1786 @end menu
1788 @node Markup Functions, Markup Regexps, , Common Elements
1789 @comment  node-name,  next,  previous,  up
1790 @subsection Specifying functions to mark up text
1791 @cindex publishing, markup functions
1793 @anchor{muse-publish-markup-functions}
1794 @code{muse-publish-markup-functions}
1796 An alist of style types to custom functions for that kind of text.
1798 This is used by publishing styles to attempt to minimize the amount of
1799 custom regexps that each has to define.  @file{muse-publish} provides
1800 rules for the most common types of markup.
1802 Each member of the list is of the following form.
1804 @example
1805 (SYMBOL FUNCTION)
1806 @end example
1808 @itemize @bullet
1809 @item SYMBOL
1810 Describes the type of text to associate with this rule.
1811 @code{muse-publish-markup-regexps} maps regexps to these symbols.
1813 @item FUNCTION
1814 Function to use to mark up this kind of rule if no suitable function is
1815 found through the @option{:functions} tag of the current style.
1816 @end itemize
1818 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
1819 @comment  node-name,  next,  previous,  up
1820 @subsection Markup rules for publishing
1821 @cindex publishing, markup regexps
1822 @cindex publishing, rules
1824 @anchor{muse-publish-markup-regexps}
1825 @code{muse-publish-markup-regexps}
1827 List of markup rules for publishing a page with Muse.
1829 The rules given in this variable are invoked first, followed by whatever
1830 rules are specified by the current style.
1832 Each member of the list is either a function, or a list of the following
1833 form.
1835 @example
1836 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
1837 @end example
1839 @itemize @bullet
1840 @item REGEXP
1841 A regular expression, or symbol whose value is a regular expression,
1842 which is searched for using `re-search-forward'.
1844 @item TEXT-BEGIN-GROUP
1845 The matching group within that regexp which denotes the beginning of the
1846 actual text to be marked up.
1848 @item REPLACEMENT-TEXT
1849 A string that will be passed to `replace-match'.
1851 If it is not a string, but a function, it will be called to determine
1852 what the replacement text should be (it must return a string).  If it is
1853 a symbol, the value of that symbol should be a string.
1854 @end itemize
1856 The replacements are done in order, one rule at a time.  Writing
1857 the regular expressions can be a tricky business.  Note that case
1858 is never ignored.  `case-fold-search' is always bound to nil
1859 while processing the markup rules.
1861 @subsubheading Publishing order
1863 This is the order that the publishing rules are consulted, by default.
1864 This may be changed by customizing @code{muse-publish-markup-regexps}.
1866 @table @code
1868 @item trailing and leading whitespace
1869 Remove trailing and leading whitespace from a file.
1871 @item directive
1872 @samp{#directive}
1874 This is only recognized at the beginning of a file.
1876 @item tag
1877 @samp{<tag>}
1879 @item comment
1880 @samp{; comment}
1882 @item anchor
1883 @samp{#anchor}
1885 @item explicit links
1886 Prevent emphasis characters in explicit links from being marked up.
1888 Don't actually publish them here, just add a special no-emphasis text
1889 property.
1891 @item word
1892 Whitespace-delimited word, possibly with emphasis characters
1894 This function is responsible for marking up emphasis and escaping some
1895 specials.
1897 @item emdash
1898 @samp{--}
1900 2-wide dash
1902 @item heading
1903 @samp{** Heading}
1905 Outline-mode style headings.
1907 @item enddots
1908 @samp{....}
1910 These are ellipses with a dot at end.
1912 @item dots
1913 @samp{...}
1915 Ellipses.
1917 @item rule
1918 @samp{----}
1920 Horizontal rule or section separator.
1922 @item fn-sep
1923 @samp{Footnotes:}
1925 beginning of footnotes section
1927 @item footnote
1928 @samp{[1]}
1930 Footnote definition or reference.  If at beginning of line, it is a
1931 definition.
1933 @item list
1934 @itemize @bullet
1935 @item
1936 @samp{ 1. }
1938 @item
1939 @samp{ - }
1941 @item
1942 @samp{term :: }
1943 @end itemize
1945 Numbered list, item list, or term definition list.
1947 @item quote
1948 spaces before beginning of text
1950 Blockquotes.
1952 @item verse
1953 @samp{> verse text}
1955 @item table
1956 @samp{table | cells}
1958 @item link
1959 @samp{[[explicit][links]]}
1961 @item url
1962 @samp{http://example.com/}
1964 @item email
1965 @samp{bare-email@@example.com}
1967 @end table
1969 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
1970 @comment  node-name,  next,  previous,  up
1971 @subsection Strings specific to a publishing style
1972 @cindex publishing, markup strings
1974 @dfn{Markup strings} are strings used for marking up text for a
1975 particular style.
1977 These cover the most basic kinds of markup, the handling of which
1978 differs little between the various styles.
1980 @subsubheading Available markup strings
1982 @table @code
1984 @item image-with-desc
1985 An image and a description.
1987 Argument 1: image.  Argument 2: description.
1989 @item image-link
1990 A link to an image.
1992 Argument 1: image link.
1994 @item url-with-image
1995 A URL with an image.
1997 Argument 1: link.  Argument 2: image.
1999 @item url-link
2000 A link with a description.
2002 Argument 1: link.  Argument 2: description if one exists, or the
2003 original link otherwise.
2005 @item internal-link
2006 A link that refers to an internal anchor.
2008 Argument 1: internal link.  Argument 2: description if one exists, or
2009 the original link otherwise.
2011 @item email-addr
2012 A link to an email address.
2014 Argument 1: email address.  Argument 2: email address.
2016 @item emdash
2017 A 2-length dash.
2019 @item rule
2020 A horizontal line or space.
2022 @item footnote
2023 Beginning of footnote.
2025 @item footnote-end
2026 End of footnote.
2028 @item footnotemark
2029 Mark a reference for the current footnote.
2031 Argument 1: number of this footnote.
2033 @item footnotetext
2034 Indicate the text of the current footnote.
2036 Argument 1: number of this footnote.
2038 @item footnotetext-end
2039 End of a footnote text line.
2041 @item fn-sep
2042 Text used to replace ``Footnotes:'' line.
2044 @item enddots
2045 4 dots.
2047 @item dots
2048 3 dots.
2050 @item part
2051 Beginning of a part indicator line.  This is used by book publishing.
2053 @item part-end
2054 End of a part indicator line.  This is used by book publishing.
2056 @item chapter
2057 Beginning of a chapter indicator line.  This is used by book publishing.
2059 @item chapter-end
2060 End of a chapter indicator line.  This is used by book publishing.
2062 @item section
2063 Beginning of level 1 section indicator line.
2065 Argument 1: level of section; always 1.
2067 @item section-end
2068 End of level 1 section indicator line.
2070 Argument 1: level of section; always 1.
2072 @item subsection
2073 Beginning of level 2 section indicator line.
2075 Argument 1: level of section; always 2.
2077 @item subsection-end
2078 End of level 2 section indicator line.
2080 Argument 1: level of section; always 2.
2082 @item subsubsection
2083 Beginning of level 3 section indicator line.
2085 Argument 1: level of section; always 3.
2087 @item subsubsection-end
2088 End of level 3 section indicator line.
2090 Argument 1: level of section; always 3.
2092 @item section-other
2093 Beginning of section indicator line, where level is greater than 3.
2095 Argument 1: level of section.
2097 @item section-other-end
2098 Beginning of section indicator line, where level is greater than 3.
2100 Argument 1: level of section.
2102 @item begin-underline
2103 Beginning of underlined text.
2105 @item end-underline
2106 End of underlined text.
2108 @item begin-literal
2109 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2110 =teletype text=.
2112 @item end-literal
2113 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2114 text=.
2116 @item begin-emph
2117 Beginning of the first level of emphasized text.
2119 @item end-emph
2120 End of the first level of emphasized text.
2122 @item begin-more-emph
2123 Beginning of the second level of emphasized text.
2125 @item end-more-emph
2126 End of the second level of emphasized text.
2128 @item begin-most-emph
2129 Beginning of the third (and final) level of emphasized text.
2131 @item end-most-emph
2132 End of the third (and final) level of emphasized text.
2134 @item begin-verse
2135 Beginning of verse text.
2137 @item verse-space
2138 String used to each space that is further indented than the beginning of
2139 the verse.
2141 @item begin-verse-line
2142 Beginning of a line of verse.
2144 @item empty-verse-line
2145 End of a line of verse.
2147 @item begin-last-stanza-line
2148 Beginning of the last line of a verse stanza.
2150 @item end-last-stanza-line
2151 End of the last line of a verse stanza.
2153 @item end-verse
2154 End of verse text.
2156 @item begin-example
2157 Beginning of an example region.  To make use of this, an
2158 @samp{<example>} tag is needed.
2160 @item end-example
2161 End of an example region.  To make use of this, an @samp{</example>} tag
2162 is needed.
2164 @item begin-center
2165 Begin a centered line.
2167 @item end-center
2168 End a centered line.
2170 @item begin-quote
2171 Begin a quoted region.
2173 @item end-quote
2174 End a quoted region.
2176 @item begin-uli
2177 Begin an unordered list.
2179 @item end-uli
2180 End an unordered list.
2182 @item begin-oli
2183 Begin an ordered list.
2185 @item end-oli
2186 End an ordered list.
2188 @item begin-ddt
2189 Begin a definition list.
2191 @item start-dde
2192 Begin a term in a definition list.
2194 @item end-ddt
2195 End a definition list.
2197 @end table
2199 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2200 @comment  node-name,  next,  previous,  up
2201 @subsection Tag specifications for special markup
2202 @cindex publishing, markup tags
2204 @anchor{muse-publish-markup-tags}
2205 @code{muse-publish-markup-tags}
2207 A list of tag specifications, for specially marking up text.
2209 XML-style tags are the best way to add custom markup to Muse.  This is
2210 easily accomplished by customizing this list of markup tags.
2212 For each entry, the name of the tag is given, whether it expects a
2213 closing tag and/or an optional set of attributes, and a function that
2214 performs whatever action is desired within the delimited region.
2216 The tags themselves are deleted during publishing, before the function
2217 is called.  The function is called with three arguments, the beginning
2218 and end of the region surrounded by the tags.  If properties are
2219 allowed, they are passed as a third argument in the form of an alist.
2220 The `end' argument to the function is always a marker.
2222 Point is always at the beginning of the region within the tags, when the
2223 function is called.  Wherever point is when the function finishes is
2224 where tag markup will resume.
2226 These tag rules are processed once at the beginning of markup, and once
2227 at the end, to catch any tags which may have been inserted in-between.
2229 @node Style Elements, , Markup Tags, Common Elements
2230 @comment  node-name,  next,  previous,  up
2231 @subsection Parameters used for defining styles
2232 @cindex publishing, style elements
2234 Style elements are tags that define a style.  Use
2235 @code{muse-define-style} to create a new style.
2237 @example
2238 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2239 @end example
2241 @subsubheading Usable elements
2243 @table @option
2245 @item :suffix
2246 File extension to use for publishing files with this style.
2248 @item :link-suffix
2249 File extension to use for publishing links to Muse files with this
2250 style.
2252 @item :osuffix
2253 File extension to use for publishing second-stage files with this style.
2255 For example, PDF publishing generates a LaTeX file first, then a PDF
2256 from that LaTeX file.
2258 @item :regexps
2259 List of markup rules for publishing a page with Muse.
2260 @xref{muse-publish-markup-regexps}.
2262 @item :functions
2263 An alist of style types to custom functions for that kind of text.
2264 @xref{muse-publish-markup-functions}.
2266 @item :strings
2267 Strings used for marking up text with this style.
2269 These cover the most basic kinds of markup, the handling of which
2270 differs little between the various styles.
2272 @item :tags
2273 A list of tag specifications, used for handling extra tags.
2274 @xref{muse-publish-markup-tags}.
2276 @item :specials
2277 A table of characters which must be represented specially.
2279 @item :before
2280 A function that is to be executed on the newly-created publishing buffer
2281 (or the current region) before any publishing occurs.
2283 This is used to set extra parameters that direct the publishing process.
2285 @item :before-end
2286 A function that is to be executed on the publishing buffer (or the
2287 current region) immediately after applying all of the markup regexps.
2289 This is used to fix the order of table elements (header, footer, body)
2290 in XML-ish styles.
2292 @item :after
2293 A function that is to be executed on the publishing buffer after
2294 :before-end, and immediately after inserting the header and footer.
2296 This is used for generating the table of contents as well as setting the
2297 file coding system.
2299 @item :final
2300 A function that is to be executed after saving the published file, but
2301 while still in its buffer.
2303 This is used for generating second-stage documents like PDF files from
2304 just-published LaTeX files.
2306 @item :header
2307 Header used for publishing files of this style.
2309 This may be text or a filename.  It is inserted at the beginning of a
2310 file, after evaluating the publishing markup.
2312 @item :footer
2313 Footer used for publishing files of this style.
2315 This may be text or a filename.  It is inserted at the end of a file,
2316 after evaluating the publishing markup.
2318 @item :browser
2319 The function used to browse the published result of files of this style.
2321 @end table
2323 @node Deriving Styles, , Common Elements, Publishing Styles
2324 @comment  node-name,  next,  previous,  up
2325 @section Deriving a new style from an existing one
2326 @cindex publishing styles, deriving
2328 To create a new style from an existing one, use @code{muse-derive-style}
2329 as follows.  This is a good way to fix something you don't like about a
2330 particular publishing style, or to personalize it.
2332 @example
2333 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2334 @end example
2336 The derived name is a string defining the new style, such as "my-html".
2337 The base name must identify an existing style, such as "html" -- if you
2338 have loaded @file{muse-html}.  The style parameters are the same as
2339 those used to create a style, except that they override whatever
2340 definitions exist in the base style.  However, some definitions only
2341 partially override.  The following parameters support partial
2342 overriding.
2344 @xref{Style Elements}, for a complete list of all parameters.
2346 @table @option
2348 @item :functions
2349 If a markup function is not found in the derived style's function list,
2350 the base style's function list will be queried.
2352 @item :regexps
2353 All regexps in the current style and the base style(s) will be used.
2355 @item :strings
2356 If a markup string is not found in the derived style's string list, the
2357 base style's string list will be queried.
2359 @end table
2362 @node Getting Help and Reporting Bugs, History, Publishing Styles, Top
2363 @comment  node-name,  next,  previous,  up
2364 @chapter Getting Help and Reporting Bugs
2365 @cindex help, getting
2366 @cindex bugs, reporting
2368 After you have read this guide, if you still have questions about
2369 Muse, or if you have bugs to report, there are several places you can
2372 @itemize @bullet
2374 @item
2375 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
2376 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2377 to it.
2379 @item
2380 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2381 that Michael Olson (the current maintainer) made for Muse.
2383 @item
2384 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
2385 using the subscription form at
2386 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
2387 This mailing list provides support for Muse, @command{Planner} and
2388 @command{emacs-wiki}, which is the predecessor of Muse.
2390 There are additional methods for accessing the mailing list, adding
2391 content to it, and searching it.  Consult
2392 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
2393 more information.
2395 @item
2396 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2397 contributors are frequently around and willing to answer your
2398 questions.  The @samp{#muse} channel is also available for
2399 Muse-specific help, and its current maintainer hangs out there.
2401 @item
2402 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2403 @email{mwolson@@gnu.org}.
2405 @end itemize
2407 @node History, Contributors, Getting Help and Reporting Bugs, Top
2408 @comment  node-name,  next,  previous,  up
2409 @chapter History of This Document
2410 @cindex history, of Muse
2412 @itemize
2413 @item 2004
2414 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2415 limitations. Around February 2004, he started making "emacs-wiki version
2416 3.00 APLHA", which eventually became known as Muse.
2418 Most of those who frequent the emacs-wiki mailing list continued to use
2419 emacs-wiki, mainly because Planner hasn't been ported over to it.
2421 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2422 John Wiegley's request.
2424 @item 2005
2425 Michael Olson overhauled this document and added many new sections in
2426 preparation for the first release of Muse (3.01).
2428 @end itemize
2430 @node Contributors, GNU General Public License, History, Top
2431 @comment  node-name,  next,  previous,  up
2432 @chapter Contributors to This Documentation
2433 @cindex contributors
2435 The first draft of this document was taken from the emacs-wiki texinfo
2436 manual.  Michael Olson adapted it for Muse and added most of its
2437 content.
2439 John Sullivan did a majority of the work on the emacs-wiki texinfo
2440 manual.
2442 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2443 emacs-wiki texinfo manual.
2445 @node GNU General Public License, Concept Index, Contributors, Top
2446 @comment  node-name,  next,  previous,  up
2447 @appendix GNU GENERAL PUBLIC LICENSE
2448 @center Version 2, June 1991
2449 @cindex GPL
2450 @cindex GNU General Public License
2452 @c This file is intended to be included in another file.
2454 @display
2455 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2456 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2458 Everyone is permitted to copy and distribute verbatim copies
2459 of this license document, but changing it is not allowed.
2460 @end display
2462 @appendixsec Preamble
2464   The licenses for most software are designed to take away your
2465 freedom to share and change it.  By contrast, the GNU General Public
2466 License is intended to guarantee your freedom to share and change free
2467 software---to make sure the software is free for all its users.  This
2468 General Public License applies to most of the Free Software
2469 Foundation's software and to any other program whose authors commit to
2470 using it.  (Some other Free Software Foundation software is covered by
2471 the GNU Library General Public License instead.)  You can apply it to
2472 your programs, too.
2474   When we speak of free software, we are referring to freedom, not
2475 price.  Our General Public Licenses are designed to make sure that you
2476 have the freedom to distribute copies of free software (and charge for
2477 this service if you wish), that you receive source code or can get it
2478 if you want it, that you can change the software or use pieces of it
2479 in new free programs; and that you know you can do these things.
2481   To protect your rights, we need to make restrictions that forbid
2482 anyone to deny you these rights or to ask you to surrender the rights.
2483 These restrictions translate to certain responsibilities for you if you
2484 distribute copies of the software, or if you modify it.
2486   For example, if you distribute copies of such a program, whether
2487 gratis or for a fee, you must give the recipients all the rights that
2488 you have.  You must make sure that they, too, receive or can get the
2489 source code.  And you must show them these terms so they know their
2490 rights.
2492   We protect your rights with two steps: (1) copyright the software, and
2493 (2) offer you this license which gives you legal permission to copy,
2494 distribute and/or modify the software.
2496   Also, for each author's protection and ours, we want to make certain
2497 that everyone understands that there is no warranty for this free
2498 software.  If the software is modified by someone else and passed on, we
2499 want its recipients to know that what they have is not the original, so
2500 that any problems introduced by others will not reflect on the original
2501 authors' reputations.
2503   Finally, any free program is threatened constantly by software
2504 patents.  We wish to avoid the danger that redistributors of a free
2505 program will individually obtain patent licenses, in effect making the
2506 program proprietary.  To prevent this, we have made it clear that any
2507 patent must be licensed for everyone's free use or not licensed at all.
2509   The precise terms and conditions for copying, distribution and
2510 modification follow.
2512 @iftex
2513 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2514 @end iftex
2515 @ifinfo
2516 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2517 @end ifinfo
2519 @enumerate 0
2520 @item
2521 This License applies to any program or other work which contains
2522 a notice placed by the copyright holder saying it may be distributed
2523 under the terms of this General Public License.  The ``Program'', below,
2524 refers to any such program or work, and a ``work based on the Program''
2525 means either the Program or any derivative work under copyright law:
2526 that is to say, a work containing the Program or a portion of it,
2527 either verbatim or with modifications and/or translated into another
2528 language.  (Hereinafter, translation is included without limitation in
2529 the term ``modification''.)  Each licensee is addressed as ``you''.
2531 Activities other than copying, distribution and modification are not
2532 covered by this License; they are outside its scope.  The act of
2533 running the Program is not restricted, and the output from the Program
2534 is covered only if its contents constitute a work based on the
2535 Program (independent of having been made by running the Program).
2536 Whether that is true depends on what the Program does.
2538 @item
2539 You may copy and distribute verbatim copies of the Program's
2540 source code as you receive it, in any medium, provided that you
2541 conspicuously and appropriately publish on each copy an appropriate
2542 copyright notice and disclaimer of warranty; keep intact all the
2543 notices that refer to this License and to the absence of any warranty;
2544 and give any other recipients of the Program a copy of this License
2545 along with the Program.
2547 You may charge a fee for the physical act of transferring a copy, and
2548 you may at your option offer warranty protection in exchange for a fee.
2550 @item
2551 You may modify your copy or copies of the Program or any portion
2552 of it, thus forming a work based on the Program, and copy and
2553 distribute such modifications or work under the terms of Section 1
2554 above, provided that you also meet all of these conditions:
2556 @enumerate a
2557 @item
2558 You must cause the modified files to carry prominent notices
2559 stating that you changed the files and the date of any change.
2561 @item
2562 You must cause any work that you distribute or publish, that in
2563 whole or in part contains or is derived from the Program or any
2564 part thereof, to be licensed as a whole at no charge to all third
2565 parties under the terms of this License.
2567 @item
2568 If the modified program normally reads commands interactively
2569 when run, you must cause it, when started running for such
2570 interactive use in the most ordinary way, to print or display an
2571 announcement including an appropriate copyright notice and a
2572 notice that there is no warranty (or else, saying that you provide
2573 a warranty) and that users may redistribute the program under
2574 these conditions, and telling the user how to view a copy of this
2575 License.  (Exception: if the Program itself is interactive but
2576 does not normally print such an announcement, your work based on
2577 the Program is not required to print an announcement.)
2578 @end enumerate
2580 These requirements apply to the modified work as a whole.  If
2581 identifiable sections of that work are not derived from the Program,
2582 and can be reasonably considered independent and separate works in
2583 themselves, then this License, and its terms, do not apply to those
2584 sections when you distribute them as separate works.  But when you
2585 distribute the same sections as part of a whole which is a work based
2586 on the Program, the distribution of the whole must be on the terms of
2587 this License, whose permissions for other licensees extend to the
2588 entire whole, and thus to each and every part regardless of who wrote it.
2590 Thus, it is not the intent of this section to claim rights or contest
2591 your rights to work written entirely by you; rather, the intent is to
2592 exercise the right to control the distribution of derivative or
2593 collective works based on the Program.
2595 In addition, mere aggregation of another work not based on the Program
2596 with the Program (or with a work based on the Program) on a volume of
2597 a storage or distribution medium does not bring the other work under
2598 the scope of this License.
2600 @item
2601 You may copy and distribute the Program (or a work based on it,
2602 under Section 2) in object code or executable form under the terms of
2603 Sections 1 and 2 above provided that you also do one of the following:
2605 @enumerate a
2606 @item
2607 Accompany it with the complete corresponding machine-readable
2608 source code, which must be distributed under the terms of Sections
2609 1 and 2 above on a medium customarily used for software interchange; or,
2611 @item
2612 Accompany it with a written offer, valid for at least three
2613 years, to give any third party, for a charge no more than your
2614 cost of physically performing source distribution, a complete
2615 machine-readable copy of the corresponding source code, to be
2616 distributed under the terms of Sections 1 and 2 above on a medium
2617 customarily used for software interchange; or,
2619 @item
2620 Accompany it with the information you received as to the offer
2621 to distribute corresponding source code.  (This alternative is
2622 allowed only for noncommercial distribution and only if you
2623 received the program in object code or executable form with such
2624 an offer, in accord with Subsection b above.)
2625 @end enumerate
2627 The source code for a work means the preferred form of the work for
2628 making modifications to it.  For an executable work, complete source
2629 code means all the source code for all modules it contains, plus any
2630 associated interface definition files, plus the scripts used to
2631 control compilation and installation of the executable.  However, as a
2632 special exception, the source code distributed need not include
2633 anything that is normally distributed (in either source or binary
2634 form) with the major components (compiler, kernel, and so on) of the
2635 operating system on which the executable runs, unless that component
2636 itself accompanies the executable.
2638 If distribution of executable or object code is made by offering
2639 access to copy from a designated place, then offering equivalent
2640 access to copy the source code from the same place counts as
2641 distribution of the source code, even though third parties are not
2642 compelled to copy the source along with the object code.
2644 @item
2645 You may not copy, modify, sublicense, or distribute the Program
2646 except as expressly provided under this License.  Any attempt
2647 otherwise to copy, modify, sublicense or distribute the Program is
2648 void, and will automatically terminate your rights under this License.
2649 However, parties who have received copies, or rights, from you under
2650 this License will not have their licenses terminated so long as such
2651 parties remain in full compliance.
2653 @item
2654 You are not required to accept this License, since you have not
2655 signed it.  However, nothing else grants you permission to modify or
2656 distribute the Program or its derivative works.  These actions are
2657 prohibited by law if you do not accept this License.  Therefore, by
2658 modifying or distributing the Program (or any work based on the
2659 Program), you indicate your acceptance of this License to do so, and
2660 all its terms and conditions for copying, distributing or modifying
2661 the Program or works based on it.
2663 @item
2664 Each time you redistribute the Program (or any work based on the
2665 Program), the recipient automatically receives a license from the
2666 original licensor to copy, distribute or modify the Program subject to
2667 these terms and conditions.  You may not impose any further
2668 restrictions on the recipients' exercise of the rights granted herein.
2669 You are not responsible for enforcing compliance by third parties to
2670 this License.
2672 @item
2673 If, as a consequence of a court judgment or allegation of patent
2674 infringement or for any other reason (not limited to patent issues),
2675 conditions are imposed on you (whether by court order, agreement or
2676 otherwise) that contradict the conditions of this License, they do not
2677 excuse you from the conditions of this License.  If you cannot
2678 distribute so as to satisfy simultaneously your obligations under this
2679 License and any other pertinent obligations, then as a consequence you
2680 may not distribute the Program at all.  For example, if a patent
2681 license would not permit royalty-free redistribution of the Program by
2682 all those who receive copies directly or indirectly through you, then
2683 the only way you could satisfy both it and this License would be to
2684 refrain entirely from distribution of the Program.
2686 If any portion of this section is held invalid or unenforceable under
2687 any particular circumstance, the balance of the section is intended to
2688 apply and the section as a whole is intended to apply in other
2689 circumstances.
2691 It is not the purpose of this section to induce you to infringe any
2692 patents or other property right claims or to contest validity of any
2693 such claims; this section has the sole purpose of protecting the
2694 integrity of the free software distribution system, which is
2695 implemented by public license practices.  Many people have made
2696 generous contributions to the wide range of software distributed
2697 through that system in reliance on consistent application of that
2698 system; it is up to the author/donor to decide if he or she is willing
2699 to distribute software through any other system and a licensee cannot
2700 impose that choice.
2702 This section is intended to make thoroughly clear what is believed to
2703 be a consequence of the rest of this License.
2705 @item
2706 If the distribution and/or use of the Program is restricted in
2707 certain countries either by patents or by copyrighted interfaces, the
2708 original copyright holder who places the Program under this License
2709 may add an explicit geographical distribution limitation excluding
2710 those countries, so that distribution is permitted only in or among
2711 countries not thus excluded.  In such case, this License incorporates
2712 the limitation as if written in the body of this License.
2714 @item
2715 The Free Software Foundation may publish revised and/or new versions
2716 of the General Public License from time to time.  Such new versions will
2717 be similar in spirit to the present version, but may differ in detail to
2718 address new problems or concerns.
2720 Each version is given a distinguishing version number.  If the Program
2721 specifies a version number of this License which applies to it and ``any
2722 later version'', you have the option of following the terms and conditions
2723 either of that version or of any later version published by the Free
2724 Software Foundation.  If the Program does not specify a version number of
2725 this License, you may choose any version ever published by the Free Software
2726 Foundation.
2728 @item
2729 If you wish to incorporate parts of the Program into other free
2730 programs whose distribution conditions are different, write to the author
2731 to ask for permission.  For software which is copyrighted by the Free
2732 Software Foundation, write to the Free Software Foundation; we sometimes
2733 make exceptions for this.  Our decision will be guided by the two goals
2734 of preserving the free status of all derivatives of our free software and
2735 of promoting the sharing and reuse of software generally.
2737 @iftex
2738 @heading NO WARRANTY
2739 @end iftex
2740 @ifinfo
2741 @center NO WARRANTY
2742 @end ifinfo
2744 @item
2745 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2746 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2747 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2748 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2749 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2750 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2751 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2752 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2753 REPAIR OR CORRECTION.
2755 @item
2756 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2757 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2758 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2759 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2760 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2761 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2762 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2763 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2764 POSSIBILITY OF SUCH DAMAGES.
2765 @end enumerate
2767 @iftex
2768 @heading END OF TERMS AND CONDITIONS
2769 @end iftex
2770 @ifinfo
2771 @center END OF TERMS AND CONDITIONS
2772 @end ifinfo
2774 @page
2775 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2777   If you develop a new program, and you want it to be of the greatest
2778 possible use to the public, the best way to achieve this is to make it
2779 free software which everyone can redistribute and change under these terms.
2781   To do so, attach the following notices to the program.  It is safest
2782 to attach them to the start of each source file to most effectively
2783 convey the exclusion of warranty; and each file should have at least
2784 the ``copyright'' line and a pointer to where the full notice is found.
2786 @smallexample
2787 @var{one line to give the program's name and a brief idea of what it does.}
2788 Copyright (C) @var{yyyy}  @var{name of author}
2790 This program is free software; you can redistribute it and/or modify
2791 it under the terms of the GNU General Public License as published by
2792 the Free Software Foundation; either version 2 of the License, or
2793 (at your option) any later version.
2795 This program is distributed in the hope that it will be useful,
2796 but WITHOUT ANY WARRANTY; without even the implied warranty of
2797 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2798 GNU General Public License for more details.
2800 You should have received a copy of the GNU General Public License along
2801 with this program; if not, write to the Free Software Foundation, Inc.,
2802 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2803 @end smallexample
2805 Also add information on how to contact you by electronic and paper mail.
2807 If the program is interactive, make it output a short notice like this
2808 when it starts in an interactive mode:
2810 @smallexample
2811 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2812 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2813 This is free software, and you are welcome to redistribute it
2814 under certain conditions; type `show c' for details.
2815 @end smallexample
2817 The hypothetical commands @samp{show w} and @samp{show c} should show
2818 the appropriate parts of the General Public License.  Of course, the
2819 commands you use may be called something other than @samp{show w} and
2820 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2821 suits your program.
2823 You should also get your employer (if you work as a programmer) or your
2824 school, if any, to sign a ``copyright disclaimer'' for the program, if
2825 necessary.  Here is a sample; alter the names:
2827 @example
2828 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2829 `Gnomovision' (which makes passes at compilers) written by James Hacker.
2831 @var{signature of Ty Coon}, 1 April 1989
2832 Ty Coon, President of Vice
2833 @end example
2835 This General Public License does not permit incorporating your program into
2836 proprietary programs.  If your program is a subroutine library, you may
2837 consider it more useful to permit linking proprietary applications with the
2838 library.  If this is what you want to do, use the GNU Library General
2839 Public License instead of this License.
2842 @node Concept Index,  , GNU General Public License, Top
2843 @comment  node-name,  next,  previous,  up
2844 @unnumbered Index
2846 @printindex cp
2848 @bye