muse-html: Add muse-xhtml-style-sheet.
[muse-el.git] / muse.texi
blob2981492a4e339fbe4de94dc942023dd014d78e19
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.
17 Copyright (C) 2004, 2005 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 (to
164 be offered again as an optional module). CamelCase words are no longer
165 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 @smallexample
197 deb http://www.mwolson.org/debian/ ./
198 @end smallexample
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 @smallexample
234 tla register-archive -f http://www.mwolson.org/archives/2005
235 @end smallexample
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]]}.
387 @node Keystroke Summary, Markup Rules, Projects, Top
388 @comment  node-name,  next,  previous,  up
389 @chapter Keys Used in Muse Mode
390 @cindex keystrokes
392 This is a summary of keystrokes available in every Muse buffer.
394 @table @kbd
396 @item C-c C-a (`muse-index')
397 Display an index of all known Muse pages.
399 @item C-c C-b (`muse-browse-result')
400 Show the published result of this page.
402 @item C-c C-e (`muse-edit-link-at-point')
403 Edit link at point.
405 @item C-c C-f (`muse-project-find-file'), also C-c C-v
406 Open another Muse page.  Prompt for the name.
408 @item C-c C-l (`font-lock-mode')
409 Highlight/refresh the current buffer.
411 @item C-c C-p (`muse-project-publish')
412 Publish any Muse pages that have changed.
414 @item C-c C-v (`muse-project-find-file'), also C-c C-f
415 Open another Muse page.  Prompt for the name.
417 @item C-c = (`muse-what-changed')
418 Diff this page against the last backup version.
420 @item C-c TAB (`muse-insert-tag')
421 Insert a tag interactively.
423 @item TAB
424 Move to the next Wiki reference.
426 @item S-TAB
427 Move to the previous Wiki reference.
429 @end table
432 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
433 @comment  node-name,  next,  previous,  up
434 @chapter Rules for Using Markup
435 @cindex markup
437 A Muse document uses special, contextual markup rules to determine how
438 to format the output result.  For example, if a paragraph is indented,
439 Muse assumes it should be quoted.
441 There are not too many markup rules, and all of them strive to be as
442 simple as possible so that you can focus on document creation, rather
443 than formatting.
445 @menu
446 * Paragraphs::                  Paragraphs: centering and quoting.
447 * Headings::                    Levels of headings.
448 * Directives::                  Directives at the beginning of a
449                                   document.
450 * Emphasizing Text::            Bold, italicized, and underlined text.
451 * Footnotes::                   Making notes to be shown at the end.
452 * Verse::                       Indicating poetic stanzas.
453 * Lists::                       Lists of items.
454 * Tables::                      Generation of data tables.
455 * Explicit Links::              Hyperlinks and email addresses with
456                                   descriptions.
457 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
458                                   links.
459 * Images::                      Publishing and displaying images.
460 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
461 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
462                                   for extensibility.
463 * Comments::                    Lines to omit from published output.
464 @end menu
466 @node Paragraphs, Headings, Markup Rules, Markup Rules
467 @comment  node-name,  next,  previous,  up
468 @section Paragraphs: centering and quoting
469 @cindex paragraphs
471 Paragraphs in Muse must be separated by a blank line.
473 @cindex paragraphs, centered
474 @strong{Centered paragraphs and quotations}
476 A line that begins with six or more columns of whitespace (either tabs
477 or spaces) indicates a centered paragraph.
479 @cindex paragraphs, quoted
480 @cindex quotations
481 But if a line begins with whitespace, though less than six columns, it
482 indicates a quoted paragraph.
484 @cindex examples
485 @cindex monospace, rendering blocks
486 @cindex HTML, rendering blocks in monospace
487 @strong{Literal paragraphs}
489 The @verb{|<example>|} tag is used for examples, where whitespace should
490 be preserved, the text rendered in monospace, and any characters special
491 to the output style escaped.
493 @cindex literal text
494 @cindex HTML, inserting a raw block
495 There is also the @verb{|<literal>|} tag, which causes a marked block to
496 be entirely left alone.  This can be used for inserting a hand-coded
497 HTML blocks into HTML output, for example.
499 @node Headings, Directives, Paragraphs, Markup Rules
500 @comment  node-name,  next,  previous,  up
501 @section Levels of headings
502 @cindex headings
504 A heading becomes a chapter or section in printed output -- depending on
505 the style.  To indicate a heading, start a new paragraph with one or
506 more asterices, followed by a space and the heading title.  Then begin
507 another paragraph to enter the text for that section.
509 All levels of headings will be published.  Most publishing styles only
510 distinguish the between the first 4 levels, however.
512 @example
513 * First level
515 ** Second level
517 *** Third level
519 **** Fourth level
520 @end example
522 @node Directives, Emphasizing Text, Headings, Markup Rules
523 @comment  node-name,  next,  previous,  up
524 @section Directives at the beginning of a document
525 @cindex directives
527 Directives are lines beginning with the @samp{#} character that come
528 before any paragraphs or sections in the document.  Directives are of
529 the form ``#directive content of directive''.  You can use any
530 combination of uppercase and lowercase letters for directives, even if
531 the directive is not in the list below.
533 The @code{muse-publishing-directive} function may be used in header and
534 footer text to access directives.  For example, to access the
535 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
537 The following is a list of directives that Muse uses.
539 @table @code
540 @cindex #author
541 @item #author
542 The author of this document.
544 If this is not specified, Muse will attempt to figure it out from the
545 @code{user-full-name} variable.
547 @cindex #date
548 @item #date
549 The date that the document was originally published.
551 This is used by publishing styles that are able to embed the date
552 information.
554 @cindex #desc
555 @item #desc
556 A short description of this document.
558 This is used by the @code{journal} publishing style to embed information
559 inside of an RSS/RDF feed.
561 @cindex #title
562 @item #title
563 The title of this document.
565 If this is not specified, the name of the file is used.
567 @end table
569 @node Emphasizing Text, Footnotes, Directives, Markup Rules
570 @comment  node-name,  next,  previous,  up
571 @section Bold, italicized, and underlined text
572 @cindex emphasizing text
573 @cindex underlining text
574 @cindex italicizing text
575 @cindex verbatim text
576 @cindex monospace, rendering words
578 To emphasize text, surround it with certain specially recognized
579 characters.
581 @example
582 *emphasis*
583 **strong emphasis**
584 ***very strong emphasis***
585 _underlined_
586 =verbatim and monospace=
587 @end example
589 @cindex WYSIWYG
590 While editing a Muse document in Muse mode, these forms of emphasis will
591 be highlighted in a WYSIWYG manner.  Each of these forms may span
592 multiple lines.
594 Verbatim text will be colored as gray by default.  To change this,
595 customize @code{muse-verbatim-face}.
597 @node Footnotes, Verse, Emphasizing Text, Markup Rules
598 @comment  node-name,  next,  previous,  up
599 @section Making notes to be shown at the end
600 @cindex footnotes
602 A footnote reference is simply a number in square brackets.  To define
603 the footnote, place this definition at the bottom of your file.
604 @samp{footnote-mode} can be used to greatly facilitate the creation of
605 these kinds of footnotes.
607 Footnotes are defined by the same number in brackets occurring at the
608 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
609 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
610 the point of insertion.
612 @node Verse, Lists, Footnotes, Markup Rules
613 @comment  node-name,  next,  previous,  up
614 @section Indicating poetic stanzas
615 @cindex verses
616 @cindex poetry
618 Poetry requires that whitespace be preserved, but without resorting to
619 monospace.  To indicate this, use the following markup, reminiscent of
620 email quotations.
622 @example
623 > A line of Emacs verse;
624 >   forgive its being so terse.
625 @end example
627 You can also use the @verb{|<verse>|} tag, if you prefer.
629 @example
630 <verse>
631 A line of Emacs verse;
632   forgive its being so terse.
633 </verse>
634 @end example
636 @cindex verses, multiple stanzas
637 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
638 follows.
640 @example
641 <verse>
642 A line of Emacs verse;
643   forgive its being so terse.
645 In terms of terse verse,
646   you could do worse.
647 </verse>
648 @end example
650 @node Lists, Tables, Verse, Markup Rules
651 @comment  node-name,  next,  previous,  up
652 @section Lists of items
653 @cindex lists
655 Lists are given using special characters at the beginning of a line.
656 Whitespace must occur before bullets or numbered items, to distinguish
657 from the possibility of those characters occurring in a real sentence.
659 @cindex lists, bullets
660 These are rendered as a bullet list.
662 @example
663 - bullet item one
664 - bullet item two
665 @end example
667 @cindex lists, enumerated
668 An enumerated list follows.
670 @example
671 1. Enum item one
672 2. Enum item two
673 @end example
675 @cindex lists, definitions
676 Here is a definition list.
678 @example
679 Term1 ::
680   This is a first definition
681   And it has two lines;
682   no, make that three.
684 Term2 ::
685   This is a second definition
686 @end example
688 @node Tables, Explicit Links, Lists, Markup Rules
689 @comment  node-name,  next,  previous,  up
690 @section Generation of data tables
691 @cindex tables
693 @cindex tables, simple
694 Only very simple tables are supported.  The syntax is as follows.
696 @example
697 Double bars  || Separate header fields
699 Single bars   | Separate body fields
700 Here are more | body fields
702 Triple bars ||| Separate footer fields
703 @end example
705 Some publishing styles require header fields to come first, then footer
706 fields, and then the body fields.  You can use any order for these
707 sections that you like, and Muse will re-order them for you at
708 publish-time.
710 @node Explicit Links, Implicit Links, Tables, Markup Rules
711 @comment  node-name,  next,  previous,  up
712 @section Hyperlinks and email addresses with descriptions
713 @cindex links, explicit
715 A hyperlink can reference a URL, or another page within a Muse
716 project.  In addition, descriptive text can be specified, which should
717 be displayed rather than the link text in output styles that supports
718 link descriptions.  The syntax is as follows.
720 @example
721 [[link target][link description]]
722 [[link target without description]]
723 @end example
725 Thus, the current maintainer's homepage for Muse can be found
726 @samp{[[http://www.mwolson.org/projects/MuseMode.html][here]]},
727 or at @samp{[[http://www.mwolson.org/projects/MuseMode.html]]}.
729 @node Implicit Links, Images, Explicit Links, Markup Rules
730 @comment  node-name,  next,  previous,  up
731 @section Bare URLs, WikiNames, and InterWiki links
732 @cindex links, implicit
733 @cindex links, raw
734 @cindex URLs
735 @cindex Email addresses
737 A URL or email address encountered in the input text is published as a
738 hyperlink.  These kind of links are called @dfn{implicit links} because
739 they are not separated from the rest of the Muse document in any way.
741 @cindex WikiNames
742 If the @command{muse-wiki} module is loaded, another form of implicit
743 link will be made available.  WikiNames, which are typed in camelcase,
744 will be highlighted and published as links, provided that the file they
745 refer to exists.
747 @cindex InterWiki links
748 @cindex inter-project links
749 The @command{muse-wiki} module also allows for InterWiki links.  These
750 are similar to WikiWords, but they specify both the project and page of
751 a file.  The names of your project entries in @code{muse-project-alist}
752 will be used as InterWiki names by default.  Several examples follow.
754 @example
755 Blog::DocumentingMuse
756 Projects#MuseMode
757 Website
758 @end example
760 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
761 the project name, and @samp{DocumentingMuse} is the page name.  In the
762 second example, @samp{#} is the interwiki delimiter.  If the name of a
763 project occurs by itself in text, like the third case, it will be
764 colorized and published as a link to the default page of the given
765 project.
767 Customization of interwiki links may be accomplished by editing the
768 @code{muse-wiki-interwiki-alist} option.
770 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
771 @comment  node-name,  next,  previous,  up
772 @section Publishing and displaying images
773 @cindex images
774 @cindex links, with images
775 @strong{Image links}
777 Links to images may be used in either the target or the description, or
778 both.  Thus, the following code will publish as a clickable image that
779 points to @url{http://www.mwolson.org/}.
781 @smallexample
782 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
783 @end smallexample
785 @cindex images, displaying
786 @cindex images, inlined
787 @cindex images, local
788 If a link to a locally-available image is encountered in the link
789 description, Muse mode will attempt to display it if your version of
790 Emacs permits this.  The following example will display correctly and
791 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
792 exists in the @file{../pics/} directory.
794 @smallexample
795 [[TestPage][../pics/TestLogo.png]]
796 @end smallexample
798 @cindex images, without a description
799 An image link is not required to have a description.  The link
800 @samp{[[../myimage.png]]} will display and publish as expected.
802 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
803 @comment  node-name,  next,  previous,  up
804 @section Inserting a horizontal line or anchor
806 @cindex horizontal rules
807 @cindex dashes
808 @strong{Horizontal Rules}
810 Four or more dashes indicate a horizontal rule.  Be sure to put blank
811 lines around it, or it will be considered part of the proceeding or
812 following paragraph!
814 @cindex anchors
815 @cindex links, with target on same page
816 @strong{Anchors}
818 If you begin a line with "#anchor" -- where "anchor" can be any word
819 that doesn't contain whitespace -- it defines an anchor at that point
820 into the document.  This point can be referenced using "page#anchor" as
821 the target in a Muse link.
823 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
824 @comment  node-name,  next,  previous,  up
825 @section Evaluating Emacs Lisp code in documents for extensibility
826 @cindex lisp, embedded
828 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
829 which is the only Muse tag supported in a style's header and footer
830 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
831 text you wish.  The inserted output will get marked up, if the
832 @verb{|<lisp>|} tag appears within the main text of the document.
834 @smallexample
835 <lisp>(concat "This form gets " "inserted")</lisp>
836 @end smallexample
838 @cindex lisp, and insert command
839 Note that you should not use the @code{insert} command within a set of
840 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
841 tags will be automatically inserted into the document.
843 @node Comments, , Embedded Lisp, Markup Rules
844 @comment  node-name,  next,  previous,  up
845 @section Lines to omit from published output
846 @cindex comments
847 @cindex publishing, omitting lines
849 Use the following syntax to indicate a comment.  Comments will not be
850 published.
852 @smallexample
853 ; Comment text goes here.
854 @end smallexample
856 That is, only a semi-colon at the beginning of a line, followed by a
857 literal space, will cause that line to be treated as a comment.
859 @node Publishing Styles, Getting Help and Reporting Bugs, Markup Rules, Top
860 @comment  node-name,  next,  previous,  up
861 @chapter Publishing Various Types of Documents
862 @cindex publishing styles
864 One of the principle features of Muse is the ability to publish a simple
865 input text to a variety of different output styles.  Muse also makes it
866 easy to create new styles, or derive from an existing style.
868 @menu
869 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
870 * Book::                        Publishing entries into a compilation.
871 * DocBook::                     Publishing in DocBook XML form.
872 * HTML::                        Publishing in HTML or XHTML form.
873 * Journal::                     Keeping a journal or blog.
874 * LaTeX::                       Publishing LaTeX documents.
875 * Poem::                        Publish a poem to LaTex or PDF.
876 * Texinfo::                     Publish entries to Texinfo format or PDF.
877 * Common Elements::             Common functionality shared by styles.
878 * Deriving Styles::             Deriving a new style from an existing
879                                   one.
880 @end menu
882 @node Blosxom, Book, Publishing Styles, Publishing Styles
883 @comment  node-name,  next,  previous,  up
884 @section Integrating Muse and pyblosxom.cgi
885 @cindex blog, one-file-per-entry style
887 The Blosxom publishing style publishes a tree of categorised files to a
888 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
889 In other words, each blog entry corresponds with one file.
891 @menu
892 * Blosxom Requirements::        Other tools needed to the Blosxom style.
893 * Blosxom Entries::             Format of a Blosxom entry and automation.
894 * Blosxom Options::             Blosxom styles and options provided.
895 @end menu
897 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
898 @comment  node-name,  next,  previous,  up
899 @subsection Other tools needed to the Blosxom style
901 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
902 installed on a machine that you have upload access to.
904 The following additional components are required in order to make the
905 date of blog entries display as something sensible.
907 @enumerate
908 @item
909 A script to gather date directives from the entire blog tree into a
910 single file.  The file must associate a blog entry with a date.
912 @item
913 A plugin for (py)blosxom that reads this file.
914 @end enumerate
916 These 2 things are provided for @command{pyblosxom.cgi} in the
917 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
918 former service, while @file{hardcodedates.py} provides the latter
919 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
920 script will be found/written.
922 Here is a sample listing from my @file{timestamps} file, which maps
923 each file to a date.  This can really be in any format, as long as your
924 date-gathering script and your plugin can both understand it.
926 @example
927 2005-04-01-14-16 personal/paper_cranes
928 2005-03-21 personal/spring_break_over
929 2004-10-24 personal/finished_free_culture
930 @end example
932 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
933 @comment  node-name,  next,  previous,  up
934 @subsection Format of a Blosxom entry and automation
936 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
937 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
938 plus whatever normal content is desired.
940 The date directive is not used directly by @command{pyblosxom.cgi} or
941 this program.  You need to have the two additional items from the former
942 section to make use of this feature.
944 There is a function called @code{muse-blosxom-new-entry} that will
945 automate the process of making a new blog entry.  To make use of it, do
946 the following.
948 @itemize @bullet
949 @item
950 Customize @code{muse-blosxom-base-directory} to the location that your
951 blog entries are stored.
953 @item
954 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
955 use the following code to assign this function to @kbd{C-c p l'}.
957 @smallexample
958 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
959 @end smallexample
961 @item
962 You should create your directory structure ahead of time under your base
963 directory.  These directories, which correspond with category names, may
964 be nested.
966 @item
967 When you enter this key sequence, you will be prompted for the category
968 of your entry and its title.  Upon entering this information, a new file
969 will be created that corresponds with the title, but in lowercase
970 letters and having special characters converted to underscores.  The
971 title and date directives will be inserted automatically.
972 @end itemize
974 @node Blosxom Options, , Blosxom Entries, Blosxom
975 @comment  node-name,  next,  previous,  up
976 @subsection Blosxom styles and options provided
978 The following styles and options are available in the Blosxom publishing
979 style.
981 @subsubheading Styles provided
983 @table @code
985 @cindex publishing styles, blosxom-html
986 @item blosxom-html
987 Publish Blosxom entries in HTML form.
989 @cindex publishing styles, blosxom-xhtml
990 @item blosxom-xhtml
991 Publish Blosxom entries in XHTML form.
993 @end table
995 @subsubheading Options provided
997 @table @code
999 @item muse-blosxom-extension
1000 Default file extension for publishing Blosxom files.
1002 @item muse-blosxom-header
1003 Header used for publishing Blosxom files.
1005 This may be text or a filename.
1007 @item muse-blosxom-footer
1008 Footer used for publishing Blosxom files.
1010 This may be text or a filename.
1012 @item muse-blosxom-base-directory
1013 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1015 This is the top-level directory where your blog entries may be found
1016 locally.
1018 @end table
1020 @node Book, DocBook, Blosxom, Publishing Styles
1021 @comment  node-name,  next,  previous,  up
1022 @section Publishing entries into a compilation
1024 This publishing style is used to output ``books'' in LaTeX or PDF
1025 format.
1027 Each page will become a separate chapter in the book, unless the style
1028 keyword @option{:nochapters} is used, in which case they are all run
1029 together as if one giant chapter.
1031 You will need to call the @code{muse-book-publish-project} function in
1032 order to publish this style.  An example of this may be found in John
1033 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
1035 @subsubheading Styles provided
1037 @table @code
1039 @cindex publishing styles, book-latex
1040 @item book-latex
1041 Publish a book in LaTeX form.  The header and footer are different than
1042 the normal LaTeX publishing mode.
1044 @cindex publishing styles, book-pdf
1045 @item book-pdf
1046 Publish a book in PDF form.  The header and footer are different than
1047 the normal PDF publishing mode.
1049 @end table
1051 @subsubheading Options provided
1053 @table @code
1055 @item muse-book-before-publish-hook
1056 A hook run in the book buffer before it is marked up.
1058 @item muse-book-after-publish-hook
1059 A hook run in the book buffer after it is marked up.
1061 @item muse-book-latex-header
1062 Header used for publishing books to LaTeX.
1064 This may be text or a filename.
1066 @item muse-book-latex-footer
1067 Footer used for publishing books to LaTeX.
1069 This may be text or a filename.
1071 @end table
1073 @node DocBook, HTML, Book, Publishing Styles
1074 @comment  node-name,  next,  previous,  up
1075 @section Publishing in DocBook XML form
1077 This publishing style is used to generate DocBook XML files.
1079 @subsubheading Styles provided
1081 @table @code
1083 @cindex publishing styles, docbook
1084 @item docbook
1086 @end table
1088 @subsubheading Options provided
1090 @table @code
1092 @item muse-docbook-extension
1093 Default file extension for publishing DocBook XML files.
1095 @item muse-docbook-header
1096 Header used for publishing DocBook XML files.
1098 This may be text or a filename.
1100 @item muse-docbook-footer
1101 Footer used for publishing DocBook XML files.
1103 This may be text or a filename.
1105 @item muse-docbook-markup-regexps
1106 List of markup rules for publishing a Muse page to DocBook XML.
1108 @item muse-docbook-markup-functions
1109 An alist of style types to custom functions for that kind of text.
1111 @item muse-docbook-markup-strings
1112 Strings used for marking up text.
1114 These cover the most basic kinds of markup, the handling of which
1115 differs little between the various styles.
1117 @item muse-docbook-markup-specials
1118 A table of characters which must be represented specially.
1120 @item muse-docbook-encoding-default
1121 The default Emacs buffer encoding to use in published files.
1122 This will be used if no special characters are found.
1124 @item muse-docbook-charset-default
1125 The default DocBook XML charset to use if no translation is
1126 found in @code{muse-docbook-encoding-map}.
1128 @item muse-docbook-encoding-map
1129 An alist mapping emacs coding systems to appropriate DocBook charsets.
1130 Use the base name of the coding system (i.e. without the -unix).
1132 @end table
1134 @node HTML, Journal, DocBook, Publishing Styles
1135 @comment  node-name,  next,  previous,  up
1136 @section Publishing in HTML or XHTML form
1138 This publishing style is capable of producing HTML or XHTML documents.
1140 @subsubheading Styles provided
1142 @table @code
1144 @cindex publishing styles, html
1145 @item html
1146 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1148 @item xhtml
1149 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1151 @end table
1153 @subsubheading Options provided
1155 If an HTML option does not have a corresponding XHTML option, it will
1156 be used for both of these publishing styles.
1158 @table @code
1160 @item muse-html-extension
1161 Default file extension for publishing HTML files.
1163 @item muse-xhtml-extension
1164 Default file extension for publishing XHTML files.
1166 @item muse-html-style-sheet
1167 Store your stylesheet definitions here.
1169 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1170 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1171 @verb{|<lisp>|} markup tags.
1173 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1174 properly.
1176 @item muse-html-header
1177 Header used for publishing HTML files.
1179 This may be text or a filename.
1181 @item muse-html-footer
1182 Footer used for publishing HTML files.
1184 This may be text or a filename.
1186 @item muse-xhtml-header
1187 Header used for publishing XHTML files.
1189 This may be text or a filename.
1191 @item muse-xhtml-footer
1192 Footer used for publishing XHTML files.
1194 This may be text or a filename.
1196 @item muse-html-anchor-on-word
1197 When true, anchors surround the closest word.
1199 This allows you to select them in a browser (i.e. for pasting), but has
1200 the side-effect of marking up headers in multiple colors if your header
1201 style is different from your link style.
1203 @item muse-html-table-attributes
1204 The attribute to be used with HTML @verb{|<table>|} tags.
1206 Note that since Muse supports direct insertion of HTML tags, you can
1207 easily create any kind of table you want, as long as each line begins at
1208 column 0 (to prevent it from being blockquoted).
1210 @item muse-html-markup-regexps
1211 List of markup rules for publishing a Muse page to HTML.
1213 @item muse-html-markup-functions
1214 An alist of style types to custom functions for that kind of text.
1216 @item muse-html-markup-strings
1217 Strings used for marking up text as HTML.
1219 These cover the most basic kinds of markup, the handling of which
1220 differs little between the various styles.
1222 @item muse-xhtml-markup-strings
1223 Strings used for marking up text as XHTML.
1225 These cover the most basic kinds of markup, the handling of which
1226 differs little between the various styles.
1228 @item muse-html-markup-tags
1229 A list of tag specifications, for specially marking up HTML.
1230 @xref{muse-publish-markup-tags}, for more information.
1232 @item muse-html-markup-specials
1233 A table of characters which must be represented specially.  By default,
1234 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1236 @item muse-html-meta-http-equiv
1237 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1239 @item muse-html-meta-content-type
1240 The content type used for the HTML @verb{|<meta>|} tag.
1242 If you are striving for XHTML 1.1 compliance, you may want to change
1243 this to ``application/xhtml+xml''.
1245 @item muse-html-meta-content-encoding
1246 The charset to append to the HTML @verb{|<meta>|} tag.
1248 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1249 and determine the HTML charset from emacs's coding.  If set to a string,
1250 this string will be used to force a particular charset.
1252 @item muse-html-charset-default
1253 The default HTML meta charset to use if no translation is found in
1254 @code{muse-html-encoding-map}.
1256 @item muse-html-encoding-default
1257 The default Emacs buffer encoding to use in published files.
1258 This will be used if no special characters are found.
1260 @item muse-html-encoding-map
1261 An alist mapping emacs coding systems to appropriate HTML charsets.
1262 Use the base name of the coding system (i.e. without the -unix).
1264 @end table
1266 @node Journal, LaTeX, HTML, Publishing Styles
1267 @comment  node-name,  next,  previous,  up
1268 @section Keeping a journal or blog
1269 @cindex journal
1270 @cindex blog, journal style
1272 The module facilitates the keeping and publication of a journal.  When
1273 publishing to HTML, it assumes the form of a web log, or blog.
1275 The input format for each entry is as follows.
1277 @example
1278 * 20040317: Title of entry
1280 text for the entry.
1282 <qotd>
1283 "You know who you are. It comes down to a simple gut check: You
1284 either love what you do or you don't. Period." -- P. Bronson
1285 </qotd>
1286 @end example
1288 The "qotd", or Quote of the Day, is entirely optional.  When generated
1289 to HTML, this entry is rendered as the following.
1291 @example
1292 <div class="entry">
1293   <div class="entry-qotd">
1294     <h3>Quote of the Day:</h3>
1295     <p>"You know who you are. It comes down to a simple gut
1296       check: You either love what you do or you don't. Period."
1297       -- P. Bronson</p>
1298   </div>
1299   <div class="entry-body">
1300     <div class="entry-head">
1301       <div class="entry-date">
1302         <span class="date">March 17, 2004</span>
1303       </div>
1304       <div class="entry-title">
1305         <h2>Title of entry</h2>
1306       </div>
1307     </div>
1308     <div class="entry-text">
1309       <p>Text for the entry.</p>
1310     </div>
1311   </div>
1312 </div>
1313 @end example
1315 The plurality of "div" tags makes it possible to display the entries in
1316 any form you wish, using a CSS style.
1318 Also, an .RDF file can be generated from your journal by publishing it
1319 with the "rdf" style.  It uses the first two sentences of the first
1320 paragraph of each entry as its "description", and auto-generates tags
1321 for linking to the various entries.
1323 @subsubheading Styles provided
1325 @table @code
1327 @cindex publishing styles, journal-html
1328 @item journal-html
1329 Publish journal entries as an HTML document.
1331 @cindex publishing styles, journal-xhtml
1332 @item journal-xhtml
1333 Publish journal entries as an XHTML document.
1335 @cindex publishing styles, journal-latex
1336 @item journal-latex
1337 Publish journal entries as a LaTeX document.
1339 @cindex publishing styles, journal-pdf
1340 @item journal-pdf
1341 Publish journal entries as a PDF document.
1343 @cindex publishing styles, journal-book-latex
1344 @item journal-book-latex
1345 Publish journal entries as a LaTeX book.
1347 @cindex publishing styles, journal-book-pdf
1348 @item journal-book-pdf
1349 Publish journal entries as a PDF book.
1351 @cindex publishing styles, journal-rdf
1352 @cindex publishing styles, RSS 1.0
1353 @item journal-rdf
1354 Publish journal entries as an RDF file (RSS 1.0).
1356 @cindex publishing styles, journal-rss
1357 @cindex publishing styles, RSS 2.0
1358 @item journal-rss
1359 Publish journal entries as an RSS file (RSS 2.0).
1361 @end table
1363 @subsubheading Options provided
1365 @table @code
1367 @item muse-journal-heading-regexp
1368 A regexp that matches a journal heading.
1370 Paren group 1 is the ISO date, group 2 is the optional category, and
1371 group 3 is the optional heading for the entry.
1373 @item muse-journal-date-format
1374 Date format to use for journal entries.
1376 @item muse-journal-html-heading-regexp
1377 A regexp that matches a journal heading from an HTML document.
1379 Paren group 1 is the ISO date, group 2 is the optional category, and
1380 group 3 is the optional heading for the entry.
1382 @item muse-journal-html-entry-template
1383 Template used to publish individual journal entries as HTML.
1385 @item muse-journal-latex-section
1386 Template used to publish a LaTeX section.
1388 @item muse-journal-latex-subsection
1389 Template used to publish a LaTeX subsection.
1391 @item muse-journal-latex-markup-tags
1392 A list of tag specifications, for specially marking up LaTeX.
1394 @xref{muse-publish-markup-tags}, for more information.
1396 @item muse-journal-rdf-extension
1397 Default file extension for publishing RDF (RSS 1.0) files.
1399 @item muse-journal-rdf-base-url
1400 The base URL of the website referenced by the RDF file.
1402 @item muse-journal-rdf-header
1403 Header used for publishing RDF (RSS 1.0) files.
1405 This may be text or a filename.
1407 @item muse-journal-rdf-footer
1408 Footer used for publishing RDF (RSS 1.0) files.
1410 This may be text or a filename.
1412 @item muse-journal-rdf-date-format
1413 Date format to use for RDF entries.
1415 @item muse-journal-rdf-entry-template
1416 Template used to publish individual journal entries as RDF.
1418 @item muse-journal-rdf-summarize-entries
1419 If non-nil, include only summaries in the RDF file, not the full data.
1421 @item muse-journal-rss-extension
1422 Default file extension for publishing RSS 2.0 files.
1424 @item muse-journal-rss-base-url
1425 The base URL of the website referenced by the RSS file.
1427 @item muse-journal-rss-header
1428 Header used for publishing RSS 2.0 files.
1430 This may be text or a filename.
1432 @item muse-journal-rss-footer
1433 Footer used for publishing RSS 2.0 files.
1435 This may be text or a filename.
1437 @item muse-journal-rss-date-format
1438 Date format to use for RSS 2.0 entries.
1440 @item muse-journal-rss-entry-template
1441 Template used to publish individual journal entries as RSS 2.0.
1443 @item muse-journal-rss-enclosure-types-alist
1444 File types that are accepted as RSS enclosures.
1446 This is an alist that maps file extension to content type.
1448 Useful for podcasting.
1450 @item muse-journal-rss-summarize-entries
1451 If non-nil, include only summaries in the RSS file, not the full data.
1453 Many RSS subscribers find this annoying.
1455 @item muse-journal-rss-markup-regexps
1456 List of markup rules for publishing a Muse journal page to RSS.
1458 For more information on the structure of this list,
1459 @xref{muse-publish-markup-regexps}.
1461 @item muse-journal-rss-markup-functions
1462 An alist of style types to custom functions for that kind of text.
1464 For more on the structure of this list,
1465 @xref{muse-publish-markup-functions}.
1467 @end table
1469 @node LaTeX, Poem, Journal, Publishing Styles
1470 @comment  node-name,  next,  previous,  up
1471 @section Publishing LaTeX documents
1473 This publishing style is capable of producing LaTeX or PDF documents.
1475 If you wish to publish PDF documents, you will need to have a good TeX
1476 installation.  For Debian, this can be accomplished by installing the
1477 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1479 @subsubheading Styles provided
1481 @table @code
1483 @cindex publishing styles, latex
1484 @item latex
1485 Publish a LaTeX document.
1487 @cindex publishing styles, pdf
1488 @item pdf
1489 Publish a PDF document, using an external LaTeX document conversion
1490 tool.
1492 @cindex publishing styles, latexcjk
1493 @item latexcjk
1494 Publish a LaTeX document with CJK (Chinese) encodings.
1496 @cindex publishing styles, pdfcjk
1497 @item pdfcjk
1498 Publish a PDF document with CJK (Chinese) encodings, using an external
1499 LaTeX document conversion tool.
1501 @end table
1503 @subsubheading Options provided
1505 @table @code
1507 @item muse-latex-extension
1508 Default file extension for publishing LaTeX files.
1510 @item muse-latex-pdf-extension
1511 Default file extension for publishing LaTeX files to PDF.
1513 @item muse-latex-header
1514 Header used for publishing LaTeX files.
1516 This may be text or a filename.
1518 @item muse-latex-footer
1519 Footer used for publishing LaTeX files.
1521 This may be text or a filename.
1523 @item muse-latexcjk-header
1524 Header used for publishing LaTeX files (CJK).
1526 This may be text or a filename.
1528 @item muse-latexcjk-footer
1529 Footer used for publishing LaTeX files (CJK).
1531 This may be text or a filename.
1533 @item muse-latex-markup-regexps
1534 List of markup regexps for identifying regions in a Muse page.
1536 For more on the structure of this list,
1537 @xref{muse-publish-markup-regexps}.
1539 @item muse-latex-markup-functions
1540 An alist of style types to custom functions for that kind of text.
1542 For more on the structure of this list,
1543 @xref{muse-publish-markup-functions}.
1545 @item muse-latex-markup-strings
1546 Strings used for marking up text.
1548 These cover the most basic kinds of markup, the handling of which
1549 differs little between the various styles.
1551 @item muse-latexcjk-encoding-map
1552 An alist mapping emacs coding systems to appropriate CJK codings.
1553 Use the base name of the coding system (ie, without the -unix).
1555 @item muse-latexcjk-encoding-default
1556 The default Emacs buffer encoding to use in published files.
1558 This will be used if no special characters are found.
1560 @item muse-latex-markup-specials
1561 A table of characters which must be represented specially.
1563 @end table
1565 @node Poem, Texinfo, LaTeX, Publishing Styles
1566 @comment  node-name,  next,  previous,  up
1567 @section Publish a poem to LaTex or PDF
1569 The @code{muse-poem} module makes it easy to attractively publish and
1570 reference poems in the following format, using the "memoir" module for
1571 LaTeX publishing.  It will also markup poems for every other output
1572 style, though none are nearly as pretty.
1574 @example
1575 Title
1578 Body of poem
1581 Annotations, history, notes, etc.
1582 @end example
1584 Once a poem is written in this format, just publish it to PDF using the
1585 @code{poem-pdf} style.  To make an inlined reference to a poem that
1586 you've written -- for example, from a blog page -- there is a "poem" tag
1587 defined by this module.
1589 @example
1590 <poem title="name.of.poem.page">
1591 @end example
1593 Let's assume the template above was called @file{name.of.poem.page};
1594 then the above tag would result in this inclusion.
1596 @example
1597 ** Title
1599 > Body of poem
1600 @end example
1602 John Wiegley uses this module for publishing all of the poems on his
1603 website, which are at
1604 @uref{http://www.newartisans.com/johnw/poems.html}.
1606 @subsubheading Styles provided
1608 @table @code
1610 @cindex publishing styles, poem-latex
1611 @item poem-latex
1612 Publish a poem in LaTeX form.
1614 @cindex publishing styles, poem-pdf
1615 @item poem-pdf
1616 Publish a poem to a PDF document.
1618 @cindex publishing styles, chapbook-latex
1619 @item chapbook-latex
1620 Publish a book of poems in LaTeX form.
1622 @cindex publishing styles, chapbook-pdf
1623 @item chapbook-pdf
1624 Publish a book of poems to a PDF document.
1626 @end table
1628 @subsubheading Options provided
1630 @table @code
1632 @item muse-poem-latex-header
1633 Header used for publishing LaTeX poems.
1635 This may be text or a filename.
1637 @item muse-poem-latex-footer
1638 Footer used for publishing LaTeX files.
1640 This may be text or a filename.
1642 @item muse-poem-markup-strings
1643 Strings used for marking up poems.
1645 These cover the most basic kinds of markup, the handling of which
1646 differs little between the various styles.
1648 @item muse-chapbook-latex-header
1649 Header used for publishing a book of poems in LaTeX form.
1651 This may be text or a filename.
1653 @item muse-chapbook-latex-footer
1654 Footer used for publishing a book of poems in LaTeX form.
1656 This may be text or a filename.
1658 @item muse-poem-chapbook-strings
1659 Strings used for marking up books of poems.
1661 These cover the most basic kinds of markup, the handling of which
1662 differs little between the various styles.
1664 @end table
1666 @node Texinfo, Common Elements, Poem, Publishing Styles
1667 @comment  node-name,  next,  previous,  up
1668 @section Publish entries to Texinfo format or PDF
1670 Rules for publishing a Muse file as a Texinfo article.
1672 @subsubheading Styles provided
1674 @table @code
1676 @cindex publishing styles, texi
1677 @item texi
1678 Publish a file in Texinfo form.
1680 @cindex publishing styles, texi
1681 @item info
1682 Generate an Info file from a Muse file.
1684 @cindex publishing styles, info-pdf
1685 @item info-pdf
1686 Publish a file in PDF form.
1688 @end table
1690 @subsubheading Options provided
1692 @table @code
1694 @item muse-texinfo-process-natively
1695 If non-nil, use the Emacs `texinfmt' module to make Info files.
1697 @item muse-texinfo-extension
1698 Default file extension for publishing Texinfo files.
1700 @item muse-texinfo-info-extension
1701 Default file extension for publishing Info files.
1703 @item muse-texinfo-pdf-extension
1704 Default file extension for publishing PDF files.
1706 @item muse-texinfo-header
1707 Text to prepend to a Muse page being published as Texinfo.
1709 This may be text or a filename.
1710 It may contain @verb{|<lisp>|} markup tags.
1712 @item muse-texinfo-footer
1713 Text to append to a Muse page being published as Texinfo.
1715 This may be text or a filename.
1716 It may contain @verb{|<lisp>|} markup tags.
1718 @item muse-texinfo-markup-regexps
1719 List of markup rules for publishing a Muse page to Texinfo.
1721 For more on the structure of this list,
1722 @xref{muse-publish-markup-regexps}.
1724 @item muse-texinfo-markup-functions
1725 An alist of style types to custom functions for that kind of text.
1727 For more on the structure of this list, see
1728 @xref{muse-publish-markup-functions}.
1730 @item muse-texinfo-markup-strings
1731 Strings used for marking up text.
1733 These cover the most basic kinds of markup, the handling of which
1734 differs little between the various styles.
1736 @item muse-texinfo-markup-specials
1737 A table of characters which must be represented specially.
1739 @end table
1741 @node Common Elements, Deriving Styles, Texinfo, Publishing Styles
1742 @comment  node-name,  next,  previous,  up
1743 @section Common functionality shared by styles
1744 @cindex publishing styles, common
1746 @menu
1747 * Markup Functions::            Specifying functions to marking up text.
1748 * Markup Regexps::              Markup rules for publishing.
1749 * Markup Strings::              Strings specific to a publishing style.
1750 * Markup Tags::                 Tag specifications for special markup.
1751 * Style Elements::              Parameters used for defining styles.
1752 @end menu
1754 @node Markup Functions, Markup Regexps, , Common Elements
1755 @comment  node-name,  next,  previous,  up
1756 @subsection Specifying functions to mark up text
1757 @cindex publishing, markup functions
1759 @anchor{muse-publish-markup-functions}
1760 @code{muse-publish-markup-functions}
1762 An alist of style types to custom functions for that kind of text.
1764 This is used by publishing styles to attempt to minimize the amount of
1765 custom regexps that each has to define.  @file{muse-publish} provides
1766 rules for the most common types of markup.
1768 Each member of the list is of the following form.
1770 @smallexample
1771 (SYMBOL FUNCTION)
1772 @end smallexample
1774 @itemize @bullet
1775 @item SYMBOL
1776 Describes the type of text to associate with this rule.
1777 @code{muse-publish-markup-regexps} maps regexps to these symbols.
1779 @item FUNCTION
1780 Function to use to mark up this kind of rule if no suitable function is
1781 found through the @option{:functions} tag of the current style.
1782 @end itemize
1784 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
1785 @comment  node-name,  next,  previous,  up
1786 @subsection Markup rules for publishing
1787 @cindex publishing, markup regexps
1788 @cindex publishing, rules
1790 @anchor{muse-publish-markup-regexps}
1791 @code{muse-publish-markup-regexps}
1793 List of markup rules for publishing a page with Muse.
1795 The rules given in this variable are invoked first, followed by whatever
1796 rules are specified by the current style.
1798 Each member of the list is either a function, or a list of the following
1799 form.
1801 @smallexample
1802 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
1803 @end smallexample
1805 @itemize @bullet
1806 @item REGEXP
1807 A regular expression, or symbol whose value is a regular expression,
1808 which is searched for using `re-search-forward'.
1810 @item TEXT-BEGIN-GROUP
1811 The matching group within that regexp which denotes the beginning of the
1812 actual text to be marked up.
1814 @item REPLACEMENT-TEXT
1815 A string that will be passed to `replace-match'.
1817 If it is not a string, but a function, it will be called to determine
1818 what the replacement text should be (it must return a string).  If it is
1819 a symbol, the value of that symbol should be a string.
1820 @end itemize
1822 The replacements are done in order, one rule at a time.  Writing
1823 the regular expressions can be a tricky business.  Note that case
1824 is never ignored.  `case-fold-search' is always bound to nil
1825 while processing the markup rules.
1827 @subsubheading Publishing order
1829 This is the order that the publishing rules are consulted, by default.
1830 This may be changed by customizing @code{muse-publish-markup-regexps}.
1832 @table @code
1834 @item trailing and leading whitespace
1835 Remove trailing and leading whitespace from a file.
1837 @item directive
1838 @samp{#directive}
1840 This is only recognized at the beginning of a file.
1842 @item tag
1843 @samp{<tag>}
1845 @item comment
1846 @samp{; comment}
1848 @item anchor
1849 @samp{#anchor}
1851 @item explicit links
1852 Prevent emphasis characters in explicit links from being marked up.
1854 Don't actually publish them here, just add a special no-emphasis text
1855 property.
1857 @item word
1858 Whitespace-delimited word, possibly with emphasis characters
1860 This function is responsible for marking up emphasis and escaping some
1861 specials.
1863 @item emdash
1864 @samp{--}
1866 2-wide dash
1868 @item heading
1869 @samp{** Heading}
1871 Outline-mode style headings.
1873 @item enddots
1874 @samp{....}
1876 These are ellipses with a dot at end.
1878 @item dots
1879 @samp{...}
1881 Ellipses.
1883 @item rule
1884 @samp{----}
1886 Horizontal rule or section separator.
1888 @item fn-sep
1889 @samp{Footnotes:}
1891 beginning of footnotes section
1893 @item footnote
1894 @samp{[1]}
1896 Footnote definition or reference.  If at beginning of line, it is a
1897 definition.
1899 @item list
1900 @itemize @bullet
1901 @item
1902 @samp{ 1. }
1904 @item
1905 @samp{ - }
1907 @item
1908 @samp{term :: }
1909 @end itemize
1911 Numbered list, item list, or term definition list.
1913 @item quote
1914 spaces before beginning of text
1916 Blockquotes.
1918 @item verse
1919 @samp{> verse text}
1921 @item table
1922 @samp{table | cells}
1924 @item link
1925 @samp{[[explicit][links]]}
1927 @item url
1928 @samp{http://example.com/}
1930 @item email
1931 @samp{bare-email@@example.com}
1933 @end table
1935 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
1936 @comment  node-name,  next,  previous,  up
1937 @subsection Strings specific to a publishing style
1938 @cindex publishing, markup strings
1940 @dfn{Markup strings} are strings used for marking up text for a
1941 particular style.
1943 These cover the most basic kinds of markup, the handling of which
1944 differs little between the various styles.
1946 @subsubheading Available markup strings
1948 @table @code
1950 @item image-with-desc
1951 An image and a description.
1953 Argument 1: image.  Argument 2: description.
1955 @item image-link
1956 A link to an image.
1958 Argument 1: image link.
1960 @item url-with-image
1961 A URL with an image.
1963 Argument 1: link.  Argument 2: image.
1965 @item url-link
1966 A link with a description.
1968 Argument 1: link.  Argument 2: description if one exists, or the
1969 original link otherwise.
1971 @item internal-link
1972 A link that refers to an internal anchor.
1974 Argument 1: internal link.  Argument 2: description if one exists, or
1975 the original link otherwise.
1977 @item email-addr
1978 A link to an email address.
1980 Argument 1: email address.  Argument 2: email address.
1982 @item emdash
1983 A 2-length dash.
1985 @item rule
1986 A horizontal line or space.
1988 @item footnote
1989 Beginning of footnote.
1991 @item footnote-end
1992 End of footnote.
1994 @item footnotemark
1995 Mark a reference for the current footnote.
1997 Argument 1: number of this footnote.
1999 @item footnotetext
2000 Indicate the text of the current footnote.
2002 Argument 1: number of this footnote.
2004 @item footnotetext-end
2005 End of a footnote text line.
2007 @item fn-sep
2008 Text used to replace ``Footnotes:'' line.
2010 @item enddots
2011 4 dots.
2013 @item dots
2014 3 dots.
2016 @item part
2017 Beginning of a part indicator line.  This is used by book publishing.
2019 @item part-end
2020 End of a part indicator line.  This is used by book publishing.
2022 @item chapter
2023 Beginning of a chapter indicator line.  This is used by book publishing.
2025 @item chapter-end
2026 End of a chapter indicator line.  This is used by book publishing.
2028 @item section
2029 Beginning of level 1 section indicator line.
2031 Argument 1: level of section; always 1.
2033 @item section-end
2034 End of level 1 section indicator line.
2036 Argument 1: level of section; always 1.
2038 @item subsection
2039 Beginning of level 2 section indicator line.
2041 Argument 1: level of section; always 2.
2043 @item subsection-end
2044 End of level 2 section indicator line.
2046 Argument 1: level of section; always 2.
2048 @item subsubsection
2049 Beginning of level 3 section indicator line.
2051 Argument 1: level of section; always 3.
2053 @item subsubsection-end
2054 End of level 3 section indicator line.
2056 Argument 1: level of section; always 3.
2058 @item section-other
2059 Beginning of section indicator line, where level is greater than 3.
2061 Argument 1: level of section.
2063 @item section-other-end
2064 Beginning of section indicator line, where level is greater than 3.
2066 Argument 1: level of section.
2068 @item begin-underline
2069 Beginning of underlined text.
2071 @item end-underline
2072 End of underlined text.
2074 @item begin-literal
2075 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2076 =teletype text=.
2078 @item end-literal
2079 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2080 text=.
2082 @item begin-emph
2083 Beginning of the first level of emphasized text.
2085 @item end-emph
2086 End of the first level of emphasized text.
2088 @item begin-more-emph
2089 Beginning of the second level of emphasized text.
2091 @item end-more-emph
2092 End of the second level of emphasized text.
2094 @item begin-most-emph
2095 Beginning of the third (and final) level of emphasized text.
2097 @item end-most-emph
2098 End of the third (and final) level of emphasized text.
2100 @item begin-verse
2101 Beginning of verse text.
2103 @item verse-space
2104 String used to each space that is further indented than the beginning of
2105 the verse.
2107 @item begin-verse-line
2108 Beginning of a line of verse.
2110 @item empty-verse-line
2111 End of a line of verse.
2113 @item begin-last-stanza-line
2114 Beginning of the last line of a verse stanza.
2116 @item end-last-stanza-line
2117 End of the last line of a verse stanza.
2119 @item end-verse
2120 End of verse text.
2122 @item begin-example
2123 Beginning of an example region.  To make use of this, an
2124 @samp{<example>} tag is needed.
2126 @item end-example
2127 End of an example region.  To make use of this, an @samp{</example>} tag
2128 is needed.
2130 @item begin-center
2131 Begin a centered line.
2133 @item end-center
2134 End a centered line.
2136 @item begin-quote
2137 Begin a quoted region.
2139 @item end-quote
2140 End a quoted region.
2142 @item begin-uli
2143 Begin an unordered list.
2145 @item end-uli
2146 End an unordered list.
2148 @item begin-oli
2149 Begin an ordered list.
2151 @item end-oli
2152 End an ordered list.
2154 @item begin-ddt
2155 Begin a definition list.
2157 @item start-dde
2158 Begin a term in a definition list.
2160 @item end-ddt
2161 End a definition list.
2163 @end table
2165 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2166 @comment  node-name,  next,  previous,  up
2167 @subsection Tag specifications for special markup
2168 @cindex publishing, markup tags
2170 @anchor{muse-publish-markup-tags}
2171 @code{muse-publish-markup-tags}
2173 A list of tag specifications, for specially marking up text.
2175 XML-style tags are the best way to add custom markup to Muse.  This is
2176 easily accomplished by customizing this list of markup tags.
2178 For each entry, the name of the tag is given, whether it expects a
2179 closing tag and/or an optional set of attributes, and a function that
2180 performs whatever action is desired within the delimited region.
2182 The tags themselves are deleted during publishing, before the function
2183 is called.  The function is called with three arguments, the beginning
2184 and end of the region surrounded by the tags.  If properties are
2185 allowed, they are passed as a third argument in the form of an alist.
2186 The `end' argument to the function is always a marker.
2188 Point is always at the beginning of the region within the tags, when the
2189 function is called.  Wherever point is when the function finishes is
2190 where tag markup will resume.
2192 These tag rules are processed once at the beginning of markup, and once
2193 at the end, to catch any tags which may have been inserted in-between.
2195 @node Style Elements, , Markup Tags, Common Elements
2196 @comment  node-name,  next,  previous,  up
2197 @subsection Parameters used for defining styles
2198 @cindex publishing, style elements
2200 Style elements are tags that define a style.  Use
2201 @code{muse-define-style} to create a new style.
2203 @smallexample
2204 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2205 @end smallexample
2207 @subsubheading Usable elements
2209 @table @option
2211 @item :suffix
2212 File extension to use for publishing files with this style.
2214 @item :link-suffix
2215 File extension to use for publishing links to Muse files with this
2216 style.
2218 @item :osuffix
2219 File extension to use for publishing second-stage files with this style.
2221 For example, PDF publishing generates a LaTeX file first, then a PDF
2222 from that LaTeX file.
2224 @item :regexps
2225 List of markup rules for publishing a page with Muse.
2226 @xref{muse-publish-markup-regexps}.
2228 @item :functions
2229 An alist of style types to custom functions for that kind of text.
2230 @xref{muse-publish-markup-functions}.
2232 @item :strings
2233 Strings used for marking up text with this style.
2235 These cover the most basic kinds of markup, the handling of which
2236 differs little between the various styles.
2238 @item :tags
2239 A list of tag specifications, used for handling extra tags.
2240 @xref{muse-publish-markup-tags}.
2242 @item :specials
2243 A table of characters which must be represented specially.
2245 @item :before
2246 A function that is to be executed on the newly-created publishing buffer
2247 (or the current region) before any publishing occurs.
2249 This is used to set extra parameters that direct the publishing process.
2251 @item :before-end
2252 A function that is to be executed on the publishing buffer (or the
2253 current region) immediately after applying all of the markup regexps.
2255 This is used to fix the order of table elements (header, footer, body)
2256 in XML-ish styles.
2258 @item :after
2259 A function that is to be executed on the publishing buffer after
2260 :before-end, and immediately after inserting the header and footer.
2262 This is used for generating the table of contents as well as setting the
2263 file coding system.
2265 @item :final
2266 A function that is to be executed after saving the published file, but
2267 while still in its buffer.
2269 This is used for generating second-stage documents like PDF files from
2270 just-published LaTeX files.
2272 @item :header
2273 Header used for publishing files of this style.
2275 This may be text or a filename.  It is inserted at the beginning of a
2276 file, after evaluating the publishing markup.
2278 @item :footer
2279 Footer used for publishing files of this style.
2281 This may be text or a filename.  It is inserted at the end of a file,
2282 after evaluating the publishing markup.
2284 @item :browser
2285 The function used to browse the published result of files of this style.
2287 @end table
2289 @node Deriving Styles, , Common Elements, Publishing Styles
2290 @comment  node-name,  next,  previous,  up
2291 @section Deriving a new style from an existing one
2292 @cindex publishing styles, deriving
2294 To create a new style from an existing one, use @code{muse-derive-style}
2295 as follows.  This is a good way to fix something you don't like about a
2296 particular publishing style, or to personalize it.
2298 @smallexample
2299 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2300 @end smallexample
2302 The derived name is a string defining the new style, such as "my-html".
2303 The base name must identify an existing style, such as "html" -- if you
2304 have loaded @file{muse-html}.  The style parameters are the same as
2305 those used to create a style, except that they override whatever
2306 definitions exist in the base style.  However, some definitions only
2307 partially override.  The following parameters support partial
2308 overriding.
2310 @xref{Style Elements}, for a complete list of all parameters.
2312 @table @option
2314 @item :functions
2315 If a markup function is not found in the derived style's function list,
2316 the base style's function list will be queried.
2318 @item :regexps
2319 All regexps in the current style and the base style(s) will be used.
2321 @item :strings
2322 If a markup string is not found in the derived style's string list, the
2323 base style's string list will be queried.
2325 @end table
2328 @node Getting Help and Reporting Bugs, History, Publishing Styles, Top
2329 @comment  node-name,  next,  previous,  up
2330 @chapter Getting Help and Reporting Bugs
2331 @cindex help, getting
2332 @cindex bugs, reporting
2334 After you have read this guide, if you still have questions about
2335 Muse, or if you have bugs to report, there are several places you can
2338 @itemize @bullet
2340 @item
2341 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
2342 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2343 to it.
2345 @item
2346 @uref{http://www.mwolson.org/projects/MuseMode.html} is the web page
2347 that Michael Olson (the current maintainer) made for Muse.
2349 @item
2350 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
2351 using the subscription form at
2352 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
2353 This mailing list provides support for Muse, @command{Planner} and
2354 @command{emacs-wiki}, which is the predecessor of Muse.
2356 There are additional methods for accessing the mailing list, adding
2357 content to it, and searching it.  Consult
2358 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
2359 more information.
2361 @item
2362 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2363 contributors are frequently around and willing to answer your
2364 questions.  The @samp{#muse} channel is also available for
2365 Muse-specific help, and its current maintainer hangs out there.
2367 @item
2368 The maintainer of MuseMode, Michael Olson, may be contacted at
2369 @email{mwolson@@gnu.org}.
2371 @end itemize
2373 @node History, Contributors, Getting Help and Reporting Bugs, Top
2374 @comment  node-name,  next,  previous,  up
2375 @chapter History of This Document
2376 @cindex history, of Muse
2378 @itemize
2379 @item 2004
2380 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2381 limitations. Around February 2004, he started making "emacs-wiki version
2382 3.00 APLHA", which eventually became known as Muse.
2384 Most of those who frequent the emacs-wiki mailing list continued to use
2385 emacs-wiki, mainly because Planner hasn't been ported over to it.
2387 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2388 John Wiegley's request.
2390 @item 2005
2391 Michael Olson overhauled this document and added many new sections in
2392 preparation for the first release of Muse (3.01).
2394 @end itemize
2396 @node Contributors, GNU General Public License, History, Top
2397 @comment  node-name,  next,  previous,  up
2398 @chapter Contributors to This Documentation
2399 @cindex contributors
2401 The first draft of this document was taken from the emacs-wiki texinfo
2402 manual.  Michael Olson adapted it for Muse and added most of its
2403 content.
2405 John Sullivan did a majority of the work on the emacs-wiki texinfo
2406 manual.
2408 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2409 emacs-wiki texinfo manual.
2411 @node GNU General Public License, Concept Index, Contributors, Top
2412 @comment  node-name,  next,  previous,  up
2413 @appendix GNU GENERAL PUBLIC LICENSE
2414 @center Version 2, June 1991
2415 @cindex GPL
2416 @cindex GNU General Public License
2418 @c This file is intended to be included in another file.
2420 @display
2421 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2422 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2424 Everyone is permitted to copy and distribute verbatim copies
2425 of this license document, but changing it is not allowed.
2426 @end display
2428 @appendixsec Preamble
2430   The licenses for most software are designed to take away your
2431 freedom to share and change it.  By contrast, the GNU General Public
2432 License is intended to guarantee your freedom to share and change free
2433 software---to make sure the software is free for all its users.  This
2434 General Public License applies to most of the Free Software
2435 Foundation's software and to any other program whose authors commit to
2436 using it.  (Some other Free Software Foundation software is covered by
2437 the GNU Library General Public License instead.)  You can apply it to
2438 your programs, too.
2440   When we speak of free software, we are referring to freedom, not
2441 price.  Our General Public Licenses are designed to make sure that you
2442 have the freedom to distribute copies of free software (and charge for
2443 this service if you wish), that you receive source code or can get it
2444 if you want it, that you can change the software or use pieces of it
2445 in new free programs; and that you know you can do these things.
2447   To protect your rights, we need to make restrictions that forbid
2448 anyone to deny you these rights or to ask you to surrender the rights.
2449 These restrictions translate to certain responsibilities for you if you
2450 distribute copies of the software, or if you modify it.
2452   For example, if you distribute copies of such a program, whether
2453 gratis or for a fee, you must give the recipients all the rights that
2454 you have.  You must make sure that they, too, receive or can get the
2455 source code.  And you must show them these terms so they know their
2456 rights.
2458   We protect your rights with two steps: (1) copyright the software, and
2459 (2) offer you this license which gives you legal permission to copy,
2460 distribute and/or modify the software.
2462   Also, for each author's protection and ours, we want to make certain
2463 that everyone understands that there is no warranty for this free
2464 software.  If the software is modified by someone else and passed on, we
2465 want its recipients to know that what they have is not the original, so
2466 that any problems introduced by others will not reflect on the original
2467 authors' reputations.
2469   Finally, any free program is threatened constantly by software
2470 patents.  We wish to avoid the danger that redistributors of a free
2471 program will individually obtain patent licenses, in effect making the
2472 program proprietary.  To prevent this, we have made it clear that any
2473 patent must be licensed for everyone's free use or not licensed at all.
2475   The precise terms and conditions for copying, distribution and
2476 modification follow.
2478 @iftex
2479 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2480 @end iftex
2481 @ifinfo
2482 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2483 @end ifinfo
2485 @enumerate 0
2486 @item
2487 This License applies to any program or other work which contains
2488 a notice placed by the copyright holder saying it may be distributed
2489 under the terms of this General Public License.  The ``Program'', below,
2490 refers to any such program or work, and a ``work based on the Program''
2491 means either the Program or any derivative work under copyright law:
2492 that is to say, a work containing the Program or a portion of it,
2493 either verbatim or with modifications and/or translated into another
2494 language.  (Hereinafter, translation is included without limitation in
2495 the term ``modification''.)  Each licensee is addressed as ``you''.
2497 Activities other than copying, distribution and modification are not
2498 covered by this License; they are outside its scope.  The act of
2499 running the Program is not restricted, and the output from the Program
2500 is covered only if its contents constitute a work based on the
2501 Program (independent of having been made by running the Program).
2502 Whether that is true depends on what the Program does.
2504 @item
2505 You may copy and distribute verbatim copies of the Program's
2506 source code as you receive it, in any medium, provided that you
2507 conspicuously and appropriately publish on each copy an appropriate
2508 copyright notice and disclaimer of warranty; keep intact all the
2509 notices that refer to this License and to the absence of any warranty;
2510 and give any other recipients of the Program a copy of this License
2511 along with the Program.
2513 You may charge a fee for the physical act of transferring a copy, and
2514 you may at your option offer warranty protection in exchange for a fee.
2516 @item
2517 You may modify your copy or copies of the Program or any portion
2518 of it, thus forming a work based on the Program, and copy and
2519 distribute such modifications or work under the terms of Section 1
2520 above, provided that you also meet all of these conditions:
2522 @enumerate a
2523 @item
2524 You must cause the modified files to carry prominent notices
2525 stating that you changed the files and the date of any change.
2527 @item
2528 You must cause any work that you distribute or publish, that in
2529 whole or in part contains or is derived from the Program or any
2530 part thereof, to be licensed as a whole at no charge to all third
2531 parties under the terms of this License.
2533 @item
2534 If the modified program normally reads commands interactively
2535 when run, you must cause it, when started running for such
2536 interactive use in the most ordinary way, to print or display an
2537 announcement including an appropriate copyright notice and a
2538 notice that there is no warranty (or else, saying that you provide
2539 a warranty) and that users may redistribute the program under
2540 these conditions, and telling the user how to view a copy of this
2541 License.  (Exception: if the Program itself is interactive but
2542 does not normally print such an announcement, your work based on
2543 the Program is not required to print an announcement.)
2544 @end enumerate
2546 These requirements apply to the modified work as a whole.  If
2547 identifiable sections of that work are not derived from the Program,
2548 and can be reasonably considered independent and separate works in
2549 themselves, then this License, and its terms, do not apply to those
2550 sections when you distribute them as separate works.  But when you
2551 distribute the same sections as part of a whole which is a work based
2552 on the Program, the distribution of the whole must be on the terms of
2553 this License, whose permissions for other licensees extend to the
2554 entire whole, and thus to each and every part regardless of who wrote it.
2556 Thus, it is not the intent of this section to claim rights or contest
2557 your rights to work written entirely by you; rather, the intent is to
2558 exercise the right to control the distribution of derivative or
2559 collective works based on the Program.
2561 In addition, mere aggregation of another work not based on the Program
2562 with the Program (or with a work based on the Program) on a volume of
2563 a storage or distribution medium does not bring the other work under
2564 the scope of this License.
2566 @item
2567 You may copy and distribute the Program (or a work based on it,
2568 under Section 2) in object code or executable form under the terms of
2569 Sections 1 and 2 above provided that you also do one of the following:
2571 @enumerate a
2572 @item
2573 Accompany it with the complete corresponding machine-readable
2574 source code, which must be distributed under the terms of Sections
2575 1 and 2 above on a medium customarily used for software interchange; or,
2577 @item
2578 Accompany it with a written offer, valid for at least three
2579 years, to give any third party, for a charge no more than your
2580 cost of physically performing source distribution, a complete
2581 machine-readable copy of the corresponding source code, to be
2582 distributed under the terms of Sections 1 and 2 above on a medium
2583 customarily used for software interchange; or,
2585 @item
2586 Accompany it with the information you received as to the offer
2587 to distribute corresponding source code.  (This alternative is
2588 allowed only for noncommercial distribution and only if you
2589 received the program in object code or executable form with such
2590 an offer, in accord with Subsection b above.)
2591 @end enumerate
2593 The source code for a work means the preferred form of the work for
2594 making modifications to it.  For an executable work, complete source
2595 code means all the source code for all modules it contains, plus any
2596 associated interface definition files, plus the scripts used to
2597 control compilation and installation of the executable.  However, as a
2598 special exception, the source code distributed need not include
2599 anything that is normally distributed (in either source or binary
2600 form) with the major components (compiler, kernel, and so on) of the
2601 operating system on which the executable runs, unless that component
2602 itself accompanies the executable.
2604 If distribution of executable or object code is made by offering
2605 access to copy from a designated place, then offering equivalent
2606 access to copy the source code from the same place counts as
2607 distribution of the source code, even though third parties are not
2608 compelled to copy the source along with the object code.
2610 @item
2611 You may not copy, modify, sublicense, or distribute the Program
2612 except as expressly provided under this License.  Any attempt
2613 otherwise to copy, modify, sublicense or distribute the Program is
2614 void, and will automatically terminate your rights under this License.
2615 However, parties who have received copies, or rights, from you under
2616 this License will not have their licenses terminated so long as such
2617 parties remain in full compliance.
2619 @item
2620 You are not required to accept this License, since you have not
2621 signed it.  However, nothing else grants you permission to modify or
2622 distribute the Program or its derivative works.  These actions are
2623 prohibited by law if you do not accept this License.  Therefore, by
2624 modifying or distributing the Program (or any work based on the
2625 Program), you indicate your acceptance of this License to do so, and
2626 all its terms and conditions for copying, distributing or modifying
2627 the Program or works based on it.
2629 @item
2630 Each time you redistribute the Program (or any work based on the
2631 Program), the recipient automatically receives a license from the
2632 original licensor to copy, distribute or modify the Program subject to
2633 these terms and conditions.  You may not impose any further
2634 restrictions on the recipients' exercise of the rights granted herein.
2635 You are not responsible for enforcing compliance by third parties to
2636 this License.
2638 @item
2639 If, as a consequence of a court judgment or allegation of patent
2640 infringement or for any other reason (not limited to patent issues),
2641 conditions are imposed on you (whether by court order, agreement or
2642 otherwise) that contradict the conditions of this License, they do not
2643 excuse you from the conditions of this License.  If you cannot
2644 distribute so as to satisfy simultaneously your obligations under this
2645 License and any other pertinent obligations, then as a consequence you
2646 may not distribute the Program at all.  For example, if a patent
2647 license would not permit royalty-free redistribution of the Program by
2648 all those who receive copies directly or indirectly through you, then
2649 the only way you could satisfy both it and this License would be to
2650 refrain entirely from distribution of the Program.
2652 If any portion of this section is held invalid or unenforceable under
2653 any particular circumstance, the balance of the section is intended to
2654 apply and the section as a whole is intended to apply in other
2655 circumstances.
2657 It is not the purpose of this section to induce you to infringe any
2658 patents or other property right claims or to contest validity of any
2659 such claims; this section has the sole purpose of protecting the
2660 integrity of the free software distribution system, which is
2661 implemented by public license practices.  Many people have made
2662 generous contributions to the wide range of software distributed
2663 through that system in reliance on consistent application of that
2664 system; it is up to the author/donor to decide if he or she is willing
2665 to distribute software through any other system and a licensee cannot
2666 impose that choice.
2668 This section is intended to make thoroughly clear what is believed to
2669 be a consequence of the rest of this License.
2671 @item
2672 If the distribution and/or use of the Program is restricted in
2673 certain countries either by patents or by copyrighted interfaces, the
2674 original copyright holder who places the Program under this License
2675 may add an explicit geographical distribution limitation excluding
2676 those countries, so that distribution is permitted only in or among
2677 countries not thus excluded.  In such case, this License incorporates
2678 the limitation as if written in the body of this License.
2680 @item
2681 The Free Software Foundation may publish revised and/or new versions
2682 of the General Public License from time to time.  Such new versions will
2683 be similar in spirit to the present version, but may differ in detail to
2684 address new problems or concerns.
2686 Each version is given a distinguishing version number.  If the Program
2687 specifies a version number of this License which applies to it and ``any
2688 later version'', you have the option of following the terms and conditions
2689 either of that version or of any later version published by the Free
2690 Software Foundation.  If the Program does not specify a version number of
2691 this License, you may choose any version ever published by the Free Software
2692 Foundation.
2694 @item
2695 If you wish to incorporate parts of the Program into other free
2696 programs whose distribution conditions are different, write to the author
2697 to ask for permission.  For software which is copyrighted by the Free
2698 Software Foundation, write to the Free Software Foundation; we sometimes
2699 make exceptions for this.  Our decision will be guided by the two goals
2700 of preserving the free status of all derivatives of our free software and
2701 of promoting the sharing and reuse of software generally.
2703 @iftex
2704 @heading NO WARRANTY
2705 @end iftex
2706 @ifinfo
2707 @center NO WARRANTY
2708 @end ifinfo
2710 @item
2711 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2712 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2713 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2714 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2715 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2716 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2717 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2718 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2719 REPAIR OR CORRECTION.
2721 @item
2722 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2723 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2724 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2725 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2726 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2727 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2728 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2729 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2730 POSSIBILITY OF SUCH DAMAGES.
2731 @end enumerate
2733 @iftex
2734 @heading END OF TERMS AND CONDITIONS
2735 @end iftex
2736 @ifinfo
2737 @center END OF TERMS AND CONDITIONS
2738 @end ifinfo
2740 @page
2741 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2743   If you develop a new program, and you want it to be of the greatest
2744 possible use to the public, the best way to achieve this is to make it
2745 free software which everyone can redistribute and change under these terms.
2747   To do so, attach the following notices to the program.  It is safest
2748 to attach them to the start of each source file to most effectively
2749 convey the exclusion of warranty; and each file should have at least
2750 the ``copyright'' line and a pointer to where the full notice is found.
2752 @smallexample
2753 @var{one line to give the program's name and a brief idea of what it does.}
2754 Copyright (C) @var{yyyy}  @var{name of author}
2756 This program is free software; you can redistribute it and/or modify
2757 it under the terms of the GNU General Public License as published by
2758 the Free Software Foundation; either version 2 of the License, or
2759 (at your option) any later version.
2761 This program is distributed in the hope that it will be useful,
2762 but WITHOUT ANY WARRANTY; without even the implied warranty of
2763 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2764 GNU General Public License for more details.
2766 You should have received a copy of the GNU General Public License along
2767 with this program; if not, write to the Free Software Foundation, Inc.,
2768 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2769 @end smallexample
2771 Also add information on how to contact you by electronic and paper mail.
2773 If the program is interactive, make it output a short notice like this
2774 when it starts in an interactive mode:
2776 @smallexample
2777 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2778 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2779 This is free software, and you are welcome to redistribute it
2780 under certain conditions; type `show c' for details.
2781 @end smallexample
2783 The hypothetical commands @samp{show w} and @samp{show c} should show
2784 the appropriate parts of the General Public License.  Of course, the
2785 commands you use may be called something other than @samp{show w} and
2786 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2787 suits your program.
2789 You should also get your employer (if you work as a programmer) or your
2790 school, if any, to sign a ``copyright disclaimer'' for the program, if
2791 necessary.  Here is a sample; alter the names:
2793 @example
2794 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2795 `Gnomovision' (which makes passes at compilers) written by James Hacker.
2797 @var{signature of Ty Coon}, 1 April 1989
2798 Ty Coon, President of Vice
2799 @end example
2801 This General Public License does not permit incorporating your program into
2802 proprietary programs.  If your program is a subroutine library, you may
2803 consider it more useful to permit linking proprietary applications with the
2804 library.  If this is what you want to do, use the GNU Library General
2805 Public License instead of this License.
2808 @node Concept Index,  , GNU General Public License, Top
2809 @comment  node-name,  next,  previous,  up
2810 @unnumbered Index
2812 @printindex cp
2814 @bye
2816 @c Local Variables:
2817 @c ispell-local-pdict: "ispell-dict"
2818 @c End: