texi/muse.texi: Update documentation for Ikiwiki.
[muse-el.git] / texi / muse.texi
blob6c85e2433fdc5603535ceb8c8c3f16454dd3e021
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 * Ikiwiki::                     Integrating with ikiwiki.
138 * Journal::                     Keeping a journal or blog.
139 * LaTeX::                       Publishing LaTeX documents.
140 * Poem::                        Publish a poem to LaTeX or PDF.
141 * Texinfo::                     Publish entries to Texinfo format or PDF.
142 * XML::                         Publish entries to XML.
144 Integrating Muse and pyblosxom.cgi
146 * Blosxom Requirements::        Other tools needed for the Blosxom style.
147 * Blosxom Entries::             Format of a Blosxom entry and automation.
148 * Blosxom Options::             Blosxom styles and options provided.
150 Making your own publishing styles
152 * Markup Functions::            Specifying functions to mark up text.
153 * Markup Regexps::              Markup rules for publishing.
154 * Markup Strings::              Strings specific to a publishing style.
155 * Markup Tags::                 Tag specifications for special markup.
156 * Style Elements::              Parameters used for defining styles.
157 * Deriving Styles::             Deriving a new style from an existing
158                                   one.
160 Miscellaneous add-ons, like a minor mode
162 * Muse List Edit Minor Mode::   Edit lists easily in other major modes.
164 @end detailmenu
165 @end menu
167 @node Preface, Introduction, Top, Top
168 @comment  node-name,  next,  previous,  up
169 @chapter About the documentation
171 This document describes Muse, which was written by John Wiegley and is
172 now maintained by Michael Olson.  Several versions of this manual are
173 available on-line.
175 @itemize @bullet
176 @item PDF: http://mwolson.org/static/doc/muse.pdf
177 @item HTML (single file): http://mwolson.org/static/doc/muse.html
178 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
179 @end itemize
181 @node Introduction, Obtaining Muse, Preface, Top
182 @comment  node-name,  next,  previous,  up
183 @chapter What is Muse?
185 Emacs Muse (also known as ``Muse'' or ``Emacs-Muse'') is an authoring
186 and publishing environment for Emacs.  It simplifies the process of
187 writing documents and publishing them to various output formats.
189 Muse consists of two main parts: an enhanced text-mode for authoring
190 documents and navigating within Muse projects, and a set of publishing
191 styles for generating different kinds of output.
193 What makes Muse distinct from other text-publishing systems is a modular
194 environment, with a rather simple core, in which "styles" are derived
195 from to create new styles.  Much of Muse's overall functionality is
196 optional.  For example, you can use the publisher without the
197 major-mode, or the mode without doing any publishing; or if you don't
198 load the Texinfo or LaTeX modules, those styles won't be available.
200 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
201 code has been restructured and rewritten, especially its publishing
202 functions.  The focus in this revision is on the authoring and
203 publishing aspects, and the "wikiness" has been removed as a default
204 behavior (available in the optional @file{muse-wiki} module).  CamelCase
205 words are no longer special by default.
207 One of the principal aims in the development of Muse is to make it very
208 easy to produce good-looking, standards-compliant documents.
210 @node Obtaining Muse, Installation, Introduction, Top
211 @comment  node-name,  next,  previous,  up
212 @chapter How to Get Muse Releases and Development Changes
214 @menu
215 * Releases::                    Released versions of Muse.
216 * Development::                 Latest unreleased development changes.
217 @end menu
219 @node Releases, Development, Obtaining Muse, Obtaining Muse
220 @comment  node-name,  next,  previous,  up
221 @section Released versions of Muse
223 Choose to install a release if you want to minimize risk.
225 Errors are corrected in development first.  User-visible changes will be
226 announced on the @email{muse-el-discuss@@gna.org} mailing list.
227 @xref{Getting Help and Reporting Bugs}.
229 @cindex releases, Debian package
230 @cindex Debian package for Muse
231 Debian users can get Muse via apt-get.  The @file{muse-el} package is
232 available both at Michael Olson's APT repository and the official Debian
233 repository.  To make use of the former, add the following line to your
234 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
236 @example
237 deb http://mwolson.org/debian/ ./
238 @end example
240 @cindex releases, Ubuntu package
241 @cindex Ubuntu package for Muse
242 Ubuntu users can also get Muse via apt-get.  The @file{muse-el} package
243 is available both at Michael Olson's APT repository and the official
244 Ubuntu repository.  To make use of the former, add the following line to
245 your @file{/etc/apt/sources.list} file and run @code{apt-get install
246 muse}.
248 @example
249 deb http://mwolson.org/ubuntu/ ./
250 @end example
252 The reason for making separate Debian and Ubuntu packages is that this
253 manual is under the GFDL, and Debian will not allow it to be distributed
254 in its main repository.  Ubuntu, on the other hand, permits this manual
255 to be included with the @file{muse-el} package.
257 @cindex releases, from source
258 Alternatively, you can download the latest release from
259 @uref{http://download.gna.org/muse-el/} .
261 @node Development,  , Releases, Obtaining Muse
262 @comment  node-name,  next,  previous,  up
263 @section Latest unreleased development changes
264 @cindex development
266 Choose the development version if you want to live on the bleeding edge
267 of Muse development or try out new features before release.
269 @cindex git version control system, using
270 The git version control system allows you to keep up-to-date with the
271 latest changes to the development version of Muse.  It also allows you
272 to contribute changes (via commits, if you are have developer access to
273 the repository, or via patches, otherwise).  If you would like to
274 contribute to Muse development, it is highly recommended that you use
275 git.
277 If you are new to git, you might find this tutorial helpful:
278 @uref{http://www.kernel.org/pub/software/scm/git/docs/tutorial.html}.
280 Downloading the Muse module with git and staying up-to-date involves
281 the following steps.
283 @enumerate
284 @item Install git.
286 @itemize @bullet
287 @item Debian and Ubuntu: @kbd{apt-get install git-core}.
288 @item Windows: @uref{http://git.or.cz/gitwiki/WindowsInstall}.
289 @item Other operating systems: download, compile, and install the source
290 from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
291 package for your operating system.
292 @end itemize
294 @item Download the Muse development branch.
296 If you have developer access to Muse, do:
298 @example
299 git clone ssh://repo.or.cz/srv/git/muse-el.git muse
300 @end example
302 otherwise, do:
304 @example
305 git clone git://repo.or.cz/muse-el.git muse
306 @end example
308 If you are behind a restrictive firewall, and do not have developer
309 access, then do the following instead:
311 @example
312 git clone http://repo.or.cz/r/muse-el.git muse
313 @end example
315 @item List upstream changes that are missing from your local copy.
316 Do this whenever you want to see whether new changes have been committed
317 to Muse.  If you wish, you may skip this step and proceed directly to
318 the ``update'' step.
320 @example
321 # Change to the source directory you are interested in.
322 cd muse
324 # Fetch new changes from the repository, but don't apply them yet
325 git fetch origin
327 # Display log messages for the new changes
328 git log HEAD..origin
329 @end example
331 ``origin'' is git's name for the location where you originally got Muse
332 from.  You can change this location at any time by editing the
333 @file{.git/config} file in the directory where the Muse source was
334 placed.
336 @cindex updating Muse with git
337 @item Update to the latest version by pulling in any missing changes.
339 @example
340 cd muse
341 git pull origin
342 @end example
344 git will show how many files changed, and will provide a visual display
345 for how many lines were changed in each file.
347 @end enumerate
349 There are other ways to interact with the Muse repository.
351 @itemize
352 @item Browse git repo: @uref{http://repo.or.cz/w/muse-el.git}
353 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
354 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
355 @end itemize
357 The latest development snapshot can lag behind the git repo by as much
358 as 20 minutes, but never more than that.
360 @subheading Becoming a Muse developer
361 @cindex developer, becoming
363 If you want commit access to the shared Muse repository, then register
364 an account at @uref{http://repo.or.cz} (be sure to add an SSH key), and
365 contact the current maintainer at @email{mwolson@@gnu.org}.  It would be
366 best to send some patches to the @email{muse-el-discuss@@gna.org}
367 mailing list first, so that he knows that you know what you are doing.
368 @xref{Getting Help and Reporting Bugs}, for instructions on subscribing
369 to the mailing list.
371 You must also be willing to sign a copyright assignment for your changes
372 to Muse, since Muse is a GNU project.  The current maintainer will
373 assist you in this process if you contact him.
375 For information on committing changes to Muse and performing
376 development, please consult
377 @uref{http://emacswiki.org/cgi-bin/wiki/MuseDevelopment}.
379 @node Installation, Getting Started, Obtaining Muse, Top
380 @comment  node-name,  next,  previous,  up
381 @chapter Compiling and Installing Muse
383 Muse may be compiled and installed on your machine.
385 @subheading Compilation
386 @cindex compiling Muse
388 This is an optional step, since Emacs Lisp source code does not
389 necessarily have to be byte-compiled.  Byte-compilation may yield a very
390 slight speed increase.
392 A working copy of Emacs or XEmacs is needed in order to compile Emacs
393 Muse.  By default, the program that is installed with the name
394 @command{emacs} will be used.
396 If you want to use the @command{xemacs} binary to perform the
397 compilation, you must copy @file{Makefile.defs.default} to
398 @file{Makefile.defs} in the top-level directory, and then edit
399 @file{Makefile.defs} as follows.  You can put either a full path to an
400 Emacs or XEmacs binary or just the command name, as long as it is in the
401 @env{PATH}.
403 @example
404 EMACS    = xemacs
405 SITEFLAG = -no-site-file
406 # Edit the section as necessary
407 install_info = install-info --section "XEmacs 21.4" $(1).info \
408         $(INFODIR)/dir || :
409 @end example
411 Running @code{make} in the top-level directory should compile the Muse
412 source files in the @file{lisp} directory, and generate an autoloads
413 file in @file{lisp/muse-autoloads.el}.
415 @subheading Installation
416 @cindex installing Muse
418 Muse may be installed into your file hierarchy by doing the following.
420 Copy @file{Makefile.defs.default} to @file{Makefile.defs} in the
421 top-level directory, if you haven't done so already.  Then edit the
422 @file{Makefile.defs} file so that @env{ELISPDIR} points to where you
423 want the source and compiled Muse files to be installed and
424 @env{INFODIR} indicates where to put the Muse manual.  You may use a
425 combination of @env{DESTDIR} and @env{PREFIX} to further determine where
426 the installed files should be placed.  As mentioned earlier, you will
427 want to edit @env{EMACS} and @env{SITEFLAG} as shown in the Compilation
428 section if you are using XEmacs.
430 If you are installing Muse on a Debian or Ubuntu system, you might want
431 to change the value of @env{INSTALLINFO} as specified in
432 @file{Makefile.defs}.
434 If you wish to install Muse to different locations than the defaults
435 specify, edit @file{Makefile.defs} accordingly.
437 Run @code{make} as a normal user, if you haven't done so already.
439 Run @code{make install} as the root user if you have chosen installation
440 locations that require root permissions.
442 @subheading ELPA
443 @cindex ELPA package for Muse
445 For those used to installing software packages, there will be a
446 @code{muse} package available in the Emacs Lisp Package Archive
447 (abbreviated ``ELPA'') as of the 3.10 release of Muse.  This package
448 will be compiled and installed automatically in a user-specific
449 location.  For more information on ELPA, see
450 @uref{http://tromey.com/elpa/}.
452 @node Getting Started, Projects, Installation, Top
453 @comment  node-name,  next,  previous,  up
454 @chapter Getting Started
455 @cindex settings
457 @menu
458 * Loading Muse::                How to load Muse.
459 * Using Muse Mode::             How to edit files in Muse.
460 * Publishing Files Overview::   Publishing a single file or project.
461 * File Extensions::             Using a different file extension.
462 @end menu
464 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
465 @comment  node-name,  next,  previous,  up
466 @section How to Load Muse
467 @cindex settings, init file
469 To use Muse, add the directory containing its files to your
470 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
471 the authoring mode, and the styles you wish to publish to.  An example
472 follows.
474 @lisp
475 (add-to-list 'load-path "<path to Muse>")
477 (require 'muse-mode)     ; load authoring mode
479 (require 'muse-html)     ; load publishing styles I use
480 (require 'muse-latex)
481 (require 'muse-texinfo)
482 (require 'muse-docbook)
484 (require 'muse-project)  ; publish files in projects
485 @end lisp
487 An easy way of seeing which settings are available and changing settings
488 is to use the Muse customization interface.  To do this, type
489 @kbd{M-x customize-group muse RET}.  Each of the options has its own
490 documentation.  Options are grouped logically according to what effect
491 they have.
493 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
494 @comment  node-name,  next,  previous,  up
495 @section How to Edit Files in Muse
496 @cindex editing Muse files
498 Muse Mode should automatically be activated when you visit a file with a
499 ``.muse'' extension.  One such file is @file{QuickStart.muse}, which is
500 available in the @file{examples} directory of the Muse distribution.
501 You can tell that Muse Mose has been activated by checking for the text
502 ``Muse'' in your mode line.  If Muse Mode has not been activated, you
503 may activate it by type @kbd{M-x muse-mode RET}.
505 You will notice that Muse files are highlighted very simply.  Links are
506 colored blue, headings are large and bold text, and @verb{|<example>|}
507 tags are colored in grey.
509 There are several different ways to edit things like links, which hide
510 the underlying Muse markup.  One way is to toggle font-locking off by
511 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
512 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
513 on.  Another way is just to move into the text and edit it.  Markup can
514 also be removed by normal deletion methods, though some side effects
515 might require a second deletion.
517 For the particular case of editing links, it is easiest to move to the
518 link and do @kbd{C-c C-e}, which is also @kbd{M-x
519 muse-edit-link-at-point}.  This prompts you for the link and its
520 description, using the previous contents of the link as initial values.
521 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
522 A link to a URL may be created by hitting @kbd{C-c TAB u}.  Links may be
523 followed by hitting @kbd{RET} on them.
525 If you want to add a new list item, this may by accomplished by hitting
526 @kbd{M-RET}.  This will put a dash and some spaces on the screen.  The
527 dash is the Muse markup that indicates a list item.  It is also possible
528 to created ``nested'' lists with this command, by adjusting the number
529 of spaces in front of the dashes.  If you have lists with long lines,
530 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
531 lines.
533 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
534 @comment  node-name,  next,  previous,  up
535 @section Publishing a Single File or Project
536 @cindex editing Muse files
538 The command @kbd{M-x muse-project-publish-this-file} will publish the
539 current document to any available publishing style (a publishing style
540 is an output format, like HTML or Docbook), placing the output in the
541 current directory.  If you are in Muse Mode, this command will be bound
542 to @kbd{C-c C-t}.  If the file has been published recently, and its
543 contents have not changed, running @kbd{C-c C-t} again will not publish
544 the file.  To force publishing in this case, do @kbd{C-u C-c C-t}.
546 If you have set up projects and are visiting a file that is part of a
547 project, then @kbd{C-c C-t} will restrict the output formats to those
548 which are used by the project, and will automatically publish to the
549 output directory defined by the project.  If you want to publish to a
550 different directory or use a different format, then use @kbd{C-c M-C-t},
551 which is also @kbd{M-x muse-publish-this-file}.
553 If the currently opened file is part of a defined project in
554 @code{muse-project-alist}, it (and the rest of the changed files in a
555 project) may be published using @kbd{C-c C-p}.
557 @node File Extensions, , Publishing Files Overview, Getting Started
558 @comment  node-name,  next,  previous,  up
559 @section Using a Different File Extension
560 @cindex file extension, specifying
562 By default, Muse expects all project files to have the file extension
563 @file{.muse}. Files without this extension will not be associated with
564 Muse mode and will not be considered part of any project, even if they
565 are within a project directory.
567 If you don't want to use @file{.muse}, you can customize the extension
568 by setting the value of @code{muse-file-extension}.
570 If you don't want to use any extension at all, and want Muse to
571 autodetect project files based on their location, then add the following
572 to your Muse settings file.
574 @lisp
575 (setq muse-file-extension nil
576       muse-mode-auto-p t)
577 @end lisp
579 Note that if you chose to have @code{muse-file-extension} set to
580 @code{nil}, you may have trouble if your @file{.emacs} file or other
581 init scripts attempt to visit a Muse file.  (A very common example of
582 this is if you use Planner with Muse and run @code{(plan)} from your
583 @file{.emacs}.)  If you wish to visit Muse files from your
584 @file{.emacs}, be sure to also add the following additional code before
585 any such visits happen:
587 @lisp
588 (add-hook 'find-file-hooks 'muse-mode-maybe)
589 @end lisp
592 @node Projects, Keystroke Summary, Getting Started, Top
593 @comment  node-name,  next,  previous,  up
594 @chapter Creating and Managing Muse Projects
595 @cindex projects
597 Often you will want to publish all the files within a directory to a
598 particular set of output styles automatically.  To support, Muse
599 allows for the creation of "projects".
601 @menu
602 * Single Project::              A single-project example.
603 * Multiple Projects::           A multiple-project example.
604 * Projects and Subdirectories::  Publishing subdirectories in projects.
605 * Options for Projects::        Listing of available options for projects.
606 @end menu
608 @node Single Project, Multiple Projects, Projects, Projects
609 @comment  node-name,  next,  previous,  up
610 @section A Single-Project Example
611 @cindex projects, single
613 Here is a sample project, which may be defined in your @file{.emacs}
614 file.
616 @lisp
617 (setq muse-project-alist
618       '(("Website" ("~/Pages" :default "index")
619          (:base "html" :path "~/public_html")
620          (:base "pdf" :path "~/public_html/pdf"))))
621 @end lisp
623 The above defines a project named "website", whose files are located
624 in the directory @file{~/Pages}.  The default page to visit is
625 @file{index}.  When this project is published, each page will be
626 output as HTML to the directory @file{~/public_html}, and as PDF to
627 the directory @file{~/public_html/pdf}.  Within any project page, you
628 may create a link to other pages using the syntax @samp{[[pagename]]}.
630 If you would like to include only some files from a directory in a Muse
631 project, you may use a regexp in place of @file{~/Pages} in the example.
633 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
634 @comment  node-name,  next,  previous,  up
635 @section A Multiple-Project Example
636 @cindex projects, multiple
638 It is possible to specify multiple projects.  Here is an example of
639 three projects: a generic website, a projects area, and a day-planner
640 (the day-planner part requires Planner Mode---see
641 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
643 @lisp
644 (setq muse-project-alist
645       '(("Website" ("~/Pages" :default "index")
646          (:base "html" :path "~/public_html"))
647         (("Projects" ("~/Projects" :default "index")
648          (:base "xhtml"
649                 :path "~/public_html/projects"
650                 :exclude "/TopSecret")
651          (:base "pdf"
652                 :path "~/public_html/projects/pdf"
653                 :exclude "/TopSecret")))
654         ("Plans" ("~/Plans"
655                   :default "TaskPool"
656                   :major-mode planner-mode
657                   :visit-link planner-visit-link)
658          (:base "planner-xhtml"
659                 :path "~/public_html/plans"))))
660 @end lisp
662 The @option{:major-mode} attribute specifies which major to use when
663 visiting files in this directory.
665 The @option{:visit-link} attribute specifies the function to call when
666 visiting links.
668 The @option{:exclude} attribute has a regexp that matches files to never
669 publish.
671 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
672 @comment  node-name,  next,  previous,  up
673 @section Publishing Subdirectories in Projects
674 @cindex projects, subdirectories
676 If you want to publish a directory and all of its subdirectories, Muse
677 provides two convenience functions that together generate the proper
678 rules for you.  Note that we use the backtick to begin this
679 muse-project-alist definition, rather than a single quote.
681 @lisp
682 (setq muse-project-alist
683       `(("Website" ("~/Pages" :default "index")
684          (:base "html" :path "~/public_html"))
685         ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
686                  :default "index")
687          ;; Publish this directory and its subdirectories.  Arguments
688          ;; are as follows.  The above `muse-project-alist-dirs' part
689          ;; is also needed.
690          ;;   1. Source directory
691          ;;   2. Output directory
692          ;;   3. Publishing style
693          ;;   remainder: Other things to put in every generated style
694          ,@@(muse-project-alist-styles "~/Blog"
695                                       "~/public_html/blog"
696                                       "blosxom"))))
697 @end lisp
699 The @code{muse-project-alist-dirs} function takes a directory and
700 returns it and all of its subdirectories in a list.
702 The @code{muse-project-alist-styles} function is explained by the
703 comments above.
705 The ``blosxom'' text is the name of another publishing style, much like
706 ``html''.  @xref{Blosxom}, for further information about it.  You can
707 use any publishing style you like for the third argument to
708 @code{muse-project-alist-styles}.
710 @node Options for Projects, , Projects and Subdirectories, Projects
711 @comment  node-name,  next,  previous,  up
712 @section Listing of Available Options for Projects
713 @cindex projects, options
714 @cindex muse-project-alist, reference
716 This is a listing of all of the various options (or, more accurately:
717 attributes) that may be specified in @code{muse-project-alist}.
719 Each muse-project-alist entry looks like this:
721 @example
722   (PROJECT-NAME (SOURCES)
723     OUTPUTS)
724 @end example
726 We refer to these names below.
728 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
729 The first value is a keyword, like @option{:default}.  The second part
730 is the value associated with that keyword, such as the text ``index''.
731 If you are familiar with Emacs Lisp property lists, the concept is
732 similar to that, except that in the SOURCES section, single directories
733 can be interspersed with two-value attributes.
735 @subheading Project Name
737 This is a string that indicates the name of the project.  It is
738 primarily used for publishing interwiki links with the
739 @file{muse-wiki.el} module.
741 @subheading Sources
743 This part of a muse-project-alist entry consists of two-value
744 attributes, and also directory names.  If you are publishing a book, the
745 order of directories and attributes is significant.
747 The minimal content for the sources section is a list of directories.
749 @table @option
751 @item :book-chapter
752 Indicates a new chapter of a book.  The text of the title of the chapter
753 comes immediately after this keyword.
755 @item :book-end
756 Indicates the end of a book.  Directories listed after this one are
757 ignored when publishing a book.  The value ``t'' (without quotes) should
758 come immediately after this keyword.
760 @item :book-funcall
761 A function to call while publishing a book.  This is useful for doing
762 something just after a particular chapter.
764 @item :book-part
765 Indicates the beginning of a new part of the book.  The text of the
766 title should come immediately after this keyword.
768 @item :book-style
769 Indicate a particular publishing style to use for this part of the book.
770 If this is specified, it should come just after a @option{:part}
771 attribute.
773 @item :default
774 The default page to visit when browsing a project.  Also, if you are
775 using the @file{muse-wiki.el} module, publishing a link to just a
776 project's name will cause it to link to this default file.
778 @item :force-publish
779 This specifies a list of pages which should be published every time a
780 project is published (by using @kbd{C-c C-p}, for example), regardless
781 of whether their contents have changed.  This is useful for updating
782 Index pages, pages that use the @verb{|<include>|} tag, and other pages
783 that have dynamically-generated content.
785 @item :major-mode
786 This specifies the major mode to use when visiting files in this
787 project.  The default is @code{muse-mode}.
789 @item :nochapters
790 This indicates that while publishing a book, do not automatically create
791 chapters.  Values which may follow this are nil (the default, which
792 means that we automatically create chapters), or non-nil, which means
793 that we manually specify chapters with the @option{:book-chapter}
794 attribute,
796 @item :publish-project
797 Indicates which function we should call when publishing a project.
799 @item :set
800 This specifies a list of variables and values to set when publishing a
801 project.  The list should be a property list, which is in the form:
803 @example
804 (VAR1 VALUE1 VAR2 VALUE2 ...)
805 @end example
807 @item :visit-link
808 Specifies the function to call when visiting a link.  The default is
809 @code{muse-visit-link-default}.  The arguments for that function should
810 be (1) the link and (2) whether to visit the link in a new window.
812 @end table
814 @subheading Outputs
816 This part of a muse-project-alist entry is composed of lists of
817 attributes.  Each list is called an ``output style''.
819 The minimal content for an output style is a @option{:base} attribute
820 and a @option{:path} attribute.
822 @table @option
824 @item :base
825 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
827 @item :base-url
828 An external URL which can be used to access published files.  This is
829 mainly used by the @file{muse-wiki} module when publishing links between
830 two separate projects, if the projects are served on different domains.
832 It is also used by the @file{muse-journal} module to create the RSS or
833 RDF output.
835 @item :exclude
836 Exclude items matching a regexp from being published.  The regexp should
837 usually begin with "/".
839 @item :include
840 Only include items matching a regexp when publishing.  The regexp should
841 usually begin with "/".
843 @item :path
844 The directory in which to store published files.
846 @item :timestamps
847 A file containing the timestamps (that is, time of creation) for files
848 in this project.  It might eventually used by the @file{muse-blosxom}
849 module, but this option is not currently in use by any Muse code.
851 @end table
854 @node Keystroke Summary, Markup Rules, Projects, Top
855 @comment  node-name,  next,  previous,  up
856 @chapter Keys Used in Muse Mode
857 @cindex keystrokes
859 This is a summary of keystrokes available in every Muse buffer.
861 @table @kbd
863 @item C-c C-a (`muse-index')
864 Display an index of all known Muse pages.
866 @item C-c C-b (`muse-find-backlinks')
867 Find all pages that link to this page.
869 @item C-c C-e (`muse-edit-link-at-point')
870 Edit link at point.
872 @item C-c C-f (`muse-project-find-file')
873 Open another Muse page.  Prompt for the name.
875 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
876 Insert a link to a file interactively.
878 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
879 Insert a tag interactively.
881 @item C-c C-i u, C-c TAB u (`muse-insert-url')
882 Insert a URL interactively.
884 @item C-c C-l (`font-lock-mode')
885 Toggle font lock / highlighting for the current buffer.
887 @item C-c C-p (`muse-project-publish')
888 Publish any Muse pages that have changed.
890 @item C-c C-s (`muse-search')
891 Find text in all files of the current project.
893 @item C-c C-t (`muse-project-publish-this-file')
894 Publish the currently-visited file.  Prompt for the style if the current
895 file can be published using more than one style.
897 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
898 Publish the currently-visited file.  Prompt for both the style and
899 output directory.
901 @item C-c C-v (`muse-browse-result')
902 Show the published result of this page.
904 @item C-c = (`muse-what-changed')
905 Diff this page against the last backup version.
907 @item TAB
908 Move to the next Wiki reference.
910 @item S-TAB
911 Move to the previous Wiki reference.
913 @item M-TAB
914 Complete the name of a page from the current project at point.
916 @item M-RET
917 Insert a new list item at point, indenting properly.
919 @item C-<
920 Decrease the indentation of the list item at point.
922 @item C->
923 Increase the indentation of the list item at point.
925 @item M-x muse-colors-toggle-inline-images RET
926 Toggle display of inlined images on/off.
928 @item M-x muse-update-values RET
929 Update various values that are automatically generated.
931 Call this after changing @code{muse-project-alist}.
932 @end table
935 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
936 @comment  node-name,  next,  previous,  up
937 @chapter Rules for Using Markup
938 @cindex markup
940 A Muse document uses special, contextual markup rules to determine how
941 to format the output result.  For example, if a paragraph is indented,
942 Muse assumes it should be quoted.
944 There are not too many markup rules, and all of them strive to be as
945 simple as possible so that you can focus on document creation, rather
946 than formatting.
948 @menu
949 * Paragraphs::                  Paragraphs: centering and quoting.
950 * Headings::                    Levels of headings.
951 * Directives::                  Directives at the beginning of a
952                                   document.
953 * Emphasizing Text::            Bold, italicized, and underlined text.
954 * Footnotes::                   Making notes to be shown at the end.
955 * Verse::                       Indicating poetic stanzas.
956 * Lists::                       Lists of items.
957 * Tables::                      Generation of data tables.
958 * Explicit Links::              Hyperlinks and email addresses with
959                                   descriptions.
960 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
961                                   links.
962 * Images::                      Publishing and displaying images.
963 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
964 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
965                                   for extensibility.
966 * Citations::                   Support for citing other resources.
967 * Comments::                    Lines to omit from published output.
968 * Tag Summary::                 Tags that Muse recognizes.
969 @end menu
971 @node Paragraphs, Headings, Markup Rules, Markup Rules
972 @comment  node-name,  next,  previous,  up
973 @section Paragraphs: centering and quoting
974 @cindex paragraphs
976 Paragraphs in Muse must be separated by a blank line.
978 @cindex paragraphs, centered
979 @subheading Centered paragraphs and quotations
981 A line that begins with six or more columns of whitespace (either tabs
982 or spaces) indicates a centered paragraph.  Alternatively, you can use
983 the @verb{|<center>|} tag to surround regions that are to be published
984 as centered paragraphs.
986 @cindex paragraphs, quoted
987 @cindex quotations
988 But if a line begins with whitespace, though less than six columns, it
989 indicates a quoted paragraph.  Alternatively, you can use the
990 @verb{|<quote>|} tag to surround regions that are to be published as
991 quoted paragraphs.
993 @cindex examples
994 @cindex monospace, rendering blocks
995 @cindex HTML, rendering blocks in monospace
996 @subheading Literal paragraphs
998 The @verb{|<example>|} tag is used for examples, where whitespace should
999 be preserved, the text rendered in monospace, and any characters special
1000 to the output style escaped.
1002 @cindex literal text
1003 @cindex HTML, inserting a raw block
1004 There is also the @verb{|<literal>|} tag, which causes a marked block to
1005 be entirely left alone.  This can be used for inserting a hand-coded
1006 HTML blocks into HTML output, for example.
1008 If you want some text to only be inserted when publishing to a
1009 particular publishing style, use the @option{style} attribute for the
1010 @verb{|<literal>|} tag.  An example follows.
1012 @example
1013 <literal style="latex">
1014 A LaTeX-based style was used in the publishing of this document.
1015 </literal>
1016 @end example
1018 This will leave the region alone if the current publishing style is
1019 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
1020 otherwise.  It is also possible to leave the text alone only for one
1021 particular style, rather than its derivations, by adding
1022 @code{exact="t"} to the tag.
1024 @cindex line breaks
1025 @subheading Line breaks
1027 If you need a line break, then use the @samp{<br>} tag.  Most of the
1028 time this tag is unnecessary, because Muse will automatically detect
1029 paragraphs by means of blank lines.  If you want to preserve newlines in
1030 several lines of text, then use verse markup instead (@pxref{Verse}).
1032 @node Headings, Directives, Paragraphs, Markup Rules
1033 @comment  node-name,  next,  previous,  up
1034 @section Levels of headings
1035 @cindex headings
1037 A heading becomes a chapter or section in printed output -- depending on
1038 the style.  To indicate a heading, start a new paragraph with one or
1039 more asterices, followed by a space and the heading title.  Then begin
1040 another paragraph to enter the text for that section.
1042 All levels of headings will be published.  Most publishing styles only
1043 distinguish the between the first 4 levels, however.
1045 @example
1046 * First level
1048 ** Second level
1050 *** Third level
1052 **** Fourth level
1053 @end example
1055 @node Directives, Emphasizing Text, Headings, Markup Rules
1056 @comment  node-name,  next,  previous,  up
1057 @section Directives at the beginning of a document
1058 @cindex directives
1060 Directives are lines beginning with the @samp{#} character that come
1061 before any paragraphs or sections in the document.  Directives are of
1062 the form ``#directive content of directive''.  You can use any
1063 combination of uppercase and lowercase letters for directives, even if
1064 the directive is not in the list below.
1066 The @code{muse-publishing-directive} function may be used in header and
1067 footer text to access directives.  For example, to access the
1068 @code{#title} directive, use @code{(muse-publishing-directive "title")}.
1070 The following is a list of directives that Muse uses.
1072 @table @code
1073 @cindex #author
1074 @item #author
1075 The author of this document.
1077 If this is not specified, Muse will attempt to figure it out from the
1078 @code{user-full-name} variable.
1080 @cindex #date
1081 @item #date
1082 The date that the document was last modified.
1084 This is used by publishing styles that are able to embed the date
1085 information.
1087 @cindex #desc
1088 @item #desc
1089 A short description of this document.
1091 This is used by the @code{journal} publishing style to embed information
1092 inside of an RSS/RDF feed.
1094 @cindex #title
1095 @item #title
1096 The title of this document.
1098 If this is not specified, the name of the file is used.
1100 @end table
1102 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1103 @comment  node-name,  next,  previous,  up
1104 @section Bold, italicized, and underlined text
1105 @cindex emphasizing text
1106 @cindex underlining text
1107 @cindex italicizing text
1108 @cindex verbatim text
1109 @cindex monospace, rendering words
1111 To emphasize text, surround it with certain specially recognized
1112 characters.
1114 @example
1115 *emphasis*
1116 **strong emphasis**
1117 ***very strong emphasis***
1118 _underlined_
1119 =verbatim and monospace=
1120 @end example
1122 @cindex WYSIWYG
1123 While editing a Muse document in Muse mode, these forms of emphasis will
1124 be highlighted in a WYSIWYG manner.  Each of these forms may span
1125 multiple lines.
1127 Verbatim text will be colored as gray by default.  To change this,
1128 customize @code{muse-verbatim-face}.
1130 You can also use the @verb{|<code>|} tag to indicate verbatim and
1131 monospace text.  This is handy for regions that have an ``='' in them.
1133 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1134 @comment  node-name,  next,  previous,  up
1135 @section Making notes to be shown at the end
1136 @cindex footnotes
1138 A footnote reference is simply a number in square brackets.  To define
1139 the footnote, place this definition at the bottom of your file.
1140 @samp{footnote-mode} can be used to greatly facilitate the creation of
1141 these kinds of footnotes.
1143 Footnotes are defined by the same number in brackets occurring at the
1144 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
1145 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
1146 the point of insertion.
1148 @node Verse, Lists, Footnotes, Markup Rules
1149 @comment  node-name,  next,  previous,  up
1150 @section Indicating poetic stanzas
1151 @cindex verses
1152 @cindex poetry
1154 Poetry requires that whitespace be preserved, but without resorting to
1155 monospace.  To indicate this, use the following markup, reminiscent of
1156 email quotations.
1158 @example
1159 > A line of Emacs verse;
1160 >   forgive its being so terse.
1161 @end example
1163 You can also use the @verb{|<verse>|} tag, if you prefer.
1165 @example
1166 <verse>
1167 A line of Emacs verse;
1168   forgive its being so terse.
1169 </verse>
1170 @end example
1172 @cindex verses, multiple stanzas
1173 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1174 follows.
1176 @example
1177 <verse>
1178 A line of Emacs verse;
1179   forgive its being so terse.
1181 In terms of terse verse,
1182   you could do worse.
1183 </verse>
1184 @end example
1186 @node Lists, Tables, Verse, Markup Rules
1187 @comment  node-name,  next,  previous,  up
1188 @section Lists of items
1189 @cindex lists
1191 Lists are given using special characters at the beginning of a line.
1192 Whitespace must occur before bullets or numbered items, to distinguish
1193 from the possibility of those characters occurring in a real sentence.
1195 @cindex lists, bullets
1196 These are rendered as a bullet list.
1198 @example
1199 Normal text.
1201  - bullet item one
1202  - bullet item two
1203 @end example
1205 @cindex lists, enumerated
1206 An enumerated list follows.
1208 @example
1209 Normal text.
1211  1. Enum item one
1212  2. Enum item two
1213 @end example
1215 @cindex lists, definitions
1216 Here is a definition list.
1218 @example
1219 Term1 ::
1220   This is a first definition
1221   And it has two lines;
1222   no, make that three.
1224 Term2 :: This is a second definition
1225 @end example
1227 @subheading Nested lists
1229 @cindex lists, nested
1230 It is possible to nest lists of the same or different kinds.  The
1231 ``level'' of the list is determined by the amount of initial whitespace.
1233 @example
1234 Normal text.
1236  - Level 1, bullet item one
1237    1. Level 2, enum item one
1238    2. Level 2, enum item two
1239  - Level 1, bullet item two
1240    1. Level 2, enum item three
1241    2. Level 2, enum item four
1242       term :: definition
1243 @end example
1245 @subheading Breaking list items
1247 @cindex lists, breaking lines
1248 If you want to break up a line within any list type, just put one blank
1249 line between the end of the previous line and the beginning of the next
1250 line, using the same amount of initial indentation.
1252 @example
1253  - bullet item 1, line 1
1255    bullet item 1, line 2
1257    1. Enum line 1
1259       Enum line 2
1261  - bullet item 2, line 1
1263    bullet item 2, line 2
1264 @end example
1266 @node Tables, Explicit Links, Lists, Markup Rules
1267 @comment  node-name,  next,  previous,  up
1268 @section Generation of data tables
1269 @cindex tables
1271 @cindex tables, simple
1272 Only very simple tables are supported.  The syntax is as follows.
1274 @example
1275 Double bars  || Separate header fields
1277 Single bars   | Separate body fields
1278 Here are more | body fields
1280 Triple bars ||| Separate footer fields
1281 @end example
1283 Some publishing styles require header fields to come first, then footer
1284 fields, and then the body fields.  You can use any order for these
1285 sections that you like, and Muse will re-order them for you at
1286 publish-time.
1288 If you wish to disable table generation for one Muse file, add the
1289 directive @samp{#disable-tables t} to the top of the file.
1291 @subheading Other table formats
1293 @cindex tables, orgtbl-mode style
1294 It is possible to publish very basic Orgtbl-mode style tables.
1296 @example
1297 | org  | style | table |
1298 |------+-------+-------|
1299 | one  |       | one   |
1300 | two  | two   |       |
1301 |      | three | three |
1302 |------+-------+-------|
1303 | more | stuff |       |
1304 @end example
1306 If you are used to the way that Org Mode publishes these tables, then
1307 customize `muse-html-table-attributes' to the following, in order to get
1308 a similar kind of output.
1310 @example
1311 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1312 @end example
1314 @cindex tables, table.el style
1315 @file{table.el} style tables are also supported, as long as
1316 @file{table.el} itself supports outputting tables for a particular
1317 publishing style.  At the time of this writing, the ``html'', ``latex'',
1318 and ``docbook'' styles are supported by @file{table.el}.  Styles derived
1319 from these styles will also work.
1321 @example
1322 +---+-----+---+
1323 |   | one | 1 |
1324 +---+-----+---+
1325 | b | two |   |
1326 +---+-----+---+
1327 | c |     | 3 |
1328 +---+-----+---+
1329 @end example
1331 @node Explicit Links, Implicit Links, Tables, Markup Rules
1332 @comment  node-name,  next,  previous,  up
1333 @section Hyperlinks and email addresses with descriptions
1334 @cindex links, explicit
1336 A hyperlink can reference a URL, or another page within a Muse
1337 project.  In addition, descriptive text can be specified, which should
1338 be displayed rather than the link text in output styles that supports
1339 link descriptions.  The syntax is as follows.
1341 @example
1342 [[link target][link description]]
1343 [[link target without description]]
1344 @end example
1346 Thus, the current maintainer's homepage for Muse can be found
1347 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1348 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1350 @node Implicit Links, Images, Explicit Links, Markup Rules
1351 @comment  node-name,  next,  previous,  up
1352 @section Bare URLs, WikiNames, and InterWiki links
1353 @cindex links, implicit
1354 @cindex links, raw
1356 @cindex URLs
1357 @cindex Email addresses
1359 A URL or email address encountered in the input text is published as a
1360 hyperlink.  These kind of links are called @dfn{implicit links} because
1361 they are not separated from the rest of the Muse document in any way.
1363 Some characters in URLs will prevent Muse from recognizing them as
1364 implicit links. If you want to link to a URL containing spaces or any of
1365 the characters ``][,"'`()<>^'', you will have to make the link
1366 explicit. The punctuation characters ``.,;:'' are also not recognized as
1367 part of a URL when they appear at its end. For information on how to
1368 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1369 addresses with descriptions}.
1371 @cindex WikiNames
1372 If the @command{muse-wiki} module is loaded, another form of implicit
1373 link will be made available.  WikiNames, which are typed in CamelCase,
1374 are highlighted and published as links, provided that the file they
1375 refer to exists.
1377 Customization of WikiName recognition may be accomplished by editing the
1378 @code{muse-wiki-wikiword-regexp} option and subsequently running
1379 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1380 If you use the Customize interface, the latter will be done
1381 automatically.
1383 @cindex InterWiki links
1384 @cindex inter-project links
1385 The @command{muse-wiki} module also allows for InterWiki links.  These
1386 are similar to WikiWords, but they specify both the project and page of
1387 a file.  The names of your project entries in @code{muse-project-alist}
1388 will be used as InterWiki names by default.  Several examples follow.
1390 @example
1391 Blog::DocumentingMuse
1392 Projects#EmacsMuse
1393 Website
1394 @end example
1396 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1397 the project name, and @samp{DocumentingMuse} is the page name.  In the
1398 second example, @samp{#} is the interwiki delimiter.  If the name of a
1399 project occurs by itself in text, like the third case, it will be
1400 colorized and published as a link to the default page of the given
1401 project.
1403 Customization of interwiki links may be accomplished by editing the
1404 @code{muse-wiki-interwiki-alist} option.
1406 It is also possible to link to an anchor in an interwiki document.  This
1407 is called a ``three-part link''.  Examples of this follow.
1409 @example
1410 Blog::DocumentingMuse#anchor1
1411 Projects#EmacsMuse#anchor2
1412 @end example
1414 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1415 @comment  node-name,  next,  previous,  up
1416 @section Publishing and displaying images
1417 @cindex images
1418 @cindex links, with images
1419 @subheading Image links
1421 Links to images may be used in either the target or the description, or
1422 both.  Thus, the following code will publish as a clickable image that
1423 points to @url{http://mwolson.org/}.
1425 @example
1426 [[http://mwolson.org/][/static/logos/site-logo.png]]
1427 @end example
1429 Normally, images in the link part will be inlined.
1431 If you want these images to be published as links instead, place the
1432 text ``URL:'' immediately in front of the link text.  An example
1433 follows.
1435 @example
1436 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1437 @end example
1439 @cindex images, displaying
1440 @cindex images, local
1441 @subheading Displaying images in Muse mode
1442 If a link to a locally-available image is encountered in the link
1443 description, Muse mode will attempt to display it if your version of
1444 Emacs permits this.
1446 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1447 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1449 The method for finding images may be altered by customizing the
1450 @code{muse-colors-inline-image-method} option.  One useful value for
1451 this option is @code{muse-colors-use-publishing-directory}, which tells
1452 Muse mode to look in the directory where the current file will be
1453 published.  The default is to look in the current directory.  Relative
1454 paths like @samp{../pics/} should work for either setting.
1456 Eventually, it is hoped that Muse will be able to copy images from the a
1457 ``source'' directory to a publishing directory by customizing
1458 @code{muse-project-alist}, but this has not been implemented yet.
1460 @cindex images, without descriptions
1461 @cindex images, inlined
1462 @subheading Publishing simple images
1463 The following example will display correctly and publish correctly if a
1464 @acronym{PNG} file called @file{TestLogo.png} exists in the
1465 @file{../pics/} directory.  If text is on the same line as the picture,
1466 it will remain so in the output.
1468 @example
1469 [[../myimage.png]]
1470 @end example
1472 @cindex images, captions
1473 @subheading Publishing images with captions
1474 If you want to add a caption to an image, use the following syntax.
1475 This will center the image (if the output format supports it) and add a
1476 centered caption below the picture.  Formats that do not support
1477 centering the image will instead leave it against the left margin.
1479 @example
1480 [[../pics/mycat.png][My cat Dexter]]
1481 @end example
1483 Images with captions may only occur in their own paragraphs, with no
1484 text on the same line.  Otherwise, the published output will not be
1485 syntactically correct.
1487 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1488 @comment  node-name,  next,  previous,  up
1489 @section Inserting a horizontal line or anchor
1491 @cindex horizontal rules
1492 @cindex dashes
1493 @subheading Horizontal Rules
1495 Four or more dashes indicate a horizontal rule.  Be sure to put blank
1496 lines around it, or it will be considered part of the proceeding or
1497 following paragraph!
1499 @cindex anchors
1500 @cindex links, with target on same page
1501 @subheading Anchors
1503 If you begin a line with "#anchor" -- where "anchor" can be any word
1504 that doesn't contain whitespace -- it defines an anchor at that point
1505 into the document.  This point can be referenced using "page#anchor" as
1506 the target in a Muse link.
1508 @node Embedded Lisp, Citations, Horizontal Rules and Anchors, Markup Rules
1509 @comment  node-name,  next,  previous,  up
1510 @section Evaluating Emacs Lisp code in documents for extensibility
1511 @cindex lisp, embedded
1513 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag.
1514 With the @verb{|<lisp>|} tag, you may generate whatever output text you
1515 wish.  The inserted output will get marked up if the @verb{|<lisp>|}
1516 tag appears within the main text of the document.
1518 @example
1519 <lisp>(concat "This form gets " "inserted")</lisp>
1520 @end example
1522 @cindex lisp, and insert command
1523 Note that you should not use the @code{insert} command within a set of
1524 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1525 tags will be automatically inserted into the document.
1527 It is also possible to treat the output as if it were surrounded by the
1528 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1529 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1530 attribute of the @verb{|<lisp>|} tag.
1532 @example
1533 <lisp markup="example">
1534 (concat "Insert" " me")
1535 </lisp>
1536 @end example
1538 Other languages also have tags that cause source code to be evaluated.
1539 @xref{Tag Summary}, for details.
1541 @node Citations, Comments, Embedded Lisp, Markup Rules
1542 @comment  node-name,  next,  previous,  up
1543 @section Support for citing other resources
1544 @cindex citations
1545 @cindex tags, <cite>
1547 @subheading Example
1549 Here is an example of what citations look like in a Muse document.
1551 @example
1552 #bibsource REFDB
1554 * Title
1555 ** Subtitle
1557 Some text before <cite>Miller1999</cite> and after the citation.
1559 This is an author-only citation <cite type="author">Miller1999</cite>.
1561 And this is a year-only citation <cite type="year">Miller1999</cite>.
1563 Finally, this is a multi-head citation
1564 <cite>Miller1999,Andrews2005</cite>.
1565 @end example
1567 @subheading Overview
1569 The @code{#bibsource} directive defines the source of the
1570 bibliographies.  The following sources are possible.
1572 @itemize @bullet
1573 @item DocBook + RefDB:
1574 the string "REFDB"
1576 @item LaTeX + bibtex:
1577 the name of an appropriate bibtex file
1579 @item LaTeX + RefDB:
1580 if the input file is called "foo.muse", then set this to "foo.bib"
1581 @end itemize
1583 Citations are encoded as @verb{|<cite>|} elements which enclose the
1584 citation keys as they are defined in the bibliography file or database.
1585 In multi-head citations, the citation keys have to be separated by
1586 colons or semicolons.  The @code{latex} and @code{docbook} styles
1587 translate these to the proper separator automatically.
1589 The @verb{|<cite>|} elements take an optional ``type'' attribute that
1590 defines how the citation is rendered.  If the attribute is missing,
1591 you'll get a regular citation according to the bibliography style,
1592 e.g.'' (Miller et al., 1999)''.  If the attribute is set to "author",
1593 only the name of the author(s) will be rendered.  Accordingly, "year"
1594 will cause the year to be printed.  This is useful to create citations
1595 like this:
1597 @example
1598 Miller et al. had already shown in a previous publication (1999) that
1599 this is not going to work.
1600 @end example
1602 Remember that refdb-mode (the Emacs interface to RefDB) can retrieve
1603 references by simply marking the citation key and running the
1604 @code{refdb-getref-by-field-on-region} command.  Later versions of
1605 @code{refdb-mode} will also allow to insert references as Muse citations
1606 (which is already implemented for DocBook, TEI, and LaTeX documents).
1608 You may have noticed that there is no element to indicate the position
1609 of the bibliography.  The latter is always created at a valid position
1610 close to the end of the document.  The functions
1611 @code{muse-docbook-bibliography} and @code{muse-latex-bibliography} are
1612 called in the header or footer to generate this content, so it is
1613 possible to change the exact position.
1615 @node Comments, Tag Summary, Citations, Markup Rules
1616 @comment  node-name,  next,  previous,  up
1617 @section Lines to omit from published output
1618 @cindex comments
1619 @cindex publishing, omitting lines
1621 Use the following syntax to indicate a comment.  Comments will not be
1622 published.
1624 @example
1625 ; Comment text goes here.
1626 @end example
1628 That is, only a semi-colon at the beginning of a line, followed by a
1629 literal space, will cause that line to be treated as a comment.
1631 You can alternatively surround the region with the @verb{|<comment>|}
1632 tag.
1634 If you wish the comment to be published, but just commented out using
1635 the comment syntax of the output format, then set
1636 @option{muse-publish-comments-p} to non-nil.
1638 @node Tag Summary, , Comments, Markup Rules
1639 @comment  node-name,  next,  previous,  up
1640 @section Tags that Muse recognizes
1641 @cindex tags
1642 @cindex inserting files at publish time
1643 @cindex publishing, including markup in headers and footers
1644 @cindex publishing, inserting files
1646 Muse has several built-in tags that may prove useful during publishing.
1647 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1648 Muse uses, as well as make your own tags.
1650 Only a small subset of these tags are available in header and footer
1651 text.  The @code{muse-publish-markup-header-footer-tags} option lists
1652 the tags that are allowed in headers and footers.
1654 @subheading Syntax
1656 If a tag takes arguments, it will look like this, where ``tagname'' is
1657 the name of the tag.
1659 @example
1660 <tagname arg1="string1" arg2="string2">
1661 @end example
1663 If you want the tag to look like it came straight from an XHTML
1664 document, you can alternatively do the following.
1666 @example
1667 <tagname arg1="string1" arg2="string2" />
1668 @end example
1670 If a tag surrounds some text, it will look like this.
1672 @example
1673 <tagname>Some text</tagname>
1674 @end example
1676 If a tag surrounds a large region, it will look like this.
1678 @example
1679 <tagname>
1680 Some text.
1681 Some more text.
1682 </tagname>
1683 @end example
1685 @subheading Tag listing
1687 This is the complete list of tags that Muse accepts, including those
1688 that were mentioned in previous sections.
1690 @table @samp
1692 @item <br>
1693 Insert a line break.
1695 Muse will automatically detect paragraphs when publishing by means of
1696 blank lines, so this tag is usually unnecessary.
1698 @item <cite>
1699 Insert a citation to another source.
1701 This takes the argument @option{type}, which indicates the type of
1702 citation.  The valid types are "author" and "year".  If this argument is
1703 omitted, include both author and year in the citation.
1705 The bibliography to use for the citation may be specified by the
1706 @option{#bibsource} directive.
1708 @xref{Citations}, for additional information.
1710 @item <class>
1711 If publishing to HTML, surround the given text with a @verb{|<span>|}
1712 tag.  It takes one argument called ``name'' that specifies the ``class''
1713 attribute of the @verb{|<span>|} tag.
1715 If publishing to a different format, do nothing extra to the text.
1717 @item <code>
1718 Treat the text surrounded by the tag as if they were enclosed in equal
1719 signs, that is, make it monospace.
1721 @item <command>
1722 Run a command on the region, replacing the region with the result of the
1723 command.  The command is specified with the ``interp'' argument.  If no
1724 value for ``interp'' is given, pass the entire region to the shell.
1726 The ``markup'' argument controls how this section is marked up.
1728 If it is omitted, publish the region with the normal Muse rules.
1730 If "nil", do not mark up the region at all, but prevent Muse from
1731 further interpreting it.
1733 If "example", treat the region as if it was surrounded by the
1734 @verb{|<example>|} tag.
1736 If "src", treat the included text as if it was surrounded by the
1737 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1738 doing this.
1740 If "verse", treat the region as if it was surrounded by the
1741 @verb{|<verse>|} tag, to preserve newlines.
1743 Otherwise, it should be the name of a function to call, with the buffer
1744 narrowed to the region.
1746 @item <comment>
1747 Treat the entire region as a comment.  If the option
1748 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1749 publish it using the comment syntax of the current publishing style.
1751 @item <contents>
1752 Publish a Table of Contents.  This will either be inserted in-place or
1753 at the beginning of the document, depending on your publishing style.
1754 It does not have a delimiting tag.
1756 By default, only 2 levels of headings will be included in the generated
1757 Table of Contents.  To change this globally, customize the
1758 @var{muse-publish-contents-depth} option.  To change this only for the
1759 current tag, use the ``depth'' argument.
1761 @item <div>
1762 Insert a <div> tag into HTML documents, and do not insert anything
1763 special for other non-HTML publishing formats.
1765 If the ``style'' argument is provided, include it with the published
1766 @verb{|<div>|} tag.  Likewise for the ``id'' argument.
1768 @item <example>
1769 Publish the region in monospace, preserving the newlines in the region.
1770 This is useful for snippets of code.
1772 @item <include>
1773 Insert the given file at the current location during publishing.  The
1774 basic use of this tag is as follows, replacing ``included_file'' with
1775 the name of the file that you want to include.
1777 @example
1778 <include file="included_file">
1779 @end example
1781 The ``markup'' argument controls how this section is marked up.
1783 If it is omitted, publish the included text with the normal Muse
1784 rules.
1786 If "nil", do not mark up the included text at all.
1788 If "example", treat the included text as if it was surrounded by the
1789 @verb{|<example>|} tag.
1791 If "src", treat the included text as if it was surrounded by the
1792 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1793 doing this.
1795 If "verse", treat the included text as if it was surrounded by the
1796 @verb{|<verse>|} tag, to preserve newlines.
1798 Otherwise, it should be the name of a function to call after inserting
1799 the file with the buffer narrowed to the section inserted.
1801 @item <lisp>
1802 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1803 The result is then inserted into the document, so you do not need to
1804 explicitly call @code{insert}.  All text properties are removed from the
1805 resulting text.
1807 This tag takes the ``markup'' argument.  See the description of
1808 @verb{|<command>|} for details.
1810 @item <literal>
1811 Make sure that the text enclosed by this tag is published without
1812 escaping it in any way.  This is useful for inserting markup directly
1813 into the published document, when Muse does not provide the desired
1814 functionality.
1816 @item <markup>
1817 Mark up the text between the initial and ending tags.  The markup
1818 command to use may be specified by the ``function'' argument.  The
1819 standard Muse markup routines are used by default if no ``function''
1820 argument is provided.
1822 This is useful for marking up regions in headers and footers.  One
1823 example that comes to mind is generating a published index of all of the
1824 files in the current project by doing the following.
1826 @example
1827 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1828 @end example
1830 @item <perl>
1831 Run the @command{perl} language interpreter on the region, replacing the
1832 region with the result of the command.
1834 This tag takes the ``markup'' argument.  See the description of
1835 @verb{|<command>|} for details.
1837 @item <python>
1838 Run the @command{python} language interpreter on the region, replacing
1839 the region with the result of the command.
1841 This tag takes the ``markup'' argument.  See the description of
1842 @verb{|<command>|} for details.
1844 @item <quote>
1845 Publish the region as a blockquote.  This will either be inserted
1846 in-place or at the beginning of the document, depending on your
1847 publishing style.  It does not have a delimiting tag.
1849 @item <ruby>
1850 Run the @command{ruby} language interpreter on the region, replacing the
1851 region with the result of the command.
1853 This tag takes the ``markup'' argument.  See the description of
1854 @verb{|<command>|} for details.
1856 @item <src>
1857 Publish the region using htmlize.
1858 The language to use may be specified by the ``lang'' attribute.
1860 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1861 the value of the ``lang'' attribute.
1863 This tag requires htmlize 1.34 or later in order to work.  If this is
1864 not satisfied, or the current publishing style is not HTML-based, Muse
1865 will publish the region like an @verb{|<example>|} tag.
1867 @item <verbatim>
1868 This is used when you want to prevent Muse from trying to interpret some
1869 markup.  Surround the markup in @verb{|<verbatim>|} and
1870 @verb{|</verbatim>|}, and it will not be interpreted.
1872 This tag was used often in previous versions of Muse because they did
1873 not support whole-document escaping of specials.  Now, it will only be
1874 needed for other tags, and perhaps footnotes as well.
1876 @item <verse>
1877 Preserve the newlines in the region.  In formats like HTML, newlines are
1878 removed by default, hence the need for this tag.  In other publishing
1879 styles, this tag may cause the text to be indented slightly in a way
1880 that looks nice for poetry and prose.
1882 @end table
1884 @node Publishing Styles, Extending Muse, Markup Rules, Top
1885 @comment  node-name,  next,  previous,  up
1886 @chapter Publishing Various Types of Documents
1887 @cindex publishing styles
1889 One of the principle features of Muse is the ability to publish a simple
1890 input text to a variety of different output styles.  Muse also makes it
1891 easy to create new styles, or derive from an existing style.
1893 @menu
1894 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1895 * Book::                        Publishing entries into a compilation.
1896 * ConTeXt::                     Publishing ConTeXt documents.
1897 * DocBook::                     Publishing in DocBook XML form.
1898 * HTML::                        Publishing in HTML or XHTML form.
1899 * Ikiwiki::                     Integrating with ikiwiki.
1900 * Journal::                     Keeping a journal or blog.
1901 * LaTeX::                       Publishing LaTeX documents.
1902 * Poem::                        Publish a poem to LaTeX or PDF.
1903 * Texinfo::                     Publish entries to Texinfo format or PDF.
1904 * XML::                         Publish entries to XML.
1905 @end menu
1907 @node Blosxom, Book, Publishing Styles, Publishing Styles
1908 @comment  node-name,  next,  previous,  up
1909 @section Integrating Muse and pyblosxom.cgi
1910 @cindex blog, one-file-per-entry style
1912 The Blosxom publishing style publishes a tree of categorised files to a
1913 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1914 In other words, each blog entry corresponds with one file.
1916 @menu
1917 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1918 * Blosxom Entries::             Format of a Blosxom entry and automation.
1919 * Blosxom Options::             Blosxom styles and options provided.
1920 @end menu
1922 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1923 @comment  node-name,  next,  previous,  up
1924 @subsection Other tools needed for the Blosxom style
1926 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1927 installed on a machine that you have upload access to.
1929 The major difficulty in both of these programs is specifying the date of
1930 the entries.  Both programs rely on the file modification time rather
1931 than any data contained in the entries themselves.  A plugin is needed
1932 in order for these programs to be able to get the correct date.
1934 @subheading PyBlosxom
1936 There are two different ways of accomplishing this in pyblosxom.  The
1937 first way involves gathering the timestamps (as specified by the
1938 @code{#date} directive) into one file and then sending that file along
1939 with published entries to the webserver.
1941 The second will read each file at render time and parse the
1942 @code{#postdate} directive.  Muse will translate the @code{#date}
1943 directive into @code{#postdate} at publish time, so you don't have to do
1944 any extra work.
1946 @subsubheading Placing timestamps in one file
1948 The following additional components are required in order to make the
1949 date of blog entries display as something sensible.
1951 @enumerate
1952 @item
1953 A script to gather date directives from the entire blog tree into a
1954 single file.  The file must associate a blog entry with a date.
1956 @item
1957 A plugin for (py)blosxom that reads this file.
1958 @end enumerate
1960 These 2 things are provided for @command{pyblosxom.cgi} in the
1961 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1962 former service, while @file{hardcodedates.py} provides the latter
1963 service.
1965 Here is a sample listing from my @file{timestamps} file, which maps
1966 each file to a date.  This can really be in any format, as long as your
1967 date-gathering script and your plugin can both understand it.
1969 @example
1970 2005-04-01-14-16 personal/paper_cranes
1971 2005-03-21 personal/spring_break_over
1972 2004-10-24 personal/finished_free_culture
1973 @end example
1975 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1976 @file{getstamps.py}.  Note that you will need to set the current
1977 directory to where your Muse files are, execute @file{getstamps.py}, and
1978 then move the generated timestamps file to your publishing directory.
1980 @subsubheading Getting timestamp from entry while rendering
1982 Alternately, the pyblosxom metadate plugin may be used.  On the plus
1983 side, there is no need to run a script to gather the date.  On the
1984 downside, each entry is read twice rather than once when the page is
1985 rendered.  Set the value of @code{muse-blosxom-use-metadate} to non-nil
1986 to enable adding a @code{#postdate} directive to all published files.
1987 You can do this by:
1989 @example
1990 M-x customize-variable RET muse-blosxom-use-metadate RET
1991 @end example
1993 With the metadate plugin installed in pyblosxom, the date set in this
1994 directive will be used instead of the file's modification time.  The
1995 plugin is included with Muse at @file{contrib/pyblosxom/metadate.py}.
1997 @subheading Blosxom
1999 It is also possible to use Blosxom, which is written in Perl, to serve
2000 blog entries that were published with Muse.  The steps are as follows.
2002 @enumerate
2003 @item
2004 Download and install blosxom from @url{http://blosxom.sourceforge.net/}.
2006 @item
2007 Install the metadate plugin.  It is available in
2008 @file{contrib/blosxom/metadate_0_0_3}.
2010 @item
2011 Every time you make a new blog entry, change to the blosxom data
2012 directory and execute the @file{contrib/blosxom/getstamps.pl} script.
2013 This script has only recently been made, and may still have some bugs,
2014 so use with caution.
2016 @end enumerate
2018 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
2019 @comment  node-name,  next,  previous,  up
2020 @subsection Format of a Blosxom entry and automation
2022 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
2023 longer `#date yyyy-mm-dd-hh-mm', a title (using the @code{#title}
2024 directive), plus whatever normal content is desired.
2026 The date directive is not used directly by @command{pyblosxom.cgi} or
2027 this program.  You need to have the two additional items from the former
2028 section to make use of this feature.
2030 There is a function called @code{muse-blosxom-new-entry} that will
2031 automate the process of making a new blog entry.  To make use of it, do
2032 the following.
2034 @itemize @bullet
2035 @item
2036 Customize @code{muse-blosxom-base-directory} to the location that your
2037 blog entries are stored.
2039 @item
2040 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
2041 use the following code to assign this function to @kbd{C-c p l'}.
2043 @example
2044 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
2045 @end example
2047 @item
2048 You should create your directory structure ahead of time under your base
2049 directory.  These directories, which correspond with category names, may
2050 be nested.
2052 @item
2053 When you enter this key sequence, you will be prompted for the category
2054 of your entry and its title.  Upon entering this information, a new file
2055 will be created that corresponds with the title, but in lowercase
2056 letters and having special characters converted to underscores.  The
2057 title and date directives will be inserted automatically.
2058 @end itemize
2060 @node Blosxom Options, , Blosxom Entries, Blosxom
2061 @comment  node-name,  next,  previous,  up
2062 @subsection Blosxom styles and options provided
2064 The following styles and options are available in the Blosxom publishing
2065 style.
2067 @subheading Styles provided
2069 @table @code
2071 @cindex publishing styles, blosxom-html
2072 @item blosxom-html
2073 Publish Blosxom entries in HTML form.
2075 @cindex publishing styles, blosxom-xhtml
2076 @item blosxom-xhtml
2077 Publish Blosxom entries in XHTML form.
2079 @end table
2081 @subheading Options provided
2083 @table @code
2085 @item muse-blosxom-extension
2086 Default file extension for publishing Blosxom files.
2088 @item muse-blosxom-header
2089 Header used for publishing Blosxom files.
2091 This may be text or a filename.
2093 @item muse-blosxom-footer
2094 Footer used for publishing Blosxom files.
2096 This may be text or a filename.
2098 @item muse-blosxom-base-directory
2099 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
2101 This is the top-level directory where your blog entries may be found
2102 locally.
2104 @end table
2106 @node Book, ConTeXt, Blosxom, Publishing Styles
2107 @comment  node-name,  next,  previous,  up
2108 @section Publishing entries into a compilation
2110 This publishing style is used to output ``books'' in LaTeX or PDF
2111 format.
2113 Each page will become a separate chapter in the book, unless the style
2114 keyword @option{:nochapters} is used, in which case they are all run
2115 together as if one giant chapter.
2117 One way of publishing a book is to make a project for it, add the
2118 project to @code{muse-project-alist}, and use the @code{book-pdf} style
2119 with a very specific @option{:include} value to specify some page whose
2120 contents will be checked for the values of @code{#title} and
2121 @code{#date}, and whose name will be used in the output file.  Then to
2122 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
2123 @kbd{C-c C-p} to trigger the publishing process.  An example
2124 @code{muse-project-alist} for this method follows.
2126 @example
2127 (setq muse-project-alist
2128       '(("MyNotes" (:nochapters t  ; do automatically add chapters
2129                     :book-chapter "Computer Science"
2130                     "~/Notes/cs"
2131                     :book-chapter "Mathematics"
2132                     "~/Notes/math"
2133                     :book-chapter "Emacs"
2134                     "~/Notes/emacs"
2135                     :book-end t ; the rest will not be placed in the book
2136                     "~/Notes"   ; so we can find the notes-anthology page
2137                     "~/Notes/private"
2138                     :force-publish ("index")
2139                     :default "index")
2140          (:base "book-pdf"
2141                 :include "/notes-anthology[^/]*$"
2142                 :path "~/public_html/notes")
2143          ;; other publishing styles for each directory go here,
2144          ;; if desired
2145          )))
2146 @end example
2148 In this example, there would be a file called
2149 @file{~/Notes/notes-anthology.muse}, which would contain just the
2150 following.  The resulting book would be published to
2151 @file{~/public_html/notes/notes-anthology.pdf}.
2153 @example
2154 #title My Technology Ramblings
2155 @end example
2157 Another way is to call the @code{muse-book-publish-project} function
2158 manually, with a custom project entry.  An example of this may be found
2159 in John Wiegley's configuration file at
2160 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
2161 function.
2163 @subheading Styles provided
2165 @table @code
2167 @cindex publishing styles, book-latex
2168 @item book-latex
2169 Publish a book in LaTeX form.  The header and footer are different than
2170 the normal LaTeX publishing mode.
2172 @cindex publishing styles, book-pdf
2173 @item book-pdf
2174 Publish a book in PDF form.  The header and footer are different than
2175 the normal PDF publishing mode.
2177 @end table
2179 @subheading Options provided
2181 @table @code
2183 @item muse-book-before-publish-hook
2184 A hook run in the book buffer before it is marked up.
2186 @item muse-book-after-publish-hook
2187 A hook run in the book buffer after it is marked up.
2189 @item muse-book-latex-header
2190 Header used for publishing books to LaTeX.
2192 This may be text or a filename.
2194 @item muse-book-latex-footer
2195 Footer used for publishing books to LaTeX.
2197 This may be text or a filename.
2199 @end table
2200 @node ConTeXt, DocBook, Book, Publishing Styles
2201 @comment  node-name,  next,  previous,  up
2202 @section Publishing ConTeXt documents
2204 This publishing style is capable of producing ConTeXt or PDF documents.
2206 If you wish to publish PDF documents based on ConTeXt, you will need to
2207 have it installed.  For Debian and Ubuntu, this can be accomplished by
2208 installing the ``texlive'' package.
2210 @subheading Styles provided
2212 @table @code
2214 @cindex publishing styles, context
2215 @item context
2216 Publish a ConTeXt document.
2218 @cindex publishing styles, context-pdf
2219 @item context-pdf
2220 Publish a PDF document, using an external ConTeXt document conversion
2221 tool.
2223 @cindex publishing styles, context-slides
2224 @item context-slides
2225 Produce slides from a ConTeXt document.
2227 Here is an example of a slide.
2229 @example
2230 * First Slide
2232 [[Some-sort-of-cute-image.png]]
2234 ** A subheading
2236  - A bullet point.
2237  - Another bullet point.
2239 * Second Slide
2241 ... and so on
2242 @end example
2244 @cindex publishing styles, context-slides-pdf
2245 @item context-slides-pdf
2246 Publish a PDF document of ConTeXt slides.
2248 @end table
2250 @subheading Options provided
2252 @table @code
2254 @item muse-context-extension
2255 Default file extension for publishing ConTeXt files.
2257 @item muse-context-pdf-extension
2258 Default file extension for publishing ConTeXt files to PDF.
2260 @item muse-context-pdf-program
2261 The program that is called to generate PDF content from ConTeXt content.
2263 @item muse-context-pdf-cruft
2264 Extensions of files to remove after generating PDF output successfully.
2266 @item muse-context-header
2267 Header used for publishing ConTeXt files.
2269 This may be text or a filename.
2271 @item muse-context-footer
2272 Footer used for publishing ConTeXt files.
2274 This may be text or a filename.
2276 @item muse-context-markup-regexps
2277 List of markup regexps for identifying regions in a Muse page.
2279 For more on the structure of this list,
2280 @xref{muse-publish-markup-regexps}.
2282 @item muse-context-markup-functions
2283 An alist of style types to custom functions for that kind of text.
2285 For more on the structure of this list,
2286 @xref{muse-publish-markup-functions}.
2288 @item muse-context-markup-strings
2289 Strings used for marking up text.
2291 These cover the most basic kinds of markup, the handling of which
2292 differs little between the various styles.
2294 @item muse-context-slides-header
2295 Header for publishing a presentation (slides) using ConTeXt.
2297 Any of the predefined modules, which are available in the
2298 tex/context/base directory, can be used by writing a "module" directive
2299 at the top of the Muse file; if no such directive is provided, module
2300 pre-01 is used.  Alternatively, you can use your own style ("mystyle",
2301 in this example) by replacing "\usemodule[]" with "\input mystyle".
2303 This may be text or a filename.
2305 @item muse-context-slides-markup-strings
2306 Strings used for marking up text in ConTeXt slides.
2308 @item muse-context-markup-specials-document
2309 A table of characters which must be represented specially.
2310 These are applied to the entire document, sans already-escaped
2311 regions.
2313 @item muse-context-markup-specials-example
2314 A table of characters which must be represented specially.
2315 These are applied to @verb{|example>|} regions.
2317 With the default interpretation of @verb{|<example>|} regions, no
2318 specials need to be escaped.
2320 @item muse-context-markup-specials-literal
2321 A table of characters which must be represented specially.
2322 This applies to =monospaced text= and @verb{|<code>|} regions.
2324 @item muse-context-markup-specials-url
2325 A table of characters which must be represented specially.
2326 These are applied to URLs.
2328 @item muse-context-markup-specials-image
2329 A table of characters which must be represented specially.
2330 These are applied to image filenames.
2332 @item muse-context-permit-contents-tag
2333 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2334 contents.
2336 Most of the time, it is best to have a table of contents on the
2337 first page, with a new page immediately following.  To make this
2338 work with documents published in both HTML and ConTeXt, we need to
2339 ignore the @verb{|<contents>|} tag.
2341 If you don't agree with this, then set this option to non-nil,
2342 and it will do what you expect.
2344 @end table
2346 @node DocBook, HTML, ConTeXt, Publishing Styles
2347 @comment  node-name,  next,  previous,  up
2348 @section Publishing in DocBook XML form
2350 This publishing style is used to generate DocBook XML files.
2352 @subheading Styles provided
2354 @table @code
2356 @cindex publishing styles, docbook
2357 @item docbook
2358 Publish a file in Docbook form.
2360 @end table
2362 @subheading Options provided
2364 This publishing style uses the same options for markup up special
2365 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2367 @table @code
2369 @item muse-docbook-extension
2370 Default file extension for publishing DocBook XML files.
2372 @item muse-docbook-header
2373 Header used for publishing DocBook XML files.
2375 This may be text or a filename.
2377 @item muse-docbook-footer
2378 Footer used for publishing DocBook XML files.
2380 This may be text or a filename.
2382 @item muse-docbook-markup-regexps
2383 List of markup rules for publishing a Muse page to DocBook XML.
2385 @item muse-docbook-markup-functions
2386 An alist of style types to custom functions for that kind of text.
2388 @item muse-docbook-markup-strings
2389 Strings used for marking up text.
2391 These cover the most basic kinds of markup, the handling of which
2392 differs little between the various styles.
2394 @item muse-docbook-encoding-default
2395 The default Emacs buffer encoding to use in published files.
2396 This will be used if no special characters are found.
2398 @item muse-docbook-charset-default
2399 The default DocBook XML charset to use if no translation is
2400 found in @code{muse-xml-encoding-map}.
2402 @end table
2404 @node HTML, Ikiwiki, DocBook, Publishing Styles
2405 @comment  node-name,  next,  previous,  up
2406 @section Publishing in HTML or XHTML form
2408 This publishing style is capable of producing HTML or XHTML documents.
2410 @subheading Styles provided
2412 @table @code
2414 @cindex publishing styles, html
2415 @item html
2416 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2418 @item xhtml
2419 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2421 @end table
2423 @subheading Options provided
2425 If an HTML option does not have a corresponding XHTML option, it will
2426 be used for both of these publishing styles.
2428 These publishing styles use the same options for markup up special
2429 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2431 @table @code
2433 @item muse-html-extension
2434 Default file extension for publishing HTML files.
2436 @item muse-xhtml-extension
2437 Default file extension for publishing XHTML files.
2439 @item muse-html-style-sheet
2440 Store your stylesheet definitions here.
2442 This is used in @code{muse-html-header}.  You can put raw CSS in here or
2443 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
2444 @verb{|<lisp>|} markup tags.
2446 If you are publishing to XHTML, then customize the
2447 @code{muse-xhtml-style-sheet} option instead.
2449 @item muse-xhtml-style-sheet
2450 Store your stylesheet definitions here.
2452 This is used in @code{muse-xhtml-header}.  You can put raw CSS in here
2453 or a @verb{|<link>|} tag to an external stylesheet.  This text may
2454 contain @verb{|<lisp>|} markup tags.
2456 @item muse-html-header
2457 Header used for publishing HTML files.
2459 This may be text or a filename.
2461 @item muse-html-footer
2462 Footer used for publishing HTML files.
2464 This may be text or a filename.
2466 @item muse-xhtml-header
2467 Header used for publishing XHTML files.
2469 This may be text or a filename.
2471 @item muse-xhtml-footer
2472 Footer used for publishing XHTML files.
2474 This may be text or a filename.
2476 @item muse-html-anchor-on-word
2477 When true, anchors surround the closest word.
2479 This allows you to select them in a browser (i.e. for pasting), but has
2480 the side-effect of marking up headers in multiple colors if your header
2481 style is different from your link style.
2483 @item muse-html-table-attributes
2484 The attribute to be used with HTML @verb{|<table>|} tags.
2486 If you want to make more-complicated tables in HTML, surround the HTML
2487 with the @verb{|literal|} tag, so that it does not get escaped.
2489 @item muse-html-markup-regexps
2490 List of markup rules for publishing a Muse page to HTML.
2492 @item muse-html-markup-functions
2493 An alist of style types to custom functions for that kind of text.
2495 @item muse-html-markup-strings
2496 Strings used for marking up text as HTML.
2498 These cover the most basic kinds of markup, the handling of which
2499 differs little between the various styles.
2501 @item muse-xhtml-markup-strings
2502 Strings used for marking up text as XHTML.
2504 These cover the most basic kinds of markup, the handling of which
2505 differs little between the various styles.
2507 @item muse-html-markup-tags
2508 A list of tag specifications, for specially marking up HTML.
2509 @xref{muse-publish-markup-tags}, for more information.
2511 @item muse-html-meta-http-equiv
2512 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2514 @item muse-html-meta-content-type
2515 The content type used for the HTML @verb{|<meta>|} tag.
2517 If you are striving for XHTML 1.1 compliance, you may want to change
2518 this to ``application/xhtml+xml''.
2520 @item muse-html-meta-content-encoding
2521 The charset to append to the HTML @verb{|<meta>|} tag.
2523 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2524 and determine the HTML charset from emacs's coding.  If set to a string,
2525 this string will be used to force a particular charset.
2527 @item muse-html-charset-default
2528 The default HTML meta charset to use if no translation is found in
2529 @code{muse-xml-encoding-map}.
2531 @item muse-html-encoding-default
2532 The default Emacs buffer encoding to use in published files.
2533 This will be used if no special characters are found.
2535 @end table
2537 @node Ikiwiki, Journal, HTML, Publishing Styles
2538 @comment  node-name,  next,  previous,  up
2539 @section Integrating with ikiwiki
2541 Ikiwiki is a wiki compiler (@url{http://ikiwiki.info/}).  There is an
2542 ongoing effort to provide support for using Emacs Muse as a source
2543 format for Ikiwiki pages.
2545 @strong{Caution}: This effort is currently in an experimental state.  An
2546 initial attempt has been made to prevent malicious user input from
2547 interfering with the rest of the system hosting the website, but it has
2548 not been well-tested.
2550 The @file{lisp/muse-ikiwiki.el} file provides publishing functions and
2551 styles for Ikiwiki.  The plugin for Ikiwiki to recognize Muse files is
2552 provided by the @file{examples/ikiwiki/muse} file.  Two sample init
2553 files are available in the @file{examples/ikiwiki} directory.  Configure
2554 your @file{ikiwiki.setup} file so that the @code{muse_init} variable
2555 has the location of your Muse init file.
2557 @subheading Styles provided
2559 @table @code
2561 @cindex publishing styles, ikiwiki
2562 @item ikiwiki
2563 Supports publishing XHTML output that Ikiwiki can understand.
2565 @end table
2567 @subheading Options provided
2569 @table @code
2571 @item muse-ikiwiki-header
2572 Header used for publishing Ikiwiki output files.
2574 This may be text or a filename.
2576 @item muse-ikiwiki-footer
2577 Footer used for publishing Ikiwiki output files.
2579 This may be text or a filename.
2581 @end table
2583 @subheading Other relevant options
2585 @table @code
2587 @item muse-colors-evaluate-lisp-tags
2588 Specify whether to evaluate the contents of @verb{|<lisp>|} tags at
2589 display time.  If nil, don't evaluate them.  If non-nil, evaluate
2590 them.
2592 The actual contents of the buffer are not changed, only the
2593 displayed text.
2595 @item muse-html-src-allowed-modes
2596 Modes that we allow the @verb{|<src>|} tag to colorize.  If @code{t},
2597 permit the @verb{|<src>|} tag to colorize any mode.
2599 If a list of mode names, such as @code{'("html" "latex")}, and the lang
2600 argument to @verb{|<src>|} is not in the list, then use fundamental mode
2601 instead.
2603 @item muse-publish-enable-dangerous-tags
2604 If non-nil, publish tags like @verb{|<lisp>|} and @verb{|<command>|}
2605 that can call external programs or expose sensitive information.
2606 Otherwise, ignore tags like this.
2608 This is useful to set to @code{nil} when the file to publish is coming
2609 from an untrusted source.
2611 @end table
2613 @node Journal, LaTeX, Ikiwiki, Publishing Styles
2614 @comment  node-name,  next,  previous,  up
2615 @section Keeping a journal or blog
2616 @cindex journal
2617 @cindex blog, journal style
2619 The module facilitates the keeping and publication of a journal.  When
2620 publishing to HTML, it assumes the form of a web log, or blog.
2622 The input format for each entry is as follows.
2624 @example
2625 * 20040317: Title of entry
2627 text for the entry.
2629 <qotd>
2630 "You know who you are. It comes down to a simple gut check: You
2631 either love what you do or you don't. Period." -- P. Bronson
2632 </qotd>
2633 @end example
2635 The "qotd", or Quote of the Day, is entirely optional.  When generated
2636 to HTML, this entry is rendered as the following.
2638 @example
2639 <div class="entry">
2640   <div class="entry-qotd">
2641     <h3>Quote of the Day:</h3>
2642     <p>"You know who you are. It comes down to a simple gut
2643       check: You either love what you do or you don't. Period."
2644       -- P. Bronson</p>
2645   </div>
2646   <div class="entry-body">
2647     <div class="entry-head">
2648       <div class="entry-date">
2649         <span class="date">March 17, 2004</span>
2650       </div>
2651       <div class="entry-title">
2652         <h2>Title of entry</h2>
2653       </div>
2654     </div>
2655     <div class="entry-text">
2656       <p>Text for the entry.</p>
2657     </div>
2658   </div>
2659 </div>
2660 @end example
2662 The plurality of "div" tags makes it possible to display the entries in
2663 any form you wish, using a CSS style.
2665 Also, an .RDF file can be generated from your journal by publishing it
2666 with the "rdf" style.  It uses the first two sentences of the first
2667 paragraph of each entry as its "description", and auto-generates tags
2668 for linking to the various entries.
2670 @subheading muse-project-alist considerations
2672 If you wish to publish an RDF or RSS feed, it is important to include
2673 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2674 for your Journal projects.  An example follows.
2676 @example
2677 (setq muse-project-alist
2678       '(("Journal" ("~/Journal/"
2679                     :default "journal")
2680         (:base "journal-rss"
2681                :base-url "http://example.org/journal/"
2682                :path "~/public_html/journal"))))
2683 @end example
2685 @subheading Styles provided
2687 @table @code
2689 @cindex publishing styles, journal-html
2690 @item journal-html
2691 Publish journal entries as an HTML document.
2693 @cindex publishing styles, journal-xhtml
2694 @item journal-xhtml
2695 Publish journal entries as an XHTML document.
2697 @cindex publishing styles, journal-latex
2698 @item journal-latex
2699 Publish journal entries as a LaTeX document.
2701 @cindex publishing styles, journal-pdf
2702 @item journal-pdf
2703 Publish journal entries as a PDF document.
2705 @cindex publishing styles, journal-book-latex
2706 @item journal-book-latex
2707 Publish journal entries as a LaTeX book.
2709 @cindex publishing styles, journal-book-pdf
2710 @item journal-book-pdf
2711 Publish journal entries as a PDF book.
2713 @cindex publishing styles, journal-rdf
2714 @cindex publishing styles, RSS 1.0
2715 @item journal-rdf
2716 Publish journal entries as an RDF file (RSS 1.0).
2718 @cindex publishing styles, journal-rss
2719 @cindex publishing styles, RSS 2.0
2720 @item journal-rss
2721 Publish journal entries as an RSS file (RSS 2.0).
2723 @cindex publishing styles, journal-rss-entry
2724 @item journal-rss-entry
2725 Used internally by @code{journal-rss} and @code{journal-rdf} for
2726 publishing individual entries.
2728 @end table
2730 @subheading Options provided
2732 @table @code
2734 @item muse-journal-heading-regexp
2735 A regexp that matches a journal heading.
2737 Paren group 1 is the ISO date, group 2 is the optional category, and
2738 group 3 is the optional heading for the entry.
2740 @item muse-journal-date-format
2741 Date format to use for journal entries.
2743 @item muse-journal-html-heading-regexp
2744 A regexp that matches a journal heading from an HTML document.
2746 Paren group 1 is the ISO date, group 2 is the optional category, and
2747 group 3 is the optional heading for the entry.
2749 @item muse-journal-html-entry-template
2750 Template used to publish individual journal entries as HTML.
2752 This may be text or a filename.
2754 @item muse-journal-latex-section
2755 Template used to publish a LaTeX section.
2757 @item muse-journal-latex-subsection
2758 Template used to publish a LaTeX subsection.
2760 @item muse-journal-markup-tags
2761 A list of tag specifications, for specially marking up Journal entries.
2763 @xref{muse-publish-markup-tags}, for more information.
2765 This is used by @code{journal-latex} and its related styles, as well as
2766 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2767 @code{journal-rss} use.
2769 @item muse-journal-rdf-extension
2770 Default file extension for publishing RDF (RSS 1.0) files.
2772 @item muse-journal-rdf-base-url
2773 The base URL of the website referenced by the RDF file.
2775 @item muse-journal-rdf-header
2776 Header used for publishing RDF (RSS 1.0) files.
2778 This may be text or a filename.
2780 @item muse-journal-rdf-footer
2781 Footer used for publishing RDF (RSS 1.0) files.
2783 This may be text or a filename.
2785 @item muse-journal-rdf-date-format
2786 Date format to use for RDF entries.
2788 @item muse-journal-rdf-entry-template
2789 Template used to publish individual journal entries as RDF.
2791 This may be text or a filename.
2793 @item muse-journal-rdf-summarize-entries
2794 If non-nil, include only summaries in the RDF file, not the full data.
2796 The default is nil, because this annoys some subscribers.
2798 @item muse-journal-rss-heading-regexp
2799 A regexp that matches a journal heading from an HTML document.
2801 Paren group 1 is the ISO date, group 2 is the optional category,
2802 and group 3 is the optional heading for the entry.
2804 @item muse-journal-rss-extension
2805 Default file extension for publishing RSS 2.0 files.
2807 @item muse-journal-rss-base-url
2808 The base URL of the website referenced by the RSS file.
2810 @item muse-journal-rss-header
2811 Header used for publishing RSS 2.0 files.
2813 This may be text or a filename.
2815 @item muse-journal-rss-footer
2816 Footer used for publishing RSS 2.0 files.
2818 This may be text or a filename.
2820 @item muse-journal-rss-date-format
2821 Date format to use for RSS 2.0 entries.
2823 @item muse-journal-rss-entry-template
2824 Template used to publish individual journal entries as RSS 2.0.
2826 This may be text or a filename.
2828 @item muse-journal-rss-enclosure-types-alist
2829 File types that are accepted as RSS enclosures.
2831 This is an alist that maps file extension to content type.
2833 Useful for podcasting.
2835 @item muse-journal-rss-summarize-entries
2836 If non-nil, include only summaries in the RSS file, not the full data.
2838 The default is nil, because this annoys some subscribers.
2840 @item muse-journal-rss-markup-regexps
2841 List of markup rules for publishing a Muse journal page to RSS.
2843 For more information on the structure of this list,
2844 @xref{muse-publish-markup-regexps}.
2846 @item muse-journal-rss-markup-functions
2847 An alist of style types to custom functions for that kind of text.
2849 For more on the structure of this list,
2850 @xref{muse-publish-markup-functions}.
2852 @end table
2854 @node LaTeX, Poem, Journal, Publishing Styles
2855 @comment  node-name,  next,  previous,  up
2856 @section Publishing LaTeX documents
2858 This publishing style is capable of producing LaTeX or PDF documents.
2860 If you wish to publish PDF documents, you will need to have a good LaTeX
2861 installation.  For Debian and Ubuntu, this can be accomplished by
2862 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
2863 are also a must.
2865 If your LaTeX installation has the file @file{grffile.sty}, which may be
2866 found in the @file{texlive-latex-recommended} package for Debian and
2867 Ubuntu, then consider using it by adding the following to your header
2868 file.  This allows spaces in filenames to work.
2870 @example
2871 \usepackage@{grffile@}
2872 @end example
2874 @subheading Styles provided
2876 @table @code
2878 @cindex publishing styles, latex
2879 @item latex
2880 Publish a LaTeX document.
2882 @cindex publishing styles, pdf
2883 @item pdf
2884 Publish a PDF document, using an external LaTeX document conversion
2885 tool.
2887 @cindex publishing styles, latexcjk
2888 @item latexcjk
2889 Publish a LaTeX document with CJK (Chinese) encodings.
2891 @cindex publishing styles, pdfcjk
2892 @item pdfcjk
2893 Publish a PDF document with CJK (Chinese) encodings, using an external
2894 LaTeX document conversion tool.
2896 @cindex publishing styles, slides
2897 @item slides
2898 Publish a LaTeX document that uses the Beamer extension.  This is
2899 suitable for producing slides.
2901 Here is an example of a slide.
2903 @example
2904 <slide title="First Slide">
2905 Everything between the slide tags composes this slide.
2907 [[Some-sort-of-cute-image.png]]
2909  - A bullet point.
2910  - Another bullet point.
2911 </slide>
2912 @end example
2914 @cindex publishing styles, slides-pdf
2915 @item slides-pdf
2916 Publish a PDF document of slides, using the Beamer extension.
2918 @cindex publishing styles, lecture-notes
2919 @item lecture-notes
2920 Publish a LaTeX document that uses the Beamer extension.  This is
2921 suitable for producing lecture notes.
2923 This can also use the @verb{|<slide>|} tag.
2925 @cindex publishing styles, lecture-notes-pdf
2926 @item lecture-notes-pdf
2927 Publish a PDF document of lecture notes, using the Beamer extension.
2929 @end table
2931 @subheading Options provided
2933 @table @code
2935 @item muse-latex-extension
2936 Default file extension for publishing LaTeX files.
2938 @item muse-latex-pdf-extension
2939 Default file extension for publishing LaTeX files to PDF.
2941 @item muse-latex-pdf-browser
2942 The program to use when browsing a published PDF file.
2944 This should be a format string.
2946 @item muse-latex-pdf-program
2947 The program that is called to generate PDF content from LaTeX content.
2949 @item muse-latex-pdf-cruft
2950 Extensions of files to remove after generating PDF output successfully.
2952 @item muse-latex-header
2953 Header used for publishing LaTeX files.
2955 This may be text or a filename.
2957 @item muse-latex-footer
2958 Footer used for publishing LaTeX files.
2960 This may be text or a filename.
2962 @item muse-latexcjk-header
2963 Header used for publishing LaTeX files (CJK).
2965 This may be text or a filename.
2967 @item muse-latexcjk-footer
2968 Footer used for publishing LaTeX files (CJK).
2970 This may be text or a filename.
2972 @item muse-latex-slides-header
2973 Header for publishing of slides using LaTeX.
2975 This may be text or a filename.
2977 You must have the Beamer extension for LaTeX installed for this to work.
2979 @item muse-latex-lecture-notes-header
2980 Header publishing of lecture notes using LaTeX.
2982 This may be text or a filename.
2984 You must have the Beamer extension for LaTeX installed for this to work.
2986 @item muse-latex-markup-regexps
2987 List of markup regexps for identifying regions in a Muse page.
2989 For more on the structure of this list,
2990 @xref{muse-publish-markup-regexps}.
2992 @item muse-latex-markup-functions
2993 An alist of style types to custom functions for that kind of text.
2995 For more on the structure of this list,
2996 @xref{muse-publish-markup-functions}.
2998 @item muse-latex-markup-strings
2999 Strings used for marking up text.
3001 These cover the most basic kinds of markup, the handling of which
3002 differs little between the various styles.
3004 @item muse-latex-slides-markup-tags
3005 A list of tag specifications, for specially marking up LaTeX slides.
3007 @item muse-latexcjk-encoding-map
3008 An alist mapping emacs coding systems to appropriate CJK codings.
3009 Use the base name of the coding system (ie, without the -unix).
3011 @item muse-latexcjk-encoding-default
3012 The default Emacs buffer encoding to use in published files.
3014 This will be used if no special characters are found.
3016 @item muse-latex-markup-specials-document
3017 A table of characters which must be represented specially.
3018 These are applied to the entire document, sans already-escaped
3019 regions.
3021 @item muse-latex-markup-specials-example
3022 A table of characters which must be represented specially.
3023 These are applied to @verb{|example>|} regions.
3025 With the default interpretation of @verb{|<example>|} regions, no
3026 specials need to be escaped.
3028 @item muse-latex-markup-specials-literal
3029 A table of characters which must be represented specially.
3030 This applies to =monospaced text= and @verb{|<code>|} regions.
3032 @item muse-latex-markup-specials-url
3033 A table of characters which must be represented specially.
3034 These are applied to URLs.
3036 @item muse-latex-markup-specials-image
3037 A table of characters which must be represented specially.
3038 These are applied to image filenames.
3040 @item muse-latex-permit-contents-tag
3041 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
3042 contents.
3044 Most of the time, it is best to have a table of contents on the
3045 first page, with a new page immediately following.  To make this
3046 work with documents published in both HTML and LaTeX, we need to
3047 ignore the @verb{|<contents>|} tag.
3049 If you don't agree with this, then set this option to non-nil,
3050 and it will do what you expect.
3052 @end table
3054 @node Poem, Texinfo, LaTeX, Publishing Styles
3055 @comment  node-name,  next,  previous,  up
3056 @section Publish a poem to LaTeX or PDF
3058 The @code{muse-poem} module makes it easy to attractively publish and
3059 reference poems in the following format, using the "memoir" module for
3060 LaTeX publishing.  It will also markup poems for every other output
3061 style, though none are nearly as pretty.
3063 @example
3064 Title
3067 Body of poem
3070 Annotations, history, notes, etc.
3071 @end example
3073 Once a poem is written in this format, just publish it to PDF using the
3074 @code{poem-pdf} style.  To make an inlined reference to a poem that
3075 you've written -- for example, from a blog page -- there is a "poem" tag
3076 defined by this module.
3078 @example
3079 <poem title="name.of.poem.page">
3080 @end example
3082 Let's assume the template above was called @file{name.of.poem.page};
3083 then the above tag would result in this inclusion.
3085 @example
3086 ** Title
3088 > Body of poem
3089 @end example
3091 John Wiegley uses this module for publishing all of the poems on his
3092 website, which are at
3093 @uref{http://www.newartisans.com/johnw/poems.html}.
3095 @subheading Styles provided
3097 @table @code
3099 @cindex publishing styles, poem-latex
3100 @item poem-latex
3101 Publish a poem in LaTeX form.
3103 @cindex publishing styles, poem-pdf
3104 @item poem-pdf
3105 Publish a poem to a PDF document.
3107 @cindex publishing styles, chapbook-latex
3108 @item chapbook-latex
3109 Publish a book of poems in LaTeX form.
3111 @cindex publishing styles, chapbook-pdf
3112 @item chapbook-pdf
3113 Publish a book of poems to a PDF document.
3115 @end table
3117 @subheading Options provided
3119 @table @code
3121 @item muse-poem-latex-header
3122 Header used for publishing LaTeX poems.
3124 This may be text or a filename.
3126 @item muse-poem-latex-footer
3127 Footer used for publishing LaTeX files.
3129 This may be text or a filename.
3131 @item muse-poem-markup-strings
3132 Strings used for marking up poems.
3134 These cover the most basic kinds of markup, the handling of which
3135 differs little between the various styles.
3137 @item muse-chapbook-latex-header
3138 Header used for publishing a book of poems in LaTeX form.
3140 This may be text or a filename.
3142 @item muse-chapbook-latex-footer
3143 Footer used for publishing a book of poems in LaTeX form.
3145 This may be text or a filename.
3147 @item muse-poem-chapbook-strings
3148 Strings used for marking up books of poems.
3150 These cover the most basic kinds of markup, the handling of which
3151 differs little between the various styles.
3153 @end table
3155 @node Texinfo, XML, Poem, Publishing Styles
3156 @comment  node-name,  next,  previous,  up
3157 @section Publish entries to Texinfo format or PDF
3159 Rules for publishing a Muse file as a Texinfo article.
3161 @subheading Styles provided
3163 @table @code
3165 @cindex publishing styles, texi
3166 @item texi
3167 Publish a file in Texinfo form.
3169 @cindex publishing styles, texi
3170 @item info
3171 Generate an Info file from a Muse file.
3173 @cindex publishing styles, info-pdf
3174 @item info-pdf
3175 Publish a file in PDF form.
3177 @end table
3179 @subheading Options provided
3181 @table @code
3183 @item muse-texinfo-process-natively
3184 If non-nil, use the Emacs `texinfmt' module to make Info files.
3186 @item muse-texinfo-extension
3187 Default file extension for publishing Texinfo files.
3189 @item muse-texinfo-info-extension
3190 Default file extension for publishing Info files.
3192 @item muse-texinfo-pdf-extension
3193 Default file extension for publishing PDF files.
3195 @item muse-texinfo-header
3196 Text to prepend to a Muse page being published as Texinfo.
3198 This may be text or a filename.
3199 It may contain @verb{|<lisp>|} markup tags.
3201 @item muse-texinfo-footer
3202 Text to append to a Muse page being published as Texinfo.
3204 This may be text or a filename.
3205 It may contain @verb{|<lisp>|} markup tags.
3207 @item muse-texinfo-markup-regexps
3208 List of markup rules for publishing a Muse page to Texinfo.
3210 For more on the structure of this list,
3211 @xref{muse-publish-markup-regexps}.
3213 @item muse-texinfo-markup-functions
3214 An alist of style types to custom functions for that kind of text.
3216 For more on the structure of this list,
3217 @xref{muse-publish-markup-functions}.
3219 @item muse-texinfo-markup-strings
3220 Strings used for marking up text.
3222 These cover the most basic kinds of markup, the handling of which
3223 differs little between the various styles.
3225 @item muse-texinfo-markup-specials
3226 A table of characters which must be represented specially.
3228 @item muse-texinfo-markup-specials
3229 A table of characters which must be represented specially.
3230 These are applied to URLs.
3232 @end table
3234 @node XML, , Texinfo, Publishing Styles
3235 @comment  node-name,  next,  previous,  up
3236 @section Publish entries to XML
3238 Muse is capable of publishing XML documents, with the help of the
3239 @file{muse-xml.el} module.
3241 A RelaxNG schema is available as part of the Muse distribution in the
3242 @file{etc/muse.rnc} file.
3244 @subheading Styles provided
3246 @table @code
3248 @cindex publishing styles, xml
3249 @item xml
3250 Publish a file in XML form.
3252 @end table
3254 @subheading Options provided
3256 @table @code
3258 @cindex muse-xml-encoding-map
3259 @item muse-xml-encoding-map
3260 An alist mapping Emacs coding systems to appropriate XML charsets.
3261 Use the base name of the coding system (i.e. without the -unix).
3263 @item muse-xml-markup-specials
3264 A table of characters which must be represented specially in all
3265 XML-like markup formats.
3267 @item muse-xml-markup-specials-url-extra
3268 A table of characters which must be represented specially in all
3269 XML-like markup formats.
3271 These are extra characters that are escaped within URLs.
3273 @item muse-xml-extension
3274 Default file extension used for publishing XML files.
3276 @item muse-xml-header
3277 Header used for publishing XML files.
3279 This may be text or a filename.
3281 @item muse-xml-footer
3282 Footer used for publishing XML files.
3284 This may be text or a filename.
3286 @item muse-xml-markup-regexps
3287 List of markup rules for publishing a Muse page to XML.
3289 For more on the structure of this list,
3290 @xref{muse-publish-markup-regexps}.
3292 @item muse-xml-markup-functions
3293 An alist of style types to custom functions for that kind of text.
3295 For more on the structure of this list,
3296 @xref{muse-publish-markup-functions}.
3298 @item muse-xml-markup-strings
3299 Strings used for marking up text.
3301 These cover the most basic kinds of markup, the handling of which
3302 differs little between the various styles.
3304 @item muse-xml-encoding-default
3305 The default Emacs buffer encoding to use in published files.
3307 This will be used if no special characters are found.
3309 @item muse-xml-charset-default
3310 The default XML charset to use if no translation is found in
3311 @code{muse-xml-encoding-map}.
3313 @end table
3316 @node Extending Muse, Miscellaneous, Publishing Styles, Top
3317 @comment  node-name,  next,  previous,  up
3318 @chapter Making your own publishing styles
3320 @menu
3321 * Markup Functions::            Specifying functions to mark up text.
3322 * Markup Regexps::              Markup rules for publishing.
3323 * Markup Strings::              Strings specific to a publishing style.
3324 * Markup Tags::                 Tag specifications for special markup.
3325 * Style Elements::              Parameters used for defining styles.
3326 * Deriving Styles::             Deriving a new style from an existing
3327                                   one.
3328 @end menu
3330 @node Markup Functions, Markup Regexps, , Extending Muse
3331 @comment  node-name,  next,  previous,  up
3332 @section Specifying functions to mark up text
3333 @cindex publishing, markup functions
3335 @anchor{muse-publish-markup-functions}
3336 @code{muse-publish-markup-functions}
3338 An alist of style types to custom functions for that kind of text.
3340 This is used by publishing styles to attempt to minimize the amount of
3341 custom regexps that each has to define.  @file{muse-publish} provides
3342 rules for the most common types of markup.
3344 Each member of the list is of the following form.
3346 @example
3347 (SYMBOL FUNCTION)
3348 @end example
3350 @itemize @bullet
3351 @item SYMBOL
3352 Describes the type of text to associate with this rule.
3353 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3355 @item FUNCTION
3356 Function to use to mark up this kind of rule if no suitable function is
3357 found through the @option{:functions} tag of the current style.
3358 @end itemize
3360 @node Markup Regexps, Markup Strings, Markup Functions, Extending Muse
3361 @comment  node-name,  next,  previous,  up
3362 @section Markup rules for publishing
3363 @cindex publishing, markup regexps
3364 @cindex publishing, rules
3366 @anchor{muse-publish-markup-regexps}
3367 @code{muse-publish-markup-regexps}
3369 List of markup rules for publishing a page with Muse.
3371 The rules given in this variable are invoked first, followed by whatever
3372 rules are specified by the current style.
3374 Each member of the list is either a function, or a list of the following
3375 form.
3377 @example
3378 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3379 @end example
3381 @itemize @bullet
3382 @item REGEXP
3383 A regular expression, or symbol whose value is a regular expression,
3384 which is searched for using `re-search-forward'.
3386 @item TEXT-BEGIN-GROUP
3387 The matching group within that regexp which denotes the beginning of the
3388 actual text to be marked up.
3390 @item REPLACEMENT-TEXT
3391 A string that will be passed to `replace-match'.
3393 If it is not a string, but a function, it will be called to determine
3394 what the replacement text should be (it must return a string).  If it is
3395 a symbol, the value of that symbol should be a string.
3396 @end itemize
3398 The replacements are done in order, one rule at a time.  Writing
3399 the regular expressions can be a tricky business.  Note that case
3400 is never ignored.  `case-fold-search' is always bound to nil
3401 while processing the markup rules.
3403 @subheading Publishing order
3405 This is the order that the publishing rules are consulted, by default.
3406 This may be changed by customizing @code{muse-publish-markup-regexps}.
3408 @table @code
3410 @item trailing and leading whitespace
3411 Remove trailing and leading whitespace from a file.
3413 @item directive
3414 @samp{#directive}
3416 This is only recognized at the beginning of a file.
3418 @item comment
3419 @samp{; a commented line}
3421 @item tag
3422 @samp{<tag>}
3424 @item comment
3425 @samp{; comment}
3427 @item explicit links
3428 Prevent emphasis characters in explicit links from being marked up.
3430 Don't actually publish them here, just add a special no-emphasis text
3431 property.
3433 @item word
3434 Whitespace-delimited word, possibly with emphasis characters
3436 This function is responsible for marking up emphasis and escaping some
3437 specials.
3439 @item heading
3440 @samp{** Heading}
3442 Outline-mode style headings.
3444 @item enddots
3445 @samp{....}
3447 These are ellipses with a dot at end.
3449 @item dots
3450 @samp{...}
3452 Ellipses.
3454 @item rule
3455 @samp{----}
3457 Horizontal rule or section separator.
3459 @item no-break-space
3460 @samp{~~}
3462 Prevent lines from being split before or after these characters.
3464 @item line-break
3465 @samp{<br>}
3467 Break a line at point.
3469 @item fn-sep
3470 @samp{Footnotes:}
3472 Beginning of footnotes section.
3474 @item footnote
3475 @samp{[1]}
3477 Footnote definition or reference.  If at beginning of line, it is a
3478 definition.
3480 @item list
3481 @itemize @bullet
3482 @item
3483 @samp{ 1. }
3485 @item
3486 @samp{ - }
3488 @item
3489 @samp{term :: }
3490 @end itemize
3492 Numbered list, item list, or term definition list.
3494 @item table-el
3496 @file{table.el} style tables
3498 @item table
3499 @samp{table | cells}
3501 Muse tables or orgtbl-mode style tables.
3503 @item quote
3504 spaces before beginning of text
3506 Blockquotes.
3508 @item emdash
3509 @samp{--}
3511 2-wide dash
3513 @item verse
3514 @samp{> verse text}
3516 @item anchor
3517 @samp{#anchor}
3519 @item link
3520 @samp{[[explicit][links]]}
3522 @item url
3523 @samp{http://example.com/}
3525 @item email
3526 @samp{bare-email@@example.com}
3528 @end table
3530 @node Markup Strings, Markup Tags, Markup Regexps, Extending Muse
3531 @comment  node-name,  next,  previous,  up
3532 @section Strings specific to a publishing style
3533 @cindex publishing, markup strings
3535 @dfn{Markup strings} are strings used for marking up text for a
3536 particular style.
3538 These cover the most basic kinds of markup, the handling of which
3539 differs little between the various styles.
3541 @subheading Available markup strings
3543 @table @code
3545 @item image-with-desc
3546 An image and a description.
3548 Argument 1: image without extension.  Argument 2: image extension.
3549 Argument 3: description.
3551 @item image
3552 An inlined image.
3554 Argument 1: image without extension.  Argument 2: image extension.
3556 @item image-link
3557 An image with a link around it.
3559 Argument 1: link.  Argument 2: image without extension.
3560 Argument 3: image extension.
3562 @item anchor-ref
3563 A reference to an anchor on the current page.
3565 Argument 1: anchor name.  Argument 2: description if one exists, or the
3566 original link otherwise.
3568 @item url
3569 A URL without a description.
3571 Argument 1: URL.
3573 @item link
3574 A link to a Muse page with a description.
3576 Argument 1: link.  Argument 2: description if one exists, or the
3577 original link otherwise.
3579 @item link-and-anchor
3580 A link to a Muse page with an anchor, and a description.
3582 Argument 1: link.  Argument 2: anchor name.
3583 Argument 3: description if one exists, or the original link otherwise.
3584 Argument 4: link without an extension.
3586 @item email-addr
3587 A link to an email address.
3589 Argument 1: email address.  Argument 2: email address.
3591 @item anchor
3592 An anchor.
3594 Argument 1: name of anchor.
3596 @item emdash
3597 A 2-length dash.
3599 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
3601 @item comment-begin
3602 Beginning of a comment.
3604 @item comment-end
3605 End of a comment.
3607 @item rule
3608 A horizontal line or space.
3610 @item no-break-space
3611 A space that separates two words which are not to be separated.
3613 @item footnote
3614 Beginning of footnote.
3616 @item footnote-end
3617 End of footnote.
3619 @item footnotemark
3620 Mark a reference for the current footnote.
3622 Argument 1: number of this footnote.
3624 @item footnotemark-end
3625 End of a reference for the current footnote.
3627 @item footnotetext
3628 Indicate the text of the current footnote.
3630 Argument 1: number of this footnote.
3632 @item footnotetext-end
3633 End of a footnote text line.
3635 @item fn-sep
3636 Text used to replace ``Footnotes:'' line.
3638 @item dots
3639 3 dots.
3641 @item enddots
3642 4 dots.
3644 @item part
3645 Beginning of a part indicator line.  This is used by book publishing.
3647 @item part-end
3648 End of a part indicator line.  This is used by book publishing.
3650 @item chapter
3651 Beginning of a chapter indicator line.  This is used by book publishing.
3653 @item chapter-end
3654 End of a chapter indicator line.  This is used by book publishing.
3656 @item section
3657 Beginning of level 1 section indicator line.
3659 Argument 1: level of section; always 1.
3661 @item section-end
3662 End of level 1 section indicator line.
3664 Argument 1: level of section; always 1.
3666 @item subsection
3667 Beginning of level 2 section indicator line.
3669 Argument 1: level of section; always 2.
3671 @item subsection-end
3672 End of level 2 section indicator line.
3674 Argument 1: level of section; always 2.
3676 @item subsubsection
3677 Beginning of level 3 section indicator line.
3679 Argument 1: level of section; always 3.
3681 @item subsubsection-end
3682 End of level 3 section indicator line.
3684 Argument 1: level of section; always 3.
3686 @item section-other
3687 Beginning of section indicator line, where level is greater than 3.
3689 Argument 1: level of section.
3691 @item section-other-end
3692 End of section indicator line, where level is greater than 3.
3694 Argument 1: level of section.
3696 @item begin-underline
3697 Beginning of underlined text.
3699 @item end-underline
3700 End of underlined text.
3702 @item begin-literal
3703 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
3704 =teletype text=.
3706 @item end-literal
3707 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
3708 text=.
3710 @item begin-emph
3711 Beginning of the first level of emphasized text.
3713 @item end-emph
3714 End of the first level of emphasized text.
3716 @item begin-more-emph
3717 Beginning of the second level of emphasized text.
3719 @item end-more-emph
3720 End of the second level of emphasized text.
3722 @item begin-most-emph
3723 Beginning of the third (and final) level of emphasized text.
3725 @item end-most-emph
3726 End of the third (and final) level of emphasized text.
3728 @item begin-verse
3729 Beginning of verse text.
3731 @item verse-space
3732 String used to each space that is further indented than the beginning of
3733 the verse.
3735 @item begin-verse-line
3736 Beginning of a line of verse.
3738 @item empty-verse-line
3739 End of a line of verse.
3741 @item begin-last-stanza-line
3742 Beginning of the last line of a verse stanza.
3744 @item end-last-stanza-line
3745 End of the last line of a verse stanza.
3747 @item end-verse
3748 End of verse text.
3750 @item begin-example
3751 Beginning of an example region.  To make use of this, an
3752 @samp{<example>} tag is needed.
3754 @item end-example
3755 End of an example region.  To make use of this, an @samp{</example>} tag
3756 is needed.
3758 @item begin-center
3759 Begin a centered line.
3761 @item end-center
3762 End a centered line.
3764 @item begin-quote
3765 Begin a quoted region.
3767 @item end-quote
3768 End a quoted region.
3770 @item begin-quote-item
3771 Begin a quote paragraph.
3773 @item end-quote-item
3774 End a quote paragraph.
3776 @item begin-uli
3777 Begin an unordered list.
3779 @item end-uli
3780 End an unordered list.
3782 @item begin-uli-item
3783 Begin an unordered list item.
3785 @item end-uli-item
3786 End an unordered list item.
3788 @item begin-oli
3789 Begin an ordered list.
3791 @item end-oli
3792 End an ordered list.
3794 @item begin-oli-item
3795 Begin an ordered list item.
3797 @item end-oli-item
3798 End an ordered list item.
3800 @item begin-dl
3801 Begin a definition list.
3803 @item end-dl
3804 End a definition list.
3806 @item begin-dl-item
3807 Begin a definition list item.
3809 @item end-dl-item
3810 End a definition list item.
3812 @item begin-ddt
3813 Begin a definition list term.
3815 @item end-ddt
3816 End a definition list term.
3818 @item begin-dde
3819 Begin a definition list entry.
3821 @item end-dde
3822 End a definition list entry.
3824 @item begin-table
3825 Begin a table.
3827 @item end-table
3828 End a table.
3830 @item begin-table-group
3831 Begin a table grouping.
3833 @item end-table-group
3834 End a table grouping.
3836 @item begin-table-row
3837 Begin a table row.
3839 @item end-table-row
3840 End a table row.
3842 @item begin-table-entry
3843 Begin a table entry.
3845 @item end-table-entry
3846 End a table entry.
3848 @end table
3850 @node Markup Tags, Style Elements, Markup Strings, Extending Muse
3851 @comment  node-name,  next,  previous,  up
3852 @section Tag specifications for special markup
3853 @cindex publishing, markup tags
3855 @anchor{muse-publish-markup-tags}
3856 @code{muse-publish-markup-tags}
3858 A list of tag specifications, for specially marking up text.
3860 XML-style tags are the best way to add custom markup to Muse.  This is
3861 easily accomplished by customizing this list of markup tags.
3863 For each entry, the name of the tag is given, whether it expects a
3864 closing tag and/or an optional set of attributes, whether it is
3865 nestable, and a function that performs whatever action is desired within
3866 the delimited region.
3868 The tags themselves are deleted during publishing, before the function
3869 is called.  The function is called with three arguments, the beginning
3870 and end of the region surrounded by the tags.  If properties are
3871 allowed, they are passed as a third argument in the form of an alist.
3872 The `end' argument to the function is always a marker.
3874 Point is always at the beginning of the region within the tags, when the
3875 function is called.  Wherever point is when the function finishes is
3876 where tag markup will resume.
3878 These tag rules are processed once at the beginning of markup, and once
3879 at the end, to catch any tags which may have been inserted in-between.
3881 @node Style Elements, Deriving Styles, Markup Tags, Extending Muse
3882 @comment  node-name,  next,  previous,  up
3883 @section Parameters used for defining styles
3884 @cindex publishing, style elements
3886 Style elements are tags that define a style.  Use either
3887 @code{muse-define-style} or @code{muse-derive-style}
3888 (@pxref{Deriving Styles}) to create a new style.
3890 @defun muse-define-style name &rest elements
3891 @end defun
3893 @subheading Usable elements
3895 @table @option
3897 @item :suffix
3898 File extension to use for publishing files with this style.
3900 @item :link-suffix
3901 File extension to use for publishing links to Muse files with this
3902 style.
3904 @item :osuffix
3905 File extension to use for publishing second-stage files with this style.
3907 For example, PDF publishing generates a LaTeX file first, then a PDF
3908 from that LaTeX file.
3910 @item :regexps
3911 List of markup rules for publishing a page with Muse.
3912 @xref{muse-publish-markup-regexps}.
3914 @item :functions
3915 An alist of style types to custom functions for that kind of text.
3916 @xref{muse-publish-markup-functions}.
3918 @item :strings
3919 Strings used for marking up text with this style.
3921 These cover the most basic kinds of markup, the handling of which
3922 differs little between the various styles.
3924 @item :tags
3925 A list of tag specifications, used for handling extra tags.
3926 @xref{muse-publish-markup-tags}.
3928 @item :specials
3929 A table of characters which must be represented specially.
3931 @item :before
3932 A function that is to be executed on the newly-created publishing buffer
3933 (or the current region) before any publishing occurs.
3935 This is used to set extra parameters that direct the publishing process.
3937 @item :before-end
3938 A function that is to be executed on the publishing buffer (or the
3939 current region) immediately after applying all of the markup regexps.
3941 This is used to fix the order of table elements (header, footer, body)
3942 in XML-ish styles.
3944 @item :after
3945 A function that is to be executed on the publishing buffer after
3946 :before-end, and immediately after inserting the header and footer.
3948 This is used for generating the table of contents as well as setting the
3949 file coding system.
3951 @item :final
3952 A function that is to be executed after saving the published file, but
3953 while still in its buffer.
3955 This is used for generating second-stage documents like PDF files from
3956 just-published LaTeX files.
3958 The function must accept three arguments: the name of the muse source
3959 file, the name of the just-published file, and the name of the
3960 second-stage target file.  The name of the second-stage target file is
3961 the same as that of the just-published file if no second-stage
3962 publishing is required.
3964 @item :header
3965 Header used for publishing files of this style.
3967 This may be a variable, text, or a filename.  It is inserted at the
3968 beginning of a file, after evaluating the publishing markup.
3970 @item :footer
3971 Footer used for publishing files of this style.
3973 This may be a variable, text, or a filename.  It is inserted at the end
3974 of a file, after evaluating the publishing markup.
3976 @item :style-sheet
3977 Style sheet used for publishing files of this style.
3979 This may be a variable or text.  It is used in the header of HTML and
3980 XHTML based publishing styles.
3982 @item :browser
3983 The function used to browse the published result of files of this style.
3985 @end table
3987 @node Deriving Styles, , Style Elements, Extending Muse
3988 @comment  node-name,  next,  previous,  up
3989 @section Deriving a new style from an existing one
3990 @cindex publishing styles, deriving
3992 To create a new style from an existing one, use @code{muse-derive-style}
3993 as follows.  This is a good way to fix something you don't like about a
3994 particular publishing style, or to personalize it.
3996 @defun muse-derive-style new-name base-name &rest elements
3997 @end defun
3999 The derived name is a string defining the new style, such as "my-html".
4000 The base name must identify an existing style, such as "html" -- if you
4001 have loaded @file{muse-html}.  The style parameters are the same as
4002 those used to create a style, except that they override whatever
4003 definitions exist in the base style.  However, some definitions only
4004 partially override.  The following parameters support partial
4005 overriding.
4007 @xref{Style Elements}, for a complete list of all parameters.
4009 @table @option
4011 @item :functions
4012 If a markup function is not found in the derived style's function list,
4013 the base style's function list will be queried.
4015 @item :regexps
4016 All regexps in the current style and the base style(s) will be used.
4018 @item :strings
4019 If a markup string is not found in the derived style's string list, the
4020 base style's string list will be queried.
4022 @end table
4024 @node Miscellaneous, Getting Help and Reporting Bugs, Extending Muse, Top
4025 @comment  node-name,  next,  previous,  up
4026 @chapter Miscellaneous add-ons, like a minor mode
4028 @menu
4029 * Muse List Edit Minor Mode::   Edit lists easily in other major modes.
4030 @end menu
4032 @node Muse List Edit Minor Mode, , , Miscellaneous
4033 @comment  node-name,  next,  previous,  up
4034 @section Edit lists easily in other major modes
4035 @cindex muse-list-edit-minor-mode
4037 @code{muse-list-edit-minor-mode} is meant to be used with other major
4038 modes, such as Message (for composing email) and debian-changelog-mode
4039 (for editing debian/changelog files).
4041 It implements practically perfect support for editing and filling lists.
4042 It can even handle nested lists.  In addition to Muse-specific list
4043 items ("-", numbers, definition lists, footnotes), it can also handle
4044 items that begin with "*" or "+".  Filling list items behaves in the
4045 same way that it does in Muse, regardless of whether filladapt is also
4046 enabled, which is the primary reason to use this tool.
4048 @subheading Installation
4050 To use it, add ``(require 'muse-mode)'' to your Emacs customization file
4051 and add the function @code{turn-on-muse-list-edit-minor-mode} to any
4052 mode hooks where you wish to enable this minor mode.
4054 @subheading Keybindings
4056 @code{muse-list-edit-minor-mode} uses the following keybindings.
4058 @table @kbd
4060 @item M-RET (`muse-l-e-m-m-insert-list-item')
4061 Insert a new list item at point, using the indentation level of the
4062 current list item.
4064 @item C-< (`muse-l-e-m-m-decrease-list-item-indent')
4065 Decrease indentation of the current list item.
4067 @item C-> (`muse-l-e-m-m-increase-list-item-indent')
4068 Increase indentation of the current list item.
4070 @end table
4072 @subheading Functions
4074 @defun muse-list-edit-minor-mode
4075 This is a global minor mode for editing files with lists.
4076 It is meant to be used with other major modes, and not with Muse mode.
4078 Interactively, with no prefix argument, toggle the mode.
4079 With universal prefix @var{arg} turn mode on.
4080 With zero or negative @var{arg} turn mode off.
4082 This minor mode provides the Muse keybindings for editing lists,
4083 and support for filling lists properly.
4085 It recognizes not only Muse-style lists, which use the "-"
4086 character or numbers, but also lists that use asterisks or plus
4087 signs.  This should make the minor mode generally useful.
4089 Definition lists and footnotes are also recognized.
4091 Note that list items may omit leading spaces, for compatibility
4092 with modes that set @code{left-margin}, such as
4093 @code{debian-changelog-mode}.
4094 @end defun
4096 @defun turn-on-muse-list-edit-minor-mode
4097 Unconditionally turn on Muse list edit minor mode.
4098 @end defun
4100 @defun turn-off-muse-list-edit-minor-mode
4101 Unconditionally turn off Muse list edit minor mode.
4102 @end defun
4104 @node Getting Help and Reporting Bugs, History, Miscellaneous, Top
4105 @comment  node-name,  next,  previous,  up
4106 @chapter Getting Help and Reporting Bugs
4107 @cindex help, getting
4108 @cindex bugs, reporting
4110 After you have read this guide, if you still have questions about
4111 Muse, or if you have bugs to report, there are several places you can
4114 @itemize @bullet
4116 @item
4117 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
4118 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
4119 to it.
4121 @item
4122 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
4123 that Michael Olson (the current maintainer) made for Muse.
4125 @item
4126 Muse has several different mailing lists.
4128 @table @samp
4130 @item muse-el-announce
4131 Low-traffic list for Muse-related announcements.
4133 You can join this mailing list (@email{muse-el-announce@@gna.org})
4134 using the subscription form at
4135 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
4136 mailing list is also available via Gmane (@url{http://gmane.org/}). The
4137 group is called @samp{gmane.emacs.muse.announce}.
4139 @item muse-el-discuss
4140 Discussion, bugfixes, suggestions, tips, and the like for Muse.
4141 This mailing list also includes the content of muse-el-announce.
4143 You can join this mailing list (@email{muse-el-discuss@@gna.org})
4144 using the subscription form at
4145 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
4146 list is also available via Gmane with the identifier
4147 @samp{gmane.emacs.muse.general}.
4149 @item muse-el-logs
4150 Log messages for commits made to Muse.
4152 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
4153 the subscription form at
4154 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
4155 is also available via Gmane with the identifier
4156 @samp{gmane.emacs.muse.scm}.
4158 @item muse-el-commits
4159 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
4160 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
4161 sent to this list automatically.
4163 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
4164 the subscription form at
4165 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
4166 is also available via Gmane with the identifier
4167 @samp{gmane.emacs.muse.cvs}.
4169 @item muse-el-internationalization
4170 Discussion of translation of the Muse website and documentation into
4171 many languages.
4173 You can join this mailing list
4174 (@email{muse-el-internationalization@@gna.org}) using the subscription
4175 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
4176 mailing list is also available via Gmane with the identifier
4177 @samp{gmane.emacs.muse.internationalization}.
4179 @end table
4181 @item
4182 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
4183 contributors are frequently around and willing to answer your
4184 questions.  The @samp{#muse} channel is also available for
4185 Muse-specific help, and its current maintainer hangs out there.
4187 @item
4188 The maintainer of Emacs Muse, Michael Olson, may be contacted at
4189 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
4190 it is often better to use the muse-el-discuss mailing list.
4192 @end itemize
4194 @node History, Contributors, Getting Help and Reporting Bugs, Top
4195 @comment  node-name,  next,  previous,  up
4196 @chapter History of This Document
4197 @cindex history, of Muse
4199 @itemize
4200 @item 2004
4201 John Wiegley started Muse upon realizing that EmacsWiki had some serious
4202 limitations. Around February 2004, he started making "emacs-wiki version
4203 3.00 APLHA", which eventually became known as Muse.
4205 Most of those who frequent the emacs-wiki mailing list continued to use
4206 emacs-wiki, mainly because Planner hasn't been ported over to it.
4208 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
4209 John Wiegley's request.
4211 @item 2005
4212 Michael Olson overhauled this document and added many new sections in
4213 preparation for the first release of Muse (3.01).
4215 @end itemize
4217 @node Contributors, GNU Free Documentation License, History, Top
4218 @comment  node-name,  next,  previous,  up
4219 @chapter Contributors to This Documentation
4220 @cindex contributors
4222 The first draft of this document was taken from the emacs-wiki texinfo
4223 manual.  Michael Olson adapted it for Muse and added most of its
4224 content.
4226 John Sullivan did a majority of the work on the emacs-wiki texinfo
4227 manual.
4229 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
4230 emacs-wiki texinfo manual.
4233 @node GNU Free Documentation License, Concept Index, Contributors, Top
4234 @appendix GNU Free Documentation License
4235 @include doclicense.texi
4238 @node Concept Index,  , GNU Free Documentation License, Top
4239 @comment  node-name,  next,  previous,  up
4240 @unnumbered Index
4242 @printindex cp
4244 @bye