muse-mode: Use C-c C-M-t to do the same thing as C-c C-S-t
[muse-el.git] / texi / muse.texi
blobb612bcd6143d7a22bff2fd0145b2189b7b374341
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 Emacs Muse version 3.02.93 (3.03 RC3).
17 Copyright @copyright{} 2004, 2005, 2006, 2007 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 Free Documentation License, Version 1.2 or
22 any later version published by the Free Software Foundation; with no
23 Invariant Sections, with the Front-Cover texts being ``A GNU
24 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
25 license is included in the section entitled ``GNU Free Documentation
26 License'' in this manual.
28 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
29 this GNU Manual, like GNU software.  Copies published by the Free
30 Software Foundation raise funds for GNU development.''
32 This document is part of a collection distributed under the GNU Free
33 Documentation License.  If you want to distribute this document
34 separately from the collection, you can do so by adding a copy of the
35 license to the document, as described in section 6 of the license.
37 All Emacs Lisp code contained in this document may be used, distributed,
38 and modified without restriction.
39 @end quotation
40 @end copying
42 @titlepage
43 @title Muse manual
44 @subtitle an authoring and publishing environment
45 @subtitle for GNU Emacs and XEmacs
47 @c The following two commands
48 @c start the copyright page.
49 @page
50 @vskip 0pt plus 1filll
51 @insertcopying
52 @end titlepage
54 @c So the toc is printed at the start
55 @contents
57 @ifnottex
58 @node Top, Preface, (dir), (dir)
59 @comment  node-name,  next,  previous,  up
60 @top Muse
62 @insertcopying
63 @end ifnottex
65 @menu
66 * Preface::                     About the documentation.
67 * Introduction::                What is Muse?
68 * Obtaining Muse::              How to get Muse releases and development
69                                   changes.
70 * Installation::                Compiling and installing Muse.
71 * Getting Started::             Settings for Muse.
72 * Projects::                    Creating and managing Muse projects.
73 * Keystroke Summary::           Keys used in Muse mode.
74 * Markup Rules::                Rules for using markup.
75 * Publishing Styles::           Publishing various types of documents.
76 * Extending Muse::              Making your own publishing styles.
77 * Getting Help and Reporting Bugs::  
78 * History::                     History of this document.
79 * Contributors::                Contributors to this documentation.
80 * GNU Free Documentation License::  The license for this documentation.
81 * Concept Index::               Search for terms.
83 @detailmenu
84  --- The Detailed Node Listing ---
86 How to Get Muse Releases and Development Changes
88 * Releases::                    Released versions of Muse.
89 * Development::                 Latest unreleased development changes.
91 Rules for Using Markup
93 * Paragraphs::                  Paragraphs: centering and quoting.
94 * Headings::                    Levels of headings.
95 * Directives::                  Directives at the beginning of a
96                                   document.
97 * Emphasizing Text::            Bold, italicized, and underlined text.
98 * Footnotes::                   Making notes to be shown at the end.
99 * Verse::                       Indicating poetic stanzas.
100 * Lists::                       Lists of items.
101 * Tables::                      Generation of data tables.
102 * Explicit Links::              Hyperlinks and email addresses with
103                                   descriptions.
104 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
105                                   links.
106 * Images::                      Publishing and displaying images.
107 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
108 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
109                                   for extensibility.
110 * Comments::                    Lines to omit from published output.
111 * Tag Summary::                 Tags that Muse recognizes.
113 Publishing Various Types of Documents
115 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
116 * Book::                        Publishing entries into a compilation.
117 * DocBook::                     Publishing in DocBook XML form.
118 * HTML::                        Publishing in HTML or XHTML form.
119 * Journal::                     Keeping a journal or blog.
120 * LaTeX::                       Publishing LaTeX documents.
121 * Poem::                        Publish a poem to LaTex or PDF.
122 * Texinfo::                     Publish entries to Texinfo format or PDF.
124 Integrating Muse and pyblosxom.cgi
126 * Blosxom Requirements::        Other tools needed for the Blosxom style.
127 * Blosxom Entries::             Format of a Blosxom entry and automation.
128 * Blosxom Options::             Blosxom styles and options provided.
130 Making your own publishing styles
132 * Common Elements::             Common functionality shared by styles.
133 * Deriving Styles::             Deriving a new style from an existing
134                                   one.
136 Common functionality shared by styles
138 * Markup Functions::            Specifying functions to marking up text.
139 * Markup Regexps::              Markup rules for publishing.
140 * Markup Strings::              Strings specific to a publishing style.
141 * Markup Tags::                 Tag specifications for special markup.
142 * Style Elements::              Parameters used for defining styles.
144 @end detailmenu
145 @end menu
147 @node Preface, Introduction, Top, Top
148 @comment  node-name,  next,  previous,  up
149 @chapter About the documentation
151 This document describes Muse, which was written by John Wiegley
152 and is now maintained by Michael Olson.  Several versions of it are
153 available on-line.
155 @itemize @bullet
156 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
157 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
158 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
159 @end itemize
161 @node Introduction, Obtaining Muse, Preface, Top
162 @comment  node-name,  next,  previous,  up
163 @chapter What is Muse?
165 Emacs Muse is an authoring and publishing environment for Emacs.  It
166 simplifies the process of writing documents and publishing them to
167 various output formats.
169 Muse consists of two main parts: an enhanced text-mode for authoring
170 documents and navigating within Muse projects, and a set of publishing
171 styles for generating different kinds of output.
173 This idea is not in any way new. Numerous systems exist -- even one
174 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
175 more modular environment, with a rather simple core, in which "styles"
176 are derived from to create new styles. Much of Muse's overall
177 functionality is optional. For example, you can use the publisher
178 without the major-mode, or the mode without doing any publishing; or if
179 you don't load the Texinfo or LaTeX modules, those styles won't be
180 available.
182 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
183 code has been restructured and rewritten, especially its publishing
184 functions. The focus in this revision is on the authoring and publishing
185 aspects, and the "wikiness" has been removed as a default behavior
186 (available in the optional @file{muse-wiki} module). CamelCase words are
187 no longer special by default.
189 @node Obtaining Muse, Installation, Introduction, Top
190 @comment  node-name,  next,  previous,  up
191 @chapter How to Get Muse Releases and Development Changes
193 @menu
194 * Releases::                    Released versions of Muse.
195 * Development::                 Latest unreleased development changes.
196 @end menu
198 @node Releases, Development, Obtaining Muse, Obtaining Muse
199 @comment  node-name,  next,  previous,  up
200 @section Released versions of Muse
202 Choose to install a release if you want to minimize risk.
204 Errors are corrected in development first.  User-visible changes will be
205 announced on the @email{muse-el-discuss@@gna.org} mailing list.
206 @xref{Getting Help and Reporting Bugs}.
208 @cindex releases, Debian package
209 @cindex Debian package for Muse
210 Debian and Ubuntu users can get Muse via apt-get.  The @file{muse-el}
211 package is available both at Michael Olson's APT repository and the
212 official Debian and Ubuntu repositories.  To make use of the former, add
213 the following line to your @file{/etc/apt/sources.list} file and run
214 @code{apt-get install muse}.
216 @example
217 deb http://www.mwolson.org/debian/ ./
218 @end example
220 @cindex releases, from source
221 Alternatively, you can download the latest release from
222 @uref{http://www.mwolson.org/static/dist/muse/} .
224 @node Development,  , Releases, Obtaining Muse
225 @comment  node-name,  next,  previous,  up
226 @section Latest unreleased development changes
227 @cindex development
229 Choose the development version if you want to live on the bleeding edge
230 of Muse development or try out new features before release.
232 @cindex arch revision control system, using
233 The Arch revision control system allows you to retrieve previous
234 versions and select specific features and bug fixes.  If you would like
235 to contribute to Muse development, it is highly recommended that you use
236 Arch, but this is not a requirement.
238 If you are new to Arch, you might find this tutorial helpful:
239 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
241 Downloading the Muse module with Arch and staying up-to-date involves
242 the following steps.
244 @enumerate
245 @item Install arch
247 @itemize @bullet
248 @item Debian and Ubuntu: @kbd{apt-get install tla}.
249 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
250 @end itemize
252 @item Register the archive.
253 @example
254 tla register-archive -f http://www.mwolson.org/archives/2006
255 @end example
257 @item Download the Muse package.
258 @example
259 # Download Muse into the @file{muse} directory.
260 tla get mwolson@@gnu.org--2006/muse--main--1.0 muse
261 @end example
263 @item List upstream changes that are missing from your local copy.
264 Do this whenever you want to see whether new changes have been committed
265 to Muse.
267 @example
268 # Change to the source directory you are interested in.
269 cd muse/
271 # Display the summary of changes
272 tla missing --summary
273 @end example
275 @cindex updating Muse with Arch
276 @item Update to the latest version by replaying missing changes.
277 @example
278 cd muse
279 tla replay
280 @end example
282 @end enumerate
284 There are other ways to interact with the Muse archive.
286 @itemize
287 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
288 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
289 @end itemize
291 The latest development snapshot will be kept up-to-date since it is
292 updated at the same time as the Arch repository.
294 @node Installation, Getting Started, Obtaining Muse, Top
295 @comment  node-name,  next,  previous,  up
296 @chapter Compiling and Installing Muse
298 Muse may be compiled and installed on your machine.
300 @subheading Compilation
302 This is an optional step, since Emacs Lisp source code does not
303 necessarily have to be byte-compiled.  It will yield a speed increase,
304 though.
306 A working copy of Emacs or XEmacs is needed in order to compile the
307 Emacs Muse.  By default, the program that is installed with the name
308 @command{emacs} will be used.
310 If you want to use the @command{xemacs} binary to perform the
311 compilation, you would need to edit @file{Makefile.defs} in the
312 top-level directory as follows.  You can put either a full path to an
313 Emacs or XEmacs binary or just the command name, as long as it is in the
314 @env{PATH}.
316 @example
317 EMACS    = xemacs
318 SITEFLAG = -no-site-file
319 @end example
321 Running @code{make} should compile the Muse source files in the
322 @file{lisp} directory.
324 @subheading Installation
326 Muse may be installed into your file hierarchy by doing the following.
328 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
329 where you want the source and compiled Muse files to be installed and
330 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
331 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
332 Compilation section if you are using XEmacs.
334 If you are installing Muse on a Debian or Ubuntu system, you might want
335 to change the value of @env{INSTALLINFO} as specified in
336 @file{Makefile.defs}.
338 If you wish to install Muse to different locations than the defaults
339 specify, edit @file{Makefile.defs} accordingly.
341 Run @code{make} as a normal user.
343 Run @code{make install} as the root user if you have chosen installation
344 locations that require this.
347 @node Getting Started, Projects, Installation, Top
348 @comment  node-name,  next,  previous,  up
349 @chapter Getting Started
350 @cindex settings
352 To use Muse, add the directory containing its files to your
353 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
354 the authoring mode, and the styles you wish to publish to.  An example
355 follows.
357 @lisp
358 (add-to-list 'load-path "<path to Muse>")
360 (require 'muse-mode)     ; load authoring mode
362 (require 'muse-html)     ; load publishing styles I use
363 (require 'muse-latex)
364 (require 'muse-texinfo)
365 (require 'muse-docbook)
366 @end lisp
368 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
369 an input document to any available style.  If you enable
370 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
371 command will be bound to @kbd{C-c C-t}.
373 If the currently opened file is part of a defined project in
374 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
376 You should also type @kbd{M-x customize-group}, and give the name
377 @samp{muse}.  Each of the options has its own documentation.
380 @node Projects, Keystroke Summary, Getting Started, Top
381 @comment  node-name,  next,  previous,  up
382 @chapter Creating and Managing Muse Projects
383 @cindex projects
385 Often you will want to publish all the files within a directory to a
386 particular set of output styles automatically.  To support, Muse
387 allows for the creations of "projects".  Here is a sample project, to
388 be defined in your @file{.emacs} file.
390 @lisp
391 (require 'muse-project)
393 (setq muse-project-alist
394       '(("website"                      ; my various writings
395          ("~/Pages" :default "index")
396          (:base "html" :path "~/public_html")
397          (:base "pdf" :path "~/public_html/pdf"))))
398 @end lisp
400 The above defines a project named "website", whose files are located
401 in the directory @file{~/Pages}.  The default page to visit is
402 @file{index}.  When this project is published, each page will be
403 output as HTML to the directory @file{~/public_html}, and as PDF to
404 the directory @file{~/public_html/pdf}.  Within any project page, you
405 may create a link to other pages using the syntax @samp{[[pagename]]}.
407 If you would like to include only some files from a directory in a Muse
408 project, you may use a regexp in place of @file{~/Pages} in the example.
410 By default, Muse expects all project files to have the file extension
411 @file{.muse}. Files without this extension will not be associated with
412 Muse mode and will not be considered part of any project, even if they
413 are within a project directory.
415 If you don't want to use @file{.muse}, you can customize the extension
416 by setting the value of @code{muse-file-extension}.
418 If you don't want to use any extension at all, and want Muse to
419 autodetect project files based on their location, then add the following
420 to your Muse settings file.
422 @lisp
423 (setq muse-file-extension nil
424       muse-mode-auto-p t)
425 @end lisp
427 Note that if you chose to have @code{muse-file-extension} set to
428 @code{nil}, you may have trouble if your @file{.emacs} file or other
429 init scripts attempt to visit a Muse file.  (A very common example of
430 this is if you use Planner with Muse and run @code{(plan)} from your
431 @file{.emacs}.)  If you wish to visit Muse files from your
432 @file{.emacs}, be sure to also add the following additional code before
433 any such visits happen:
435 @lisp
436 (add-hook 'find-file-hooks 'muse-mode-maybe)
437 @end lisp
439 @c PRE3_03: Give more examples
440 @c PRE3_03: Describe :set and other options fully
442 @node Keystroke Summary, Markup Rules, Projects, Top
443 @comment  node-name,  next,  previous,  up
444 @chapter Keys Used in Muse Mode
445 @cindex keystrokes
447 This is a summary of keystrokes available in every Muse buffer.
449 @table @kbd
451 @item C-c C-a (`muse-index')
452 Display an index of all known Muse pages.
454 @item C-c C-b (`muse-find-backlinks')
455 Find all pages that link to this page.
457 @item C-c C-e (`muse-edit-link-at-point')
458 Edit link at point.
460 @item C-c C-f (`muse-project-find-file')
461 Open another Muse page.  Prompt for the name.
463 @item C-c C-i (`muse-insert-tag')
464 Insert a tag interactively.
466 @item C-c C-l (`font-lock-mode')
467 Toggle font lock / highlighting for the current buffer.
469 @item C-c C-p (`muse-project-publish')
470 Publish any Muse pages that have changed.
472 @item C-c C-s (`muse-search')
473 Find text in all files of the current project.
475 @item C-c C-t (`muse-project-publish-this-file')
476 Publish the currently-visited file.  Prompt for the style if the current
477 file can be published using more than one style.
479 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
480 Publish the currently-visited file.  Prompt for both the style and
481 output directory.
483 @item C-c C-v (`muse-browse-result')
484 Show the published result of this page.
486 @item C-c = (`muse-what-changed')
487 Diff this page against the last backup version.
489 @item C-c TAB l (`muse-insert-relative-link-to-file')
490 Insert a link to a file interactively.
492 @item C-c TAB t (`muse-insert-tag')
493 Insert a tag interactively.
495 @item C-c TAB u (`muse-insert-url')
496 Insert a URL interactively.
498 @item TAB
499 Move to the next Wiki reference.
501 @item S-TAB
502 Move to the previous Wiki reference.
504 @item M-TAB
505 Complete the name of a page from the current project at point.
507 @item M-RET
508 Insert a new list item at point, indenting properly.
510 @item C-<
511 Decrease the indentation of the list item at point.
513 @item C->
514 Increase the indentation of the list item at point.
516 @end table
519 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
520 @comment  node-name,  next,  previous,  up
521 @chapter Rules for Using Markup
522 @cindex markup
524 A Muse document uses special, contextual markup rules to determine how
525 to format the output result.  For example, if a paragraph is indented,
526 Muse assumes it should be quoted.
528 There are not too many markup rules, and all of them strive to be as
529 simple as possible so that you can focus on document creation, rather
530 than formatting.
532 @menu
533 * Paragraphs::                  Paragraphs: centering and quoting.
534 * Headings::                    Levels of headings.
535 * Directives::                  Directives at the beginning of a
536                                   document.
537 * Emphasizing Text::            Bold, italicized, and underlined text.
538 * Footnotes::                   Making notes to be shown at the end.
539 * Verse::                       Indicating poetic stanzas.
540 * Lists::                       Lists of items.
541 * Tables::                      Generation of data tables.
542 * Explicit Links::              Hyperlinks and email addresses with
543                                   descriptions.
544 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
545                                   links.
546 * Images::                      Publishing and displaying images.
547 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
548 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
549                                   for extensibility.
550 * Comments::                    Lines to omit from published output.
551 * Tag Summary::                 Tags that Muse recognizes.
552 @end menu
554 @node Paragraphs, Headings, Markup Rules, Markup Rules
555 @comment  node-name,  next,  previous,  up
556 @section Paragraphs: centering and quoting
557 @cindex paragraphs
559 Paragraphs in Muse must be separated by a blank line.
561 @cindex paragraphs, centered
562 @subheading Centered paragraphs and quotations
564 A line that begins with six or more columns of whitespace (either tabs
565 or spaces) indicates a centered paragraph.  Alternatively, you can use
566 the @verb{|<center>|} tag to surround regions that are to be published as
567 centered paragraphs.
569 @cindex paragraphs, quoted
570 @cindex quotations
571 But if a line begins with whitespace, though less than six columns, it
572 indicates a quoted paragraph.  Alternatively, you can use the
573 @verb{|<quote>|} tag to surround regions that are to be published as
574 quoted paragraphs.
576 @cindex examples
577 @cindex monospace, rendering blocks
578 @cindex HTML, rendering blocks in monospace
579 @subheading Literal paragraphs
581 The @verb{|<example>|} tag is used for examples, where whitespace should
582 be preserved, the text rendered in monospace, and any characters special
583 to the output style escaped.
585 @cindex literal text
586 @cindex HTML, inserting a raw block
587 There is also the @verb{|<literal>|} tag, which causes a marked block to
588 be entirely left alone.  This can be used for inserting a hand-coded
589 HTML blocks into HTML output, for example.
591 @node Headings, Directives, Paragraphs, Markup Rules
592 @comment  node-name,  next,  previous,  up
593 @section Levels of headings
594 @cindex headings
596 A heading becomes a chapter or section in printed output -- depending on
597 the style.  To indicate a heading, start a new paragraph with one or
598 more asterices, followed by a space and the heading title.  Then begin
599 another paragraph to enter the text for that section.
601 All levels of headings will be published.  Most publishing styles only
602 distinguish the between the first 4 levels, however.
604 @example
605 * First level
607 ** Second level
609 *** Third level
611 **** Fourth level
612 @end example
614 @node Directives, Emphasizing Text, Headings, Markup Rules
615 @comment  node-name,  next,  previous,  up
616 @section Directives at the beginning of a document
617 @cindex directives
619 Directives are lines beginning with the @samp{#} character that come
620 before any paragraphs or sections in the document.  Directives are of
621 the form ``#directive content of directive''.  You can use any
622 combination of uppercase and lowercase letters for directives, even if
623 the directive is not in the list below.
625 The @code{muse-publishing-directive} function may be used in header and
626 footer text to access directives.  For example, to access the
627 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
629 The following is a list of directives that Muse uses.
631 @table @code
632 @cindex #author
633 @item #author
634 The author of this document.
636 If this is not specified, Muse will attempt to figure it out from the
637 @code{user-full-name} variable.
639 @cindex #date
640 @item #date
641 The date that the document was last modified.
643 This is used by publishing styles that are able to embed the date
644 information.
646 @cindex #desc
647 @item #desc
648 A short description of this document.
650 This is used by the @code{journal} publishing style to embed information
651 inside of an RSS/RDF feed.
653 @cindex #title
654 @item #title
655 The title of this document.
657 If this is not specified, the name of the file is used.
659 @end table
661 @node Emphasizing Text, Footnotes, Directives, Markup Rules
662 @comment  node-name,  next,  previous,  up
663 @section Bold, italicized, and underlined text
664 @cindex emphasizing text
665 @cindex underlining text
666 @cindex italicizing text
667 @cindex verbatim text
668 @cindex monospace, rendering words
670 To emphasize text, surround it with certain specially recognized
671 characters.
673 @example
674 *emphasis*
675 **strong emphasis**
676 ***very strong emphasis***
677 _underlined_
678 =verbatim and monospace=
679 @end example
681 @cindex WYSIWYG
682 While editing a Muse document in Muse mode, these forms of emphasis will
683 be highlighted in a WYSIWYG manner.  Each of these forms may span
684 multiple lines.
686 Verbatim text will be colored as gray by default.  To change this,
687 customize @code{muse-verbatim-face}.
689 You can also use the @verb{|<code>|} tag to indicate verbatim and
690 monospace text.  This is handy for regions that have an ``='' in them.
692 @node Footnotes, Verse, Emphasizing Text, Markup Rules
693 @comment  node-name,  next,  previous,  up
694 @section Making notes to be shown at the end
695 @cindex footnotes
697 A footnote reference is simply a number in square brackets.  To define
698 the footnote, place this definition at the bottom of your file.
699 @samp{footnote-mode} can be used to greatly facilitate the creation of
700 these kinds of footnotes.
702 Footnotes are defined by the same number in brackets occurring at the
703 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
704 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
705 the point of insertion.
707 @node Verse, Lists, Footnotes, Markup Rules
708 @comment  node-name,  next,  previous,  up
709 @section Indicating poetic stanzas
710 @cindex verses
711 @cindex poetry
713 Poetry requires that whitespace be preserved, but without resorting to
714 monospace.  To indicate this, use the following markup, reminiscent of
715 email quotations.
717 @example
718 > A line of Emacs verse;
719 >   forgive its being so terse.
720 @end example
722 You can also use the @verb{|<verse>|} tag, if you prefer.
724 @example
725 <verse>
726 A line of Emacs verse;
727   forgive its being so terse.
728 </verse>
729 @end example
731 @cindex verses, multiple stanzas
732 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
733 follows.
735 @example
736 <verse>
737 A line of Emacs verse;
738   forgive its being so terse.
740 In terms of terse verse,
741   you could do worse.
742 </verse>
743 @end example
745 @node Lists, Tables, Verse, Markup Rules
746 @comment  node-name,  next,  previous,  up
747 @section Lists of items
748 @cindex lists
750 Lists are given using special characters at the beginning of a line.
751 Whitespace must occur before bullets or numbered items, to distinguish
752 from the possibility of those characters occurring in a real sentence.
754 @cindex lists, bullets
755 These are rendered as a bullet list.
757 @example
758 - bullet item one
759 - bullet item two
760 @end example
762 @cindex lists, enumerated
763 An enumerated list follows.
765 @example
766 1. Enum item one
767 2. Enum item two
768 @end example
770 @cindex lists, definitions
771 Here is a definition list.
773 @example
774 Term1 ::
775   This is a first definition
776   And it has two lines;
777   no, make that three.
779 Term2 ::
780   This is a second definition
781 @end example
783 @node Tables, Explicit Links, Lists, Markup Rules
784 @comment  node-name,  next,  previous,  up
785 @section Generation of data tables
786 @cindex tables
788 @cindex tables, simple
789 Only very simple tables are supported.  The syntax is as follows.
791 @example
792 Double bars  || Separate header fields
794 Single bars   | Separate body fields
795 Here are more | body fields
797 Triple bars ||| Separate footer fields
798 @end example
800 Some publishing styles require header fields to come first, then footer
801 fields, and then the body fields.  You can use any order for these
802 sections that you like, and Muse will re-order them for you at
803 publish-time.
805 If you wish to disable table generation for one Muse file, add the
806 directive @samp{#disable-tables t} to the top of the file.
808 @node Explicit Links, Implicit Links, Tables, Markup Rules
809 @comment  node-name,  next,  previous,  up
810 @section Hyperlinks and email addresses with descriptions
811 @cindex links, explicit
813 A hyperlink can reference a URL, or another page within a Muse
814 project.  In addition, descriptive text can be specified, which should
815 be displayed rather than the link text in output styles that supports
816 link descriptions.  The syntax is as follows.
818 @example
819 [[link target][link description]]
820 [[link target without description]]
821 @end example
823 Thus, the current maintainer's homepage for Muse can be found
824 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
825 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
827 @node Implicit Links, Images, Explicit Links, Markup Rules
828 @comment  node-name,  next,  previous,  up
829 @section Bare URLs, WikiNames, and InterWiki links
830 @cindex links, implicit
831 @cindex links, raw
833 @cindex URLs
834 @cindex Email addresses
836 A URL or email address encountered in the input text is published as a
837 hyperlink.  These kind of links are called @dfn{implicit links} because
838 they are not separated from the rest of the Muse document in any way.
840 Some characters in URLs will prevent Muse from recognizing them as
841 implicit links. If you want to link to a URL containing spaces or any of
842 the characters ``][,"'`()<>^'', you will have to make the link
843 explicit. The punctuation characters ``.,;:'' are also not recognized as
844 part of a URL when they appear at its end. For information on how to
845 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
846 addresses with descriptions}.
848 @cindex WikiNames
849 If the @command{muse-wiki} module is loaded, another form of implicit
850 link will be made available.  WikiNames, which are typed in CamelCase,
851 are highlighted and published as links, provided that the file they
852 refer to exists.
854 Customization of WikiName recognition may be accomplished by editing the
855 @code{muse-wiki-wikiword-regexp} option and subsequently running
856 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
857 If you use the Customize interface, the latter will be done
858 automatically.
860 @cindex InterWiki links
861 @cindex inter-project links
862 The @command{muse-wiki} module also allows for InterWiki links.  These
863 are similar to WikiWords, but they specify both the project and page of
864 a file.  The names of your project entries in @code{muse-project-alist}
865 will be used as InterWiki names by default.  Several examples follow.
867 @example
868 Blog::DocumentingMuse
869 Projects#EmacsMuse
870 Website
871 @end example
873 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
874 the project name, and @samp{DocumentingMuse} is the page name.  In the
875 second example, @samp{#} is the interwiki delimiter.  If the name of a
876 project occurs by itself in text, like the third case, it will be
877 colorized and published as a link to the default page of the given
878 project.
880 Customization of interwiki links may be accomplished by editing the
881 @code{muse-wiki-interwiki-alist} option.
883 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
884 @comment  node-name,  next,  previous,  up
885 @section Publishing and displaying images
886 @cindex images
887 @cindex links, with images
888 @subheading Image links
890 Links to images may be used in either the target or the description, or
891 both.  Thus, the following code will publish as a clickable image that
892 points to @url{http://www.mwolson.org/}.
894 @example
895 [[http://www.mwolson.org/][/static/logos/site-logo.png]]
896 @end example
898 Normally, images in the link part will be inlined.
900 If you want these images to be published as links instead, place the
901 text ``URL:'' immediately in front of the link text.  An example
902 follows.
904 @example
905 [[URL:http://www.mwolson.org/static/logos/site-logo.png]]
906 @end example
909 @cindex images, displaying
910 @cindex images, local
911 @subheading Displaying images in Muse mode
912 If a link to a locally-available image is encountered in the link
913 description, Muse mode will attempt to display it if your version of
914 Emacs permits this.
916 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
917 by setting the @code{muse-colors-inline-images} option to @code{nil}.
919 The method for finding images may be altered by customizing the
920 @code{muse-colors-inline-image-method} option.  One useful value for
921 this option is @code{muse-colors-use-publishing-directory}, which tells
922 Muse mode to look in the directory where the current file will be
923 published.  The default is to look in the current directory.  Relative
924 paths like @samp{../pics/} should work for either setting.
926 Eventually, it is hoped that Muse will be able to copy images from the a
927 ``source'' directory to a publishing directory by customizing
928 @code{muse-project-alist}, but this has not been implemented yet.
930 @cindex images, without descriptions
931 @cindex images, inlined
932 @subheading Publishing simple images
933 The following example will display correctly and publish correctly if a
934 @acronym{PNG} file called @file{TestLogo.png} exists in the
935 @file{../pics/} directory.  If text is on the same line as the picture,
936 it will remain so in the output.
938 @example
939 [[../myimage.png]]
940 @end example
942 @cindex images, captions
943 @subheading Publishing images with captions
944 If you want to add a caption to an image, use the following syntax.
945 This will center the image (if the output format supports it) and add a
946 centered caption below the picture.  Formats that do not support
947 centering the image will instead leave it against the left margin.
949 @example
950 [[../pics/mycat.png][My cat Dexter]]
951 @end example
953 Images with captions may only occur in their own paragraphs, with no
954 text on the same line.  Otherwise, the published output will not be
955 syntactically correct.
957 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
958 @comment  node-name,  next,  previous,  up
959 @section Inserting a horizontal line or anchor
961 @cindex horizontal rules
962 @cindex dashes
963 @subheading Horizontal Rules
965 Four or more dashes indicate a horizontal rule.  Be sure to put blank
966 lines around it, or it will be considered part of the proceeding or
967 following paragraph!
969 @cindex anchors
970 @cindex links, with target on same page
971 @subheading Anchors
973 If you begin a line with "#anchor" -- where "anchor" can be any word
974 that doesn't contain whitespace -- it defines an anchor at that point
975 into the document.  This point can be referenced using "page#anchor" as
976 the target in a Muse link.
978 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
979 @comment  node-name,  next,  previous,  up
980 @section Evaluating Emacs Lisp code in documents for extensibility
981 @cindex lisp, embedded
983 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
984 which is the only Muse tag supported in a style's header and footer
985 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
986 text you wish.  The inserted output will get marked up, if the
987 @verb{|<lisp>|} tag appears within the main text of the document.
989 @example
990 <lisp>(concat "This form gets " "inserted")</lisp>
991 @end example
993 @cindex lisp, and insert command
994 Note that you should not use the @code{insert} command within a set of
995 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
996 tags will be automatically inserted into the document.
998 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
999 @comment  node-name,  next,  previous,  up
1000 @section Lines to omit from published output
1001 @cindex comments
1002 @cindex publishing, omitting lines
1004 Use the following syntax to indicate a comment.  Comments will not be
1005 published.
1007 @example
1008 ; Comment text goes here.
1009 @end example
1011 That is, only a semi-colon at the beginning of a line, followed by a
1012 literal space, will cause that line to be treated as a comment.
1014 @node Tag Summary, , Comments, Markup Rules
1015 @comment  node-name,  next,  previous,  up
1016 @section Tags that Muse recognizes
1017 @cindex tags
1018 @cindex inserting files at publish time
1019 @cindex publishing, including markup in headers and footers
1020 @cindex publishing, inserting files
1022 Muse has several built-in tags that may prove useful during publishing.
1023 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1024 Muse uses, as well as make your own tags.
1026 @subheading Syntax
1028 If a tag takes arguments, it will look like this, where ``tagname'' is
1029 the name of the tag.
1031 @example
1032 <tagname arg1="string1" arg2="string2">
1033 @end example
1035 If you want the tag to look like it came straight from an XHTML
1036 document, you can alternatively do the following.
1038 @example
1039 <tagname arg1="string1" arg2="string2" />
1040 @end example
1042 If a tag surrounds some text, it will look like this.
1044 @example
1045 <tagname>Some text</tagname>
1046 @end example
1048 If a tag surrounds a large region, it will look like this.
1050 @example
1051 <tagname>
1052 Some text.
1053 Some more text.
1054 </tagname>
1055 @end example
1057 @subheading Tag listing
1059 This is the complete list of tags that Muse accepts, including those
1060 that were mentioned in previous sections.
1062 @table @samp
1064 @item <class>
1065 If publishing to HTML, surround the given text with a @verb{|<span>|}
1066 tag.  It takes one argument called ``name'' that specifies the class
1067 attribute of the @verb{|<span>|} tag.
1069 If publishing to a different format, do nothing extra to the text.
1071 @item <code>
1072 Treat the text surrounded by the tag as if they were enclosed in equal
1073 signs, that is, make it monospace.
1075 @item <command>
1076 Run a command on the region, replacing the region with the result of the
1077 command.  The command is specified with the ``interp'' argument.  If no
1078 value for ``interp'' is given, pass the entire region to the shell.
1080 The ``markup'' argument controls how this section is marked up.
1082 If it is omitted, publish the region with the normal Muse rules.
1084 If "nil", do not mark up the region at all, but prevent Muse from
1085 further interpreting it.
1087 If "example", treat the region as if it was surrounded by the
1088 @verb{|<example>|} tag.
1090 If "src", treat the included text as if it was surrounded by the
1091 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1092 doing this.
1094 If "verse", treat the region as if it was surrounded by the
1095 @verb{|<verse>|} tag, to preserve newlines.
1097 Otherwise, it should be the name of a function to call, with the buffer
1098 narrowed to the region.
1100 @item <comment>
1101 Treat the entire region as a comment.  If the option
1102 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1103 publish it using the comment syntax of the current publishing style.
1105 @item <contents>
1106 Publish a Table of Contents.  This will either be inserted in-place or
1107 at the beginning of the document, depending on your publishing style.
1108 It does not have a delimiting tag.
1110 By default, only 2 levels of headings will be included in the generated
1111 Table of Contents.  To change this globally, customize the
1112 @var{muse-publish-contents-depth} option.  To change this only for the
1113 current tag, use the ``depth'' argument.
1115 @item <example>
1116 Publish the region in monospace, preserving the newlines in the region.
1117 This is useful for snippets of code.
1119 @item <include>
1120 Insert the given file at the current location during publishing.  The
1121 basic use of this tag is as follows, replacing ``included_file'' with
1122 the name of the file that you want to include.
1124 @example
1125 <include file="included_file">
1126 @end example
1128 The ``markup'' argument controls how this section is marked up.
1130 If it is omitted, publish the included text with the normal Muse
1131 rules.
1133 If "nil", do not mark up the included text at all.
1135 If "example", treat the included text as if it was surrounded by the
1136 @verb{|<example>|} tag.
1138 If "src", treat the included text as if it was surrounded by the
1139 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1140 doing this.
1142 If "verse", treat the included text as if it was surrounded by the
1143 @verb{|<verse>|} tag, to preserve newlines.
1145 Otherwise, it should be the name of a function to call after inserting
1146 the file with the buffer narrowed to the section inserted.
1148 @item <lisp>
1149 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1150 The result is then inserted into the document, so you do not need to
1151 explicitly call @code{insert}.  All text properties are removed from the
1152 resulting text.
1154 This tag takes the ``markup'' argument.  See the description of
1155 @verb{|<command>|} for details.
1157 @item <literal>
1158 Make sure that the text enclosed by this tag is published without
1159 escaping it in any way.  This is useful for inserting markup directly
1160 into the published document, when Muse does not provide the desired
1161 functionality.
1163 @item <markup>
1164 Mark up the text between the initial and ending tags.  The markup
1165 command to use may be specified by the ``function'' argument.  The
1166 standard Muse markup routines are used by default if no ``function''
1167 argument is provided.
1169 This is useful for marking up regions in headers and footers.  One
1170 example that comes to mind is generating a published index of all of the
1171 files in the current project by doing the following.
1173 @example
1174 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1175 @end example
1177 @item <perl>
1178 Run the @command{perl} language interpreter on the region, replacing the
1179 region with the result of the command.
1181 This tag takes the ``markup'' argument.  See the description of
1182 @verb{|<command>|} for details.
1184 @item <python>
1185 Run the @command{python} language interpreter on the region, replacing
1186 the region with the result of the command.
1188 This tag takes the ``markup'' argument.  See the description of
1189 @verb{|<command>|} for details.
1191 @item <quote>
1192 Publish the region as a blockquote.  This will either be inserted
1193 in-place or at the beginning of the document, depending on your
1194 publishing style.  It does not have a delimiting tag.
1196 @item <ruby>
1197 Run the @command{ruby} language interpreter on the region, replacing the
1198 region with the result of the command.
1200 This tag takes the ``markup'' argument.  See the description of
1201 @verb{|<command>|} for details.
1203 @item <src>
1204 Publish the region using htmlize.
1205 The language to use may be specified by the ``lang'' attribute.
1207 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1208 the value of the ``lang'' attribute.
1210 This tag requires htmlize 1.34 or later in order to work.  If this is
1211 not satisfied, or the current publishing style is not HTML-based, Muse
1212 will publish the region like an @verb{|<example>|} tag.
1214 @item <verbatim>
1215 This is used when you want to prevent Muse from trying to interpret some
1216 markup.  Surround the markup in @verb{|<verbatim>|} and
1217 @verb{|</verbatim>|}, and it will not be interpreted.
1219 This tag was used often in previous versions of Muse because they did
1220 not support whole-document escaping of specials.  Now, it will only be
1221 needed for other tags, and perhaps footnotes as well.
1223 @item <verse>
1224 Preserve the newlines in the region.  In formats like HTML, newlines are
1225 removed by default, hence the need for this tag.  In other publishing
1226 styles, this tag may cause the text to be indented slightly in a way
1227 that looks nice for poetry and prose.
1229 @end table
1231 @node Publishing Styles, Extending Muse, Markup Rules, Top
1232 @comment  node-name,  next,  previous,  up
1233 @chapter Publishing Various Types of Documents
1234 @cindex publishing styles
1236 One of the principle features of Muse is the ability to publish a simple
1237 input text to a variety of different output styles.  Muse also makes it
1238 easy to create new styles, or derive from an existing style.
1240 @menu
1241 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1242 * Book::                        Publishing entries into a compilation.
1243 * DocBook::                     Publishing in DocBook XML form.
1244 * HTML::                        Publishing in HTML or XHTML form.
1245 * Journal::                     Keeping a journal or blog.
1246 * LaTeX::                       Publishing LaTeX documents.
1247 * Poem::                        Publish a poem to LaTex or PDF.
1248 * Texinfo::                     Publish entries to Texinfo format or PDF.
1249 @end menu
1251 @node Blosxom, Book, Publishing Styles, Publishing Styles
1252 @comment  node-name,  next,  previous,  up
1253 @section Integrating Muse and pyblosxom.cgi
1254 @cindex blog, one-file-per-entry style
1256 The Blosxom publishing style publishes a tree of categorised files to a
1257 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1258 In other words, each blog entry corresponds with one file.
1260 @menu
1261 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1262 * Blosxom Entries::             Format of a Blosxom entry and automation.
1263 * Blosxom Options::             Blosxom styles and options provided.
1264 @end menu
1266 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1267 @comment  node-name,  next,  previous,  up
1268 @subsection Other tools needed for the Blosxom style
1270 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1271 installed on a machine that you have upload access to.
1273 The following additional components are required in order to make the
1274 date of blog entries display as something sensible.
1276 @enumerate
1277 @item
1278 A script to gather date directives from the entire blog tree into a
1279 single file.  The file must associate a blog entry with a date.
1281 @item
1282 A plugin for (py)blosxom that reads this file.
1283 @end enumerate
1285 These 2 things are provided for @command{pyblosxom.cgi} in the
1286 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1287 former service, while @file{hardcodedates.py} provides the latter
1288 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1289 script will be found/written.
1291 Here is a sample listing from my @file{timestamps} file, which maps
1292 each file to a date.  This can really be in any format, as long as your
1293 date-gathering script and your plugin can both understand it.
1295 @example
1296 2005-04-01-14-16 personal/paper_cranes
1297 2005-03-21 personal/spring_break_over
1298 2004-10-24 personal/finished_free_culture
1299 @end example
1301 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1302 @file{getstamps.py}.  Note that you will need to set the current
1303 directory to where your Muse files are, execute @file{getstamps.py}, and
1304 then move the generated timestamps file to your publishing directory.
1306 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1307 @comment  node-name,  next,  previous,  up
1308 @subsection Format of a Blosxom entry and automation
1310 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1311 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1312 plus whatever normal content is desired.
1314 The date directive is not used directly by @command{pyblosxom.cgi} or
1315 this program.  You need to have the two additional items from the former
1316 section to make use of this feature.
1318 There is a function called @code{muse-blosxom-new-entry} that will
1319 automate the process of making a new blog entry.  To make use of it, do
1320 the following.
1322 @itemize @bullet
1323 @item
1324 Customize @code{muse-blosxom-base-directory} to the location that your
1325 blog entries are stored.
1327 @item
1328 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1329 use the following code to assign this function to @kbd{C-c p l'}.
1331 @example
1332 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1333 @end example
1335 @item
1336 You should create your directory structure ahead of time under your base
1337 directory.  These directories, which correspond with category names, may
1338 be nested.
1340 @item
1341 When you enter this key sequence, you will be prompted for the category
1342 of your entry and its title.  Upon entering this information, a new file
1343 will be created that corresponds with the title, but in lowercase
1344 letters and having special characters converted to underscores.  The
1345 title and date directives will be inserted automatically.
1346 @end itemize
1348 @node Blosxom Options, , Blosxom Entries, Blosxom
1349 @comment  node-name,  next,  previous,  up
1350 @subsection Blosxom styles and options provided
1352 The following styles and options are available in the Blosxom publishing
1353 style.
1355 @subheading Styles provided
1357 @table @code
1359 @cindex publishing styles, blosxom-html
1360 @item blosxom-html
1361 Publish Blosxom entries in HTML form.
1363 @cindex publishing styles, blosxom-xhtml
1364 @item blosxom-xhtml
1365 Publish Blosxom entries in XHTML form.
1367 @end table
1369 @subheading Options provided
1371 @table @code
1373 @item muse-blosxom-extension
1374 Default file extension for publishing Blosxom files.
1376 @item muse-blosxom-header
1377 Header used for publishing Blosxom files.
1379 This may be text or a filename.
1381 @item muse-blosxom-footer
1382 Footer used for publishing Blosxom files.
1384 This may be text or a filename.
1386 @item muse-blosxom-base-directory
1387 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1389 This is the top-level directory where your blog entries may be found
1390 locally.
1392 @end table
1394 @node Book, DocBook, Blosxom, Publishing Styles
1395 @comment  node-name,  next,  previous,  up
1396 @section Publishing entries into a compilation
1398 This publishing style is used to output ``books'' in LaTeX or PDF
1399 format.
1401 Each page will become a separate chapter in the book, unless the style
1402 keyword @option{:nochapters} is used, in which case they are all run
1403 together as if one giant chapter.
1405 One way of publishing a book is to make a project for it, add the
1406 project to @code{muse-project-alist}, and use the @code{book-pdf} style
1407 with a very specific @code{:include} value to specify some page whose
1408 contents will be checked for the values of @code{#title} and
1409 @code{#date}, and whose name will be used in the output file.  Then to
1410 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
1411 @kbd{C-c C-p} to trigger the publishing process.  An example
1412 @code{muse-project-alist} for this method follows.
1414 @example
1415 (setq muse-project-alist
1416       '(("MyNotes" (:nochapters t  ; do automatically add chapters
1417                     :book-chapter "Computer Science"
1418                     "~/Notes/cs"
1419                     :book-chapter "Mathematics"
1420                     "~/Notes/math"
1421                     :book-chapter "Emacs"
1422                     "~/Notes/emacs"
1423                     :book-end t ; the rest will not be placed in the book
1424                     "~/Notes"   ; so we can find the notes-anthology page
1425                     "~/Notes/private"
1426                     :force-publish ("index")
1427                     :default "index")
1428          (:base "book-pdf"
1429                 :include "/notes-anthology[^/]*$"
1430                 :path "~/public_html/notes")
1431          ;; other publishing styles for each directory go here,
1432          ;; if desired
1433          )))
1434 @end example
1436 In this example, there would be a file called
1437 @file{~/Notes/notes-anthology.muse}, which would contain just the
1438 following.  The resulting book would be published to
1439 @file{~/public_html/notes/notes-anthology.pdf}.
1441 @example
1442 #title My Technology Ramblings
1443 @end example
1445 Another way is to call the @code{muse-book-publish-project} function
1446 manually, with a custom project entry.  An example of this may be found
1447 in John Wiegley's configuration file at
1448 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
1449 function.
1451 @subheading Styles provided
1453 @table @code
1455 @cindex publishing styles, book-latex
1456 @item book-latex
1457 Publish a book in LaTeX form.  The header and footer are different than
1458 the normal LaTeX publishing mode.
1460 @cindex publishing styles, book-pdf
1461 @item book-pdf
1462 Publish a book in PDF form.  The header and footer are different than
1463 the normal PDF publishing mode.
1465 @end table
1467 @subheading Options provided
1469 @table @code
1471 @item muse-book-before-publish-hook
1472 A hook run in the book buffer before it is marked up.
1474 @item muse-book-after-publish-hook
1475 A hook run in the book buffer after it is marked up.
1477 @item muse-book-latex-header
1478 Header used for publishing books to LaTeX.
1480 This may be text or a filename.
1482 @item muse-book-latex-footer
1483 Footer used for publishing books to LaTeX.
1485 This may be text or a filename.
1487 @end table
1489 @node DocBook, HTML, Book, Publishing Styles
1490 @comment  node-name,  next,  previous,  up
1491 @section Publishing in DocBook XML form
1493 This publishing style is used to generate DocBook XML files.
1495 @subheading Styles provided
1497 @table @code
1499 @cindex publishing styles, docbook
1500 @item docbook
1502 @end table
1504 @subheading Options provided
1506 @table @code
1508 @item muse-docbook-extension
1509 Default file extension for publishing DocBook XML files.
1511 @item muse-docbook-header
1512 Header used for publishing DocBook XML files.
1514 This may be text or a filename.
1516 @item muse-docbook-footer
1517 Footer used for publishing DocBook XML files.
1519 This may be text or a filename.
1521 @item muse-docbook-markup-regexps
1522 List of markup rules for publishing a Muse page to DocBook XML.
1524 @item muse-docbook-markup-functions
1525 An alist of style types to custom functions for that kind of text.
1527 @item muse-docbook-markup-strings
1528 Strings used for marking up text.
1530 These cover the most basic kinds of markup, the handling of which
1531 differs little between the various styles.
1533 @item muse-docbook-markup-specials
1534 A table of characters which must be represented specially.
1536 @item muse-docbook-encoding-default
1537 The default Emacs buffer encoding to use in published files.
1538 This will be used if no special characters are found.
1540 @item muse-docbook-charset-default
1541 The default DocBook XML charset to use if no translation is
1542 found in @code{muse-docbook-encoding-map}.
1544 @item muse-docbook-encoding-map
1545 An alist mapping emacs coding systems to appropriate DocBook charsets.
1546 Use the base name of the coding system (i.e. without the -unix).
1548 @end table
1550 @node HTML, Journal, DocBook, Publishing Styles
1551 @comment  node-name,  next,  previous,  up
1552 @section Publishing in HTML or XHTML form
1554 This publishing style is capable of producing HTML or XHTML documents.
1556 @subheading Styles provided
1558 @table @code
1560 @cindex publishing styles, html
1561 @item html
1562 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1564 @item xhtml
1565 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1567 @end table
1569 @subheading Options provided
1571 If an HTML option does not have a corresponding XHTML option, it will
1572 be used for both of these publishing styles.
1574 @table @code
1576 @item muse-html-extension
1577 Default file extension for publishing HTML files.
1579 @item muse-xhtml-extension
1580 Default file extension for publishing XHTML files.
1582 @item muse-html-style-sheet
1583 Store your stylesheet definitions here.
1585 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1586 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1587 @verb{|<lisp>|} markup tags.
1589 If you are publishing to XHTML, then customize the
1590 @code{muse-xhtml-style-sheet} option instead.
1592 @item muse-xhtml-style-sheet
1593 Store your stylesheet definitions here.
1595 This is used in @code{muse-xhtml-header}.  You can put raw CSS in here
1596 or a @verb{|<link>|} tag to an external stylesheet.  This text may
1597 contain @verb{|<lisp>|} markup tags.
1599 @item muse-html-header
1600 Header used for publishing HTML files.
1602 This may be text or a filename.
1604 @item muse-html-footer
1605 Footer used for publishing HTML files.
1607 This may be text or a filename.
1609 @item muse-xhtml-header
1610 Header used for publishing XHTML files.
1612 This may be text or a filename.
1614 @item muse-xhtml-footer
1615 Footer used for publishing XHTML files.
1617 This may be text or a filename.
1619 @item muse-html-anchor-on-word
1620 When true, anchors surround the closest word.
1622 This allows you to select them in a browser (i.e. for pasting), but has
1623 the side-effect of marking up headers in multiple colors if your header
1624 style is different from your link style.
1626 @item muse-html-table-attributes
1627 The attribute to be used with HTML @verb{|<table>|} tags.
1629 If you want to make more-complicated tables in HTML, surround the HTML
1630 with the @verb{|literal|} tag, so that it does not get escaped.
1632 @item muse-html-markup-regexps
1633 List of markup rules for publishing a Muse page to HTML.
1635 @item muse-html-markup-functions
1636 An alist of style types to custom functions for that kind of text.
1638 @item muse-html-markup-strings
1639 Strings used for marking up text as HTML.
1641 These cover the most basic kinds of markup, the handling of which
1642 differs little between the various styles.
1644 @item muse-xhtml-markup-strings
1645 Strings used for marking up text as XHTML.
1647 These cover the most basic kinds of markup, the handling of which
1648 differs little between the various styles.
1650 @item muse-html-markup-tags
1651 A list of tag specifications, for specially marking up HTML.
1652 @xref{muse-publish-markup-tags}, for more information.
1654 @item muse-html-markup-specials
1655 A table of characters which must be represented specially.  By default,
1656 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1658 @item muse-html-meta-http-equiv
1659 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1661 @item muse-html-meta-content-type
1662 The content type used for the HTML @verb{|<meta>|} tag.
1664 If you are striving for XHTML 1.1 compliance, you may want to change
1665 this to ``application/xhtml+xml''.
1667 @item muse-html-meta-content-encoding
1668 The charset to append to the HTML @verb{|<meta>|} tag.
1670 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1671 and determine the HTML charset from emacs's coding.  If set to a string,
1672 this string will be used to force a particular charset.
1674 @item muse-html-charset-default
1675 The default HTML meta charset to use if no translation is found in
1676 @code{muse-html-encoding-map}.
1678 @item muse-html-encoding-default
1679 The default Emacs buffer encoding to use in published files.
1680 This will be used if no special characters are found.
1682 @item muse-html-encoding-map
1683 An alist mapping emacs coding systems to appropriate HTML charsets.
1684 Use the base name of the coding system (i.e. without the -unix).
1686 @end table
1688 @node Journal, LaTeX, HTML, Publishing Styles
1689 @comment  node-name,  next,  previous,  up
1690 @section Keeping a journal or blog
1691 @cindex journal
1692 @cindex blog, journal style
1694 The module facilitates the keeping and publication of a journal.  When
1695 publishing to HTML, it assumes the form of a web log, or blog.
1697 The input format for each entry is as follows.
1699 @example
1700 * 20040317: Title of entry
1702 text for the entry.
1704 <qotd>
1705 "You know who you are. It comes down to a simple gut check: You
1706 either love what you do or you don't. Period." -- P. Bronson
1707 </qotd>
1708 @end example
1710 The "qotd", or Quote of the Day, is entirely optional.  When generated
1711 to HTML, this entry is rendered as the following.
1713 @example
1714 <div class="entry">
1715   <div class="entry-qotd">
1716     <h3>Quote of the Day:</h3>
1717     <p>"You know who you are. It comes down to a simple gut
1718       check: You either love what you do or you don't. Period."
1719       -- P. Bronson</p>
1720   </div>
1721   <div class="entry-body">
1722     <div class="entry-head">
1723       <div class="entry-date">
1724         <span class="date">March 17, 2004</span>
1725       </div>
1726       <div class="entry-title">
1727         <h2>Title of entry</h2>
1728       </div>
1729     </div>
1730     <div class="entry-text">
1731       <p>Text for the entry.</p>
1732     </div>
1733   </div>
1734 </div>
1735 @end example
1737 The plurality of "div" tags makes it possible to display the entries in
1738 any form you wish, using a CSS style.
1740 Also, an .RDF file can be generated from your journal by publishing it
1741 with the "rdf" style.  It uses the first two sentences of the first
1742 paragraph of each entry as its "description", and auto-generates tags
1743 for linking to the various entries.
1745 @subheading Styles provided
1747 @table @code
1749 @cindex publishing styles, journal-html
1750 @item journal-html
1751 Publish journal entries as an HTML document.
1753 @cindex publishing styles, journal-xhtml
1754 @item journal-xhtml
1755 Publish journal entries as an XHTML document.
1757 @cindex publishing styles, journal-latex
1758 @item journal-latex
1759 Publish journal entries as a LaTeX document.
1761 @cindex publishing styles, journal-pdf
1762 @item journal-pdf
1763 Publish journal entries as a PDF document.
1765 @cindex publishing styles, journal-book-latex
1766 @item journal-book-latex
1767 Publish journal entries as a LaTeX book.
1769 @cindex publishing styles, journal-book-pdf
1770 @item journal-book-pdf
1771 Publish journal entries as a PDF book.
1773 @cindex publishing styles, journal-rdf
1774 @cindex publishing styles, RSS 1.0
1775 @item journal-rdf
1776 Publish journal entries as an RDF file (RSS 1.0).
1778 @cindex publishing styles, journal-rss
1779 @cindex publishing styles, RSS 2.0
1780 @item journal-rss
1781 Publish journal entries as an RSS file (RSS 2.0).
1783 @end table
1785 @subheading Options provided
1787 @table @code
1789 @item muse-journal-heading-regexp
1790 A regexp that matches a journal heading.
1792 Paren group 1 is the ISO date, group 2 is the optional category, and
1793 group 3 is the optional heading for the entry.
1795 @item muse-journal-date-format
1796 Date format to use for journal entries.
1798 @item muse-journal-html-heading-regexp
1799 A regexp that matches a journal heading from an HTML document.
1801 Paren group 1 is the ISO date, group 2 is the optional category, and
1802 group 3 is the optional heading for the entry.
1804 @item muse-journal-html-entry-template
1805 Template used to publish individual journal entries as HTML.
1807 @item muse-journal-latex-section
1808 Template used to publish a LaTeX section.
1810 @item muse-journal-latex-subsection
1811 Template used to publish a LaTeX subsection.
1813 @item muse-journal-latex-markup-tags
1814 A list of tag specifications, for specially marking up LaTeX.
1816 @xref{muse-publish-markup-tags}, for more information.
1818 @item muse-journal-rdf-extension
1819 Default file extension for publishing RDF (RSS 1.0) files.
1821 @item muse-journal-rdf-base-url
1822 The base URL of the website referenced by the RDF file.
1824 @item muse-journal-rdf-header
1825 Header used for publishing RDF (RSS 1.0) files.
1827 This may be text or a filename.
1829 @item muse-journal-rdf-footer
1830 Footer used for publishing RDF (RSS 1.0) files.
1832 This may be text or a filename.
1834 @item muse-journal-rdf-date-format
1835 Date format to use for RDF entries.
1837 @item muse-journal-rdf-entry-template
1838 Template used to publish individual journal entries as RDF.
1840 @item muse-journal-rdf-summarize-entries
1841 If non-nil, include only summaries in the RDF file, not the full data.
1843 @item muse-journal-rss-extension
1844 Default file extension for publishing RSS 2.0 files.
1846 @item muse-journal-rss-base-url
1847 The base URL of the website referenced by the RSS file.
1849 @item muse-journal-rss-header
1850 Header used for publishing RSS 2.0 files.
1852 This may be text or a filename.
1854 @item muse-journal-rss-footer
1855 Footer used for publishing RSS 2.0 files.
1857 This may be text or a filename.
1859 @item muse-journal-rss-date-format
1860 Date format to use for RSS 2.0 entries.
1862 @item muse-journal-rss-entry-template
1863 Template used to publish individual journal entries as RSS 2.0.
1865 @item muse-journal-rss-enclosure-types-alist
1866 File types that are accepted as RSS enclosures.
1868 This is an alist that maps file extension to content type.
1870 Useful for podcasting.
1872 @item muse-journal-rss-summarize-entries
1873 If non-nil, include only summaries in the RSS file, not the full data.
1875 Many RSS subscribers find this annoying.
1877 @item muse-journal-rss-markup-regexps
1878 List of markup rules for publishing a Muse journal page to RSS.
1880 For more information on the structure of this list,
1881 @xref{muse-publish-markup-regexps}.
1883 @item muse-journal-rss-markup-functions
1884 An alist of style types to custom functions for that kind of text.
1886 For more on the structure of this list,
1887 @xref{muse-publish-markup-functions}.
1889 @end table
1891 @node LaTeX, Poem, Journal, Publishing Styles
1892 @comment  node-name,  next,  previous,  up
1893 @section Publishing LaTeX documents
1895 This publishing style is capable of producing LaTeX or PDF documents.
1897 If you wish to publish PDF documents, you will need to have a good TeX
1898 installation.  For Debian and Ubuntu, this can be accomplished by
1899 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
1900 are also a must.
1902 @subheading Styles provided
1904 @table @code
1906 @cindex publishing styles, latex
1907 @item latex
1908 Publish a LaTeX document.
1910 @cindex publishing styles, pdf
1911 @item pdf
1912 Publish a PDF document, using an external LaTeX document conversion
1913 tool.
1915 @cindex publishing styles, latexcjk
1916 @item latexcjk
1917 Publish a LaTeX document with CJK (Chinese) encodings.
1919 @cindex publishing styles, pdfcjk
1920 @item pdfcjk
1921 Publish a PDF document with CJK (Chinese) encodings, using an external
1922 LaTeX document conversion tool.
1924 @end table
1926 @subheading Options provided
1928 @table @code
1930 @item muse-latex-extension
1931 Default file extension for publishing LaTeX files.
1933 @item muse-latex-pdf-extension
1934 Default file extension for publishing LaTeX files to PDF.
1936 @item muse-latex-header
1937 Header used for publishing LaTeX files.
1939 This may be text or a filename.
1941 @item muse-latex-footer
1942 Footer used for publishing LaTeX files.
1944 This may be text or a filename.
1946 @item muse-latexcjk-header
1947 Header used for publishing LaTeX files (CJK).
1949 This may be text or a filename.
1951 @item muse-latexcjk-footer
1952 Footer used for publishing LaTeX files (CJK).
1954 This may be text or a filename.
1956 @item muse-latex-markup-regexps
1957 List of markup regexps for identifying regions in a Muse page.
1959 For more on the structure of this list,
1960 @xref{muse-publish-markup-regexps}.
1962 @item muse-latex-markup-functions
1963 An alist of style types to custom functions for that kind of text.
1965 For more on the structure of this list,
1966 @xref{muse-publish-markup-functions}.
1968 @item muse-latex-markup-strings
1969 Strings used for marking up text.
1971 These cover the most basic kinds of markup, the handling of which
1972 differs little between the various styles.
1974 @item muse-latexcjk-encoding-map
1975 An alist mapping emacs coding systems to appropriate CJK codings.
1976 Use the base name of the coding system (ie, without the -unix).
1978 @item muse-latexcjk-encoding-default
1979 The default Emacs buffer encoding to use in published files.
1981 This will be used if no special characters are found.
1983 @item muse-latex-markup-specials-example
1984 A table of characters which must be represented specially.
1985 These are applied to @verb{|example>|} regions.
1987 With the default interpretation of @verb{|<example>|} regions, no
1988 specials need to be escaped.
1990 @item muse-latex-markup-specials-document
1991 A table of characters which must be represented specially.
1992 These are applied to the entire document, sans already-escaped
1993 regions.
1995 @item muse-latex-markup-specials-literal
1996 A table of characters which must be represented specially.
1997 This applies to =monospaced text= and @verb{|<code>|} regions.
1999 @item muse-latex-markup-specials-url
2000 A table of characters which must be represented specially.
2001 These are applied to URLs.
2003 @item muse-latex-permit-contents-tag
2004 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2005 contents.
2007 Most of the time, it is best to have a table of contents on the
2008 first page, with a new page immediately following.  To make this
2009 work with documents published in both HTML and LaTeX, we need to
2010 ignore the @verb{|<contents>|} tag.
2012 If you don't agree with this, then set this option to non-nil,
2013 and it will do what you expect.
2015 @end table
2017 @node Poem, Texinfo, LaTeX, Publishing Styles
2018 @comment  node-name,  next,  previous,  up
2019 @section Publish a poem to LaTex or PDF
2021 The @code{muse-poem} module makes it easy to attractively publish and
2022 reference poems in the following format, using the "memoir" module for
2023 LaTeX publishing.  It will also markup poems for every other output
2024 style, though none are nearly as pretty.
2026 @example
2027 Title
2030 Body of poem
2033 Annotations, history, notes, etc.
2034 @end example
2036 Once a poem is written in this format, just publish it to PDF using the
2037 @code{poem-pdf} style.  To make an inlined reference to a poem that
2038 you've written -- for example, from a blog page -- there is a "poem" tag
2039 defined by this module.
2041 @example
2042 <poem title="name.of.poem.page">
2043 @end example
2045 Let's assume the template above was called @file{name.of.poem.page};
2046 then the above tag would result in this inclusion.
2048 @example
2049 ** Title
2051 > Body of poem
2052 @end example
2054 John Wiegley uses this module for publishing all of the poems on his
2055 website, which are at
2056 @uref{http://www.newartisans.com/johnw/poems.html}.
2058 @subheading Styles provided
2060 @table @code
2062 @cindex publishing styles, poem-latex
2063 @item poem-latex
2064 Publish a poem in LaTeX form.
2066 @cindex publishing styles, poem-pdf
2067 @item poem-pdf
2068 Publish a poem to a PDF document.
2070 @cindex publishing styles, chapbook-latex
2071 @item chapbook-latex
2072 Publish a book of poems in LaTeX form.
2074 @cindex publishing styles, chapbook-pdf
2075 @item chapbook-pdf
2076 Publish a book of poems to a PDF document.
2078 @end table
2080 @subheading Options provided
2082 @table @code
2084 @item muse-poem-latex-header
2085 Header used for publishing LaTeX poems.
2087 This may be text or a filename.
2089 @item muse-poem-latex-footer
2090 Footer used for publishing LaTeX files.
2092 This may be text or a filename.
2094 @item muse-poem-markup-strings
2095 Strings used for marking up poems.
2097 These cover the most basic kinds of markup, the handling of which
2098 differs little between the various styles.
2100 @item muse-chapbook-latex-header
2101 Header used for publishing a book of poems in LaTeX form.
2103 This may be text or a filename.
2105 @item muse-chapbook-latex-footer
2106 Footer used for publishing a book of poems in LaTeX form.
2108 This may be text or a filename.
2110 @item muse-poem-chapbook-strings
2111 Strings used for marking up books of poems.
2113 These cover the most basic kinds of markup, the handling of which
2114 differs little between the various styles.
2116 @end table
2118 @node Texinfo, , Poem, Publishing Styles
2119 @comment  node-name,  next,  previous,  up
2120 @section Publish entries to Texinfo format or PDF
2122 Rules for publishing a Muse file as a Texinfo article.
2124 @subheading Styles provided
2126 @table @code
2128 @cindex publishing styles, texi
2129 @item texi
2130 Publish a file in Texinfo form.
2132 @cindex publishing styles, texi
2133 @item info
2134 Generate an Info file from a Muse file.
2136 @cindex publishing styles, info-pdf
2137 @item info-pdf
2138 Publish a file in PDF form.
2140 @end table
2142 @subheading Options provided
2144 @table @code
2146 @item muse-texinfo-process-natively
2147 If non-nil, use the Emacs `texinfmt' module to make Info files.
2149 @item muse-texinfo-extension
2150 Default file extension for publishing Texinfo files.
2152 @item muse-texinfo-info-extension
2153 Default file extension for publishing Info files.
2155 @item muse-texinfo-pdf-extension
2156 Default file extension for publishing PDF files.
2158 @item muse-texinfo-header
2159 Text to prepend to a Muse page being published as Texinfo.
2161 This may be text or a filename.
2162 It may contain @verb{|<lisp>|} markup tags.
2164 @item muse-texinfo-footer
2165 Text to append to a Muse page being published as Texinfo.
2167 This may be text or a filename.
2168 It may contain @verb{|<lisp>|} markup tags.
2170 @item muse-texinfo-markup-regexps
2171 List of markup rules for publishing a Muse page to Texinfo.
2173 For more on the structure of this list,
2174 @xref{muse-publish-markup-regexps}.
2176 @item muse-texinfo-markup-functions
2177 An alist of style types to custom functions for that kind of text.
2179 For more on the structure of this list, see
2180 @xref{muse-publish-markup-functions}.
2182 @item muse-texinfo-markup-strings
2183 Strings used for marking up text.
2185 These cover the most basic kinds of markup, the handling of which
2186 differs little between the various styles.
2188 @item muse-texinfo-markup-specials
2189 A table of characters which must be represented specially.
2191 @end table
2194 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
2195 @comment  node-name,  next,  previous,  up
2196 @chapter Making your own publishing styles
2198 @menu
2199 * Common Elements::             Common functionality shared by styles.
2200 * Deriving Styles::             Deriving a new style from an existing
2201                                   one.
2202 @end menu
2204 @node Common Elements, Deriving Styles, , Extending Muse
2205 @comment  node-name,  next,  previous,  up
2206 @section Common functionality shared by styles
2207 @cindex publishing styles, common
2209 @menu
2210 * Markup Functions::            Specifying functions to marking up text.
2211 * Markup Regexps::              Markup rules for publishing.
2212 * Markup Strings::              Strings specific to a publishing style.
2213 * Markup Tags::                 Tag specifications for special markup.
2214 * Style Elements::              Parameters used for defining styles.
2215 @end menu
2217 @node Markup Functions, Markup Regexps, , Common Elements
2218 @comment  node-name,  next,  previous,  up
2219 @subsection Specifying functions to mark up text
2220 @cindex publishing, markup functions
2222 @anchor{muse-publish-markup-functions}
2223 @code{muse-publish-markup-functions}
2225 An alist of style types to custom functions for that kind of text.
2227 This is used by publishing styles to attempt to minimize the amount of
2228 custom regexps that each has to define.  @file{muse-publish} provides
2229 rules for the most common types of markup.
2231 Each member of the list is of the following form.
2233 @example
2234 (SYMBOL FUNCTION)
2235 @end example
2237 @itemize @bullet
2238 @item SYMBOL
2239 Describes the type of text to associate with this rule.
2240 @code{muse-publish-markup-regexps} maps regexps to these symbols.
2242 @item FUNCTION
2243 Function to use to mark up this kind of rule if no suitable function is
2244 found through the @option{:functions} tag of the current style.
2245 @end itemize
2247 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
2248 @comment  node-name,  next,  previous,  up
2249 @subsection Markup rules for publishing
2250 @cindex publishing, markup regexps
2251 @cindex publishing, rules
2253 @anchor{muse-publish-markup-regexps}
2254 @code{muse-publish-markup-regexps}
2256 List of markup rules for publishing a page with Muse.
2258 The rules given in this variable are invoked first, followed by whatever
2259 rules are specified by the current style.
2261 Each member of the list is either a function, or a list of the following
2262 form.
2264 @example
2265 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
2266 @end example
2268 @itemize @bullet
2269 @item REGEXP
2270 A regular expression, or symbol whose value is a regular expression,
2271 which is searched for using `re-search-forward'.
2273 @item TEXT-BEGIN-GROUP
2274 The matching group within that regexp which denotes the beginning of the
2275 actual text to be marked up.
2277 @item REPLACEMENT-TEXT
2278 A string that will be passed to `replace-match'.
2280 If it is not a string, but a function, it will be called to determine
2281 what the replacement text should be (it must return a string).  If it is
2282 a symbol, the value of that symbol should be a string.
2283 @end itemize
2285 The replacements are done in order, one rule at a time.  Writing
2286 the regular expressions can be a tricky business.  Note that case
2287 is never ignored.  `case-fold-search' is always bound to nil
2288 while processing the markup rules.
2290 @subheading Publishing order
2292 This is the order that the publishing rules are consulted, by default.
2293 This may be changed by customizing @code{muse-publish-markup-regexps}.
2295 @table @code
2297 @item trailing and leading whitespace
2298 Remove trailing and leading whitespace from a file.
2300 @item directive
2301 @samp{#directive}
2303 This is only recognized at the beginning of a file.
2305 @item tag
2306 @samp{<tag>}
2308 @item comment
2309 @samp{; comment}
2311 @item anchor
2312 @samp{#anchor}
2314 @item explicit links
2315 Prevent emphasis characters in explicit links from being marked up.
2317 Don't actually publish them here, just add a special no-emphasis text
2318 property.
2320 @item word
2321 Whitespace-delimited word, possibly with emphasis characters
2323 This function is responsible for marking up emphasis and escaping some
2324 specials.
2326 @item emdash
2327 @samp{--}
2329 2-wide dash
2331 @item heading
2332 @samp{** Heading}
2334 Outline-mode style headings.
2336 @item enddots
2337 @samp{....}
2339 These are ellipses with a dot at end.
2341 @item dots
2342 @samp{...}
2344 Ellipses.
2346 @item rule
2347 @samp{----}
2349 Horizontal rule or section separator.
2351 @item fn-sep
2352 @samp{Footnotes:}
2354 beginning of footnotes section
2356 @item footnote
2357 @samp{[1]}
2359 Footnote definition or reference.  If at beginning of line, it is a
2360 definition.
2362 @item list
2363 @itemize @bullet
2364 @item
2365 @samp{ 1. }
2367 @item
2368 @samp{ - }
2370 @item
2371 @samp{term :: }
2372 @end itemize
2374 Numbered list, item list, or term definition list.
2376 @item quote
2377 spaces before beginning of text
2379 Blockquotes.
2381 @item verse
2382 @samp{> verse text}
2384 @item table
2385 @samp{table | cells}
2387 @item link
2388 @samp{[[explicit][links]]}
2390 @item url
2391 @samp{http://example.com/}
2393 @item email
2394 @samp{bare-email@@example.com}
2396 @end table
2398 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
2399 @comment  node-name,  next,  previous,  up
2400 @subsection Strings specific to a publishing style
2401 @cindex publishing, markup strings
2403 @dfn{Markup strings} are strings used for marking up text for a
2404 particular style.
2406 These cover the most basic kinds of markup, the handling of which
2407 differs little between the various styles.
2409 @subheading Available markup strings
2411 @table @code
2413 @item image-with-desc
2414 An image and a description.
2416 Argument 1: image without extension.  Argument 2: image extension.
2417 Argument 3: description.
2419 @item image
2420 An inlined image.
2422 Argument 1: image without extension.  Argument 2: image extension.
2424 @item image-link
2425 An image with a link around it.
2427 Argument 1: link.  Argument 2: image without extension.
2428 Argument 3: image extension.
2430 @item anchor-ref
2431 A reference to an anchor on the current page.
2433 Argument 1: anchor name.  Argument 2: description if one exists, or the
2434 original link otherwise.
2436 @item url
2437 A URL without a description.
2439 Argument 1: URL.
2441 @item link
2442 A link to a Muse page with a description.
2444 Argument 1: link.  Argument 2: description if one exists, or the
2445 original link otherwise.
2447 @item link-and-anchor
2448 A link to a Muse page with an anchor, and a description.
2450 Argument 1: link.  Argument 2: anchor name.
2451 Argument 3: description if one exists, or the original link otherwise.
2452 Argument 4: link without an extension.
2454 @item email-addr
2455 A link to an email address.
2457 Argument 1: email address.  Argument 2: email address.
2459 @item emdash
2460 A 2-length dash.
2462 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
2464 @item comment-begin
2465 Beginning of a comment.
2467 @item comment-end
2468 End of a comment.
2470 @item rule
2471 A horizontal line or space.
2473 @item no-break-space
2474 A space that separates two words which are not to be separated.
2476 @item footnote
2477 Beginning of footnote.
2479 @item footnote-end
2480 End of footnote.
2482 @item footnotemark
2483 Mark a reference for the current footnote.
2485 Argument 1: number of this footnote.
2487 @item footnotemark-end
2488 End of a reference for the current footnote.
2490 @item footnotetext
2491 Indicate the text of the current footnote.
2493 Argument 1: number of this footnote.
2495 @item footnotetext-end
2496 End of a footnote text line.
2498 @item fn-sep
2499 Text used to replace ``Footnotes:'' line.
2501 @item dots
2502 3 dots.
2504 @item enddots
2505 4 dots.
2507 @item part
2508 Beginning of a part indicator line.  This is used by book publishing.
2510 @item part-end
2511 End of a part indicator line.  This is used by book publishing.
2513 @item chapter
2514 Beginning of a chapter indicator line.  This is used by book publishing.
2516 @item chapter-end
2517 End of a chapter indicator line.  This is used by book publishing.
2519 @item section
2520 Beginning of level 1 section indicator line.
2522 Argument 1: level of section; always 1.
2524 @item section-end
2525 End of level 1 section indicator line.
2527 Argument 1: level of section; always 1.
2529 @item subsection
2530 Beginning of level 2 section indicator line.
2532 Argument 1: level of section; always 2.
2534 @item subsection-end
2535 End of level 2 section indicator line.
2537 Argument 1: level of section; always 2.
2539 @item subsubsection
2540 Beginning of level 3 section indicator line.
2542 Argument 1: level of section; always 3.
2544 @item subsubsection-end
2545 End of level 3 section indicator line.
2547 Argument 1: level of section; always 3.
2549 @item section-other
2550 Beginning of section indicator line, where level is greater than 3.
2552 Argument 1: level of section.
2554 @item section-other-end
2555 End of section indicator line, where level is greater than 3.
2557 Argument 1: level of section.
2559 @item begin-underline
2560 Beginning of underlined text.
2562 @item end-underline
2563 End of underlined text.
2565 @item begin-literal
2566 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2567 =teletype text=.
2569 @item end-literal
2570 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2571 text=.
2573 @item begin-emph
2574 Beginning of the first level of emphasized text.
2576 @item end-emph
2577 End of the first level of emphasized text.
2579 @item begin-more-emph
2580 Beginning of the second level of emphasized text.
2582 @item end-more-emph
2583 End of the second level of emphasized text.
2585 @item begin-most-emph
2586 Beginning of the third (and final) level of emphasized text.
2588 @item end-most-emph
2589 End of the third (and final) level of emphasized text.
2591 @item begin-verse
2592 Beginning of verse text.
2594 @item verse-space
2595 String used to each space that is further indented than the beginning of
2596 the verse.
2598 @item begin-verse-line
2599 Beginning of a line of verse.
2601 @item empty-verse-line
2602 End of a line of verse.
2604 @item begin-last-stanza-line
2605 Beginning of the last line of a verse stanza.
2607 @item end-last-stanza-line
2608 End of the last line of a verse stanza.
2610 @item end-verse
2611 End of verse text.
2613 @item begin-example
2614 Beginning of an example region.  To make use of this, an
2615 @samp{<example>} tag is needed.
2617 @item end-example
2618 End of an example region.  To make use of this, an @samp{</example>} tag
2619 is needed.
2621 @item begin-center
2622 Begin a centered line.
2624 @item end-center
2625 End a centered line.
2627 @item begin-quote
2628 Begin a quoted region.
2630 @item end-quote
2631 End a quoted region.
2633 @item begin-uli
2634 Begin an unordered list.
2636 @item end-uli
2637 End an unordered list.
2639 @item begin-uli-item
2640 Begin an unordered list item.
2642 @item end-uli-item
2643 End an unordered list item.
2645 @item begin-oli
2646 Begin an ordered list.
2648 @item end-oli
2649 End an ordered list.
2651 @item begin-oli-item
2652 Begin an ordered list item.
2654 @item end-oli-item
2655 End an ordered list item.
2657 @item begin-dl
2658 Begin a definition list.
2660 @item end-dl
2661 End a definition list.
2663 @item begin-dl-item
2664 Begin a definition list item.
2666 @item end-dl-item
2667 End a definition list item.
2669 @item begin-ddt
2670 Begin a definition list term.
2672 @item end-ddt
2673 End a definition list term.
2675 @item begin-dde
2676 Begin a definition list entry.
2678 @item end-dde
2679 End a definition list entry.
2681 @item begin-table
2682 Begin a table.
2684 @item end-table
2685 End a table.
2687 @item begin-table-group
2688 Begin a table grouping.
2690 @item end-table-group
2691 End a table grouping.
2693 @item begin-table-row
2694 Begin a table row.
2696 @item end-table-row
2697 End a table row.
2699 @item begin-table-entry
2700 Begin a table entry.
2702 @item end-table-entry
2703 End a table entry.
2705 @end table
2707 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2708 @comment  node-name,  next,  previous,  up
2709 @subsection Tag specifications for special markup
2710 @cindex publishing, markup tags
2712 @anchor{muse-publish-markup-tags}
2713 @code{muse-publish-markup-tags}
2715 A list of tag specifications, for specially marking up text.
2717 XML-style tags are the best way to add custom markup to Muse.  This is
2718 easily accomplished by customizing this list of markup tags.
2720 For each entry, the name of the tag is given, whether it expects a
2721 closing tag and/or an optional set of attributes, whether it is
2722 nestable, and a function that performs whatever action is desired within
2723 the delimited region.
2725 The tags themselves are deleted during publishing, before the function
2726 is called.  The function is called with three arguments, the beginning
2727 and end of the region surrounded by the tags.  If properties are
2728 allowed, they are passed as a third argument in the form of an alist.
2729 The `end' argument to the function is always a marker.
2731 Point is always at the beginning of the region within the tags, when the
2732 function is called.  Wherever point is when the function finishes is
2733 where tag markup will resume.
2735 These tag rules are processed once at the beginning of markup, and once
2736 at the end, to catch any tags which may have been inserted in-between.
2738 @node Style Elements, , Markup Tags, Common Elements
2739 @comment  node-name,  next,  previous,  up
2740 @subsection Parameters used for defining styles
2741 @cindex publishing, style elements
2743 Style elements are tags that define a style.  Use
2744 @code{muse-define-style} to create a new style.
2746 @example
2747 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2748 @end example
2750 @subheading Usable elements
2752 @table @option
2754 @item :suffix
2755 File extension to use for publishing files with this style.
2757 @item :link-suffix
2758 File extension to use for publishing links to Muse files with this
2759 style.
2761 @item :osuffix
2762 File extension to use for publishing second-stage files with this style.
2764 For example, PDF publishing generates a LaTeX file first, then a PDF
2765 from that LaTeX file.
2767 @item :regexps
2768 List of markup rules for publishing a page with Muse.
2769 @xref{muse-publish-markup-regexps}.
2771 @item :functions
2772 An alist of style types to custom functions for that kind of text.
2773 @xref{muse-publish-markup-functions}.
2775 @item :strings
2776 Strings used for marking up text with this style.
2778 These cover the most basic kinds of markup, the handling of which
2779 differs little between the various styles.
2781 @item :tags
2782 A list of tag specifications, used for handling extra tags.
2783 @xref{muse-publish-markup-tags}.
2785 @item :specials
2786 A table of characters which must be represented specially.
2788 @item :before
2789 A function that is to be executed on the newly-created publishing buffer
2790 (or the current region) before any publishing occurs.
2792 This is used to set extra parameters that direct the publishing process.
2794 @item :before-end
2795 A function that is to be executed on the publishing buffer (or the
2796 current region) immediately after applying all of the markup regexps.
2798 This is used to fix the order of table elements (header, footer, body)
2799 in XML-ish styles.
2801 @item :after
2802 A function that is to be executed on the publishing buffer after
2803 :before-end, and immediately after inserting the header and footer.
2805 This is used for generating the table of contents as well as setting the
2806 file coding system.
2808 @item :final
2809 A function that is to be executed after saving the published file, but
2810 while still in its buffer.
2812 This is used for generating second-stage documents like PDF files from
2813 just-published LaTeX files.
2815 @item :header
2816 Header used for publishing files of this style.
2818 This may be a variable, text, or a filename.  It is inserted at the
2819 beginning of a file, after evaluating the publishing markup.
2821 @item :footer
2822 Footer used for publishing files of this style.
2824 This may be a variable, text, or a filename.  It is inserted at the end
2825 of a file, after evaluating the publishing markup.
2827 @item :style-sheet
2828 Style sheet used for publishing files of this style.
2830 This may be a variable or text.  It is used in the header of HTML and
2831 XHTML based publishing styles.
2833 @item :browser
2834 The function used to browse the published result of files of this style.
2836 @end table
2838 @node Deriving Styles, , Common Elements, Extending Muse
2839 @comment  node-name,  next,  previous,  up
2840 @section Deriving a new style from an existing one
2841 @cindex publishing styles, deriving
2843 To create a new style from an existing one, use @code{muse-derive-style}
2844 as follows.  This is a good way to fix something you don't like about a
2845 particular publishing style, or to personalize it.
2847 @example
2848 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2849 @end example
2851 The derived name is a string defining the new style, such as "my-html".
2852 The base name must identify an existing style, such as "html" -- if you
2853 have loaded @file{muse-html}.  The style parameters are the same as
2854 those used to create a style, except that they override whatever
2855 definitions exist in the base style.  However, some definitions only
2856 partially override.  The following parameters support partial
2857 overriding.
2859 @xref{Style Elements}, for a complete list of all parameters.
2861 @table @option
2863 @item :functions
2864 If a markup function is not found in the derived style's function list,
2865 the base style's function list will be queried.
2867 @item :regexps
2868 All regexps in the current style and the base style(s) will be used.
2870 @item :strings
2871 If a markup string is not found in the derived style's string list, the
2872 base style's string list will be queried.
2874 @end table
2877 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
2878 @comment  node-name,  next,  previous,  up
2879 @chapter Getting Help and Reporting Bugs
2880 @cindex help, getting
2881 @cindex bugs, reporting
2883 After you have read this guide, if you still have questions about
2884 Muse, or if you have bugs to report, there are several places you can
2887 @itemize @bullet
2889 @item
2890 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
2891 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2892 to it.
2894 @item
2895 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2896 that Michael Olson (the current maintainer) made for Muse.
2898 @item
2899 Muse has four mailing lists.
2901 @table @samp
2903 @item muse-el-announce
2904 Low-traffic list for Muse-related announcements.
2906 You can join this mailing list (@email{muse-el-announce@@gna.org})
2907 using the subscription form at
2908 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
2909 mailing list is also available via Gmane (@url{http://gmane.org/}). The
2910 group is called @samp{gmane.emacs.muse.announce}.
2912 @item muse-el-discuss
2913 Discussion, bugfixes, suggestions, tips, and the like for Muse.
2914 This mailing list also includes the content of muse-el-announce.
2916 You can join this mailing list (@email{muse-el-discuss@@gna.org})
2917 using the subscription form at
2918 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
2919 list is also available via Gmane with the identifier
2920 @samp{gmane.emacs.muse.general}.
2922 @item muse-el-logs
2923 Log messages for commits made to Muse.
2925 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
2926 the subscription form at
2927 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
2928 is also available via Gmane with the identifier
2929 @samp{gmane.emacs.muse.scm}.
2931 @item muse-el-commits
2932 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
2933 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
2934 sent to this list automatically.
2936 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
2937 the subscription form at
2938 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
2939 is also available via Gmane with the identifier
2940 @samp{gmane.emacs.muse.cvs}.
2942 @item muse-el-internationalization
2943 Discussion of translation of the Muse website and documentation into
2944 many languages.
2946 You can join this mailing list
2947 (@email{muse-el-internationalization@@gna.org}) using the subscription
2948 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
2949 mailing list is also available via Gmane with the identifier
2950 @samp{gmane.emacs.muse.internationalization}.
2952 @end table
2954 @item
2955 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2956 contributors are frequently around and willing to answer your
2957 questions.  The @samp{#muse} channel is also available for
2958 Muse-specific help, and its current maintainer hangs out there.
2960 @item
2961 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2962 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
2963 it is often better to use the muse-el-discuss mailing list.
2965 @end itemize
2967 @node History, Contributors, Getting Help and Reporting Bugs, Top
2968 @comment  node-name,  next,  previous,  up
2969 @chapter History of This Document
2970 @cindex history, of Muse
2972 @itemize
2973 @item 2004
2974 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2975 limitations. Around February 2004, he started making "emacs-wiki version
2976 3.00 APLHA", which eventually became known as Muse.
2978 Most of those who frequent the emacs-wiki mailing list continued to use
2979 emacs-wiki, mainly because Planner hasn't been ported over to it.
2981 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2982 John Wiegley's request.
2984 @item 2005
2985 Michael Olson overhauled this document and added many new sections in
2986 preparation for the first release of Muse (3.01).
2988 @end itemize
2990 @node Contributors, GNU Free Documentation License, History, Top
2991 @comment  node-name,  next,  previous,  up
2992 @chapter Contributors to This Documentation
2993 @cindex contributors
2995 The first draft of this document was taken from the emacs-wiki texinfo
2996 manual.  Michael Olson adapted it for Muse and added most of its
2997 content.
2999 John Sullivan did a majority of the work on the emacs-wiki texinfo
3000 manual.
3002 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
3003 emacs-wiki texinfo manual.
3006 @include doclicense.texi
3009 @node Concept Index,  , GNU Free Documentation License, Top
3010 @comment  node-name,  next,  previous,  up
3011 @unnumbered Index
3013 @printindex cp
3015 @bye