Release Emacs Muse 3.03!
[muse-el.git] / texi / muse.texi
blobdaa3fa1b573c829e85fd342d454c4b8e80618989
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.03.
17 Copyright @copyright{} 2004, 2005, 2006,
18 2007 Free Software Foundation, Inc.
20 @quotation
21 Permission is granted to copy, distribute and/or modify this document
22 under the terms of the GNU Free Documentation License, Version 1.2 or
23 any later version published by the Free Software Foundation; with no
24 Invariant Sections, with the Front-Cover texts being ``A GNU
25 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
26 license is included in the section entitled ``GNU Free Documentation
27 License'' in this manual.
29 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
30 this GNU Manual, like GNU software.  Copies published by the Free
31 Software Foundation raise funds for GNU development.''
33 This document is part of a collection distributed under the GNU Free
34 Documentation License.  If you want to distribute this document
35 separately from the collection, you can do so by adding a copy of the
36 license to the document, as described in section 6 of the license.
38 All Emacs Lisp code contained in this document may be used, distributed,
39 and modified without restriction.
40 @end quotation
41 @end copying
43 @titlepage
44 @title Muse manual
45 @subtitle an authoring and publishing environment
46 @subtitle for GNU Emacs and XEmacs
48 @c The following two commands
49 @c start the copyright page.
50 @page
51 @vskip 0pt plus 1filll
52 @insertcopying
53 @end titlepage
55 @c So the toc is printed at the start
56 @contents
58 @ifnottex
59 @node Top, Preface, (dir), (dir)
60 @comment  node-name,  next,  previous,  up
61 @top Muse
63 @insertcopying
64 @end ifnottex
66 @menu
67 * Preface::                     About the documentation.
68 * Introduction::                What is Muse?
69 * Obtaining Muse::              How to get Muse releases and development
70                                   changes.
71 * Installation::                Compiling and installing Muse.
72 * Getting Started::             Setting up Muse and editing files.
73 * Projects::                    Creating and managing Muse projects.
74 * Keystroke Summary::           Keys used in Muse mode.
75 * Markup Rules::                Rules for using markup.
76 * Publishing Styles::           Publishing various types of documents.
77 * Extending Muse::              Making your own publishing styles.
78 * Getting Help and Reporting Bugs::  
79 * History::                     History of this document.
80 * Contributors::                Contributors to this documentation.
81 * GNU Free Documentation License::  The license for this documentation.
82 * Concept Index::               Search for terms.
84 @detailmenu
85  --- The Detailed Node Listing ---
87 How to Get Muse Releases and Development Changes
89 * Releases::                    Released versions of Muse.
90 * Development::                 Latest unreleased development changes.
92 Getting Started
94 * Loading Muse::                How to load Muse.
95 * Using Muse Mode::             How to edit files in Muse.
96 * Publishing Files Overview::   Publishing a single file or project.
97 * File Extensions::             Using a different file extension.
99 Creating and Managing Muse Projects
101 * Single Project::              A single-project example.
102 * Multiple Projects::           A multiple-project example.
103 * Projects and Subdirectories::  Publishing subdirectories in projects.
104 * Options for Projects::        Listing of available options for projects.
106 Rules for Using Markup
108 * Paragraphs::                  Paragraphs: centering and quoting.
109 * Headings::                    Levels of headings.
110 * Directives::                  Directives at the beginning of a
111                                   document.
112 * Emphasizing Text::            Bold, italicized, and underlined text.
113 * Footnotes::                   Making notes to be shown at the end.
114 * Verse::                       Indicating poetic stanzas.
115 * Lists::                       Lists of items.
116 * Tables::                      Generation of data tables.
117 * Explicit Links::              Hyperlinks and email addresses with
118                                   descriptions.
119 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
120                                   links.
121 * Images::                      Publishing and displaying images.
122 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
123 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
124                                   for extensibility.
125 * Comments::                    Lines to omit from published output.
126 * Tag Summary::                 Tags that Muse recognizes.
128 Publishing Various Types of Documents
130 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
131 * Book::                        Publishing entries into a compilation.
132 * DocBook::                     Publishing in DocBook XML form.
133 * HTML::                        Publishing in HTML or XHTML form.
134 * Journal::                     Keeping a journal or blog.
135 * LaTeX::                       Publishing LaTeX documents.
136 * Poem::                        Publish a poem to LaTex or PDF.
137 * Texinfo::                     Publish entries to Texinfo format or PDF.
138 * XML::                         Publish entries to XML.
140 Integrating Muse and pyblosxom.cgi
142 * Blosxom Requirements::        Other tools needed for the Blosxom style.
143 * Blosxom Entries::             Format of a Blosxom entry and automation.
144 * Blosxom Options::             Blosxom styles and options provided.
146 Making your own publishing styles
148 * Common Elements::             Common functionality shared by styles.
149 * Deriving Styles::             Deriving a new style from an existing
150                                   one.
152 Common functionality shared by styles
154 * Markup Functions::            Specifying functions to mark up text.
155 * Markup Regexps::              Markup rules for publishing.
156 * Markup Strings::              Strings specific to a publishing style.
157 * Markup Tags::                 Tag specifications for special markup.
158 * Style Elements::              Parameters used for defining styles.
160 @end detailmenu
161 @end menu
163 @node Preface, Introduction, Top, Top
164 @comment  node-name,  next,  previous,  up
165 @chapter About the documentation
167 This document describes Muse, which was written by John Wiegley and is
168 now maintained by Michael Olson.  Several versions of this manual are
169 available on-line.
171 @itemize @bullet
172 @item PDF: http://mwolson.org/static/doc/muse.pdf
173 @item HTML (single file): http://mwolson.org/static/doc/muse.html
174 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
175 @end itemize
177 @node Introduction, Obtaining Muse, Preface, Top
178 @comment  node-name,  next,  previous,  up
179 @chapter What is Muse?
181 Emacs Muse is an authoring and publishing environment for Emacs.  It
182 simplifies the process of writing documents and publishing them to
183 various output formats.
185 Muse consists of two main parts: an enhanced text-mode for authoring
186 documents and navigating within Muse projects, and a set of publishing
187 styles for generating different kinds of output.
189 What makes Muse distinct from other text-publishing systems is a modular
190 environment, with a rather simple core, in which "styles" are derived
191 from to create new styles.  Much of Muse's overall functionality is
192 optional.  For example, you can use the publisher without the
193 major-mode, or the mode without doing any publishing; or if you don't
194 load the Texinfo or LaTeX modules, those styles won't be available.
196 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
197 code has been restructured and rewritten, especially its publishing
198 functions.  The focus in this revision is on the authoring and
199 publishing aspects, and the "wikiness" has been removed as a default
200 behavior (available in the optional @file{muse-wiki} module).  CamelCase
201 words are no longer special by default.
203 One of the principal aims in the development of Muse is to make it very
204 easy to produce good-looking, standards-compliant documents.
206 @node Obtaining Muse, Installation, Introduction, Top
207 @comment  node-name,  next,  previous,  up
208 @chapter How to Get Muse Releases and Development Changes
210 @menu
211 * Releases::                    Released versions of Muse.
212 * Development::                 Latest unreleased development changes.
213 @end menu
215 @node Releases, Development, Obtaining Muse, Obtaining Muse
216 @comment  node-name,  next,  previous,  up
217 @section Released versions of Muse
219 Choose to install a release if you want to minimize risk.
221 Errors are corrected in development first.  User-visible changes will be
222 announced on the @email{muse-el-discuss@@gna.org} mailing list.
223 @xref{Getting Help and Reporting Bugs}.
225 @cindex releases, Debian package
226 @cindex Debian package for Muse
227 Debian users can get Muse via apt-get.  The @file{muse-el} package is
228 available both at Michael Olson's APT repository and the official Debian
229 repository.  To make use of the former, add the following line to your
230 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
232 @example
233 deb http://mwolson.org/debian/ ./
234 @end example
236 @cindex releases, Ubuntu package
237 @cindex Ubuntu package for Muse
238 Ubuntu users can also get Muse via apt-get.  The @file{muse-el} package
239 is available both at Michael Olson's APT repository and the official
240 Ubuntu repository.  To make use of the former, add the following line to
241 your @file{/etc/apt/sources.list} file and run @code{apt-get install
242 muse}.
244 @example
245 deb http://mwolson.org/ubuntu/ ./
246 @end example
248 The reason for making separate Debian and Ubuntu packages is that this
249 manual is under the GFDL, and Debian will not allow it to be distributed
250 in its main repository.  Ubuntu, on the other hand, permits this manual
251 to be included with the @file{muse-el} package.
253 @cindex releases, from source
254 Alternatively, you can download the latest release from
255 @uref{http://mwolson.org/static/dist/muse/} .
257 @node Development,  , Releases, Obtaining Muse
258 @comment  node-name,  next,  previous,  up
259 @section Latest unreleased development changes
260 @cindex development
262 Choose the development version if you want to live on the bleeding edge
263 of Muse development or try out new features before release.
265 @cindex arch revision control system, using
266 The Arch revision control system allows you to retrieve previous
267 versions and select specific features and bug fixes.  If you would like
268 to contribute to Muse development, it is highly recommended that you use
269 Arch, but this is not a requirement.
271 If you are new to Arch, you might find this tutorial helpful:
272 @uref{http://mwolson.org/projects/ArchTutorial.html}.
274 Downloading the Muse module with Arch and staying up-to-date involves
275 the following steps.
277 @enumerate
278 @item Install arch
280 @itemize @bullet
281 @item Debian and Ubuntu: @kbd{apt-get install tla}.
282 @item Other distributions: see @uref{http://www.gnuarch.org/gnuarchwiki/Getting_Arch}.
283 @end itemize
285 @item Register the archive.
286 @example
287 tla register-archive -f http://mwolson.org/archives/2006
288 @end example
290 You might ask why there is a mention of the year ``2006'' in the name of
291 the archive.  This year is not very significant---it only means that I
292 created this archive in 2006.  I used to create a new archive every
293 year, but this was a hassle for people who were trying to track
294 development of Muse, so I have stopped doing it.
296 @item Download the Muse package.
297 @example
298 # Download Muse into the @file{muse} directory.
299 tla get mwolson@@gnu.org--2006/muse--main--1.0 muse
300 @end example
302 @item List upstream changes that are missing from your local copy.
303 Do this whenever you want to see whether new changes have been committed
304 to Muse.
306 @example
307 # Change to the source directory you are interested in.
308 cd muse/
310 # Display the summary of changes
311 tla missing --summary
312 @end example
314 @cindex updating Muse with Arch
315 @item Update to the latest version by replaying missing changes.
316 @example
317 cd muse
318 tla update
319 @end example
321 @end enumerate
323 There are other ways to interact with the Muse archive.
325 @itemize
326 @item Browse arch repository: @uref{http://archzoom.mwolson.org/}
327 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
328 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
329 @end itemize
331 The latest development snapshot will be kept up-to-date since it is
332 updated at the same time as the Arch repository.
334 @node Installation, Getting Started, Obtaining Muse, Top
335 @comment  node-name,  next,  previous,  up
336 @chapter Compiling and Installing Muse
338 Muse may be compiled and installed on your machine.
340 @subheading Compilation
342 This is an optional step, since Emacs Lisp source code does not
343 necessarily have to be byte-compiled.  Byte-compilation may yield a very
344 slight speed increase.
346 A working copy of Emacs or XEmacs is needed in order to compile Emacs
347 Muse.  By default, the program that is installed with the name
348 @command{emacs} will be used.
350 If you want to use the @command{xemacs} binary to perform the
351 compilation, you would need to edit @file{Makefile.defs} in the
352 top-level directory as follows.  You can put either a full path to an
353 Emacs or XEmacs binary or just the command name, as long as it is in the
354 @env{PATH}.
356 @example
357 EMACS    = xemacs
358 SITEFLAG = -no-site-file
359 @end example
361 Running @code{make} in the top-level directory should compile the Muse
362 source files in the @file{lisp} directory, and generate an autoloads
363 file in @file{lisp/muse-autoloads.el}.
365 @subheading Installation
367 Muse may be installed into your file hierarchy by doing the following.
369 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
370 where you want the source and compiled Muse files to be installed and
371 @env{INFODIR} indicates where to put the Muse manual.  As mentioned
372 earlier, you will want to edit @env{EMACS} and @env{SITEFLAG} as shown
373 in the Compilation section if you are using XEmacs.
375 If you are installing Muse on a Debian or Ubuntu system, you might want
376 to change the value of @env{INSTALLINFO} as specified in
377 @file{Makefile.defs}.
379 If you wish to install Muse to different locations than the defaults
380 specify, edit @file{Makefile.defs} accordingly.
382 Run @code{make} as a normal user.
384 Run @code{make install} as the root user if you have chosen installation
385 locations that require root permissions.
388 @node Getting Started, Projects, Installation, Top
389 @comment  node-name,  next,  previous,  up
390 @chapter Getting Started
391 @cindex settings
393 @menu
394 * Loading Muse::                How to load Muse.
395 * Using Muse Mode::             How to edit files in Muse.
396 * Publishing Files Overview::   Publishing a single file or project.
397 * File Extensions::             Using a different file extension.
398 @end menu
400 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
401 @comment  node-name,  next,  previous,  up
402 @section How to Load Muse
403 @cindex settings, init file
405 To use Muse, add the directory containing its files to your
406 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
407 the authoring mode, and the styles you wish to publish to.  An example
408 follows.
410 @lisp
411 (add-to-list 'load-path "<path to Muse>")
413 (require 'muse-mode)     ; load authoring mode
415 (require 'muse-html)     ; load publishing styles I use
416 (require 'muse-latex)
417 (require 'muse-texinfo)
418 (require 'muse-docbook)
420 (require 'muse-project)  ; publish files in projects
421 @end lisp
423 An easy way of seeing which settings are available and changing settings
424 is to use the Muse customization interface.  To do this, type
425 @kbd{M-x customize-group muse RET}.  Each of the options has its own
426 documentation.  Options are grouped logically according to what effect
427 they have.
429 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
430 @comment  node-name,  next,  previous,  up
431 @section How to Edit Files in Muse
432 @cindex editing Muse files
434 Muse Mode should automatically be activated when you visit a file with a
435 ``.muse'' extension.  One such file is @file{QuickStart.muse}, which is
436 available in the @file{examples} directory of the Muse distribution.
437 You can tell that Muse Mose has been activated by checking for the text
438 ``Muse'' in your mode line.  If Muse Mode has not been activated, you
439 may activate it by type @kbd{M-x muse-mode RET}.
441 You will notice that Muse files are highlighted very simply.  Links are
442 colored blue, headings are large and bold text, and @verb{|<example>|}
443 tags are colored in grey.
445 There are several different ways to edit things like links, which hide
446 the underlying Muse markup.  One way is to toggle font-locking off by
447 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
448 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
449 on.  Another way is just to move into the text and edit it.  Markup can
450 also be removed by normal deletion methods, though some side effects
451 might require a second deletion.
453 For the particular case of editing links, it is easiest to move to the
454 link and do @kbd{C-c C-e}, which is also @kbd{M-x
455 muse-edit-link-at-point}.  This prompts you for the link and its
456 description, using the previous contents of the link as initial values.
457 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
458 A link to a URL may be created by hitting @kbd{C-c TAB u}.  Links may be
459 followed by hitting @kbd{RET} on them.
461 If you want to add a new list item, this may by accomplished by hitting
462 @kbd{M-RET}.  This will put a dash and some spaces on the screen.  The
463 dash is the Muse markup that indicates a list item.  It is also possible
464 to created ``nested'' lists with this command, by adjusting the number
465 of spaces in front of the dashes.  If you have lists with long lines,
466 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
467 lines.
469 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
470 @comment  node-name,  next,  previous,  up
471 @section Publishing a Single File or Project
472 @cindex editing Muse files
474 The command @kbd{M-x muse-project-publish-this-file} will publish the
475 current document to any available publishing style (a publishing style
476 is an output format, like HTML or Docbook), placing the output in the
477 current directory.  If you are in Muse Mode, this command will be bound
478 to @kbd{C-c C-t}.  If the file has been published recently, and its
479 contents have not changed, running @kbd{C-c C-t} again will not publish
480 the file.  To force publishing in this case, do @kbd{C-u C-c C-t}.
482 If you have set up projects and are visiting a file that is part of a
483 project, then @kbd{C-c C-t} will restrict the output formats to those
484 which are used by the project, and will automatically publish to the
485 output directory defined by the project.  If you want to publish to a
486 different directory or use a different format, then use @kbd{C-c M-C-t},
487 which is also @kbd{M-x muse-publish-this-file}.
489 If the currently opened file is part of a defined project in
490 @code{muse-project-alist}, it (and the rest of the changed files in a
491 project) may be published using @kbd{C-c C-p}.
493 @node File Extensions, , Publishing Files Overview, Getting Started
494 @comment  node-name,  next,  previous,  up
495 @section Using a Different File Extension
496 @cindex file extension, specifying
498 By default, Muse expects all project files to have the file extension
499 @file{.muse}. Files without this extension will not be associated with
500 Muse mode and will not be considered part of any project, even if they
501 are within a project directory.
503 If you don't want to use @file{.muse}, you can customize the extension
504 by setting the value of @code{muse-file-extension}.
506 If you don't want to use any extension at all, and want Muse to
507 autodetect project files based on their location, then add the following
508 to your Muse settings file.
510 @lisp
511 (setq muse-file-extension nil
512       muse-mode-auto-p t)
513 @end lisp
515 Note that if you chose to have @code{muse-file-extension} set to
516 @code{nil}, you may have trouble if your @file{.emacs} file or other
517 init scripts attempt to visit a Muse file.  (A very common example of
518 this is if you use Planner with Muse and run @code{(plan)} from your
519 @file{.emacs}.)  If you wish to visit Muse files from your
520 @file{.emacs}, be sure to also add the following additional code before
521 any such visits happen:
523 @lisp
524 (add-hook 'find-file-hooks 'muse-mode-maybe)
525 @end lisp
528 @node Projects, Keystroke Summary, Getting Started, Top
529 @comment  node-name,  next,  previous,  up
530 @chapter Creating and Managing Muse Projects
531 @cindex projects
533 Often you will want to publish all the files within a directory to a
534 particular set of output styles automatically.  To support, Muse
535 allows for the creation of "projects".
537 @menu
538 * Single Project::              A single-project example.
539 * Multiple Projects::           A multiple-project example.
540 * Projects and Subdirectories::  Publishing subdirectories in projects.
541 * Options for Projects::        Listing of available options for projects.
542 @end menu
544 @node Single Project, Multiple Projects, Projects, Projects
545 @comment  node-name,  next,  previous,  up
546 @section A Single-Project Example
547 @cindex projects, single
549 Here is a sample project, which may be defined in your @file{.emacs}
550 file.
552 @lisp
553 (setq muse-project-alist
554       '(("Website" ("~/Pages" :default "index")
555          (:base "html" :path "~/public_html")
556          (:base "pdf" :path "~/public_html/pdf"))))
557 @end lisp
559 The above defines a project named "website", whose files are located
560 in the directory @file{~/Pages}.  The default page to visit is
561 @file{index}.  When this project is published, each page will be
562 output as HTML to the directory @file{~/public_html}, and as PDF to
563 the directory @file{~/public_html/pdf}.  Within any project page, you
564 may create a link to other pages using the syntax @samp{[[pagename]]}.
566 If you would like to include only some files from a directory in a Muse
567 project, you may use a regexp in place of @file{~/Pages} in the example.
569 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
570 @comment  node-name,  next,  previous,  up
571 @section A Multiple-Project Example
572 @cindex projects, multiple
574 It is possible to specify multiple projects.  Here is an example of
575 three projects: a generic website, a projects area, and a day-planner
576 (the day-planner part requires Planner Mode---see
577 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
579 @lisp
580 (setq muse-project-alist
581       '(("Website" ("~/Pages" :default "index")
582          (:base "html" :path "~/public_html"))
583         (("Projects" ("~/Projects" :default "index")
584          (:base "xhtml"
585                 :path "~/public_html/projects"
586                 :exclude "/TopSecret")
587          (:base "pdf"
588                 :path "~/public_html/projects/pdf"
589                 :exclude "/TopSecret")))
590         ("Plans" ("~/Plans"
591                   :default "TaskPool"
592                   :major-mode planner-mode
593                   :visit-link planner-visit-link)
594          (:base "planner-xhtml"
595                 :path "~/public_html/plans"))))
596 @end lisp
598 The @samp{:major-mode} attribute specifies which major to use when
599 visiting files in this directory.
601 The @samp{:visit-link} attribute specifies the function to call when
602 visiting links.
604 The @samp{:exclude} attribute has a regexp that matches files to never
605 publish.
607 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
608 @comment  node-name,  next,  previous,  up
609 @section Publishing Subdirectories in Projects
610 @cindex projects, subdirectories
612 If you want to publish a directory and all of its subdirectories, Muse
613 provides two convenience functions that together generate the proper
614 rules for you.  Note that we use the backtick to begin this
615 muse-project-alist definition, rather than a single quote.
617 @lisp
618 (setq muse-project-alist
619       `(("Website" ("~/Pages" :default "index")
620          (:base "html" :path "~/public_html"))
621         ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
622                  :default "index")
623          ;; Publish this directory and its subdirectories.  Arguments
624          ;; are as follows.  The above `muse-project-alist-dirs' part
625          ;; is also needed.
626          ;;   1. Source directory
627          ;;   2. Output directory
628          ;;   3. Publishing style
629          ;;   remainder: Other things to put in every generated style
630          ,@@(muse-project-alist-styles "~/Blog"
631                                       "~/public_html/blog"
632                                       "blosxom"))))
633 @end lisp
635 The @code{muse-project-alist-dirs} function takes a directory and
636 returns it and all of its subdirectories in a list.
638 The @code{muse-project-alist-styles} function is explained by the
639 comments above.
641 The ``blosxom'' text is the name of another publishing style, much like
642 ``html''.  @xref{Blosxom}, for further information about it.  You can
643 use any publishing style you like for the third argument to
644 @code{muse-project-alist-styles}.
646 @node Options for Projects, , Projects and Subdirectories, Projects
647 @comment  node-name,  next,  previous,  up
648 @section Listing of Available Options for Projects
649 @cindex projects, options
650 @cindex muse-project-alist, reference
652 This is a listing of all of the various options (or, more accurately:
653 attributes) that may be specified in @code{muse-project-alist}.
655 Each muse-project-alist entry looks like this:
657 @example
658   (PROJECT-NAME (SOURCES)
659     OUTPUTS)
660 @end example
662 We refer to these names below.
664 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
665 The first value is a keyword, like @option{:default}.  The second part
666 is the value associated with that keyword, such as the text ``index''.
667 If you are familiar with Emacs Lisp property lists, the concept is
668 similar to that, except that in the SOURCES section, single directories
669 can be interspersed with two-value attributes.
671 @subheading Project Name
673 This is a string that indicates the name of the project.  It is
674 primarily used for publishing interwiki links with the
675 @file{muse-wiki.el} module.
677 @subheading Sources
679 This part of a muse-project-alist entry consists of two-value
680 attributes, and also directory names.  If you are publishing a book, the
681 order of directories and attributes is significant.
683 The minimal content for the sources section is a list of directories.
685 @table @option
687 @item :book-chapter
688 Indicates a new chapter of a book.  The text of the title of the chapter
689 comes immediately after this keyword.
691 @item :book-end
692 Indicates the end of a book.  Directories listed after this one are
693 ignored when publishing a book.  The value ``t'' (without quotes) should
694 come immediately after this keyword.
696 @item :book-funcall
697 A function to call while publishing a book.  This is useful for doing
698 something just after a particular chapter.
700 @item :book-part
701 Indicates the beginning of a new part of the book.  The text of the
702 title should come immediately after this keyword.
704 @item :book-style
705 Indicate a particular publishing style to use for this part of the book.
706 If this is specified, it should come just after a @option{:part}
707 attribute.
709 @item :default
710 The default page to visit when browsing a project.  Also, if you are
711 using the @file{muse-wiki.el} module, publishing a link to just a
712 project's name will cause it to link to this default file.
714 @item :force-publish
715 This specifies a list of pages which should be published every time a
716 project is published (by using @kbd{C-c C-p}, for example), regardless
717 of whether their contents have changed.  This is useful for updating
718 Index pages, pages that use the @verb{|<include>|} tag, and other pages
719 that have dynamically-generated content.
721 @item :major-mode
722 This specifies the major mode to use when visiting files in this
723 project.  The default is @code{muse-mode}.
725 @item :nochapters
726 This indicates that while publishing a book, do not automatically create
727 chapters.  Values which may follow this are nil (the default, which
728 means that we automatically create chapters), or non-nil, which means
729 that we manually specify chapters with the @option{:book-chapter}
730 attribute,
732 @item :publish-project
733 Indicates which function we should call when publishing a project.
735 @item :set
736 This specifies a list of variables and values to set when publishing a
737 project.  The list should be a property list, which is in the form:
739 @example
740 (VAR1 VALUE1 VAR2 VALUE2 ...)
741 @end example
743 @item :visit-link
744 Specifies the function to call when visiting a link.  The default is
745 @code{muse-visit-link-default}.  The arguments for that function should
746 be (1) the link and (2) whether to visit the link in a new window.
748 @end table
750 @subheading Outputs
752 This part of a muse-project-alist entry is composed of lists of
753 attributes.  Each list is called an ``output style''.
755 The minimal content for an output style is a @option{:base} attribute
756 and a @option{:path} attribute.
758 @table @option
760 @item :base
761 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
763 @item :base-url
764 An external URL which can be used to access published files.  This is
765 mainly used by the @file{muse-wiki} module when publishing links between
766 two separate projects, if the projects are served on different domains.
768 It is also used by the @file{muse-journal} module to create the RSS or
769 RDF output.
771 @item :exclude
772 Exclude items matching a regexp from being published.  The regexp should
773 usually begin with "/".
775 @item :include
776 Only include items matching a regexp when publishing.  The regexp should
777 usually begin with "/".
779 @item :path
780 The directory in which to store published files.
782 @item :timestamps
783 A file containing the timestamps (that is, time of creation) for files
784 in this project.  It might eventually used by the @file{muse-blosxom}
785 module, but this option is not currently in use by any Muse code.
787 @end table
790 @node Keystroke Summary, Markup Rules, Projects, Top
791 @comment  node-name,  next,  previous,  up
792 @chapter Keys Used in Muse Mode
793 @cindex keystrokes
795 This is a summary of keystrokes available in every Muse buffer.
797 @table @kbd
799 @item C-c C-a (`muse-index')
800 Display an index of all known Muse pages.
802 @item C-c C-b (`muse-find-backlinks')
803 Find all pages that link to this page.
805 @item C-c C-e (`muse-edit-link-at-point')
806 Edit link at point.
808 @item C-c C-f (`muse-project-find-file')
809 Open another Muse page.  Prompt for the name.
811 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
812 Insert a link to a file interactively.
814 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
815 Insert a tag interactively.
817 @item C-c C-i u, C-c TAB u (`muse-insert-url')
818 Insert a URL interactively.
820 @item C-c C-l (`font-lock-mode')
821 Toggle font lock / highlighting for the current buffer.
823 @item C-c C-p (`muse-project-publish')
824 Publish any Muse pages that have changed.
826 @item C-c C-s (`muse-search')
827 Find text in all files of the current project.
829 @item C-c C-t (`muse-project-publish-this-file')
830 Publish the currently-visited file.  Prompt for the style if the current
831 file can be published using more than one style.
833 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
834 Publish the currently-visited file.  Prompt for both the style and
835 output directory.
837 @item C-c C-v (`muse-browse-result')
838 Show the published result of this page.
840 @item C-c = (`muse-what-changed')
841 Diff this page against the last backup version.
843 @item TAB
844 Move to the next Wiki reference.
846 @item S-TAB
847 Move to the previous Wiki reference.
849 @item M-TAB
850 Complete the name of a page from the current project at point.
852 @item M-RET
853 Insert a new list item at point, indenting properly.
855 @item C-<
856 Decrease the indentation of the list item at point.
858 @item C->
859 Increase the indentation of the list item at point.
861 @item M-x muse-colors-toggle-inline-images RET
862 Toggle display of inlined images on/off.
864 @end table
867 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
868 @comment  node-name,  next,  previous,  up
869 @chapter Rules for Using Markup
870 @cindex markup
872 A Muse document uses special, contextual markup rules to determine how
873 to format the output result.  For example, if a paragraph is indented,
874 Muse assumes it should be quoted.
876 There are not too many markup rules, and all of them strive to be as
877 simple as possible so that you can focus on document creation, rather
878 than formatting.
880 @menu
881 * Paragraphs::                  Paragraphs: centering and quoting.
882 * Headings::                    Levels of headings.
883 * Directives::                  Directives at the beginning of a
884                                   document.
885 * Emphasizing Text::            Bold, italicized, and underlined text.
886 * Footnotes::                   Making notes to be shown at the end.
887 * Verse::                       Indicating poetic stanzas.
888 * Lists::                       Lists of items.
889 * Tables::                      Generation of data tables.
890 * Explicit Links::              Hyperlinks and email addresses with
891                                   descriptions.
892 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
893                                   links.
894 * Images::                      Publishing and displaying images.
895 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
896 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
897                                   for extensibility.
898 * Comments::                    Lines to omit from published output.
899 * Tag Summary::                 Tags that Muse recognizes.
900 @end menu
902 @node Paragraphs, Headings, Markup Rules, Markup Rules
903 @comment  node-name,  next,  previous,  up
904 @section Paragraphs: centering and quoting
905 @cindex paragraphs
907 Paragraphs in Muse must be separated by a blank line.
909 @cindex paragraphs, centered
910 @subheading Centered paragraphs and quotations
912 A line that begins with six or more columns of whitespace (either tabs
913 or spaces) indicates a centered paragraph.  Alternatively, you can use
914 the @verb{|<center>|} tag to surround regions that are to be published as
915 centered paragraphs.
917 @cindex paragraphs, quoted
918 @cindex quotations
919 But if a line begins with whitespace, though less than six columns, it
920 indicates a quoted paragraph.  Alternatively, you can use the
921 @verb{|<quote>|} tag to surround regions that are to be published as
922 quoted paragraphs.
924 @cindex examples
925 @cindex monospace, rendering blocks
926 @cindex HTML, rendering blocks in monospace
927 @subheading Literal paragraphs
929 The @verb{|<example>|} tag is used for examples, where whitespace should
930 be preserved, the text rendered in monospace, and any characters special
931 to the output style escaped.
933 @cindex literal text
934 @cindex HTML, inserting a raw block
935 There is also the @verb{|<literal>|} tag, which causes a marked block to
936 be entirely left alone.  This can be used for inserting a hand-coded
937 HTML blocks into HTML output, for example.
939 If you want some text to only be inserted when publishing to a
940 particular publishing style, use the @option{style} attribute for the
941 @verb{|<literal>|} tag.  An example follows.
943 @example
944 <literal style="latex">
945 A LaTeX-based style was used in the publishing of this document.
946 </literal>
947 @end example
949 This will leave the region alone if the current publishing style is
950 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
951 otherwise.  It is also possible to leave the text alone only for one
952 particular style, rather than its derivations, by adding
953 @code{exact="t"} to the tag.
955 @node Headings, Directives, Paragraphs, Markup Rules
956 @comment  node-name,  next,  previous,  up
957 @section Levels of headings
958 @cindex headings
960 A heading becomes a chapter or section in printed output -- depending on
961 the style.  To indicate a heading, start a new paragraph with one or
962 more asterices, followed by a space and the heading title.  Then begin
963 another paragraph to enter the text for that section.
965 All levels of headings will be published.  Most publishing styles only
966 distinguish the between the first 4 levels, however.
968 @example
969 * First level
971 ** Second level
973 *** Third level
975 **** Fourth level
976 @end example
978 @node Directives, Emphasizing Text, Headings, Markup Rules
979 @comment  node-name,  next,  previous,  up
980 @section Directives at the beginning of a document
981 @cindex directives
983 Directives are lines beginning with the @samp{#} character that come
984 before any paragraphs or sections in the document.  Directives are of
985 the form ``#directive content of directive''.  You can use any
986 combination of uppercase and lowercase letters for directives, even if
987 the directive is not in the list below.
989 The @code{muse-publishing-directive} function may be used in header and
990 footer text to access directives.  For example, to access the
991 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
993 The following is a list of directives that Muse uses.
995 @table @code
996 @cindex #author
997 @item #author
998 The author of this document.
1000 If this is not specified, Muse will attempt to figure it out from the
1001 @code{user-full-name} variable.
1003 @cindex #date
1004 @item #date
1005 The date that the document was last modified.
1007 This is used by publishing styles that are able to embed the date
1008 information.
1010 @cindex #desc
1011 @item #desc
1012 A short description of this document.
1014 This is used by the @code{journal} publishing style to embed information
1015 inside of an RSS/RDF feed.
1017 @cindex #title
1018 @item #title
1019 The title of this document.
1021 If this is not specified, the name of the file is used.
1023 @end table
1025 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1026 @comment  node-name,  next,  previous,  up
1027 @section Bold, italicized, and underlined text
1028 @cindex emphasizing text
1029 @cindex underlining text
1030 @cindex italicizing text
1031 @cindex verbatim text
1032 @cindex monospace, rendering words
1034 To emphasize text, surround it with certain specially recognized
1035 characters.
1037 @example
1038 *emphasis*
1039 **strong emphasis**
1040 ***very strong emphasis***
1041 _underlined_
1042 =verbatim and monospace=
1043 @end example
1045 @cindex WYSIWYG
1046 While editing a Muse document in Muse mode, these forms of emphasis will
1047 be highlighted in a WYSIWYG manner.  Each of these forms may span
1048 multiple lines.
1050 Verbatim text will be colored as gray by default.  To change this,
1051 customize @code{muse-verbatim-face}.
1053 You can also use the @verb{|<code>|} tag to indicate verbatim and
1054 monospace text.  This is handy for regions that have an ``='' in them.
1056 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1057 @comment  node-name,  next,  previous,  up
1058 @section Making notes to be shown at the end
1059 @cindex footnotes
1061 A footnote reference is simply a number in square brackets.  To define
1062 the footnote, place this definition at the bottom of your file.
1063 @samp{footnote-mode} can be used to greatly facilitate the creation of
1064 these kinds of footnotes.
1066 Footnotes are defined by the same number in brackets occurring at the
1067 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
1068 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
1069 the point of insertion.
1071 @node Verse, Lists, Footnotes, Markup Rules
1072 @comment  node-name,  next,  previous,  up
1073 @section Indicating poetic stanzas
1074 @cindex verses
1075 @cindex poetry
1077 Poetry requires that whitespace be preserved, but without resorting to
1078 monospace.  To indicate this, use the following markup, reminiscent of
1079 email quotations.
1081 @example
1082 > A line of Emacs verse;
1083 >   forgive its being so terse.
1084 @end example
1086 You can also use the @verb{|<verse>|} tag, if you prefer.
1088 @example
1089 <verse>
1090 A line of Emacs verse;
1091   forgive its being so terse.
1092 </verse>
1093 @end example
1095 @cindex verses, multiple stanzas
1096 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1097 follows.
1099 @example
1100 <verse>
1101 A line of Emacs verse;
1102   forgive its being so terse.
1104 In terms of terse verse,
1105   you could do worse.
1106 </verse>
1107 @end example
1109 @node Lists, Tables, Verse, Markup Rules
1110 @comment  node-name,  next,  previous,  up
1111 @section Lists of items
1112 @cindex lists
1114 Lists are given using special characters at the beginning of a line.
1115 Whitespace must occur before bullets or numbered items, to distinguish
1116 from the possibility of those characters occurring in a real sentence.
1118 @cindex lists, bullets
1119 These are rendered as a bullet list.
1121 @example
1122 Normal text.
1124  - bullet item one
1125  - bullet item two
1126 @end example
1128 @cindex lists, enumerated
1129 An enumerated list follows.
1131 @example
1132 Normal text.
1134  1. Enum item one
1135  2. Enum item two
1136 @end example
1138 @cindex lists, definitions
1139 Here is a definition list.
1141 @example
1142 Term1 ::
1143   This is a first definition
1144   And it has two lines;
1145   no, make that three.
1147 Term2 :: This is a second definition
1148 @end example
1150 @subheading Nested lists
1152 @cindex lists, nested
1153 It is possible to nest lists of the same or different kinds.  The
1154 ``level'' of the list is determined by the amount of initial whitespace.
1156 @example
1157 Normal text.
1159  - Level 1, bullet item one
1160    1. Level 2, enum item one
1161    2. Level 2, enum item two
1162  - Level 1, bullet item two
1163    1. Level 2, enum item three
1164    2. Level 2, enum item four
1165       term :: definition
1166 @end example
1168 @subheading Breaking list items
1170 @cindex lists, breaking lines
1171 If you want to break up a line within any list type, just put one blank
1172 line between the end of the previous line and the beginning of the next
1173 line, using the same amount of initial indentation.
1175 @example
1176  - bullet item 1, line 1
1178    bullet item 1, line 2
1180    1. Enum line 1
1182       Enum line 2
1184  - bullet item 2, line 1
1186    bullet item 2, line 2
1187 @end example
1189 @node Tables, Explicit Links, Lists, Markup Rules
1190 @comment  node-name,  next,  previous,  up
1191 @section Generation of data tables
1192 @cindex tables
1194 @cindex tables, simple
1195 Only very simple tables are supported.  The syntax is as follows.
1197 @example
1198 Double bars  || Separate header fields
1200 Single bars   | Separate body fields
1201 Here are more | body fields
1203 Triple bars ||| Separate footer fields
1204 @end example
1206 Some publishing styles require header fields to come first, then footer
1207 fields, and then the body fields.  You can use any order for these
1208 sections that you like, and Muse will re-order them for you at
1209 publish-time.
1211 If you wish to disable table generation for one Muse file, add the
1212 directive @samp{#disable-tables t} to the top of the file.
1214 @subheading Other table formats
1216 @cindex tables, orgtbl-mode style
1217 It is possible to publish very basic Orgtbl-mode style tables.
1219 @example
1220 | org  | style | table |
1221 |------+-------+-------|
1222 | one  |       | one   |
1223 | two  | two   |       |
1224 |      | three | three |
1225 |------+-------+-------|
1226 | more | stuff |       |
1227 @end example
1229 If you are used to the way that Org Mode publishes these tables, then
1230 customize `muse-html-table-attributes' to the following, in order to get
1231 a similar kind of output.
1233 @example
1234 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1235 @end example
1237 @cindex tables, table.el style
1238 @file{table.el} style tables are also supported, as long as
1239 @file{table.el} itself supports outputting tables for a particular
1240 publishing style.  At the time of this writing, the ``html'', ``latex'',
1241 and ``docbook'' styles are supported by @file{table.el}.  Styles derived
1242 from these styles will also work.
1244 @example
1245 +---+-----+---+
1246 |   | one | 1 |
1247 +---+-----+---+
1248 | b | two |   |
1249 +---+-----+---+
1250 | c |     | 3 |
1251 +---+-----+---+
1252 @end example
1254 @node Explicit Links, Implicit Links, Tables, Markup Rules
1255 @comment  node-name,  next,  previous,  up
1256 @section Hyperlinks and email addresses with descriptions
1257 @cindex links, explicit
1259 A hyperlink can reference a URL, or another page within a Muse
1260 project.  In addition, descriptive text can be specified, which should
1261 be displayed rather than the link text in output styles that supports
1262 link descriptions.  The syntax is as follows.
1264 @example
1265 [[link target][link description]]
1266 [[link target without description]]
1267 @end example
1269 Thus, the current maintainer's homepage for Muse can be found
1270 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1271 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1273 @node Implicit Links, Images, Explicit Links, Markup Rules
1274 @comment  node-name,  next,  previous,  up
1275 @section Bare URLs, WikiNames, and InterWiki links
1276 @cindex links, implicit
1277 @cindex links, raw
1279 @cindex URLs
1280 @cindex Email addresses
1282 A URL or email address encountered in the input text is published as a
1283 hyperlink.  These kind of links are called @dfn{implicit links} because
1284 they are not separated from the rest of the Muse document in any way.
1286 Some characters in URLs will prevent Muse from recognizing them as
1287 implicit links. If you want to link to a URL containing spaces or any of
1288 the characters ``][,"'`()<>^'', you will have to make the link
1289 explicit. The punctuation characters ``.,;:'' are also not recognized as
1290 part of a URL when they appear at its end. For information on how to
1291 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1292 addresses with descriptions}.
1294 @cindex WikiNames
1295 If the @command{muse-wiki} module is loaded, another form of implicit
1296 link will be made available.  WikiNames, which are typed in CamelCase,
1297 are highlighted and published as links, provided that the file they
1298 refer to exists.
1300 Customization of WikiName recognition may be accomplished by editing the
1301 @code{muse-wiki-wikiword-regexp} option and subsequently running
1302 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1303 If you use the Customize interface, the latter will be done
1304 automatically.
1306 @cindex InterWiki links
1307 @cindex inter-project links
1308 The @command{muse-wiki} module also allows for InterWiki links.  These
1309 are similar to WikiWords, but they specify both the project and page of
1310 a file.  The names of your project entries in @code{muse-project-alist}
1311 will be used as InterWiki names by default.  Several examples follow.
1313 @example
1314 Blog::DocumentingMuse
1315 Projects#EmacsMuse
1316 Website
1317 @end example
1319 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1320 the project name, and @samp{DocumentingMuse} is the page name.  In the
1321 second example, @samp{#} is the interwiki delimiter.  If the name of a
1322 project occurs by itself in text, like the third case, it will be
1323 colorized and published as a link to the default page of the given
1324 project.
1326 Customization of interwiki links may be accomplished by editing the
1327 @code{muse-wiki-interwiki-alist} option.
1329 It is also possible to link to an anchor in an interwiki document.  This
1330 is called a ``three-part link''.  Examples of this follow.
1332 @example
1333 Blog::DocumentingMuse#anchor1
1334 Projects#EmacsMuse#anchor2
1335 @end example
1337 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1338 @comment  node-name,  next,  previous,  up
1339 @section Publishing and displaying images
1340 @cindex images
1341 @cindex links, with images
1342 @subheading Image links
1344 Links to images may be used in either the target or the description, or
1345 both.  Thus, the following code will publish as a clickable image that
1346 points to @url{http://mwolson.org/}.
1348 @example
1349 [[http://mwolson.org/][/static/logos/site-logo.png]]
1350 @end example
1352 Normally, images in the link part will be inlined.
1354 If you want these images to be published as links instead, place the
1355 text ``URL:'' immediately in front of the link text.  An example
1356 follows.
1358 @example
1359 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1360 @end example
1362 @cindex images, displaying
1363 @cindex images, local
1364 @subheading Displaying images in Muse mode
1365 If a link to a locally-available image is encountered in the link
1366 description, Muse mode will attempt to display it if your version of
1367 Emacs permits this.
1369 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1370 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1372 The method for finding images may be altered by customizing the
1373 @code{muse-colors-inline-image-method} option.  One useful value for
1374 this option is @code{muse-colors-use-publishing-directory}, which tells
1375 Muse mode to look in the directory where the current file will be
1376 published.  The default is to look in the current directory.  Relative
1377 paths like @samp{../pics/} should work for either setting.
1379 Eventually, it is hoped that Muse will be able to copy images from the a
1380 ``source'' directory to a publishing directory by customizing
1381 @code{muse-project-alist}, but this has not been implemented yet.
1383 @cindex images, without descriptions
1384 @cindex images, inlined
1385 @subheading Publishing simple images
1386 The following example will display correctly and publish correctly if a
1387 @acronym{PNG} file called @file{TestLogo.png} exists in the
1388 @file{../pics/} directory.  If text is on the same line as the picture,
1389 it will remain so in the output.
1391 @example
1392 [[../myimage.png]]
1393 @end example
1395 @cindex images, captions
1396 @subheading Publishing images with captions
1397 If you want to add a caption to an image, use the following syntax.
1398 This will center the image (if the output format supports it) and add a
1399 centered caption below the picture.  Formats that do not support
1400 centering the image will instead leave it against the left margin.
1402 @example
1403 [[../pics/mycat.png][My cat Dexter]]
1404 @end example
1406 Images with captions may only occur in their own paragraphs, with no
1407 text on the same line.  Otherwise, the published output will not be
1408 syntactically correct.
1410 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1411 @comment  node-name,  next,  previous,  up
1412 @section Inserting a horizontal line or anchor
1414 @cindex horizontal rules
1415 @cindex dashes
1416 @subheading Horizontal Rules
1418 Four or more dashes indicate a horizontal rule.  Be sure to put blank
1419 lines around it, or it will be considered part of the proceeding or
1420 following paragraph!
1422 @cindex anchors
1423 @cindex links, with target on same page
1424 @subheading Anchors
1426 If you begin a line with "#anchor" -- where "anchor" can be any word
1427 that doesn't contain whitespace -- it defines an anchor at that point
1428 into the document.  This point can be referenced using "page#anchor" as
1429 the target in a Muse link.
1431 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
1432 @comment  node-name,  next,  previous,  up
1433 @section Evaluating Emacs Lisp code in documents for extensibility
1434 @cindex lisp, embedded
1436 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
1437 which is the only Muse tag supported in a style's header and footer
1438 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
1439 text you wish.  The inserted output will get marked up, if the
1440 @verb{|<lisp>|} tag appears within the main text of the document.
1442 @example
1443 <lisp>(concat "This form gets " "inserted")</lisp>
1444 @end example
1446 @cindex lisp, and insert command
1447 Note that you should not use the @code{insert} command within a set of
1448 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1449 tags will be automatically inserted into the document.
1451 It is also possible to treat the output as if it were surrounded by the
1452 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1453 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1454 attribute of the @verb{|<lisp>|} tag.
1456 @example
1457 <lisp markup="example">
1458 (concat "Insert" " me")
1459 </lisp>
1460 @end example
1462 Other languages also have tags that cause source code to be evaluated.
1463 @xref{Tag Summary}, for details.
1465 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
1466 @comment  node-name,  next,  previous,  up
1467 @section Lines to omit from published output
1468 @cindex comments
1469 @cindex publishing, omitting lines
1471 Use the following syntax to indicate a comment.  Comments will not be
1472 published.
1474 @example
1475 ; Comment text goes here.
1476 @end example
1478 That is, only a semi-colon at the beginning of a line, followed by a
1479 literal space, will cause that line to be treated as a comment.
1481 You can alternatively surround the region with the @verb{|<comment>|}
1482 tag.
1484 If you wish the comment to be published, but just commented out using
1485 the comment syntax of the output format, then set
1486 @option{muse-publish-comments-p} to non-nil.
1488 @node Tag Summary, , Comments, Markup Rules
1489 @comment  node-name,  next,  previous,  up
1490 @section Tags that Muse recognizes
1491 @cindex tags
1492 @cindex inserting files at publish time
1493 @cindex publishing, including markup in headers and footers
1494 @cindex publishing, inserting files
1496 Muse has several built-in tags that may prove useful during publishing.
1497 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1498 Muse uses, as well as make your own tags.
1500 @subheading Syntax
1502 If a tag takes arguments, it will look like this, where ``tagname'' is
1503 the name of the tag.
1505 @example
1506 <tagname arg1="string1" arg2="string2">
1507 @end example
1509 If you want the tag to look like it came straight from an XHTML
1510 document, you can alternatively do the following.
1512 @example
1513 <tagname arg1="string1" arg2="string2" />
1514 @end example
1516 If a tag surrounds some text, it will look like this.
1518 @example
1519 <tagname>Some text</tagname>
1520 @end example
1522 If a tag surrounds a large region, it will look like this.
1524 @example
1525 <tagname>
1526 Some text.
1527 Some more text.
1528 </tagname>
1529 @end example
1531 @subheading Tag listing
1533 This is the complete list of tags that Muse accepts, including those
1534 that were mentioned in previous sections.
1536 @table @samp
1538 @item <class>
1539 If publishing to HTML, surround the given text with a @verb{|<span>|}
1540 tag.  It takes one argument called ``name'' that specifies the class
1541 attribute of the @verb{|<span>|} tag.
1543 If publishing to a different format, do nothing extra to the text.
1545 @item <code>
1546 Treat the text surrounded by the tag as if they were enclosed in equal
1547 signs, that is, make it monospace.
1549 @item <command>
1550 Run a command on the region, replacing the region with the result of the
1551 command.  The command is specified with the ``interp'' argument.  If no
1552 value for ``interp'' is given, pass the entire region to the shell.
1554 The ``markup'' argument controls how this section is marked up.
1556 If it is omitted, publish the region with the normal Muse rules.
1558 If "nil", do not mark up the region at all, but prevent Muse from
1559 further interpreting it.
1561 If "example", treat the region as if it was surrounded by the
1562 @verb{|<example>|} tag.
1564 If "src", treat the included text as if it was surrounded by the
1565 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1566 doing this.
1568 If "verse", treat the region as if it was surrounded by the
1569 @verb{|<verse>|} tag, to preserve newlines.
1571 Otherwise, it should be the name of a function to call, with the buffer
1572 narrowed to the region.
1574 @item <comment>
1575 Treat the entire region as a comment.  If the option
1576 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1577 publish it using the comment syntax of the current publishing style.
1579 @item <contents>
1580 Publish a Table of Contents.  This will either be inserted in-place or
1581 at the beginning of the document, depending on your publishing style.
1582 It does not have a delimiting tag.
1584 By default, only 2 levels of headings will be included in the generated
1585 Table of Contents.  To change this globally, customize the
1586 @var{muse-publish-contents-depth} option.  To change this only for the
1587 current tag, use the ``depth'' argument.
1589 @item <example>
1590 Publish the region in monospace, preserving the newlines in the region.
1591 This is useful for snippets of code.
1593 @item <include>
1594 Insert the given file at the current location during publishing.  The
1595 basic use of this tag is as follows, replacing ``included_file'' with
1596 the name of the file that you want to include.
1598 @example
1599 <include file="included_file">
1600 @end example
1602 The ``markup'' argument controls how this section is marked up.
1604 If it is omitted, publish the included text with the normal Muse
1605 rules.
1607 If "nil", do not mark up the included text at all.
1609 If "example", treat the included text as if it was surrounded by the
1610 @verb{|<example>|} tag.
1612 If "src", treat the included text as if it was surrounded by the
1613 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1614 doing this.
1616 If "verse", treat the included text as if it was surrounded by the
1617 @verb{|<verse>|} tag, to preserve newlines.
1619 Otherwise, it should be the name of a function to call after inserting
1620 the file with the buffer narrowed to the section inserted.
1622 @item <lisp>
1623 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1624 The result is then inserted into the document, so you do not need to
1625 explicitly call @code{insert}.  All text properties are removed from the
1626 resulting text.
1628 This tag takes the ``markup'' argument.  See the description of
1629 @verb{|<command>|} for details.
1631 @item <literal>
1632 Make sure that the text enclosed by this tag is published without
1633 escaping it in any way.  This is useful for inserting markup directly
1634 into the published document, when Muse does not provide the desired
1635 functionality.
1637 @item <markup>
1638 Mark up the text between the initial and ending tags.  The markup
1639 command to use may be specified by the ``function'' argument.  The
1640 standard Muse markup routines are used by default if no ``function''
1641 argument is provided.
1643 This is useful for marking up regions in headers and footers.  One
1644 example that comes to mind is generating a published index of all of the
1645 files in the current project by doing the following.
1647 @example
1648 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1649 @end example
1651 @item <perl>
1652 Run the @command{perl} language interpreter on the region, replacing the
1653 region with the result of the command.
1655 This tag takes the ``markup'' argument.  See the description of
1656 @verb{|<command>|} for details.
1658 @item <python>
1659 Run the @command{python} language interpreter on the region, replacing
1660 the region with the result of the command.
1662 This tag takes the ``markup'' argument.  See the description of
1663 @verb{|<command>|} for details.
1665 @item <quote>
1666 Publish the region as a blockquote.  This will either be inserted
1667 in-place or at the beginning of the document, depending on your
1668 publishing style.  It does not have a delimiting tag.
1670 @item <ruby>
1671 Run the @command{ruby} language interpreter on the region, replacing the
1672 region with the result of the command.
1674 This tag takes the ``markup'' argument.  See the description of
1675 @verb{|<command>|} for details.
1677 @item <src>
1678 Publish the region using htmlize.
1679 The language to use may be specified by the ``lang'' attribute.
1681 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1682 the value of the ``lang'' attribute.
1684 This tag requires htmlize 1.34 or later in order to work.  If this is
1685 not satisfied, or the current publishing style is not HTML-based, Muse
1686 will publish the region like an @verb{|<example>|} tag.
1688 @item <verbatim>
1689 This is used when you want to prevent Muse from trying to interpret some
1690 markup.  Surround the markup in @verb{|<verbatim>|} and
1691 @verb{|</verbatim>|}, and it will not be interpreted.
1693 This tag was used often in previous versions of Muse because they did
1694 not support whole-document escaping of specials.  Now, it will only be
1695 needed for other tags, and perhaps footnotes as well.
1697 @item <verse>
1698 Preserve the newlines in the region.  In formats like HTML, newlines are
1699 removed by default, hence the need for this tag.  In other publishing
1700 styles, this tag may cause the text to be indented slightly in a way
1701 that looks nice for poetry and prose.
1703 @end table
1705 @node Publishing Styles, Extending Muse, Markup Rules, Top
1706 @comment  node-name,  next,  previous,  up
1707 @chapter Publishing Various Types of Documents
1708 @cindex publishing styles
1710 One of the principle features of Muse is the ability to publish a simple
1711 input text to a variety of different output styles.  Muse also makes it
1712 easy to create new styles, or derive from an existing style.
1714 @menu
1715 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1716 * Book::                        Publishing entries into a compilation.
1717 * DocBook::                     Publishing in DocBook XML form.
1718 * HTML::                        Publishing in HTML or XHTML form.
1719 * Journal::                     Keeping a journal or blog.
1720 * LaTeX::                       Publishing LaTeX documents.
1721 * Poem::                        Publish a poem to LaTex or PDF.
1722 * Texinfo::                     Publish entries to Texinfo format or PDF.
1723 * XML::                         Publish entries to XML.
1724 @end menu
1726 @node Blosxom, Book, Publishing Styles, Publishing Styles
1727 @comment  node-name,  next,  previous,  up
1728 @section Integrating Muse and pyblosxom.cgi
1729 @cindex blog, one-file-per-entry style
1731 The Blosxom publishing style publishes a tree of categorised files to a
1732 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1733 In other words, each blog entry corresponds with one file.
1735 @menu
1736 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1737 * Blosxom Entries::             Format of a Blosxom entry and automation.
1738 * Blosxom Options::             Blosxom styles and options provided.
1739 @end menu
1741 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1742 @comment  node-name,  next,  previous,  up
1743 @subsection Other tools needed for the Blosxom style
1745 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1746 installed on a machine that you have upload access to.
1748 The following additional components are required in order to make the
1749 date of blog entries display as something sensible.
1751 @enumerate
1752 @item
1753 A script to gather date directives from the entire blog tree into a
1754 single file.  The file must associate a blog entry with a date.
1756 @item
1757 A plugin for (py)blosxom that reads this file.
1758 @end enumerate
1760 These 2 things are provided for @command{pyblosxom.cgi} in the
1761 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1762 former service, while @file{hardcodedates.py} provides the latter
1763 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1764 script will be found/written.
1766 Here is a sample listing from my @file{timestamps} file, which maps
1767 each file to a date.  This can really be in any format, as long as your
1768 date-gathering script and your plugin can both understand it.
1770 @example
1771 2005-04-01-14-16 personal/paper_cranes
1772 2005-03-21 personal/spring_break_over
1773 2004-10-24 personal/finished_free_culture
1774 @end example
1776 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1777 @file{getstamps.py}.  Note that you will need to set the current
1778 directory to where your Muse files are, execute @file{getstamps.py}, and
1779 then move the generated timestamps file to your publishing directory.
1781 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1782 @comment  node-name,  next,  previous,  up
1783 @subsection Format of a Blosxom entry and automation
1785 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1786 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1787 plus whatever normal content is desired.
1789 The date directive is not used directly by @command{pyblosxom.cgi} or
1790 this program.  You need to have the two additional items from the former
1791 section to make use of this feature.
1793 There is a function called @code{muse-blosxom-new-entry} that will
1794 automate the process of making a new blog entry.  To make use of it, do
1795 the following.
1797 @itemize @bullet
1798 @item
1799 Customize @code{muse-blosxom-base-directory} to the location that your
1800 blog entries are stored.
1802 @item
1803 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1804 use the following code to assign this function to @kbd{C-c p l'}.
1806 @example
1807 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1808 @end example
1810 @item
1811 You should create your directory structure ahead of time under your base
1812 directory.  These directories, which correspond with category names, may
1813 be nested.
1815 @item
1816 When you enter this key sequence, you will be prompted for the category
1817 of your entry and its title.  Upon entering this information, a new file
1818 will be created that corresponds with the title, but in lowercase
1819 letters and having special characters converted to underscores.  The
1820 title and date directives will be inserted automatically.
1821 @end itemize
1823 @node Blosxom Options, , Blosxom Entries, Blosxom
1824 @comment  node-name,  next,  previous,  up
1825 @subsection Blosxom styles and options provided
1827 The following styles and options are available in the Blosxom publishing
1828 style.
1830 @subheading Styles provided
1832 @table @code
1834 @cindex publishing styles, blosxom-html
1835 @item blosxom-html
1836 Publish Blosxom entries in HTML form.
1838 @cindex publishing styles, blosxom-xhtml
1839 @item blosxom-xhtml
1840 Publish Blosxom entries in XHTML form.
1842 @end table
1844 @subheading Options provided
1846 @table @code
1848 @item muse-blosxom-extension
1849 Default file extension for publishing Blosxom files.
1851 @item muse-blosxom-header
1852 Header used for publishing Blosxom files.
1854 This may be text or a filename.
1856 @item muse-blosxom-footer
1857 Footer used for publishing Blosxom files.
1859 This may be text or a filename.
1861 @item muse-blosxom-base-directory
1862 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1864 This is the top-level directory where your blog entries may be found
1865 locally.
1867 @end table
1869 @node Book, DocBook, Blosxom, Publishing Styles
1870 @comment  node-name,  next,  previous,  up
1871 @section Publishing entries into a compilation
1873 This publishing style is used to output ``books'' in LaTeX or PDF
1874 format.
1876 Each page will become a separate chapter in the book, unless the style
1877 keyword @option{:nochapters} is used, in which case they are all run
1878 together as if one giant chapter.
1880 One way of publishing a book is to make a project for it, add the
1881 project to @code{muse-project-alist}, and use the @code{book-pdf} style
1882 with a very specific @code{:include} value to specify some page whose
1883 contents will be checked for the values of @code{#title} and
1884 @code{#date}, and whose name will be used in the output file.  Then to
1885 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
1886 @kbd{C-c C-p} to trigger the publishing process.  An example
1887 @code{muse-project-alist} for this method follows.
1889 @example
1890 (setq muse-project-alist
1891       '(("MyNotes" (:nochapters t  ; do automatically add chapters
1892                     :book-chapter "Computer Science"
1893                     "~/Notes/cs"
1894                     :book-chapter "Mathematics"
1895                     "~/Notes/math"
1896                     :book-chapter "Emacs"
1897                     "~/Notes/emacs"
1898                     :book-end t ; the rest will not be placed in the book
1899                     "~/Notes"   ; so we can find the notes-anthology page
1900                     "~/Notes/private"
1901                     :force-publish ("index")
1902                     :default "index")
1903          (:base "book-pdf"
1904                 :include "/notes-anthology[^/]*$"
1905                 :path "~/public_html/notes")
1906          ;; other publishing styles for each directory go here,
1907          ;; if desired
1908          )))
1909 @end example
1911 In this example, there would be a file called
1912 @file{~/Notes/notes-anthology.muse}, which would contain just the
1913 following.  The resulting book would be published to
1914 @file{~/public_html/notes/notes-anthology.pdf}.
1916 @example
1917 #title My Technology Ramblings
1918 @end example
1920 Another way is to call the @code{muse-book-publish-project} function
1921 manually, with a custom project entry.  An example of this may be found
1922 in John Wiegley's configuration file at
1923 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
1924 function.
1926 @subheading Styles provided
1928 @table @code
1930 @cindex publishing styles, book-latex
1931 @item book-latex
1932 Publish a book in LaTeX form.  The header and footer are different than
1933 the normal LaTeX publishing mode.
1935 @cindex publishing styles, book-pdf
1936 @item book-pdf
1937 Publish a book in PDF form.  The header and footer are different than
1938 the normal PDF publishing mode.
1940 @end table
1942 @subheading Options provided
1944 @table @code
1946 @item muse-book-before-publish-hook
1947 A hook run in the book buffer before it is marked up.
1949 @item muse-book-after-publish-hook
1950 A hook run in the book buffer after it is marked up.
1952 @item muse-book-latex-header
1953 Header used for publishing books to LaTeX.
1955 This may be text or a filename.
1957 @item muse-book-latex-footer
1958 Footer used for publishing books to LaTeX.
1960 This may be text or a filename.
1962 @end table
1964 @node DocBook, HTML, Book, Publishing Styles
1965 @comment  node-name,  next,  previous,  up
1966 @section Publishing in DocBook XML form
1968 This publishing style is used to generate DocBook XML files.
1970 @subheading Styles provided
1972 @table @code
1974 @cindex publishing styles, docbook
1975 @item docbook
1976 Publish a file in Docbook form.
1978 @end table
1980 @subheading Options provided
1982 This publishing style uses the same options for markup up special
1983 characters as the ``xml'' publishing style.  @xref{XML}, for details.
1985 @table @code
1987 @item muse-docbook-extension
1988 Default file extension for publishing DocBook XML files.
1990 @item muse-docbook-header
1991 Header used for publishing DocBook XML files.
1993 This may be text or a filename.
1995 @item muse-docbook-footer
1996 Footer used for publishing DocBook XML files.
1998 This may be text or a filename.
2000 @item muse-docbook-markup-regexps
2001 List of markup rules for publishing a Muse page to DocBook XML.
2003 @item muse-docbook-markup-functions
2004 An alist of style types to custom functions for that kind of text.
2006 @item muse-docbook-markup-strings
2007 Strings used for marking up text.
2009 These cover the most basic kinds of markup, the handling of which
2010 differs little between the various styles.
2012 @item muse-docbook-encoding-default
2013 The default Emacs buffer encoding to use in published files.
2014 This will be used if no special characters are found.
2016 @item muse-docbook-charset-default
2017 The default DocBook XML charset to use if no translation is
2018 found in @code{muse-xml-encoding-map}.
2020 @end table
2022 @node HTML, Journal, DocBook, Publishing Styles
2023 @comment  node-name,  next,  previous,  up
2024 @section Publishing in HTML or XHTML form
2026 This publishing style is capable of producing HTML or XHTML documents.
2028 @subheading Styles provided
2030 @table @code
2032 @cindex publishing styles, html
2033 @item html
2034 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2036 @item xhtml
2037 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2039 @end table
2041 @subheading Options provided
2043 If an HTML option does not have a corresponding XHTML option, it will
2044 be used for both of these publishing styles.
2046 These publishing styles use the same options for markup up special
2047 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2049 @table @code
2051 @item muse-html-extension
2052 Default file extension for publishing HTML files.
2054 @item muse-xhtml-extension
2055 Default file extension for publishing XHTML files.
2057 @item muse-html-style-sheet
2058 Store your stylesheet definitions here.
2060 This is used in @code{muse-html-header}.  You can put raw CSS in here or
2061 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
2062 @verb{|<lisp>|} markup tags.
2064 If you are publishing to XHTML, then customize the
2065 @code{muse-xhtml-style-sheet} option instead.
2067 @item muse-xhtml-style-sheet
2068 Store your stylesheet definitions here.
2070 This is used in @code{muse-xhtml-header}.  You can put raw CSS in here
2071 or a @verb{|<link>|} tag to an external stylesheet.  This text may
2072 contain @verb{|<lisp>|} markup tags.
2074 @item muse-html-header
2075 Header used for publishing HTML files.
2077 This may be text or a filename.
2079 @item muse-html-footer
2080 Footer used for publishing HTML files.
2082 This may be text or a filename.
2084 @item muse-xhtml-header
2085 Header used for publishing XHTML files.
2087 This may be text or a filename.
2089 @item muse-xhtml-footer
2090 Footer used for publishing XHTML files.
2092 This may be text or a filename.
2094 @item muse-html-anchor-on-word
2095 When true, anchors surround the closest word.
2097 This allows you to select them in a browser (i.e. for pasting), but has
2098 the side-effect of marking up headers in multiple colors if your header
2099 style is different from your link style.
2101 @item muse-html-table-attributes
2102 The attribute to be used with HTML @verb{|<table>|} tags.
2104 If you want to make more-complicated tables in HTML, surround the HTML
2105 with the @verb{|literal|} tag, so that it does not get escaped.
2107 @item muse-html-markup-regexps
2108 List of markup rules for publishing a Muse page to HTML.
2110 @item muse-html-markup-functions
2111 An alist of style types to custom functions for that kind of text.
2113 @item muse-html-markup-strings
2114 Strings used for marking up text as HTML.
2116 These cover the most basic kinds of markup, the handling of which
2117 differs little between the various styles.
2119 @item muse-xhtml-markup-strings
2120 Strings used for marking up text as XHTML.
2122 These cover the most basic kinds of markup, the handling of which
2123 differs little between the various styles.
2125 @item muse-html-markup-tags
2126 A list of tag specifications, for specially marking up HTML.
2127 @xref{muse-publish-markup-tags}, for more information.
2129 @item muse-html-meta-http-equiv
2130 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2132 @item muse-html-meta-content-type
2133 The content type used for the HTML @verb{|<meta>|} tag.
2135 If you are striving for XHTML 1.1 compliance, you may want to change
2136 this to ``application/xhtml+xml''.
2138 @item muse-html-meta-content-encoding
2139 The charset to append to the HTML @verb{|<meta>|} tag.
2141 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2142 and determine the HTML charset from emacs's coding.  If set to a string,
2143 this string will be used to force a particular charset.
2145 @item muse-html-charset-default
2146 The default HTML meta charset to use if no translation is found in
2147 @code{muse-xml-encoding-map}.
2149 @item muse-html-encoding-default
2150 The default Emacs buffer encoding to use in published files.
2151 This will be used if no special characters are found.
2153 @end table
2155 @node Journal, LaTeX, HTML, Publishing Styles
2156 @comment  node-name,  next,  previous,  up
2157 @section Keeping a journal or blog
2158 @cindex journal
2159 @cindex blog, journal style
2161 The module facilitates the keeping and publication of a journal.  When
2162 publishing to HTML, it assumes the form of a web log, or blog.
2164 The input format for each entry is as follows.
2166 @example
2167 * 20040317: Title of entry
2169 text for the entry.
2171 <qotd>
2172 "You know who you are. It comes down to a simple gut check: You
2173 either love what you do or you don't. Period." -- P. Bronson
2174 </qotd>
2175 @end example
2177 The "qotd", or Quote of the Day, is entirely optional.  When generated
2178 to HTML, this entry is rendered as the following.
2180 @example
2181 <div class="entry">
2182   <div class="entry-qotd">
2183     <h3>Quote of the Day:</h3>
2184     <p>"You know who you are. It comes down to a simple gut
2185       check: You either love what you do or you don't. Period."
2186       -- P. Bronson</p>
2187   </div>
2188   <div class="entry-body">
2189     <div class="entry-head">
2190       <div class="entry-date">
2191         <span class="date">March 17, 2004</span>
2192       </div>
2193       <div class="entry-title">
2194         <h2>Title of entry</h2>
2195       </div>
2196     </div>
2197     <div class="entry-text">
2198       <p>Text for the entry.</p>
2199     </div>
2200   </div>
2201 </div>
2202 @end example
2204 The plurality of "div" tags makes it possible to display the entries in
2205 any form you wish, using a CSS style.
2207 Also, an .RDF file can be generated from your journal by publishing it
2208 with the "rdf" style.  It uses the first two sentences of the first
2209 paragraph of each entry as its "description", and auto-generates tags
2210 for linking to the various entries.
2212 @subheading Styles provided
2214 @table @code
2216 @cindex publishing styles, journal-html
2217 @item journal-html
2218 Publish journal entries as an HTML document.
2220 @cindex publishing styles, journal-xhtml
2221 @item journal-xhtml
2222 Publish journal entries as an XHTML document.
2224 @cindex publishing styles, journal-latex
2225 @item journal-latex
2226 Publish journal entries as a LaTeX document.
2228 @cindex publishing styles, journal-pdf
2229 @item journal-pdf
2230 Publish journal entries as a PDF document.
2232 @cindex publishing styles, journal-book-latex
2233 @item journal-book-latex
2234 Publish journal entries as a LaTeX book.
2236 @cindex publishing styles, journal-book-pdf
2237 @item journal-book-pdf
2238 Publish journal entries as a PDF book.
2240 @cindex publishing styles, journal-rdf
2241 @cindex publishing styles, RSS 1.0
2242 @item journal-rdf
2243 Publish journal entries as an RDF file (RSS 1.0).
2245 @cindex publishing styles, journal-rss
2246 @cindex publishing styles, RSS 2.0
2247 @item journal-rss
2248 Publish journal entries as an RSS file (RSS 2.0).
2250 @end table
2252 @subheading Options provided
2254 @table @code
2256 @item muse-journal-heading-regexp
2257 A regexp that matches a journal heading.
2259 Paren group 1 is the ISO date, group 2 is the optional category, and
2260 group 3 is the optional heading for the entry.
2262 @item muse-journal-date-format
2263 Date format to use for journal entries.
2265 @item muse-journal-html-heading-regexp
2266 A regexp that matches a journal heading from an HTML document.
2268 Paren group 1 is the ISO date, group 2 is the optional category, and
2269 group 3 is the optional heading for the entry.
2271 @item muse-journal-html-entry-template
2272 Template used to publish individual journal entries as HTML.
2274 @item muse-journal-latex-section
2275 Template used to publish a LaTeX section.
2277 @item muse-journal-latex-subsection
2278 Template used to publish a LaTeX subsection.
2280 @item muse-journal-latex-markup-tags
2281 A list of tag specifications, for specially marking up LaTeX.
2283 @xref{muse-publish-markup-tags}, for more information.
2285 @item muse-journal-rdf-extension
2286 Default file extension for publishing RDF (RSS 1.0) files.
2288 @item muse-journal-rdf-base-url
2289 The base URL of the website referenced by the RDF file.
2291 @item muse-journal-rdf-header
2292 Header used for publishing RDF (RSS 1.0) files.
2294 This may be text or a filename.
2296 @item muse-journal-rdf-footer
2297 Footer used for publishing RDF (RSS 1.0) files.
2299 This may be text or a filename.
2301 @item muse-journal-rdf-date-format
2302 Date format to use for RDF entries.
2304 @item muse-journal-rdf-entry-template
2305 Template used to publish individual journal entries as RDF.
2307 @item muse-journal-rdf-summarize-entries
2308 If non-nil, include only summaries in the RDF file, not the full data.
2310 @item muse-journal-rss-heading-regexp
2311 A regexp that matches a journal heading from an HTML document.
2313 Paren group 1 is the ISO date, group 2 is the optional category,
2314 and group 3 is the optional heading for the entry.
2316 @item muse-journal-rss-extension
2317 Default file extension for publishing RSS 2.0 files.
2319 @item muse-journal-rss-base-url
2320 The base URL of the website referenced by the RSS file.
2322 @item muse-journal-rss-header
2323 Header used for publishing RSS 2.0 files.
2325 This may be text or a filename.
2327 @item muse-journal-rss-footer
2328 Footer used for publishing RSS 2.0 files.
2330 This may be text or a filename.
2332 @item muse-journal-rss-date-format
2333 Date format to use for RSS 2.0 entries.
2335 @item muse-journal-rss-entry-template
2336 Template used to publish individual journal entries as RSS 2.0.
2338 @item muse-journal-rss-enclosure-types-alist
2339 File types that are accepted as RSS enclosures.
2341 This is an alist that maps file extension to content type.
2343 Useful for podcasting.
2345 @item muse-journal-rss-summarize-entries
2346 If non-nil, include only summaries in the RSS file, not the full data.
2348 Many RSS subscribers find this annoying.
2350 @item muse-journal-rss-markup-regexps
2351 List of markup rules for publishing a Muse journal page to RSS.
2353 For more information on the structure of this list,
2354 @xref{muse-publish-markup-regexps}.
2356 @item muse-journal-rss-markup-functions
2357 An alist of style types to custom functions for that kind of text.
2359 For more on the structure of this list,
2360 @xref{muse-publish-markup-functions}.
2362 @end table
2364 @node LaTeX, Poem, Journal, Publishing Styles
2365 @comment  node-name,  next,  previous,  up
2366 @section Publishing LaTeX documents
2368 This publishing style is capable of producing LaTeX or PDF documents.
2370 If you wish to publish PDF documents, you will need to have a good TeX
2371 installation.  For Debian and Ubuntu, this can be accomplished by
2372 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
2373 are also a must.
2375 @subheading Styles provided
2377 @table @code
2379 @cindex publishing styles, latex
2380 @item latex
2381 Publish a LaTeX document.
2383 @cindex publishing styles, pdf
2384 @item pdf
2385 Publish a PDF document, using an external LaTeX document conversion
2386 tool.
2388 @cindex publishing styles, latexcjk
2389 @item latexcjk
2390 Publish a LaTeX document with CJK (Chinese) encodings.
2392 @cindex publishing styles, pdfcjk
2393 @item pdfcjk
2394 Publish a PDF document with CJK (Chinese) encodings, using an external
2395 LaTeX document conversion tool.
2397 @cindex publishing styles, slides
2398 @item slides
2399 Publish a LaTeX document that uses the Beamer extension.  This is
2400 suitable for producing slides.
2402 Here is an example of a slide.
2404 @example
2405 <slide title="First Slide">
2406 Everything between the slide tags composes this slide.
2408 [[Some-sort-of-cute-image.png]]
2410  - A bullet point.
2411  - Another bullet point.
2412 </slide>
2413 @end example
2415 @cindex publishing styles, slides-pdf
2416 @item slides-pdf
2417 Publish a PDF document of slides, using the Beamer extension.
2419 @cindex publishing styles, lecture-nodes
2420 @item lecture-notes
2421 Publish a LaTeX document that uses the Beamer extension.  This is
2422 suitable for producing lecture notes.
2424 This can also use the @verb{|<slide>|} tag.
2426 @cindex publishing styles, lecture-nodes-pdf
2427 @item lecture-notes-pdf
2428 Publish a PDF document of lecture notes, using the Beamer extension.
2430 @end table
2432 @subheading Options provided
2434 @table @code
2436 @item muse-latex-extension
2437 Default file extension for publishing LaTeX files.
2439 @item muse-latex-pdf-extension
2440 Default file extension for publishing LaTeX files to PDF.
2442 @item muse-latex-pdf-program
2443 The program that is called to generate PDF content from LaTeX content.
2445 @item muse-latex-pdf-cruft
2446 Extensions of files to remove after generating PDF output successfully.
2448 @item muse-latex-header
2449 Header used for publishing LaTeX files.
2451 This may be text or a filename.
2453 @item muse-latex-footer
2454 Footer used for publishing LaTeX files.
2456 This may be text or a filename.
2458 @item muse-latexcjk-header
2459 Header used for publishing LaTeX files (CJK).
2461 This may be text or a filename.
2463 @item muse-latexcjk-footer
2464 Footer used for publishing LaTeX files (CJK).
2466 This may be text or a filename.
2468 @item muse-latex-slides-header
2469 Header for publishing of slides using LaTeX.
2471 This may be text or a filename.
2473 You must have the Beamer extension for LaTeX installed for this to work.
2475 @item muse-latex-lecture-notes-header
2476 Header publishing of lecture notes using LaTeX.
2478 This may be text or a filename.
2480 You must have the Beamer extension for LaTeX installed for this to work.
2482 @item muse-latex-markup-regexps
2483 List of markup regexps for identifying regions in a Muse page.
2485 For more on the structure of this list,
2486 @xref{muse-publish-markup-regexps}.
2488 @item muse-latex-markup-functions
2489 An alist of style types to custom functions for that kind of text.
2491 For more on the structure of this list,
2492 @xref{muse-publish-markup-functions}.
2494 @item muse-latex-markup-strings
2495 Strings used for marking up text.
2497 These cover the most basic kinds of markup, the handling of which
2498 differs little between the various styles.
2500 @item muse-latex-slides-markup-tags
2501 A list of tag specifications, for specially marking up LaTeX slides.
2503 @item muse-latexcjk-encoding-map
2504 An alist mapping emacs coding systems to appropriate CJK codings.
2505 Use the base name of the coding system (ie, without the -unix).
2507 @item muse-latexcjk-encoding-default
2508 The default Emacs buffer encoding to use in published files.
2510 This will be used if no special characters are found.
2512 @item muse-latex-markup-specials-document
2513 A table of characters which must be represented specially.
2514 These are applied to the entire document, sans already-escaped
2515 regions.
2517 @item muse-latex-markup-specials-example
2518 A table of characters which must be represented specially.
2519 These are applied to @verb{|example>|} regions.
2521 With the default interpretation of @verb{|<example>|} regions, no
2522 specials need to be escaped.
2524 @item muse-latex-markup-specials-literal
2525 A table of characters which must be represented specially.
2526 This applies to =monospaced text= and @verb{|<code>|} regions.
2528 @item muse-latex-markup-specials-url
2529 A table of characters which must be represented specially.
2530 These are applied to URLs.
2532 @item muse-latex-markup-specials-image
2533 A table of characters which must be represented specially.
2534 These are applied to image filenames.
2536 @item muse-latex-permit-contents-tag
2537 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2538 contents.
2540 Most of the time, it is best to have a table of contents on the
2541 first page, with a new page immediately following.  To make this
2542 work with documents published in both HTML and LaTeX, we need to
2543 ignore the @verb{|<contents>|} tag.
2545 If you don't agree with this, then set this option to non-nil,
2546 and it will do what you expect.
2548 @end table
2550 @node Poem, Texinfo, LaTeX, Publishing Styles
2551 @comment  node-name,  next,  previous,  up
2552 @section Publish a poem to LaTex or PDF
2554 The @code{muse-poem} module makes it easy to attractively publish and
2555 reference poems in the following format, using the "memoir" module for
2556 LaTeX publishing.  It will also markup poems for every other output
2557 style, though none are nearly as pretty.
2559 @example
2560 Title
2563 Body of poem
2566 Annotations, history, notes, etc.
2567 @end example
2569 Once a poem is written in this format, just publish it to PDF using the
2570 @code{poem-pdf} style.  To make an inlined reference to a poem that
2571 you've written -- for example, from a blog page -- there is a "poem" tag
2572 defined by this module.
2574 @example
2575 <poem title="name.of.poem.page">
2576 @end example
2578 Let's assume the template above was called @file{name.of.poem.page};
2579 then the above tag would result in this inclusion.
2581 @example
2582 ** Title
2584 > Body of poem
2585 @end example
2587 John Wiegley uses this module for publishing all of the poems on his
2588 website, which are at
2589 @uref{http://www.newartisans.com/johnw/poems.html}.
2591 @subheading Styles provided
2593 @table @code
2595 @cindex publishing styles, poem-latex
2596 @item poem-latex
2597 Publish a poem in LaTeX form.
2599 @cindex publishing styles, poem-pdf
2600 @item poem-pdf
2601 Publish a poem to a PDF document.
2603 @cindex publishing styles, chapbook-latex
2604 @item chapbook-latex
2605 Publish a book of poems in LaTeX form.
2607 @cindex publishing styles, chapbook-pdf
2608 @item chapbook-pdf
2609 Publish a book of poems to a PDF document.
2611 @end table
2613 @subheading Options provided
2615 @table @code
2617 @item muse-poem-latex-header
2618 Header used for publishing LaTeX poems.
2620 This may be text or a filename.
2622 @item muse-poem-latex-footer
2623 Footer used for publishing LaTeX files.
2625 This may be text or a filename.
2627 @item muse-poem-markup-strings
2628 Strings used for marking up poems.
2630 These cover the most basic kinds of markup, the handling of which
2631 differs little between the various styles.
2633 @item muse-chapbook-latex-header
2634 Header used for publishing a book of poems in LaTeX form.
2636 This may be text or a filename.
2638 @item muse-chapbook-latex-footer
2639 Footer used for publishing a book of poems in LaTeX form.
2641 This may be text or a filename.
2643 @item muse-poem-chapbook-strings
2644 Strings used for marking up books of poems.
2646 These cover the most basic kinds of markup, the handling of which
2647 differs little between the various styles.
2649 @end table
2651 @node Texinfo, XML, Poem, Publishing Styles
2652 @comment  node-name,  next,  previous,  up
2653 @section Publish entries to Texinfo format or PDF
2655 Rules for publishing a Muse file as a Texinfo article.
2657 @subheading Styles provided
2659 @table @code
2661 @cindex publishing styles, texi
2662 @item texi
2663 Publish a file in Texinfo form.
2665 @cindex publishing styles, texi
2666 @item info
2667 Generate an Info file from a Muse file.
2669 @cindex publishing styles, info-pdf
2670 @item info-pdf
2671 Publish a file in PDF form.
2673 @end table
2675 @subheading Options provided
2677 @table @code
2679 @item muse-texinfo-process-natively
2680 If non-nil, use the Emacs `texinfmt' module to make Info files.
2682 @item muse-texinfo-extension
2683 Default file extension for publishing Texinfo files.
2685 @item muse-texinfo-info-extension
2686 Default file extension for publishing Info files.
2688 @item muse-texinfo-pdf-extension
2689 Default file extension for publishing PDF files.
2691 @item muse-texinfo-header
2692 Text to prepend to a Muse page being published as Texinfo.
2694 This may be text or a filename.
2695 It may contain @verb{|<lisp>|} markup tags.
2697 @item muse-texinfo-footer
2698 Text to append to a Muse page being published as Texinfo.
2700 This may be text or a filename.
2701 It may contain @verb{|<lisp>|} markup tags.
2703 @item muse-texinfo-markup-regexps
2704 List of markup rules for publishing a Muse page to Texinfo.
2706 For more on the structure of this list,
2707 @xref{muse-publish-markup-regexps}.
2709 @item muse-texinfo-markup-functions
2710 An alist of style types to custom functions for that kind of text.
2712 For more on the structure of this list,
2713 @xref{muse-publish-markup-functions}.
2715 @item muse-texinfo-markup-strings
2716 Strings used for marking up text.
2718 These cover the most basic kinds of markup, the handling of which
2719 differs little between the various styles.
2721 @item muse-texinfo-markup-specials
2722 A table of characters which must be represented specially.
2724 @item muse-texinfo-markup-specials
2725 A table of characters which must be represented specially.
2726 These are applied to URLs.
2728 @end table
2730 @node XML, , Texinfo, Publishing Styles
2731 @comment  node-name,  next,  previous,  up
2732 @section Publish entries to XML
2734 Muse is capable of publishing XML documents, with the help of the
2735 @file{muse-xml.el} module.
2737 A RelaxNG schema is available as part of the Muse distribution in the
2738 @file{etc/muse.rnc} file.
2740 @subheading Styles provided
2742 @table @code
2744 @cindex publishing styles, xml
2745 @item xml
2746 Publish a file in XML form.
2748 @end table
2750 @subheading Options provided
2752 @table @code
2754 @cindex muse-xml-encoding-map
2755 @item muse-xml-encoding-map
2756 An alist mapping Emacs coding systems to appropriate XML charsets.
2757 Use the base name of the coding system (i.e. without the -unix).
2759 @item muse-xml-markup-specials
2760 A table of characters which must be represented specially in all
2761 XML-like markup formats.
2763 @item muse-xml-markup-specials-url-extra
2764 A table of characters which must be represented specially in all
2765 XML-like markup formats.
2767 These are extra characters that are escaped within URLs.
2769 @item muse-xml-extension
2770 Default file extension used for publishing XML files.
2772 @item muse-xml-header
2773 Header used for publishing XML files.
2775 This may be text or a filename.
2777 @item muse-xml-footer
2778 Footer used for publishing XML files.
2780 This may be text or a filename.
2782 @item muse-xml-markup-regexps
2783 List of markup rules for publishing a Muse page to XML.
2785 For more on the structure of this list,
2786 @xref{muse-publish-markup-regexps}.
2788 @item muse-xml-markup-functions
2789 An alist of style types to custom functions for that kind of text.
2791 For more on the structure of this list,
2792 @xref{muse-publish-markup-functions}.
2794 @item muse-xml-markup-strings
2795 Strings used for marking up text.
2797 These cover the most basic kinds of markup, the handling of which
2798 differs little between the various styles.
2800 @item muse-xml-encoding-default
2801 The default Emacs buffer encoding to use in published files.
2803 This will be used if no special characters are found.
2805 @item muse-xml-charset-default
2806 The default XML charset to use if no translation is found in
2807 @code{muse-xml-encoding-map}.
2809 @end table
2812 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
2813 @comment  node-name,  next,  previous,  up
2814 @chapter Making your own publishing styles
2816 @menu
2817 * Common Elements::             Common functionality shared by styles.
2818 * Deriving Styles::             Deriving a new style from an existing
2819                                   one.
2820 @end menu
2822 @node Common Elements, Deriving Styles, , Extending Muse
2823 @comment  node-name,  next,  previous,  up
2824 @section Common functionality shared by styles
2825 @cindex publishing styles, common
2827 @menu
2828 * Markup Functions::            Specifying functions to mark up text.
2829 * Markup Regexps::              Markup rules for publishing.
2830 * Markup Strings::              Strings specific to a publishing style.
2831 * Markup Tags::                 Tag specifications for special markup.
2832 * Style Elements::              Parameters used for defining styles.
2833 @end menu
2835 @node Markup Functions, Markup Regexps, , Common Elements
2836 @comment  node-name,  next,  previous,  up
2837 @subsection Specifying functions to mark up text
2838 @cindex publishing, markup functions
2840 @anchor{muse-publish-markup-functions}
2841 @code{muse-publish-markup-functions}
2843 An alist of style types to custom functions for that kind of text.
2845 This is used by publishing styles to attempt to minimize the amount of
2846 custom regexps that each has to define.  @file{muse-publish} provides
2847 rules for the most common types of markup.
2849 Each member of the list is of the following form.
2851 @example
2852 (SYMBOL FUNCTION)
2853 @end example
2855 @itemize @bullet
2856 @item SYMBOL
2857 Describes the type of text to associate with this rule.
2858 @code{muse-publish-markup-regexps} maps regexps to these symbols.
2860 @item FUNCTION
2861 Function to use to mark up this kind of rule if no suitable function is
2862 found through the @option{:functions} tag of the current style.
2863 @end itemize
2865 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
2866 @comment  node-name,  next,  previous,  up
2867 @subsection Markup rules for publishing
2868 @cindex publishing, markup regexps
2869 @cindex publishing, rules
2871 @anchor{muse-publish-markup-regexps}
2872 @code{muse-publish-markup-regexps}
2874 List of markup rules for publishing a page with Muse.
2876 The rules given in this variable are invoked first, followed by whatever
2877 rules are specified by the current style.
2879 Each member of the list is either a function, or a list of the following
2880 form.
2882 @example
2883 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
2884 @end example
2886 @itemize @bullet
2887 @item REGEXP
2888 A regular expression, or symbol whose value is a regular expression,
2889 which is searched for using `re-search-forward'.
2891 @item TEXT-BEGIN-GROUP
2892 The matching group within that regexp which denotes the beginning of the
2893 actual text to be marked up.
2895 @item REPLACEMENT-TEXT
2896 A string that will be passed to `replace-match'.
2898 If it is not a string, but a function, it will be called to determine
2899 what the replacement text should be (it must return a string).  If it is
2900 a symbol, the value of that symbol should be a string.
2901 @end itemize
2903 The replacements are done in order, one rule at a time.  Writing
2904 the regular expressions can be a tricky business.  Note that case
2905 is never ignored.  `case-fold-search' is always bound to nil
2906 while processing the markup rules.
2908 @subheading Publishing order
2910 This is the order that the publishing rules are consulted, by default.
2911 This may be changed by customizing @code{muse-publish-markup-regexps}.
2913 @table @code
2915 @item trailing and leading whitespace
2916 Remove trailing and leading whitespace from a file.
2918 @item directive
2919 @samp{#directive}
2921 This is only recognized at the beginning of a file.
2923 @item comment
2924 @samp{; a commented line}
2926 @item tag
2927 @samp{<tag>}
2929 @item comment
2930 @samp{; comment}
2932 @item explicit links
2933 Prevent emphasis characters in explicit links from being marked up.
2935 Don't actually publish them here, just add a special no-emphasis text
2936 property.
2938 @item word
2939 Whitespace-delimited word, possibly with emphasis characters
2941 This function is responsible for marking up emphasis and escaping some
2942 specials.
2944 @item heading
2945 @samp{** Heading}
2947 Outline-mode style headings.
2949 @item enddots
2950 @samp{....}
2952 These are ellipses with a dot at end.
2954 @item dots
2955 @samp{...}
2957 Ellipses.
2959 @item rule
2960 @samp{----}
2962 Horizontal rule or section separator.
2964 @item no-break-space
2965 @samp{~~}
2967 Prevent lines from being split before or after these characters.
2969 @item fn-sep
2970 @samp{Footnotes:}
2972 beginning of footnotes section
2974 @item footnote
2975 @samp{[1]}
2977 Footnote definition or reference.  If at beginning of line, it is a
2978 definition.
2980 @item list
2981 @itemize @bullet
2982 @item
2983 @samp{ 1. }
2985 @item
2986 @samp{ - }
2988 @item
2989 @samp{term :: }
2990 @end itemize
2992 Numbered list, item list, or term definition list.
2994 @item table-el
2996 @file{table.el} style tables
2998 @item table
2999 @samp{table | cells}
3001 Muse tables or orgtbl-mode style tables.
3003 @item quote
3004 spaces before beginning of text
3006 Blockquotes.
3008 @item emdash
3009 @samp{--}
3011 2-wide dash
3013 @item verse
3014 @samp{> verse text}
3016 @item anchor
3017 @samp{#anchor}
3019 @item link
3020 @samp{[[explicit][links]]}
3022 @item url
3023 @samp{http://example.com/}
3025 @item email
3026 @samp{bare-email@@example.com}
3028 @end table
3030 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
3031 @comment  node-name,  next,  previous,  up
3032 @subsection Strings specific to a publishing style
3033 @cindex publishing, markup strings
3035 @dfn{Markup strings} are strings used for marking up text for a
3036 particular style.
3038 These cover the most basic kinds of markup, the handling of which
3039 differs little between the various styles.
3041 @subheading Available markup strings
3043 @table @code
3045 @item image-with-desc
3046 An image and a description.
3048 Argument 1: image without extension.  Argument 2: image extension.
3049 Argument 3: description.
3051 @item image
3052 An inlined image.
3054 Argument 1: image without extension.  Argument 2: image extension.
3056 @item image-link
3057 An image with a link around it.
3059 Argument 1: link.  Argument 2: image without extension.
3060 Argument 3: image extension.
3062 @item anchor-ref
3063 A reference to an anchor on the current page.
3065 Argument 1: anchor name.  Argument 2: description if one exists, or the
3066 original link otherwise.
3068 @item url
3069 A URL without a description.
3071 Argument 1: URL.
3073 @item link
3074 A link to a Muse page with a description.
3076 Argument 1: link.  Argument 2: description if one exists, or the
3077 original link otherwise.
3079 @item link-and-anchor
3080 A link to a Muse page with an anchor, and a description.
3082 Argument 1: link.  Argument 2: anchor name.
3083 Argument 3: description if one exists, or the original link otherwise.
3084 Argument 4: link without an extension.
3086 @item email-addr
3087 A link to an email address.
3089 Argument 1: email address.  Argument 2: email address.
3091 @item anchor
3092 An anchor.
3094 Argument 1: name of anchor.
3096 @item emdash
3097 A 2-length dash.
3099 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
3101 @item comment-begin
3102 Beginning of a comment.
3104 @item comment-end
3105 End of a comment.
3107 @item rule
3108 A horizontal line or space.
3110 @item no-break-space
3111 A space that separates two words which are not to be separated.
3113 @item footnote
3114 Beginning of footnote.
3116 @item footnote-end
3117 End of footnote.
3119 @item footnotemark
3120 Mark a reference for the current footnote.
3122 Argument 1: number of this footnote.
3124 @item footnotemark-end
3125 End of a reference for the current footnote.
3127 @item footnotetext
3128 Indicate the text of the current footnote.
3130 Argument 1: number of this footnote.
3132 @item footnotetext-end
3133 End of a footnote text line.
3135 @item fn-sep
3136 Text used to replace ``Footnotes:'' line.
3138 @item dots
3139 3 dots.
3141 @item enddots
3142 4 dots.
3144 @item part
3145 Beginning of a part indicator line.  This is used by book publishing.
3147 @item part-end
3148 End of a part indicator line.  This is used by book publishing.
3150 @item chapter
3151 Beginning of a chapter indicator line.  This is used by book publishing.
3153 @item chapter-end
3154 End of a chapter indicator line.  This is used by book publishing.
3156 @item section
3157 Beginning of level 1 section indicator line.
3159 Argument 1: level of section; always 1.
3161 @item section-end
3162 End of level 1 section indicator line.
3164 Argument 1: level of section; always 1.
3166 @item subsection
3167 Beginning of level 2 section indicator line.
3169 Argument 1: level of section; always 2.
3171 @item subsection-end
3172 End of level 2 section indicator line.
3174 Argument 1: level of section; always 2.
3176 @item subsubsection
3177 Beginning of level 3 section indicator line.
3179 Argument 1: level of section; always 3.
3181 @item subsubsection-end
3182 End of level 3 section indicator line.
3184 Argument 1: level of section; always 3.
3186 @item section-other
3187 Beginning of section indicator line, where level is greater than 3.
3189 Argument 1: level of section.
3191 @item section-other-end
3192 End of section indicator line, where level is greater than 3.
3194 Argument 1: level of section.
3196 @item begin-underline
3197 Beginning of underlined text.
3199 @item end-underline
3200 End of underlined text.
3202 @item begin-literal
3203 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
3204 =teletype text=.
3206 @item end-literal
3207 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
3208 text=.
3210 @item begin-emph
3211 Beginning of the first level of emphasized text.
3213 @item end-emph
3214 End of the first level of emphasized text.
3216 @item begin-more-emph
3217 Beginning of the second level of emphasized text.
3219 @item end-more-emph
3220 End of the second level of emphasized text.
3222 @item begin-most-emph
3223 Beginning of the third (and final) level of emphasized text.
3225 @item end-most-emph
3226 End of the third (and final) level of emphasized text.
3228 @item begin-verse
3229 Beginning of verse text.
3231 @item verse-space
3232 String used to each space that is further indented than the beginning of
3233 the verse.
3235 @item begin-verse-line
3236 Beginning of a line of verse.
3238 @item empty-verse-line
3239 End of a line of verse.
3241 @item begin-last-stanza-line
3242 Beginning of the last line of a verse stanza.
3244 @item end-last-stanza-line
3245 End of the last line of a verse stanza.
3247 @item end-verse
3248 End of verse text.
3250 @item begin-example
3251 Beginning of an example region.  To make use of this, an
3252 @samp{<example>} tag is needed.
3254 @item end-example
3255 End of an example region.  To make use of this, an @samp{</example>} tag
3256 is needed.
3258 @item begin-center
3259 Begin a centered line.
3261 @item end-center
3262 End a centered line.
3264 @item begin-quote
3265 Begin a quoted region.
3267 @item end-quote
3268 End a quoted region.
3270 @item begin-quote-item
3271 Begin a quote paragraph.
3273 @item end-quote-item
3274 End a quote paragraph.
3276 @item begin-uli
3277 Begin an unordered list.
3279 @item end-uli
3280 End an unordered list.
3282 @item begin-uli-item
3283 Begin an unordered list item.
3285 @item end-uli-item
3286 End an unordered list item.
3288 @item begin-oli
3289 Begin an ordered list.
3291 @item end-oli
3292 End an ordered list.
3294 @item begin-oli-item
3295 Begin an ordered list item.
3297 @item end-oli-item
3298 End an ordered list item.
3300 @item begin-dl
3301 Begin a definition list.
3303 @item end-dl
3304 End a definition list.
3306 @item begin-dl-item
3307 Begin a definition list item.
3309 @item end-dl-item
3310 End a definition list item.
3312 @item begin-ddt
3313 Begin a definition list term.
3315 @item end-ddt
3316 End a definition list term.
3318 @item begin-dde
3319 Begin a definition list entry.
3321 @item end-dde
3322 End a definition list entry.
3324 @item begin-table
3325 Begin a table.
3327 @item end-table
3328 End a table.
3330 @item begin-table-group
3331 Begin a table grouping.
3333 @item end-table-group
3334 End a table grouping.
3336 @item begin-table-row
3337 Begin a table row.
3339 @item end-table-row
3340 End a table row.
3342 @item begin-table-entry
3343 Begin a table entry.
3345 @item end-table-entry
3346 End a table entry.
3348 @end table
3350 @node Markup Tags, Style Elements, Markup Strings, Common Elements
3351 @comment  node-name,  next,  previous,  up
3352 @subsection Tag specifications for special markup
3353 @cindex publishing, markup tags
3355 @anchor{muse-publish-markup-tags}
3356 @code{muse-publish-markup-tags}
3358 A list of tag specifications, for specially marking up text.
3360 XML-style tags are the best way to add custom markup to Muse.  This is
3361 easily accomplished by customizing this list of markup tags.
3363 For each entry, the name of the tag is given, whether it expects a
3364 closing tag and/or an optional set of attributes, whether it is
3365 nestable, and a function that performs whatever action is desired within
3366 the delimited region.
3368 The tags themselves are deleted during publishing, before the function
3369 is called.  The function is called with three arguments, the beginning
3370 and end of the region surrounded by the tags.  If properties are
3371 allowed, they are passed as a third argument in the form of an alist.
3372 The `end' argument to the function is always a marker.
3374 Point is always at the beginning of the region within the tags, when the
3375 function is called.  Wherever point is when the function finishes is
3376 where tag markup will resume.
3378 These tag rules are processed once at the beginning of markup, and once
3379 at the end, to catch any tags which may have been inserted in-between.
3381 @node Style Elements, , Markup Tags, Common Elements
3382 @comment  node-name,  next,  previous,  up
3383 @subsection Parameters used for defining styles
3384 @cindex publishing, style elements
3386 Style elements are tags that define a style.  Use
3387 @code{muse-define-style} to create a new style.
3389 @example
3390 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3391 @end example
3393 @subheading Usable elements
3395 @table @option
3397 @item :suffix
3398 File extension to use for publishing files with this style.
3400 @item :link-suffix
3401 File extension to use for publishing links to Muse files with this
3402 style.
3404 @item :osuffix
3405 File extension to use for publishing second-stage files with this style.
3407 For example, PDF publishing generates a LaTeX file first, then a PDF
3408 from that LaTeX file.
3410 @item :regexps
3411 List of markup rules for publishing a page with Muse.
3412 @xref{muse-publish-markup-regexps}.
3414 @item :functions
3415 An alist of style types to custom functions for that kind of text.
3416 @xref{muse-publish-markup-functions}.
3418 @item :strings
3419 Strings used for marking up text with this style.
3421 These cover the most basic kinds of markup, the handling of which
3422 differs little between the various styles.
3424 @item :tags
3425 A list of tag specifications, used for handling extra tags.
3426 @xref{muse-publish-markup-tags}.
3428 @item :specials
3429 A table of characters which must be represented specially.
3431 @item :before
3432 A function that is to be executed on the newly-created publishing buffer
3433 (or the current region) before any publishing occurs.
3435 This is used to set extra parameters that direct the publishing process.
3437 @item :before-end
3438 A function that is to be executed on the publishing buffer (or the
3439 current region) immediately after applying all of the markup regexps.
3441 This is used to fix the order of table elements (header, footer, body)
3442 in XML-ish styles.
3444 @item :after
3445 A function that is to be executed on the publishing buffer after
3446 :before-end, and immediately after inserting the header and footer.
3448 This is used for generating the table of contents as well as setting the
3449 file coding system.
3451 @item :final
3452 A function that is to be executed after saving the published file, but
3453 while still in its buffer.
3455 This is used for generating second-stage documents like PDF files from
3456 just-published LaTeX files.
3458 @item :header
3459 Header used for publishing files of this style.
3461 This may be a variable, text, or a filename.  It is inserted at the
3462 beginning of a file, after evaluating the publishing markup.
3464 @item :footer
3465 Footer used for publishing files of this style.
3467 This may be a variable, text, or a filename.  It is inserted at the end
3468 of a file, after evaluating the publishing markup.
3470 @item :style-sheet
3471 Style sheet used for publishing files of this style.
3473 This may be a variable or text.  It is used in the header of HTML and
3474 XHTML based publishing styles.
3476 @item :browser
3477 The function used to browse the published result of files of this style.
3479 @end table
3481 @node Deriving Styles, , Common Elements, Extending Muse
3482 @comment  node-name,  next,  previous,  up
3483 @section Deriving a new style from an existing one
3484 @cindex publishing styles, deriving
3486 To create a new style from an existing one, use @code{muse-derive-style}
3487 as follows.  This is a good way to fix something you don't like about a
3488 particular publishing style, or to personalize it.
3490 @example
3491 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3492 @end example
3494 The derived name is a string defining the new style, such as "my-html".
3495 The base name must identify an existing style, such as "html" -- if you
3496 have loaded @file{muse-html}.  The style parameters are the same as
3497 those used to create a style, except that they override whatever
3498 definitions exist in the base style.  However, some definitions only
3499 partially override.  The following parameters support partial
3500 overriding.
3502 @xref{Style Elements}, for a complete list of all parameters.
3504 @table @option
3506 @item :functions
3507 If a markup function is not found in the derived style's function list,
3508 the base style's function list will be queried.
3510 @item :regexps
3511 All regexps in the current style and the base style(s) will be used.
3513 @item :strings
3514 If a markup string is not found in the derived style's string list, the
3515 base style's string list will be queried.
3517 @end table
3520 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
3521 @comment  node-name,  next,  previous,  up
3522 @chapter Getting Help and Reporting Bugs
3523 @cindex help, getting
3524 @cindex bugs, reporting
3526 After you have read this guide, if you still have questions about
3527 Muse, or if you have bugs to report, there are several places you can
3530 @itemize @bullet
3532 @item
3533 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
3534 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
3535 to it.
3537 @item
3538 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
3539 that Michael Olson (the current maintainer) made for Muse.
3541 @item
3542 Muse has several different mailing lists.
3544 @table @samp
3546 @item muse-el-announce
3547 Low-traffic list for Muse-related announcements.
3549 You can join this mailing list (@email{muse-el-announce@@gna.org})
3550 using the subscription form at
3551 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
3552 mailing list is also available via Gmane (@url{http://gmane.org/}). The
3553 group is called @samp{gmane.emacs.muse.announce}.
3555 @item muse-el-discuss
3556 Discussion, bugfixes, suggestions, tips, and the like for Muse.
3557 This mailing list also includes the content of muse-el-announce.
3559 You can join this mailing list (@email{muse-el-discuss@@gna.org})
3560 using the subscription form at
3561 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
3562 list is also available via Gmane with the identifier
3563 @samp{gmane.emacs.muse.general}.
3565 @item muse-el-logs
3566 Log messages for commits made to Muse.
3568 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
3569 the subscription form at
3570 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
3571 is also available via Gmane with the identifier
3572 @samp{gmane.emacs.muse.scm}.
3574 @item muse-el-commits
3575 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
3576 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
3577 sent to this list automatically.
3579 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
3580 the subscription form at
3581 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
3582 is also available via Gmane with the identifier
3583 @samp{gmane.emacs.muse.cvs}.
3585 @item muse-el-internationalization
3586 Discussion of translation of the Muse website and documentation into
3587 many languages.
3589 You can join this mailing list
3590 (@email{muse-el-internationalization@@gna.org}) using the subscription
3591 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
3592 mailing list is also available via Gmane with the identifier
3593 @samp{gmane.emacs.muse.internationalization}.
3595 @end table
3597 @item
3598 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
3599 contributors are frequently around and willing to answer your
3600 questions.  The @samp{#muse} channel is also available for
3601 Muse-specific help, and its current maintainer hangs out there.
3603 @item
3604 The maintainer of Emacs Muse, Michael Olson, may be contacted at
3605 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
3606 it is often better to use the muse-el-discuss mailing list.
3608 @end itemize
3610 @node History, Contributors, Getting Help and Reporting Bugs, Top
3611 @comment  node-name,  next,  previous,  up
3612 @chapter History of This Document
3613 @cindex history, of Muse
3615 @itemize
3616 @item 2004
3617 John Wiegley started Muse upon realizing that EmacsWiki had some serious
3618 limitations. Around February 2004, he started making "emacs-wiki version
3619 3.00 APLHA", which eventually became known as Muse.
3621 Most of those who frequent the emacs-wiki mailing list continued to use
3622 emacs-wiki, mainly because Planner hasn't been ported over to it.
3624 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
3625 John Wiegley's request.
3627 @item 2005
3628 Michael Olson overhauled this document and added many new sections in
3629 preparation for the first release of Muse (3.01).
3631 @end itemize
3633 @node Contributors, GNU Free Documentation License, History, Top
3634 @comment  node-name,  next,  previous,  up
3635 @chapter Contributors to This Documentation
3636 @cindex contributors
3638 The first draft of this document was taken from the emacs-wiki texinfo
3639 manual.  Michael Olson adapted it for Muse and added most of its
3640 content.
3642 John Sullivan did a majority of the work on the emacs-wiki texinfo
3643 manual.
3645 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
3646 emacs-wiki texinfo manual.
3649 @include doclicense.texi
3652 @node Concept Index,  , GNU Free Documentation License, Top
3653 @comment  node-name,  next,  previous,  up
3654 @unnumbered Index
3656 @printindex cp
3658 @bye