Manual: Document the <div> tag.
[muse-el.git] / texi / muse.texi
blobc5dbbeaf65fbff47890368950ba345a385c4bb3f
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.12.
17 Copyright @copyright{} 2004, 2005, 2006, 2007,
18 2008  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 * Miscellaneous::               Miscellaneous add-ons, like a minor mode.
79 * Getting Help and Reporting Bugs::  
80 * History::                     History of this document.
81 * Contributors::                Contributors to this documentation.
82 * GNU Free Documentation License::  The license for this documentation.
83 * Concept Index::               Search for terms.
85 @detailmenu
86  --- The Detailed Node Listing ---
88 How to Get Muse Releases and Development Changes
90 * Releases::                    Released versions of Muse.
91 * Development::                 Latest unreleased development changes.
93 Getting Started
95 * Loading Muse::                How to load Muse.
96 * Using Muse Mode::             How to edit files in Muse.
97 * Publishing Files Overview::   Publishing a single file or project.
98 * File Extensions::             Using a different file extension.
100 Creating and Managing Muse Projects
102 * Single Project::              A single-project example.
103 * Multiple Projects::           A multiple-project example.
104 * Projects and Subdirectories::  Publishing subdirectories in projects.
105 * Options for Projects::        Listing of available options for projects.
107 Rules for Using Markup
109 * Paragraphs::                  Paragraphs: centering and quoting.
110 * Headings::                    Levels of headings.
111 * Directives::                  Directives at the beginning of a
112                                   document.
113 * Emphasizing Text::            Bold, italicized, and underlined text.
114 * Footnotes::                   Making notes to be shown at the end.
115 * Verse::                       Indicating poetic stanzas.
116 * Lists::                       Lists of items.
117 * Tables::                      Generation of data tables.
118 * Explicit Links::              Hyperlinks and email addresses with
119                                   descriptions.
120 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
121                                   links.
122 * Images::                      Publishing and displaying images.
123 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
124 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
125                                   for extensibility.
126 * Citations::                   Support for citing other resources.
127 * Comments::                    Lines to omit from published output.
128 * Tag Summary::                 Tags that Muse recognizes.
130 Publishing Various Types of Documents
132 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
133 * Book::                        Publishing entries into a compilation.
134 * ConTeXt::                     Publishing ConTeXt documents.
135 * DocBook::                     Publishing in DocBook XML form.
136 * HTML::                        Publishing in HTML or XHTML form.
137 * Journal::                     Keeping a journal or blog.
138 * LaTeX::                       Publishing LaTeX documents.
139 * Poem::                        Publish a poem to LaTeX or PDF.
140 * Texinfo::                     Publish entries to Texinfo format or PDF.
141 * XML::                         Publish entries to XML.
143 Integrating Muse and pyblosxom.cgi
145 * Blosxom Requirements::        Other tools needed for the Blosxom style.
146 * Blosxom Entries::             Format of a Blosxom entry and automation.
147 * Blosxom Options::             Blosxom styles and options provided.
149 Making your own publishing styles
151 * Markup Functions::            Specifying functions to mark up text.
152 * Markup Regexps::              Markup rules for publishing.
153 * Markup Strings::              Strings specific to a publishing style.
154 * Markup Tags::                 Tag specifications for special markup.
155 * Style Elements::              Parameters used for defining styles.
156 * Deriving Styles::             Deriving a new style from an existing
157                                   one.
159 Miscellaneous add-ons, like a minor mode
161 * Muse List Edit Minor Mode::   Edit lists easily in other major modes.
163 @end detailmenu
164 @end menu
166 @node Preface, Introduction, Top, Top
167 @comment  node-name,  next,  previous,  up
168 @chapter About the documentation
170 This document describes Muse, which was written by John Wiegley and is
171 now maintained by Michael Olson.  Several versions of this manual are
172 available on-line.
174 @itemize @bullet
175 @item PDF: http://mwolson.org/static/doc/muse.pdf
176 @item HTML (single file): http://mwolson.org/static/doc/muse.html
177 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
178 @end itemize
180 @node Introduction, Obtaining Muse, Preface, Top
181 @comment  node-name,  next,  previous,  up
182 @chapter What is Muse?
184 Emacs Muse (also known as ``Muse'' or ``Emacs-Muse'') is an authoring
185 and publishing environment for Emacs.  It simplifies the process of
186 writing documents and publishing them to various output formats.
188 Muse consists of two main parts: an enhanced text-mode for authoring
189 documents and navigating within Muse projects, and a set of publishing
190 styles for generating different kinds of output.
192 What makes Muse distinct from other text-publishing systems is a modular
193 environment, with a rather simple core, in which "styles" are derived
194 from to create new styles.  Much of Muse's overall functionality is
195 optional.  For example, you can use the publisher without the
196 major-mode, or the mode without doing any publishing; or if you don't
197 load the Texinfo or LaTeX modules, those styles won't be available.
199 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
200 code has been restructured and rewritten, especially its publishing
201 functions.  The focus in this revision is on the authoring and
202 publishing aspects, and the "wikiness" has been removed as a default
203 behavior (available in the optional @file{muse-wiki} module).  CamelCase
204 words are no longer special by default.
206 One of the principal aims in the development of Muse is to make it very
207 easy to produce good-looking, standards-compliant documents.
209 @node Obtaining Muse, Installation, Introduction, Top
210 @comment  node-name,  next,  previous,  up
211 @chapter How to Get Muse Releases and Development Changes
213 @menu
214 * Releases::                    Released versions of Muse.
215 * Development::                 Latest unreleased development changes.
216 @end menu
218 @node Releases, Development, Obtaining Muse, Obtaining Muse
219 @comment  node-name,  next,  previous,  up
220 @section Released versions of Muse
222 Choose to install a release if you want to minimize risk.
224 Errors are corrected in development first.  User-visible changes will be
225 announced on the @email{muse-el-discuss@@gna.org} mailing list.
226 @xref{Getting Help and Reporting Bugs}.
228 @cindex releases, Debian package
229 @cindex Debian package for Muse
230 Debian users can get Muse via apt-get.  The @file{muse-el} package is
231 available both at Michael Olson's APT repository and the official Debian
232 repository.  To make use of the former, add the following line to your
233 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
235 @example
236 deb http://mwolson.org/debian/ ./
237 @end example
239 @cindex releases, Ubuntu package
240 @cindex Ubuntu package for Muse
241 Ubuntu users can also get Muse via apt-get.  The @file{muse-el} package
242 is available both at Michael Olson's APT repository and the official
243 Ubuntu repository.  To make use of the former, add the following line to
244 your @file{/etc/apt/sources.list} file and run @code{apt-get install
245 muse}.
247 @example
248 deb http://mwolson.org/ubuntu/ ./
249 @end example
251 The reason for making separate Debian and Ubuntu packages is that this
252 manual is under the GFDL, and Debian will not allow it to be distributed
253 in its main repository.  Ubuntu, on the other hand, permits this manual
254 to be included with the @file{muse-el} package.
256 @cindex releases, from source
257 Alternatively, you can download the latest release from
258 @uref{http://download.gna.org/muse-el/} .
260 @node Development,  , Releases, Obtaining Muse
261 @comment  node-name,  next,  previous,  up
262 @section Latest unreleased development changes
263 @cindex development
265 Choose the development version if you want to live on the bleeding edge
266 of Muse development or try out new features before release.
268 @cindex git version control system, using
269 The git version control system allows you to keep up-to-date with the
270 latest changes to the development version of Muse.  It also allows you
271 to contribute changes (via commits, if you are have developer access to
272 the repository, or via patches, otherwise).  If you would like to
273 contribute to Muse development, it is highly recommended that you use
274 git.
276 If you are new to git, you might find this tutorial helpful:
277 @uref{http://www.kernel.org/pub/software/scm/git/docs/tutorial.html}.
279 Downloading the Muse module with git and staying up-to-date involves
280 the following steps.
282 @enumerate
283 @item Install git.
285 @itemize @bullet
286 @item Debian and Ubuntu: @kbd{apt-get install git-core}.
287 @item Windows: @uref{http://git.or.cz/gitwiki/WindowsInstall}.
288 @item Other operating systems: download, compile, and install the source
289 from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
290 package for your operating system.
291 @end itemize
293 @item Download the Muse development branch.
295 If you have developer access to Muse, do:
297 @example
298 git clone ssh://repo.or.cz/srv/git/muse-el.git muse
299 @end example
301 otherwise, do:
303 @example
304 git clone git://repo.or.cz/muse-el.git muse
305 @end example
307 If you are behind a restrictive firewall, and do not have developer
308 access, then do the following instead:
310 @example
311 git clone http://repo.or.cz/r/muse-el.git muse
312 @end example
314 @item List upstream changes that are missing from your local copy.
315 Do this whenever you want to see whether new changes have been committed
316 to Muse.  If you wish, you may skip this step and proceed directly to
317 the ``update'' step.
319 @example
320 # Change to the source directory you are interested in.
321 cd muse
323 # Fetch new changes from the repository, but don't apply them yet
324 git fetch origin
326 # Display log messages for the new changes
327 git log HEAD..origin
328 @end example
330 ``origin'' is git's name for the location where you originally got Muse
331 from.  You can change this location at any time by editing the
332 @file{.git/config} file in the directory where the Muse source was
333 placed.
335 @cindex updating Muse with git
336 @item Update to the latest version by pulling in any missing changes.
338 @example
339 cd muse
340 git pull origin
341 @end example
343 git will show how many files changed, and will provide a visual display
344 for how many lines were changed in each file.
346 @end enumerate
348 There are other ways to interact with the Muse repository.
350 @itemize
351 @item Browse git repo: @uref{http://repo.or.cz/w/muse-el.git}
352 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
353 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
354 @end itemize
356 The latest development snapshot can lag behind the git repo by as much
357 as 20 minutes, but never more than that.
359 @subheading Becoming a Muse developer
360 @cindex developer, becoming
362 If you want commit access to the shared Muse repository, then register
363 an account at @uref{http://repo.or.cz} (be sure to add an SSH key), and
364 contact the current maintainer at @email{mwolson@@gnu.org}.  It would be
365 best to send some patches to the @email{muse-el-discuss@@gna.org}
366 mailing list first, so that he knows that you know what you are doing.
367 @xref{Getting Help and Reporting Bugs}, for instructions on subscribing
368 to the mailing list.
370 You must also be willing to sign a copyright assignment for your changes
371 to Muse, since Muse is a GNU project.  The current maintainer will
372 assist you in this process if you contact him.
374 For information on committing changes to Muse and performing
375 development, please consult
376 @uref{http://emacswiki.org/cgi-bin/wiki/MuseDevelopment}.
378 @node Installation, Getting Started, Obtaining Muse, Top
379 @comment  node-name,  next,  previous,  up
380 @chapter Compiling and Installing Muse
382 Muse may be compiled and installed on your machine.
384 @subheading Compilation
385 @cindex compiling Muse
387 This is an optional step, since Emacs Lisp source code does not
388 necessarily have to be byte-compiled.  Byte-compilation may yield a very
389 slight speed increase.
391 A working copy of Emacs or XEmacs is needed in order to compile Emacs
392 Muse.  By default, the program that is installed with the name
393 @command{emacs} will be used.
395 If you want to use the @command{xemacs} binary to perform the
396 compilation, you must copy @file{Makefile.defs.default} to
397 @file{Makefile.defs} in the top-level directory, and then edit
398 @file{Makefile.defs} as follows.  You can put either a full path to an
399 Emacs or XEmacs binary or just the command name, as long as it is in the
400 @env{PATH}.
402 @example
403 EMACS    = xemacs
404 SITEFLAG = -no-site-file
405 # Edit the section as necessary
406 install_info = install-info --section "XEmacs 21.4" $(1).info \
407         $(INFODIR)/dir || :
408 @end example
410 Running @code{make} in the top-level directory should compile the Muse
411 source files in the @file{lisp} directory, and generate an autoloads
412 file in @file{lisp/muse-autoloads.el}.
414 @subheading Installation
415 @cindex installing Muse
417 Muse may be installed into your file hierarchy by doing the following.
419 Copy @file{Makefile.defs.default} to @file{Makefile.defs} in the
420 top-level directory, if you haven't done so already.  Then edit the
421 @file{Makefile.defs} file so that @env{ELISPDIR} points to where you
422 want the source and compiled Muse files to be installed and
423 @env{INFODIR} indicates where to put the Muse manual.  You may use a
424 combination of @env{DESTDIR} and @env{PREFIX} to further determine where
425 the installed files should be placed.  As mentioned earlier, you will
426 want to edit @env{EMACS} and @env{SITEFLAG} as shown in the Compilation
427 section if you are using XEmacs.
429 If you are installing Muse on a Debian or Ubuntu system, you might want
430 to change the value of @env{INSTALLINFO} as specified in
431 @file{Makefile.defs}.
433 If you wish to install Muse to different locations than the defaults
434 specify, edit @file{Makefile.defs} accordingly.
436 Run @code{make} as a normal user, if you haven't done so already.
438 Run @code{make install} as the root user if you have chosen installation
439 locations that require root permissions.
441 @subheading ELPA
442 @cindex ELPA package for Muse
444 For those used to installing software packages, there will be a
445 @code{muse} package available in the Emacs Lisp Package Archive
446 (abbreviated ``ELPA'') as of the 3.10 release of Muse.  This package
447 will be compiled and installed automatically in a user-specific
448 location.  For more information on ELPA, see
449 @uref{http://tromey.com/elpa/}.
451 @node Getting Started, Projects, Installation, Top
452 @comment  node-name,  next,  previous,  up
453 @chapter Getting Started
454 @cindex settings
456 @menu
457 * Loading Muse::                How to load Muse.
458 * Using Muse Mode::             How to edit files in Muse.
459 * Publishing Files Overview::   Publishing a single file or project.
460 * File Extensions::             Using a different file extension.
461 @end menu
463 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
464 @comment  node-name,  next,  previous,  up
465 @section How to Load Muse
466 @cindex settings, init file
468 To use Muse, add the directory containing its files to your
469 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
470 the authoring mode, and the styles you wish to publish to.  An example
471 follows.
473 @lisp
474 (add-to-list 'load-path "<path to Muse>")
476 (require 'muse-mode)     ; load authoring mode
478 (require 'muse-html)     ; load publishing styles I use
479 (require 'muse-latex)
480 (require 'muse-texinfo)
481 (require 'muse-docbook)
483 (require 'muse-project)  ; publish files in projects
484 @end lisp
486 An easy way of seeing which settings are available and changing settings
487 is to use the Muse customization interface.  To do this, type
488 @kbd{M-x customize-group muse RET}.  Each of the options has its own
489 documentation.  Options are grouped logically according to what effect
490 they have.
492 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
493 @comment  node-name,  next,  previous,  up
494 @section How to Edit Files in Muse
495 @cindex editing Muse files
497 Muse Mode should automatically be activated when you visit a file with a
498 ``.muse'' extension.  One such file is @file{QuickStart.muse}, which is
499 available in the @file{examples} directory of the Muse distribution.
500 You can tell that Muse Mose has been activated by checking for the text
501 ``Muse'' in your mode line.  If Muse Mode has not been activated, you
502 may activate it by type @kbd{M-x muse-mode RET}.
504 You will notice that Muse files are highlighted very simply.  Links are
505 colored blue, headings are large and bold text, and @verb{|<example>|}
506 tags are colored in grey.
508 There are several different ways to edit things like links, which hide
509 the underlying Muse markup.  One way is to toggle font-locking off by
510 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
511 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
512 on.  Another way is just to move into the text and edit it.  Markup can
513 also be removed by normal deletion methods, though some side effects
514 might require a second deletion.
516 For the particular case of editing links, it is easiest to move to the
517 link and do @kbd{C-c C-e}, which is also @kbd{M-x
518 muse-edit-link-at-point}.  This prompts you for the link and its
519 description, using the previous contents of the link as initial values.
520 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
521 A link to a URL may be created by hitting @kbd{C-c TAB u}.  Links may be
522 followed by hitting @kbd{RET} on them.
524 If you want to add a new list item, this may by accomplished by hitting
525 @kbd{M-RET}.  This will put a dash and some spaces on the screen.  The
526 dash is the Muse markup that indicates a list item.  It is also possible
527 to created ``nested'' lists with this command, by adjusting the number
528 of spaces in front of the dashes.  If you have lists with long lines,
529 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
530 lines.
532 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
533 @comment  node-name,  next,  previous,  up
534 @section Publishing a Single File or Project
535 @cindex editing Muse files
537 The command @kbd{M-x muse-project-publish-this-file} will publish the
538 current document to any available publishing style (a publishing style
539 is an output format, like HTML or Docbook), placing the output in the
540 current directory.  If you are in Muse Mode, this command will be bound
541 to @kbd{C-c C-t}.  If the file has been published recently, and its
542 contents have not changed, running @kbd{C-c C-t} again will not publish
543 the file.  To force publishing in this case, do @kbd{C-u C-c C-t}.
545 If you have set up projects and are visiting a file that is part of a
546 project, then @kbd{C-c C-t} will restrict the output formats to those
547 which are used by the project, and will automatically publish to the
548 output directory defined by the project.  If you want to publish to a
549 different directory or use a different format, then use @kbd{C-c M-C-t},
550 which is also @kbd{M-x muse-publish-this-file}.
552 If the currently opened file is part of a defined project in
553 @code{muse-project-alist}, it (and the rest of the changed files in a
554 project) may be published using @kbd{C-c C-p}.
556 @node File Extensions, , Publishing Files Overview, Getting Started
557 @comment  node-name,  next,  previous,  up
558 @section Using a Different File Extension
559 @cindex file extension, specifying
561 By default, Muse expects all project files to have the file extension
562 @file{.muse}. Files without this extension will not be associated with
563 Muse mode and will not be considered part of any project, even if they
564 are within a project directory.
566 If you don't want to use @file{.muse}, you can customize the extension
567 by setting the value of @code{muse-file-extension}.
569 If you don't want to use any extension at all, and want Muse to
570 autodetect project files based on their location, then add the following
571 to your Muse settings file.
573 @lisp
574 (setq muse-file-extension nil
575       muse-mode-auto-p t)
576 @end lisp
578 Note that if you chose to have @code{muse-file-extension} set to
579 @code{nil}, you may have trouble if your @file{.emacs} file or other
580 init scripts attempt to visit a Muse file.  (A very common example of
581 this is if you use Planner with Muse and run @code{(plan)} from your
582 @file{.emacs}.)  If you wish to visit Muse files from your
583 @file{.emacs}, be sure to also add the following additional code before
584 any such visits happen:
586 @lisp
587 (add-hook 'find-file-hooks 'muse-mode-maybe)
588 @end lisp
591 @node Projects, Keystroke Summary, Getting Started, Top
592 @comment  node-name,  next,  previous,  up
593 @chapter Creating and Managing Muse Projects
594 @cindex projects
596 Often you will want to publish all the files within a directory to a
597 particular set of output styles automatically.  To support, Muse
598 allows for the creation of "projects".
600 @menu
601 * Single Project::              A single-project example.
602 * Multiple Projects::           A multiple-project example.
603 * Projects and Subdirectories::  Publishing subdirectories in projects.
604 * Options for Projects::        Listing of available options for projects.
605 @end menu
607 @node Single Project, Multiple Projects, Projects, Projects
608 @comment  node-name,  next,  previous,  up
609 @section A Single-Project Example
610 @cindex projects, single
612 Here is a sample project, which may be defined in your @file{.emacs}
613 file.
615 @lisp
616 (setq muse-project-alist
617       '(("Website" ("~/Pages" :default "index")
618          (:base "html" :path "~/public_html")
619          (:base "pdf" :path "~/public_html/pdf"))))
620 @end lisp
622 The above defines a project named "website", whose files are located
623 in the directory @file{~/Pages}.  The default page to visit is
624 @file{index}.  When this project is published, each page will be
625 output as HTML to the directory @file{~/public_html}, and as PDF to
626 the directory @file{~/public_html/pdf}.  Within any project page, you
627 may create a link to other pages using the syntax @samp{[[pagename]]}.
629 If you would like to include only some files from a directory in a Muse
630 project, you may use a regexp in place of @file{~/Pages} in the example.
632 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
633 @comment  node-name,  next,  previous,  up
634 @section A Multiple-Project Example
635 @cindex projects, multiple
637 It is possible to specify multiple projects.  Here is an example of
638 three projects: a generic website, a projects area, and a day-planner
639 (the day-planner part requires Planner Mode---see
640 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
642 @lisp
643 (setq muse-project-alist
644       '(("Website" ("~/Pages" :default "index")
645          (:base "html" :path "~/public_html"))
646         (("Projects" ("~/Projects" :default "index")
647          (:base "xhtml"
648                 :path "~/public_html/projects"
649                 :exclude "/TopSecret")
650          (:base "pdf"
651                 :path "~/public_html/projects/pdf"
652                 :exclude "/TopSecret")))
653         ("Plans" ("~/Plans"
654                   :default "TaskPool"
655                   :major-mode planner-mode
656                   :visit-link planner-visit-link)
657          (:base "planner-xhtml"
658                 :path "~/public_html/plans"))))
659 @end lisp
661 The @option{:major-mode} attribute specifies which major to use when
662 visiting files in this directory.
664 The @option{:visit-link} attribute specifies the function to call when
665 visiting links.
667 The @option{:exclude} attribute has a regexp that matches files to never
668 publish.
670 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
671 @comment  node-name,  next,  previous,  up
672 @section Publishing Subdirectories in Projects
673 @cindex projects, subdirectories
675 If you want to publish a directory and all of its subdirectories, Muse
676 provides two convenience functions that together generate the proper
677 rules for you.  Note that we use the backtick to begin this
678 muse-project-alist definition, rather than a single quote.
680 @lisp
681 (setq muse-project-alist
682       `(("Website" ("~/Pages" :default "index")
683          (:base "html" :path "~/public_html"))
684         ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
685                  :default "index")
686          ;; Publish this directory and its subdirectories.  Arguments
687          ;; are as follows.  The above `muse-project-alist-dirs' part
688          ;; is also needed.
689          ;;   1. Source directory
690          ;;   2. Output directory
691          ;;   3. Publishing style
692          ;;   remainder: Other things to put in every generated style
693          ,@@(muse-project-alist-styles "~/Blog"
694                                       "~/public_html/blog"
695                                       "blosxom"))))
696 @end lisp
698 The @code{muse-project-alist-dirs} function takes a directory and
699 returns it and all of its subdirectories in a list.
701 The @code{muse-project-alist-styles} function is explained by the
702 comments above.
704 The ``blosxom'' text is the name of another publishing style, much like
705 ``html''.  @xref{Blosxom}, for further information about it.  You can
706 use any publishing style you like for the third argument to
707 @code{muse-project-alist-styles}.
709 @node Options for Projects, , Projects and Subdirectories, Projects
710 @comment  node-name,  next,  previous,  up
711 @section Listing of Available Options for Projects
712 @cindex projects, options
713 @cindex muse-project-alist, reference
715 This is a listing of all of the various options (or, more accurately:
716 attributes) that may be specified in @code{muse-project-alist}.
718 Each muse-project-alist entry looks like this:
720 @example
721   (PROJECT-NAME (SOURCES)
722     OUTPUTS)
723 @end example
725 We refer to these names below.
727 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
728 The first value is a keyword, like @option{:default}.  The second part
729 is the value associated with that keyword, such as the text ``index''.
730 If you are familiar with Emacs Lisp property lists, the concept is
731 similar to that, except that in the SOURCES section, single directories
732 can be interspersed with two-value attributes.
734 @subheading Project Name
736 This is a string that indicates the name of the project.  It is
737 primarily used for publishing interwiki links with the
738 @file{muse-wiki.el} module.
740 @subheading Sources
742 This part of a muse-project-alist entry consists of two-value
743 attributes, and also directory names.  If you are publishing a book, the
744 order of directories and attributes is significant.
746 The minimal content for the sources section is a list of directories.
748 @table @option
750 @item :book-chapter
751 Indicates a new chapter of a book.  The text of the title of the chapter
752 comes immediately after this keyword.
754 @item :book-end
755 Indicates the end of a book.  Directories listed after this one are
756 ignored when publishing a book.  The value ``t'' (without quotes) should
757 come immediately after this keyword.
759 @item :book-funcall
760 A function to call while publishing a book.  This is useful for doing
761 something just after a particular chapter.
763 @item :book-part
764 Indicates the beginning of a new part of the book.  The text of the
765 title should come immediately after this keyword.
767 @item :book-style
768 Indicate a particular publishing style to use for this part of the book.
769 If this is specified, it should come just after a @option{:part}
770 attribute.
772 @item :default
773 The default page to visit when browsing a project.  Also, if you are
774 using the @file{muse-wiki.el} module, publishing a link to just a
775 project's name will cause it to link to this default file.
777 @item :force-publish
778 This specifies a list of pages which should be published every time a
779 project is published (by using @kbd{C-c C-p}, for example), regardless
780 of whether their contents have changed.  This is useful for updating
781 Index pages, pages that use the @verb{|<include>|} tag, and other pages
782 that have dynamically-generated content.
784 @item :major-mode
785 This specifies the major mode to use when visiting files in this
786 project.  The default is @code{muse-mode}.
788 @item :nochapters
789 This indicates that while publishing a book, do not automatically create
790 chapters.  Values which may follow this are nil (the default, which
791 means that we automatically create chapters), or non-nil, which means
792 that we manually specify chapters with the @option{:book-chapter}
793 attribute,
795 @item :publish-project
796 Indicates which function we should call when publishing a project.
798 @item :set
799 This specifies a list of variables and values to set when publishing a
800 project.  The list should be a property list, which is in the form:
802 @example
803 (VAR1 VALUE1 VAR2 VALUE2 ...)
804 @end example
806 @item :visit-link
807 Specifies the function to call when visiting a link.  The default is
808 @code{muse-visit-link-default}.  The arguments for that function should
809 be (1) the link and (2) whether to visit the link in a new window.
811 @end table
813 @subheading Outputs
815 This part of a muse-project-alist entry is composed of lists of
816 attributes.  Each list is called an ``output style''.
818 The minimal content for an output style is a @option{:base} attribute
819 and a @option{:path} attribute.
821 @table @option
823 @item :base
824 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
826 @item :base-url
827 An external URL which can be used to access published files.  This is
828 mainly used by the @file{muse-wiki} module when publishing links between
829 two separate projects, if the projects are served on different domains.
831 It is also used by the @file{muse-journal} module to create the RSS or
832 RDF output.
834 @item :exclude
835 Exclude items matching a regexp from being published.  The regexp should
836 usually begin with "/".
838 @item :include
839 Only include items matching a regexp when publishing.  The regexp should
840 usually begin with "/".
842 @item :path
843 The directory in which to store published files.
845 @item :timestamps
846 A file containing the timestamps (that is, time of creation) for files
847 in this project.  It might eventually used by the @file{muse-blosxom}
848 module, but this option is not currently in use by any Muse code.
850 @end table
853 @node Keystroke Summary, Markup Rules, Projects, Top
854 @comment  node-name,  next,  previous,  up
855 @chapter Keys Used in Muse Mode
856 @cindex keystrokes
858 This is a summary of keystrokes available in every Muse buffer.
860 @table @kbd
862 @item C-c C-a (`muse-index')
863 Display an index of all known Muse pages.
865 @item C-c C-b (`muse-find-backlinks')
866 Find all pages that link to this page.
868 @item C-c C-e (`muse-edit-link-at-point')
869 Edit link at point.
871 @item C-c C-f (`muse-project-find-file')
872 Open another Muse page.  Prompt for the name.
874 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
875 Insert a link to a file interactively.
877 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
878 Insert a tag interactively.
880 @item C-c C-i u, C-c TAB u (`muse-insert-url')
881 Insert a URL interactively.
883 @item C-c C-l (`font-lock-mode')
884 Toggle font lock / highlighting for the current buffer.
886 @item C-c C-p (`muse-project-publish')
887 Publish any Muse pages that have changed.
889 @item C-c C-s (`muse-search')
890 Find text in all files of the current project.
892 @item C-c C-t (`muse-project-publish-this-file')
893 Publish the currently-visited file.  Prompt for the style if the current
894 file can be published using more than one style.
896 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
897 Publish the currently-visited file.  Prompt for both the style and
898 output directory.
900 @item C-c C-v (`muse-browse-result')
901 Show the published result of this page.
903 @item C-c = (`muse-what-changed')
904 Diff this page against the last backup version.
906 @item TAB
907 Move to the next Wiki reference.
909 @item S-TAB
910 Move to the previous Wiki reference.
912 @item M-TAB
913 Complete the name of a page from the current project at point.
915 @item M-RET
916 Insert a new list item at point, indenting properly.
918 @item C-<
919 Decrease the indentation of the list item at point.
921 @item C->
922 Increase the indentation of the list item at point.
924 @item M-x muse-colors-toggle-inline-images RET
925 Toggle display of inlined images on/off.
927 @item M-x muse-update-values RET
928 Update various values that are automatically generated.
930 Call this after changing @code{muse-project-alist}.
931 @end table
934 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
935 @comment  node-name,  next,  previous,  up
936 @chapter Rules for Using Markup
937 @cindex markup
939 A Muse document uses special, contextual markup rules to determine how
940 to format the output result.  For example, if a paragraph is indented,
941 Muse assumes it should be quoted.
943 There are not too many markup rules, and all of them strive to be as
944 simple as possible so that you can focus on document creation, rather
945 than formatting.
947 @menu
948 * Paragraphs::                  Paragraphs: centering and quoting.
949 * Headings::                    Levels of headings.
950 * Directives::                  Directives at the beginning of a
951                                   document.
952 * Emphasizing Text::            Bold, italicized, and underlined text.
953 * Footnotes::                   Making notes to be shown at the end.
954 * Verse::                       Indicating poetic stanzas.
955 * Lists::                       Lists of items.
956 * Tables::                      Generation of data tables.
957 * Explicit Links::              Hyperlinks and email addresses with
958                                   descriptions.
959 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
960                                   links.
961 * Images::                      Publishing and displaying images.
962 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
963 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
964                                   for extensibility.
965 * Citations::                   Support for citing other resources.
966 * Comments::                    Lines to omit from published output.
967 * Tag Summary::                 Tags that Muse recognizes.
968 @end menu
970 @node Paragraphs, Headings, Markup Rules, Markup Rules
971 @comment  node-name,  next,  previous,  up
972 @section Paragraphs: centering and quoting
973 @cindex paragraphs
975 Paragraphs in Muse must be separated by a blank line.
977 @cindex paragraphs, centered
978 @subheading Centered paragraphs and quotations
980 A line that begins with six or more columns of whitespace (either tabs
981 or spaces) indicates a centered paragraph.  Alternatively, you can use
982 the @verb{|<center>|} tag to surround regions that are to be published
983 as centered paragraphs.
985 @cindex paragraphs, quoted
986 @cindex quotations
987 But if a line begins with whitespace, though less than six columns, it
988 indicates a quoted paragraph.  Alternatively, you can use the
989 @verb{|<quote>|} tag to surround regions that are to be published as
990 quoted paragraphs.
992 @cindex examples
993 @cindex monospace, rendering blocks
994 @cindex HTML, rendering blocks in monospace
995 @subheading Literal paragraphs
997 The @verb{|<example>|} tag is used for examples, where whitespace should
998 be preserved, the text rendered in monospace, and any characters special
999 to the output style escaped.
1001 @cindex literal text
1002 @cindex HTML, inserting a raw block
1003 There is also the @verb{|<literal>|} tag, which causes a marked block to
1004 be entirely left alone.  This can be used for inserting a hand-coded
1005 HTML blocks into HTML output, for example.
1007 If you want some text to only be inserted when publishing to a
1008 particular publishing style, use the @option{style} attribute for the
1009 @verb{|<literal>|} tag.  An example follows.
1011 @example
1012 <literal style="latex">
1013 A LaTeX-based style was used in the publishing of this document.
1014 </literal>
1015 @end example
1017 This will leave the region alone if the current publishing style is
1018 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
1019 otherwise.  It is also possible to leave the text alone only for one
1020 particular style, rather than its derivations, by adding
1021 @code{exact="t"} to the tag.
1023 @cindex line breaks
1024 @subheading Line breaks
1026 If you need a line break, then use the @samp{<br>} tag.  Most of the
1027 time this tag is unnecessary, because Muse will automatically detect
1028 paragraphs by means of blank lines.  If you want to preserve newlines in
1029 several lines of text, then use verse markup instead (@pxref{Verse}).
1031 @node Headings, Directives, Paragraphs, Markup Rules
1032 @comment  node-name,  next,  previous,  up
1033 @section Levels of headings
1034 @cindex headings
1036 A heading becomes a chapter or section in printed output -- depending on
1037 the style.  To indicate a heading, start a new paragraph with one or
1038 more asterices, followed by a space and the heading title.  Then begin
1039 another paragraph to enter the text for that section.
1041 All levels of headings will be published.  Most publishing styles only
1042 distinguish the between the first 4 levels, however.
1044 @example
1045 * First level
1047 ** Second level
1049 *** Third level
1051 **** Fourth level
1052 @end example
1054 @node Directives, Emphasizing Text, Headings, Markup Rules
1055 @comment  node-name,  next,  previous,  up
1056 @section Directives at the beginning of a document
1057 @cindex directives
1059 Directives are lines beginning with the @samp{#} character that come
1060 before any paragraphs or sections in the document.  Directives are of
1061 the form ``#directive content of directive''.  You can use any
1062 combination of uppercase and lowercase letters for directives, even if
1063 the directive is not in the list below.
1065 The @code{muse-publishing-directive} function may be used in header and
1066 footer text to access directives.  For example, to access the
1067 @code{#title} directive, use @code{(muse-publishing-directive "title")}.
1069 The following is a list of directives that Muse uses.
1071 @table @code
1072 @cindex #author
1073 @item #author
1074 The author of this document.
1076 If this is not specified, Muse will attempt to figure it out from the
1077 @code{user-full-name} variable.
1079 @cindex #date
1080 @item #date
1081 The date that the document was last modified.
1083 This is used by publishing styles that are able to embed the date
1084 information.
1086 @cindex #desc
1087 @item #desc
1088 A short description of this document.
1090 This is used by the @code{journal} publishing style to embed information
1091 inside of an RSS/RDF feed.
1093 @cindex #title
1094 @item #title
1095 The title of this document.
1097 If this is not specified, the name of the file is used.
1099 @end table
1101 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1102 @comment  node-name,  next,  previous,  up
1103 @section Bold, italicized, and underlined text
1104 @cindex emphasizing text
1105 @cindex underlining text
1106 @cindex italicizing text
1107 @cindex verbatim text
1108 @cindex monospace, rendering words
1110 To emphasize text, surround it with certain specially recognized
1111 characters.
1113 @example
1114 *emphasis*
1115 **strong emphasis**
1116 ***very strong emphasis***
1117 _underlined_
1118 =verbatim and monospace=
1119 @end example
1121 @cindex WYSIWYG
1122 While editing a Muse document in Muse mode, these forms of emphasis will
1123 be highlighted in a WYSIWYG manner.  Each of these forms may span
1124 multiple lines.
1126 Verbatim text will be colored as gray by default.  To change this,
1127 customize @code{muse-verbatim-face}.
1129 You can also use the @verb{|<code>|} tag to indicate verbatim and
1130 monospace text.  This is handy for regions that have an ``='' in them.
1132 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1133 @comment  node-name,  next,  previous,  up
1134 @section Making notes to be shown at the end
1135 @cindex footnotes
1137 A footnote reference is simply a number in square brackets.  To define
1138 the footnote, place this definition at the bottom of your file.
1139 @samp{footnote-mode} can be used to greatly facilitate the creation of
1140 these kinds of footnotes.
1142 Footnotes are defined by the same number in brackets occurring at the
1143 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
1144 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
1145 the point of insertion.
1147 @node Verse, Lists, Footnotes, Markup Rules
1148 @comment  node-name,  next,  previous,  up
1149 @section Indicating poetic stanzas
1150 @cindex verses
1151 @cindex poetry
1153 Poetry requires that whitespace be preserved, but without resorting to
1154 monospace.  To indicate this, use the following markup, reminiscent of
1155 email quotations.
1157 @example
1158 > A line of Emacs verse;
1159 >   forgive its being so terse.
1160 @end example
1162 You can also use the @verb{|<verse>|} tag, if you prefer.
1164 @example
1165 <verse>
1166 A line of Emacs verse;
1167   forgive its being so terse.
1168 </verse>
1169 @end example
1171 @cindex verses, multiple stanzas
1172 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1173 follows.
1175 @example
1176 <verse>
1177 A line of Emacs verse;
1178   forgive its being so terse.
1180 In terms of terse verse,
1181   you could do worse.
1182 </verse>
1183 @end example
1185 @node Lists, Tables, Verse, Markup Rules
1186 @comment  node-name,  next,  previous,  up
1187 @section Lists of items
1188 @cindex lists
1190 Lists are given using special characters at the beginning of a line.
1191 Whitespace must occur before bullets or numbered items, to distinguish
1192 from the possibility of those characters occurring in a real sentence.
1194 @cindex lists, bullets
1195 These are rendered as a bullet list.
1197 @example
1198 Normal text.
1200  - bullet item one
1201  - bullet item two
1202 @end example
1204 @cindex lists, enumerated
1205 An enumerated list follows.
1207 @example
1208 Normal text.
1210  1. Enum item one
1211  2. Enum item two
1212 @end example
1214 @cindex lists, definitions
1215 Here is a definition list.
1217 @example
1218 Term1 ::
1219   This is a first definition
1220   And it has two lines;
1221   no, make that three.
1223 Term2 :: This is a second definition
1224 @end example
1226 @subheading Nested lists
1228 @cindex lists, nested
1229 It is possible to nest lists of the same or different kinds.  The
1230 ``level'' of the list is determined by the amount of initial whitespace.
1232 @example
1233 Normal text.
1235  - Level 1, bullet item one
1236    1. Level 2, enum item one
1237    2. Level 2, enum item two
1238  - Level 1, bullet item two
1239    1. Level 2, enum item three
1240    2. Level 2, enum item four
1241       term :: definition
1242 @end example
1244 @subheading Breaking list items
1246 @cindex lists, breaking lines
1247 If you want to break up a line within any list type, just put one blank
1248 line between the end of the previous line and the beginning of the next
1249 line, using the same amount of initial indentation.
1251 @example
1252  - bullet item 1, line 1
1254    bullet item 1, line 2
1256    1. Enum line 1
1258       Enum line 2
1260  - bullet item 2, line 1
1262    bullet item 2, line 2
1263 @end example
1265 @node Tables, Explicit Links, Lists, Markup Rules
1266 @comment  node-name,  next,  previous,  up
1267 @section Generation of data tables
1268 @cindex tables
1270 @cindex tables, simple
1271 Only very simple tables are supported.  The syntax is as follows.
1273 @example
1274 Double bars  || Separate header fields
1276 Single bars   | Separate body fields
1277 Here are more | body fields
1279 Triple bars ||| Separate footer fields
1280 @end example
1282 Some publishing styles require header fields to come first, then footer
1283 fields, and then the body fields.  You can use any order for these
1284 sections that you like, and Muse will re-order them for you at
1285 publish-time.
1287 If you wish to disable table generation for one Muse file, add the
1288 directive @samp{#disable-tables t} to the top of the file.
1290 @subheading Other table formats
1292 @cindex tables, orgtbl-mode style
1293 It is possible to publish very basic Orgtbl-mode style tables.
1295 @example
1296 | org  | style | table |
1297 |------+-------+-------|
1298 | one  |       | one   |
1299 | two  | two   |       |
1300 |      | three | three |
1301 |------+-------+-------|
1302 | more | stuff |       |
1303 @end example
1305 If you are used to the way that Org Mode publishes these tables, then
1306 customize `muse-html-table-attributes' to the following, in order to get
1307 a similar kind of output.
1309 @example
1310 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1311 @end example
1313 @cindex tables, table.el style
1314 @file{table.el} style tables are also supported, as long as
1315 @file{table.el} itself supports outputting tables for a particular
1316 publishing style.  At the time of this writing, the ``html'', ``latex'',
1317 and ``docbook'' styles are supported by @file{table.el}.  Styles derived
1318 from these styles will also work.
1320 @example
1321 +---+-----+---+
1322 |   | one | 1 |
1323 +---+-----+---+
1324 | b | two |   |
1325 +---+-----+---+
1326 | c |     | 3 |
1327 +---+-----+---+
1328 @end example
1330 @node Explicit Links, Implicit Links, Tables, Markup Rules
1331 @comment  node-name,  next,  previous,  up
1332 @section Hyperlinks and email addresses with descriptions
1333 @cindex links, explicit
1335 A hyperlink can reference a URL, or another page within a Muse
1336 project.  In addition, descriptive text can be specified, which should
1337 be displayed rather than the link text in output styles that supports
1338 link descriptions.  The syntax is as follows.
1340 @example
1341 [[link target][link description]]
1342 [[link target without description]]
1343 @end example
1345 Thus, the current maintainer's homepage for Muse can be found
1346 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1347 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1349 @node Implicit Links, Images, Explicit Links, Markup Rules
1350 @comment  node-name,  next,  previous,  up
1351 @section Bare URLs, WikiNames, and InterWiki links
1352 @cindex links, implicit
1353 @cindex links, raw
1355 @cindex URLs
1356 @cindex Email addresses
1358 A URL or email address encountered in the input text is published as a
1359 hyperlink.  These kind of links are called @dfn{implicit links} because
1360 they are not separated from the rest of the Muse document in any way.
1362 Some characters in URLs will prevent Muse from recognizing them as
1363 implicit links. If you want to link to a URL containing spaces or any of
1364 the characters ``][,"'`()<>^'', you will have to make the link
1365 explicit. The punctuation characters ``.,;:'' are also not recognized as
1366 part of a URL when they appear at its end. For information on how to
1367 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1368 addresses with descriptions}.
1370 @cindex WikiNames
1371 If the @command{muse-wiki} module is loaded, another form of implicit
1372 link will be made available.  WikiNames, which are typed in CamelCase,
1373 are highlighted and published as links, provided that the file they
1374 refer to exists.
1376 Customization of WikiName recognition may be accomplished by editing the
1377 @code{muse-wiki-wikiword-regexp} option and subsequently running
1378 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1379 If you use the Customize interface, the latter will be done
1380 automatically.
1382 @cindex InterWiki links
1383 @cindex inter-project links
1384 The @command{muse-wiki} module also allows for InterWiki links.  These
1385 are similar to WikiWords, but they specify both the project and page of
1386 a file.  The names of your project entries in @code{muse-project-alist}
1387 will be used as InterWiki names by default.  Several examples follow.
1389 @example
1390 Blog::DocumentingMuse
1391 Projects#EmacsMuse
1392 Website
1393 @end example
1395 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1396 the project name, and @samp{DocumentingMuse} is the page name.  In the
1397 second example, @samp{#} is the interwiki delimiter.  If the name of a
1398 project occurs by itself in text, like the third case, it will be
1399 colorized and published as a link to the default page of the given
1400 project.
1402 Customization of interwiki links may be accomplished by editing the
1403 @code{muse-wiki-interwiki-alist} option.
1405 It is also possible to link to an anchor in an interwiki document.  This
1406 is called a ``three-part link''.  Examples of this follow.
1408 @example
1409 Blog::DocumentingMuse#anchor1
1410 Projects#EmacsMuse#anchor2
1411 @end example
1413 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1414 @comment  node-name,  next,  previous,  up
1415 @section Publishing and displaying images
1416 @cindex images
1417 @cindex links, with images
1418 @subheading Image links
1420 Links to images may be used in either the target or the description, or
1421 both.  Thus, the following code will publish as a clickable image that
1422 points to @url{http://mwolson.org/}.
1424 @example
1425 [[http://mwolson.org/][/static/logos/site-logo.png]]
1426 @end example
1428 Normally, images in the link part will be inlined.
1430 If you want these images to be published as links instead, place the
1431 text ``URL:'' immediately in front of the link text.  An example
1432 follows.
1434 @example
1435 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1436 @end example
1438 @cindex images, displaying
1439 @cindex images, local
1440 @subheading Displaying images in Muse mode
1441 If a link to a locally-available image is encountered in the link
1442 description, Muse mode will attempt to display it if your version of
1443 Emacs permits this.
1445 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1446 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1448 The method for finding images may be altered by customizing the
1449 @code{muse-colors-inline-image-method} option.  One useful value for
1450 this option is @code{muse-colors-use-publishing-directory}, which tells
1451 Muse mode to look in the directory where the current file will be
1452 published.  The default is to look in the current directory.  Relative
1453 paths like @samp{../pics/} should work for either setting.
1455 Eventually, it is hoped that Muse will be able to copy images from the a
1456 ``source'' directory to a publishing directory by customizing
1457 @code{muse-project-alist}, but this has not been implemented yet.
1459 @cindex images, without descriptions
1460 @cindex images, inlined
1461 @subheading Publishing simple images
1462 The following example will display correctly and publish correctly if a
1463 @acronym{PNG} file called @file{TestLogo.png} exists in the
1464 @file{../pics/} directory.  If text is on the same line as the picture,
1465 it will remain so in the output.
1467 @example
1468 [[../myimage.png]]
1469 @end example
1471 @cindex images, captions
1472 @subheading Publishing images with captions
1473 If you want to add a caption to an image, use the following syntax.
1474 This will center the image (if the output format supports it) and add a
1475 centered caption below the picture.  Formats that do not support
1476 centering the image will instead leave it against the left margin.
1478 @example
1479 [[../pics/mycat.png][My cat Dexter]]
1480 @end example
1482 Images with captions may only occur in their own paragraphs, with no
1483 text on the same line.  Otherwise, the published output will not be
1484 syntactically correct.
1486 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1487 @comment  node-name,  next,  previous,  up
1488 @section Inserting a horizontal line or anchor
1490 @cindex horizontal rules
1491 @cindex dashes
1492 @subheading Horizontal Rules
1494 Four or more dashes indicate a horizontal rule.  Be sure to put blank
1495 lines around it, or it will be considered part of the proceeding or
1496 following paragraph!
1498 @cindex anchors
1499 @cindex links, with target on same page
1500 @subheading Anchors
1502 If you begin a line with "#anchor" -- where "anchor" can be any word
1503 that doesn't contain whitespace -- it defines an anchor at that point
1504 into the document.  This point can be referenced using "page#anchor" as
1505 the target in a Muse link.
1507 @node Embedded Lisp, Citations, Horizontal Rules and Anchors, Markup Rules
1508 @comment  node-name,  next,  previous,  up
1509 @section Evaluating Emacs Lisp code in documents for extensibility
1510 @cindex lisp, embedded
1512 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag.
1513 With the @verb{|<lisp>|} tag, you may generate whatever output text you
1514 wish.  The inserted output will get marked up if the @verb{|<lisp>|}
1515 tag appears within the main text of the document.
1517 @example
1518 <lisp>(concat "This form gets " "inserted")</lisp>
1519 @end example
1521 @cindex lisp, and insert command
1522 Note that you should not use the @code{insert} command within a set of
1523 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1524 tags will be automatically inserted into the document.
1526 It is also possible to treat the output as if it were surrounded by the
1527 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1528 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1529 attribute of the @verb{|<lisp>|} tag.
1531 @example
1532 <lisp markup="example">
1533 (concat "Insert" " me")
1534 </lisp>
1535 @end example
1537 Other languages also have tags that cause source code to be evaluated.
1538 @xref{Tag Summary}, for details.
1540 @node Citations, Comments, Embedded Lisp, Markup Rules
1541 @comment  node-name,  next,  previous,  up
1542 @section Support for citing other resources
1543 @cindex citations
1544 @cindex tags, <cite>
1546 @subheading Example
1548 Here is an example of what citations look like in a Muse document.
1550 @example
1551 #bibsource REFDB
1553 * Title
1554 ** Subtitle
1556 Some text before <cite>Miller1999</cite> and after the citation.
1558 This is an author-only citation <cite type="author">Miller1999</cite>.
1560 And this is a year-only citation <cite type="year">Miller1999</cite>.
1562 Finally, this is a multi-head citation
1563 <cite>Miller1999,Andrews2005</cite>.
1564 @end example
1566 @subheading Overview
1568 The @code{#bibsource} directive defines the source of the
1569 bibliographies.  The following sources are possible.
1571 @itemize @bullet
1572 @item DocBook + RefDB:
1573 the string "REFDB"
1575 @item LaTeX + bibtex:
1576 the name of an appropriate bibtex file
1578 @item LaTeX + RefDB:
1579 if the input file is called "foo.muse", then set this to "foo.bib"
1580 @end itemize
1582 Citations are encoded as @verb{|<cite>|} elements which enclose the
1583 citation keys as they are defined in the bibliography file or database.
1584 In multi-head citations, the citation keys have to be separated by
1585 colons or semicolons.  The @code{latex} and @code{docbook} styles
1586 translate these to the proper separator automatically.
1588 The @verb{|<cite>|} elements take an optional ``type'' attribute that
1589 defines how the citation is rendered.  If the attribute is missing,
1590 you'll get a regular citation according to the bibliography style,
1591 e.g.'' (Miller et al., 1999)''.  If the attribute is set to "author",
1592 only the name of the author(s) will be rendered.  Accordingly, "year"
1593 will cause the year to be printed.  This is useful to create citations
1594 like this:
1596 @example
1597 Miller et al. had already shown in a previous publication (1999) that
1598 this is not going to work.
1599 @end example
1601 Remember that refdb-mode (the Emacs interface to RefDB) can retrieve
1602 references by simply marking the citation key and running the
1603 @code{refdb-getref-by-field-on-region} command.  Later versions of
1604 @code{refdb-mode} will also allow to insert references as Muse citations
1605 (which is already implemented for DocBook, TEI, and LaTeX documents).
1607 You may have noticed that there is no element to indicate the position
1608 of the bibliography.  The latter is always created at a valid position
1609 close to the end of the document.  The functions
1610 @code{muse-docbook-bibliography} and @code{muse-latex-bibliography} are
1611 called in the header or footer to generate this content, so it is
1612 possible to change the exact position.
1614 @node Comments, Tag Summary, Citations, Markup Rules
1615 @comment  node-name,  next,  previous,  up
1616 @section Lines to omit from published output
1617 @cindex comments
1618 @cindex publishing, omitting lines
1620 Use the following syntax to indicate a comment.  Comments will not be
1621 published.
1623 @example
1624 ; Comment text goes here.
1625 @end example
1627 That is, only a semi-colon at the beginning of a line, followed by a
1628 literal space, will cause that line to be treated as a comment.
1630 You can alternatively surround the region with the @verb{|<comment>|}
1631 tag.
1633 If you wish the comment to be published, but just commented out using
1634 the comment syntax of the output format, then set
1635 @option{muse-publish-comments-p} to non-nil.
1637 @node Tag Summary, , Comments, Markup Rules
1638 @comment  node-name,  next,  previous,  up
1639 @section Tags that Muse recognizes
1640 @cindex tags
1641 @cindex inserting files at publish time
1642 @cindex publishing, including markup in headers and footers
1643 @cindex publishing, inserting files
1645 Muse has several built-in tags that may prove useful during publishing.
1646 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1647 Muse uses, as well as make your own tags.
1649 Only a small subset of these tags are available in header and footer
1650 text.  The @code{muse-publish-markup-header-footer-tags} option lists
1651 the tags that are allowed in headers and footers.
1653 @subheading Syntax
1655 If a tag takes arguments, it will look like this, where ``tagname'' is
1656 the name of the tag.
1658 @example
1659 <tagname arg1="string1" arg2="string2">
1660 @end example
1662 If you want the tag to look like it came straight from an XHTML
1663 document, you can alternatively do the following.
1665 @example
1666 <tagname arg1="string1" arg2="string2" />
1667 @end example
1669 If a tag surrounds some text, it will look like this.
1671 @example
1672 <tagname>Some text</tagname>
1673 @end example
1675 If a tag surrounds a large region, it will look like this.
1677 @example
1678 <tagname>
1679 Some text.
1680 Some more text.
1681 </tagname>
1682 @end example
1684 @subheading Tag listing
1686 This is the complete list of tags that Muse accepts, including those
1687 that were mentioned in previous sections.
1689 @table @samp
1691 @item <br>
1692 Insert a line break.
1694 Muse will automatically detect paragraphs when publishing by means of
1695 blank lines, so this tag is usually unnecessary.
1697 @item <cite>
1698 Insert a citation to another source.
1700 This takes the argument @option{type}, which indicates the type of
1701 citation.  The valid types are "author" and "year".  If this argument is
1702 omitted, include both author and year in the citation.
1704 The bibliography to use for the citation may be specified by the
1705 @option{#bibsource} directive.
1707 @xref{Citations}, for additional information.
1709 @item <class>
1710 If publishing to HTML, surround the given text with a @verb{|<span>|}
1711 tag.  It takes one argument called ``name'' that specifies the ``class''
1712 attribute of the @verb{|<span>|} tag.
1714 If publishing to a different format, do nothing extra to the text.
1716 @item <code>
1717 Treat the text surrounded by the tag as if they were enclosed in equal
1718 signs, that is, make it monospace.
1720 @item <command>
1721 Run a command on the region, replacing the region with the result of the
1722 command.  The command is specified with the ``interp'' argument.  If no
1723 value for ``interp'' is given, pass the entire region to the shell.
1725 The ``markup'' argument controls how this section is marked up.
1727 If it is omitted, publish the region with the normal Muse rules.
1729 If "nil", do not mark up the region at all, but prevent Muse from
1730 further interpreting it.
1732 If "example", treat the region as if it was surrounded by the
1733 @verb{|<example>|} tag.
1735 If "src", treat the included text as if it was surrounded by the
1736 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1737 doing this.
1739 If "verse", treat the region as if it was surrounded by the
1740 @verb{|<verse>|} tag, to preserve newlines.
1742 Otherwise, it should be the name of a function to call, with the buffer
1743 narrowed to the region.
1745 @item <comment>
1746 Treat the entire region as a comment.  If the option
1747 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1748 publish it using the comment syntax of the current publishing style.
1750 @item <contents>
1751 Publish a Table of Contents.  This will either be inserted in-place or
1752 at the beginning of the document, depending on your publishing style.
1753 It does not have a delimiting tag.
1755 By default, only 2 levels of headings will be included in the generated
1756 Table of Contents.  To change this globally, customize the
1757 @var{muse-publish-contents-depth} option.  To change this only for the
1758 current tag, use the ``depth'' argument.
1760 @item <div>
1761 Insert a <div> tag into HTML documents, and do not insert anything
1762 special for other non-HTML publishing formats.
1764 If the ``style'' argument is provided, include it with the published
1765 @verb{|<div>|} tag.  Likewise for the ``id'' argument.
1767 @item <example>
1768 Publish the region in monospace, preserving the newlines in the region.
1769 This is useful for snippets of code.
1771 @item <include>
1772 Insert the given file at the current location during publishing.  The
1773 basic use of this tag is as follows, replacing ``included_file'' with
1774 the name of the file that you want to include.
1776 @example
1777 <include file="included_file">
1778 @end example
1780 The ``markup'' argument controls how this section is marked up.
1782 If it is omitted, publish the included text with the normal Muse
1783 rules.
1785 If "nil", do not mark up the included text at all.
1787 If "example", treat the included text as if it was surrounded by the
1788 @verb{|<example>|} tag.
1790 If "src", treat the included text as if it was surrounded by the
1791 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1792 doing this.
1794 If "verse", treat the included text as if it was surrounded by the
1795 @verb{|<verse>|} tag, to preserve newlines.
1797 Otherwise, it should be the name of a function to call after inserting
1798 the file with the buffer narrowed to the section inserted.
1800 @item <lisp>
1801 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1802 The result is then inserted into the document, so you do not need to
1803 explicitly call @code{insert}.  All text properties are removed from the
1804 resulting text.
1806 This tag takes the ``markup'' argument.  See the description of
1807 @verb{|<command>|} for details.
1809 @item <literal>
1810 Make sure that the text enclosed by this tag is published without
1811 escaping it in any way.  This is useful for inserting markup directly
1812 into the published document, when Muse does not provide the desired
1813 functionality.
1815 @item <markup>
1816 Mark up the text between the initial and ending tags.  The markup
1817 command to use may be specified by the ``function'' argument.  The
1818 standard Muse markup routines are used by default if no ``function''
1819 argument is provided.
1821 This is useful for marking up regions in headers and footers.  One
1822 example that comes to mind is generating a published index of all of the
1823 files in the current project by doing the following.
1825 @example
1826 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1827 @end example
1829 @item <perl>
1830 Run the @command{perl} language interpreter on the region, replacing the
1831 region with the result of the command.
1833 This tag takes the ``markup'' argument.  See the description of
1834 @verb{|<command>|} for details.
1836 @item <python>
1837 Run the @command{python} language interpreter on the region, replacing
1838 the region with the result of the command.
1840 This tag takes the ``markup'' argument.  See the description of
1841 @verb{|<command>|} for details.
1843 @item <quote>
1844 Publish the region as a blockquote.  This will either be inserted
1845 in-place or at the beginning of the document, depending on your
1846 publishing style.  It does not have a delimiting tag.
1848 @item <ruby>
1849 Run the @command{ruby} language interpreter on the region, replacing the
1850 region with the result of the command.
1852 This tag takes the ``markup'' argument.  See the description of
1853 @verb{|<command>|} for details.
1855 @item <src>
1856 Publish the region using htmlize.
1857 The language to use may be specified by the ``lang'' attribute.
1859 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1860 the value of the ``lang'' attribute.
1862 This tag requires htmlize 1.34 or later in order to work.  If this is
1863 not satisfied, or the current publishing style is not HTML-based, Muse
1864 will publish the region like an @verb{|<example>|} tag.
1866 @item <verbatim>
1867 This is used when you want to prevent Muse from trying to interpret some
1868 markup.  Surround the markup in @verb{|<verbatim>|} and
1869 @verb{|</verbatim>|}, and it will not be interpreted.
1871 This tag was used often in previous versions of Muse because they did
1872 not support whole-document escaping of specials.  Now, it will only be
1873 needed for other tags, and perhaps footnotes as well.
1875 @item <verse>
1876 Preserve the newlines in the region.  In formats like HTML, newlines are
1877 removed by default, hence the need for this tag.  In other publishing
1878 styles, this tag may cause the text to be indented slightly in a way
1879 that looks nice for poetry and prose.
1881 @end table
1883 @node Publishing Styles, Extending Muse, Markup Rules, Top
1884 @comment  node-name,  next,  previous,  up
1885 @chapter Publishing Various Types of Documents
1886 @cindex publishing styles
1888 One of the principle features of Muse is the ability to publish a simple
1889 input text to a variety of different output styles.  Muse also makes it
1890 easy to create new styles, or derive from an existing style.
1892 @menu
1893 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1894 * Book::                        Publishing entries into a compilation.
1895 * ConTeXt::                     Publishing ConTeXt documents.
1896 * DocBook::                     Publishing in DocBook XML form.
1897 * HTML::                        Publishing in HTML or XHTML form.
1898 * Journal::                     Keeping a journal or blog.
1899 * LaTeX::                       Publishing LaTeX documents.
1900 * Poem::                        Publish a poem to LaTeX or PDF.
1901 * Texinfo::                     Publish entries to Texinfo format or PDF.
1902 * XML::                         Publish entries to XML.
1903 @end menu
1905 @node Blosxom, Book, Publishing Styles, Publishing Styles
1906 @comment  node-name,  next,  previous,  up
1907 @section Integrating Muse and pyblosxom.cgi
1908 @cindex blog, one-file-per-entry style
1910 The Blosxom publishing style publishes a tree of categorised files to a
1911 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1912 In other words, each blog entry corresponds with one file.
1914 @menu
1915 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1916 * Blosxom Entries::             Format of a Blosxom entry and automation.
1917 * Blosxom Options::             Blosxom styles and options provided.
1918 @end menu
1920 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1921 @comment  node-name,  next,  previous,  up
1922 @subsection Other tools needed for the Blosxom style
1924 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1925 installed on a machine that you have upload access to.
1927 The major difficulty in both of these programs is specifying the date of
1928 the entries.  Both programs rely on the file modification time rather
1929 than any data contained in the entries themselves.  A plugin is needed
1930 in order for these programs to be able to get the correct date.
1932 @subheading PyBlosxom
1934 There are two different ways of accomplishing this in pyblosxom.  The
1935 first way involves gathering the timestamps (as specified by the
1936 @code{#date} directive) into one file and then sending that file along
1937 with published entries to the webserver.
1939 The second will read each file at render time and parse the
1940 @code{#postdate} directive.  Muse will translate the @code{#date}
1941 directive into @code{#postdate} at publish time, so you don't have to do
1942 any extra work.
1944 @subsubheading Placing timestamps in one file
1946 The following additional components are required in order to make the
1947 date of blog entries display as something sensible.
1949 @enumerate
1950 @item
1951 A script to gather date directives from the entire blog tree into a
1952 single file.  The file must associate a blog entry with a date.
1954 @item
1955 A plugin for (py)blosxom that reads this file.
1956 @end enumerate
1958 These 2 things are provided for @command{pyblosxom.cgi} in the
1959 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1960 former service, while @file{hardcodedates.py} provides the latter
1961 service.
1963 Here is a sample listing from my @file{timestamps} file, which maps
1964 each file to a date.  This can really be in any format, as long as your
1965 date-gathering script and your plugin can both understand it.
1967 @example
1968 2005-04-01-14-16 personal/paper_cranes
1969 2005-03-21 personal/spring_break_over
1970 2004-10-24 personal/finished_free_culture
1971 @end example
1973 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1974 @file{getstamps.py}.  Note that you will need to set the current
1975 directory to where your Muse files are, execute @file{getstamps.py}, and
1976 then move the generated timestamps file to your publishing directory.
1978 @subsubheading Getting timestamp from entry while rendering
1980 Alternately, the pyblosxom metadate plugin may be used.  On the plus
1981 side, there is no need to run a script to gather the date.  On the
1982 downside, each entry is read twice rather than once when the page is
1983 rendered.  Set the value of @code{muse-blosxom-use-metadate} to non-nil
1984 to enable adding a @code{#postdate} directive to all published files.
1985 You can do this by:
1987 @example
1988 M-x customize-variable RET muse-blosxom-use-metadate RET
1989 @end example
1991 With the metadate plugin installed in pyblosxom, the date set in this
1992 directive will be used instead of the file's modification time.  The
1993 plugin is included with Muse at @file{contrib/pyblosxom/metadate.py}.
1995 @subheading Blosxom
1997 It is also possible to use Blosxom, which is written in Perl, to serve
1998 blog entries that were published with Muse.  The steps are as follows.
2000 @enumerate
2001 @item
2002 Download and install blosxom from @url{http://blosxom.sourceforge.net/}.
2004 @item
2005 Install the metadate plugin.  It is available in
2006 @file{contrib/blosxom/metadate_0_0_3}.
2008 @item
2009 Every time you make a new blog entry, change to the blosxom data
2010 directory and execute the @file{contrib/blosxom/getstamps.pl} script.
2011 This script has only recently been made, and may still have some bugs,
2012 so use with caution.
2014 @end enumerate
2016 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
2017 @comment  node-name,  next,  previous,  up
2018 @subsection Format of a Blosxom entry and automation
2020 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
2021 longer `#date yyyy-mm-dd-hh-mm', a title (using the @code{#title}
2022 directive), plus whatever normal content is desired.
2024 The date directive is not used directly by @command{pyblosxom.cgi} or
2025 this program.  You need to have the two additional items from the former
2026 section to make use of this feature.
2028 There is a function called @code{muse-blosxom-new-entry} that will
2029 automate the process of making a new blog entry.  To make use of it, do
2030 the following.
2032 @itemize @bullet
2033 @item
2034 Customize @code{muse-blosxom-base-directory} to the location that your
2035 blog entries are stored.
2037 @item
2038 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
2039 use the following code to assign this function to @kbd{C-c p l'}.
2041 @example
2042 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
2043 @end example
2045 @item
2046 You should create your directory structure ahead of time under your base
2047 directory.  These directories, which correspond with category names, may
2048 be nested.
2050 @item
2051 When you enter this key sequence, you will be prompted for the category
2052 of your entry and its title.  Upon entering this information, a new file
2053 will be created that corresponds with the title, but in lowercase
2054 letters and having special characters converted to underscores.  The
2055 title and date directives will be inserted automatically.
2056 @end itemize
2058 @node Blosxom Options, , Blosxom Entries, Blosxom
2059 @comment  node-name,  next,  previous,  up
2060 @subsection Blosxom styles and options provided
2062 The following styles and options are available in the Blosxom publishing
2063 style.
2065 @subheading Styles provided
2067 @table @code
2069 @cindex publishing styles, blosxom-html
2070 @item blosxom-html
2071 Publish Blosxom entries in HTML form.
2073 @cindex publishing styles, blosxom-xhtml
2074 @item blosxom-xhtml
2075 Publish Blosxom entries in XHTML form.
2077 @end table
2079 @subheading Options provided
2081 @table @code
2083 @item muse-blosxom-extension
2084 Default file extension for publishing Blosxom files.
2086 @item muse-blosxom-header
2087 Header used for publishing Blosxom files.
2089 This may be text or a filename.
2091 @item muse-blosxom-footer
2092 Footer used for publishing Blosxom files.
2094 This may be text or a filename.
2096 @item muse-blosxom-base-directory
2097 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
2099 This is the top-level directory where your blog entries may be found
2100 locally.
2102 @end table
2104 @node Book, ConTeXt, Blosxom, Publishing Styles
2105 @comment  node-name,  next,  previous,  up
2106 @section Publishing entries into a compilation
2108 This publishing style is used to output ``books'' in LaTeX or PDF
2109 format.
2111 Each page will become a separate chapter in the book, unless the style
2112 keyword @option{:nochapters} is used, in which case they are all run
2113 together as if one giant chapter.
2115 One way of publishing a book is to make a project for it, add the
2116 project to @code{muse-project-alist}, and use the @code{book-pdf} style
2117 with a very specific @option{:include} value to specify some page whose
2118 contents will be checked for the values of @code{#title} and
2119 @code{#date}, and whose name will be used in the output file.  Then to
2120 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
2121 @kbd{C-c C-p} to trigger the publishing process.  An example
2122 @code{muse-project-alist} for this method follows.
2124 @example
2125 (setq muse-project-alist
2126       '(("MyNotes" (:nochapters t  ; do automatically add chapters
2127                     :book-chapter "Computer Science"
2128                     "~/Notes/cs"
2129                     :book-chapter "Mathematics"
2130                     "~/Notes/math"
2131                     :book-chapter "Emacs"
2132                     "~/Notes/emacs"
2133                     :book-end t ; the rest will not be placed in the book
2134                     "~/Notes"   ; so we can find the notes-anthology page
2135                     "~/Notes/private"
2136                     :force-publish ("index")
2137                     :default "index")
2138          (:base "book-pdf"
2139                 :include "/notes-anthology[^/]*$"
2140                 :path "~/public_html/notes")
2141          ;; other publishing styles for each directory go here,
2142          ;; if desired
2143          )))
2144 @end example
2146 In this example, there would be a file called
2147 @file{~/Notes/notes-anthology.muse}, which would contain just the
2148 following.  The resulting book would be published to
2149 @file{~/public_html/notes/notes-anthology.pdf}.
2151 @example
2152 #title My Technology Ramblings
2153 @end example
2155 Another way is to call the @code{muse-book-publish-project} function
2156 manually, with a custom project entry.  An example of this may be found
2157 in John Wiegley's configuration file at
2158 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
2159 function.
2161 @subheading Styles provided
2163 @table @code
2165 @cindex publishing styles, book-latex
2166 @item book-latex
2167 Publish a book in LaTeX form.  The header and footer are different than
2168 the normal LaTeX publishing mode.
2170 @cindex publishing styles, book-pdf
2171 @item book-pdf
2172 Publish a book in PDF form.  The header and footer are different than
2173 the normal PDF publishing mode.
2175 @end table
2177 @subheading Options provided
2179 @table @code
2181 @item muse-book-before-publish-hook
2182 A hook run in the book buffer before it is marked up.
2184 @item muse-book-after-publish-hook
2185 A hook run in the book buffer after it is marked up.
2187 @item muse-book-latex-header
2188 Header used for publishing books to LaTeX.
2190 This may be text or a filename.
2192 @item muse-book-latex-footer
2193 Footer used for publishing books to LaTeX.
2195 This may be text or a filename.
2197 @end table
2198 @node ConTeXt, DocBook, Book, Publishing Styles
2199 @comment  node-name,  next,  previous,  up
2200 @section Publishing ConTeXt documents
2202 This publishing style is capable of producing ConTeXt or PDF documents.
2204 If you wish to publish PDF documents based on ConTeXt, you will need to
2205 have it installed.  For Debian and Ubuntu, this can be accomplished by
2206 installing the ``texlive'' package.
2208 @subheading Styles provided
2210 @table @code
2212 @cindex publishing styles, context
2213 @item context
2214 Publish a ConTeXt document.
2216 @cindex publishing styles, context-pdf
2217 @item context-pdf
2218 Publish a PDF document, using an external ConTeXt document conversion
2219 tool.
2221 @cindex publishing styles, context-slides
2222 @item context-slides
2223 Produce slides from a ConTeXt document.
2225 Here is an example of a slide.
2227 @example
2228 * First Slide
2230 [[Some-sort-of-cute-image.png]]
2232 ** A subheading
2234  - A bullet point.
2235  - Another bullet point.
2237 * Second Slide
2239 ... and so on
2240 @end example
2242 @cindex publishing styles, context-slides-pdf
2243 @item context-slides-pdf
2244 Publish a PDF document of ConTeXt slides.
2246 @end table
2248 @subheading Options provided
2250 @table @code
2252 @item muse-context-extension
2253 Default file extension for publishing ConTeXt files.
2255 @item muse-context-pdf-extension
2256 Default file extension for publishing ConTeXt files to PDF.
2258 @item muse-context-pdf-program
2259 The program that is called to generate PDF content from ConTeXt content.
2261 @item muse-context-pdf-cruft
2262 Extensions of files to remove after generating PDF output successfully.
2264 @item muse-context-header
2265 Header used for publishing ConTeXt files.
2267 This may be text or a filename.
2269 @item muse-context-footer
2270 Footer used for publishing ConTeXt files.
2272 This may be text or a filename.
2274 @item muse-context-markup-regexps
2275 List of markup regexps for identifying regions in a Muse page.
2277 For more on the structure of this list,
2278 @xref{muse-publish-markup-regexps}.
2280 @item muse-context-markup-functions
2281 An alist of style types to custom functions for that kind of text.
2283 For more on the structure of this list,
2284 @xref{muse-publish-markup-functions}.
2286 @item muse-context-markup-strings
2287 Strings used for marking up text.
2289 These cover the most basic kinds of markup, the handling of which
2290 differs little between the various styles.
2292 @item muse-context-slides-header
2293 Header for publishing a presentation (slides) using ConTeXt.
2295 Any of the predefined modules, which are available in the
2296 tex/context/base directory, can be used by writing a "module" directive
2297 at the top of the Muse file; if no such directive is provided, module
2298 pre-01 is used.  Alternatively, you can use your own style ("mystyle",
2299 in this example) by replacing "\usemodule[]" with "\input mystyle".
2301 This may be text or a filename.
2303 @item muse-context-slides-markup-strings
2304 Strings used for marking up text in ConTeXt slides.
2306 @item muse-context-markup-specials-document
2307 A table of characters which must be represented specially.
2308 These are applied to the entire document, sans already-escaped
2309 regions.
2311 @item muse-context-markup-specials-example
2312 A table of characters which must be represented specially.
2313 These are applied to @verb{|example>|} regions.
2315 With the default interpretation of @verb{|<example>|} regions, no
2316 specials need to be escaped.
2318 @item muse-context-markup-specials-literal
2319 A table of characters which must be represented specially.
2320 This applies to =monospaced text= and @verb{|<code>|} regions.
2322 @item muse-context-markup-specials-url
2323 A table of characters which must be represented specially.
2324 These are applied to URLs.
2326 @item muse-context-markup-specials-image
2327 A table of characters which must be represented specially.
2328 These are applied to image filenames.
2330 @item muse-context-permit-contents-tag
2331 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2332 contents.
2334 Most of the time, it is best to have a table of contents on the
2335 first page, with a new page immediately following.  To make this
2336 work with documents published in both HTML and ConTeXt, we need to
2337 ignore the @verb{|<contents>|} tag.
2339 If you don't agree with this, then set this option to non-nil,
2340 and it will do what you expect.
2342 @end table
2344 @node DocBook, HTML, ConTeXt, Publishing Styles
2345 @comment  node-name,  next,  previous,  up
2346 @section Publishing in DocBook XML form
2348 This publishing style is used to generate DocBook XML files.
2350 @subheading Styles provided
2352 @table @code
2354 @cindex publishing styles, docbook
2355 @item docbook
2356 Publish a file in Docbook form.
2358 @end table
2360 @subheading Options provided
2362 This publishing style uses the same options for markup up special
2363 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2365 @table @code
2367 @item muse-docbook-extension
2368 Default file extension for publishing DocBook XML files.
2370 @item muse-docbook-header
2371 Header used for publishing DocBook XML files.
2373 This may be text or a filename.
2375 @item muse-docbook-footer
2376 Footer used for publishing DocBook XML files.
2378 This may be text or a filename.
2380 @item muse-docbook-markup-regexps
2381 List of markup rules for publishing a Muse page to DocBook XML.
2383 @item muse-docbook-markup-functions
2384 An alist of style types to custom functions for that kind of text.
2386 @item muse-docbook-markup-strings
2387 Strings used for marking up text.
2389 These cover the most basic kinds of markup, the handling of which
2390 differs little between the various styles.
2392 @item muse-docbook-encoding-default
2393 The default Emacs buffer encoding to use in published files.
2394 This will be used if no special characters are found.
2396 @item muse-docbook-charset-default
2397 The default DocBook XML charset to use if no translation is
2398 found in @code{muse-xml-encoding-map}.
2400 @end table
2402 @node HTML, Journal, DocBook, Publishing Styles
2403 @comment  node-name,  next,  previous,  up
2404 @section Publishing in HTML or XHTML form
2406 This publishing style is capable of producing HTML or XHTML documents.
2408 @subheading Styles provided
2410 @table @code
2412 @cindex publishing styles, html
2413 @item html
2414 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2416 @item xhtml
2417 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2419 @end table
2421 @subheading Options provided
2423 If an HTML option does not have a corresponding XHTML option, it will
2424 be used for both of these publishing styles.
2426 These publishing styles use the same options for markup up special
2427 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2429 @table @code
2431 @item muse-html-extension
2432 Default file extension for publishing HTML files.
2434 @item muse-xhtml-extension
2435 Default file extension for publishing XHTML files.
2437 @item muse-html-style-sheet
2438 Store your stylesheet definitions here.
2440 This is used in @code{muse-html-header}.  You can put raw CSS in here or
2441 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
2442 @verb{|<lisp>|} markup tags.
2444 If you are publishing to XHTML, then customize the
2445 @code{muse-xhtml-style-sheet} option instead.
2447 @item muse-xhtml-style-sheet
2448 Store your stylesheet definitions here.
2450 This is used in @code{muse-xhtml-header}.  You can put raw CSS in here
2451 or a @verb{|<link>|} tag to an external stylesheet.  This text may
2452 contain @verb{|<lisp>|} markup tags.
2454 @item muse-html-header
2455 Header used for publishing HTML files.
2457 This may be text or a filename.
2459 @item muse-html-footer
2460 Footer used for publishing HTML files.
2462 This may be text or a filename.
2464 @item muse-xhtml-header
2465 Header used for publishing XHTML files.
2467 This may be text or a filename.
2469 @item muse-xhtml-footer
2470 Footer used for publishing XHTML files.
2472 This may be text or a filename.
2474 @item muse-html-anchor-on-word
2475 When true, anchors surround the closest word.
2477 This allows you to select them in a browser (i.e. for pasting), but has
2478 the side-effect of marking up headers in multiple colors if your header
2479 style is different from your link style.
2481 @item muse-html-table-attributes
2482 The attribute to be used with HTML @verb{|<table>|} tags.
2484 If you want to make more-complicated tables in HTML, surround the HTML
2485 with the @verb{|literal|} tag, so that it does not get escaped.
2487 @item muse-html-markup-regexps
2488 List of markup rules for publishing a Muse page to HTML.
2490 @item muse-html-markup-functions
2491 An alist of style types to custom functions for that kind of text.
2493 @item muse-html-markup-strings
2494 Strings used for marking up text as HTML.
2496 These cover the most basic kinds of markup, the handling of which
2497 differs little between the various styles.
2499 @item muse-xhtml-markup-strings
2500 Strings used for marking up text as XHTML.
2502 These cover the most basic kinds of markup, the handling of which
2503 differs little between the various styles.
2505 @item muse-html-markup-tags
2506 A list of tag specifications, for specially marking up HTML.
2507 @xref{muse-publish-markup-tags}, for more information.
2509 @item muse-html-meta-http-equiv
2510 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2512 @item muse-html-meta-content-type
2513 The content type used for the HTML @verb{|<meta>|} tag.
2515 If you are striving for XHTML 1.1 compliance, you may want to change
2516 this to ``application/xhtml+xml''.
2518 @item muse-html-meta-content-encoding
2519 The charset to append to the HTML @verb{|<meta>|} tag.
2521 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2522 and determine the HTML charset from emacs's coding.  If set to a string,
2523 this string will be used to force a particular charset.
2525 @item muse-html-charset-default
2526 The default HTML meta charset to use if no translation is found in
2527 @code{muse-xml-encoding-map}.
2529 @item muse-html-encoding-default
2530 The default Emacs buffer encoding to use in published files.
2531 This will be used if no special characters are found.
2533 @end table
2535 @node Journal, LaTeX, HTML, Publishing Styles
2536 @comment  node-name,  next,  previous,  up
2537 @section Keeping a journal or blog
2538 @cindex journal
2539 @cindex blog, journal style
2541 The module facilitates the keeping and publication of a journal.  When
2542 publishing to HTML, it assumes the form of a web log, or blog.
2544 The input format for each entry is as follows.
2546 @example
2547 * 20040317: Title of entry
2549 text for the entry.
2551 <qotd>
2552 "You know who you are. It comes down to a simple gut check: You
2553 either love what you do or you don't. Period." -- P. Bronson
2554 </qotd>
2555 @end example
2557 The "qotd", or Quote of the Day, is entirely optional.  When generated
2558 to HTML, this entry is rendered as the following.
2560 @example
2561 <div class="entry">
2562   <div class="entry-qotd">
2563     <h3>Quote of the Day:</h3>
2564     <p>"You know who you are. It comes down to a simple gut
2565       check: You either love what you do or you don't. Period."
2566       -- P. Bronson</p>
2567   </div>
2568   <div class="entry-body">
2569     <div class="entry-head">
2570       <div class="entry-date">
2571         <span class="date">March 17, 2004</span>
2572       </div>
2573       <div class="entry-title">
2574         <h2>Title of entry</h2>
2575       </div>
2576     </div>
2577     <div class="entry-text">
2578       <p>Text for the entry.</p>
2579     </div>
2580   </div>
2581 </div>
2582 @end example
2584 The plurality of "div" tags makes it possible to display the entries in
2585 any form you wish, using a CSS style.
2587 Also, an .RDF file can be generated from your journal by publishing it
2588 with the "rdf" style.  It uses the first two sentences of the first
2589 paragraph of each entry as its "description", and auto-generates tags
2590 for linking to the various entries.
2592 @subheading muse-project-alist considerations
2594 If you wish to publish an RDF or RSS feed, it is important to include
2595 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2596 for your Journal projects.  An example follows.
2598 @example
2599 (setq muse-project-alist
2600       '(("Journal" ("~/Journal/"
2601                     :default "journal")
2602         (:base "journal-rss"
2603                :base-url "http://example.org/journal/"
2604                :path "~/public_html/journal"))))
2605 @end example
2607 @subheading Styles provided
2609 @table @code
2611 @cindex publishing styles, journal-html
2612 @item journal-html
2613 Publish journal entries as an HTML document.
2615 @cindex publishing styles, journal-xhtml
2616 @item journal-xhtml
2617 Publish journal entries as an XHTML document.
2619 @cindex publishing styles, journal-latex
2620 @item journal-latex
2621 Publish journal entries as a LaTeX document.
2623 @cindex publishing styles, journal-pdf
2624 @item journal-pdf
2625 Publish journal entries as a PDF document.
2627 @cindex publishing styles, journal-book-latex
2628 @item journal-book-latex
2629 Publish journal entries as a LaTeX book.
2631 @cindex publishing styles, journal-book-pdf
2632 @item journal-book-pdf
2633 Publish journal entries as a PDF book.
2635 @cindex publishing styles, journal-rdf
2636 @cindex publishing styles, RSS 1.0
2637 @item journal-rdf
2638 Publish journal entries as an RDF file (RSS 1.0).
2640 @cindex publishing styles, journal-rss
2641 @cindex publishing styles, RSS 2.0
2642 @item journal-rss
2643 Publish journal entries as an RSS file (RSS 2.0).
2645 @cindex publishing styles, journal-rss-entry
2646 @item journal-rss-entry
2647 Used internally by @code{journal-rss} and @code{journal-rdf} for
2648 publishing individual entries.
2650 @end table
2652 @subheading Options provided
2654 @table @code
2656 @item muse-journal-heading-regexp
2657 A regexp that matches a journal heading.
2659 Paren group 1 is the ISO date, group 2 is the optional category, and
2660 group 3 is the optional heading for the entry.
2662 @item muse-journal-date-format
2663 Date format to use for journal entries.
2665 @item muse-journal-html-heading-regexp
2666 A regexp that matches a journal heading from an HTML document.
2668 Paren group 1 is the ISO date, group 2 is the optional category, and
2669 group 3 is the optional heading for the entry.
2671 @item muse-journal-html-entry-template
2672 Template used to publish individual journal entries as HTML.
2674 This may be text or a filename.
2676 @item muse-journal-latex-section
2677 Template used to publish a LaTeX section.
2679 @item muse-journal-latex-subsection
2680 Template used to publish a LaTeX subsection.
2682 @item muse-journal-markup-tags
2683 A list of tag specifications, for specially marking up Journal entries.
2685 @xref{muse-publish-markup-tags}, for more information.
2687 This is used by @code{journal-latex} and its related styles, as well as
2688 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2689 @code{journal-rss} use.
2691 @item muse-journal-rdf-extension
2692 Default file extension for publishing RDF (RSS 1.0) files.
2694 @item muse-journal-rdf-base-url
2695 The base URL of the website referenced by the RDF file.
2697 @item muse-journal-rdf-header
2698 Header used for publishing RDF (RSS 1.0) files.
2700 This may be text or a filename.
2702 @item muse-journal-rdf-footer
2703 Footer used for publishing RDF (RSS 1.0) files.
2705 This may be text or a filename.
2707 @item muse-journal-rdf-date-format
2708 Date format to use for RDF entries.
2710 @item muse-journal-rdf-entry-template
2711 Template used to publish individual journal entries as RDF.
2713 This may be text or a filename.
2715 @item muse-journal-rdf-summarize-entries
2716 If non-nil, include only summaries in the RDF file, not the full data.
2718 The default is nil, because this annoys some subscribers.
2720 @item muse-journal-rss-heading-regexp
2721 A regexp that matches a journal heading from an HTML document.
2723 Paren group 1 is the ISO date, group 2 is the optional category,
2724 and group 3 is the optional heading for the entry.
2726 @item muse-journal-rss-extension
2727 Default file extension for publishing RSS 2.0 files.
2729 @item muse-journal-rss-base-url
2730 The base URL of the website referenced by the RSS file.
2732 @item muse-journal-rss-header
2733 Header used for publishing RSS 2.0 files.
2735 This may be text or a filename.
2737 @item muse-journal-rss-footer
2738 Footer used for publishing RSS 2.0 files.
2740 This may be text or a filename.
2742 @item muse-journal-rss-date-format
2743 Date format to use for RSS 2.0 entries.
2745 @item muse-journal-rss-entry-template
2746 Template used to publish individual journal entries as RSS 2.0.
2748 This may be text or a filename.
2750 @item muse-journal-rss-enclosure-types-alist
2751 File types that are accepted as RSS enclosures.
2753 This is an alist that maps file extension to content type.
2755 Useful for podcasting.
2757 @item muse-journal-rss-summarize-entries
2758 If non-nil, include only summaries in the RSS file, not the full data.
2760 The default is nil, because this annoys some subscribers.
2762 @item muse-journal-rss-markup-regexps
2763 List of markup rules for publishing a Muse journal page to RSS.
2765 For more information on the structure of this list,
2766 @xref{muse-publish-markup-regexps}.
2768 @item muse-journal-rss-markup-functions
2769 An alist of style types to custom functions for that kind of text.
2771 For more on the structure of this list,
2772 @xref{muse-publish-markup-functions}.
2774 @end table
2776 @node LaTeX, Poem, Journal, Publishing Styles
2777 @comment  node-name,  next,  previous,  up
2778 @section Publishing LaTeX documents
2780 This publishing style is capable of producing LaTeX or PDF documents.
2782 If you wish to publish PDF documents, you will need to have a good LaTeX
2783 installation.  For Debian and Ubuntu, this can be accomplished by
2784 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
2785 are also a must.
2787 If your LaTeX installation has the file @file{grffile.sty}, which may be
2788 found in the @file{texlive-latex-recommended} package for Debian and
2789 Ubuntu, then consider using it by adding the following to your header
2790 file.  This allows spaces in filenames to work.
2792 @example
2793 \usepackage@{grffile@}
2794 @end example
2796 @subheading Styles provided
2798 @table @code
2800 @cindex publishing styles, latex
2801 @item latex
2802 Publish a LaTeX document.
2804 @cindex publishing styles, pdf
2805 @item pdf
2806 Publish a PDF document, using an external LaTeX document conversion
2807 tool.
2809 @cindex publishing styles, latexcjk
2810 @item latexcjk
2811 Publish a LaTeX document with CJK (Chinese) encodings.
2813 @cindex publishing styles, pdfcjk
2814 @item pdfcjk
2815 Publish a PDF document with CJK (Chinese) encodings, using an external
2816 LaTeX document conversion tool.
2818 @cindex publishing styles, slides
2819 @item slides
2820 Publish a LaTeX document that uses the Beamer extension.  This is
2821 suitable for producing slides.
2823 Here is an example of a slide.
2825 @example
2826 <slide title="First Slide">
2827 Everything between the slide tags composes this slide.
2829 [[Some-sort-of-cute-image.png]]
2831  - A bullet point.
2832  - Another bullet point.
2833 </slide>
2834 @end example
2836 @cindex publishing styles, slides-pdf
2837 @item slides-pdf
2838 Publish a PDF document of slides, using the Beamer extension.
2840 @cindex publishing styles, lecture-notes
2841 @item lecture-notes
2842 Publish a LaTeX document that uses the Beamer extension.  This is
2843 suitable for producing lecture notes.
2845 This can also use the @verb{|<slide>|} tag.
2847 @cindex publishing styles, lecture-notes-pdf
2848 @item lecture-notes-pdf
2849 Publish a PDF document of lecture notes, using the Beamer extension.
2851 @end table
2853 @subheading Options provided
2855 @table @code
2857 @item muse-latex-extension
2858 Default file extension for publishing LaTeX files.
2860 @item muse-latex-pdf-extension
2861 Default file extension for publishing LaTeX files to PDF.
2863 @item muse-latex-pdf-program
2864 The program that is called to generate PDF content from LaTeX content.
2866 @item muse-latex-pdf-cruft
2867 Extensions of files to remove after generating PDF output successfully.
2869 @item muse-latex-header
2870 Header used for publishing LaTeX files.
2872 This may be text or a filename.
2874 @item muse-latex-footer
2875 Footer used for publishing LaTeX files.
2877 This may be text or a filename.
2879 @item muse-latexcjk-header
2880 Header used for publishing LaTeX files (CJK).
2882 This may be text or a filename.
2884 @item muse-latexcjk-footer
2885 Footer used for publishing LaTeX files (CJK).
2887 This may be text or a filename.
2889 @item muse-latex-slides-header
2890 Header for publishing of slides using LaTeX.
2892 This may be text or a filename.
2894 You must have the Beamer extension for LaTeX installed for this to work.
2896 @item muse-latex-lecture-notes-header
2897 Header publishing of lecture notes using LaTeX.
2899 This may be text or a filename.
2901 You must have the Beamer extension for LaTeX installed for this to work.
2903 @item muse-latex-markup-regexps
2904 List of markup regexps for identifying regions in a Muse page.
2906 For more on the structure of this list,
2907 @xref{muse-publish-markup-regexps}.
2909 @item muse-latex-markup-functions
2910 An alist of style types to custom functions for that kind of text.
2912 For more on the structure of this list,
2913 @xref{muse-publish-markup-functions}.
2915 @item muse-latex-markup-strings
2916 Strings used for marking up text.
2918 These cover the most basic kinds of markup, the handling of which
2919 differs little between the various styles.
2921 @item muse-latex-slides-markup-tags
2922 A list of tag specifications, for specially marking up LaTeX slides.
2924 @item muse-latexcjk-encoding-map
2925 An alist mapping emacs coding systems to appropriate CJK codings.
2926 Use the base name of the coding system (ie, without the -unix).
2928 @item muse-latexcjk-encoding-default
2929 The default Emacs buffer encoding to use in published files.
2931 This will be used if no special characters are found.
2933 @item muse-latex-markup-specials-document
2934 A table of characters which must be represented specially.
2935 These are applied to the entire document, sans already-escaped
2936 regions.
2938 @item muse-latex-markup-specials-example
2939 A table of characters which must be represented specially.
2940 These are applied to @verb{|example>|} regions.
2942 With the default interpretation of @verb{|<example>|} regions, no
2943 specials need to be escaped.
2945 @item muse-latex-markup-specials-literal
2946 A table of characters which must be represented specially.
2947 This applies to =monospaced text= and @verb{|<code>|} regions.
2949 @item muse-latex-markup-specials-url
2950 A table of characters which must be represented specially.
2951 These are applied to URLs.
2953 @item muse-latex-markup-specials-image
2954 A table of characters which must be represented specially.
2955 These are applied to image filenames.
2957 @item muse-latex-permit-contents-tag
2958 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2959 contents.
2961 Most of the time, it is best to have a table of contents on the
2962 first page, with a new page immediately following.  To make this
2963 work with documents published in both HTML and LaTeX, we need to
2964 ignore the @verb{|<contents>|} tag.
2966 If you don't agree with this, then set this option to non-nil,
2967 and it will do what you expect.
2969 @end table
2971 @node Poem, Texinfo, LaTeX, Publishing Styles
2972 @comment  node-name,  next,  previous,  up
2973 @section Publish a poem to LaTeX or PDF
2975 The @code{muse-poem} module makes it easy to attractively publish and
2976 reference poems in the following format, using the "memoir" module for
2977 LaTeX publishing.  It will also markup poems for every other output
2978 style, though none are nearly as pretty.
2980 @example
2981 Title
2984 Body of poem
2987 Annotations, history, notes, etc.
2988 @end example
2990 Once a poem is written in this format, just publish it to PDF using the
2991 @code{poem-pdf} style.  To make an inlined reference to a poem that
2992 you've written -- for example, from a blog page -- there is a "poem" tag
2993 defined by this module.
2995 @example
2996 <poem title="name.of.poem.page">
2997 @end example
2999 Let's assume the template above was called @file{name.of.poem.page};
3000 then the above tag would result in this inclusion.
3002 @example
3003 ** Title
3005 > Body of poem
3006 @end example
3008 John Wiegley uses this module for publishing all of the poems on his
3009 website, which are at
3010 @uref{http://www.newartisans.com/johnw/poems.html}.
3012 @subheading Styles provided
3014 @table @code
3016 @cindex publishing styles, poem-latex
3017 @item poem-latex
3018 Publish a poem in LaTeX form.
3020 @cindex publishing styles, poem-pdf
3021 @item poem-pdf
3022 Publish a poem to a PDF document.
3024 @cindex publishing styles, chapbook-latex
3025 @item chapbook-latex
3026 Publish a book of poems in LaTeX form.
3028 @cindex publishing styles, chapbook-pdf
3029 @item chapbook-pdf
3030 Publish a book of poems to a PDF document.
3032 @end table
3034 @subheading Options provided
3036 @table @code
3038 @item muse-poem-latex-header
3039 Header used for publishing LaTeX poems.
3041 This may be text or a filename.
3043 @item muse-poem-latex-footer
3044 Footer used for publishing LaTeX files.
3046 This may be text or a filename.
3048 @item muse-poem-markup-strings
3049 Strings used for marking up poems.
3051 These cover the most basic kinds of markup, the handling of which
3052 differs little between the various styles.
3054 @item muse-chapbook-latex-header
3055 Header used for publishing a book of poems in LaTeX form.
3057 This may be text or a filename.
3059 @item muse-chapbook-latex-footer
3060 Footer used for publishing a book of poems in LaTeX form.
3062 This may be text or a filename.
3064 @item muse-poem-chapbook-strings
3065 Strings used for marking up books of poems.
3067 These cover the most basic kinds of markup, the handling of which
3068 differs little between the various styles.
3070 @end table
3072 @node Texinfo, XML, Poem, Publishing Styles
3073 @comment  node-name,  next,  previous,  up
3074 @section Publish entries to Texinfo format or PDF
3076 Rules for publishing a Muse file as a Texinfo article.
3078 @subheading Styles provided
3080 @table @code
3082 @cindex publishing styles, texi
3083 @item texi
3084 Publish a file in Texinfo form.
3086 @cindex publishing styles, texi
3087 @item info
3088 Generate an Info file from a Muse file.
3090 @cindex publishing styles, info-pdf
3091 @item info-pdf
3092 Publish a file in PDF form.
3094 @end table
3096 @subheading Options provided
3098 @table @code
3100 @item muse-texinfo-process-natively
3101 If non-nil, use the Emacs `texinfmt' module to make Info files.
3103 @item muse-texinfo-extension
3104 Default file extension for publishing Texinfo files.
3106 @item muse-texinfo-info-extension
3107 Default file extension for publishing Info files.
3109 @item muse-texinfo-pdf-extension
3110 Default file extension for publishing PDF files.
3112 @item muse-texinfo-header
3113 Text to prepend to a Muse page being published as Texinfo.
3115 This may be text or a filename.
3116 It may contain @verb{|<lisp>|} markup tags.
3118 @item muse-texinfo-footer
3119 Text to append to a Muse page being published as Texinfo.
3121 This may be text or a filename.
3122 It may contain @verb{|<lisp>|} markup tags.
3124 @item muse-texinfo-markup-regexps
3125 List of markup rules for publishing a Muse page to Texinfo.
3127 For more on the structure of this list,
3128 @xref{muse-publish-markup-regexps}.
3130 @item muse-texinfo-markup-functions
3131 An alist of style types to custom functions for that kind of text.
3133 For more on the structure of this list,
3134 @xref{muse-publish-markup-functions}.
3136 @item muse-texinfo-markup-strings
3137 Strings used for marking up text.
3139 These cover the most basic kinds of markup, the handling of which
3140 differs little between the various styles.
3142 @item muse-texinfo-markup-specials
3143 A table of characters which must be represented specially.
3145 @item muse-texinfo-markup-specials
3146 A table of characters which must be represented specially.
3147 These are applied to URLs.
3149 @end table
3151 @node XML, , Texinfo, Publishing Styles
3152 @comment  node-name,  next,  previous,  up
3153 @section Publish entries to XML
3155 Muse is capable of publishing XML documents, with the help of the
3156 @file{muse-xml.el} module.
3158 A RelaxNG schema is available as part of the Muse distribution in the
3159 @file{etc/muse.rnc} file.
3161 @subheading Styles provided
3163 @table @code
3165 @cindex publishing styles, xml
3166 @item xml
3167 Publish a file in XML form.
3169 @end table
3171 @subheading Options provided
3173 @table @code
3175 @cindex muse-xml-encoding-map
3176 @item muse-xml-encoding-map
3177 An alist mapping Emacs coding systems to appropriate XML charsets.
3178 Use the base name of the coding system (i.e. without the -unix).
3180 @item muse-xml-markup-specials
3181 A table of characters which must be represented specially in all
3182 XML-like markup formats.
3184 @item muse-xml-markup-specials-url-extra
3185 A table of characters which must be represented specially in all
3186 XML-like markup formats.
3188 These are extra characters that are escaped within URLs.
3190 @item muse-xml-extension
3191 Default file extension used for publishing XML files.
3193 @item muse-xml-header
3194 Header used for publishing XML files.
3196 This may be text or a filename.
3198 @item muse-xml-footer
3199 Footer used for publishing XML files.
3201 This may be text or a filename.
3203 @item muse-xml-markup-regexps
3204 List of markup rules for publishing a Muse page to XML.
3206 For more on the structure of this list,
3207 @xref{muse-publish-markup-regexps}.
3209 @item muse-xml-markup-functions
3210 An alist of style types to custom functions for that kind of text.
3212 For more on the structure of this list,
3213 @xref{muse-publish-markup-functions}.
3215 @item muse-xml-markup-strings
3216 Strings used for marking up text.
3218 These cover the most basic kinds of markup, the handling of which
3219 differs little between the various styles.
3221 @item muse-xml-encoding-default
3222 The default Emacs buffer encoding to use in published files.
3224 This will be used if no special characters are found.
3226 @item muse-xml-charset-default
3227 The default XML charset to use if no translation is found in
3228 @code{muse-xml-encoding-map}.
3230 @end table
3233 @node Extending Muse, Miscellaneous, Publishing Styles, Top
3234 @comment  node-name,  next,  previous,  up
3235 @chapter Making your own publishing styles
3237 @menu
3238 * Markup Functions::            Specifying functions to mark up text.
3239 * Markup Regexps::              Markup rules for publishing.
3240 * Markup Strings::              Strings specific to a publishing style.
3241 * Markup Tags::                 Tag specifications for special markup.
3242 * Style Elements::              Parameters used for defining styles.
3243 * Deriving Styles::             Deriving a new style from an existing
3244                                   one.
3245 @end menu
3247 @node Markup Functions, Markup Regexps, , Extending Muse
3248 @comment  node-name,  next,  previous,  up
3249 @section Specifying functions to mark up text
3250 @cindex publishing, markup functions
3252 @anchor{muse-publish-markup-functions}
3253 @code{muse-publish-markup-functions}
3255 An alist of style types to custom functions for that kind of text.
3257 This is used by publishing styles to attempt to minimize the amount of
3258 custom regexps that each has to define.  @file{muse-publish} provides
3259 rules for the most common types of markup.
3261 Each member of the list is of the following form.
3263 @example
3264 (SYMBOL FUNCTION)
3265 @end example
3267 @itemize @bullet
3268 @item SYMBOL
3269 Describes the type of text to associate with this rule.
3270 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3272 @item FUNCTION
3273 Function to use to mark up this kind of rule if no suitable function is
3274 found through the @option{:functions} tag of the current style.
3275 @end itemize
3277 @node Markup Regexps, Markup Strings, Markup Functions, Extending Muse
3278 @comment  node-name,  next,  previous,  up
3279 @section Markup rules for publishing
3280 @cindex publishing, markup regexps
3281 @cindex publishing, rules
3283 @anchor{muse-publish-markup-regexps}
3284 @code{muse-publish-markup-regexps}
3286 List of markup rules for publishing a page with Muse.
3288 The rules given in this variable are invoked first, followed by whatever
3289 rules are specified by the current style.
3291 Each member of the list is either a function, or a list of the following
3292 form.
3294 @example
3295 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3296 @end example
3298 @itemize @bullet
3299 @item REGEXP
3300 A regular expression, or symbol whose value is a regular expression,
3301 which is searched for using `re-search-forward'.
3303 @item TEXT-BEGIN-GROUP
3304 The matching group within that regexp which denotes the beginning of the
3305 actual text to be marked up.
3307 @item REPLACEMENT-TEXT
3308 A string that will be passed to `replace-match'.
3310 If it is not a string, but a function, it will be called to determine
3311 what the replacement text should be (it must return a string).  If it is
3312 a symbol, the value of that symbol should be a string.
3313 @end itemize
3315 The replacements are done in order, one rule at a time.  Writing
3316 the regular expressions can be a tricky business.  Note that case
3317 is never ignored.  `case-fold-search' is always bound to nil
3318 while processing the markup rules.
3320 @subheading Publishing order
3322 This is the order that the publishing rules are consulted, by default.
3323 This may be changed by customizing @code{muse-publish-markup-regexps}.
3325 @table @code
3327 @item trailing and leading whitespace
3328 Remove trailing and leading whitespace from a file.
3330 @item directive
3331 @samp{#directive}
3333 This is only recognized at the beginning of a file.
3335 @item comment
3336 @samp{; a commented line}
3338 @item tag
3339 @samp{<tag>}
3341 @item comment
3342 @samp{; comment}
3344 @item explicit links
3345 Prevent emphasis characters in explicit links from being marked up.
3347 Don't actually publish them here, just add a special no-emphasis text
3348 property.
3350 @item word
3351 Whitespace-delimited word, possibly with emphasis characters
3353 This function is responsible for marking up emphasis and escaping some
3354 specials.
3356 @item heading
3357 @samp{** Heading}
3359 Outline-mode style headings.
3361 @item enddots
3362 @samp{....}
3364 These are ellipses with a dot at end.
3366 @item dots
3367 @samp{...}
3369 Ellipses.
3371 @item rule
3372 @samp{----}
3374 Horizontal rule or section separator.
3376 @item no-break-space
3377 @samp{~~}
3379 Prevent lines from being split before or after these characters.
3381 @item line-break
3382 @samp{<br>}
3384 Break a line at point.
3386 @item fn-sep
3387 @samp{Footnotes:}
3389 Beginning of footnotes section.
3391 @item footnote
3392 @samp{[1]}
3394 Footnote definition or reference.  If at beginning of line, it is a
3395 definition.
3397 @item list
3398 @itemize @bullet
3399 @item
3400 @samp{ 1. }
3402 @item
3403 @samp{ - }
3405 @item
3406 @samp{term :: }
3407 @end itemize
3409 Numbered list, item list, or term definition list.
3411 @item table-el
3413 @file{table.el} style tables
3415 @item table
3416 @samp{table | cells}
3418 Muse tables or orgtbl-mode style tables.
3420 @item quote
3421 spaces before beginning of text
3423 Blockquotes.
3425 @item emdash
3426 @samp{--}
3428 2-wide dash
3430 @item verse
3431 @samp{> verse text}
3433 @item anchor
3434 @samp{#anchor}
3436 @item link
3437 @samp{[[explicit][links]]}
3439 @item url
3440 @samp{http://example.com/}
3442 @item email
3443 @samp{bare-email@@example.com}
3445 @end table
3447 @node Markup Strings, Markup Tags, Markup Regexps, Extending Muse
3448 @comment  node-name,  next,  previous,  up
3449 @section Strings specific to a publishing style
3450 @cindex publishing, markup strings
3452 @dfn{Markup strings} are strings used for marking up text for a
3453 particular style.
3455 These cover the most basic kinds of markup, the handling of which
3456 differs little between the various styles.
3458 @subheading Available markup strings
3460 @table @code
3462 @item image-with-desc
3463 An image and a description.
3465 Argument 1: image without extension.  Argument 2: image extension.
3466 Argument 3: description.
3468 @item image
3469 An inlined image.
3471 Argument 1: image without extension.  Argument 2: image extension.
3473 @item image-link
3474 An image with a link around it.
3476 Argument 1: link.  Argument 2: image without extension.
3477 Argument 3: image extension.
3479 @item anchor-ref
3480 A reference to an anchor on the current page.
3482 Argument 1: anchor name.  Argument 2: description if one exists, or the
3483 original link otherwise.
3485 @item url
3486 A URL without a description.
3488 Argument 1: URL.
3490 @item link
3491 A link to a Muse page with a description.
3493 Argument 1: link.  Argument 2: description if one exists, or the
3494 original link otherwise.
3496 @item link-and-anchor
3497 A link to a Muse page with an anchor, and a description.
3499 Argument 1: link.  Argument 2: anchor name.
3500 Argument 3: description if one exists, or the original link otherwise.
3501 Argument 4: link without an extension.
3503 @item email-addr
3504 A link to an email address.
3506 Argument 1: email address.  Argument 2: email address.
3508 @item anchor
3509 An anchor.
3511 Argument 1: name of anchor.
3513 @item emdash
3514 A 2-length dash.
3516 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
3518 @item comment-begin
3519 Beginning of a comment.
3521 @item comment-end
3522 End of a comment.
3524 @item rule
3525 A horizontal line or space.
3527 @item no-break-space
3528 A space that separates two words which are not to be separated.
3530 @item footnote
3531 Beginning of footnote.
3533 @item footnote-end
3534 End of footnote.
3536 @item footnotemark
3537 Mark a reference for the current footnote.
3539 Argument 1: number of this footnote.
3541 @item footnotemark-end
3542 End of a reference for the current footnote.
3544 @item footnotetext
3545 Indicate the text of the current footnote.
3547 Argument 1: number of this footnote.
3549 @item footnotetext-end
3550 End of a footnote text line.
3552 @item fn-sep
3553 Text used to replace ``Footnotes:'' line.
3555 @item dots
3556 3 dots.
3558 @item enddots
3559 4 dots.
3561 @item part
3562 Beginning of a part indicator line.  This is used by book publishing.
3564 @item part-end
3565 End of a part indicator line.  This is used by book publishing.
3567 @item chapter
3568 Beginning of a chapter indicator line.  This is used by book publishing.
3570 @item chapter-end
3571 End of a chapter indicator line.  This is used by book publishing.
3573 @item section
3574 Beginning of level 1 section indicator line.
3576 Argument 1: level of section; always 1.
3578 @item section-end
3579 End of level 1 section indicator line.
3581 Argument 1: level of section; always 1.
3583 @item subsection
3584 Beginning of level 2 section indicator line.
3586 Argument 1: level of section; always 2.
3588 @item subsection-end
3589 End of level 2 section indicator line.
3591 Argument 1: level of section; always 2.
3593 @item subsubsection
3594 Beginning of level 3 section indicator line.
3596 Argument 1: level of section; always 3.
3598 @item subsubsection-end
3599 End of level 3 section indicator line.
3601 Argument 1: level of section; always 3.
3603 @item section-other
3604 Beginning of section indicator line, where level is greater than 3.
3606 Argument 1: level of section.
3608 @item section-other-end
3609 End of section indicator line, where level is greater than 3.
3611 Argument 1: level of section.
3613 @item begin-underline
3614 Beginning of underlined text.
3616 @item end-underline
3617 End of underlined text.
3619 @item begin-literal
3620 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
3621 =teletype text=.
3623 @item end-literal
3624 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
3625 text=.
3627 @item begin-emph
3628 Beginning of the first level of emphasized text.
3630 @item end-emph
3631 End of the first level of emphasized text.
3633 @item begin-more-emph
3634 Beginning of the second level of emphasized text.
3636 @item end-more-emph
3637 End of the second level of emphasized text.
3639 @item begin-most-emph
3640 Beginning of the third (and final) level of emphasized text.
3642 @item end-most-emph
3643 End of the third (and final) level of emphasized text.
3645 @item begin-verse
3646 Beginning of verse text.
3648 @item verse-space
3649 String used to each space that is further indented than the beginning of
3650 the verse.
3652 @item begin-verse-line
3653 Beginning of a line of verse.
3655 @item empty-verse-line
3656 End of a line of verse.
3658 @item begin-last-stanza-line
3659 Beginning of the last line of a verse stanza.
3661 @item end-last-stanza-line
3662 End of the last line of a verse stanza.
3664 @item end-verse
3665 End of verse text.
3667 @item begin-example
3668 Beginning of an example region.  To make use of this, an
3669 @samp{<example>} tag is needed.
3671 @item end-example
3672 End of an example region.  To make use of this, an @samp{</example>} tag
3673 is needed.
3675 @item begin-center
3676 Begin a centered line.
3678 @item end-center
3679 End a centered line.
3681 @item begin-quote
3682 Begin a quoted region.
3684 @item end-quote
3685 End a quoted region.
3687 @item begin-quote-item
3688 Begin a quote paragraph.
3690 @item end-quote-item
3691 End a quote paragraph.
3693 @item begin-uli
3694 Begin an unordered list.
3696 @item end-uli
3697 End an unordered list.
3699 @item begin-uli-item
3700 Begin an unordered list item.
3702 @item end-uli-item
3703 End an unordered list item.
3705 @item begin-oli
3706 Begin an ordered list.
3708 @item end-oli
3709 End an ordered list.
3711 @item begin-oli-item
3712 Begin an ordered list item.
3714 @item end-oli-item
3715 End an ordered list item.
3717 @item begin-dl
3718 Begin a definition list.
3720 @item end-dl
3721 End a definition list.
3723 @item begin-dl-item
3724 Begin a definition list item.
3726 @item end-dl-item
3727 End a definition list item.
3729 @item begin-ddt
3730 Begin a definition list term.
3732 @item end-ddt
3733 End a definition list term.
3735 @item begin-dde
3736 Begin a definition list entry.
3738 @item end-dde
3739 End a definition list entry.
3741 @item begin-table
3742 Begin a table.
3744 @item end-table
3745 End a table.
3747 @item begin-table-group
3748 Begin a table grouping.
3750 @item end-table-group
3751 End a table grouping.
3753 @item begin-table-row
3754 Begin a table row.
3756 @item end-table-row
3757 End a table row.
3759 @item begin-table-entry
3760 Begin a table entry.
3762 @item end-table-entry
3763 End a table entry.
3765 @end table
3767 @node Markup Tags, Style Elements, Markup Strings, Extending Muse
3768 @comment  node-name,  next,  previous,  up
3769 @section Tag specifications for special markup
3770 @cindex publishing, markup tags
3772 @anchor{muse-publish-markup-tags}
3773 @code{muse-publish-markup-tags}
3775 A list of tag specifications, for specially marking up text.
3777 XML-style tags are the best way to add custom markup to Muse.  This is
3778 easily accomplished by customizing this list of markup tags.
3780 For each entry, the name of the tag is given, whether it expects a
3781 closing tag and/or an optional set of attributes, whether it is
3782 nestable, and a function that performs whatever action is desired within
3783 the delimited region.
3785 The tags themselves are deleted during publishing, before the function
3786 is called.  The function is called with three arguments, the beginning
3787 and end of the region surrounded by the tags.  If properties are
3788 allowed, they are passed as a third argument in the form of an alist.
3789 The `end' argument to the function is always a marker.
3791 Point is always at the beginning of the region within the tags, when the
3792 function is called.  Wherever point is when the function finishes is
3793 where tag markup will resume.
3795 These tag rules are processed once at the beginning of markup, and once
3796 at the end, to catch any tags which may have been inserted in-between.
3798 @node Style Elements, Deriving Styles, Markup Tags, Extending Muse
3799 @comment  node-name,  next,  previous,  up
3800 @section Parameters used for defining styles
3801 @cindex publishing, style elements
3803 Style elements are tags that define a style.  Use either
3804 @code{muse-define-style} or @code{muse-derive-style}
3805 (@pxref{Deriving Styles}) to create a new style.
3807 @defun muse-define-style name &rest elements
3808 @end defun
3810 @subheading Usable elements
3812 @table @option
3814 @item :suffix
3815 File extension to use for publishing files with this style.
3817 @item :link-suffix
3818 File extension to use for publishing links to Muse files with this
3819 style.
3821 @item :osuffix
3822 File extension to use for publishing second-stage files with this style.
3824 For example, PDF publishing generates a LaTeX file first, then a PDF
3825 from that LaTeX file.
3827 @item :regexps
3828 List of markup rules for publishing a page with Muse.
3829 @xref{muse-publish-markup-regexps}.
3831 @item :functions
3832 An alist of style types to custom functions for that kind of text.
3833 @xref{muse-publish-markup-functions}.
3835 @item :strings
3836 Strings used for marking up text with this style.
3838 These cover the most basic kinds of markup, the handling of which
3839 differs little between the various styles.
3841 @item :tags
3842 A list of tag specifications, used for handling extra tags.
3843 @xref{muse-publish-markup-tags}.
3845 @item :specials
3846 A table of characters which must be represented specially.
3848 @item :before
3849 A function that is to be executed on the newly-created publishing buffer
3850 (or the current region) before any publishing occurs.
3852 This is used to set extra parameters that direct the publishing process.
3854 @item :before-end
3855 A function that is to be executed on the publishing buffer (or the
3856 current region) immediately after applying all of the markup regexps.
3858 This is used to fix the order of table elements (header, footer, body)
3859 in XML-ish styles.
3861 @item :after
3862 A function that is to be executed on the publishing buffer after
3863 :before-end, and immediately after inserting the header and footer.
3865 This is used for generating the table of contents as well as setting the
3866 file coding system.
3868 @item :final
3869 A function that is to be executed after saving the published file, but
3870 while still in its buffer.
3872 This is used for generating second-stage documents like PDF files from
3873 just-published LaTeX files.
3875 The function must accept three arguments: the name of the muse source
3876 file, the name of the just-published file, and the name of the
3877 second-stage target file.  The name of the second-stage target file is
3878 the same as that of the just-published file if no second-stage
3879 publishing is required.
3881 @item :header
3882 Header used for publishing files of this style.
3884 This may be a variable, text, or a filename.  It is inserted at the
3885 beginning of a file, after evaluating the publishing markup.
3887 @item :footer
3888 Footer used for publishing files of this style.
3890 This may be a variable, text, or a filename.  It is inserted at the end
3891 of a file, after evaluating the publishing markup.
3893 @item :style-sheet
3894 Style sheet used for publishing files of this style.
3896 This may be a variable or text.  It is used in the header of HTML and
3897 XHTML based publishing styles.
3899 @item :browser
3900 The function used to browse the published result of files of this style.
3902 @end table
3904 @node Deriving Styles, , Style Elements, Extending Muse
3905 @comment  node-name,  next,  previous,  up
3906 @section Deriving a new style from an existing one
3907 @cindex publishing styles, deriving
3909 To create a new style from an existing one, use @code{muse-derive-style}
3910 as follows.  This is a good way to fix something you don't like about a
3911 particular publishing style, or to personalize it.
3913 @defun muse-derive-style new-name base-name &rest elements
3914 @end defun
3916 The derived name is a string defining the new style, such as "my-html".
3917 The base name must identify an existing style, such as "html" -- if you
3918 have loaded @file{muse-html}.  The style parameters are the same as
3919 those used to create a style, except that they override whatever
3920 definitions exist in the base style.  However, some definitions only
3921 partially override.  The following parameters support partial
3922 overriding.
3924 @xref{Style Elements}, for a complete list of all parameters.
3926 @table @option
3928 @item :functions
3929 If a markup function is not found in the derived style's function list,
3930 the base style's function list will be queried.
3932 @item :regexps
3933 All regexps in the current style and the base style(s) will be used.
3935 @item :strings
3936 If a markup string is not found in the derived style's string list, the
3937 base style's string list will be queried.
3939 @end table
3941 @node Miscellaneous, Getting Help and Reporting Bugs, Extending Muse, Top
3942 @comment  node-name,  next,  previous,  up
3943 @chapter Miscellaneous add-ons, like a minor mode
3945 @menu
3946 * Muse List Edit Minor Mode::   Edit lists easily in other major modes.
3947 @end menu
3949 @node Muse List Edit Minor Mode, , , Miscellaneous
3950 @comment  node-name,  next,  previous,  up
3951 @section Edit lists easily in other major modes
3952 @cindex muse-list-edit-minor-mode
3954 @code{muse-list-edit-minor-mode} is meant to be used with other major
3955 modes, such as Message (for composing email) and debian-changelog-mode
3956 (for editing debian/changelog files).
3958 It implements practically perfect support for editing and filling lists.
3959 It can even handle nested lists.  In addition to Muse-specific list
3960 items ("-", numbers, definition lists, footnotes), it can also handle
3961 items that begin with "*" or "+".  Filling list items behaves in the
3962 same way that it does in Muse, regardless of whether filladapt is also
3963 enabled, which is the primary reason to use this tool.
3965 @subheading Installation
3967 To use it, add ``(require 'muse-mode)'' to your Emacs customization file
3968 and add the function @code{turn-on-muse-list-edit-minor-mode} to any
3969 mode hooks where you wish to enable this minor mode.
3971 @subheading Keybindings
3973 @code{muse-list-edit-minor-mode} uses the following keybindings.
3975 @table @kbd
3977 @item M-RET (`muse-l-e-m-m-insert-list-item')
3978 Insert a new list item at point, using the indentation level of the
3979 current list item.
3981 @item C-< (`muse-l-e-m-m-decrease-list-item-indent')
3982 Decrease indentation of the current list item.
3984 @item C-> (`muse-l-e-m-m-increase-list-item-indent')
3985 Increase indentation of the current list item.
3987 @end table
3989 @subheading Functions
3991 @defun muse-list-edit-minor-mode
3992 This is a global minor mode for editing files with lists.
3993 It is meant to be used with other major modes, and not with Muse mode.
3995 Interactively, with no prefix argument, toggle the mode.
3996 With universal prefix @var{arg} turn mode on.
3997 With zero or negative @var{arg} turn mode off.
3999 This minor mode provides the Muse keybindings for editing lists,
4000 and support for filling lists properly.
4002 It recognizes not only Muse-style lists, which use the "-"
4003 character or numbers, but also lists that use asterisks or plus
4004 signs.  This should make the minor mode generally useful.
4006 Definition lists and footnotes are also recognized.
4008 Note that list items may omit leading spaces, for compatibility
4009 with modes that set @code{left-margin}, such as
4010 @code{debian-changelog-mode}.
4011 @end defun
4013 @defun turn-on-muse-list-edit-minor-mode
4014 Unconditionally turn on Muse list edit minor mode.
4015 @end defun
4017 @defun turn-off-muse-list-edit-minor-mode
4018 Unconditionally turn off Muse list edit minor mode.
4019 @end defun
4021 @node Getting Help and Reporting Bugs, History, Miscellaneous, Top
4022 @comment  node-name,  next,  previous,  up
4023 @chapter Getting Help and Reporting Bugs
4024 @cindex help, getting
4025 @cindex bugs, reporting
4027 After you have read this guide, if you still have questions about
4028 Muse, or if you have bugs to report, there are several places you can
4031 @itemize @bullet
4033 @item
4034 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
4035 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
4036 to it.
4038 @item
4039 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
4040 that Michael Olson (the current maintainer) made for Muse.
4042 @item
4043 Muse has several different mailing lists.
4045 @table @samp
4047 @item muse-el-announce
4048 Low-traffic list for Muse-related announcements.
4050 You can join this mailing list (@email{muse-el-announce@@gna.org})
4051 using the subscription form at
4052 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
4053 mailing list is also available via Gmane (@url{http://gmane.org/}). The
4054 group is called @samp{gmane.emacs.muse.announce}.
4056 @item muse-el-discuss
4057 Discussion, bugfixes, suggestions, tips, and the like for Muse.
4058 This mailing list also includes the content of muse-el-announce.
4060 You can join this mailing list (@email{muse-el-discuss@@gna.org})
4061 using the subscription form at
4062 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
4063 list is also available via Gmane with the identifier
4064 @samp{gmane.emacs.muse.general}.
4066 @item muse-el-logs
4067 Log messages for commits made to Muse.
4069 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
4070 the subscription form at
4071 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
4072 is also available via Gmane with the identifier
4073 @samp{gmane.emacs.muse.scm}.
4075 @item muse-el-commits
4076 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
4077 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
4078 sent to this list automatically.
4080 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
4081 the subscription form at
4082 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
4083 is also available via Gmane with the identifier
4084 @samp{gmane.emacs.muse.cvs}.
4086 @item muse-el-internationalization
4087 Discussion of translation of the Muse website and documentation into
4088 many languages.
4090 You can join this mailing list
4091 (@email{muse-el-internationalization@@gna.org}) using the subscription
4092 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
4093 mailing list is also available via Gmane with the identifier
4094 @samp{gmane.emacs.muse.internationalization}.
4096 @end table
4098 @item
4099 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
4100 contributors are frequently around and willing to answer your
4101 questions.  The @samp{#muse} channel is also available for
4102 Muse-specific help, and its current maintainer hangs out there.
4104 @item
4105 The maintainer of Emacs Muse, Michael Olson, may be contacted at
4106 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
4107 it is often better to use the muse-el-discuss mailing list.
4109 @end itemize
4111 @node History, Contributors, Getting Help and Reporting Bugs, Top
4112 @comment  node-name,  next,  previous,  up
4113 @chapter History of This Document
4114 @cindex history, of Muse
4116 @itemize
4117 @item 2004
4118 John Wiegley started Muse upon realizing that EmacsWiki had some serious
4119 limitations. Around February 2004, he started making "emacs-wiki version
4120 3.00 APLHA", which eventually became known as Muse.
4122 Most of those who frequent the emacs-wiki mailing list continued to use
4123 emacs-wiki, mainly because Planner hasn't been ported over to it.
4125 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
4126 John Wiegley's request.
4128 @item 2005
4129 Michael Olson overhauled this document and added many new sections in
4130 preparation for the first release of Muse (3.01).
4132 @end itemize
4134 @node Contributors, GNU Free Documentation License, History, Top
4135 @comment  node-name,  next,  previous,  up
4136 @chapter Contributors to This Documentation
4137 @cindex contributors
4139 The first draft of this document was taken from the emacs-wiki texinfo
4140 manual.  Michael Olson adapted it for Muse and added most of its
4141 content.
4143 John Sullivan did a majority of the work on the emacs-wiki texinfo
4144 manual.
4146 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
4147 emacs-wiki texinfo manual.
4150 @node GNU Free Documentation License, Concept Index, Contributors, Top
4151 @appendix GNU Free Documentation License
4152 @include doclicense.texi
4155 @node Concept Index,  , GNU Free Documentation License, Top
4156 @comment  node-name,  next,  previous,  up
4157 @unnumbered Index
4159 @printindex cp
4161 @bye