Update version, note that Ikiwiki support is not complete.
[muse-el.git] / texi / muse.texi
blobf62c0302646217ee92a23f6725c4aed9291e10e0
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.20.
17 Copyright @copyright{} 2004, 2005, 2006, 2007,
18 2008, 2009, 2010  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 Mode 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 Note: Support for Ikiwiki is not yet complete.  Use at your own risk.
2543 Ikiwiki is a wiki compiler (@url{http://ikiwiki.info/}).  Emacs Muse can
2544 (not yet) be used as a source format for Ikiwiki pages with the plugin
2545 @file{IkiWiki::Plugin::muse}.
2547 The @file{lisp/muse-ikiwiki.el} file provides publishing functions and
2548 styles for Ikiwiki.  The plugin for Ikiwiki to recognize Muse files is
2549 provided by the @file{contrib/ikiwiki/IkiWiki/Plugin/muse.pm} file.  Two
2550 sample init files are available in the @file{examples/ikiwiki}
2551 directory.  Configure your @file{ikiwiki.setup} file so that the
2552 @code{muse_init} variable has the location of your Muse init file.
2554 If you are using CGI, The directory @file{contrib/ikiwiki/IkiWiki} must
2555 be copied to the same directory as the CGI script that Ikiwiki
2556 generates.  When publishing your wiki, the @var{PERL5LIB} environment
2557 variable must contain the path to the @file{contrib/ikiwiki/IkiWiki}
2558 directory.
2560 @subheading Styles provided
2562 @table @code
2564 @cindex publishing styles, ikiwiki
2565 @item ikiwiki
2566 Supports publishing XHTML output that Ikiwiki can understand.
2568 @end table
2570 @subheading Options provided
2572 @table @code
2574 @item muse-ikiwiki-header
2575 Header used for publishing Ikiwiki output files.
2577 This may be text or a filename.
2579 @item muse-ikiwiki-footer
2580 Footer used for publishing Ikiwiki output files.
2582 This may be text or a filename.
2584 @end table
2586 @subheading Other relevant options
2588 @table @code
2590 @item muse-colors-evaluate-lisp-tags
2591 Specify whether to evaluate the contents of @verb{|<lisp>|} tags at
2592 display time.  If nil, don't evaluate them.  If non-nil, evaluate
2593 them.
2595 The actual contents of the buffer are not changed, only the
2596 displayed text.
2598 @item muse-html-src-allowed-modes
2599 Modes that we allow the @verb{|<src>|} tag to colorize.  If @code{t},
2600 permit the @verb{|<src>|} tag to colorize any mode.
2602 If a list of mode names, such as @code{'("html" "latex")}, and the lang
2603 argument to @verb{|<src>|} is not in the list, then use fundamental mode
2604 instead.
2606 @item muse-publish-enable-dangerous-tags
2607 If non-nil, publish tags like @verb{|<lisp>|} and @verb{|<command>|}
2608 that can call external programs or expose sensitive information.
2609 Otherwise, ignore tags like this.
2611 This is useful to set to @code{nil} when the file to publish is coming
2612 from an untrusted source.
2614 @end table
2616 @node Journal, LaTeX, Ikiwiki, Publishing Styles
2617 @comment  node-name,  next,  previous,  up
2618 @section Keeping a journal or blog
2619 @cindex journal
2620 @cindex blog, journal style
2622 The module facilitates the keeping and publication of a journal.  When
2623 publishing to HTML, it assumes the form of a web log, or blog.
2625 The input format for each entry is as follows.
2627 @example
2628 * 20040317: Title of entry
2630 text for the entry.
2632 <qotd>
2633 "You know who you are. It comes down to a simple gut check: You
2634 either love what you do or you don't. Period." -- P. Bronson
2635 </qotd>
2636 @end example
2638 The "qotd", or Quote of the Day, is entirely optional.  When generated
2639 to HTML, this entry is rendered as the following.
2641 @example
2642 <div class="entry">
2643   <div class="entry-qotd">
2644     <h3>Quote of the Day:</h3>
2645     <p>"You know who you are. It comes down to a simple gut
2646       check: You either love what you do or you don't. Period."
2647       -- P. Bronson</p>
2648   </div>
2649   <div class="entry-body">
2650     <div class="entry-head">
2651       <div class="entry-date">
2652         <span class="date">March 17, 2004</span>
2653       </div>
2654       <div class="entry-title">
2655         <h2>Title of entry</h2>
2656       </div>
2657     </div>
2658     <div class="entry-text">
2659       <p>Text for the entry.</p>
2660     </div>
2661   </div>
2662 </div>
2663 @end example
2665 The plurality of "div" tags makes it possible to display the entries in
2666 any form you wish, using a CSS style.
2668 Also, an .RDF file can be generated from your journal by publishing it
2669 with the "rdf" style.  It uses the first two sentences of the first
2670 paragraph of each entry as its "description", and auto-generates tags
2671 for linking to the various entries.
2673 @subheading muse-project-alist considerations
2675 If you wish to publish an RDF or RSS feed, it is important to include
2676 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2677 for your Journal projects.  An example follows.
2679 @example
2680 (setq muse-project-alist
2681       '(("Journal" ("~/Journal/"
2682                     :default "journal")
2683         (:base "journal-rss"
2684                :base-url "http://example.org/journal/"
2685                :path "~/public_html/journal"))))
2686 @end example
2688 @subheading Styles provided
2690 @table @code
2692 @cindex publishing styles, journal-html
2693 @item journal-html
2694 Publish journal entries as an HTML document.
2696 @cindex publishing styles, journal-xhtml
2697 @item journal-xhtml
2698 Publish journal entries as an XHTML document.
2700 @cindex publishing styles, journal-latex
2701 @item journal-latex
2702 Publish journal entries as a LaTeX document.
2704 @cindex publishing styles, journal-pdf
2705 @item journal-pdf
2706 Publish journal entries as a PDF document.
2708 @cindex publishing styles, journal-book-latex
2709 @item journal-book-latex
2710 Publish journal entries as a LaTeX book.
2712 @cindex publishing styles, journal-book-pdf
2713 @item journal-book-pdf
2714 Publish journal entries as a PDF book.
2716 @cindex publishing styles, journal-rdf
2717 @cindex publishing styles, RSS 1.0
2718 @item journal-rdf
2719 Publish journal entries as an RDF file (RSS 1.0).
2721 @cindex publishing styles, journal-rss
2722 @cindex publishing styles, RSS 2.0
2723 @item journal-rss
2724 Publish journal entries as an RSS file (RSS 2.0).
2726 @cindex publishing styles, journal-rss-entry
2727 @item journal-rss-entry
2728 Used internally by @code{journal-rss} and @code{journal-rdf} for
2729 publishing individual entries.
2731 @end table
2733 @subheading Options provided
2735 @table @code
2737 @item muse-journal-heading-regexp
2738 A regexp that matches a journal heading.
2740 Paren group 1 is the ISO date, group 2 is the optional category, and
2741 group 3 is the optional heading for the entry.
2743 @item muse-journal-date-format
2744 Date format to use for journal entries.
2746 @item muse-journal-html-heading-regexp
2747 A regexp that matches a journal heading from an HTML document.
2749 Paren group 1 is the ISO date, group 2 is the optional category, and
2750 group 3 is the optional heading for the entry.
2752 @item muse-journal-html-entry-template
2753 Template used to publish individual journal entries as HTML.
2755 This may be text or a filename.
2757 @item muse-journal-latex-section
2758 Template used to publish a LaTeX section.
2760 @item muse-journal-latex-subsection
2761 Template used to publish a LaTeX subsection.
2763 @item muse-journal-markup-tags
2764 A list of tag specifications, for specially marking up Journal entries.
2766 @xref{muse-publish-markup-tags}, for more information.
2768 This is used by @code{journal-latex} and its related styles, as well as
2769 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2770 @code{journal-rss} use.
2772 @item muse-journal-rdf-extension
2773 Default file extension for publishing RDF (RSS 1.0) files.
2775 @item muse-journal-rdf-base-url
2776 The base URL of the website referenced by the RDF file.
2778 @item muse-journal-rdf-header
2779 Header used for publishing RDF (RSS 1.0) files.
2781 This may be text or a filename.
2783 @item muse-journal-rdf-footer
2784 Footer used for publishing RDF (RSS 1.0) files.
2786 This may be text or a filename.
2788 @item muse-journal-rdf-date-format
2789 Date format to use for RDF entries.
2791 @item muse-journal-rdf-entry-template
2792 Template used to publish individual journal entries as RDF.
2794 This may be text or a filename.
2796 @item muse-journal-rdf-summarize-entries
2797 If non-nil, include only summaries in the RDF file, not the full data.
2799 The default is nil, because this annoys some subscribers.
2801 @item muse-journal-rss-heading-regexp
2802 A regexp that matches a journal heading from an HTML document.
2804 Paren group 1 is the ISO date, group 2 is the optional category,
2805 and group 3 is the optional heading for the entry.
2807 @item muse-journal-rss-extension
2808 Default file extension for publishing RSS 2.0 files.
2810 @item muse-journal-rss-base-url
2811 The base URL of the website referenced by the RSS file.
2813 @item muse-journal-rss-header
2814 Header used for publishing RSS 2.0 files.
2816 This may be text or a filename.
2818 @item muse-journal-rss-footer
2819 Footer used for publishing RSS 2.0 files.
2821 This may be text or a filename.
2823 @item muse-journal-rss-date-format
2824 Date format to use for RSS 2.0 entries.
2826 @item muse-journal-rss-entry-template
2827 Template used to publish individual journal entries as RSS 2.0.
2829 This may be text or a filename.
2831 @item muse-journal-rss-enclosure-types-alist
2832 File types that are accepted as RSS enclosures.
2834 This is an alist that maps file extension to content type.
2836 Useful for podcasting.
2838 @item muse-journal-rss-summarize-entries
2839 If non-nil, include only summaries in the RSS file, not the full data.
2841 The default is nil, because this annoys some subscribers.
2843 @item muse-journal-rss-markup-regexps
2844 List of markup rules for publishing a Muse journal page to RSS.
2846 For more information on the structure of this list,
2847 @xref{muse-publish-markup-regexps}.
2849 @item muse-journal-rss-markup-functions
2850 An alist of style types to custom functions for that kind of text.
2852 For more on the structure of this list,
2853 @xref{muse-publish-markup-functions}.
2855 @end table
2857 @node LaTeX, Poem, Journal, Publishing Styles
2858 @comment  node-name,  next,  previous,  up
2859 @section Publishing LaTeX documents
2861 This publishing style is capable of producing LaTeX or PDF documents.
2863 If you wish to publish PDF documents, you will need to have a good LaTeX
2864 installation.  For Debian and Ubuntu, this can be accomplished by
2865 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
2866 are also a must.
2868 If your LaTeX installation has the file @file{grffile.sty}, which may be
2869 found in the @file{texlive-latex-recommended} package for Debian and
2870 Ubuntu, then consider using it by adding the following to your header
2871 file.  This allows spaces in filenames to work.
2873 @example
2874 \usepackage@{grffile@}
2875 @end example
2877 @subheading Styles provided
2879 @table @code
2881 @cindex publishing styles, latex
2882 @item latex
2883 Publish a LaTeX document.
2885 @cindex publishing styles, pdf
2886 @item pdf
2887 Publish a PDF document, using an external LaTeX document conversion
2888 tool.
2890 @cindex publishing styles, latexcjk
2891 @item latexcjk
2892 Publish a LaTeX document with CJK (Chinese) encodings.
2894 @cindex publishing styles, pdfcjk
2895 @item pdfcjk
2896 Publish a PDF document with CJK (Chinese) encodings, using an external
2897 LaTeX document conversion tool.
2899 @cindex publishing styles, slides
2900 @item slides
2901 Publish a LaTeX document that uses the Beamer extension.  This is
2902 suitable for producing slides.
2904 Here is an example of a slide.
2906 @example
2907 <slide title="First Slide">
2908 Everything between the slide tags composes this slide.
2910 [[Some-sort-of-cute-image.png]]
2912  - A bullet point.
2913  - Another bullet point.
2914 </slide>
2915 @end example
2917 @cindex publishing styles, slides-pdf
2918 @item slides-pdf
2919 Publish a PDF document of slides, using the Beamer extension.
2921 @cindex publishing styles, lecture-notes
2922 @item lecture-notes
2923 Publish a LaTeX document that uses the Beamer extension.  This is
2924 suitable for producing lecture notes.
2926 This can also use the @verb{|<slide>|} tag.
2928 @cindex publishing styles, lecture-notes-pdf
2929 @item lecture-notes-pdf
2930 Publish a PDF document of lecture notes, using the Beamer extension.
2932 @end table
2934 @subheading Options provided
2936 @table @code
2938 @item muse-latex-extension
2939 Default file extension for publishing LaTeX files.
2941 @item muse-latex-pdf-extension
2942 Default file extension for publishing LaTeX files to PDF.
2944 @item muse-latex-pdf-browser
2945 The program to use when browsing a published PDF file.
2947 This should be a format string.
2949 @item muse-latex-pdf-program
2950 The program that is called to generate PDF content from LaTeX content.
2952 @item muse-latex-pdf-cruft
2953 Extensions of files to remove after generating PDF output successfully.
2955 @item muse-latex-header
2956 Header used for publishing LaTeX files.
2958 This may be text or a filename.
2960 @item muse-latex-footer
2961 Footer used for publishing LaTeX files.
2963 This may be text or a filename.
2965 @item muse-latexcjk-header
2966 Header used for publishing LaTeX files (CJK).
2968 This may be text or a filename.
2970 @item muse-latexcjk-footer
2971 Footer used for publishing LaTeX files (CJK).
2973 This may be text or a filename.
2975 @item muse-latex-slides-header
2976 Header for publishing of slides using LaTeX.
2978 This may be text or a filename.
2980 You must have the Beamer extension for LaTeX installed for this to work.
2982 @item muse-latex-lecture-notes-header
2983 Header publishing of lecture notes using LaTeX.
2985 This may be text or a filename.
2987 You must have the Beamer extension for LaTeX installed for this to work.
2989 @item muse-latex-markup-regexps
2990 List of markup regexps for identifying regions in a Muse page.
2992 For more on the structure of this list,
2993 @xref{muse-publish-markup-regexps}.
2995 @item muse-latex-markup-functions
2996 An alist of style types to custom functions for that kind of text.
2998 For more on the structure of this list,
2999 @xref{muse-publish-markup-functions}.
3001 @item muse-latex-markup-strings
3002 Strings used for marking up text.
3004 These cover the most basic kinds of markup, the handling of which
3005 differs little between the various styles.
3007 @item muse-latex-slides-markup-tags
3008 A list of tag specifications, for specially marking up LaTeX slides.
3010 @item muse-latexcjk-encoding-map
3011 An alist mapping emacs coding systems to appropriate CJK codings.
3012 Use the base name of the coding system (ie, without the -unix).
3014 @item muse-latexcjk-encoding-default
3015 The default Emacs buffer encoding to use in published files.
3017 This will be used if no special characters are found.
3019 @item muse-latex-markup-specials-document
3020 A table of characters which must be represented specially.
3021 These are applied to the entire document, sans already-escaped
3022 regions.
3024 @item muse-latex-markup-specials-example
3025 A table of characters which must be represented specially.
3026 These are applied to @verb{|example>|} regions.
3028 With the default interpretation of @verb{|<example>|} regions, no
3029 specials need to be escaped.
3031 @item muse-latex-markup-specials-literal
3032 A table of characters which must be represented specially.
3033 This applies to =monospaced text= and @verb{|<code>|} regions.
3035 @item muse-latex-markup-specials-url
3036 A table of characters which must be represented specially.
3037 These are applied to URLs.
3039 @item muse-latex-markup-specials-image
3040 A table of characters which must be represented specially.
3041 These are applied to image filenames.
3043 @item muse-latex-permit-contents-tag
3044 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
3045 contents.
3047 Most of the time, it is best to have a table of contents on the
3048 first page, with a new page immediately following.  To make this
3049 work with documents published in both HTML and LaTeX, we need to
3050 ignore the @verb{|<contents>|} tag.
3052 If you don't agree with this, then set this option to non-nil,
3053 and it will do what you expect.
3055 @end table
3057 @node Poem, Texinfo, LaTeX, Publishing Styles
3058 @comment  node-name,  next,  previous,  up
3059 @section Publish a poem to LaTeX or PDF
3061 The @code{muse-poem} module makes it easy to attractively publish and
3062 reference poems in the following format, using the "memoir" module for
3063 LaTeX publishing.  It will also markup poems for every other output
3064 style, though none are nearly as pretty.
3066 @example
3067 Title
3070 Body of poem
3073 Annotations, history, notes, etc.
3074 @end example
3076 Once a poem is written in this format, just publish it to PDF using the
3077 @code{poem-pdf} style.  To make an inlined reference to a poem that
3078 you've written -- for example, from a blog page -- there is a "poem" tag
3079 defined by this module.
3081 @example
3082 <poem title="name.of.poem.page">
3083 @end example
3085 Let's assume the template above was called @file{name.of.poem.page};
3086 then the above tag would result in this inclusion.
3088 @example
3089 ** Title
3091 > Body of poem
3092 @end example
3094 John Wiegley uses this module for publishing all of the poems on his
3095 website, which are at
3096 @uref{http://www.newartisans.com/johnw/poems.html}.
3098 @subheading Styles provided
3100 @table @code
3102 @cindex publishing styles, poem-latex
3103 @item poem-latex
3104 Publish a poem in LaTeX form.
3106 @cindex publishing styles, poem-pdf
3107 @item poem-pdf
3108 Publish a poem to a PDF document.
3110 @cindex publishing styles, chapbook-latex
3111 @item chapbook-latex
3112 Publish a book of poems in LaTeX form.
3114 @cindex publishing styles, chapbook-pdf
3115 @item chapbook-pdf
3116 Publish a book of poems to a PDF document.
3118 @end table
3120 @subheading Options provided
3122 @table @code
3124 @item muse-poem-latex-header
3125 Header used for publishing LaTeX poems.
3127 This may be text or a filename.
3129 @item muse-poem-latex-footer
3130 Footer used for publishing LaTeX files.
3132 This may be text or a filename.
3134 @item muse-poem-markup-strings
3135 Strings used for marking up poems.
3137 These cover the most basic kinds of markup, the handling of which
3138 differs little between the various styles.
3140 @item muse-chapbook-latex-header
3141 Header used for publishing a book of poems in LaTeX form.
3143 This may be text or a filename.
3145 @item muse-chapbook-latex-footer
3146 Footer used for publishing a book of poems in LaTeX form.
3148 This may be text or a filename.
3150 @item muse-poem-chapbook-strings
3151 Strings used for marking up books of poems.
3153 These cover the most basic kinds of markup, the handling of which
3154 differs little between the various styles.
3156 @end table
3158 @node Texinfo, XML, Poem, Publishing Styles
3159 @comment  node-name,  next,  previous,  up
3160 @section Publish entries to Texinfo format or PDF
3162 Rules for publishing a Muse file as a Texinfo article.
3164 @subheading Styles provided
3166 @table @code
3168 @cindex publishing styles, texi
3169 @item texi
3170 Publish a file in Texinfo form.
3172 @cindex publishing styles, texi
3173 @item info
3174 Generate an Info file from a Muse file.
3176 @cindex publishing styles, info-pdf
3177 @item info-pdf
3178 Publish a file in PDF form.
3180 @end table
3182 @subheading Options provided
3184 @table @code
3186 @item muse-texinfo-process-natively
3187 If non-nil, use the Emacs `texinfmt' module to make Info files.
3189 @item muse-texinfo-extension
3190 Default file extension for publishing Texinfo files.
3192 @item muse-texinfo-info-extension
3193 Default file extension for publishing Info files.
3195 @item muse-texinfo-pdf-extension
3196 Default file extension for publishing PDF files.
3198 @item muse-texinfo-header
3199 Text to prepend to a Muse page being published as Texinfo.
3201 This may be text or a filename.
3202 It may contain @verb{|<lisp>|} markup tags.
3204 @item muse-texinfo-footer
3205 Text to append to a Muse page being published as Texinfo.
3207 This may be text or a filename.
3208 It may contain @verb{|<lisp>|} markup tags.
3210 @item muse-texinfo-markup-regexps
3211 List of markup rules for publishing a Muse page to Texinfo.
3213 For more on the structure of this list,
3214 @xref{muse-publish-markup-regexps}.
3216 @item muse-texinfo-markup-functions
3217 An alist of style types to custom functions for that kind of text.
3219 For more on the structure of this list,
3220 @xref{muse-publish-markup-functions}.
3222 @item muse-texinfo-markup-strings
3223 Strings used for marking up text.
3225 These cover the most basic kinds of markup, the handling of which
3226 differs little between the various styles.
3228 @item muse-texinfo-markup-specials
3229 A table of characters which must be represented specially.
3231 @item muse-texinfo-markup-specials
3232 A table of characters which must be represented specially.
3233 These are applied to URLs.
3235 @end table
3237 @node XML, , Texinfo, Publishing Styles
3238 @comment  node-name,  next,  previous,  up
3239 @section Publish entries to XML
3241 Muse is capable of publishing XML documents, with the help of the
3242 @file{muse-xml.el} module.
3244 A RelaxNG schema is available as part of the Muse distribution in the
3245 @file{etc/muse.rnc} file.
3247 @subheading Styles provided
3249 @table @code
3251 @cindex publishing styles, xml
3252 @item xml
3253 Publish a file in XML form.
3255 @end table
3257 @subheading Options provided
3259 @table @code
3261 @cindex muse-xml-encoding-map
3262 @item muse-xml-encoding-map
3263 An alist mapping Emacs coding systems to appropriate XML charsets.
3264 Use the base name of the coding system (i.e. without the -unix).
3266 @item muse-xml-markup-specials
3267 A table of characters which must be represented specially in all
3268 XML-like markup formats.
3270 @item muse-xml-markup-specials-url-extra
3271 A table of characters which must be represented specially in all
3272 XML-like markup formats.
3274 These are extra characters that are escaped within URLs.
3276 @item muse-xml-extension
3277 Default file extension used for publishing XML files.
3279 @item muse-xml-header
3280 Header used for publishing XML files.
3282 This may be text or a filename.
3284 @item muse-xml-footer
3285 Footer used for publishing XML files.
3287 This may be text or a filename.
3289 @item muse-xml-markup-regexps
3290 List of markup rules for publishing a Muse page to XML.
3292 For more on the structure of this list,
3293 @xref{muse-publish-markup-regexps}.
3295 @item muse-xml-markup-functions
3296 An alist of style types to custom functions for that kind of text.
3298 For more on the structure of this list,
3299 @xref{muse-publish-markup-functions}.
3301 @item muse-xml-markup-strings
3302 Strings used for marking up text.
3304 These cover the most basic kinds of markup, the handling of which
3305 differs little between the various styles.
3307 @item muse-xml-encoding-default
3308 The default Emacs buffer encoding to use in published files.
3310 This will be used if no special characters are found.
3312 @item muse-xml-charset-default
3313 The default XML charset to use if no translation is found in
3314 @code{muse-xml-encoding-map}.
3316 @end table
3319 @node Extending Muse, Miscellaneous, Publishing Styles, Top
3320 @comment  node-name,  next,  previous,  up
3321 @chapter Making your own publishing styles
3323 @menu
3324 * Markup Functions::            Specifying functions to mark up text.
3325 * Markup Regexps::              Markup rules for publishing.
3326 * Markup Strings::              Strings specific to a publishing style.
3327 * Markup Tags::                 Tag specifications for special markup.
3328 * Style Elements::              Parameters used for defining styles.
3329 * Deriving Styles::             Deriving a new style from an existing
3330                                   one.
3331 @end menu
3333 @node Markup Functions, Markup Regexps, , Extending Muse
3334 @comment  node-name,  next,  previous,  up
3335 @section Specifying functions to mark up text
3336 @cindex publishing, markup functions
3338 @anchor{muse-publish-markup-functions}
3339 @code{muse-publish-markup-functions}
3341 An alist of style types to custom functions for that kind of text.
3343 This is used by publishing styles to attempt to minimize the amount of
3344 custom regexps that each has to define.  @file{muse-publish} provides
3345 rules for the most common types of markup.
3347 Each member of the list is of the following form.
3349 @example
3350 (SYMBOL FUNCTION)
3351 @end example
3353 @itemize @bullet
3354 @item SYMBOL
3355 Describes the type of text to associate with this rule.
3356 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3358 @item FUNCTION
3359 Function to use to mark up this kind of rule if no suitable function is
3360 found through the @option{:functions} tag of the current style.
3361 @end itemize
3363 @node Markup Regexps, Markup Strings, Markup Functions, Extending Muse
3364 @comment  node-name,  next,  previous,  up
3365 @section Markup rules for publishing
3366 @cindex publishing, markup regexps
3367 @cindex publishing, rules
3369 @anchor{muse-publish-markup-regexps}
3370 @code{muse-publish-markup-regexps}
3372 List of markup rules for publishing a page with Muse.
3374 The rules given in this variable are invoked first, followed by whatever
3375 rules are specified by the current style.
3377 Each member of the list is either a function, or a list of the following
3378 form.
3380 @example
3381 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3382 @end example
3384 @itemize @bullet
3385 @item REGEXP
3386 A regular expression, or symbol whose value is a regular expression,
3387 which is searched for using `re-search-forward'.
3389 @item TEXT-BEGIN-GROUP
3390 The matching group within that regexp which denotes the beginning of the
3391 actual text to be marked up.
3393 @item REPLACEMENT-TEXT
3394 A string that will be passed to `replace-match'.
3396 If it is not a string, but a function, it will be called to determine
3397 what the replacement text should be (it must return a string).  If it is
3398 a symbol, the value of that symbol should be a string.
3399 @end itemize
3401 The replacements are done in order, one rule at a time.  Writing
3402 the regular expressions can be a tricky business.  Note that case
3403 is never ignored.  `case-fold-search' is always bound to nil
3404 while processing the markup rules.
3406 @subheading Publishing order
3408 This is the order that the publishing rules are consulted, by default.
3409 This may be changed by customizing @code{muse-publish-markup-regexps}.
3411 @table @code
3413 @item trailing and leading whitespace
3414 Remove trailing and leading whitespace from a file.
3416 @item directive
3417 @samp{#directive}
3419 This is only recognized at the beginning of a file.
3421 @item comment
3422 @samp{; a commented line}
3424 @item tag
3425 @samp{<tag>}
3427 @item comment
3428 @samp{; comment}
3430 @item explicit links
3431 Prevent emphasis characters in explicit links from being marked up.
3433 Don't actually publish them here, just add a special no-emphasis text
3434 property.
3436 @item word
3437 Whitespace-delimited word, possibly with emphasis characters
3439 This function is responsible for marking up emphasis and escaping some
3440 specials.
3442 @item heading
3443 @samp{** Heading}
3445 Outline-mode style headings.
3447 @item enddots
3448 @samp{....}
3450 These are ellipses with a dot at end.
3452 @item dots
3453 @samp{...}
3455 Ellipses.
3457 @item rule
3458 @samp{----}
3460 Horizontal rule or section separator.
3462 @item no-break-space
3463 @samp{~~}
3465 Prevent lines from being split before or after these characters.
3467 @item line-break
3468 @samp{<br>}
3470 Break a line at point.
3472 @item fn-sep
3473 @samp{Footnotes:}
3475 Beginning of footnotes section.
3477 @item footnote
3478 @samp{[1]}
3480 Footnote definition or reference.  If at beginning of line, it is a
3481 definition.
3483 @item list
3484 @itemize @bullet
3485 @item
3486 @samp{ 1. }
3488 @item
3489 @samp{ - }
3491 @item
3492 @samp{term :: }
3493 @end itemize
3495 Numbered list, item list, or term definition list.
3497 @item table-el
3499 @file{table.el} style tables
3501 @item table
3502 @samp{table | cells}
3504 Muse tables or orgtbl-mode style tables.
3506 @item quote
3507 spaces before beginning of text
3509 Blockquotes.
3511 @item emdash
3512 @samp{--}
3514 2-wide dash
3516 @item verse
3517 @samp{> verse text}
3519 @item anchor
3520 @samp{#anchor}
3522 @item link
3523 @samp{[[explicit][links]]}
3525 @item url
3526 @samp{http://example.com/}
3528 @item email
3529 @samp{bare-email@@example.com}
3531 @end table
3533 @node Markup Strings, Markup Tags, Markup Regexps, Extending Muse
3534 @comment  node-name,  next,  previous,  up
3535 @section Strings specific to a publishing style
3536 @cindex publishing, markup strings
3538 @dfn{Markup strings} are strings used for marking up text for a
3539 particular style.
3541 These cover the most basic kinds of markup, the handling of which
3542 differs little between the various styles.
3544 @subheading Available markup strings
3546 @table @code
3548 @item image-with-desc
3549 An image and a description.
3551 Argument 1: image without extension.  Argument 2: image extension.
3552 Argument 3: description.
3554 @item image
3555 An inlined image.
3557 Argument 1: image without extension.  Argument 2: image extension.
3559 @item image-link
3560 An image with a link around it.
3562 Argument 1: link.  Argument 2: image without extension.
3563 Argument 3: image extension.
3565 @item anchor-ref
3566 A reference to an anchor on the current page.
3568 Argument 1: anchor name.  Argument 2: description if one exists, or the
3569 original link otherwise.
3571 @item url
3572 A URL without a description.
3574 Argument 1: URL.
3576 @item link
3577 A link to a Muse page with a description.
3579 Argument 1: link.  Argument 2: description if one exists, or the
3580 original link otherwise.
3582 @item link-and-anchor
3583 A link to a Muse page with an anchor, and a description.
3585 Argument 1: link.  Argument 2: anchor name.
3586 Argument 3: description if one exists, or the original link otherwise.
3587 Argument 4: link without an extension.
3589 @item email-addr
3590 A link to an email address.
3592 Argument 1: email address.  Argument 2: email address.
3594 @item anchor
3595 An anchor.
3597 Argument 1: name of anchor.
3599 @item emdash
3600 A 2-length dash.
3602 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
3604 @item comment-begin
3605 Beginning of a comment.
3607 @item comment-end
3608 End of a comment.
3610 @item rule
3611 A horizontal line or space.
3613 @item no-break-space
3614 A space that separates two words which are not to be separated.
3616 @item footnote
3617 Beginning of footnote.
3619 @item footnote-end
3620 End of footnote.
3622 @item footnotemark
3623 Mark a reference for the current footnote.
3625 Argument 1: number of this footnote.
3627 @item footnotemark-end
3628 End of a reference for the current footnote.
3630 @item footnotetext
3631 Indicate the text of the current footnote.
3633 Argument 1: number of this footnote.
3635 @item footnotetext-end
3636 End of a footnote text line.
3638 @item fn-sep
3639 Text used to replace ``Footnotes:'' line.
3641 @item dots
3642 3 dots.
3644 @item enddots
3645 4 dots.
3647 @item part
3648 Beginning of a part indicator line.  This is used by book publishing.
3650 @item part-end
3651 End of a part indicator line.  This is used by book publishing.
3653 @item chapter
3654 Beginning of a chapter indicator line.  This is used by book publishing.
3656 @item chapter-end
3657 End of a chapter indicator line.  This is used by book publishing.
3659 @item section
3660 Beginning of level 1 section indicator line.
3662 Argument 1: level of section; always 1.
3664 @item section-end
3665 End of level 1 section indicator line.
3667 Argument 1: level of section; always 1.
3669 @item subsection
3670 Beginning of level 2 section indicator line.
3672 Argument 1: level of section; always 2.
3674 @item subsection-end
3675 End of level 2 section indicator line.
3677 Argument 1: level of section; always 2.
3679 @item subsubsection
3680 Beginning of level 3 section indicator line.
3682 Argument 1: level of section; always 3.
3684 @item subsubsection-end
3685 End of level 3 section indicator line.
3687 Argument 1: level of section; always 3.
3689 @item section-other
3690 Beginning of section indicator line, where level is greater than 3.
3692 Argument 1: level of section.
3694 @item section-other-end
3695 End of section indicator line, where level is greater than 3.
3697 Argument 1: level of section.
3699 @item begin-underline
3700 Beginning of underlined text.
3702 @item end-underline
3703 End of underlined text.
3705 @item begin-literal
3706 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
3707 =teletype text=.
3709 @item end-literal
3710 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
3711 text=.
3713 @item begin-emph
3714 Beginning of the first level of emphasized text.
3716 @item end-emph
3717 End of the first level of emphasized text.
3719 @item begin-more-emph
3720 Beginning of the second level of emphasized text.
3722 @item end-more-emph
3723 End of the second level of emphasized text.
3725 @item begin-most-emph
3726 Beginning of the third (and final) level of emphasized text.
3728 @item end-most-emph
3729 End of the third (and final) level of emphasized text.
3731 @item begin-verse
3732 Beginning of verse text.
3734 @item verse-space
3735 String used to each space that is further indented than the beginning of
3736 the verse.
3738 @item begin-verse-line
3739 Beginning of a line of verse.
3741 @item empty-verse-line
3742 End of a line of verse.
3744 @item begin-last-stanza-line
3745 Beginning of the last line of a verse stanza.
3747 @item end-last-stanza-line
3748 End of the last line of a verse stanza.
3750 @item end-verse
3751 End of verse text.
3753 @item begin-example
3754 Beginning of an example region.  To make use of this, an
3755 @samp{<example>} tag is needed.
3757 @item end-example
3758 End of an example region.  To make use of this, an @samp{</example>} tag
3759 is needed.
3761 @item begin-center
3762 Begin a centered line.
3764 @item end-center
3765 End a centered line.
3767 @item begin-quote
3768 Begin a quoted region.
3770 @item end-quote
3771 End a quoted region.
3773 @item begin-quote-item
3774 Begin a quote paragraph.
3776 @item end-quote-item
3777 End a quote paragraph.
3779 @item begin-uli
3780 Begin an unordered list.
3782 @item end-uli
3783 End an unordered list.
3785 @item begin-uli-item
3786 Begin an unordered list item.
3788 @item end-uli-item
3789 End an unordered list item.
3791 @item begin-oli
3792 Begin an ordered list.
3794 @item end-oli
3795 End an ordered list.
3797 @item begin-oli-item
3798 Begin an ordered list item.
3800 @item end-oli-item
3801 End an ordered list item.
3803 @item begin-dl
3804 Begin a definition list.
3806 @item end-dl
3807 End a definition list.
3809 @item begin-dl-item
3810 Begin a definition list item.
3812 @item end-dl-item
3813 End a definition list item.
3815 @item begin-ddt
3816 Begin a definition list term.
3818 @item end-ddt
3819 End a definition list term.
3821 @item begin-dde
3822 Begin a definition list entry.
3824 @item end-dde
3825 End a definition list entry.
3827 @item begin-table
3828 Begin a table.
3830 @item end-table
3831 End a table.
3833 @item begin-table-group
3834 Begin a table grouping.
3836 @item end-table-group
3837 End a table grouping.
3839 @item begin-table-row
3840 Begin a table row.
3842 @item end-table-row
3843 End a table row.
3845 @item begin-table-entry
3846 Begin a table entry.
3848 @item end-table-entry
3849 End a table entry.
3851 @end table
3853 @node Markup Tags, Style Elements, Markup Strings, Extending Muse
3854 @comment  node-name,  next,  previous,  up
3855 @section Tag specifications for special markup
3856 @cindex publishing, markup tags
3858 @anchor{muse-publish-markup-tags}
3859 @code{muse-publish-markup-tags}
3861 A list of tag specifications, for specially marking up text.
3863 XML-style tags are the best way to add custom markup to Muse.  This is
3864 easily accomplished by customizing this list of markup tags.
3866 For each entry, the name of the tag is given, whether it expects a
3867 closing tag and/or an optional set of attributes, whether it is
3868 nestable, and a function that performs whatever action is desired within
3869 the delimited region.
3871 The tags themselves are deleted during publishing, before the function
3872 is called.  The function is called with three arguments, the beginning
3873 and end of the region surrounded by the tags.  If properties are
3874 allowed, they are passed as a third argument in the form of an alist.
3875 The `end' argument to the function is always a marker.
3877 Point is always at the beginning of the region within the tags, when the
3878 function is called.  Wherever point is when the function finishes is
3879 where tag markup will resume.
3881 These tag rules are processed once at the beginning of markup, and once
3882 at the end, to catch any tags which may have been inserted in-between.
3884 @node Style Elements, Deriving Styles, Markup Tags, Extending Muse
3885 @comment  node-name,  next,  previous,  up
3886 @section Parameters used for defining styles
3887 @cindex publishing, style elements
3889 Style elements are tags that define a style.  Use either
3890 @code{muse-define-style} or @code{muse-derive-style}
3891 (@pxref{Deriving Styles}) to create a new style.
3893 @defun muse-define-style name &rest elements
3894 @end defun
3896 @subheading Usable elements
3898 @table @option
3900 @item :suffix
3901 File extension to use for publishing files with this style.
3903 @item :link-suffix
3904 File extension to use for publishing links to Muse files with this
3905 style.
3907 @item :osuffix
3908 File extension to use for publishing second-stage files with this style.
3910 For example, PDF publishing generates a LaTeX file first, then a PDF
3911 from that LaTeX file.
3913 @item :regexps
3914 List of markup rules for publishing a page with Muse.
3915 @xref{muse-publish-markup-regexps}.
3917 @item :functions
3918 An alist of style types to custom functions for that kind of text.
3919 @xref{muse-publish-markup-functions}.
3921 @item :strings
3922 Strings used for marking up text with this style.
3924 These cover the most basic kinds of markup, the handling of which
3925 differs little between the various styles.
3927 @item :tags
3928 A list of tag specifications, used for handling extra tags.
3929 @xref{muse-publish-markup-tags}.
3931 @item :specials
3932 A table of characters which must be represented specially.
3934 @item :before
3935 A function that is to be executed on the newly-created publishing buffer
3936 (or the current region) before any publishing occurs.
3938 This is used to set extra parameters that direct the publishing process.
3940 @item :before-end
3941 A function that is to be executed on the publishing buffer (or the
3942 current region) immediately after applying all of the markup regexps.
3944 This is used to fix the order of table elements (header, footer, body)
3945 in XML-ish styles.
3947 @item :after
3948 A function that is to be executed on the publishing buffer after
3949 :before-end, and immediately after inserting the header and footer.
3951 This is used for generating the table of contents as well as setting the
3952 file coding system.
3954 @item :final
3955 A function that is to be executed after saving the published file, but
3956 while still in its buffer.
3958 This is used for generating second-stage documents like PDF files from
3959 just-published LaTeX files.
3961 The function must accept three arguments: the name of the muse source
3962 file, the name of the just-published file, and the name of the
3963 second-stage target file.  The name of the second-stage target file is
3964 the same as that of the just-published file if no second-stage
3965 publishing is required.
3967 @item :header
3968 Header used for publishing files of this style.
3970 This may be a variable, text, or a filename.  It is inserted at the
3971 beginning of a file, after evaluating the publishing markup.
3973 @item :footer
3974 Footer used for publishing files of this style.
3976 This may be a variable, text, or a filename.  It is inserted at the end
3977 of a file, after evaluating the publishing markup.
3979 @item :style-sheet
3980 Style sheet used for publishing files of this style.
3982 This may be a variable or text.  It is used in the header of HTML and
3983 XHTML based publishing styles.
3985 @item :browser
3986 The function used to browse the published result of files of this style.
3988 @end table
3990 @node Deriving Styles, , Style Elements, Extending Muse
3991 @comment  node-name,  next,  previous,  up
3992 @section Deriving a new style from an existing one
3993 @cindex publishing styles, deriving
3995 To create a new style from an existing one, use @code{muse-derive-style}
3996 as follows.  This is a good way to fix something you don't like about a
3997 particular publishing style, or to personalize it.
3999 @defun muse-derive-style new-name base-name &rest elements
4000 @end defun
4002 The derived name is a string defining the new style, such as "my-html".
4003 The base name must identify an existing style, such as "html" -- if you
4004 have loaded @file{muse-html}.  The style parameters are the same as
4005 those used to create a style, except that they override whatever
4006 definitions exist in the base style.  However, some definitions only
4007 partially override.  The following parameters support partial
4008 overriding.
4010 @xref{Style Elements}, for a complete list of all parameters.
4012 @table @option
4014 @item :functions
4015 If a markup function is not found in the derived style's function list,
4016 the base style's function list will be queried.
4018 @item :regexps
4019 All regexps in the current style and the base style(s) will be used.
4021 @item :strings
4022 If a markup string is not found in the derived style's string list, the
4023 base style's string list will be queried.
4025 @end table
4027 @node Miscellaneous, Getting Help and Reporting Bugs, Extending Muse, Top
4028 @comment  node-name,  next,  previous,  up
4029 @chapter Miscellaneous add-ons, like a minor mode
4031 @menu
4032 * Muse List Edit Minor Mode::   Edit lists easily in other major modes.
4033 @end menu
4035 @node Muse List Edit Minor Mode, , , Miscellaneous
4036 @comment  node-name,  next,  previous,  up
4037 @section Edit lists easily in other major modes
4038 @cindex muse-list-edit-minor-mode
4040 @code{muse-list-edit-minor-mode} is meant to be used with other major
4041 modes, such as Message (for composing email) and debian-changelog-mode
4042 (for editing debian/changelog files).
4044 It implements practically perfect support for editing and filling lists.
4045 It can even handle nested lists.  In addition to Muse-specific list
4046 items ("-", numbers, definition lists, footnotes), it can also handle
4047 items that begin with "*" or "+".  Filling list items behaves in the
4048 same way that it does in Muse, regardless of whether filladapt is also
4049 enabled, which is the primary reason to use this tool.
4051 @subheading Installation
4053 To use it, add ``(require 'muse-mode)'' to your Emacs customization file
4054 and add the function @code{turn-on-muse-list-edit-minor-mode} to any
4055 mode hooks where you wish to enable this minor mode.
4057 @subheading Keybindings
4059 @code{muse-list-edit-minor-mode} uses the following keybindings.
4061 @table @kbd
4063 @item M-RET (`muse-l-e-m-m-insert-list-item')
4064 Insert a new list item at point, using the indentation level of the
4065 current list item.
4067 @item C-< (`muse-l-e-m-m-decrease-list-item-indent')
4068 Decrease indentation of the current list item.
4070 @item C-> (`muse-l-e-m-m-increase-list-item-indent')
4071 Increase indentation of the current list item.
4073 @end table
4075 @subheading Functions
4077 @defun muse-list-edit-minor-mode
4078 This is a global minor mode for editing files with lists.
4079 It is meant to be used with other major modes, and not with Muse mode.
4081 Interactively, with no prefix argument, toggle the mode.
4082 With universal prefix @var{arg} turn mode on.
4083 With zero or negative @var{arg} turn mode off.
4085 This minor mode provides the Muse keybindings for editing lists,
4086 and support for filling lists properly.
4088 It recognizes not only Muse-style lists, which use the "-"
4089 character or numbers, but also lists that use asterisks or plus
4090 signs.  This should make the minor mode generally useful.
4092 Definition lists and footnotes are also recognized.
4094 Note that list items may omit leading spaces, for compatibility
4095 with modes that set @code{left-margin}, such as
4096 @code{debian-changelog-mode}.
4097 @end defun
4099 @defun turn-on-muse-list-edit-minor-mode
4100 Unconditionally turn on Muse list edit minor mode.
4101 @end defun
4103 @defun turn-off-muse-list-edit-minor-mode
4104 Unconditionally turn off Muse list edit minor mode.
4105 @end defun
4107 @node Getting Help and Reporting Bugs, History, Miscellaneous, Top
4108 @comment  node-name,  next,  previous,  up
4109 @chapter Getting Help and Reporting Bugs
4110 @cindex help, getting
4111 @cindex bugs, reporting
4113 After you have read this guide, if you still have questions about
4114 Muse, or if you have bugs to report, there are several places you can
4117 @itemize @bullet
4119 @item
4120 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
4121 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
4122 to it.
4124 @item
4125 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
4126 that Michael Olson (the current maintainer) made for Muse.
4128 @item
4129 Muse has several different mailing lists.
4131 @table @samp
4133 @item muse-el-announce
4134 Low-traffic list for Muse-related announcements.
4136 You can join this mailing list (@email{muse-el-announce@@gna.org})
4137 using the subscription form at
4138 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
4139 mailing list is also available via Gmane (@url{http://gmane.org/}). The
4140 group is called @samp{gmane.emacs.muse.announce}.
4142 @item muse-el-discuss
4143 Discussion, bugfixes, suggestions, tips, and the like for Muse.
4144 This mailing list also includes the content of muse-el-announce.
4146 You can join this mailing list (@email{muse-el-discuss@@gna.org})
4147 using the subscription form at
4148 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
4149 list is also available via Gmane with the identifier
4150 @samp{gmane.emacs.muse.general}.
4152 @item muse-el-logs
4153 Log messages for commits made to Muse.
4155 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
4156 the subscription form at
4157 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
4158 is also available via Gmane with the identifier
4159 @samp{gmane.emacs.muse.scm}.
4161 @item muse-el-commits
4162 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
4163 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
4164 sent to this list automatically.
4166 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
4167 the subscription form at
4168 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
4169 is also available via Gmane with the identifier
4170 @samp{gmane.emacs.muse.cvs}.
4172 @item muse-el-internationalization
4173 Discussion of translation of the Muse website and documentation into
4174 many languages.
4176 You can join this mailing list
4177 (@email{muse-el-internationalization@@gna.org}) using the subscription
4178 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
4179 mailing list is also available via Gmane with the identifier
4180 @samp{gmane.emacs.muse.internationalization}.
4182 @end table
4184 @item
4185 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
4186 contributors are frequently around and willing to answer your
4187 questions.  The @samp{#muse} channel is also available for
4188 Muse-specific help, and its current maintainer hangs out there.
4190 @item
4191 The maintainer of Emacs Muse, Michael Olson, may be contacted at
4192 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
4193 it is often better to use the muse-el-discuss mailing list.
4195 @end itemize
4197 @node History, Contributors, Getting Help and Reporting Bugs, Top
4198 @comment  node-name,  next,  previous,  up
4199 @chapter History of This Document
4200 @cindex history, of Muse
4202 @itemize
4203 @item 2004
4204 John Wiegley started Muse upon realizing that EmacsWiki had some serious
4205 limitations. Around February 2004, he started making "emacs-wiki version
4206 3.00 APLHA", which eventually became known as Muse.
4208 Most of those who frequent the emacs-wiki mailing list continued to use
4209 emacs-wiki, mainly because Planner hasn't been ported over to it.
4211 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
4212 John Wiegley's request.
4214 @item 2005
4215 Michael Olson overhauled this document and added many new sections in
4216 preparation for the first release of Muse (3.01).
4218 @end itemize
4220 @node Contributors, GNU Free Documentation License, History, Top
4221 @comment  node-name,  next,  previous,  up
4222 @chapter Contributors to This Documentation
4223 @cindex contributors
4225 The first draft of this document was taken from the emacs-wiki texinfo
4226 manual.  Michael Olson adapted it for Muse and added most of its
4227 content.
4229 John Sullivan did a majority of the work on the emacs-wiki texinfo
4230 manual.
4232 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
4233 emacs-wiki texinfo manual.
4236 @node GNU Free Documentation License, Concept Index, Contributors, Top
4237 @appendix GNU Free Documentation License
4238 @include doclicense.texi
4241 @node Concept Index,  , GNU Free Documentation License, Top
4242 @comment  node-name,  next,  previous,  up
4243 @unnumbered Index
4245 @printindex cp
4247 @bye