Move Debian stuff into its own branch.
[muse-el.git] / muse.texi
blobb2302b39b83146ab182f98a97c709b94f7f8bec5
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename muse.info
4 @settitle Muse
5 @c %**end of header
7 @dircategory Emacs
8 @direntry
9 * Muse: (muse). Authoring and publishing environment for Emacs.
10 @end direntry
12 @syncodeindex fn cp
14 @copying
15 This manual is for the Emacs Muse version 3.02.90 (3.03 RC1).
17 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc.
19 @quotation
20 Permission is granted to copy, distribute and/or modify this document
21 under the terms of the GNU General Public License.
22 @end quotation
23 @end copying
25 @titlepage
26 @title Muse manual
27 @subtitle an authoring and publishing environment
28 @subtitle for GNU Emacs and XEmacs
30 @c The following two commands
31 @c start the copyright page.
32 @page
33 @vskip 0pt plus 1filll
34 @insertcopying
35 @end titlepage
37 @c So the toc is printed at the start
38 @contents
40 @ifnottex
41 @node Top, Preface, (dir), (dir)
42 @comment  node-name,  next,  previous,  up
43 @top Muse
45 @insertcopying
46 @end ifnottex
48 @menu
49 * Preface::                     About the documentation.
50 * Introduction::                What is Muse?
51 * Obtaining Muse::              How to get Muse releases and development
52                                   changes.
53 * Installation::                Compiling and installing Muse.
54 * Getting Started::             Settings for Muse.
55 * Projects::                    Creating and managing Muse projects.
56 * Keystroke Summary::           Keys used in Muse mode.
57 * Markup Rules::                Rules for using markup.
58 * Publishing Styles::           Publishing various types of documents.
59 * Extending Muse::              Making your own publishing styles.
60 * Getting Help and Reporting Bugs::  
61 * History::                     History of this document.
62 * Contributors::                Contributors to this documentation.
63 * GNU General Public License::  The license for this manual and Muse.
64 * Concept Index::               Search for terms.
66 @detailmenu
67  --- The Detailed Node Listing ---
69 How to Get Muse Releases and Development Changes
71 * Releases::                    Released versions of Muse.
72 * Development::                 Latest unreleased development changes.
74 Rules for Using Markup
76 * Paragraphs::                  Paragraphs: centering and quoting.
77 * Headings::                    Levels of headings.
78 * Directives::                  Directives at the beginning of a
79                                   document.
80 * Emphasizing Text::            Bold, italicized, and underlined text.
81 * Footnotes::                   Making notes to be shown at the end.
82 * Verse::                       Indicating poetic stanzas.
83 * Lists::                       Lists of items.
84 * Tables::                      Generation of data tables.
85 * Explicit Links::              Hyperlinks and email addresses with
86                                   descriptions.
87 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
88                                   links.
89 * Images::                      Publishing and displaying images.
90 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
91 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
92                                   for extensibility.
93 * Comments::                    Lines to omit from published output.
94 * Tag Summary::                 Tags that Muse recognizes.
96 Publishing Various Types of Documents
98 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
99 * Book::                        Publishing entries into a compilation.
100 * DocBook::                     Publishing in DocBook XML form.
101 * HTML::                        Publishing in HTML or XHTML form.
102 * Journal::                     Keeping a journal or blog.
103 * LaTeX::                       Publishing LaTeX documents.
104 * Poem::                        Publish a poem to LaTex or PDF.
105 * Texinfo::                     Publish entries to Texinfo format or PDF.
107 Integrating Muse and pyblosxom.cgi
109 * Blosxom Requirements::        Other tools needed to the Blosxom style.
110 * Blosxom Entries::             Format of a Blosxom entry and automation.
111 * Blosxom Options::             Blosxom styles and options provided.
113 Making your own publishing styles
115 * Common Elements::             Common functionality shared by styles.
116 * Deriving Styles::             Deriving a new style from an existing
117                                   one.
119 Common functionality shared by styles
121 * Markup Functions::            Specifying functions to marking up text.
122 * Markup Regexps::              Markup rules for publishing.
123 * Markup Strings::              Strings specific to a publishing style.
124 * Markup Tags::                 Tag specifications for special markup.
125 * Style Elements::              Parameters used for defining styles.
127 @end detailmenu
128 @end menu
130 @node Preface, Introduction, Top, Top
131 @comment  node-name,  next,  previous,  up
132 @chapter About the documentation
134 This document describes Muse, which was written by John Wiegley
135 and is now maintained by Michael Olson.  Several versions of it are
136 available on-line.
138 @itemize @bullet
139 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
140 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
141 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
142 @end itemize
144 @node Introduction, Obtaining Muse, Preface, Top
145 @comment  node-name,  next,  previous,  up
146 @chapter What is Muse?
148 Emacs Muse is an authoring and publishing environment for Emacs.  It
149 simplifies the process of writing documents and publishing them to
150 various output formats.
152 Muse consists of two main parts: an enhanced text-mode for authoring
153 documents and navigating within Muse projects, and a set of publishing
154 styles for generating different kinds of output.
156 This idea is not in any way new. Numerous systems exist -- even one
157 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
158 more modular environment, with a rather simple core, in which "styles"
159 are derived from to create new styles. Much of Muse's overall
160 functionality is optional. For example, you can use the publisher
161 without the major-mode, or the mode without doing any publishing; or if
162 you don't load the Texinfo or LaTeX modules, those styles won't be
163 available.
165 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
166 code has been restructured and rewritten, especially its publishing
167 functions. The focus in this revision is on the authoring and publishing
168 aspects, and the "wikiness" has been removed as a default behavior
169 (available in the optional @file{muse-wiki} module). CamelCase words are
170 no longer special by default.
172 @node Obtaining Muse, Installation, Introduction, Top
173 @comment  node-name,  next,  previous,  up
174 @chapter How to Get Muse Releases and Development Changes
176 @menu
177 * Releases::                    Released versions of Muse.
178 * Development::                 Latest unreleased development changes.
179 @end menu
181 @node Releases, Development, Obtaining Muse, Obtaining Muse
182 @comment  node-name,  next,  previous,  up
183 @section Released versions of Muse
185 Choose to install a release if you want to minimize risk.
187 Errors are corrected in development first.  User-visible changes will be
188 announced on the @email{emacs-wiki-discuss@@nongnu.org} mailing list.
189 This mailing list also provides support for @command{Planner} and
190 @command{emacs-wiki}, which is the predecessor of Muse.
191 @pxref{Getting Help and Reporting Bugs}.
193 @cindex releases, Debian package
194 @cindex Debian package for Muse
195 Debian users can get Muse via apt-get.  The @file{muse-el} package is
196 available both at Michael Olson's Debian repository and the official
197 Debian repository.  To make use of the former, add the following line to
198 your @file{/etc/apt/sources.list} file and run @code{apt-get install
199 muse}.
201 @example
202 deb http://www.mwolson.org/debian/ ./
203 @end example
205 @cindex releases, from source
206 Alternatively, you can download the latest release from
207 @uref{http://www.mwolson.org/static/dist/muse/} .
209 @node Development,  , Releases, Obtaining Muse
210 @comment  node-name,  next,  previous,  up
211 @section Latest unreleased development changes
212 @cindex development
214 Choose the development version if you want to live on the bleeding edge
215 of Muse development or try out new features before release.
217 @cindex arch revision control system, using
218 The Arch revision control system allows you to retrieve previous
219 versions and select specific features and bug fixes.  If you would like
220 to contribute to Muse development, it is highly recommended that you use
221 Arch, but this is not a requirement.
223 If you are new to Arch, you might find this tutorial helpful:
224 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
226 Downloading the Muse module with Arch and staying up-to-date involves
227 the following steps.
229 @enumerate
230 @item Install arch
232 @itemize @bullet
233 @item Debian: @kbd{apt-get install tla}.
234 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
235 @end itemize
237 @item Register the archive.
238 @example
239 tla register-archive -f http://www.mwolson.org/archives/2005
240 @end example
242 @item Download the Muse package.
243 @example
244 # Download Muse into the @file{muse} directory.
245 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
246 @end example
248 @item List upstream changes that are missing from your local copy.
249 Do this whenever you want to see whether new changes have been committed
250 to Muse.
252 @example
253 # Change to the source directory you are interested in.
254 cd muse/
256 # Display the summary of changes
257 tla missing --summary
258 @end example
260 @cindex updating Muse with Arch
261 @item Update to the latest version by replaying missing changes.
262 @example
263 cd muse
264 tla replay
265 @end example
267 @end enumerate
269 There are other ways to interact with the Muse archive.
271 @itemize
272 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
273 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
274 @end itemize
276 The latest development snapshot will be kept up-to-date since it is
277 updated at the same time as the Arch repository.
279 @node Installation, Getting Started, Obtaining Muse, Top
280 @comment  node-name,  next,  previous,  up
281 @chapter Compiling and Installing Muse
283 Muse may be compiled and installed on your machine.
285 @subheading Compilation
287 This is an optional step, since Emacs Lisp source code does not
288 necessarily have to be byte-compiled.  It will yield a speed increase,
289 though.
291 A working copy of Emacs or XEmacs is needed in order to compile the
292 Emacs Muse.  By default, the program that is installed with the name
293 @command{emacs} will be used.
295 If you want to use the @command{xemacs} binary to perform the
296 compilation, you would need to edit @file{Makefile.defs} in the
297 top-level directory as follows.  You can put either a full path to an
298 Emacs or XEmacs binary or just the command name, as long as it is in the
299 @env{PATH}.
301 @example
302 EMACS    = xemacs
303 SITEFLAG = -no-site-file
304 @end example
306 Running @code{make} should compile the Muse source files in the
307 @file{lisp} directory.
309 @subheading Installation
311 Muse may be installed into your file hierarchy by doing the following.
313 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
314 where you want the source and compiled Muse files to be installed and
315 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
316 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
317 Compilation section if you are using XEmacs.
319 If you are installing Muse on a Debian system, you might want to change
320 the value of @env{INSTALLINFO} as specified in @file{Makefile.defs}.
322 If you wish to install Muse to different locations than the defaults
323 specify, edit @file{Makefile.defs} accordingly.
325 Run @code{make} as a normal user.
327 Run @code{make install} as the root user if you have chosen installation
328 locations that require this.
331 @node Getting Started, Projects, Installation, Top
332 @comment  node-name,  next,  previous,  up
333 @chapter Getting Started
334 @cindex settings
336 To use Muse, add the directory containing its files to your
337 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
338 the authoring mode, and the styles you wish to publish to.  An example
339 follows.
341 @lisp
342 (add-to-list 'load-path "<path to Muse>")
344 (require 'muse-mode)     ; load authoring mode
346 (require 'muse-html)     ; load publishing styles I use
347 (require 'muse-latex)
348 (require 'muse-texinfo)
349 (require 'muse-docbook)
350 @end lisp
352 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
353 an input document to any available style.  If you enable
354 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
355 command will be bound to @kbd{C-c C-t}.
357 If the currently opened file is part of a defined project in
358 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
360 You should also type @kbd{M-x customize-group}, and give the name
361 @samp{muse}.  Each of the options has its own documentation.
364 @node Projects, Keystroke Summary, Getting Started, Top
365 @comment  node-name,  next,  previous,  up
366 @chapter Creating and Managing Muse Projects
367 @cindex projects
369 Often you will want to publish all the files within a directory to a
370 particular set of output styles automatically.  To support, Muse
371 allows for the creations of "projects".  Here is a sample project, to
372 be defined in your @file{.emacs} file.
374 @lisp
375 (require 'muse-project)
377 (setq muse-project-alist
378       '(("website"                      ; my various writings
379          ("~/Pages" :default "index")
380          (:base "html" :path "~/public_html")
381          (:base "pdf" :path "~/public_html/pdf"))))
382 @end lisp
384 The above defines a project named "website", whose files are located
385 in the directory @file{~/Pages}.  The default page to visit is
386 @file{index}.  When this project is published, each page will be
387 output as HTML to the directory @file{~/public_html}, and as PDF to
388 the directory @file{~/public_html/pdf}.  Within any project page, you
389 may create a link to other pages using the syntax @samp{[[pagename]]}.
391 By default, Muse expects all project files to have the file extension
392 @file{.muse}. Files without this extension will not be associated with
393 Muse mode and will not be considered part of any project, even if they
394 are within a project directory.
396 If you don't want to use @file{.muse}, you can customize the extension
397 by setting the value of @code{muse-file-extension}.
399 If you don't want to use any extension at all, and want Muse to
400 autodetect project files based on their location, then add the following
401 to your Muse settings file.
403 @lisp
404 (setq muse-file-extension nil
405       muse-mode-auto-p t)
406 @end lisp
408 @c PRE3_03: Give more examples
409 @c PRE3_03: Describe :set and other options fully
411 @node Keystroke Summary, Markup Rules, Projects, Top
412 @comment  node-name,  next,  previous,  up
413 @chapter Keys Used in Muse Mode
414 @cindex keystrokes
416 This is a summary of keystrokes available in every Muse buffer.
418 @table @kbd
420 @item C-c C-a (`muse-index')
421 Display an index of all known Muse pages.
423 @item C-c C-b (`muse-find-backlinks')
424 Find all pages that link to this page.
426 @item C-c C-e (`muse-edit-link-at-point')
427 Edit link at point.
429 @item C-c C-f (`muse-project-find-file')
430 Open another Muse page.  Prompt for the name.
432 @item C-c C-i (`muse-insert-tag')
433 Insert a tag interactively.
435 @item C-c C-l (`font-lock-mode')
436 Toggle font lock / highlighting for the current buffer.
438 @item C-c C-p (`muse-project-publish')
439 Publish any Muse pages that have changed.
441 @item C-c C-s (`muse-search')
442 Find text in all files of the current project.
444 @item C-c C-v (`muse-browse-result')
445 Show the published result of this page.
447 @item C-c i l (`muse-insert-relative-link-to-file')
448 Insert a link to a file interactively.
450 @item C-c i t (`muse-insert-tag'), also C-c TAB
451 Insert a tag interactively.
453 @item C-c = (`muse-what-changed')
454 Diff this page against the last backup version.
456 @item C-c TAB (`muse-insert-tag'), also C-c i t
457 Insert a tag interactively.
459 @item TAB
460 Move to the next Wiki reference.
462 @item S-TAB
463 Move to the previous Wiki reference.
465 @item M-TAB
466 Complete the name of a page from the current project at point.
468 @item M-RET
469 Insert a new list item at point, indenting properly.
471 @item C-<
472 Decrease the indentation of the list item at point.
474 @item C->
475 Increase the indentation of the list item at point.
477 @end table
480 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
481 @comment  node-name,  next,  previous,  up
482 @chapter Rules for Using Markup
483 @cindex markup
485 A Muse document uses special, contextual markup rules to determine how
486 to format the output result.  For example, if a paragraph is indented,
487 Muse assumes it should be quoted.
489 There are not too many markup rules, and all of them strive to be as
490 simple as possible so that you can focus on document creation, rather
491 than formatting.
493 @menu
494 * Paragraphs::                  Paragraphs: centering and quoting.
495 * Headings::                    Levels of headings.
496 * Directives::                  Directives at the beginning of a
497                                   document.
498 * Emphasizing Text::            Bold, italicized, and underlined text.
499 * Footnotes::                   Making notes to be shown at the end.
500 * Verse::                       Indicating poetic stanzas.
501 * Lists::                       Lists of items.
502 * Tables::                      Generation of data tables.
503 * Explicit Links::              Hyperlinks and email addresses with
504                                   descriptions.
505 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
506                                   links.
507 * Images::                      Publishing and displaying images.
508 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
509 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
510                                   for extensibility.
511 * Comments::                    Lines to omit from published output.
512 * Tag Summary::                 Tags that Muse recognizes.
513 @end menu
515 @node Paragraphs, Headings, Markup Rules, Markup Rules
516 @comment  node-name,  next,  previous,  up
517 @section Paragraphs: centering and quoting
518 @cindex paragraphs
520 Paragraphs in Muse must be separated by a blank line.
522 @cindex paragraphs, centered
523 @subheading Centered paragraphs and quotations
525 A line that begins with six or more columns of whitespace (either tabs
526 or spaces) indicates a centered paragraph.  Alternatively, you can use
527 the @verb{|<center>|} tag to surround regions that are to be published as
528 centered paragraphs.
530 @cindex paragraphs, quoted
531 @cindex quotations
532 But if a line begins with whitespace, though less than six columns, it
533 indicates a quoted paragraph.  Alternatively, you can use the
534 @verb{|<quote>|} tag to surround regions that are to be published as
535 quoted paragraphs.
537 @cindex examples
538 @cindex monospace, rendering blocks
539 @cindex HTML, rendering blocks in monospace
540 @subheading Literal paragraphs
542 The @verb{|<example>|} tag is used for examples, where whitespace should
543 be preserved, the text rendered in monospace, and any characters special
544 to the output style escaped.
546 @cindex literal text
547 @cindex HTML, inserting a raw block
548 There is also the @verb{|<literal>|} tag, which causes a marked block to
549 be entirely left alone.  This can be used for inserting a hand-coded
550 HTML blocks into HTML output, for example.
552 @node Headings, Directives, Paragraphs, Markup Rules
553 @comment  node-name,  next,  previous,  up
554 @section Levels of headings
555 @cindex headings
557 A heading becomes a chapter or section in printed output -- depending on
558 the style.  To indicate a heading, start a new paragraph with one or
559 more asterices, followed by a space and the heading title.  Then begin
560 another paragraph to enter the text for that section.
562 All levels of headings will be published.  Most publishing styles only
563 distinguish the between the first 4 levels, however.
565 @example
566 * First level
568 ** Second level
570 *** Third level
572 **** Fourth level
573 @end example
575 @node Directives, Emphasizing Text, Headings, Markup Rules
576 @comment  node-name,  next,  previous,  up
577 @section Directives at the beginning of a document
578 @cindex directives
580 Directives are lines beginning with the @samp{#} character that come
581 before any paragraphs or sections in the document.  Directives are of
582 the form ``#directive content of directive''.  You can use any
583 combination of uppercase and lowercase letters for directives, even if
584 the directive is not in the list below.
586 The @code{muse-publishing-directive} function may be used in header and
587 footer text to access directives.  For example, to access the
588 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
590 The following is a list of directives that Muse uses.
592 @table @code
593 @cindex #author
594 @item #author
595 The author of this document.
597 If this is not specified, Muse will attempt to figure it out from the
598 @code{user-full-name} variable.
600 @cindex #date
601 @item #date
602 The date that the document was last modified.
604 This is used by publishing styles that are able to embed the date
605 information.
607 @cindex #desc
608 @item #desc
609 A short description of this document.
611 This is used by the @code{journal} publishing style to embed information
612 inside of an RSS/RDF feed.
614 @cindex #title
615 @item #title
616 The title of this document.
618 If this is not specified, the name of the file is used.
620 @end table
622 @node Emphasizing Text, Footnotes, Directives, Markup Rules
623 @comment  node-name,  next,  previous,  up
624 @section Bold, italicized, and underlined text
625 @cindex emphasizing text
626 @cindex underlining text
627 @cindex italicizing text
628 @cindex verbatim text
629 @cindex monospace, rendering words
631 To emphasize text, surround it with certain specially recognized
632 characters.
634 @example
635 *emphasis*
636 **strong emphasis**
637 ***very strong emphasis***
638 _underlined_
639 =verbatim and monospace=
640 @end example
642 @cindex WYSIWYG
643 While editing a Muse document in Muse mode, these forms of emphasis will
644 be highlighted in a WYSIWYG manner.  Each of these forms may span
645 multiple lines.
647 Verbatim text will be colored as gray by default.  To change this,
648 customize @code{muse-verbatim-face}.
650 You can also use the @verb{|<code>|} tag to indicate verbatim and
651 monospace text.  This is handy for regions that have an ``='' in them.
653 @node Footnotes, Verse, Emphasizing Text, Markup Rules
654 @comment  node-name,  next,  previous,  up
655 @section Making notes to be shown at the end
656 @cindex footnotes
658 A footnote reference is simply a number in square brackets.  To define
659 the footnote, place this definition at the bottom of your file.
660 @samp{footnote-mode} can be used to greatly facilitate the creation of
661 these kinds of footnotes.
663 Footnotes are defined by the same number in brackets occurring at the
664 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
665 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
666 the point of insertion.
668 @node Verse, Lists, Footnotes, Markup Rules
669 @comment  node-name,  next,  previous,  up
670 @section Indicating poetic stanzas
671 @cindex verses
672 @cindex poetry
674 Poetry requires that whitespace be preserved, but without resorting to
675 monospace.  To indicate this, use the following markup, reminiscent of
676 email quotations.
678 @example
679 > A line of Emacs verse;
680 >   forgive its being so terse.
681 @end example
683 You can also use the @verb{|<verse>|} tag, if you prefer.
685 @example
686 <verse>
687 A line of Emacs verse;
688   forgive its being so terse.
689 </verse>
690 @end example
692 @cindex verses, multiple stanzas
693 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
694 follows.
696 @example
697 <verse>
698 A line of Emacs verse;
699   forgive its being so terse.
701 In terms of terse verse,
702   you could do worse.
703 </verse>
704 @end example
706 @node Lists, Tables, Verse, Markup Rules
707 @comment  node-name,  next,  previous,  up
708 @section Lists of items
709 @cindex lists
711 Lists are given using special characters at the beginning of a line.
712 Whitespace must occur before bullets or numbered items, to distinguish
713 from the possibility of those characters occurring in a real sentence.
715 @cindex lists, bullets
716 These are rendered as a bullet list.
718 @example
719 - bullet item one
720 - bullet item two
721 @end example
723 @cindex lists, enumerated
724 An enumerated list follows.
726 @example
727 1. Enum item one
728 2. Enum item two
729 @end example
731 @cindex lists, definitions
732 Here is a definition list.
734 @example
735 Term1 ::
736   This is a first definition
737   And it has two lines;
738   no, make that three.
740 Term2 ::
741   This is a second definition
742 @end example
744 @node Tables, Explicit Links, Lists, Markup Rules
745 @comment  node-name,  next,  previous,  up
746 @section Generation of data tables
747 @cindex tables
749 @cindex tables, simple
750 Only very simple tables are supported.  The syntax is as follows.
752 @example
753 Double bars  || Separate header fields
755 Single bars   | Separate body fields
756 Here are more | body fields
758 Triple bars ||| Separate footer fields
759 @end example
761 Some publishing styles require header fields to come first, then footer
762 fields, and then the body fields.  You can use any order for these
763 sections that you like, and Muse will re-order them for you at
764 publish-time.
766 If you wish to disable table generation for one Muse file, add the
767 directive @samp{#disable-tables t} to the top of the file.
769 @node Explicit Links, Implicit Links, Tables, Markup Rules
770 @comment  node-name,  next,  previous,  up
771 @section Hyperlinks and email addresses with descriptions
772 @cindex links, explicit
774 A hyperlink can reference a URL, or another page within a Muse
775 project.  In addition, descriptive text can be specified, which should
776 be displayed rather than the link text in output styles that supports
777 link descriptions.  The syntax is as follows.
779 @example
780 [[link target][link description]]
781 [[link target without description]]
782 @end example
784 Thus, the current maintainer's homepage for Muse can be found
785 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
786 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
788 @node Implicit Links, Images, Explicit Links, Markup Rules
789 @comment  node-name,  next,  previous,  up
790 @section Bare URLs, WikiNames, and InterWiki links
791 @cindex links, implicit
792 @cindex links, raw
793 @cindex URLs
794 @cindex Email addresses
796 A URL or email address encountered in the input text is published as a
797 hyperlink.  These kind of links are called @dfn{implicit links} because
798 they are not separated from the rest of the Muse document in any way.
800 @cindex WikiNames
801 If the @command{muse-wiki} module is loaded, another form of implicit
802 link will be made available.  WikiNames, which are typed in camelcase,
803 will be highlighted and published as links, provided that the file they
804 refer to exists.
806 Customization of WikiName recognition may be accomplished by editing the
807 @code{muse-wiki-wikiword-regexp} option and subsequently running
808 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
809 If you use the Customize interface, the latter will be done
810 automatically.
812 @cindex InterWiki links
813 @cindex inter-project links
814 The @command{muse-wiki} module also allows for InterWiki links.  These
815 are similar to WikiWords, but they specify both the project and page of
816 a file.  The names of your project entries in @code{muse-project-alist}
817 will be used as InterWiki names by default.  Several examples follow.
819 @example
820 Blog::DocumentingMuse
821 Projects#EmacsMuse
822 Website
823 @end example
825 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
826 the project name, and @samp{DocumentingMuse} is the page name.  In the
827 second example, @samp{#} is the interwiki delimiter.  If the name of a
828 project occurs by itself in text, like the third case, it will be
829 colorized and published as a link to the default page of the given
830 project.
832 Customization of interwiki links may be accomplished by editing the
833 @code{muse-wiki-interwiki-alist} option.
835 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
836 @comment  node-name,  next,  previous,  up
837 @section Publishing and displaying images
838 @cindex images
839 @cindex links, with images
840 @subheading Image links
842 Links to images may be used in either the target or the description, or
843 both.  Thus, the following code will publish as a clickable image that
844 points to @url{http://www.mwolson.org/}.
846 @example
847 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
848 @end example
850 @cindex images, displaying
851 @cindex images, inlined
852 @cindex images, local
853 If a link to a locally-available image is encountered in the link
854 description, Muse mode will attempt to display it if your version of
855 Emacs permits this.  The following example will display correctly and
856 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
857 exists in the @file{../pics/} directory.
859 @example
860 [[TestPage][../pics/TestLogo.png]]
861 @end example
863 @cindex images, without a description
864 An image link is not required to have a description.  The link
865 @samp{[[../myimage.png]]} will display and publish as expected.
867 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
868 @comment  node-name,  next,  previous,  up
869 @section Inserting a horizontal line or anchor
871 @cindex horizontal rules
872 @cindex dashes
873 @subheading Horizontal Rules
875 Four or more dashes indicate a horizontal rule.  Be sure to put blank
876 lines around it, or it will be considered part of the proceeding or
877 following paragraph!
879 @cindex anchors
880 @cindex links, with target on same page
881 @subheading Anchors
883 If you begin a line with "#anchor" -- where "anchor" can be any word
884 that doesn't contain whitespace -- it defines an anchor at that point
885 into the document.  This point can be referenced using "page#anchor" as
886 the target in a Muse link.
888 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
889 @comment  node-name,  next,  previous,  up
890 @section Evaluating Emacs Lisp code in documents for extensibility
891 @cindex lisp, embedded
893 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
894 which is the only Muse tag supported in a style's header and footer
895 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
896 text you wish.  The inserted output will get marked up, if the
897 @verb{|<lisp>|} tag appears within the main text of the document.
899 @example
900 <lisp>(concat "This form gets " "inserted")</lisp>
901 @end example
903 @cindex lisp, and insert command
904 Note that you should not use the @code{insert} command within a set of
905 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
906 tags will be automatically inserted into the document.
908 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
909 @comment  node-name,  next,  previous,  up
910 @section Lines to omit from published output
911 @cindex comments
912 @cindex publishing, omitting lines
914 Use the following syntax to indicate a comment.  Comments will not be
915 published.
917 @example
918 ; Comment text goes here.
919 @end example
921 That is, only a semi-colon at the beginning of a line, followed by a
922 literal space, will cause that line to be treated as a comment.
924 @node Tag Summary, , Comments, Markup Rules
925 @comment  node-name,  next,  previous,  up
926 @section Tags that Muse recognizes
927 @cindex tags
928 @cindex inserting files at publish time
929 @cindex publishing, including markup in headers and footers
930 @cindex publishing, inserting files
932 Muse has several built-in tags that may prove useful during publishing.
933 @xref{muse-publish-markup-tags}, to see how to customize the tags that
934 Muse uses, as well as make your own tags.
936 @subheading Syntax
938 If a tag takes arguments, it will look like this, where ``tagname'' is
939 the name of the tag.
941 @example
942 <tagname arg1="string1" arg2="string2">
943 @end example
945 If you want the tag to look like it came straight from an XHTML
946 document, you can alternatively do the following.
948 @example
949 <tagname arg1="string1" arg2="string2" />
950 @end example
952 If a tag surrounds some text, it will look like this.
954 @example
955 <tagname>Some text</tagname>
956 @end example
958 If a tag surrounds a large region, it will look like this.
960 @example
961 <tagname>
962 Some text.
963 Some more text.
964 </tagname>
965 @end example
967 @subheading Tag listing
969 This is the complete list of tags that Muse accepts, including those
970 that were mentioned in previous sections.
972 @table @verb
974 @item |<class>|
975 If publishing to HTML, surround the given text with a @verb{|<span>|}
976 tag.  It takes one argument called ``name'' that specifies the class
977 attribute of the @verb{|<span>|} tag.
979 If publishing to a different format, do nothing extra to the text.
981 @item |<code>|
982 Treat the text surrounded by the tag as if they were enclosed in equal
983 signs, that is, make it monospace.
985 @item |<command>|
986 Run a command on the region, replacing the region with the result of the
987 command.  The command is specified with the ``interp'' argument.  If no
988 value for ``interp'' is given, pass the entire region to the shell.
990 @item |<comment>|
991 Treat the entire region as a comment.  If the option
992 @var{muse-publish-comments-p} is nil, delete the region, otherwise
993 publish it using the comment syntax of the current publishing style.
995 @item |<contents>|
996 Publish a Table of Contents.  This will either be inserted in-place or
997 at the beginning of the document, depending on your publishing style.
998 It does not have a delimiting tag.
1000 By default, only 2 levels of headings will be included in the generated
1001 Table of Contents.  To change this globally, customize the
1002 @var{muse-publish-contents-depth} option.  To change this only for the
1003 current tag, use the ``depth'' argument.
1005 @item |<example>|
1006 Publish the region in monospace, preserving the newlines in the region.
1007 This is useful for snippets of code.
1009 @item |<include>|
1010 Include the named file at the current location during publishing.
1012 The ``markup'' attribute controls how this section is marked up.
1013 If it is omitted, publish the included text with the normal Muse
1014 rules.
1016 If "nil", do not mark up the included text at all.
1018 If "example", treat the included text as if it was surrounded by the
1019 @verb{|<example>|} tag.
1021 If "verse", treat the included text as if it was surrounded by the
1022 @verb{|<verse>|} tag, to preserve newlines.
1024 Otherwise, it should be the name of a function to call after inserting
1025 the file with the buffer narrowed to the section inserted.
1027 @item |<lisp>|
1028 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1029 The result is then inserted into the document, so you do not need to
1030 explicitly call @code{insert}.  All text properties are removed from the
1031 resulting text.
1033 @item |<literal>|
1034 Make sure that the text enclosed by this tag is published without
1035 escaping it in any way.  This is useful for inserting markup directly
1036 into the published document, when Muse does not provide the desired
1037 functionality.
1039 @item |<markup>|
1040 Mark up the text between the initial and ending tags.  The markup
1041 command to use may be specified by the ``function'' argument.  The
1042 standard Muse markup routines are used by default if no ``function''
1043 argument is provided.
1045 This is useful for marking up regions in headers and footers.  One
1046 example that comes to mind is generating a published index of all of the
1047 files in the current project by doing the following.
1049 @example
1050 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1051 @end example
1053 @item |<quote>|
1054 Publish the region as a blockquote.  This will either be inserted
1055 in-place or at the beginning of the document, depending on your
1056 publishing style.  It does not have a delimiting tag.
1058 @item |<verbatim>|
1059 This is used when you want to prevent Muse from trying to interpret some
1060 markup.  Surround the markup in @verb{|<verbatim>|} and
1061 @verb{|</verbatim>|}, and it will not be interpreted.
1063 This tag was used often in previous versions of Muse because they did
1064 not support whole-document escaping of specials.  Now, it will only be
1065 needed for other tags, and perhaps footnotes as well.
1067 @item |<verse>|
1068 Preserve the newlines in the region.  In formats like HTML, newlines are
1069 removed by default, hence the need for this tag.  In other publishing
1070 styles, this tag may cause the text to be indented slightly in a way
1071 that looks nice for poetry and prose.
1073 @end table
1075 @node Publishing Styles, Extending Muse, Markup Rules, Top
1076 @comment  node-name,  next,  previous,  up
1077 @chapter Publishing Various Types of Documents
1078 @cindex publishing styles
1080 One of the principle features of Muse is the ability to publish a simple
1081 input text to a variety of different output styles.  Muse also makes it
1082 easy to create new styles, or derive from an existing style.
1084 @menu
1085 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1086 * Book::                        Publishing entries into a compilation.
1087 * DocBook::                     Publishing in DocBook XML form.
1088 * HTML::                        Publishing in HTML or XHTML form.
1089 * Journal::                     Keeping a journal or blog.
1090 * LaTeX::                       Publishing LaTeX documents.
1091 * Poem::                        Publish a poem to LaTex or PDF.
1092 * Texinfo::                     Publish entries to Texinfo format or PDF.
1093 @end menu
1095 @node Blosxom, Book, Publishing Styles, Publishing Styles
1096 @comment  node-name,  next,  previous,  up
1097 @section Integrating Muse and pyblosxom.cgi
1098 @cindex blog, one-file-per-entry style
1100 The Blosxom publishing style publishes a tree of categorised files to a
1101 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1102 In other words, each blog entry corresponds with one file.
1104 @menu
1105 * Blosxom Requirements::        Other tools needed to the Blosxom style.
1106 * Blosxom Entries::             Format of a Blosxom entry and automation.
1107 * Blosxom Options::             Blosxom styles and options provided.
1108 @end menu
1110 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1111 @comment  node-name,  next,  previous,  up
1112 @subsection Other tools needed to the Blosxom style
1114 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1115 installed on a machine that you have upload access to.
1117 The following additional components are required in order to make the
1118 date of blog entries display as something sensible.
1120 @enumerate
1121 @item
1122 A script to gather date directives from the entire blog tree into a
1123 single file.  The file must associate a blog entry with a date.
1125 @item
1126 A plugin for (py)blosxom that reads this file.
1127 @end enumerate
1129 These 2 things are provided for @command{pyblosxom.cgi} in the
1130 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1131 former service, while @file{hardcodedates.py} provides the latter
1132 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1133 script will be found/written.
1135 Here is a sample listing from my @file{timestamps} file, which maps
1136 each file to a date.  This can really be in any format, as long as your
1137 date-gathering script and your plugin can both understand it.
1139 @example
1140 2005-04-01-14-16 personal/paper_cranes
1141 2005-03-21 personal/spring_break_over
1142 2004-10-24 personal/finished_free_culture
1143 @end example
1145 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1146 @file{getstamps.py}.  Note that you will need to set the current
1147 directory to where your Muse files are, execute @file{getstamps.py}, and
1148 then move the generated timestamps file to your publishing directory.
1150 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1151 @comment  node-name,  next,  previous,  up
1152 @subsection Format of a Blosxom entry and automation
1154 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1155 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1156 plus whatever normal content is desired.
1158 The date directive is not used directly by @command{pyblosxom.cgi} or
1159 this program.  You need to have the two additional items from the former
1160 section to make use of this feature.
1162 There is a function called @code{muse-blosxom-new-entry} that will
1163 automate the process of making a new blog entry.  To make use of it, do
1164 the following.
1166 @itemize @bullet
1167 @item
1168 Customize @code{muse-blosxom-base-directory} to the location that your
1169 blog entries are stored.
1171 @item
1172 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1173 use the following code to assign this function to @kbd{C-c p l'}.
1175 @example
1176 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1177 @end example
1179 @item
1180 You should create your directory structure ahead of time under your base
1181 directory.  These directories, which correspond with category names, may
1182 be nested.
1184 @item
1185 When you enter this key sequence, you will be prompted for the category
1186 of your entry and its title.  Upon entering this information, a new file
1187 will be created that corresponds with the title, but in lowercase
1188 letters and having special characters converted to underscores.  The
1189 title and date directives will be inserted automatically.
1190 @end itemize
1192 @node Blosxom Options, , Blosxom Entries, Blosxom
1193 @comment  node-name,  next,  previous,  up
1194 @subsection Blosxom styles and options provided
1196 The following styles and options are available in the Blosxom publishing
1197 style.
1199 @subheading Styles provided
1201 @table @code
1203 @cindex publishing styles, blosxom-html
1204 @item blosxom-html
1205 Publish Blosxom entries in HTML form.
1207 @cindex publishing styles, blosxom-xhtml
1208 @item blosxom-xhtml
1209 Publish Blosxom entries in XHTML form.
1211 @end table
1213 @subheading Options provided
1215 @table @code
1217 @item muse-blosxom-extension
1218 Default file extension for publishing Blosxom files.
1220 @item muse-blosxom-header
1221 Header used for publishing Blosxom files.
1223 This may be text or a filename.
1225 @item muse-blosxom-footer
1226 Footer used for publishing Blosxom files.
1228 This may be text or a filename.
1230 @item muse-blosxom-base-directory
1231 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1233 This is the top-level directory where your blog entries may be found
1234 locally.
1236 @end table
1238 @node Book, DocBook, Blosxom, Publishing Styles
1239 @comment  node-name,  next,  previous,  up
1240 @section Publishing entries into a compilation
1242 This publishing style is used to output ``books'' in LaTeX or PDF
1243 format.
1245 Each page will become a separate chapter in the book, unless the style
1246 keyword @option{:nochapters} is used, in which case they are all run
1247 together as if one giant chapter.
1249 You will need to call the @code{muse-book-publish-project} function in
1250 order to publish this style.  An example of this may be found in John
1251 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
1253 @subheading Styles provided
1255 @table @code
1257 @cindex publishing styles, book-latex
1258 @item book-latex
1259 Publish a book in LaTeX form.  The header and footer are different than
1260 the normal LaTeX publishing mode.
1262 @cindex publishing styles, book-pdf
1263 @item book-pdf
1264 Publish a book in PDF form.  The header and footer are different than
1265 the normal PDF publishing mode.
1267 @end table
1269 @subheading Options provided
1271 @table @code
1273 @item muse-book-before-publish-hook
1274 A hook run in the book buffer before it is marked up.
1276 @item muse-book-after-publish-hook
1277 A hook run in the book buffer after it is marked up.
1279 @item muse-book-latex-header
1280 Header used for publishing books to LaTeX.
1282 This may be text or a filename.
1284 @item muse-book-latex-footer
1285 Footer used for publishing books to LaTeX.
1287 This may be text or a filename.
1289 @end table
1291 @node DocBook, HTML, Book, Publishing Styles
1292 @comment  node-name,  next,  previous,  up
1293 @section Publishing in DocBook XML form
1295 This publishing style is used to generate DocBook XML files.
1297 @subheading Styles provided
1299 @table @code
1301 @cindex publishing styles, docbook
1302 @item docbook
1304 @end table
1306 @subheading Options provided
1308 @table @code
1310 @item muse-docbook-extension
1311 Default file extension for publishing DocBook XML files.
1313 @item muse-docbook-header
1314 Header used for publishing DocBook XML files.
1316 This may be text or a filename.
1318 @item muse-docbook-footer
1319 Footer used for publishing DocBook XML files.
1321 This may be text or a filename.
1323 @item muse-docbook-markup-regexps
1324 List of markup rules for publishing a Muse page to DocBook XML.
1326 @item muse-docbook-markup-functions
1327 An alist of style types to custom functions for that kind of text.
1329 @item muse-docbook-markup-strings
1330 Strings used for marking up text.
1332 These cover the most basic kinds of markup, the handling of which
1333 differs little between the various styles.
1335 @item muse-docbook-markup-specials
1336 A table of characters which must be represented specially.
1338 @item muse-docbook-encoding-default
1339 The default Emacs buffer encoding to use in published files.
1340 This will be used if no special characters are found.
1342 @item muse-docbook-charset-default
1343 The default DocBook XML charset to use if no translation is
1344 found in @code{muse-docbook-encoding-map}.
1346 @item muse-docbook-encoding-map
1347 An alist mapping emacs coding systems to appropriate DocBook charsets.
1348 Use the base name of the coding system (i.e. without the -unix).
1350 @end table
1352 @node HTML, Journal, DocBook, Publishing Styles
1353 @comment  node-name,  next,  previous,  up
1354 @section Publishing in HTML or XHTML form
1356 This publishing style is capable of producing HTML or XHTML documents.
1358 @subheading Styles provided
1360 @table @code
1362 @cindex publishing styles, html
1363 @item html
1364 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1366 @item xhtml
1367 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1369 @end table
1371 @subheading Options provided
1373 If an HTML option does not have a corresponding XHTML option, it will
1374 be used for both of these publishing styles.
1376 @table @code
1378 @item muse-html-extension
1379 Default file extension for publishing HTML files.
1381 @item muse-xhtml-extension
1382 Default file extension for publishing XHTML files.
1384 @item muse-html-style-sheet
1385 Store your stylesheet definitions here.
1387 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1388 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1389 @verb{|<lisp>|} markup tags.
1391 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1392 properly.
1394 @item muse-html-header
1395 Header used for publishing HTML files.
1397 This may be text or a filename.
1399 @item muse-html-footer
1400 Footer used for publishing HTML files.
1402 This may be text or a filename.
1404 @item muse-xhtml-header
1405 Header used for publishing XHTML files.
1407 This may be text or a filename.
1409 @item muse-xhtml-footer
1410 Footer used for publishing XHTML files.
1412 This may be text or a filename.
1414 @item muse-html-anchor-on-word
1415 When true, anchors surround the closest word.
1417 This allows you to select them in a browser (i.e. for pasting), but has
1418 the side-effect of marking up headers in multiple colors if your header
1419 style is different from your link style.
1421 @item muse-html-table-attributes
1422 The attribute to be used with HTML @verb{|<table>|} tags.
1424 If you want to make more-complicated tables in HTML, surround the HTML
1425 with the @verb{|literal|} tag, so that it does not get escaped.
1427 @item muse-html-markup-regexps
1428 List of markup rules for publishing a Muse page to HTML.
1430 @item muse-html-markup-functions
1431 An alist of style types to custom functions for that kind of text.
1433 @item muse-html-markup-strings
1434 Strings used for marking up text as HTML.
1436 These cover the most basic kinds of markup, the handling of which
1437 differs little between the various styles.
1439 @item muse-xhtml-markup-strings
1440 Strings used for marking up text as XHTML.
1442 These cover the most basic kinds of markup, the handling of which
1443 differs little between the various styles.
1445 @item muse-html-markup-tags
1446 A list of tag specifications, for specially marking up HTML.
1447 @xref{muse-publish-markup-tags}, for more information.
1449 @item muse-html-markup-specials
1450 A table of characters which must be represented specially.  By default,
1451 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1453 @item muse-html-meta-http-equiv
1454 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1456 @item muse-html-meta-content-type
1457 The content type used for the HTML @verb{|<meta>|} tag.
1459 If you are striving for XHTML 1.1 compliance, you may want to change
1460 this to ``application/xhtml+xml''.
1462 @item muse-html-meta-content-encoding
1463 The charset to append to the HTML @verb{|<meta>|} tag.
1465 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1466 and determine the HTML charset from emacs's coding.  If set to a string,
1467 this string will be used to force a particular charset.
1469 @item muse-html-charset-default
1470 The default HTML meta charset to use if no translation is found in
1471 @code{muse-html-encoding-map}.
1473 @item muse-html-encoding-default
1474 The default Emacs buffer encoding to use in published files.
1475 This will be used if no special characters are found.
1477 @item muse-html-encoding-map
1478 An alist mapping emacs coding systems to appropriate HTML charsets.
1479 Use the base name of the coding system (i.e. without the -unix).
1481 @end table
1483 @node Journal, LaTeX, HTML, Publishing Styles
1484 @comment  node-name,  next,  previous,  up
1485 @section Keeping a journal or blog
1486 @cindex journal
1487 @cindex blog, journal style
1489 The module facilitates the keeping and publication of a journal.  When
1490 publishing to HTML, it assumes the form of a web log, or blog.
1492 The input format for each entry is as follows.
1494 @example
1495 * 20040317: Title of entry
1497 text for the entry.
1499 <qotd>
1500 "You know who you are. It comes down to a simple gut check: You
1501 either love what you do or you don't. Period." -- P. Bronson
1502 </qotd>
1503 @end example
1505 The "qotd", or Quote of the Day, is entirely optional.  When generated
1506 to HTML, this entry is rendered as the following.
1508 @example
1509 <div class="entry">
1510   <div class="entry-qotd">
1511     <h3>Quote of the Day:</h3>
1512     <p>"You know who you are. It comes down to a simple gut
1513       check: You either love what you do or you don't. Period."
1514       -- P. Bronson</p>
1515   </div>
1516   <div class="entry-body">
1517     <div class="entry-head">
1518       <div class="entry-date">
1519         <span class="date">March 17, 2004</span>
1520       </div>
1521       <div class="entry-title">
1522         <h2>Title of entry</h2>
1523       </div>
1524     </div>
1525     <div class="entry-text">
1526       <p>Text for the entry.</p>
1527     </div>
1528   </div>
1529 </div>
1530 @end example
1532 The plurality of "div" tags makes it possible to display the entries in
1533 any form you wish, using a CSS style.
1535 Also, an .RDF file can be generated from your journal by publishing it
1536 with the "rdf" style.  It uses the first two sentences of the first
1537 paragraph of each entry as its "description", and auto-generates tags
1538 for linking to the various entries.
1540 @subheading Styles provided
1542 @table @code
1544 @cindex publishing styles, journal-html
1545 @item journal-html
1546 Publish journal entries as an HTML document.
1548 @cindex publishing styles, journal-xhtml
1549 @item journal-xhtml
1550 Publish journal entries as an XHTML document.
1552 @cindex publishing styles, journal-latex
1553 @item journal-latex
1554 Publish journal entries as a LaTeX document.
1556 @cindex publishing styles, journal-pdf
1557 @item journal-pdf
1558 Publish journal entries as a PDF document.
1560 @cindex publishing styles, journal-book-latex
1561 @item journal-book-latex
1562 Publish journal entries as a LaTeX book.
1564 @cindex publishing styles, journal-book-pdf
1565 @item journal-book-pdf
1566 Publish journal entries as a PDF book.
1568 @cindex publishing styles, journal-rdf
1569 @cindex publishing styles, RSS 1.0
1570 @item journal-rdf
1571 Publish journal entries as an RDF file (RSS 1.0).
1573 @cindex publishing styles, journal-rss
1574 @cindex publishing styles, RSS 2.0
1575 @item journal-rss
1576 Publish journal entries as an RSS file (RSS 2.0).
1578 @end table
1580 @subheading Options provided
1582 @table @code
1584 @item muse-journal-heading-regexp
1585 A regexp that matches a journal heading.
1587 Paren group 1 is the ISO date, group 2 is the optional category, and
1588 group 3 is the optional heading for the entry.
1590 @item muse-journal-date-format
1591 Date format to use for journal entries.
1593 @item muse-journal-html-heading-regexp
1594 A regexp that matches a journal heading from an HTML document.
1596 Paren group 1 is the ISO date, group 2 is the optional category, and
1597 group 3 is the optional heading for the entry.
1599 @item muse-journal-html-entry-template
1600 Template used to publish individual journal entries as HTML.
1602 @item muse-journal-latex-section
1603 Template used to publish a LaTeX section.
1605 @item muse-journal-latex-subsection
1606 Template used to publish a LaTeX subsection.
1608 @item muse-journal-latex-markup-tags
1609 A list of tag specifications, for specially marking up LaTeX.
1611 @xref{muse-publish-markup-tags}, for more information.
1613 @item muse-journal-rdf-extension
1614 Default file extension for publishing RDF (RSS 1.0) files.
1616 @item muse-journal-rdf-base-url
1617 The base URL of the website referenced by the RDF file.
1619 @item muse-journal-rdf-header
1620 Header used for publishing RDF (RSS 1.0) files.
1622 This may be text or a filename.
1624 @item muse-journal-rdf-footer
1625 Footer used for publishing RDF (RSS 1.0) files.
1627 This may be text or a filename.
1629 @item muse-journal-rdf-date-format
1630 Date format to use for RDF entries.
1632 @item muse-journal-rdf-entry-template
1633 Template used to publish individual journal entries as RDF.
1635 @item muse-journal-rdf-summarize-entries
1636 If non-nil, include only summaries in the RDF file, not the full data.
1638 @item muse-journal-rss-extension
1639 Default file extension for publishing RSS 2.0 files.
1641 @item muse-journal-rss-base-url
1642 The base URL of the website referenced by the RSS file.
1644 @item muse-journal-rss-header
1645 Header used for publishing RSS 2.0 files.
1647 This may be text or a filename.
1649 @item muse-journal-rss-footer
1650 Footer used for publishing RSS 2.0 files.
1652 This may be text or a filename.
1654 @item muse-journal-rss-date-format
1655 Date format to use for RSS 2.0 entries.
1657 @item muse-journal-rss-entry-template
1658 Template used to publish individual journal entries as RSS 2.0.
1660 @item muse-journal-rss-enclosure-types-alist
1661 File types that are accepted as RSS enclosures.
1663 This is an alist that maps file extension to content type.
1665 Useful for podcasting.
1667 @item muse-journal-rss-summarize-entries
1668 If non-nil, include only summaries in the RSS file, not the full data.
1670 Many RSS subscribers find this annoying.
1672 @item muse-journal-rss-markup-regexps
1673 List of markup rules for publishing a Muse journal page to RSS.
1675 For more information on the structure of this list,
1676 @xref{muse-publish-markup-regexps}.
1678 @item muse-journal-rss-markup-functions
1679 An alist of style types to custom functions for that kind of text.
1681 For more on the structure of this list,
1682 @xref{muse-publish-markup-functions}.
1684 @end table
1686 @node LaTeX, Poem, Journal, Publishing Styles
1687 @comment  node-name,  next,  previous,  up
1688 @section Publishing LaTeX documents
1690 This publishing style is capable of producing LaTeX or PDF documents.
1692 If you wish to publish PDF documents, you will need to have a good TeX
1693 installation.  For Debian, this can be accomplished by installing the
1694 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1696 @subheading Styles provided
1698 @table @code
1700 @cindex publishing styles, latex
1701 @item latex
1702 Publish a LaTeX document.
1704 @cindex publishing styles, pdf
1705 @item pdf
1706 Publish a PDF document, using an external LaTeX document conversion
1707 tool.
1709 @cindex publishing styles, latexcjk
1710 @item latexcjk
1711 Publish a LaTeX document with CJK (Chinese) encodings.
1713 @cindex publishing styles, pdfcjk
1714 @item pdfcjk
1715 Publish a PDF document with CJK (Chinese) encodings, using an external
1716 LaTeX document conversion tool.
1718 @end table
1720 @subheading Options provided
1722 @table @code
1724 @item muse-latex-extension
1725 Default file extension for publishing LaTeX files.
1727 @item muse-latex-pdf-extension
1728 Default file extension for publishing LaTeX files to PDF.
1730 @item muse-latex-header
1731 Header used for publishing LaTeX files.
1733 This may be text or a filename.
1735 @item muse-latex-footer
1736 Footer used for publishing LaTeX files.
1738 This may be text or a filename.
1740 @item muse-latexcjk-header
1741 Header used for publishing LaTeX files (CJK).
1743 This may be text or a filename.
1745 @item muse-latexcjk-footer
1746 Footer used for publishing LaTeX files (CJK).
1748 This may be text or a filename.
1750 @item muse-latex-markup-regexps
1751 List of markup regexps for identifying regions in a Muse page.
1753 For more on the structure of this list,
1754 @xref{muse-publish-markup-regexps}.
1756 @item muse-latex-markup-functions
1757 An alist of style types to custom functions for that kind of text.
1759 For more on the structure of this list,
1760 @xref{muse-publish-markup-functions}.
1762 @item muse-latex-markup-strings
1763 Strings used for marking up text.
1765 These cover the most basic kinds of markup, the handling of which
1766 differs little between the various styles.
1768 @item muse-latexcjk-encoding-map
1769 An alist mapping emacs coding systems to appropriate CJK codings.
1770 Use the base name of the coding system (ie, without the -unix).
1772 @item muse-latexcjk-encoding-default
1773 The default Emacs buffer encoding to use in published files.
1775 This will be used if no special characters are found.
1777 @item muse-latex-markup-specials
1778 A table of characters which must be represented specially.
1780 @end table
1782 @node Poem, Texinfo, LaTeX, Publishing Styles
1783 @comment  node-name,  next,  previous,  up
1784 @section Publish a poem to LaTex or PDF
1786 The @code{muse-poem} module makes it easy to attractively publish and
1787 reference poems in the following format, using the "memoir" module for
1788 LaTeX publishing.  It will also markup poems for every other output
1789 style, though none are nearly as pretty.
1791 @example
1792 Title
1795 Body of poem
1798 Annotations, history, notes, etc.
1799 @end example
1801 Once a poem is written in this format, just publish it to PDF using the
1802 @code{poem-pdf} style.  To make an inlined reference to a poem that
1803 you've written -- for example, from a blog page -- there is a "poem" tag
1804 defined by this module.
1806 @example
1807 <poem title="name.of.poem.page">
1808 @end example
1810 Let's assume the template above was called @file{name.of.poem.page};
1811 then the above tag would result in this inclusion.
1813 @example
1814 ** Title
1816 > Body of poem
1817 @end example
1819 John Wiegley uses this module for publishing all of the poems on his
1820 website, which are at
1821 @uref{http://www.newartisans.com/johnw/poems.html}.
1823 @subheading Styles provided
1825 @table @code
1827 @cindex publishing styles, poem-latex
1828 @item poem-latex
1829 Publish a poem in LaTeX form.
1831 @cindex publishing styles, poem-pdf
1832 @item poem-pdf
1833 Publish a poem to a PDF document.
1835 @cindex publishing styles, chapbook-latex
1836 @item chapbook-latex
1837 Publish a book of poems in LaTeX form.
1839 @cindex publishing styles, chapbook-pdf
1840 @item chapbook-pdf
1841 Publish a book of poems to a PDF document.
1843 @end table
1845 @subheading Options provided
1847 @table @code
1849 @item muse-poem-latex-header
1850 Header used for publishing LaTeX poems.
1852 This may be text or a filename.
1854 @item muse-poem-latex-footer
1855 Footer used for publishing LaTeX files.
1857 This may be text or a filename.
1859 @item muse-poem-markup-strings
1860 Strings used for marking up poems.
1862 These cover the most basic kinds of markup, the handling of which
1863 differs little between the various styles.
1865 @item muse-chapbook-latex-header
1866 Header used for publishing a book of poems in LaTeX form.
1868 This may be text or a filename.
1870 @item muse-chapbook-latex-footer
1871 Footer used for publishing a book of poems in LaTeX form.
1873 This may be text or a filename.
1875 @item muse-poem-chapbook-strings
1876 Strings used for marking up books of poems.
1878 These cover the most basic kinds of markup, the handling of which
1879 differs little between the various styles.
1881 @end table
1883 @node Texinfo, , Poem, Publishing Styles
1884 @comment  node-name,  next,  previous,  up
1885 @section Publish entries to Texinfo format or PDF
1887 Rules for publishing a Muse file as a Texinfo article.
1889 @subheading Styles provided
1891 @table @code
1893 @cindex publishing styles, texi
1894 @item texi
1895 Publish a file in Texinfo form.
1897 @cindex publishing styles, texi
1898 @item info
1899 Generate an Info file from a Muse file.
1901 @cindex publishing styles, info-pdf
1902 @item info-pdf
1903 Publish a file in PDF form.
1905 @end table
1907 @subheading Options provided
1909 @table @code
1911 @item muse-texinfo-process-natively
1912 If non-nil, use the Emacs `texinfmt' module to make Info files.
1914 @item muse-texinfo-extension
1915 Default file extension for publishing Texinfo files.
1917 @item muse-texinfo-info-extension
1918 Default file extension for publishing Info files.
1920 @item muse-texinfo-pdf-extension
1921 Default file extension for publishing PDF files.
1923 @item muse-texinfo-header
1924 Text to prepend to a Muse page being published as Texinfo.
1926 This may be text or a filename.
1927 It may contain @verb{|<lisp>|} markup tags.
1929 @item muse-texinfo-footer
1930 Text to append to a Muse page being published as Texinfo.
1932 This may be text or a filename.
1933 It may contain @verb{|<lisp>|} markup tags.
1935 @item muse-texinfo-markup-regexps
1936 List of markup rules for publishing a Muse page to Texinfo.
1938 For more on the structure of this list,
1939 @xref{muse-publish-markup-regexps}.
1941 @item muse-texinfo-markup-functions
1942 An alist of style types to custom functions for that kind of text.
1944 For more on the structure of this list, see
1945 @xref{muse-publish-markup-functions}.
1947 @item muse-texinfo-markup-strings
1948 Strings used for marking up text.
1950 These cover the most basic kinds of markup, the handling of which
1951 differs little between the various styles.
1953 @item muse-texinfo-markup-specials
1954 A table of characters which must be represented specially.
1956 @end table
1959 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
1960 @comment  node-name,  next,  previous,  up
1961 @chapter Making your own publishing styles
1963 @menu
1964 * Common Elements::             Common functionality shared by styles.
1965 * Deriving Styles::             Deriving a new style from an existing
1966                                   one.
1967 @end menu
1969 @node Common Elements, Deriving Styles, , Extending Muse
1970 @comment  node-name,  next,  previous,  up
1971 @section Common functionality shared by styles
1972 @cindex publishing styles, common
1974 @menu
1975 * Markup Functions::            Specifying functions to marking up text.
1976 * Markup Regexps::              Markup rules for publishing.
1977 * Markup Strings::              Strings specific to a publishing style.
1978 * Markup Tags::                 Tag specifications for special markup.
1979 * Style Elements::              Parameters used for defining styles.
1980 @end menu
1982 @node Markup Functions, Markup Regexps, , Common Elements
1983 @comment  node-name,  next,  previous,  up
1984 @subsection Specifying functions to mark up text
1985 @cindex publishing, markup functions
1987 @anchor{muse-publish-markup-functions}
1988 @code{muse-publish-markup-functions}
1990 An alist of style types to custom functions for that kind of text.
1992 This is used by publishing styles to attempt to minimize the amount of
1993 custom regexps that each has to define.  @file{muse-publish} provides
1994 rules for the most common types of markup.
1996 Each member of the list is of the following form.
1998 @example
1999 (SYMBOL FUNCTION)
2000 @end example
2002 @itemize @bullet
2003 @item SYMBOL
2004 Describes the type of text to associate with this rule.
2005 @code{muse-publish-markup-regexps} maps regexps to these symbols.
2007 @item FUNCTION
2008 Function to use to mark up this kind of rule if no suitable function is
2009 found through the @option{:functions} tag of the current style.
2010 @end itemize
2012 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
2013 @comment  node-name,  next,  previous,  up
2014 @subsection Markup rules for publishing
2015 @cindex publishing, markup regexps
2016 @cindex publishing, rules
2018 @anchor{muse-publish-markup-regexps}
2019 @code{muse-publish-markup-regexps}
2021 List of markup rules for publishing a page with Muse.
2023 The rules given in this variable are invoked first, followed by whatever
2024 rules are specified by the current style.
2026 Each member of the list is either a function, or a list of the following
2027 form.
2029 @example
2030 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
2031 @end example
2033 @itemize @bullet
2034 @item REGEXP
2035 A regular expression, or symbol whose value is a regular expression,
2036 which is searched for using `re-search-forward'.
2038 @item TEXT-BEGIN-GROUP
2039 The matching group within that regexp which denotes the beginning of the
2040 actual text to be marked up.
2042 @item REPLACEMENT-TEXT
2043 A string that will be passed to `replace-match'.
2045 If it is not a string, but a function, it will be called to determine
2046 what the replacement text should be (it must return a string).  If it is
2047 a symbol, the value of that symbol should be a string.
2048 @end itemize
2050 The replacements are done in order, one rule at a time.  Writing
2051 the regular expressions can be a tricky business.  Note that case
2052 is never ignored.  `case-fold-search' is always bound to nil
2053 while processing the markup rules.
2055 @subheading Publishing order
2057 This is the order that the publishing rules are consulted, by default.
2058 This may be changed by customizing @code{muse-publish-markup-regexps}.
2060 @table @code
2062 @item trailing and leading whitespace
2063 Remove trailing and leading whitespace from a file.
2065 @item directive
2066 @samp{#directive}
2068 This is only recognized at the beginning of a file.
2070 @item tag
2071 @samp{<tag>}
2073 @item comment
2074 @samp{; comment}
2076 @item anchor
2077 @samp{#anchor}
2079 @item explicit links
2080 Prevent emphasis characters in explicit links from being marked up.
2082 Don't actually publish them here, just add a special no-emphasis text
2083 property.
2085 @item word
2086 Whitespace-delimited word, possibly with emphasis characters
2088 This function is responsible for marking up emphasis and escaping some
2089 specials.
2091 @item emdash
2092 @samp{--}
2094 2-wide dash
2096 @item heading
2097 @samp{** Heading}
2099 Outline-mode style headings.
2101 @item enddots
2102 @samp{....}
2104 These are ellipses with a dot at end.
2106 @item dots
2107 @samp{...}
2109 Ellipses.
2111 @item rule
2112 @samp{----}
2114 Horizontal rule or section separator.
2116 @item fn-sep
2117 @samp{Footnotes:}
2119 beginning of footnotes section
2121 @item footnote
2122 @samp{[1]}
2124 Footnote definition or reference.  If at beginning of line, it is a
2125 definition.
2127 @item list
2128 @itemize @bullet
2129 @item
2130 @samp{ 1. }
2132 @item
2133 @samp{ - }
2135 @item
2136 @samp{term :: }
2137 @end itemize
2139 Numbered list, item list, or term definition list.
2141 @item quote
2142 spaces before beginning of text
2144 Blockquotes.
2146 @item verse
2147 @samp{> verse text}
2149 @item table
2150 @samp{table | cells}
2152 @item link
2153 @samp{[[explicit][links]]}
2155 @item url
2156 @samp{http://example.com/}
2158 @item email
2159 @samp{bare-email@@example.com}
2161 @end table
2163 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
2164 @comment  node-name,  next,  previous,  up
2165 @subsection Strings specific to a publishing style
2166 @cindex publishing, markup strings
2168 @dfn{Markup strings} are strings used for marking up text for a
2169 particular style.
2171 These cover the most basic kinds of markup, the handling of which
2172 differs little between the various styles.
2174 @subheading Available markup strings
2176 @table @code
2178 @item image-with-desc
2179 An image and a description.
2181 Argument 1: image.  Argument 2: description.
2183 @item image-link
2184 A link to an image.
2186 Argument 1: image link.
2188 @item url-with-image
2189 A URL with an image.
2191 Argument 1: link.  Argument 2: image.
2193 @item url-link
2194 A link with a description.
2196 Argument 1: link.  Argument 2: description if one exists, or the
2197 original link otherwise.
2199 @item internal-link
2200 A link that refers to an internal anchor.
2202 Argument 1: internal link.  Argument 2: description if one exists, or
2203 the original link otherwise.
2205 @item email-addr
2206 A link to an email address.
2208 Argument 1: email address.  Argument 2: email address.
2210 @item emdash
2211 A 2-length dash.
2213 @item rule
2214 A horizontal line or space.
2216 @item footnote
2217 Beginning of footnote.
2219 @item footnote-end
2220 End of footnote.
2222 @item footnotemark
2223 Mark a reference for the current footnote.
2225 Argument 1: number of this footnote.
2227 @item footnotetext
2228 Indicate the text of the current footnote.
2230 Argument 1: number of this footnote.
2232 @item footnotetext-end
2233 End of a footnote text line.
2235 @item fn-sep
2236 Text used to replace ``Footnotes:'' line.
2238 @item enddots
2239 4 dots.
2241 @item dots
2242 3 dots.
2244 @item part
2245 Beginning of a part indicator line.  This is used by book publishing.
2247 @item part-end
2248 End of a part indicator line.  This is used by book publishing.
2250 @item chapter
2251 Beginning of a chapter indicator line.  This is used by book publishing.
2253 @item chapter-end
2254 End of a chapter indicator line.  This is used by book publishing.
2256 @item section
2257 Beginning of level 1 section indicator line.
2259 Argument 1: level of section; always 1.
2261 @item section-end
2262 End of level 1 section indicator line.
2264 Argument 1: level of section; always 1.
2266 @item subsection
2267 Beginning of level 2 section indicator line.
2269 Argument 1: level of section; always 2.
2271 @item subsection-end
2272 End of level 2 section indicator line.
2274 Argument 1: level of section; always 2.
2276 @item subsubsection
2277 Beginning of level 3 section indicator line.
2279 Argument 1: level of section; always 3.
2281 @item subsubsection-end
2282 End of level 3 section indicator line.
2284 Argument 1: level of section; always 3.
2286 @item section-other
2287 Beginning of section indicator line, where level is greater than 3.
2289 Argument 1: level of section.
2291 @item section-other-end
2292 Beginning of section indicator line, where level is greater than 3.
2294 Argument 1: level of section.
2296 @item begin-underline
2297 Beginning of underlined text.
2299 @item end-underline
2300 End of underlined text.
2302 @item begin-literal
2303 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2304 =teletype text=.
2306 @item end-literal
2307 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2308 text=.
2310 @item begin-emph
2311 Beginning of the first level of emphasized text.
2313 @item end-emph
2314 End of the first level of emphasized text.
2316 @item begin-more-emph
2317 Beginning of the second level of emphasized text.
2319 @item end-more-emph
2320 End of the second level of emphasized text.
2322 @item begin-most-emph
2323 Beginning of the third (and final) level of emphasized text.
2325 @item end-most-emph
2326 End of the third (and final) level of emphasized text.
2328 @item begin-verse
2329 Beginning of verse text.
2331 @item verse-space
2332 String used to each space that is further indented than the beginning of
2333 the verse.
2335 @item begin-verse-line
2336 Beginning of a line of verse.
2338 @item empty-verse-line
2339 End of a line of verse.
2341 @item begin-last-stanza-line
2342 Beginning of the last line of a verse stanza.
2344 @item end-last-stanza-line
2345 End of the last line of a verse stanza.
2347 @item end-verse
2348 End of verse text.
2350 @item begin-example
2351 Beginning of an example region.  To make use of this, an
2352 @samp{<example>} tag is needed.
2354 @item end-example
2355 End of an example region.  To make use of this, an @samp{</example>} tag
2356 is needed.
2358 @item begin-center
2359 Begin a centered line.
2361 @item end-center
2362 End a centered line.
2364 @item begin-quote
2365 Begin a quoted region.
2367 @item end-quote
2368 End a quoted region.
2370 @item begin-uli
2371 Begin an unordered list.
2373 @item end-uli
2374 End an unordered list.
2376 @item begin-oli
2377 Begin an ordered list.
2379 @item end-oli
2380 End an ordered list.
2382 @item begin-ddt
2383 Begin a definition list.
2385 @item start-dde
2386 Begin a term in a definition list.
2388 @item end-ddt
2389 End a definition list.
2391 @end table
2393 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2394 @comment  node-name,  next,  previous,  up
2395 @subsection Tag specifications for special markup
2396 @cindex publishing, markup tags
2398 @anchor{muse-publish-markup-tags}
2399 @code{muse-publish-markup-tags}
2401 A list of tag specifications, for specially marking up text.
2403 XML-style tags are the best way to add custom markup to Muse.  This is
2404 easily accomplished by customizing this list of markup tags.
2406 For each entry, the name of the tag is given, whether it expects a
2407 closing tag and/or an optional set of attributes, and a function that
2408 performs whatever action is desired within the delimited region.
2410 The tags themselves are deleted during publishing, before the function
2411 is called.  The function is called with three arguments, the beginning
2412 and end of the region surrounded by the tags.  If properties are
2413 allowed, they are passed as a third argument in the form of an alist.
2414 The `end' argument to the function is always a marker.
2416 Point is always at the beginning of the region within the tags, when the
2417 function is called.  Wherever point is when the function finishes is
2418 where tag markup will resume.
2420 These tag rules are processed once at the beginning of markup, and once
2421 at the end, to catch any tags which may have been inserted in-between.
2423 @node Style Elements, , Markup Tags, Common Elements
2424 @comment  node-name,  next,  previous,  up
2425 @subsection Parameters used for defining styles
2426 @cindex publishing, style elements
2428 Style elements are tags that define a style.  Use
2429 @code{muse-define-style} to create a new style.
2431 @example
2432 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2433 @end example
2435 @subheading Usable elements
2437 @table @option
2439 @item :suffix
2440 File extension to use for publishing files with this style.
2442 @item :link-suffix
2443 File extension to use for publishing links to Muse files with this
2444 style.
2446 @item :osuffix
2447 File extension to use for publishing second-stage files with this style.
2449 For example, PDF publishing generates a LaTeX file first, then a PDF
2450 from that LaTeX file.
2452 @item :regexps
2453 List of markup rules for publishing a page with Muse.
2454 @xref{muse-publish-markup-regexps}.
2456 @item :functions
2457 An alist of style types to custom functions for that kind of text.
2458 @xref{muse-publish-markup-functions}.
2460 @item :strings
2461 Strings used for marking up text with this style.
2463 These cover the most basic kinds of markup, the handling of which
2464 differs little between the various styles.
2466 @item :tags
2467 A list of tag specifications, used for handling extra tags.
2468 @xref{muse-publish-markup-tags}.
2470 @item :specials
2471 A table of characters which must be represented specially.
2473 @item :before
2474 A function that is to be executed on the newly-created publishing buffer
2475 (or the current region) before any publishing occurs.
2477 This is used to set extra parameters that direct the publishing process.
2479 @item :before-end
2480 A function that is to be executed on the publishing buffer (or the
2481 current region) immediately after applying all of the markup regexps.
2483 This is used to fix the order of table elements (header, footer, body)
2484 in XML-ish styles.
2486 @item :after
2487 A function that is to be executed on the publishing buffer after
2488 :before-end, and immediately after inserting the header and footer.
2490 This is used for generating the table of contents as well as setting the
2491 file coding system.
2493 @item :final
2494 A function that is to be executed after saving the published file, but
2495 while still in its buffer.
2497 This is used for generating second-stage documents like PDF files from
2498 just-published LaTeX files.
2500 @item :header
2501 Header used for publishing files of this style.
2503 This may be a variable, text, or a filename.  It is inserted at the
2504 beginning of a file, after evaluating the publishing markup.
2506 @item :footer
2507 Footer used for publishing files of this style.
2509 This may be a variable, text, or a filename.  It is inserted at the end
2510 of a file, after evaluating the publishing markup.
2512 @item :style-sheet
2513 Style sheet used for publishing files of this style.
2515 This may be a variable or text.  It is used in the header of HTML and
2516 XHTML based publishing styles.
2518 @item :browser
2519 The function used to browse the published result of files of this style.
2521 @end table
2523 @node Deriving Styles, , Common Elements, Extending Muse
2524 @comment  node-name,  next,  previous,  up
2525 @section Deriving a new style from an existing one
2526 @cindex publishing styles, deriving
2528 To create a new style from an existing one, use @code{muse-derive-style}
2529 as follows.  This is a good way to fix something you don't like about a
2530 particular publishing style, or to personalize it.
2532 @example
2533 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2534 @end example
2536 The derived name is a string defining the new style, such as "my-html".
2537 The base name must identify an existing style, such as "html" -- if you
2538 have loaded @file{muse-html}.  The style parameters are the same as
2539 those used to create a style, except that they override whatever
2540 definitions exist in the base style.  However, some definitions only
2541 partially override.  The following parameters support partial
2542 overriding.
2544 @xref{Style Elements}, for a complete list of all parameters.
2546 @table @option
2548 @item :functions
2549 If a markup function is not found in the derived style's function list,
2550 the base style's function list will be queried.
2552 @item :regexps
2553 All regexps in the current style and the base style(s) will be used.
2555 @item :strings
2556 If a markup string is not found in the derived style's string list, the
2557 base style's string list will be queried.
2559 @end table
2562 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
2563 @comment  node-name,  next,  previous,  up
2564 @chapter Getting Help and Reporting Bugs
2565 @cindex help, getting
2566 @cindex bugs, reporting
2568 After you have read this guide, if you still have questions about
2569 Muse, or if you have bugs to report, there are several places you can
2572 @itemize @bullet
2574 @item
2575 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
2576 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2577 to it.
2579 @item
2580 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2581 that Michael Olson (the current maintainer) made for Muse.
2583 @item
2584 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
2585 using the subscription form at
2586 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
2587 This mailing list provides support for Muse, @command{Planner} and
2588 @command{emacs-wiki}, which is the predecessor of Muse.
2590 There are additional methods for accessing the mailing list, adding
2591 content to it, and searching it.  Consult
2592 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
2593 more information.
2595 @item
2596 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2597 contributors are frequently around and willing to answer your
2598 questions.  The @samp{#muse} channel is also available for
2599 Muse-specific help, and its current maintainer hangs out there.
2601 @item
2602 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2603 @email{mwolson@@gnu.org}.
2605 @end itemize
2607 @node History, Contributors, Getting Help and Reporting Bugs, Top
2608 @comment  node-name,  next,  previous,  up
2609 @chapter History of This Document
2610 @cindex history, of Muse
2612 @itemize
2613 @item 2004
2614 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2615 limitations. Around February 2004, he started making "emacs-wiki version
2616 3.00 APLHA", which eventually became known as Muse.
2618 Most of those who frequent the emacs-wiki mailing list continued to use
2619 emacs-wiki, mainly because Planner hasn't been ported over to it.
2621 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2622 John Wiegley's request.
2624 @item 2005
2625 Michael Olson overhauled this document and added many new sections in
2626 preparation for the first release of Muse (3.01).
2628 @end itemize
2630 @node Contributors, GNU General Public License, History, Top
2631 @comment  node-name,  next,  previous,  up
2632 @chapter Contributors to This Documentation
2633 @cindex contributors
2635 The first draft of this document was taken from the emacs-wiki texinfo
2636 manual.  Michael Olson adapted it for Muse and added most of its
2637 content.
2639 John Sullivan did a majority of the work on the emacs-wiki texinfo
2640 manual.
2642 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2643 emacs-wiki texinfo manual.
2645 @node GNU General Public License, Concept Index, Contributors, Top
2646 @comment  node-name,  next,  previous,  up
2647 @appendix GNU GENERAL PUBLIC LICENSE
2648 @center Version 2, June 1991
2649 @cindex GPL
2650 @cindex GNU General Public License
2652 @c This file is intended to be included in another file.
2654 @display
2655 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
2656 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2658 Everyone is permitted to copy and distribute verbatim copies
2659 of this license document, but changing it is not allowed.
2660 @end display
2662 @appendixsec Preamble
2664   The licenses for most software are designed to take away your
2665 freedom to share and change it.  By contrast, the GNU General Public
2666 License is intended to guarantee your freedom to share and change free
2667 software---to make sure the software is free for all its users.  This
2668 General Public License applies to most of the Free Software
2669 Foundation's software and to any other program whose authors commit to
2670 using it.  (Some other Free Software Foundation software is covered by
2671 the GNU Library General Public License instead.)  You can apply it to
2672 your programs, too.
2674   When we speak of free software, we are referring to freedom, not
2675 price.  Our General Public Licenses are designed to make sure that you
2676 have the freedom to distribute copies of free software (and charge for
2677 this service if you wish), that you receive source code or can get it
2678 if you want it, that you can change the software or use pieces of it
2679 in new free programs; and that you know you can do these things.
2681   To protect your rights, we need to make restrictions that forbid
2682 anyone to deny you these rights or to ask you to surrender the rights.
2683 These restrictions translate to certain responsibilities for you if you
2684 distribute copies of the software, or if you modify it.
2686   For example, if you distribute copies of such a program, whether
2687 gratis or for a fee, you must give the recipients all the rights that
2688 you have.  You must make sure that they, too, receive or can get the
2689 source code.  And you must show them these terms so they know their
2690 rights.
2692   We protect your rights with two steps: (1) copyright the software, and
2693 (2) offer you this license which gives you legal permission to copy,
2694 distribute and/or modify the software.
2696   Also, for each author's protection and ours, we want to make certain
2697 that everyone understands that there is no warranty for this free
2698 software.  If the software is modified by someone else and passed on, we
2699 want its recipients to know that what they have is not the original, so
2700 that any problems introduced by others will not reflect on the original
2701 authors' reputations.
2703   Finally, any free program is threatened constantly by software
2704 patents.  We wish to avoid the danger that redistributors of a free
2705 program will individually obtain patent licenses, in effect making the
2706 program proprietary.  To prevent this, we have made it clear that any
2707 patent must be licensed for everyone's free use or not licensed at all.
2709   The precise terms and conditions for copying, distribution and
2710 modification follow.
2712 @iftex
2713 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2714 @end iftex
2715 @ifinfo
2716 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2717 @end ifinfo
2719 @enumerate 0
2720 @item
2721 This License applies to any program or other work which contains
2722 a notice placed by the copyright holder saying it may be distributed
2723 under the terms of this General Public License.  The ``Program'', below,
2724 refers to any such program or work, and a ``work based on the Program''
2725 means either the Program or any derivative work under copyright law:
2726 that is to say, a work containing the Program or a portion of it,
2727 either verbatim or with modifications and/or translated into another
2728 language.  (Hereinafter, translation is included without limitation in
2729 the term ``modification''.)  Each licensee is addressed as ``you''.
2731 Activities other than copying, distribution and modification are not
2732 covered by this License; they are outside its scope.  The act of
2733 running the Program is not restricted, and the output from the Program
2734 is covered only if its contents constitute a work based on the
2735 Program (independent of having been made by running the Program).
2736 Whether that is true depends on what the Program does.
2738 @item
2739 You may copy and distribute verbatim copies of the Program's
2740 source code as you receive it, in any medium, provided that you
2741 conspicuously and appropriately publish on each copy an appropriate
2742 copyright notice and disclaimer of warranty; keep intact all the
2743 notices that refer to this License and to the absence of any warranty;
2744 and give any other recipients of the Program a copy of this License
2745 along with the Program.
2747 You may charge a fee for the physical act of transferring a copy, and
2748 you may at your option offer warranty protection in exchange for a fee.
2750 @item
2751 You may modify your copy or copies of the Program or any portion
2752 of it, thus forming a work based on the Program, and copy and
2753 distribute such modifications or work under the terms of Section 1
2754 above, provided that you also meet all of these conditions:
2756 @enumerate a
2757 @item
2758 You must cause the modified files to carry prominent notices
2759 stating that you changed the files and the date of any change.
2761 @item
2762 You must cause any work that you distribute or publish, that in
2763 whole or in part contains or is derived from the Program or any
2764 part thereof, to be licensed as a whole at no charge to all third
2765 parties under the terms of this License.
2767 @item
2768 If the modified program normally reads commands interactively
2769 when run, you must cause it, when started running for such
2770 interactive use in the most ordinary way, to print or display an
2771 announcement including an appropriate copyright notice and a
2772 notice that there is no warranty (or else, saying that you provide
2773 a warranty) and that users may redistribute the program under
2774 these conditions, and telling the user how to view a copy of this
2775 License.  (Exception: if the Program itself is interactive but
2776 does not normally print such an announcement, your work based on
2777 the Program is not required to print an announcement.)
2778 @end enumerate
2780 These requirements apply to the modified work as a whole.  If
2781 identifiable sections of that work are not derived from the Program,
2782 and can be reasonably considered independent and separate works in
2783 themselves, then this License, and its terms, do not apply to those
2784 sections when you distribute them as separate works.  But when you
2785 distribute the same sections as part of a whole which is a work based
2786 on the Program, the distribution of the whole must be on the terms of
2787 this License, whose permissions for other licensees extend to the
2788 entire whole, and thus to each and every part regardless of who wrote it.
2790 Thus, it is not the intent of this section to claim rights or contest
2791 your rights to work written entirely by you; rather, the intent is to
2792 exercise the right to control the distribution of derivative or
2793 collective works based on the Program.
2795 In addition, mere aggregation of another work not based on the Program
2796 with the Program (or with a work based on the Program) on a volume of
2797 a storage or distribution medium does not bring the other work under
2798 the scope of this License.
2800 @item
2801 You may copy and distribute the Program (or a work based on it,
2802 under Section 2) in object code or executable form under the terms of
2803 Sections 1 and 2 above provided that you also do one of the following:
2805 @enumerate a
2806 @item
2807 Accompany it with the complete corresponding machine-readable
2808 source code, which must be distributed under the terms of Sections
2809 1 and 2 above on a medium customarily used for software interchange; or,
2811 @item
2812 Accompany it with a written offer, valid for at least three
2813 years, to give any third party, for a charge no more than your
2814 cost of physically performing source distribution, a complete
2815 machine-readable copy of the corresponding source code, to be
2816 distributed under the terms of Sections 1 and 2 above on a medium
2817 customarily used for software interchange; or,
2819 @item
2820 Accompany it with the information you received as to the offer
2821 to distribute corresponding source code.  (This alternative is
2822 allowed only for noncommercial distribution and only if you
2823 received the program in object code or executable form with such
2824 an offer, in accord with Subsection b above.)
2825 @end enumerate
2827 The source code for a work means the preferred form of the work for
2828 making modifications to it.  For an executable work, complete source
2829 code means all the source code for all modules it contains, plus any
2830 associated interface definition files, plus the scripts used to
2831 control compilation and installation of the executable.  However, as a
2832 special exception, the source code distributed need not include
2833 anything that is normally distributed (in either source or binary
2834 form) with the major components (compiler, kernel, and so on) of the
2835 operating system on which the executable runs, unless that component
2836 itself accompanies the executable.
2838 If distribution of executable or object code is made by offering
2839 access to copy from a designated place, then offering equivalent
2840 access to copy the source code from the same place counts as
2841 distribution of the source code, even though third parties are not
2842 compelled to copy the source along with the object code.
2844 @item
2845 You may not copy, modify, sublicense, or distribute the Program
2846 except as expressly provided under this License.  Any attempt
2847 otherwise to copy, modify, sublicense or distribute the Program is
2848 void, and will automatically terminate your rights under this License.
2849 However, parties who have received copies, or rights, from you under
2850 this License will not have their licenses terminated so long as such
2851 parties remain in full compliance.
2853 @item
2854 You are not required to accept this License, since you have not
2855 signed it.  However, nothing else grants you permission to modify or
2856 distribute the Program or its derivative works.  These actions are
2857 prohibited by law if you do not accept this License.  Therefore, by
2858 modifying or distributing the Program (or any work based on the
2859 Program), you indicate your acceptance of this License to do so, and
2860 all its terms and conditions for copying, distributing or modifying
2861 the Program or works based on it.
2863 @item
2864 Each time you redistribute the Program (or any work based on the
2865 Program), the recipient automatically receives a license from the
2866 original licensor to copy, distribute or modify the Program subject to
2867 these terms and conditions.  You may not impose any further
2868 restrictions on the recipients' exercise of the rights granted herein.
2869 You are not responsible for enforcing compliance by third parties to
2870 this License.
2872 @item
2873 If, as a consequence of a court judgment or allegation of patent
2874 infringement or for any other reason (not limited to patent issues),
2875 conditions are imposed on you (whether by court order, agreement or
2876 otherwise) that contradict the conditions of this License, they do not
2877 excuse you from the conditions of this License.  If you cannot
2878 distribute so as to satisfy simultaneously your obligations under this
2879 License and any other pertinent obligations, then as a consequence you
2880 may not distribute the Program at all.  For example, if a patent
2881 license would not permit royalty-free redistribution of the Program by
2882 all those who receive copies directly or indirectly through you, then
2883 the only way you could satisfy both it and this License would be to
2884 refrain entirely from distribution of the Program.
2886 If any portion of this section is held invalid or unenforceable under
2887 any particular circumstance, the balance of the section is intended to
2888 apply and the section as a whole is intended to apply in other
2889 circumstances.
2891 It is not the purpose of this section to induce you to infringe any
2892 patents or other property right claims or to contest validity of any
2893 such claims; this section has the sole purpose of protecting the
2894 integrity of the free software distribution system, which is
2895 implemented by public license practices.  Many people have made
2896 generous contributions to the wide range of software distributed
2897 through that system in reliance on consistent application of that
2898 system; it is up to the author/donor to decide if he or she is willing
2899 to distribute software through any other system and a licensee cannot
2900 impose that choice.
2902 This section is intended to make thoroughly clear what is believed to
2903 be a consequence of the rest of this License.
2905 @item
2906 If the distribution and/or use of the Program is restricted in
2907 certain countries either by patents or by copyrighted interfaces, the
2908 original copyright holder who places the Program under this License
2909 may add an explicit geographical distribution limitation excluding
2910 those countries, so that distribution is permitted only in or among
2911 countries not thus excluded.  In such case, this License incorporates
2912 the limitation as if written in the body of this License.
2914 @item
2915 The Free Software Foundation may publish revised and/or new versions
2916 of the General Public License from time to time.  Such new versions will
2917 be similar in spirit to the present version, but may differ in detail to
2918 address new problems or concerns.
2920 Each version is given a distinguishing version number.  If the Program
2921 specifies a version number of this License which applies to it and ``any
2922 later version'', you have the option of following the terms and conditions
2923 either of that version or of any later version published by the Free
2924 Software Foundation.  If the Program does not specify a version number of
2925 this License, you may choose any version ever published by the Free Software
2926 Foundation.
2928 @item
2929 If you wish to incorporate parts of the Program into other free
2930 programs whose distribution conditions are different, write to the author
2931 to ask for permission.  For software which is copyrighted by the Free
2932 Software Foundation, write to the Free Software Foundation; we sometimes
2933 make exceptions for this.  Our decision will be guided by the two goals
2934 of preserving the free status of all derivatives of our free software and
2935 of promoting the sharing and reuse of software generally.
2937 @iftex
2938 @heading NO WARRANTY
2939 @end iftex
2940 @ifinfo
2941 @center NO WARRANTY
2942 @end ifinfo
2944 @item
2945 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2946 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2947 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2948 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2949 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2950 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2951 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2952 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2953 REPAIR OR CORRECTION.
2955 @item
2956 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2957 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2958 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2959 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2960 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2961 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2962 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2963 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2964 POSSIBILITY OF SUCH DAMAGES.
2965 @end enumerate
2967 @iftex
2968 @heading END OF TERMS AND CONDITIONS
2969 @end iftex
2970 @ifinfo
2971 @center END OF TERMS AND CONDITIONS
2972 @end ifinfo
2974 @page
2975 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2977   If you develop a new program, and you want it to be of the greatest
2978 possible use to the public, the best way to achieve this is to make it
2979 free software which everyone can redistribute and change under these terms.
2981   To do so, attach the following notices to the program.  It is safest
2982 to attach them to the start of each source file to most effectively
2983 convey the exclusion of warranty; and each file should have at least
2984 the ``copyright'' line and a pointer to where the full notice is found.
2986 @smallexample
2987 @var{one line to give the program's name and a brief idea of what it does.}
2988 Copyright (C) @var{yyyy}  @var{name of author}
2990 This program is free software; you can redistribute it and/or modify
2991 it under the terms of the GNU General Public License as published by
2992 the Free Software Foundation; either version 2 of the License, or
2993 (at your option) any later version.
2995 This program is distributed in the hope that it will be useful,
2996 but WITHOUT ANY WARRANTY; without even the implied warranty of
2997 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2998 GNU General Public License for more details.
3000 You should have received a copy of the GNU General Public License along
3001 with this program; if not, write to the Free Software Foundation, Inc.,
3002 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3003 @end smallexample
3005 Also add information on how to contact you by electronic and paper mail.
3007 If the program is interactive, make it output a short notice like this
3008 when it starts in an interactive mode:
3010 @smallexample
3011 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
3012 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
3013 This is free software, and you are welcome to redistribute it
3014 under certain conditions; type `show c' for details.
3015 @end smallexample
3017 The hypothetical commands @samp{show w} and @samp{show c} should show
3018 the appropriate parts of the General Public License.  Of course, the
3019 commands you use may be called something other than @samp{show w} and
3020 @samp{show c}; they could even be mouse-clicks or menu items---whatever
3021 suits your program.
3023 You should also get your employer (if you work as a programmer) or your
3024 school, if any, to sign a ``copyright disclaimer'' for the program, if
3025 necessary.  Here is a sample; alter the names:
3027 @example
3028 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
3029 `Gnomovision' (which makes passes at compilers) written by James Hacker.
3031 @var{signature of Ty Coon}, 1 April 1989
3032 Ty Coon, President of Vice
3033 @end example
3035 This General Public License does not permit incorporating your program into
3036 proprietary programs.  If your program is a subroutine library, you may
3037 consider it more useful to permit linking proprietary applications with the
3038 library.  If this is what you want to do, use the GNU Library General
3039 Public License instead of this License.
3042 @node Concept Index,  , GNU General Public License, Top
3043 @comment  node-name,  next,  previous,  up
3044 @unnumbered Index
3046 @printindex cp
3048 @bye