Warn if file not published; hack further on Wiki stuff.
[muse-el.git] / muse.texi
blob2277548e6761aa8341dec8223dfd36202e3cc769
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.01.
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 * Emphasizing Text::            Bold, italicized, and underlined text.
78 * Footnotes::                   Making notes to be shown at the end.
79 * Verse::                       Indicating poetic stanzas.
80 * Lists::                       Lists of items.
81 * Tables::                      Generation of data tables.
82 * Links::                       Hyperlinks and email addresses.
83 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
84 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
85                                   for extensibility.
87 Publishing Various Types of Documents
89 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
90 * Book::                        Publishing entries into a compilation.
91 * DocBook::                     Publishing in DocBook XML form.
92 * HTML::                        Publishing in HTML or XHTML form.
93 * Journal::                     Keeping a journal or blog.
94 * LaTeX::                       Publishing LaTeX documents.
95 * Poem::                        Publish a poem to LaTex or PDF.
96 * Texinfo::                     Publish entries to Texinfo format or PDF.
97 * Common Elements::             Common functionality shared by styles.
98 * Deriving Styles::             Deriving a new style from an existing
99                                   one.
101 Integrating Muse and pyblosxom.cgi
103 * Blosxom Requirements::        Other tools needed to the Blosxom style.
104 * Blosxom Entries::             Format of a Blosxom entry and automation.
105 * Blosxom Options::             Blosxom styles and options provided.
107 @end detailmenu
108 @end menu
110 @node Preface, Introduction, Top, Top
111 @comment  node-name,  next,  previous,  up
112 @chapter About the documentation
114 This document describes Muse, which was written by John Wiegley
115 and is now maintained by Michael Olson.  Several versions of it are
116 available on-line.
118 @itemize @bullet
119 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
120 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
121 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
122 @end itemize
124 @node Introduction, Obtaining Muse, Preface, Top
125 @comment  node-name,  next,  previous,  up
126 @chapter What is Muse?
128 Emacs Muse is an authoring and publishing environment for Emacs.  It
129 simplifies the process of writing documents and publishing them to
130 various output formats.
132 Muse consists of two main parts: an enhanced text-mode for authoring
133 documents and navigating within Muse projects, and a set of publishing
134 styles for generating different kinds of output.
136 This idea is not in any way new. Numerous systems exist -- even one
137 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
138 more modular environment, with a rather simple core, in which "styles"
139 are derived from to create new styles. Much of Muse's overall
140 functionality is optional. For example, you can use the publisher
141 without the major-mode, or the mode without doing any publishing; or if
142 you don't load the Texinfo or LaTeX modules, those styles won't be
143 available.
145 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
146 code has been restructured and rewritten, especially its publishing
147 functions. The focus in this revision is on the authoring and publishing
148 aspects, and the "wikiness" has been removed as a default behavior (to
149 be offered again as an optional module). CamelCase words are no longer
150 special by default.
152 @node Obtaining Muse, Installation, Introduction, Top
153 @comment  node-name,  next,  previous,  up
154 @chapter How to Get Muse Releases and Development Changes
156 @menu
157 * Releases::                    Released versions of Muse.
158 * Development::                 Latest unreleased development changes.
159 @end menu
161 @node Releases, Development, Obtaining Muse, Obtaining Muse
162 @comment  node-name,  next,  previous,  up
163 @section Released versions of Muse
165 Choose to install a release if you want to minimize risk.
167 Errors are corrected in development first.  User-visible changes will be
168 announced on the @email{emacs-wiki-discuss@@nongnu.org} mailing list.
169 This mailing list also provides support for @command{Planner} and
170 @command{emacs-wiki}, which is the predecessor of Muse.
171 @pxref{Getting Help and Reporting Bugs}.
173 @cindex releases, Debian package
174 @cindex Debian package for Muse
175 Debian users can get Muse via apt-get.  The @file{muse} package will be
176 made available at Michael Olson's Debian repository.  To make use of it,
177 add the following line to your @file{/etc/apt/sources.list} file and run
178 @code{apt-get install muse}.
180 @example
181 deb http://www.mwolson.org/debian/ ./
182 @end example
184 @cindex releases, from source
185 Alternatively, you can download the latest release from
186 @uref{http://www.mwolson.org/static/dist/muse/} .
188 @node Development,  , Releases, Obtaining Muse
189 @comment  node-name,  next,  previous,  up
190 @section Latest unreleased development changes
191 @cindex development
193 Choose the development version if you want to live on the bleeding edge
194 of Muse development or try out new features before release.
196 @cindex arch revision control system, using
197 The Arch revision control system allows you to retrieve previous
198 versions and select specific features and bug fixes.  If you would like
199 to contribute to Muse development, it is highly recommended that you use
200 Arch, but this is not a requirement.
202 If you are new to Arch, you might find this tutorial helpful:
203 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
205 Downloading the Muse module with Arch and staying up-to-date involves
206 the following steps.
208 @enumerate
209 @item Install arch
211 @itemize @bullet
212 @item Debian: @kbd{apt-get install tla}.
213 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
214 @end itemize
216 @item Register the archive.
217 @example
218 tla register-archive -f http://www.mwolson.org/archives/2005
219 @end example
221 @item Download the Muse package.
222 @example
223 # Download Muse into the @file{muse} directory.
224 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
225 @end example
227 @item List upstream changes that are missing from your local copy.
228 Do this whenever you want to see whether new changes have been committed
229 to Muse.
231 @example
232 # Change to the source directory you are interested in.
233 cd muse/
235 # Display the summary of changes
236 tla missing --summary
237 @end example
239 @cindex updating Muse with Arch
240 @item Update to the latest version by replaying missing changes.
241 @example
242 cd muse
243 tla replay
244 @end example
246 @end enumerate
248 There are other ways to interact with the Muse archive.
250 @itemize
251 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
252 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
253 @end itemize
255 The latest development snapshot will be kept up-to-date since it is
256 updated at the same time as the Arch repository.
258 @node Installation, Getting Started, Obtaining Muse, Top
259 @comment  node-name,  next,  previous,  up
260 @chapter Compiling and Installing Muse
262 Muse may be compiled and installed on your machine.
264 @emph{Compilation}
266 This is an optional step, since Emacs Lisp source code does not
267 necessarily have to be byte-compiled.  It will yield a speed increase,
268 though.
270 A working copy of Emacs or XEmacs is needed in order to compile the
271 Emacs Muse.  By default, the program that is installed with the name
272 @command{emacs} will be used.
274 If you want to use the @command{xemacs} binary to perform the
275 compilation, you would need to edit @file{Makefile.defs} in the
276 top-level directory as follows.  You can put either a full path to an
277 Emacs or XEmacs binary or just the command name, as long as it is in the
278 @env{PATH}.
280 @example
281 EMACS    = xemacs
282 SITEFLAG = -no-site-file
283 @end example
285 Running @code{make} should compile the Muse source files in the
286 @file{lisp} directory.
288 @emph{Installation}
290 Muse may be installed into your file hierarchy by doing the following.
292 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
293 where you want the source and compiled Muse files to be installed and
294 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
295 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
296 Compilation section if you are using XEmacs.
298 If you are installing Muse on a Debian system, you might want to change
299 the value of @env{INSTALLINFO} as specified in @file{Makefile.defs}.
301 If you wish to install Muse to different locations than the defaults
302 specify, edit @file{Makefile.defs} accordingly.
304 Run @code{make} as a normal user.
306 Run @code{make install} as the root user if you have chosen installation
307 locations that require this.
310 @node Getting Started, Projects, Installation, Top
311 @comment  node-name,  next,  previous,  up
312 @chapter Getting Started
313 @cindex settings
315 To use Muse, add the directory containing its files to your
316 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
317 the authoring mode, and the styles you wish to publish to.  An example
318 follows.
320 @lisp
321 (add-to-list 'load-path "<path to Muse>")
323 (require 'muse-mode)     ; load authoring mode
325 (require 'muse-html)     ; load publishing styles I use
326 (require 'muse-latex)
327 (require 'muse-texinfo)
328 (require 'muse-docbook)
329 @end lisp
331 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
332 an input document to any available style.  If you enable
333 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
334 command will be bound to @kbd{C-c C-t}.
336 If the currently opened file is part of a defined project in
337 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
339 You should also type @kbd{M-x customize-group}, and give the name
340 @samp{muse}.  Change it to suit your preferences.  Each of the
341 options has its own documentation.
344 @node Projects, Keystroke Summary, Getting Started, Top
345 @comment  node-name,  next,  previous,  up
346 @chapter Creating and Managing Muse Projects
347 @cindex projects
349 Often you will want to publish all the files within a directory to a
350 particular set of output styles automatically.  To support, Muse
351 allows for the creations of "projects".  Here is a sample project, to
352 be defined in your @file{.emacs} file.
354 @lisp
355 (require 'muse-project)
357 (setq muse-project-alist
358       '(("website"                      ; my various writings
359          ("~/Pages" :default "index")
360          (:base "html" :path "~/public_html")
361          (:base "pdf" :path "~/public_html/pdf"))))
362 @end lisp
364 The above defines a project named "website", whose files are located
365 in the directory @file{~/Pages}.  The default page to visit is
366 @file{index}.  When this project is published, each page will be
367 output as HTML to the directory @file{~/public_html}, and as PDF to
368 the directory @file{~/public_html/pdf}.  Within any project page, you
369 may create a link to other pages using the syntax @samp{[[pagename]]}.
372 @node Keystroke Summary, Markup Rules, Projects, Top
373 @comment  node-name,  next,  previous,  up
374 @chapter Keys Used in Muse Mode
375 @cindex keystrokes
377 This is a summary of keystrokes available in every Muse buffer.
379 @table @kbd
381 @item C-c C-a (`muse-index')
382 Display an index of all known Muse pages.
384 @item C-c C-b (`muse-browse-result')
385 Show the published result of this page.
387 @item C-c C-e (`muse-edit-link-at-point')
388 Edit link at point.
390 @item C-c C-f (`muse-project-find-file'), also C-c C-v
391 Open another Muse page.  Prompt for the name.
393 @item C-c C-l (`font-lock-mode')
394 Highlight/refresh the current buffer.
396 @item C-c C-p (`muse-project-publish')
397 Publish any Muse pages that have changed.
399 @item C-c C-v (`muse-project-find-file'), also C-c C-f
400 Open another Muse page.  Prompt for the name.
402 @item C-c = (`muse-what-changed')
403 Diff this page against the last backup version.
405 @item C-c TAB (`muse-insert-tag')
406 Insert a tag interactively.
408 @item TAB
409 Move to the next Wiki reference.
411 @item S-TAB
412 Move to the previous Wiki reference.
414 @end table
417 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
418 @comment  node-name,  next,  previous,  up
419 @chapter Rules for Using Markup
420 @cindex markup
422 A Muse document uses special, contextual markup rules to determine how
423 to format the output result.  For example, if a paragraph is indented,
424 Muse assumes it should be quoted.
426 There are not too many markup rules, and all of them strive to be as
427 simple as possible so that you can focus on document creation, rather
428 than formatting.
430 @menu
431 * Paragraphs::                  Paragraphs: centering and quoting.
432 * Headings::                    Levels of headings.
433 * Emphasizing Text::            Bold, italicized, and underlined text.
434 * Footnotes::                   Making notes to be shown at the end.
435 * Verse::                       Indicating poetic stanzas.
436 * Lists::                       Lists of items.
437 * Tables::                      Generation of data tables.
438 * Links::                       Hyperlinks and email addresses.
439 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
440 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
441                                   for extensibility.
442 @end menu
444 @node Paragraphs, Headings, Markup Rules, Markup Rules
445 @comment  node-name,  next,  previous,  up
446 @section Paragraphs: centering and quoting
447 @cindex paragraphs
449 Paragraphs in Muse must be separated by a blank line.
451 @cindex paragraphs, centered
452 @strong{Centered paragraphs and quotations}
454 A line that begins with six or more columns of whitespace (either tabs
455 or spaces) indicates a centered paragraph.
457 @cindex paragraphs, quoted
458 @cindex quotations
459 But if a line begins with whitespace, though less than six columns, it
460 indicates a quoted paragraph.
462 @cindex examples
463 @cindex monospace, rendering blocks
464 @cindex HTML, rendering blocks in monospace
465 @strong{Literal paragraphs}
467 The @verb{|<example>|} tag is used for examples, where whitespace should
468 be preserved, the text rendered in monospace, and any characters special
469 to the output style escaped.
471 @cindex literal text
472 @cindex HTML, inserting a raw block
473 There is also the @verb{|<literal>|} tag, which causes a marked block to
474 be entirely left alone.  This can be used for inserting a hand-coded
475 HTML blocks into HTML output, for example.
477 @node Headings, Emphasizing Text, Paragraphs, Markup Rules
478 @comment  node-name,  next,  previous,  up
479 @section Levels of headings
480 @cindex headings
482 A heading becomes a chapter or section in printed output -- depending on
483 the style.  To indicate a heading, start a new paragraph with one to
484 three asterices, followed by a space and the heading title.  Then begin
485 another paragraph to enter the text for that section.
487 Only 3 levels of headings will be published as headings.  A fourth level
488 of headings will be marked up, but displayed as plain text.
490 @example
491 * First level
493 ** Second level
495 *** Third level
496 @end example
498 @node Emphasizing Text, Footnotes, Headings, Markup Rules
499 @comment  node-name,  next,  previous,  up
500 @section Bold, italicized, and underlined text
501 @cindex emphasizing text
502 @cindex underlining text
503 @cindex italicizing text
504 @cindex verbatim text
505 @cindex monospace, rendering words
507 To emphasize text, surround it with certain specially recognized
508 characters.
510 @example
511 *emphasis*
512 **strong emphasis**
513 ***very strong emphasis***
514 _underlined_
515 =verbatim and monospace=
516 @end example
518 @cindex WYSIWYG
519 While editing a Muse document in Muse mode, these forms of emphasis will
520 be highlighted in a WYSIWYG manner.  Each of these forms may span
521 multiple lines, with the exception of the verbatim and monospace form.
523 @node Footnotes, Verse, Emphasizing Text, Markup Rules
524 @comment  node-name,  next,  previous,  up
525 @section Making notes to be shown at the end
526 @cindex footnotes
528 A footnote reference is simply a number in square brackets.  To define
529 the footnote, place this definition at the bottom of your file.
530 @samp{footnote-mode} can be used to greatly facilitate the creation of
531 these kinds of footnotes.
533 Footnotes are defined by the same number in brackets occurring at the
534 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
535 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
536 the point of insertion.
538 @node Verse, Lists, Footnotes, Markup Rules
539 @comment  node-name,  next,  previous,  up
540 @section Indicating poetic stanzas
541 @cindex verses
542 @cindex poetry
544 Poetry requires that whitespace be preserved, but without resorting to
545 monospace.  To indicate this, use the following markup, reminiscent of
546 email quotations.
548 @example
549 > A line of Emacs verse;
550 >   forgive its being so terse.
551 @end example
553 You can also use the @verb{|<verse>|} tag, if you prefer.
555 @example
556 <verse>
557 A line of Emacs verse;
558   forgive its being so terse.
559 </verse>
560 @end example
562 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
563 follows.
565 @cindex verses, multiple stanzas
566 @example
567 <verse>
568 A line of Emacs verse;
569   forgive its being so terse.
571 This a second stanza:
572 Something longer should go here,
573 But the author is out of ideas.
574 </verse>
575 @end example
577 @node Lists, Tables, Verse, Markup Rules
578 @comment  node-name,  next,  previous,  up
579 @section Lists of items
580 @cindex lists
582 Lists are given using special characters at the beginning of a line.
583 Whitespace must occur before bullets or numbered items, to distinguish
584 from the possibility of those characters occurring in a real sentence.
586 @cindex lists, bullets
587 These are rendered as a bullet list.
589 @example
590   - bullet item one
591   - bullet item two
592 @end example
594 @cindex lists, enumerated
595 An enumerated list follows.
597 @example
598   1. Enum item one
599   2. Enum item two
600 @end example
602 @cindex lists, definitions
603 Here is a definition list.
605 @example
606 Term1 ::
607   This is a first definition
608   And it has two lines;
609   no, make that three.
611 Term2 ::
612   This is a second definition
613 @end example
615 @node Tables, Links, Lists, Markup Rules
616 @comment  node-name,  next,  previous,  up
617 @section Generation of data tables
618 @cindex tables
620 @cindex tables, simple
621 Only very simple tables are supported.  The syntax is as follows.
623 @example
624   Double bars  || Separate header fields
626   Single bars   | Separate body fields
627   Here are more | body fields
629   Triple bars ||| Separate footer fields
630 @end example
632 @node Links, Horizontal Rules and Anchors, Tables, Markup Rules
633 @comment  node-name,  next,  previous,  up
634 @section Hyperlinks and email addresses
635 @cindex links
637 @cindex links, explicit
639 A hyperlink can reference a URL, or another page within a Muse
640 project.  In addition, descriptive text can be specified, which should
641 be displayed rather than the link text in output styles that supports
642 link descriptions.  The syntax is as follows.
644 @example
645 [[link target][link description]]
646 [[link target without description]]
647 @end example
649 Thus, the current maintainer's homepage for Muse can be found
650 @samp{[[http://www.mwolson.org/projects/MuseMode.html][here]]},
651 or at @samp{[[http://www.mwolson.org/projects/MuseMode.html]]}.
653 @cindex images
654 @cindex links, with images
655 @strong{Image links}
657 Links to images may be used in either the target or the description, or
658 both.  Thus, the following code will publish as a clickable image that
659 points to @url{http://www.mwolson.org/}.
661 @example
662 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
663 @end example
665 @cindex images, local
666 @cindex images, displaying
667 If a link to a locally-available image is encountered in the link
668 description, Muse mode will attempt to display it if your version of
669 Emacs permits this.  The following example will display correctly and
670 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
671 exists in the @file{../pics/} directory.
673 @example
674 [[TestPage][../pics/TestLogo.png]]
675 @end example
677 @cindex images, without a description
678 An image link is not required to have a description.  The link
679 @samp{[[../myimage.png]]} will display and publish as expected.
681 @cindex links, raw
682 @cindex URLs
683 @cindex Email addresses
684 @cindex images, inlined
685 @strong{Bare URLs and Email addresses}
687 A URL or email address encountered in the input text is published as
688 a hyperlink if the output style supports it.  If it is an image URL,
689 it will be inlined if possible.
691 @node Horizontal Rules and Anchors, Embedded Lisp, Links, Markup Rules
692 @comment  node-name,  next,  previous,  up
693 @section Inserting a horizontal line or anchor
695 @cindex horizontal rules
696 @cindex dashes
697 @strong{Horizontal Rules}
699 Four or more dashes indicate a horizontal rule.  Be sure to put blank
700 lines around it, or it will be considered part of the proceeding or
701 following paragraph!
703 @cindex anchors
704 @cindex links, with target on same page
705 @strong{Anchors}
707 If you begin a line with "#anchor" -- where "anchor" can be any word
708 that doesn't contain whitespace -- it defines an anchor at that point
709 into the document.  This point can be referenced using "page#anchor" as
710 the target in a Muse link.
712 @node Embedded Lisp, , Horizontal Rules and Anchors, Markup Rules
713 @comment  node-name,  next,  previous,  up
714 @section Evaluating Emacs Lisp code in documents for extensibility
715 @cindex lisp, embedded
717 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
718 which is the only Muse tag supported in a style's header and footer
719 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
720 text you wish.  The inserted output will get marked up, if the
721 @verb{|<lisp>|} tag appears within the main text of the document.
723 @example
724 <lisp>(concat "This form gets " "inserted")</lisp>
725 @end example
727 @cindex lisp, and insert command
728 Note that you should not use the @code{insert} command within a set of
729 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
730 tags will be automatically inserted into the document.
732 @node Publishing Styles, Getting Help and Reporting Bugs, Markup Rules, Top
733 @comment  node-name,  next,  previous,  up
734 @chapter Publishing Various Types of Documents
735 @cindex publishing styles
737 One of the principle features of Muse is the ability to publish a simple
738 input text to a variety of different output styles.  Muse also makes it
739 easy to create new styles, or derive from an existing style.
741 @menu
742 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
743 * Book::                        Publishing entries into a compilation.
744 * DocBook::                     Publishing in DocBook XML form.
745 * HTML::                        Publishing in HTML or XHTML form.
746 * Journal::                     Keeping a journal or blog.
747 * LaTeX::                       Publishing LaTeX documents.
748 * Poem::                        Publish a poem to LaTex or PDF.
749 * Texinfo::                     Publish entries to Texinfo format or PDF.
750 * Common Elements::             Common functionality shared by styles.
751 * Deriving Styles::             Deriving a new style from an existing
752                                   one.
753 @end menu
755 @node Blosxom, Book, Publishing Styles, Publishing Styles
756 @comment  node-name,  next,  previous,  up
757 @section Integrating Muse and pyblosxom.cgi
758 @cindex blog, one-file-per-entry style
760 The Blosxom publishing style publishes a tree of categorised files to a
761 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
762 In other words, each blog entry corresponds with one file.
764 @menu
765 * Blosxom Requirements::        Other tools needed to the Blosxom style.
766 * Blosxom Entries::             Format of a Blosxom entry and automation.
767 * Blosxom Options::             Blosxom styles and options provided.
768 @end menu
770 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
771 @comment  node-name,  next,  previous,  up
772 @subsection Other tools needed to the Blosxom style
774 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
775 installed on a machine that you have upload access to.
777 The following additional components are required in order to make the
778 date of blog entries display as something sensible.
780 @enumerate
781 @item
782 A script to gather date directives from the entire blog tree into a
783 single file.  The file must associate a blog entry with a date.
785 @item
786 A plugin for (py)blosxom that reads this file.
787 @end enumerate
789 These 2 things are provided for @command{pyblosxom.cgi} in the
790 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
791 former service, while @file{hardcodedates.py} provides the latter
792 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
793 script will be found/written.
795 Here is a sample listing from my @file{timestamps} file, which maps
796 each file to a date.  This can really be in any format, as long as your
797 date-gathering script and your plugin can both understand it.
799 @example
800 2005-04-01-14-16 personal/paper_cranes
801 2005-03-21 personal/spring_break_over
802 2004-10-24 personal/finished_free_culture
803 @end example
805 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
806 @comment  node-name,  next,  previous,  up
807 @subsection Format of a Blosxom entry and automation
809 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
810 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
811 plus whatever normal content is desired.
813 The date directive is not used directly by @command{pyblosxom.cgi} or
814 this program.  You need to have the two additional items from the former
815 section to make use of this feature.
817 There is a function called @code{muse-blosxom-new-entry} that will
818 automate the process of making a new blog entry.  To make use of it, do
819 the following.
821 @itemize @bullet
822 @item
823 Customize @code{muse-blosxom-base-directory} to the location that your
824 blog entries are stored.
826 @item
827 Assign the @code{muse-blosxom-base-directory} function to a key
828 sequence.  I use the following code to assign this function to
829 @kbd{C-c p l'}.
831 @example
832 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
833 @end example
835 @item
836 You should create your directory structure ahead of time under your base
837 directory.  These directories, which correspond with category names, may
838 be nested.
840 @item
841 When you enter this key sequence, you will be prompted for the category
842 of your entry and its title.  Upon entering this information, a new file
843 will be created that corresponds with the title, but in lowercase
844 letters and having special characters converted to underscores.  The
845 title and date directives will be inserted automatically.
846 @end itemize
848 @node Blosxom Options, , Blosxom Entries, Blosxom
849 @comment  node-name,  next,  previous,  up
850 @subsection Blosxom styles and options provided
852 The following styles and options are available in the Blosxom publishing
853 style.
855 @emph{Styles provided}
857 @table @code
859 @cindex publishing styles, blosxom-html
860 @item blosxom-html
861 Publish Blosxom entries in HTML form.
863 @cindex publishing styles, blosxom-xhtml
864 @item blosxom-xhtml
865 Publish Blosxom entries in XHTML form.
867 @end table
869 @emph{Options provided}
871 @table @code
873 @item muse-blosxom-extension
874 Default file extension for publishing Blosxom files.
876 @item muse-blosxom-header
877 Header used for publishing Blosxom files.
879 @item muse-blosxom-footer
880 Footer used for publishing Blosxom files.
882 @item muse-blosxom-base-directory
883 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
885 This is the top-level directory where your blog entries may be found
886 locally.
888 @end table
890 @node Book, DocBook, Blosxom, Publishing Styles
891 @comment  node-name,  next,  previous,  up
892 @section Publishing entries into a compilation
894 This publishing style is used to output ``books'' in LaTeX or PDF
895 format.
897 Each page will become a separate chapter in the book, unless the style
898 keyword @option{:nochapters} is used, in which case they are all run
899 together as if one giant chapter.
901 You will need to call the @code{muse-book-publish-project} function in
902 order to publish this style.  An example of this may be found in John
903 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
905 @emph{Styles provided}
907 @table @code
909 @cindex publishing styles, book-latex
910 @item book-latex
911 Publish a book in LaTeX form.  The header and footer are different than
912 the normal LaTeX publishing mode.
914 @cindex publishing styles, book-pdf
915 @item book-pdf
916 Publish a book in PDF form.  The header and footer are different than
917 the normal PDF publishing mode.
919 @end table
921 @emph{Options provided}
923 @table @code
925 @item muse-book-before-publish-hook
926 A hook run in the book buffer before it is marked up.
928 @item muse-book-after-publish-hook
929 A hook run in the book buffer after it is marked up.
931 @item muse-book-latex-header
932 Header used for publishing books to LaTeX.
934 @item muse-book-latex-footer
935 Footer used for publishing books to LaTeX.
937 @end table
939 @node DocBook, HTML, Book, Publishing Styles
940 @comment  node-name,  next,  previous,  up
941 @section Publishing in DocBook XML form
943 This publishing style is used to generate DocBook XML files.
945 @emph{Styles provided}
947 @table @code
949 @cindex publishing styles, docbook
950 @item docbook
952 @end table
954 @emph{Options provided}
956 @table @code
958 @item muse-docbook-extension
959 Default file extension for publishing DocBook XML files.
961 @item muse-docbook-header
962 Header used for publishing DocBook XML files.
964 @item muse-docbook-footer
965 Footer used for publishing DocBook XML files.
967 @item muse-docbook-publishing-regexps
968 List of markup rules for publishing a Muse page to DocBook XML.
970 @item muse-docbook-markup-function
971 An alist of style types to custom functions for that kind of text.
973 @item muse-docbook-publishing-strings
974 Strings used for marking up text.
976 These cover the most basic kinds of markup, the handling of which
977 differs little between the various styles.
979 @item muse-docbook-markup-specials
980 A table of characters which must be represented specially.
982 @end table
984 @node HTML, Journal, DocBook, Publishing Styles
985 @comment  node-name,  next,  previous,  up
986 @section Publishing in HTML or XHTML form
988 This publishing style is capable of producing HTML or XHTML documents.
990 @emph{Styles provided}
992 @table @code
994 @cindex publishing styles, html
995 @item html
996 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
998 @item xhtml
999 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1001 @end table
1003 @emph{Options provided}
1005 If an HTML option does not have a corresponding XHTML option, it will
1006 be used for both of these publishing styles.
1008 @table @code
1010 @item muse-html-extension
1011 Default file extension for publishing HTML files.
1013 @item muse-html-style-sheet
1014 Store your stylesheet definitions here.
1016 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1017 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1018 @verb{|<lisp>|} markup tags.
1020 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1021 properly.
1023 @item muse-html-header
1024 Header used for publishing HTML files.
1026 @item muse-html-footer
1027 Footer used for publishing HTML files.
1029 @item muse-xhtml-header
1030 Header used for publishing XHTML files.
1032 @item muse-xhtml-footer
1033 Footer used for publishing XHTML files.
1035 @item muse-html-anchor-on-word
1036 When true, anchors surround the closest word.
1038 This allows you to select them in a browser (i.e. for pasting), but has
1039 the side-effect of marking up headers in multiple colors if your header
1040 style is different from your link style.
1042 @item muse-html-table-attributes
1043 The attribute to be used with HTML @verb{|<table>|} tags.
1045 Note that since Muse supports direct insertion of HTML tags, you can
1046 easily create any kind of table you want, as long as each line begins at
1047 column 0 (to prevent it from being blockquoted).
1049 @item muse-html-markup-regexps
1050 List of markup rules for publishing a Muse page to HTML.
1052 @item muse-html-markup-functions
1053 An alist of style types to custom functions for that kind of text.
1055 @item muse-html-markup-strings
1056 Strings used for marking up text as HTML.
1058 These cover the most basic kinds of markup, the handling of which
1059 differs little between the various styles.
1061 @item muse-xhtml-markup-strings
1062 Strings used for marking up text as XHTML.
1064 These cover the most basic kinds of markup, the handling of which
1065 differs little between the various styles.
1067 @item muse-html-markup-tags
1068 A list of tag specifications, for specially marking up HTML.
1069 @xref{muse-publish-markup-tags}, for more information.
1071 @item muse-html-markup-specials
1072 A table of characters which must be represented specially.  By default,
1073 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1075 @item muse-html-meta-http-equiv
1076 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1078 @item muse-html-meta-content-type
1079 The content type used for the HTML @verb{|<meta>|} tag.
1081 If you are striving for XHTML 1.1 compliance, you may want to change
1082 this to ``application/xhtml+xml''.
1084 @item muse-html-meta-content-encoding
1085 The charset to append to the HTML @verb{|<meta>|} tag.
1087 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1088 and determine the HTML charset from emacs's coding.  If set to a string,
1089 this string will be used to force a particular charset.
1091 @item muse-html-charset-default
1092 The default HTML meta charset to use if no translation is found in
1093 @code{muse-html-encoding-map}.
1095 @item muse-html-encoding-default
1096 The default Emacs buffer encoding to use in published files.
1097 This will be used if no special characters are found.
1099 @item muse-html-encoding-map
1100 An alist mapping emacs coding systems to appropriate HTML charsets.
1101 Use the base name of the coding system (i.e. without the -unix).
1103 @end table
1105 @node Journal, LaTeX, HTML, Publishing Styles
1106 @comment  node-name,  next,  previous,  up
1107 @section Keeping a journal or blog
1108 @cindex journal
1109 @cindex blog, journal style
1111 The module facilitates the keeping and publication of a journal.  When
1112 publishing to HTML, it assumes the form of a web log, or blog.
1114 The input format for each entry is as follows.
1116 @example
1117   * 20040317: Title of entry
1119   Text for the entry.
1121   <qotd>
1122   "You know who you are. It comes down to a simple gut check: You
1123   either love what you do or you don't. Period." -- P. Bronson
1124   </qotd>
1125 @end example
1127 The "qotd", or Quote of the Day, is entirely optional.  When generated
1128 to HTML, this entry is rendered as the following.
1130 @example
1131   <div id="entry">
1132     <div id="entry-qotd">
1133       <h3>Quote of the Day:</h3>
1134       <p>"You know who you are. It comes down to a simple gut
1135         check: You either love what you do or you don't. Period."
1136         -- P. Bronson</p>
1137     </div>
1138     <div id="entry-body">
1139       <div id="entry-head">
1140         <div id="entry-date">
1141           <span class="date">March 17, 2004</span>
1142         </div>
1143         <div id="entry-title">
1144           <h2>Title of entry</h2>
1145         </div>
1146       </div>
1147       <div id="entry-text">
1148         <p>Text for the entry.</p>
1149       </div>
1150     </div>
1151   </div>
1152 @end example
1154 The plurality of "div" tags makes it possible to display the entries in
1155 any form you wish, using a CSS style.
1157 Also, an .RDF file can be generated from your journal by publishing it
1158 with the "rdf" style.  It uses the first two sentences of the first
1159 paragraph of each entry as its "description", and auto-generates tags
1160 for linking to the various entries.
1162 @emph{Styles provided}
1164 @table @code
1166 @cindex publishing styles, journal-html
1167 @item journal-html
1168 Publish journal entries as an HTML document.
1170 @cindex publishing styles, journal-xhtml
1171 @item journal-xhtml
1172 Publish journal entries as an XHTML document.
1174 @cindex publishing styles, journal-latex
1175 @item journal-latex
1176 Publish journal entries as a LaTeX document.
1178 @cindex publishing styles, journal-pdf
1179 @item journal-pdf
1180 Publish journal entries as a PDF document.
1182 @cindex publishing styles, journal-book-latex
1183 @item journal-book-latex
1184 Publish journal entries as a LaTeX book.
1186 @cindex publishing styles, journal-book-pdf
1187 @item journal-book-pdf
1188 Publish journal entries as a PDF book.
1190 @cindex publishing styles, journal-rdf
1191 @cindex publishing styles, RSS 1.0
1192 @item journal-rdf
1193 Publish journal entries as an RDF file (RSS 1.0).
1195 @cindex publishing styles, journal-rss
1196 @cindex publishing styles, RSS 2.0
1197 @item journal-rss
1198 Publish journal entries as an RSS file (RSS 2.0).
1200 @end table
1202 @emph{Options provided}
1204 @table @code
1206 @item muse-journal-heading-regexp
1207 A regexp that matches a journal heading.
1209 Paren group 1 is the ISO date, group 2 is the optional category, and
1210 group 3 is the optional heading for the entry.
1212 @item muse-journal-date-format
1213 Date format to use for journal entries.
1215 @item muse-journal-html-heading-regexp
1216 A regexp that matches a journal heading from an HTML document.
1218 Paren group 1 is the ISO date, group 2 is the optional category, and
1219 group 3 is the optional heading for the entry.
1221 @item muse-journal-html-entry-template
1222 Template used to publish individual journal entries as HTML.
1224 @item muse-journal-latex-section
1225 Template used to publish a LaTeX section.
1227 @item muse-journal-latex-subsection
1228 Template used to publish a LaTeX subsection.
1230 @item muse-journal-latex-markup-tags
1231 A list of tag specifications, for specially marking up LaTeX.
1233 @xref{muse-publish-markup-tags}, for more information.
1235 @item muse-journal-rdf-extension
1236 Default file extension for publishing RDF (RSS 1.0) files.
1238 @item muse-journal-rdf-base-url
1239 The base URL of the website referenced by the RDF file.
1241 @item muse-journal-rdf-header
1242 Header used for publishing RDF (RSS 1.0) files.
1244 @item muse-journal-rdf-footer
1245 Footer used for publishing RDF (RSS 1.0) files.
1247 @item muse-journal-rdf-date-format
1248 Date format to use for RDF entries.
1250 @item muse-journal-rdf-entry-template
1251 Template used to publish individual journal entries as RDF.
1253 @item muse-journal-rdf-summarize-entries
1254 If non-nil, include only summaries in the RDF file, not the full data.
1256 @item muse-journal-rss-extension
1257 Default file extension for publishing RSS 2.0 files.
1259 @item muse-journal-rss-base-url
1260 The base URL of the website referenced by the RSS file.
1262 @item muse-journal-rss-header
1263 Header used for publishing RSS 2.0 files.
1265 @item muse-journal-rss-footer
1266 Footer used for publishing RSS 2.0 files.
1268 @item muse-journal-rss-date-format
1269 Date format to use for RSS 2.0 entries.
1271 @item muse-journal-rss-entry-template
1272 Template used to publish individual journal entries as RSS 2.0.
1274 @item muse-journal-rss-enclosure-types-alist
1275 File types that are accepted as RSS enclosures.
1277 This is an alist that maps file extension to content type.
1279 Useful for podcasting.
1281 @item muse-journal-rss-summarize-entries
1282 If non-nil, include only summaries in the RSS file, not the full data.
1284 Many RSS subscribers find this annoying.
1286 @item muse-journal-rss-markup-regexps
1287 List of markup rules for publishing a Muse journal page to RSS.
1289 For more information on the structure of this list,
1290 @xref{muse-publish-markup-regexps}.
1292 @item muse-journal-rss-markup-functions
1293 An alist of style types to custom functions for that kind of text.
1295 For more on the structure of this list,
1296 @xref{muse-publish-markup-functions}.
1298 @end table
1300 @node LaTeX, Poem, Journal, Publishing Styles
1301 @comment  node-name,  next,  previous,  up
1302 @section Publishing LaTeX documents
1304 This publishing style is capable of producing LaTeX or PDF documents.
1306 If you wish to publish PDF documents, you will need to have a good TeX
1307 installation.  For Debian, this can be accomplished by installing the
1308 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1310 @emph{Styles provided}
1312 @table @code
1314 @cindex publishing styles, latex
1315 @item latex
1316 Publish a LaTeX document.
1318 @cindex publishing styles, pdf
1319 @item pdf
1320 Publish a PDF document, using an external LaTeX document conversion
1321 tool.
1323 @cindex publishing styles, latexcjk
1324 @item latexcjk
1325 Publish a LaTeX document with CJK (Chinese) encodings.
1327 @cindex publishing styles, pdfcjk
1328 @item pdfcjk
1329 Publish a PDF document with CJK (Chinese) encodings, using an external
1330 LaTeX document conversion tool.
1332 @end table
1334 @emph{Options provided}
1336 @table @code
1338 @item muse-latex-extension
1339 Default file extension for publishing LaTeX files.
1341 @item muse-latex-pdf-extension
1342 Default file extension for publishing LaTeX files to PDF.
1344 @item muse-latex-header
1345 Header used for publishing LaTeX files.
1347 @item muse-latex-footer
1348 Footer used for publishing LaTeX files.
1350 @item muse-latexcjk-header
1351 Header used for publishing LaTeX files (CJK).
1353 @item muse-latexcjk-footer
1354 Footer used for publishing LaTeX files (CJK).
1356 @item muse-latex-markup-regexps
1357 List of markup regexps for identifying regions in a Muse page.
1359 For more on the structure of this list,
1360 @xref{muse-publish-markup-regexps}.
1362 @item muse-latex-markup-functions
1363 An alist of style types to custom functions for that kind of text.
1365 For more on the structure of this list,
1366 @xref{muse-publish-markup-functions}.
1368 @item muse-latex-markup-strings
1369 Strings used for marking up text.
1371 These cover the most basic kinds of markup, the handling of which
1372 differs little between the various styles.
1374 @item muse-latexcjk-encoding-map
1375 An alist mapping emacs coding systems to appropriate CJK codings.
1376 Use the base name of the coding system (ie, without the -unix).
1378 @item muse-latexcjk-encoding-default
1379 The default Emacs buffer encoding to use in published files.
1381 This will be used if no special characters are found.
1383 @item muse-latex-markup-specials
1384 A table of characters which must be represented specially.
1386 @end table
1388 @node Poem, Texinfo, LaTeX, Publishing Styles
1389 @comment  node-name,  next,  previous,  up
1390 @section Publish a poem to LaTex or PDF
1392 The @code{muse-poem} module makes it easy to attractively publish and
1393 reference poems in the following format, using the "memoir" module for
1394 LaTeX publishing.  It will also markup poems for every other output
1395 style, though none are nearly as pretty.
1397 @example
1398 Title
1401 Body of poem
1404 Annotations, history, notes, etc.
1405 @end example
1407 Once a poem is written in this format, just publish it to PDF using the
1408 @code{poem-pdf} style.  To make an inlined reference to a poem that
1409 you've written -- for example, from a blog page -- there is a "poem" tag
1410 defined by this module.
1412 @example
1413 <poem title="name.of.poem.page">
1414 @end example
1416 Let's assume the template above was called @file{name.of.poem.page};
1417 then the above tag would result in this inclusion.
1419 @example
1420 ** Title
1422 > Body of poem
1423 @end example
1425 John Wiegley uses this module for publishing all of the poems on his
1426 website, which are at
1427 @uref{http://www.newartisans.com/johnw/poems.html}.
1429 @emph{Styles provided}
1431 @table @code
1433 @cindex publishing styles, poem-latex
1434 @item poem-latex
1435 Publish a poem in LaTeX form.
1437 @cindex publishing styles, poem-pdf
1438 @item poem-pdf
1439 Publish a poem to a PDF document.
1441 @cindex publishing styles, chapbook-latex
1442 @item chapbook-latex
1443 Publish a book of poems in LaTeX form.
1445 @cindex publishing styles, chapbook-pdf
1446 @item chapbook-pdf
1447 Publish a book of poems to a PDF document.
1449 @end table
1451 @emph{Options provided}
1453 @table @code
1455 @item muse-poem-latex-header
1456 Header used for publishing LaTeX poems.
1458 @item muse-poem-latex-footer
1459 Footer used for publishing LaTeX files.
1461 @item muse-poem-markup-strings
1462 Strings used for marking up poems.
1464 These cover the most basic kinds of markup, the handling of which
1465 differs little between the various styles.
1467 @item muse-chapbook-latex-header
1468 Header used for publishing a book of poems in LaTeX form.
1470 @item muse-chapbook-latex-footer
1471 Footer used for publishing a book of poems in LaTeX form.
1473 @item muse-poem-chapbook-strings
1474 Strings used for marking up books of poems.
1476 These cover the most basic kinds of markup, the handling of which
1477 differs little between the various styles.
1479 @end table
1481 @node Texinfo, Common Elements, Poem, Publishing Styles
1482 @comment  node-name,  next,  previous,  up
1483 @section Publish entries to Texinfo format or PDF
1485 Rules for publishing a Muse file as a Texinfo article.
1487 @emph{Styles provided}
1489 @table @code
1491 @cindex publishing styles, texi
1492 @item texi
1493 Publish a file in Texinfo form.
1495 @cindex publishing styles, texi
1496 @item info
1497 Generate an Info file from a Muse file.
1499 @cindex publishing styles, info-pdf
1500 @item info-pdf
1501 Publish a file in PDF form.
1503 @end table
1505 @emph{Options provided}
1507 @table @code
1509 @item muse-texinfo-process-natively
1510 If non-nil, use the Emacs `texinfmt' module to make Info files.
1512 @item muse-texinfo-extension
1513 Default file extension for publishing Texinfo files.
1515 @item muse-texinfo-info-extension
1516 Default file extension for publishing Info files.
1518 @item muse-texinfo-pdf-extension
1519 Default file extension for publishing PDF files.
1521 @item muse-texinfo-header
1522 Text to prepend to a Muse page being published as Texinfo.
1524 This text may contain @verb{|<lisp>|} markup tags.
1526 @item muse-texinfo-footer
1527 Text to append to a Muse page being published as Texinfo.
1529 This text may contain @verb{|<lisp>|} markup tags.
1531 @item muse-texinfo-markup-regexps
1532 List of markup rules for publishing a Muse page to Texinfo.
1534 For more on the structure of this list,
1535 @xref{muse-publish-markup-regexps}.
1537 @item muse-texinfo-markup-functions
1538 An alist of style types to custom functions for that kind of text.
1540 For more on the structure of this list, see
1541 @xref{muse-publish-markup-functions}.
1543 @item muse-texinfo-markup-strings
1544 Strings used for marking up text.
1546 These cover the most basic kinds of markup, the handling of which
1547 differs little between the various styles.
1549 @item muse-texinfo-markup-specials
1550 A table of characters which must be represented specially.
1552 @end table
1554 @node Common Elements, Deriving Styles, Texinfo, Publishing Styles
1555 @comment  node-name,  next,  previous,  up
1556 @section Common functionality shared by styles
1557 @cindex publishing styles, common
1559 @table @code
1561 @cindex publishing, markup functions
1562 @anchor{muse-publish-markup-functions}
1563 @item muse-publish-markup-functions
1564 An alist of style types to custom functions for that kind of text.
1566 This is used by publishing styles to attempt to minimize the amount of
1567 custom regexps that each has to define.  @file{muse-publish} provides
1568 rules for the most common types of markup.
1570 Each member of the list is of the following form.
1572 @example
1573   (SYMBOL FUNCTION)
1574 @end example
1576 @itemize @bullet
1577 @item SYMBOL
1578 Describes the type of text to associate with this rule.
1579 @code{muse-publish-markup-regexps} maps regexps to these symbols.
1581 @item FUNCTION
1582 Function to use to mark up this kind of rule if no suitable function is
1583 found through the @option{:functions} tag of the current style.
1584 @end itemize
1586 @cindex publishing, markup regexps
1587 @anchor{muse-publish-markup-regexps}
1588 @item muse-publish-markup-regexps
1589 List of markup rules for publishing a page with Muse.
1591 The rules given in this variable are invoked first, followed by whatever
1592 rules are specified by the current style.
1594 Each member of the list is either a function, or a list of the following
1595 form.
1597 @example
1598   (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
1599 @end example
1601 @itemize @bullet
1602 @item REGEXP
1603 A regular expression, or symbol whose value is a regular expression,
1604 which is searched for using `re-search-forward'.
1606 @item TEXT-BEGIN-GROUP
1607 The matching group within that regexp which denotes the beginning of the
1608 actual text to be marked up.
1610 @item REPLACEMENT-TEXT
1611 A string that will be passed to `replace-match'.
1613 If it is not a string, but a function, it will be called to determine
1614 what the replacement text should be (it must return a string).  If it is
1615 a symbol, the value of that symbol should be a string.
1616 @end itemize
1618 The replacements are done in order, one rule at a time.  Writing
1619 the regular expressions can be a tricky business.  Note that case
1620 is never ignored.  `case-fold-search' is always bound to nil
1621 while processing the markup rules.
1623 @cindex publishing, markup tags
1624 @anchor{muse-publish-markup-tags}
1625 @item muse-publish-markup-tags
1626 A list of tag specifications, for specially marking up text.
1628 XML-style tags are the best way to add custom markup to Muse.  This is
1629 easily accomplished by customizing this list of markup tags.
1631 For each entry, the name of the tag is given, whether it expects a
1632 closing tag and/or an optional set of attributes, and a function that
1633 performs whatever action is desired within the delimited region.
1635 The tags themselves are deleted during publishing, before the function
1636 is called.  The function is called with three arguments, the beginning
1637 and end of the region surrounded by the tags.  If properties are
1638 allowed, they are passed as a third argument in the form of an alist.
1639 The `end' argument to the function is always a marker.
1641 Point is always at the beginning of the region within the tags, when the
1642 function is called.  Wherever point is when the function finishes is
1643 where tag markup will resume.
1645 These tag rules are processed once at the beginning of markup, and once
1646 at the end, to catch any tags which may have been inserted in-between.
1648 @end table
1650 @node Deriving Styles, , Common Elements, Publishing Styles
1651 @comment  node-name,  next,  previous,  up
1652 @section Deriving a new style from an existing one
1653 @cindex publishing styles, deriving
1655 To create a new style from an existing one, use @code{muse-derive-style}
1656 as follows.  This is a good way to fix something you don't like about a
1657 particular publishing style, or to personalize it.
1659 @example
1660 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
1661 @end example
1663 The derived name is a string defining the new style, such as "my-html".
1664 The base name must identify an existing style, such as "html" -- if you
1665 have loaded @file{muse-html}.  The style parameters are the same as
1666 those used to create a style, except that they override whatever
1667 definitions exist in the base style.  However, some definitions only
1668 partially override.  The following parameters support partial
1669 overriding.
1671 @table @option
1673 @item :functions
1674 If a markup function is not found in the derived style's function list,
1675 the base style's function list will be queried.
1677 @item :strings
1678 If a markup string is not found in the derived style's string list, the
1679 base style's string list will be queried.
1681 @item :before
1682 If this option is specified, it will be consulted rather than the
1683 corresponding value in the derived style.  This applies to the following
1684 options as well.
1686 @item :before-end
1688 @item :after
1690 @end table
1693 @node Getting Help and Reporting Bugs, History, Publishing Styles, Top
1694 @comment  node-name,  next,  previous,  up
1695 @chapter Getting Help and Reporting Bugs
1696 @cindex help, getting
1697 @cindex bugs, reporting
1699 After you have read this guide, if you still have questions about
1700 Muse, or if you have bugs to report, there are several places you can
1703 @itemize @bullet
1705 @item
1706 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
1707 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
1708 to it.
1710 @item
1711 @uref{http://www.mwolson.org/projects/MuseMode.html} is the web page
1712 that Michael Olson (the current maintainer) made for Muse.
1714 @item
1715 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
1716 using the subscription form at
1717 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
1718 This mailing list provides support for Muse, @command{Planner} and
1719 @command{emacs-wiki}, which is the predecessor of Muse.
1721 There are additional methods for accessing the mailing list, adding
1722 content to it, and searching it.  Consult
1723 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
1724 more information.
1726 @item
1727 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
1728 contributors are frequently around and willing to answer your
1729 questions.  The @samp{#muse} channel is also available for
1730 Muse-specific help, and its current maintainer hangs out there.
1732 @item
1733 The maintainer of MuseMode, Michael Olson, may be contacted at
1734 @email{mwolson@@gnu.org}.
1736 @end itemize
1738 @node History, Contributors, Getting Help and Reporting Bugs, Top
1739 @comment  node-name,  next,  previous,  up
1740 @chapter History of This Document
1741 @cindex history, of Muse
1743 @itemize
1744 @item 2004
1745 John Wiegley started Muse upon realizing that EmacsWiki had some serious
1746 limitations. Around February 2004, he started making "emacs-wiki version
1747 3.00 APLHA", which eventually became known as Muse.
1749 Most of those who frequent the emacs-wiki mailing list continued to use
1750 emacs-wiki, mainly because Planner hasn't been ported over to it.
1752 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
1753 John Wiegley's request.
1755 @item 2005
1756 Michael Olson overhauled this document and added many new sections in
1757 preparation for the first release of Muse (3.01).
1759 @end itemize
1761 @node Contributors, GNU General Public License, History, Top
1762 @comment  node-name,  next,  previous,  up
1763 @chapter Contributors to This Documentation
1764 @cindex contributors
1766 The first draft of this document was taken from the emacs-wiki texinfo
1767 manual.  Michael Olson adapted it for Muse and added most of its
1768 content.
1770 John Sullivan did a majority of the work on the emacs-wiki texinfo
1771 manual.
1773 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
1774 emacs-wiki texinfo manual.
1776 @node GNU General Public License, Concept Index, Contributors, Top
1777 @comment  node-name,  next,  previous,  up
1778 @appendix GNU GENERAL PUBLIC LICENSE
1779 @center Version 2, June 1991
1780 @cindex GPL
1781 @cindex GNU General Public License
1783 @c This file is intended to be included in another file.
1785 @display
1786 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1787 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1789 Everyone is permitted to copy and distribute verbatim copies
1790 of this license document, but changing it is not allowed.
1791 @end display
1793 @appendixsec Preamble
1795   The licenses for most software are designed to take away your
1796 freedom to share and change it.  By contrast, the GNU General Public
1797 License is intended to guarantee your freedom to share and change free
1798 software---to make sure the software is free for all its users.  This
1799 General Public License applies to most of the Free Software
1800 Foundation's software and to any other program whose authors commit to
1801 using it.  (Some other Free Software Foundation software is covered by
1802 the GNU Library General Public License instead.)  You can apply it to
1803 your programs, too.
1805   When we speak of free software, we are referring to freedom, not
1806 price.  Our General Public Licenses are designed to make sure that you
1807 have the freedom to distribute copies of free software (and charge for
1808 this service if you wish), that you receive source code or can get it
1809 if you want it, that you can change the software or use pieces of it
1810 in new free programs; and that you know you can do these things.
1812   To protect your rights, we need to make restrictions that forbid
1813 anyone to deny you these rights or to ask you to surrender the rights.
1814 These restrictions translate to certain responsibilities for you if you
1815 distribute copies of the software, or if you modify it.
1817   For example, if you distribute copies of such a program, whether
1818 gratis or for a fee, you must give the recipients all the rights that
1819 you have.  You must make sure that they, too, receive or can get the
1820 source code.  And you must show them these terms so they know their
1821 rights.
1823   We protect your rights with two steps: (1) copyright the software, and
1824 (2) offer you this license which gives you legal permission to copy,
1825 distribute and/or modify the software.
1827   Also, for each author's protection and ours, we want to make certain
1828 that everyone understands that there is no warranty for this free
1829 software.  If the software is modified by someone else and passed on, we
1830 want its recipients to know that what they have is not the original, so
1831 that any problems introduced by others will not reflect on the original
1832 authors' reputations.
1834   Finally, any free program is threatened constantly by software
1835 patents.  We wish to avoid the danger that redistributors of a free
1836 program will individually obtain patent licenses, in effect making the
1837 program proprietary.  To prevent this, we have made it clear that any
1838 patent must be licensed for everyone's free use or not licensed at all.
1840   The precise terms and conditions for copying, distribution and
1841 modification follow.
1843 @iftex
1844 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1845 @end iftex
1846 @ifinfo
1847 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1848 @end ifinfo
1850 @enumerate 0
1851 @item
1852 This License applies to any program or other work which contains
1853 a notice placed by the copyright holder saying it may be distributed
1854 under the terms of this General Public License.  The ``Program'', below,
1855 refers to any such program or work, and a ``work based on the Program''
1856 means either the Program or any derivative work under copyright law:
1857 that is to say, a work containing the Program or a portion of it,
1858 either verbatim or with modifications and/or translated into another
1859 language.  (Hereinafter, translation is included without limitation in
1860 the term ``modification''.)  Each licensee is addressed as ``you''.
1862 Activities other than copying, distribution and modification are not
1863 covered by this License; they are outside its scope.  The act of
1864 running the Program is not restricted, and the output from the Program
1865 is covered only if its contents constitute a work based on the
1866 Program (independent of having been made by running the Program).
1867 Whether that is true depends on what the Program does.
1869 @item
1870 You may copy and distribute verbatim copies of the Program's
1871 source code as you receive it, in any medium, provided that you
1872 conspicuously and appropriately publish on each copy an appropriate
1873 copyright notice and disclaimer of warranty; keep intact all the
1874 notices that refer to this License and to the absence of any warranty;
1875 and give any other recipients of the Program a copy of this License
1876 along with the Program.
1878 You may charge a fee for the physical act of transferring a copy, and
1879 you may at your option offer warranty protection in exchange for a fee.
1881 @item
1882 You may modify your copy or copies of the Program or any portion
1883 of it, thus forming a work based on the Program, and copy and
1884 distribute such modifications or work under the terms of Section 1
1885 above, provided that you also meet all of these conditions:
1887 @enumerate a
1888 @item
1889 You must cause the modified files to carry prominent notices
1890 stating that you changed the files and the date of any change.
1892 @item
1893 You must cause any work that you distribute or publish, that in
1894 whole or in part contains or is derived from the Program or any
1895 part thereof, to be licensed as a whole at no charge to all third
1896 parties under the terms of this License.
1898 @item
1899 If the modified program normally reads commands interactively
1900 when run, you must cause it, when started running for such
1901 interactive use in the most ordinary way, to print or display an
1902 announcement including an appropriate copyright notice and a
1903 notice that there is no warranty (or else, saying that you provide
1904 a warranty) and that users may redistribute the program under
1905 these conditions, and telling the user how to view a copy of this
1906 License.  (Exception: if the Program itself is interactive but
1907 does not normally print such an announcement, your work based on
1908 the Program is not required to print an announcement.)
1909 @end enumerate
1911 These requirements apply to the modified work as a whole.  If
1912 identifiable sections of that work are not derived from the Program,
1913 and can be reasonably considered independent and separate works in
1914 themselves, then this License, and its terms, do not apply to those
1915 sections when you distribute them as separate works.  But when you
1916 distribute the same sections as part of a whole which is a work based
1917 on the Program, the distribution of the whole must be on the terms of
1918 this License, whose permissions for other licensees extend to the
1919 entire whole, and thus to each and every part regardless of who wrote it.
1921 Thus, it is not the intent of this section to claim rights or contest
1922 your rights to work written entirely by you; rather, the intent is to
1923 exercise the right to control the distribution of derivative or
1924 collective works based on the Program.
1926 In addition, mere aggregation of another work not based on the Program
1927 with the Program (or with a work based on the Program) on a volume of
1928 a storage or distribution medium does not bring the other work under
1929 the scope of this License.
1931 @item
1932 You may copy and distribute the Program (or a work based on it,
1933 under Section 2) in object code or executable form under the terms of
1934 Sections 1 and 2 above provided that you also do one of the following:
1936 @enumerate a
1937 @item
1938 Accompany it with the complete corresponding machine-readable
1939 source code, which must be distributed under the terms of Sections
1940 1 and 2 above on a medium customarily used for software interchange; or,
1942 @item
1943 Accompany it with a written offer, valid for at least three
1944 years, to give any third party, for a charge no more than your
1945 cost of physically performing source distribution, a complete
1946 machine-readable copy of the corresponding source code, to be
1947 distributed under the terms of Sections 1 and 2 above on a medium
1948 customarily used for software interchange; or,
1950 @item
1951 Accompany it with the information you received as to the offer
1952 to distribute corresponding source code.  (This alternative is
1953 allowed only for noncommercial distribution and only if you
1954 received the program in object code or executable form with such
1955 an offer, in accord with Subsection b above.)
1956 @end enumerate
1958 The source code for a work means the preferred form of the work for
1959 making modifications to it.  For an executable work, complete source
1960 code means all the source code for all modules it contains, plus any
1961 associated interface definition files, plus the scripts used to
1962 control compilation and installation of the executable.  However, as a
1963 special exception, the source code distributed need not include
1964 anything that is normally distributed (in either source or binary
1965 form) with the major components (compiler, kernel, and so on) of the
1966 operating system on which the executable runs, unless that component
1967 itself accompanies the executable.
1969 If distribution of executable or object code is made by offering
1970 access to copy from a designated place, then offering equivalent
1971 access to copy the source code from the same place counts as
1972 distribution of the source code, even though third parties are not
1973 compelled to copy the source along with the object code.
1975 @item
1976 You may not copy, modify, sublicense, or distribute the Program
1977 except as expressly provided under this License.  Any attempt
1978 otherwise to copy, modify, sublicense or distribute the Program is
1979 void, and will automatically terminate your rights under this License.
1980 However, parties who have received copies, or rights, from you under
1981 this License will not have their licenses terminated so long as such
1982 parties remain in full compliance.
1984 @item
1985 You are not required to accept this License, since you have not
1986 signed it.  However, nothing else grants you permission to modify or
1987 distribute the Program or its derivative works.  These actions are
1988 prohibited by law if you do not accept this License.  Therefore, by
1989 modifying or distributing the Program (or any work based on the
1990 Program), you indicate your acceptance of this License to do so, and
1991 all its terms and conditions for copying, distributing or modifying
1992 the Program or works based on it.
1994 @item
1995 Each time you redistribute the Program (or any work based on the
1996 Program), the recipient automatically receives a license from the
1997 original licensor to copy, distribute or modify the Program subject to
1998 these terms and conditions.  You may not impose any further
1999 restrictions on the recipients' exercise of the rights granted herein.
2000 You are not responsible for enforcing compliance by third parties to
2001 this License.
2003 @item
2004 If, as a consequence of a court judgment or allegation of patent
2005 infringement or for any other reason (not limited to patent issues),
2006 conditions are imposed on you (whether by court order, agreement or
2007 otherwise) that contradict the conditions of this License, they do not
2008 excuse you from the conditions of this License.  If you cannot
2009 distribute so as to satisfy simultaneously your obligations under this
2010 License and any other pertinent obligations, then as a consequence you
2011 may not distribute the Program at all.  For example, if a patent
2012 license would not permit royalty-free redistribution of the Program by
2013 all those who receive copies directly or indirectly through you, then
2014 the only way you could satisfy both it and this License would be to
2015 refrain entirely from distribution of the Program.
2017 If any portion of this section is held invalid or unenforceable under
2018 any particular circumstance, the balance of the section is intended to
2019 apply and the section as a whole is intended to apply in other
2020 circumstances.
2022 It is not the purpose of this section to induce you to infringe any
2023 patents or other property right claims or to contest validity of any
2024 such claims; this section has the sole purpose of protecting the
2025 integrity of the free software distribution system, which is
2026 implemented by public license practices.  Many people have made
2027 generous contributions to the wide range of software distributed
2028 through that system in reliance on consistent application of that
2029 system; it is up to the author/donor to decide if he or she is willing
2030 to distribute software through any other system and a licensee cannot
2031 impose that choice.
2033 This section is intended to make thoroughly clear what is believed to
2034 be a consequence of the rest of this License.
2036 @item
2037 If the distribution and/or use of the Program is restricted in
2038 certain countries either by patents or by copyrighted interfaces, the
2039 original copyright holder who places the Program under this License
2040 may add an explicit geographical distribution limitation excluding
2041 those countries, so that distribution is permitted only in or among
2042 countries not thus excluded.  In such case, this License incorporates
2043 the limitation as if written in the body of this License.
2045 @item
2046 The Free Software Foundation may publish revised and/or new versions
2047 of the General Public License from time to time.  Such new versions will
2048 be similar in spirit to the present version, but may differ in detail to
2049 address new problems or concerns.
2051 Each version is given a distinguishing version number.  If the Program
2052 specifies a version number of this License which applies to it and ``any
2053 later version'', you have the option of following the terms and conditions
2054 either of that version or of any later version published by the Free
2055 Software Foundation.  If the Program does not specify a version number of
2056 this License, you may choose any version ever published by the Free Software
2057 Foundation.
2059 @item
2060 If you wish to incorporate parts of the Program into other free
2061 programs whose distribution conditions are different, write to the author
2062 to ask for permission.  For software which is copyrighted by the Free
2063 Software Foundation, write to the Free Software Foundation; we sometimes
2064 make exceptions for this.  Our decision will be guided by the two goals
2065 of preserving the free status of all derivatives of our free software and
2066 of promoting the sharing and reuse of software generally.
2068 @iftex
2069 @heading NO WARRANTY
2070 @end iftex
2071 @ifinfo
2072 @center NO WARRANTY
2073 @end ifinfo
2075 @item
2076 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2077 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2078 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2079 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2080 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2081 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2082 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2083 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2084 REPAIR OR CORRECTION.
2086 @item
2087 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2088 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2089 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2090 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2091 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2092 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2093 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2094 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2095 POSSIBILITY OF SUCH DAMAGES.
2096 @end enumerate
2098 @iftex
2099 @heading END OF TERMS AND CONDITIONS
2100 @end iftex
2101 @ifinfo
2102 @center END OF TERMS AND CONDITIONS
2103 @end ifinfo
2105 @page
2106 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2108   If you develop a new program, and you want it to be of the greatest
2109 possible use to the public, the best way to achieve this is to make it
2110 free software which everyone can redistribute and change under these terms.
2112   To do so, attach the following notices to the program.  It is safest
2113 to attach them to the start of each source file to most effectively
2114 convey the exclusion of warranty; and each file should have at least
2115 the ``copyright'' line and a pointer to where the full notice is found.
2117 @smallexample
2118 @var{one line to give the program's name and a brief idea of what it does.}
2119 Copyright (C) @var{yyyy}  @var{name of author}
2121 This program is free software; you can redistribute it and/or modify
2122 it under the terms of the GNU General Public License as published by
2123 the Free Software Foundation; either version 2 of the License, or
2124 (at your option) any later version.
2126 This program is distributed in the hope that it will be useful,
2127 but WITHOUT ANY WARRANTY; without even the implied warranty of
2128 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2129 GNU General Public License for more details.
2131 You should have received a copy of the GNU General Public License along
2132 with this program; if not, write to the Free Software Foundation, Inc.,
2133 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2134 @end smallexample
2136 Also add information on how to contact you by electronic and paper mail.
2138 If the program is interactive, make it output a short notice like this
2139 when it starts in an interactive mode:
2141 @smallexample
2142 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2143 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2144 This is free software, and you are welcome to redistribute it
2145 under certain conditions; type `show c' for details.
2146 @end smallexample
2148 The hypothetical commands @samp{show w} and @samp{show c} should show
2149 the appropriate parts of the General Public License.  Of course, the
2150 commands you use may be called something other than @samp{show w} and
2151 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2152 suits your program.
2154 You should also get your employer (if you work as a programmer) or your
2155 school, if any, to sign a ``copyright disclaimer'' for the program, if
2156 necessary.  Here is a sample; alter the names:
2158 @example
2159 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2160 `Gnomovision' (which makes passes at compilers) written by James Hacker.
2162 @var{signature of Ty Coon}, 1 April 1989
2163 Ty Coon, President of Vice
2164 @end example
2166 This General Public License does not permit incorporating your program into
2167 proprietary programs.  If your program is a subroutine library, you may
2168 consider it more useful to permit linking proprietary applications with the
2169 library.  If this is what you want to do, use the GNU Library General
2170 Public License instead of this License.
2173 @node Concept Index,  , GNU General Public License, Top
2174 @comment  node-name,  next,  previous,  up
2175 @unnumbered Index
2177 @printindex cp
2179 @bye
2181 @c Local Variables:
2182 @c ispell-local-pdict: "ispell-dict"
2183 @c End: