manual: Mention :base-url in Journal section
[muse-el.git] / texi / muse.texi
blobf591fd5aec6a6e447016a4a9d0f6ba94199cd630
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename muse.info
4 @settitle Muse
5 @c %**end of header
7 @dircategory Emacs
8 @direntry
9 * Muse: (muse). Authoring and publishing environment for Emacs.
10 @end direntry
12 @syncodeindex fn cp
14 @copying
15 This manual is for Emacs Muse version 3.03.
17 Copyright @copyright{} 2004, 2005, 2006,
18 2007 Free Software Foundation, Inc.
20 @quotation
21 Permission is granted to copy, distribute and/or modify this document
22 under the terms of the GNU Free Documentation License, Version 1.2 or
23 any later version published by the Free Software Foundation; with no
24 Invariant Sections, with the Front-Cover texts being ``A GNU
25 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
26 license is included in the section entitled ``GNU Free Documentation
27 License'' in this manual.
29 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
30 this GNU Manual, like GNU software.  Copies published by the Free
31 Software Foundation raise funds for GNU development.''
33 This document is part of a collection distributed under the GNU Free
34 Documentation License.  If you want to distribute this document
35 separately from the collection, you can do so by adding a copy of the
36 license to the document, as described in section 6 of the license.
38 All Emacs Lisp code contained in this document may be used, distributed,
39 and modified without restriction.
40 @end quotation
41 @end copying
43 @titlepage
44 @title Muse manual
45 @subtitle an authoring and publishing environment
46 @subtitle for GNU Emacs and XEmacs
48 @c The following two commands
49 @c start the copyright page.
50 @page
51 @vskip 0pt plus 1filll
52 @insertcopying
53 @end titlepage
55 @c So the toc is printed at the start
56 @contents
58 @ifnottex
59 @node Top, Preface, (dir), (dir)
60 @comment  node-name,  next,  previous,  up
61 @top Muse
63 @insertcopying
64 @end ifnottex
66 @menu
67 * Preface::                     About the documentation.
68 * Introduction::                What is Muse?
69 * Obtaining Muse::              How to get Muse releases and development
70                                   changes.
71 * Installation::                Compiling and installing Muse.
72 * Getting Started::             Setting up Muse and editing files.
73 * Projects::                    Creating and managing Muse projects.
74 * Keystroke Summary::           Keys used in Muse mode.
75 * Markup Rules::                Rules for using markup.
76 * Publishing Styles::           Publishing various types of documents.
77 * Extending Muse::              Making your own publishing styles.
78 * Getting Help and Reporting Bugs::  
79 * History::                     History of this document.
80 * Contributors::                Contributors to this documentation.
81 * GNU Free Documentation License::  The license for this documentation.
82 * Concept Index::               Search for terms.
84 @detailmenu
85  --- The Detailed Node Listing ---
87 How to Get Muse Releases and Development Changes
89 * Releases::                    Released versions of Muse.
90 * Development::                 Latest unreleased development changes.
92 Getting Started
94 * Loading Muse::                How to load Muse.
95 * Using Muse Mode::             How to edit files in Muse.
96 * Publishing Files Overview::   Publishing a single file or project.
97 * File Extensions::             Using a different file extension.
99 Creating and Managing Muse Projects
101 * Single Project::              A single-project example.
102 * Multiple Projects::           A multiple-project example.
103 * Projects and Subdirectories::  Publishing subdirectories in projects.
104 * Options for Projects::        Listing of available options for projects.
106 Rules for Using Markup
108 * Paragraphs::                  Paragraphs: centering and quoting.
109 * Headings::                    Levels of headings.
110 * Directives::                  Directives at the beginning of a
111                                   document.
112 * Emphasizing Text::            Bold, italicized, and underlined text.
113 * Footnotes::                   Making notes to be shown at the end.
114 * Verse::                       Indicating poetic stanzas.
115 * Lists::                       Lists of items.
116 * Tables::                      Generation of data tables.
117 * Explicit Links::              Hyperlinks and email addresses with
118                                   descriptions.
119 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
120                                   links.
121 * Images::                      Publishing and displaying images.
122 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
123 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
124                                   for extensibility.
125 * Comments::                    Lines to omit from published output.
126 * Tag Summary::                 Tags that Muse recognizes.
128 Publishing Various Types of Documents
130 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
131 * Book::                        Publishing entries into a compilation.
132 * ConTeXt::                     Publishing ConTeXt documents.
133 * DocBook::                     Publishing in DocBook XML form.
134 * HTML::                        Publishing in HTML or XHTML form.
135 * Journal::                     Keeping a journal or blog.
136 * LaTeX::                       Publishing LaTeX documents.
137 * Poem::                        Publish a poem to LaTex or PDF.
138 * Texinfo::                     Publish entries to Texinfo format or PDF.
139 * XML::                         Publish entries to XML.
141 Integrating Muse and pyblosxom.cgi
143 * Blosxom Requirements::        Other tools needed for the Blosxom style.
144 * Blosxom Entries::             Format of a Blosxom entry and automation.
145 * Blosxom Options::             Blosxom styles and options provided.
147 Making your own publishing styles
149 * Common Elements::             Common functionality shared by styles.
150 * Deriving Styles::             Deriving a new style from an existing
151                                   one.
153 Common functionality shared by styles
155 * Markup Functions::            Specifying functions to mark up text.
156 * Markup Regexps::              Markup rules for publishing.
157 * Markup Strings::              Strings specific to a publishing style.
158 * Markup Tags::                 Tag specifications for special markup.
159 * Style Elements::              Parameters used for defining styles.
161 @end detailmenu
162 @end menu
164 @node Preface, Introduction, Top, Top
165 @comment  node-name,  next,  previous,  up
166 @chapter About the documentation
168 This document describes Muse, which was written by John Wiegley and is
169 now maintained by Michael Olson.  Several versions of this manual are
170 available on-line.
172 @itemize @bullet
173 @item PDF: http://mwolson.org/static/doc/muse.pdf
174 @item HTML (single file): http://mwolson.org/static/doc/muse.html
175 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
176 @end itemize
178 @node Introduction, Obtaining Muse, Preface, Top
179 @comment  node-name,  next,  previous,  up
180 @chapter What is Muse?
182 Emacs Muse (also known as ``Muse'' or ``Emacs-Muse'') is an authoring
183 and publishing environment for Emacs.  It simplifies the process of
184 writing documents and publishing them to various output formats.
186 Muse consists of two main parts: an enhanced text-mode for authoring
187 documents and navigating within Muse projects, and a set of publishing
188 styles for generating different kinds of output.
190 What makes Muse distinct from other text-publishing systems is a modular
191 environment, with a rather simple core, in which "styles" are derived
192 from to create new styles.  Much of Muse's overall functionality is
193 optional.  For example, you can use the publisher without the
194 major-mode, or the mode without doing any publishing; or if you don't
195 load the Texinfo or LaTeX modules, those styles won't be available.
197 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
198 code has been restructured and rewritten, especially its publishing
199 functions.  The focus in this revision is on the authoring and
200 publishing aspects, and the "wikiness" has been removed as a default
201 behavior (available in the optional @file{muse-wiki} module).  CamelCase
202 words are no longer special by default.
204 One of the principal aims in the development of Muse is to make it very
205 easy to produce good-looking, standards-compliant documents.
207 @node Obtaining Muse, Installation, Introduction, Top
208 @comment  node-name,  next,  previous,  up
209 @chapter How to Get Muse Releases and Development Changes
211 @menu
212 * Releases::                    Released versions of Muse.
213 * Development::                 Latest unreleased development changes.
214 @end menu
216 @node Releases, Development, Obtaining Muse, Obtaining Muse
217 @comment  node-name,  next,  previous,  up
218 @section Released versions of Muse
220 Choose to install a release if you want to minimize risk.
222 Errors are corrected in development first.  User-visible changes will be
223 announced on the @email{muse-el-discuss@@gna.org} mailing list.
224 @xref{Getting Help and Reporting Bugs}.
226 @cindex releases, Debian package
227 @cindex Debian package for Muse
228 Debian users can get Muse via apt-get.  The @file{muse-el} package is
229 available both at Michael Olson's APT repository and the official Debian
230 repository.  To make use of the former, add the following line to your
231 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
233 @example
234 deb http://mwolson.org/debian/ ./
235 @end example
237 @cindex releases, Ubuntu package
238 @cindex Ubuntu package for Muse
239 Ubuntu users can also get Muse via apt-get.  The @file{muse-el} package
240 is available both at Michael Olson's APT repository and the official
241 Ubuntu repository.  To make use of the former, add the following line to
242 your @file{/etc/apt/sources.list} file and run @code{apt-get install
243 muse}.
245 @example
246 deb http://mwolson.org/ubuntu/ ./
247 @end example
249 The reason for making separate Debian and Ubuntu packages is that this
250 manual is under the GFDL, and Debian will not allow it to be distributed
251 in its main repository.  Ubuntu, on the other hand, permits this manual
252 to be included with the @file{muse-el} package.
254 @cindex releases, from source
255 Alternatively, you can download the latest release from
256 @uref{http://mwolson.org/static/dist/muse/} .
258 @node Development,  , Releases, Obtaining Muse
259 @comment  node-name,  next,  previous,  up
260 @section Latest unreleased development changes
261 @cindex development
263 Choose the development version if you want to live on the bleeding edge
264 of Muse development or try out new features before release.
266 @cindex arch revision control system, using
267 The Arch revision control system allows you to retrieve previous
268 versions and select specific features and bug fixes.  If you would like
269 to contribute to Muse development, it is highly recommended that you use
270 Arch, but this is not a requirement.
272 If you are new to Arch, you might find this tutorial helpful:
273 @uref{http://mwolson.org/projects/ArchTutorial.html}.
275 Downloading the Muse module with Arch and staying up-to-date involves
276 the following steps.
278 @enumerate
279 @item Install arch
281 @itemize @bullet
282 @item Debian and Ubuntu: @kbd{apt-get install tla}.
283 @item Other distributions: see @uref{http://www.gnuarch.org/gnuarchwiki/Getting_Arch}.
284 @end itemize
286 @item Register the archive.
287 @example
288 tla register-archive -f http://mwolson.org/archives/2006
289 @end example
291 You might ask why there is a mention of the year ``2006'' in the name of
292 the archive.  This year is not very significant---it only means that I
293 created this archive in 2006.  I used to create a new archive every
294 year, but this was a hassle for people who were trying to track
295 development of Muse, so I have stopped doing it.
297 @item Download the Muse package.
298 @example
299 # Download Muse into the @file{muse} directory.
300 tla get mwolson@@gnu.org--2006/muse--main--1.0 muse
301 @end example
303 @item List upstream changes that are missing from your local copy.
304 Do this whenever you want to see whether new changes have been committed
305 to Muse.
307 @example
308 # Change to the source directory you are interested in.
309 cd muse/
311 # Display the summary of changes
312 tla missing --summary
313 @end example
315 @cindex updating Muse with Arch
316 @item Update to the latest version by replaying missing changes.
317 @example
318 cd muse
319 tla update
320 @end example
322 @end enumerate
324 There are other ways to interact with the Muse archive.
326 @itemize
327 @item Browse arch repository: @uref{http://archzoom.mwolson.org/}
328 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
329 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
330 @end itemize
332 The latest development snapshot will be kept up-to-date since it is
333 updated at the same time as the Arch repository.
335 @node Installation, Getting Started, Obtaining Muse, Top
336 @comment  node-name,  next,  previous,  up
337 @chapter Compiling and Installing Muse
339 Muse may be compiled and installed on your machine.
341 @subheading Compilation
343 This is an optional step, since Emacs Lisp source code does not
344 necessarily have to be byte-compiled.  Byte-compilation may yield a very
345 slight speed increase.
347 A working copy of Emacs or XEmacs is needed in order to compile Emacs
348 Muse.  By default, the program that is installed with the name
349 @command{emacs} will be used.
351 If you want to use the @command{xemacs} binary to perform the
352 compilation, you would need to edit @file{Makefile.defs} in the
353 top-level directory as follows.  You can put either a full path to an
354 Emacs or XEmacs binary or just the command name, as long as it is in the
355 @env{PATH}.
357 @example
358 EMACS    = xemacs
359 SITEFLAG = -no-site-file
360 @end example
362 Running @code{make} in the top-level directory should compile the Muse
363 source files in the @file{lisp} directory, and generate an autoloads
364 file in @file{lisp/muse-autoloads.el}.
366 @subheading Installation
368 Muse may be installed into your file hierarchy by doing the following.
370 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
371 where you want the source and compiled Muse files to be installed and
372 @env{INFODIR} indicates where to put the Muse manual.  As mentioned
373 earlier, you will want to edit @env{EMACS} and @env{SITEFLAG} as shown
374 in the Compilation section if you are using XEmacs.
376 If you are installing Muse on a Debian or Ubuntu system, you might want
377 to change the value of @env{INSTALLINFO} as specified in
378 @file{Makefile.defs}.
380 If you wish to install Muse to different locations than the defaults
381 specify, edit @file{Makefile.defs} accordingly.
383 Run @code{make} as a normal user.
385 Run @code{make install} as the root user if you have chosen installation
386 locations that require root permissions.
389 @node Getting Started, Projects, Installation, Top
390 @comment  node-name,  next,  previous,  up
391 @chapter Getting Started
392 @cindex settings
394 @menu
395 * Loading Muse::                How to load Muse.
396 * Using Muse Mode::             How to edit files in Muse.
397 * Publishing Files Overview::   Publishing a single file or project.
398 * File Extensions::             Using a different file extension.
399 @end menu
401 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
402 @comment  node-name,  next,  previous,  up
403 @section How to Load Muse
404 @cindex settings, init file
406 To use Muse, add the directory containing its files to your
407 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
408 the authoring mode, and the styles you wish to publish to.  An example
409 follows.
411 @lisp
412 (add-to-list 'load-path "<path to Muse>")
414 (require 'muse-mode)     ; load authoring mode
416 (require 'muse-html)     ; load publishing styles I use
417 (require 'muse-latex)
418 (require 'muse-texinfo)
419 (require 'muse-docbook)
421 (require 'muse-project)  ; publish files in projects
422 @end lisp
424 An easy way of seeing which settings are available and changing settings
425 is to use the Muse customization interface.  To do this, type
426 @kbd{M-x customize-group muse RET}.  Each of the options has its own
427 documentation.  Options are grouped logically according to what effect
428 they have.
430 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
431 @comment  node-name,  next,  previous,  up
432 @section How to Edit Files in Muse
433 @cindex editing Muse files
435 Muse Mode should automatically be activated when you visit a file with a
436 ``.muse'' extension.  One such file is @file{QuickStart.muse}, which is
437 available in the @file{examples} directory of the Muse distribution.
438 You can tell that Muse Mose has been activated by checking for the text
439 ``Muse'' in your mode line.  If Muse Mode has not been activated, you
440 may activate it by type @kbd{M-x muse-mode RET}.
442 You will notice that Muse files are highlighted very simply.  Links are
443 colored blue, headings are large and bold text, and @verb{|<example>|}
444 tags are colored in grey.
446 There are several different ways to edit things like links, which hide
447 the underlying Muse markup.  One way is to toggle font-locking off by
448 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
449 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
450 on.  Another way is just to move into the text and edit it.  Markup can
451 also be removed by normal deletion methods, though some side effects
452 might require a second deletion.
454 For the particular case of editing links, it is easiest to move to the
455 link and do @kbd{C-c C-e}, which is also @kbd{M-x
456 muse-edit-link-at-point}.  This prompts you for the link and its
457 description, using the previous contents of the link as initial values.
458 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
459 A link to a URL may be created by hitting @kbd{C-c TAB u}.  Links may be
460 followed by hitting @kbd{RET} on them.
462 If you want to add a new list item, this may by accomplished by hitting
463 @kbd{M-RET}.  This will put a dash and some spaces on the screen.  The
464 dash is the Muse markup that indicates a list item.  It is also possible
465 to created ``nested'' lists with this command, by adjusting the number
466 of spaces in front of the dashes.  If you have lists with long lines,
467 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
468 lines.
470 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
471 @comment  node-name,  next,  previous,  up
472 @section Publishing a Single File or Project
473 @cindex editing Muse files
475 The command @kbd{M-x muse-project-publish-this-file} will publish the
476 current document to any available publishing style (a publishing style
477 is an output format, like HTML or Docbook), placing the output in the
478 current directory.  If you are in Muse Mode, this command will be bound
479 to @kbd{C-c C-t}.  If the file has been published recently, and its
480 contents have not changed, running @kbd{C-c C-t} again will not publish
481 the file.  To force publishing in this case, do @kbd{C-u C-c C-t}.
483 If you have set up projects and are visiting a file that is part of a
484 project, then @kbd{C-c C-t} will restrict the output formats to those
485 which are used by the project, and will automatically publish to the
486 output directory defined by the project.  If you want to publish to a
487 different directory or use a different format, then use @kbd{C-c M-C-t},
488 which is also @kbd{M-x muse-publish-this-file}.
490 If the currently opened file is part of a defined project in
491 @code{muse-project-alist}, it (and the rest of the changed files in a
492 project) may be published using @kbd{C-c C-p}.
494 @node File Extensions, , Publishing Files Overview, Getting Started
495 @comment  node-name,  next,  previous,  up
496 @section Using a Different File Extension
497 @cindex file extension, specifying
499 By default, Muse expects all project files to have the file extension
500 @file{.muse}. Files without this extension will not be associated with
501 Muse mode and will not be considered part of any project, even if they
502 are within a project directory.
504 If you don't want to use @file{.muse}, you can customize the extension
505 by setting the value of @code{muse-file-extension}.
507 If you don't want to use any extension at all, and want Muse to
508 autodetect project files based on their location, then add the following
509 to your Muse settings file.
511 @lisp
512 (setq muse-file-extension nil
513       muse-mode-auto-p t)
514 @end lisp
516 Note that if you chose to have @code{muse-file-extension} set to
517 @code{nil}, you may have trouble if your @file{.emacs} file or other
518 init scripts attempt to visit a Muse file.  (A very common example of
519 this is if you use Planner with Muse and run @code{(plan)} from your
520 @file{.emacs}.)  If you wish to visit Muse files from your
521 @file{.emacs}, be sure to also add the following additional code before
522 any such visits happen:
524 @lisp
525 (add-hook 'find-file-hooks 'muse-mode-maybe)
526 @end lisp
529 @node Projects, Keystroke Summary, Getting Started, Top
530 @comment  node-name,  next,  previous,  up
531 @chapter Creating and Managing Muse Projects
532 @cindex projects
534 Often you will want to publish all the files within a directory to a
535 particular set of output styles automatically.  To support, Muse
536 allows for the creation of "projects".
538 @menu
539 * Single Project::              A single-project example.
540 * Multiple Projects::           A multiple-project example.
541 * Projects and Subdirectories::  Publishing subdirectories in projects.
542 * Options for Projects::        Listing of available options for projects.
543 @end menu
545 @node Single Project, Multiple Projects, Projects, Projects
546 @comment  node-name,  next,  previous,  up
547 @section A Single-Project Example
548 @cindex projects, single
550 Here is a sample project, which may be defined in your @file{.emacs}
551 file.
553 @lisp
554 (setq muse-project-alist
555       '(("Website" ("~/Pages" :default "index")
556          (:base "html" :path "~/public_html")
557          (:base "pdf" :path "~/public_html/pdf"))))
558 @end lisp
560 The above defines a project named "website", whose files are located
561 in the directory @file{~/Pages}.  The default page to visit is
562 @file{index}.  When this project is published, each page will be
563 output as HTML to the directory @file{~/public_html}, and as PDF to
564 the directory @file{~/public_html/pdf}.  Within any project page, you
565 may create a link to other pages using the syntax @samp{[[pagename]]}.
567 If you would like to include only some files from a directory in a Muse
568 project, you may use a regexp in place of @file{~/Pages} in the example.
570 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
571 @comment  node-name,  next,  previous,  up
572 @section A Multiple-Project Example
573 @cindex projects, multiple
575 It is possible to specify multiple projects.  Here is an example of
576 three projects: a generic website, a projects area, and a day-planner
577 (the day-planner part requires Planner Mode---see
578 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
580 @lisp
581 (setq muse-project-alist
582       '(("Website" ("~/Pages" :default "index")
583          (:base "html" :path "~/public_html"))
584         (("Projects" ("~/Projects" :default "index")
585          (:base "xhtml"
586                 :path "~/public_html/projects"
587                 :exclude "/TopSecret")
588          (:base "pdf"
589                 :path "~/public_html/projects/pdf"
590                 :exclude "/TopSecret")))
591         ("Plans" ("~/Plans"
592                   :default "TaskPool"
593                   :major-mode planner-mode
594                   :visit-link planner-visit-link)
595          (:base "planner-xhtml"
596                 :path "~/public_html/plans"))))
597 @end lisp
599 The @option{:major-mode} attribute specifies which major to use when
600 visiting files in this directory.
602 The @option{:visit-link} attribute specifies the function to call when
603 visiting links.
605 The @option{:exclude} attribute has a regexp that matches files to never
606 publish.
608 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
609 @comment  node-name,  next,  previous,  up
610 @section Publishing Subdirectories in Projects
611 @cindex projects, subdirectories
613 If you want to publish a directory and all of its subdirectories, Muse
614 provides two convenience functions that together generate the proper
615 rules for you.  Note that we use the backtick to begin this
616 muse-project-alist definition, rather than a single quote.
618 @lisp
619 (setq muse-project-alist
620       `(("Website" ("~/Pages" :default "index")
621          (:base "html" :path "~/public_html"))
622         ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
623                  :default "index")
624          ;; Publish this directory and its subdirectories.  Arguments
625          ;; are as follows.  The above `muse-project-alist-dirs' part
626          ;; is also needed.
627          ;;   1. Source directory
628          ;;   2. Output directory
629          ;;   3. Publishing style
630          ;;   remainder: Other things to put in every generated style
631          ,@@(muse-project-alist-styles "~/Blog"
632                                       "~/public_html/blog"
633                                       "blosxom"))))
634 @end lisp
636 The @code{muse-project-alist-dirs} function takes a directory and
637 returns it and all of its subdirectories in a list.
639 The @code{muse-project-alist-styles} function is explained by the
640 comments above.
642 The ``blosxom'' text is the name of another publishing style, much like
643 ``html''.  @xref{Blosxom}, for further information about it.  You can
644 use any publishing style you like for the third argument to
645 @code{muse-project-alist-styles}.
647 @node Options for Projects, , Projects and Subdirectories, Projects
648 @comment  node-name,  next,  previous,  up
649 @section Listing of Available Options for Projects
650 @cindex projects, options
651 @cindex muse-project-alist, reference
653 This is a listing of all of the various options (or, more accurately:
654 attributes) that may be specified in @code{muse-project-alist}.
656 Each muse-project-alist entry looks like this:
658 @example
659   (PROJECT-NAME (SOURCES)
660     OUTPUTS)
661 @end example
663 We refer to these names below.
665 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
666 The first value is a keyword, like @option{:default}.  The second part
667 is the value associated with that keyword, such as the text ``index''.
668 If you are familiar with Emacs Lisp property lists, the concept is
669 similar to that, except that in the SOURCES section, single directories
670 can be interspersed with two-value attributes.
672 @subheading Project Name
674 This is a string that indicates the name of the project.  It is
675 primarily used for publishing interwiki links with the
676 @file{muse-wiki.el} module.
678 @subheading Sources
680 This part of a muse-project-alist entry consists of two-value
681 attributes, and also directory names.  If you are publishing a book, the
682 order of directories and attributes is significant.
684 The minimal content for the sources section is a list of directories.
686 @table @option
688 @item :book-chapter
689 Indicates a new chapter of a book.  The text of the title of the chapter
690 comes immediately after this keyword.
692 @item :book-end
693 Indicates the end of a book.  Directories listed after this one are
694 ignored when publishing a book.  The value ``t'' (without quotes) should
695 come immediately after this keyword.
697 @item :book-funcall
698 A function to call while publishing a book.  This is useful for doing
699 something just after a particular chapter.
701 @item :book-part
702 Indicates the beginning of a new part of the book.  The text of the
703 title should come immediately after this keyword.
705 @item :book-style
706 Indicate a particular publishing style to use for this part of the book.
707 If this is specified, it should come just after a @option{:part}
708 attribute.
710 @item :default
711 The default page to visit when browsing a project.  Also, if you are
712 using the @file{muse-wiki.el} module, publishing a link to just a
713 project's name will cause it to link to this default file.
715 @item :force-publish
716 This specifies a list of pages which should be published every time a
717 project is published (by using @kbd{C-c C-p}, for example), regardless
718 of whether their contents have changed.  This is useful for updating
719 Index pages, pages that use the @verb{|<include>|} tag, and other pages
720 that have dynamically-generated content.
722 @item :major-mode
723 This specifies the major mode to use when visiting files in this
724 project.  The default is @code{muse-mode}.
726 @item :nochapters
727 This indicates that while publishing a book, do not automatically create
728 chapters.  Values which may follow this are nil (the default, which
729 means that we automatically create chapters), or non-nil, which means
730 that we manually specify chapters with the @option{:book-chapter}
731 attribute,
733 @item :publish-project
734 Indicates which function we should call when publishing a project.
736 @item :set
737 This specifies a list of variables and values to set when publishing a
738 project.  The list should be a property list, which is in the form:
740 @example
741 (VAR1 VALUE1 VAR2 VALUE2 ...)
742 @end example
744 @item :visit-link
745 Specifies the function to call when visiting a link.  The default is
746 @code{muse-visit-link-default}.  The arguments for that function should
747 be (1) the link and (2) whether to visit the link in a new window.
749 @end table
751 @subheading Outputs
753 This part of a muse-project-alist entry is composed of lists of
754 attributes.  Each list is called an ``output style''.
756 The minimal content for an output style is a @option{:base} attribute
757 and a @option{:path} attribute.
759 @table @option
761 @item :base
762 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
764 @item :base-url
765 An external URL which can be used to access published files.  This is
766 mainly used by the @file{muse-wiki} module when publishing links between
767 two separate projects, if the projects are served on different domains.
769 It is also used by the @file{muse-journal} module to create the RSS or
770 RDF output.
772 @item :exclude
773 Exclude items matching a regexp from being published.  The regexp should
774 usually begin with "/".
776 @item :include
777 Only include items matching a regexp when publishing.  The regexp should
778 usually begin with "/".
780 @item :path
781 The directory in which to store published files.
783 @item :timestamps
784 A file containing the timestamps (that is, time of creation) for files
785 in this project.  It might eventually used by the @file{muse-blosxom}
786 module, but this option is not currently in use by any Muse code.
788 @end table
791 @node Keystroke Summary, Markup Rules, Projects, Top
792 @comment  node-name,  next,  previous,  up
793 @chapter Keys Used in Muse Mode
794 @cindex keystrokes
796 This is a summary of keystrokes available in every Muse buffer.
798 @table @kbd
800 @item C-c C-a (`muse-index')
801 Display an index of all known Muse pages.
803 @item C-c C-b (`muse-find-backlinks')
804 Find all pages that link to this page.
806 @item C-c C-e (`muse-edit-link-at-point')
807 Edit link at point.
809 @item C-c C-f (`muse-project-find-file')
810 Open another Muse page.  Prompt for the name.
812 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
813 Insert a link to a file interactively.
815 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
816 Insert a tag interactively.
818 @item C-c C-i u, C-c TAB u (`muse-insert-url')
819 Insert a URL interactively.
821 @item C-c C-l (`font-lock-mode')
822 Toggle font lock / highlighting for the current buffer.
824 @item C-c C-p (`muse-project-publish')
825 Publish any Muse pages that have changed.
827 @item C-c C-s (`muse-search')
828 Find text in all files of the current project.
830 @item C-c C-t (`muse-project-publish-this-file')
831 Publish the currently-visited file.  Prompt for the style if the current
832 file can be published using more than one style.
834 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
835 Publish the currently-visited file.  Prompt for both the style and
836 output directory.
838 @item C-c C-v (`muse-browse-result')
839 Show the published result of this page.
841 @item C-c = (`muse-what-changed')
842 Diff this page against the last backup version.
844 @item TAB
845 Move to the next Wiki reference.
847 @item S-TAB
848 Move to the previous Wiki reference.
850 @item M-TAB
851 Complete the name of a page from the current project at point.
853 @item M-RET
854 Insert a new list item at point, indenting properly.
856 @item C-<
857 Decrease the indentation of the list item at point.
859 @item C->
860 Increase the indentation of the list item at point.
862 @item M-x muse-colors-toggle-inline-images RET
863 Toggle display of inlined images on/off.
865 @end table
868 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
869 @comment  node-name,  next,  previous,  up
870 @chapter Rules for Using Markup
871 @cindex markup
873 A Muse document uses special, contextual markup rules to determine how
874 to format the output result.  For example, if a paragraph is indented,
875 Muse assumes it should be quoted.
877 There are not too many markup rules, and all of them strive to be as
878 simple as possible so that you can focus on document creation, rather
879 than formatting.
881 @menu
882 * Paragraphs::                  Paragraphs: centering and quoting.
883 * Headings::                    Levels of headings.
884 * Directives::                  Directives at the beginning of a
885                                   document.
886 * Emphasizing Text::            Bold, italicized, and underlined text.
887 * Footnotes::                   Making notes to be shown at the end.
888 * Verse::                       Indicating poetic stanzas.
889 * Lists::                       Lists of items.
890 * Tables::                      Generation of data tables.
891 * Explicit Links::              Hyperlinks and email addresses with
892                                   descriptions.
893 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
894                                   links.
895 * Images::                      Publishing and displaying images.
896 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
897 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
898                                   for extensibility.
899 * Comments::                    Lines to omit from published output.
900 * Tag Summary::                 Tags that Muse recognizes.
901 @end menu
903 @node Paragraphs, Headings, Markup Rules, Markup Rules
904 @comment  node-name,  next,  previous,  up
905 @section Paragraphs: centering and quoting
906 @cindex paragraphs
908 Paragraphs in Muse must be separated by a blank line.
910 @cindex paragraphs, centered
911 @subheading Centered paragraphs and quotations
913 A line that begins with six or more columns of whitespace (either tabs
914 or spaces) indicates a centered paragraph.  Alternatively, you can use
915 the @verb{|<center>|} tag to surround regions that are to be published as
916 centered paragraphs.
918 @cindex paragraphs, quoted
919 @cindex quotations
920 But if a line begins with whitespace, though less than six columns, it
921 indicates a quoted paragraph.  Alternatively, you can use the
922 @verb{|<quote>|} tag to surround regions that are to be published as
923 quoted paragraphs.
925 @cindex examples
926 @cindex monospace, rendering blocks
927 @cindex HTML, rendering blocks in monospace
928 @subheading Literal paragraphs
930 The @verb{|<example>|} tag is used for examples, where whitespace should
931 be preserved, the text rendered in monospace, and any characters special
932 to the output style escaped.
934 @cindex literal text
935 @cindex HTML, inserting a raw block
936 There is also the @verb{|<literal>|} tag, which causes a marked block to
937 be entirely left alone.  This can be used for inserting a hand-coded
938 HTML blocks into HTML output, for example.
940 If you want some text to only be inserted when publishing to a
941 particular publishing style, use the @option{style} attribute for the
942 @verb{|<literal>|} tag.  An example follows.
944 @example
945 <literal style="latex">
946 A LaTeX-based style was used in the publishing of this document.
947 </literal>
948 @end example
950 This will leave the region alone if the current publishing style is
951 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
952 otherwise.  It is also possible to leave the text alone only for one
953 particular style, rather than its derivations, by adding
954 @code{exact="t"} to the tag.
956 @node Headings, Directives, Paragraphs, Markup Rules
957 @comment  node-name,  next,  previous,  up
958 @section Levels of headings
959 @cindex headings
961 A heading becomes a chapter or section in printed output -- depending on
962 the style.  To indicate a heading, start a new paragraph with one or
963 more asterices, followed by a space and the heading title.  Then begin
964 another paragraph to enter the text for that section.
966 All levels of headings will be published.  Most publishing styles only
967 distinguish the between the first 4 levels, however.
969 @example
970 * First level
972 ** Second level
974 *** Third level
976 **** Fourth level
977 @end example
979 @node Directives, Emphasizing Text, Headings, Markup Rules
980 @comment  node-name,  next,  previous,  up
981 @section Directives at the beginning of a document
982 @cindex directives
984 Directives are lines beginning with the @samp{#} character that come
985 before any paragraphs or sections in the document.  Directives are of
986 the form ``#directive content of directive''.  You can use any
987 combination of uppercase and lowercase letters for directives, even if
988 the directive is not in the list below.
990 The @code{muse-publishing-directive} function may be used in header and
991 footer text to access directives.  For example, to access the
992 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
994 The following is a list of directives that Muse uses.
996 @table @code
997 @cindex #author
998 @item #author
999 The author of this document.
1001 If this is not specified, Muse will attempt to figure it out from the
1002 @code{user-full-name} variable.
1004 @cindex #date
1005 @item #date
1006 The date that the document was last modified.
1008 This is used by publishing styles that are able to embed the date
1009 information.
1011 @cindex #desc
1012 @item #desc
1013 A short description of this document.
1015 This is used by the @code{journal} publishing style to embed information
1016 inside of an RSS/RDF feed.
1018 @cindex #title
1019 @item #title
1020 The title of this document.
1022 If this is not specified, the name of the file is used.
1024 @end table
1026 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1027 @comment  node-name,  next,  previous,  up
1028 @section Bold, italicized, and underlined text
1029 @cindex emphasizing text
1030 @cindex underlining text
1031 @cindex italicizing text
1032 @cindex verbatim text
1033 @cindex monospace, rendering words
1035 To emphasize text, surround it with certain specially recognized
1036 characters.
1038 @example
1039 *emphasis*
1040 **strong emphasis**
1041 ***very strong emphasis***
1042 _underlined_
1043 =verbatim and monospace=
1044 @end example
1046 @cindex WYSIWYG
1047 While editing a Muse document in Muse mode, these forms of emphasis will
1048 be highlighted in a WYSIWYG manner.  Each of these forms may span
1049 multiple lines.
1051 Verbatim text will be colored as gray by default.  To change this,
1052 customize @code{muse-verbatim-face}.
1054 You can also use the @verb{|<code>|} tag to indicate verbatim and
1055 monospace text.  This is handy for regions that have an ``='' in them.
1057 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1058 @comment  node-name,  next,  previous,  up
1059 @section Making notes to be shown at the end
1060 @cindex footnotes
1062 A footnote reference is simply a number in square brackets.  To define
1063 the footnote, place this definition at the bottom of your file.
1064 @samp{footnote-mode} can be used to greatly facilitate the creation of
1065 these kinds of footnotes.
1067 Footnotes are defined by the same number in brackets occurring at the
1068 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
1069 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
1070 the point of insertion.
1072 @node Verse, Lists, Footnotes, Markup Rules
1073 @comment  node-name,  next,  previous,  up
1074 @section Indicating poetic stanzas
1075 @cindex verses
1076 @cindex poetry
1078 Poetry requires that whitespace be preserved, but without resorting to
1079 monospace.  To indicate this, use the following markup, reminiscent of
1080 email quotations.
1082 @example
1083 > A line of Emacs verse;
1084 >   forgive its being so terse.
1085 @end example
1087 You can also use the @verb{|<verse>|} tag, if you prefer.
1089 @example
1090 <verse>
1091 A line of Emacs verse;
1092   forgive its being so terse.
1093 </verse>
1094 @end example
1096 @cindex verses, multiple stanzas
1097 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1098 follows.
1100 @example
1101 <verse>
1102 A line of Emacs verse;
1103   forgive its being so terse.
1105 In terms of terse verse,
1106   you could do worse.
1107 </verse>
1108 @end example
1110 @node Lists, Tables, Verse, Markup Rules
1111 @comment  node-name,  next,  previous,  up
1112 @section Lists of items
1113 @cindex lists
1115 Lists are given using special characters at the beginning of a line.
1116 Whitespace must occur before bullets or numbered items, to distinguish
1117 from the possibility of those characters occurring in a real sentence.
1119 @cindex lists, bullets
1120 These are rendered as a bullet list.
1122 @example
1123 Normal text.
1125  - bullet item one
1126  - bullet item two
1127 @end example
1129 @cindex lists, enumerated
1130 An enumerated list follows.
1132 @example
1133 Normal text.
1135  1. Enum item one
1136  2. Enum item two
1137 @end example
1139 @cindex lists, definitions
1140 Here is a definition list.
1142 @example
1143 Term1 ::
1144   This is a first definition
1145   And it has two lines;
1146   no, make that three.
1148 Term2 :: This is a second definition
1149 @end example
1151 @subheading Nested lists
1153 @cindex lists, nested
1154 It is possible to nest lists of the same or different kinds.  The
1155 ``level'' of the list is determined by the amount of initial whitespace.
1157 @example
1158 Normal text.
1160  - Level 1, bullet item one
1161    1. Level 2, enum item one
1162    2. Level 2, enum item two
1163  - Level 1, bullet item two
1164    1. Level 2, enum item three
1165    2. Level 2, enum item four
1166       term :: definition
1167 @end example
1169 @subheading Breaking list items
1171 @cindex lists, breaking lines
1172 If you want to break up a line within any list type, just put one blank
1173 line between the end of the previous line and the beginning of the next
1174 line, using the same amount of initial indentation.
1176 @example
1177  - bullet item 1, line 1
1179    bullet item 1, line 2
1181    1. Enum line 1
1183       Enum line 2
1185  - bullet item 2, line 1
1187    bullet item 2, line 2
1188 @end example
1190 @node Tables, Explicit Links, Lists, Markup Rules
1191 @comment  node-name,  next,  previous,  up
1192 @section Generation of data tables
1193 @cindex tables
1195 @cindex tables, simple
1196 Only very simple tables are supported.  The syntax is as follows.
1198 @example
1199 Double bars  || Separate header fields
1201 Single bars   | Separate body fields
1202 Here are more | body fields
1204 Triple bars ||| Separate footer fields
1205 @end example
1207 Some publishing styles require header fields to come first, then footer
1208 fields, and then the body fields.  You can use any order for these
1209 sections that you like, and Muse will re-order them for you at
1210 publish-time.
1212 If you wish to disable table generation for one Muse file, add the
1213 directive @samp{#disable-tables t} to the top of the file.
1215 @subheading Other table formats
1217 @cindex tables, orgtbl-mode style
1218 It is possible to publish very basic Orgtbl-mode style tables.
1220 @example
1221 | org  | style | table |
1222 |------+-------+-------|
1223 | one  |       | one   |
1224 | two  | two   |       |
1225 |      | three | three |
1226 |------+-------+-------|
1227 | more | stuff |       |
1228 @end example
1230 If you are used to the way that Org Mode publishes these tables, then
1231 customize `muse-html-table-attributes' to the following, in order to get
1232 a similar kind of output.
1234 @example
1235 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1236 @end example
1238 @cindex tables, table.el style
1239 @file{table.el} style tables are also supported, as long as
1240 @file{table.el} itself supports outputting tables for a particular
1241 publishing style.  At the time of this writing, the ``html'', ``latex'',
1242 and ``docbook'' styles are supported by @file{table.el}.  Styles derived
1243 from these styles will also work.
1245 @example
1246 +---+-----+---+
1247 |   | one | 1 |
1248 +---+-----+---+
1249 | b | two |   |
1250 +---+-----+---+
1251 | c |     | 3 |
1252 +---+-----+---+
1253 @end example
1255 @node Explicit Links, Implicit Links, Tables, Markup Rules
1256 @comment  node-name,  next,  previous,  up
1257 @section Hyperlinks and email addresses with descriptions
1258 @cindex links, explicit
1260 A hyperlink can reference a URL, or another page within a Muse
1261 project.  In addition, descriptive text can be specified, which should
1262 be displayed rather than the link text in output styles that supports
1263 link descriptions.  The syntax is as follows.
1265 @example
1266 [[link target][link description]]
1267 [[link target without description]]
1268 @end example
1270 Thus, the current maintainer's homepage for Muse can be found
1271 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1272 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1274 @node Implicit Links, Images, Explicit Links, Markup Rules
1275 @comment  node-name,  next,  previous,  up
1276 @section Bare URLs, WikiNames, and InterWiki links
1277 @cindex links, implicit
1278 @cindex links, raw
1280 @cindex URLs
1281 @cindex Email addresses
1283 A URL or email address encountered in the input text is published as a
1284 hyperlink.  These kind of links are called @dfn{implicit links} because
1285 they are not separated from the rest of the Muse document in any way.
1287 Some characters in URLs will prevent Muse from recognizing them as
1288 implicit links. If you want to link to a URL containing spaces or any of
1289 the characters ``][,"'`()<>^'', you will have to make the link
1290 explicit. The punctuation characters ``.,;:'' are also not recognized as
1291 part of a URL when they appear at its end. For information on how to
1292 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1293 addresses with descriptions}.
1295 @cindex WikiNames
1296 If the @command{muse-wiki} module is loaded, another form of implicit
1297 link will be made available.  WikiNames, which are typed in CamelCase,
1298 are highlighted and published as links, provided that the file they
1299 refer to exists.
1301 Customization of WikiName recognition may be accomplished by editing the
1302 @code{muse-wiki-wikiword-regexp} option and subsequently running
1303 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1304 If you use the Customize interface, the latter will be done
1305 automatically.
1307 @cindex InterWiki links
1308 @cindex inter-project links
1309 The @command{muse-wiki} module also allows for InterWiki links.  These
1310 are similar to WikiWords, but they specify both the project and page of
1311 a file.  The names of your project entries in @code{muse-project-alist}
1312 will be used as InterWiki names by default.  Several examples follow.
1314 @example
1315 Blog::DocumentingMuse
1316 Projects#EmacsMuse
1317 Website
1318 @end example
1320 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1321 the project name, and @samp{DocumentingMuse} is the page name.  In the
1322 second example, @samp{#} is the interwiki delimiter.  If the name of a
1323 project occurs by itself in text, like the third case, it will be
1324 colorized and published as a link to the default page of the given
1325 project.
1327 Customization of interwiki links may be accomplished by editing the
1328 @code{muse-wiki-interwiki-alist} option.
1330 It is also possible to link to an anchor in an interwiki document.  This
1331 is called a ``three-part link''.  Examples of this follow.
1333 @example
1334 Blog::DocumentingMuse#anchor1
1335 Projects#EmacsMuse#anchor2
1336 @end example
1338 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1339 @comment  node-name,  next,  previous,  up
1340 @section Publishing and displaying images
1341 @cindex images
1342 @cindex links, with images
1343 @subheading Image links
1345 Links to images may be used in either the target or the description, or
1346 both.  Thus, the following code will publish as a clickable image that
1347 points to @url{http://mwolson.org/}.
1349 @example
1350 [[http://mwolson.org/][/static/logos/site-logo.png]]
1351 @end example
1353 Normally, images in the link part will be inlined.
1355 If you want these images to be published as links instead, place the
1356 text ``URL:'' immediately in front of the link text.  An example
1357 follows.
1359 @example
1360 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1361 @end example
1363 @cindex images, displaying
1364 @cindex images, local
1365 @subheading Displaying images in Muse mode
1366 If a link to a locally-available image is encountered in the link
1367 description, Muse mode will attempt to display it if your version of
1368 Emacs permits this.
1370 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1371 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1373 The method for finding images may be altered by customizing the
1374 @code{muse-colors-inline-image-method} option.  One useful value for
1375 this option is @code{muse-colors-use-publishing-directory}, which tells
1376 Muse mode to look in the directory where the current file will be
1377 published.  The default is to look in the current directory.  Relative
1378 paths like @samp{../pics/} should work for either setting.
1380 Eventually, it is hoped that Muse will be able to copy images from the a
1381 ``source'' directory to a publishing directory by customizing
1382 @code{muse-project-alist}, but this has not been implemented yet.
1384 @cindex images, without descriptions
1385 @cindex images, inlined
1386 @subheading Publishing simple images
1387 The following example will display correctly and publish correctly if a
1388 @acronym{PNG} file called @file{TestLogo.png} exists in the
1389 @file{../pics/} directory.  If text is on the same line as the picture,
1390 it will remain so in the output.
1392 @example
1393 [[../myimage.png]]
1394 @end example
1396 @cindex images, captions
1397 @subheading Publishing images with captions
1398 If you want to add a caption to an image, use the following syntax.
1399 This will center the image (if the output format supports it) and add a
1400 centered caption below the picture.  Formats that do not support
1401 centering the image will instead leave it against the left margin.
1403 @example
1404 [[../pics/mycat.png][My cat Dexter]]
1405 @end example
1407 Images with captions may only occur in their own paragraphs, with no
1408 text on the same line.  Otherwise, the published output will not be
1409 syntactically correct.
1411 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1412 @comment  node-name,  next,  previous,  up
1413 @section Inserting a horizontal line or anchor
1415 @cindex horizontal rules
1416 @cindex dashes
1417 @subheading Horizontal Rules
1419 Four or more dashes indicate a horizontal rule.  Be sure to put blank
1420 lines around it, or it will be considered part of the proceeding or
1421 following paragraph!
1423 @cindex anchors
1424 @cindex links, with target on same page
1425 @subheading Anchors
1427 If you begin a line with "#anchor" -- where "anchor" can be any word
1428 that doesn't contain whitespace -- it defines an anchor at that point
1429 into the document.  This point can be referenced using "page#anchor" as
1430 the target in a Muse link.
1432 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
1433 @comment  node-name,  next,  previous,  up
1434 @section Evaluating Emacs Lisp code in documents for extensibility
1435 @cindex lisp, embedded
1437 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
1438 which is the only Muse tag supported in a style's header and footer
1439 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
1440 text you wish.  The inserted output will get marked up, if the
1441 @verb{|<lisp>|} tag appears within the main text of the document.
1443 @example
1444 <lisp>(concat "This form gets " "inserted")</lisp>
1445 @end example
1447 @cindex lisp, and insert command
1448 Note that you should not use the @code{insert} command within a set of
1449 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1450 tags will be automatically inserted into the document.
1452 It is also possible to treat the output as if it were surrounded by the
1453 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1454 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1455 attribute of the @verb{|<lisp>|} tag.
1457 @example
1458 <lisp markup="example">
1459 (concat "Insert" " me")
1460 </lisp>
1461 @end example
1463 Other languages also have tags that cause source code to be evaluated.
1464 @xref{Tag Summary}, for details.
1466 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
1467 @comment  node-name,  next,  previous,  up
1468 @section Lines to omit from published output
1469 @cindex comments
1470 @cindex publishing, omitting lines
1472 Use the following syntax to indicate a comment.  Comments will not be
1473 published.
1475 @example
1476 ; Comment text goes here.
1477 @end example
1479 That is, only a semi-colon at the beginning of a line, followed by a
1480 literal space, will cause that line to be treated as a comment.
1482 You can alternatively surround the region with the @verb{|<comment>|}
1483 tag.
1485 If you wish the comment to be published, but just commented out using
1486 the comment syntax of the output format, then set
1487 @option{muse-publish-comments-p} to non-nil.
1489 @node Tag Summary, , Comments, Markup Rules
1490 @comment  node-name,  next,  previous,  up
1491 @section Tags that Muse recognizes
1492 @cindex tags
1493 @cindex inserting files at publish time
1494 @cindex publishing, including markup in headers and footers
1495 @cindex publishing, inserting files
1497 Muse has several built-in tags that may prove useful during publishing.
1498 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1499 Muse uses, as well as make your own tags.
1501 @subheading Syntax
1503 If a tag takes arguments, it will look like this, where ``tagname'' is
1504 the name of the tag.
1506 @example
1507 <tagname arg1="string1" arg2="string2">
1508 @end example
1510 If you want the tag to look like it came straight from an XHTML
1511 document, you can alternatively do the following.
1513 @example
1514 <tagname arg1="string1" arg2="string2" />
1515 @end example
1517 If a tag surrounds some text, it will look like this.
1519 @example
1520 <tagname>Some text</tagname>
1521 @end example
1523 If a tag surrounds a large region, it will look like this.
1525 @example
1526 <tagname>
1527 Some text.
1528 Some more text.
1529 </tagname>
1530 @end example
1532 @subheading Tag listing
1534 This is the complete list of tags that Muse accepts, including those
1535 that were mentioned in previous sections.
1537 @table @samp
1539 @item <class>
1540 If publishing to HTML, surround the given text with a @verb{|<span>|}
1541 tag.  It takes one argument called ``name'' that specifies the class
1542 attribute of the @verb{|<span>|} tag.
1544 If publishing to a different format, do nothing extra to the text.
1546 @item <code>
1547 Treat the text surrounded by the tag as if they were enclosed in equal
1548 signs, that is, make it monospace.
1550 @item <command>
1551 Run a command on the region, replacing the region with the result of the
1552 command.  The command is specified with the ``interp'' argument.  If no
1553 value for ``interp'' is given, pass the entire region to the shell.
1555 The ``markup'' argument controls how this section is marked up.
1557 If it is omitted, publish the region with the normal Muse rules.
1559 If "nil", do not mark up the region at all, but prevent Muse from
1560 further interpreting it.
1562 If "example", treat the region as if it was surrounded by the
1563 @verb{|<example>|} tag.
1565 If "src", treat the included text as if it was surrounded by the
1566 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1567 doing this.
1569 If "verse", treat the region as if it was surrounded by the
1570 @verb{|<verse>|} tag, to preserve newlines.
1572 Otherwise, it should be the name of a function to call, with the buffer
1573 narrowed to the region.
1575 @item <comment>
1576 Treat the entire region as a comment.  If the option
1577 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1578 publish it using the comment syntax of the current publishing style.
1580 @item <contents>
1581 Publish a Table of Contents.  This will either be inserted in-place or
1582 at the beginning of the document, depending on your publishing style.
1583 It does not have a delimiting tag.
1585 By default, only 2 levels of headings will be included in the generated
1586 Table of Contents.  To change this globally, customize the
1587 @var{muse-publish-contents-depth} option.  To change this only for the
1588 current tag, use the ``depth'' argument.
1590 @item <example>
1591 Publish the region in monospace, preserving the newlines in the region.
1592 This is useful for snippets of code.
1594 @item <include>
1595 Insert the given file at the current location during publishing.  The
1596 basic use of this tag is as follows, replacing ``included_file'' with
1597 the name of the file that you want to include.
1599 @example
1600 <include file="included_file">
1601 @end example
1603 The ``markup'' argument controls how this section is marked up.
1605 If it is omitted, publish the included text with the normal Muse
1606 rules.
1608 If "nil", do not mark up the included text at all.
1610 If "example", treat the included text as if it was surrounded by the
1611 @verb{|<example>|} tag.
1613 If "src", treat the included text as if it was surrounded by the
1614 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1615 doing this.
1617 If "verse", treat the included text as if it was surrounded by the
1618 @verb{|<verse>|} tag, to preserve newlines.
1620 Otherwise, it should be the name of a function to call after inserting
1621 the file with the buffer narrowed to the section inserted.
1623 @item <lisp>
1624 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1625 The result is then inserted into the document, so you do not need to
1626 explicitly call @code{insert}.  All text properties are removed from the
1627 resulting text.
1629 This tag takes the ``markup'' argument.  See the description of
1630 @verb{|<command>|} for details.
1632 @item <literal>
1633 Make sure that the text enclosed by this tag is published without
1634 escaping it in any way.  This is useful for inserting markup directly
1635 into the published document, when Muse does not provide the desired
1636 functionality.
1638 @item <markup>
1639 Mark up the text between the initial and ending tags.  The markup
1640 command to use may be specified by the ``function'' argument.  The
1641 standard Muse markup routines are used by default if no ``function''
1642 argument is provided.
1644 This is useful for marking up regions in headers and footers.  One
1645 example that comes to mind is generating a published index of all of the
1646 files in the current project by doing the following.
1648 @example
1649 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1650 @end example
1652 @item <perl>
1653 Run the @command{perl} language interpreter on the region, replacing the
1654 region with the result of the command.
1656 This tag takes the ``markup'' argument.  See the description of
1657 @verb{|<command>|} for details.
1659 @item <python>
1660 Run the @command{python} language interpreter on the region, replacing
1661 the region with the result of the command.
1663 This tag takes the ``markup'' argument.  See the description of
1664 @verb{|<command>|} for details.
1666 @item <quote>
1667 Publish the region as a blockquote.  This will either be inserted
1668 in-place or at the beginning of the document, depending on your
1669 publishing style.  It does not have a delimiting tag.
1671 @item <ruby>
1672 Run the @command{ruby} language interpreter on the region, replacing the
1673 region with the result of the command.
1675 This tag takes the ``markup'' argument.  See the description of
1676 @verb{|<command>|} for details.
1678 @item <src>
1679 Publish the region using htmlize.
1680 The language to use may be specified by the ``lang'' attribute.
1682 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1683 the value of the ``lang'' attribute.
1685 This tag requires htmlize 1.34 or later in order to work.  If this is
1686 not satisfied, or the current publishing style is not HTML-based, Muse
1687 will publish the region like an @verb{|<example>|} tag.
1689 @item <verbatim>
1690 This is used when you want to prevent Muse from trying to interpret some
1691 markup.  Surround the markup in @verb{|<verbatim>|} and
1692 @verb{|</verbatim>|}, and it will not be interpreted.
1694 This tag was used often in previous versions of Muse because they did
1695 not support whole-document escaping of specials.  Now, it will only be
1696 needed for other tags, and perhaps footnotes as well.
1698 @item <verse>
1699 Preserve the newlines in the region.  In formats like HTML, newlines are
1700 removed by default, hence the need for this tag.  In other publishing
1701 styles, this tag may cause the text to be indented slightly in a way
1702 that looks nice for poetry and prose.
1704 @end table
1706 @node Publishing Styles, Extending Muse, Markup Rules, Top
1707 @comment  node-name,  next,  previous,  up
1708 @chapter Publishing Various Types of Documents
1709 @cindex publishing styles
1711 One of the principle features of Muse is the ability to publish a simple
1712 input text to a variety of different output styles.  Muse also makes it
1713 easy to create new styles, or derive from an existing style.
1715 @menu
1716 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1717 * Book::                        Publishing entries into a compilation.
1718 * ConTeXt::                     Publishing ConTeXt documents.
1719 * DocBook::                     Publishing in DocBook XML form.
1720 * HTML::                        Publishing in HTML or XHTML form.
1721 * Journal::                     Keeping a journal or blog.
1722 * LaTeX::                       Publishing LaTeX documents.
1723 * Poem::                        Publish a poem to LaTex or PDF.
1724 * Texinfo::                     Publish entries to Texinfo format or PDF.
1725 * XML::                         Publish entries to XML.
1726 @end menu
1728 @node Blosxom, Book, Publishing Styles, Publishing Styles
1729 @comment  node-name,  next,  previous,  up
1730 @section Integrating Muse and pyblosxom.cgi
1731 @cindex blog, one-file-per-entry style
1733 The Blosxom publishing style publishes a tree of categorised files to a
1734 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1735 In other words, each blog entry corresponds with one file.
1737 @menu
1738 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1739 * Blosxom Entries::             Format of a Blosxom entry and automation.
1740 * Blosxom Options::             Blosxom styles and options provided.
1741 @end menu
1743 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1744 @comment  node-name,  next,  previous,  up
1745 @subsection Other tools needed for the Blosxom style
1747 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1748 installed on a machine that you have upload access to.
1750 The following additional components are required in order to make the
1751 date of blog entries display as something sensible.
1753 @enumerate
1754 @item
1755 A script to gather date directives from the entire blog tree into a
1756 single file.  The file must associate a blog entry with a date.
1758 @item
1759 A plugin for (py)blosxom that reads this file.
1760 @end enumerate
1762 These 2 things are provided for @command{pyblosxom.cgi} in the
1763 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1764 former service, while @file{hardcodedates.py} provides the latter
1765 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1766 script will be found/written.
1768 Here is a sample listing from my @file{timestamps} file, which maps
1769 each file to a date.  This can really be in any format, as long as your
1770 date-gathering script and your plugin can both understand it.
1772 @example
1773 2005-04-01-14-16 personal/paper_cranes
1774 2005-03-21 personal/spring_break_over
1775 2004-10-24 personal/finished_free_culture
1776 @end example
1778 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1779 @file{getstamps.py}.  Note that you will need to set the current
1780 directory to where your Muse files are, execute @file{getstamps.py}, and
1781 then move the generated timestamps file to your publishing directory.
1783 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1784 @comment  node-name,  next,  previous,  up
1785 @subsection Format of a Blosxom entry and automation
1787 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1788 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1789 plus whatever normal content is desired.
1791 The date directive is not used directly by @command{pyblosxom.cgi} or
1792 this program.  You need to have the two additional items from the former
1793 section to make use of this feature.
1795 There is a function called @code{muse-blosxom-new-entry} that will
1796 automate the process of making a new blog entry.  To make use of it, do
1797 the following.
1799 @itemize @bullet
1800 @item
1801 Customize @code{muse-blosxom-base-directory} to the location that your
1802 blog entries are stored.
1804 @item
1805 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1806 use the following code to assign this function to @kbd{C-c p l'}.
1808 @example
1809 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1810 @end example
1812 @item
1813 You should create your directory structure ahead of time under your base
1814 directory.  These directories, which correspond with category names, may
1815 be nested.
1817 @item
1818 When you enter this key sequence, you will be prompted for the category
1819 of your entry and its title.  Upon entering this information, a new file
1820 will be created that corresponds with the title, but in lowercase
1821 letters and having special characters converted to underscores.  The
1822 title and date directives will be inserted automatically.
1823 @end itemize
1825 @node Blosxom Options, , Blosxom Entries, Blosxom
1826 @comment  node-name,  next,  previous,  up
1827 @subsection Blosxom styles and options provided
1829 The following styles and options are available in the Blosxom publishing
1830 style.
1832 @subheading Styles provided
1834 @table @code
1836 @cindex publishing styles, blosxom-html
1837 @item blosxom-html
1838 Publish Blosxom entries in HTML form.
1840 @cindex publishing styles, blosxom-xhtml
1841 @item blosxom-xhtml
1842 Publish Blosxom entries in XHTML form.
1844 @end table
1846 @subheading Options provided
1848 @table @code
1850 @item muse-blosxom-extension
1851 Default file extension for publishing Blosxom files.
1853 @item muse-blosxom-header
1854 Header used for publishing Blosxom files.
1856 This may be text or a filename.
1858 @item muse-blosxom-footer
1859 Footer used for publishing Blosxom files.
1861 This may be text or a filename.
1863 @item muse-blosxom-base-directory
1864 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1866 This is the top-level directory where your blog entries may be found
1867 locally.
1869 @end table
1871 @node Book, ConTeXt, Blosxom, Publishing Styles
1872 @comment  node-name,  next,  previous,  up
1873 @section Publishing entries into a compilation
1875 This publishing style is used to output ``books'' in LaTeX or PDF
1876 format.
1878 Each page will become a separate chapter in the book, unless the style
1879 keyword @option{:nochapters} is used, in which case they are all run
1880 together as if one giant chapter.
1882 One way of publishing a book is to make a project for it, add the
1883 project to @code{muse-project-alist}, and use the @code{book-pdf} style
1884 with a very specific @option{:include} value to specify some page whose
1885 contents will be checked for the values of @code{#title} and
1886 @code{#date}, and whose name will be used in the output file.  Then to
1887 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
1888 @kbd{C-c C-p} to trigger the publishing process.  An example
1889 @code{muse-project-alist} for this method follows.
1891 @example
1892 (setq muse-project-alist
1893       '(("MyNotes" (:nochapters t  ; do automatically add chapters
1894                     :book-chapter "Computer Science"
1895                     "~/Notes/cs"
1896                     :book-chapter "Mathematics"
1897                     "~/Notes/math"
1898                     :book-chapter "Emacs"
1899                     "~/Notes/emacs"
1900                     :book-end t ; the rest will not be placed in the book
1901                     "~/Notes"   ; so we can find the notes-anthology page
1902                     "~/Notes/private"
1903                     :force-publish ("index")
1904                     :default "index")
1905          (:base "book-pdf"
1906                 :include "/notes-anthology[^/]*$"
1907                 :path "~/public_html/notes")
1908          ;; other publishing styles for each directory go here,
1909          ;; if desired
1910          )))
1911 @end example
1913 In this example, there would be a file called
1914 @file{~/Notes/notes-anthology.muse}, which would contain just the
1915 following.  The resulting book would be published to
1916 @file{~/public_html/notes/notes-anthology.pdf}.
1918 @example
1919 #title My Technology Ramblings
1920 @end example
1922 Another way is to call the @code{muse-book-publish-project} function
1923 manually, with a custom project entry.  An example of this may be found
1924 in John Wiegley's configuration file at
1925 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
1926 function.
1928 @subheading Styles provided
1930 @table @code
1932 @cindex publishing styles, book-latex
1933 @item book-latex
1934 Publish a book in LaTeX form.  The header and footer are different than
1935 the normal LaTeX publishing mode.
1937 @cindex publishing styles, book-pdf
1938 @item book-pdf
1939 Publish a book in PDF form.  The header and footer are different than
1940 the normal PDF publishing mode.
1942 @end table
1944 @subheading Options provided
1946 @table @code
1948 @item muse-book-before-publish-hook
1949 A hook run in the book buffer before it is marked up.
1951 @item muse-book-after-publish-hook
1952 A hook run in the book buffer after it is marked up.
1954 @item muse-book-latex-header
1955 Header used for publishing books to LaTeX.
1957 This may be text or a filename.
1959 @item muse-book-latex-footer
1960 Footer used for publishing books to LaTeX.
1962 This may be text or a filename.
1964 @end table
1965 @node ConTeXt, DocBook, Book, Publishing Styles
1966 @comment  node-name,  next,  previous,  up
1967 @section Publishing ConTeXt documents
1969 This publishing style is capable of producing ConTeXt or PDF documents.
1971 If you wish to publish PDF documents based on ConTeXt, you will need to
1972 have it installed.  For Debian and Ubuntu, this can be accomplished by
1973 installing the ``texlive'' package.
1975 @subheading Styles provided
1977 @table @code
1979 @cindex publishing styles, context
1980 @item context
1981 Publish a ConTeXt document.
1983 @cindex publishing styles, context-pdf
1984 @item context-pdf
1985 Publish a PDF document, using an external ConTeXt document conversion
1986 tool.
1988 @cindex publishing styles, context-slides
1989 @item context-slides
1990 Produce slides from a ConTeXt document.
1992 Here is an example of a slide.
1994 @example
1995 * First Slide
1997 [[Some-sort-of-cute-image.png]]
1999 ** A subheading
2001  - A bullet point.
2002  - Another bullet point.
2004 * Second Slide
2006 ... and so on
2007 @end example
2009 @cindex publishing styles, context-slides-pdf
2010 @item context-slides-pdf
2011 Publish a PDF document of ConTeXt slides.
2013 @end table
2015 @subheading Options provided
2017 @table @code
2019 @item muse-context-extension
2020 Default file extension for publishing ConTeXt files.
2022 @item muse-context-pdf-extension
2023 Default file extension for publishing ConTeXt files to PDF.
2025 @item muse-context-pdf-program
2026 The program that is called to generate PDF content from ConTeXt content.
2028 @item muse-context-pdf-cruft
2029 Extensions of files to remove after generating PDF output successfully.
2031 @item muse-context-header
2032 Header used for publishing ConTeXt files.
2034 This may be text or a filename.
2036 @item muse-context-footer
2037 Footer used for publishing ConTeXt files.
2039 This may be text or a filename.
2041 @item muse-context-markup-regexps
2042 List of markup regexps for identifying regions in a Muse page.
2044 For more on the structure of this list,
2045 @xref{muse-publish-markup-regexps}.
2047 @item muse-context-markup-functions
2048 An alist of style types to custom functions for that kind of text.
2050 For more on the structure of this list,
2051 @xref{muse-publish-markup-functions}.
2053 @item muse-context-markup-strings
2054 Strings used for marking up text.
2056 These cover the most basic kinds of markup, the handling of which
2057 differs little between the various styles.
2059 @item muse-context-slides-header
2060 Header for publishing a presentation (slides) using ConTeXt.
2062 You can use any of the predefined modules, which are available in the
2063 tex/context/base of your distribution, provided it has TitlePage and
2064 Topic defined.  Alternatively, you can use your own style (mystyle) by
2065 replacing ``\\usemodule[]'' with ``\\input mystyle''.
2067 This may be text or a filename.
2069 @item muse-context-slides-markup-strings
2070 Strings used for marking up text in ConTeXt slides.
2072 @item muse-context-markup-specials-document
2073 A table of characters which must be represented specially.
2074 These are applied to the entire document, sans already-escaped
2075 regions.
2077 @item muse-context-markup-specials-example
2078 A table of characters which must be represented specially.
2079 These are applied to @verb{|example>|} regions.
2081 With the default interpretation of @verb{|<example>|} regions, no
2082 specials need to be escaped.
2084 @item muse-context-markup-specials-literal
2085 A table of characters which must be represented specially.
2086 This applies to =monospaced text= and @verb{|<code>|} regions.
2088 @item muse-context-markup-specials-url
2089 A table of characters which must be represented specially.
2090 These are applied to URLs.
2092 @item muse-context-markup-specials-image
2093 A table of characters which must be represented specially.
2094 These are applied to image filenames.
2096 @item muse-context-permit-contents-tag
2097 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2098 contents.
2100 Most of the time, it is best to have a table of contents on the
2101 first page, with a new page immediately following.  To make this
2102 work with documents published in both HTML and ConTeXt, we need to
2103 ignore the @verb{|<contents>|} tag.
2105 If you don't agree with this, then set this option to non-nil,
2106 and it will do what you expect.
2108 @end table
2110 @node DocBook, HTML, ConTeXt, Publishing Styles
2111 @comment  node-name,  next,  previous,  up
2112 @section Publishing in DocBook XML form
2114 This publishing style is used to generate DocBook XML files.
2116 @subheading Styles provided
2118 @table @code
2120 @cindex publishing styles, docbook
2121 @item docbook
2122 Publish a file in Docbook form.
2124 @end table
2126 @subheading Options provided
2128 This publishing style uses the same options for markup up special
2129 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2131 @table @code
2133 @item muse-docbook-extension
2134 Default file extension for publishing DocBook XML files.
2136 @item muse-docbook-header
2137 Header used for publishing DocBook XML files.
2139 This may be text or a filename.
2141 @item muse-docbook-footer
2142 Footer used for publishing DocBook XML files.
2144 This may be text or a filename.
2146 @item muse-docbook-markup-regexps
2147 List of markup rules for publishing a Muse page to DocBook XML.
2149 @item muse-docbook-markup-functions
2150 An alist of style types to custom functions for that kind of text.
2152 @item muse-docbook-markup-strings
2153 Strings used for marking up text.
2155 These cover the most basic kinds of markup, the handling of which
2156 differs little between the various styles.
2158 @item muse-docbook-encoding-default
2159 The default Emacs buffer encoding to use in published files.
2160 This will be used if no special characters are found.
2162 @item muse-docbook-charset-default
2163 The default DocBook XML charset to use if no translation is
2164 found in @code{muse-xml-encoding-map}.
2166 @end table
2168 @node HTML, Journal, DocBook, Publishing Styles
2169 @comment  node-name,  next,  previous,  up
2170 @section Publishing in HTML or XHTML form
2172 This publishing style is capable of producing HTML or XHTML documents.
2174 @subheading Styles provided
2176 @table @code
2178 @cindex publishing styles, html
2179 @item html
2180 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2182 @item xhtml
2183 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2185 @end table
2187 @subheading Options provided
2189 If an HTML option does not have a corresponding XHTML option, it will
2190 be used for both of these publishing styles.
2192 These publishing styles use the same options for markup up special
2193 characters as the ``xml'' publishing style.  @xref{XML}, for details.
2195 @table @code
2197 @item muse-html-extension
2198 Default file extension for publishing HTML files.
2200 @item muse-xhtml-extension
2201 Default file extension for publishing XHTML files.
2203 @item muse-html-style-sheet
2204 Store your stylesheet definitions here.
2206 This is used in @code{muse-html-header}.  You can put raw CSS in here or
2207 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
2208 @verb{|<lisp>|} markup tags.
2210 If you are publishing to XHTML, then customize the
2211 @code{muse-xhtml-style-sheet} option instead.
2213 @item muse-xhtml-style-sheet
2214 Store your stylesheet definitions here.
2216 This is used in @code{muse-xhtml-header}.  You can put raw CSS in here
2217 or a @verb{|<link>|} tag to an external stylesheet.  This text may
2218 contain @verb{|<lisp>|} markup tags.
2220 @item muse-html-header
2221 Header used for publishing HTML files.
2223 This may be text or a filename.
2225 @item muse-html-footer
2226 Footer used for publishing HTML files.
2228 This may be text or a filename.
2230 @item muse-xhtml-header
2231 Header used for publishing XHTML files.
2233 This may be text or a filename.
2235 @item muse-xhtml-footer
2236 Footer used for publishing XHTML files.
2238 This may be text or a filename.
2240 @item muse-html-anchor-on-word
2241 When true, anchors surround the closest word.
2243 This allows you to select them in a browser (i.e. for pasting), but has
2244 the side-effect of marking up headers in multiple colors if your header
2245 style is different from your link style.
2247 @item muse-html-table-attributes
2248 The attribute to be used with HTML @verb{|<table>|} tags.
2250 If you want to make more-complicated tables in HTML, surround the HTML
2251 with the @verb{|literal|} tag, so that it does not get escaped.
2253 @item muse-html-markup-regexps
2254 List of markup rules for publishing a Muse page to HTML.
2256 @item muse-html-markup-functions
2257 An alist of style types to custom functions for that kind of text.
2259 @item muse-html-markup-strings
2260 Strings used for marking up text as HTML.
2262 These cover the most basic kinds of markup, the handling of which
2263 differs little between the various styles.
2265 @item muse-xhtml-markup-strings
2266 Strings used for marking up text as XHTML.
2268 These cover the most basic kinds of markup, the handling of which
2269 differs little between the various styles.
2271 @item muse-html-markup-tags
2272 A list of tag specifications, for specially marking up HTML.
2273 @xref{muse-publish-markup-tags}, for more information.
2275 @item muse-html-meta-http-equiv
2276 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2278 @item muse-html-meta-content-type
2279 The content type used for the HTML @verb{|<meta>|} tag.
2281 If you are striving for XHTML 1.1 compliance, you may want to change
2282 this to ``application/xhtml+xml''.
2284 @item muse-html-meta-content-encoding
2285 The charset to append to the HTML @verb{|<meta>|} tag.
2287 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2288 and determine the HTML charset from emacs's coding.  If set to a string,
2289 this string will be used to force a particular charset.
2291 @item muse-html-charset-default
2292 The default HTML meta charset to use if no translation is found in
2293 @code{muse-xml-encoding-map}.
2295 @item muse-html-encoding-default
2296 The default Emacs buffer encoding to use in published files.
2297 This will be used if no special characters are found.
2299 @end table
2301 @node Journal, LaTeX, HTML, Publishing Styles
2302 @comment  node-name,  next,  previous,  up
2303 @section Keeping a journal or blog
2304 @cindex journal
2305 @cindex blog, journal style
2307 The module facilitates the keeping and publication of a journal.  When
2308 publishing to HTML, it assumes the form of a web log, or blog.
2310 The input format for each entry is as follows.
2312 @example
2313 * 20040317: Title of entry
2315 text for the entry.
2317 <qotd>
2318 "You know who you are. It comes down to a simple gut check: You
2319 either love what you do or you don't. Period." -- P. Bronson
2320 </qotd>
2321 @end example
2323 The "qotd", or Quote of the Day, is entirely optional.  When generated
2324 to HTML, this entry is rendered as the following.
2326 @example
2327 <div class="entry">
2328   <div class="entry-qotd">
2329     <h3>Quote of the Day:</h3>
2330     <p>"You know who you are. It comes down to a simple gut
2331       check: You either love what you do or you don't. Period."
2332       -- P. Bronson</p>
2333   </div>
2334   <div class="entry-body">
2335     <div class="entry-head">
2336       <div class="entry-date">
2337         <span class="date">March 17, 2004</span>
2338       </div>
2339       <div class="entry-title">
2340         <h2>Title of entry</h2>
2341       </div>
2342     </div>
2343     <div class="entry-text">
2344       <p>Text for the entry.</p>
2345     </div>
2346   </div>
2347 </div>
2348 @end example
2350 The plurality of "div" tags makes it possible to display the entries in
2351 any form you wish, using a CSS style.
2353 Also, an .RDF file can be generated from your journal by publishing it
2354 with the "rdf" style.  It uses the first two sentences of the first
2355 paragraph of each entry as its "description", and auto-generates tags
2356 for linking to the various entries.
2358 @subheading muse-project-alist considerations
2360 If you wish to publish an RDF or RSS feed, it is important to include
2361 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2362 for your Journal projects.  An example follows.
2364 @example
2365 (setq muse-project-alist
2366       '(("Journal" ("~/Journal/"
2367                     :default "journal")
2368         (:base "journal-rss"
2369                :base-url "http://example.org/journal/"
2370                :path "~/public_html/journal"))))
2371 @end example
2373 @subheading Styles provided
2375 @table @code
2377 @cindex publishing styles, journal-html
2378 @item journal-html
2379 Publish journal entries as an HTML document.
2381 @cindex publishing styles, journal-xhtml
2382 @item journal-xhtml
2383 Publish journal entries as an XHTML document.
2385 @cindex publishing styles, journal-latex
2386 @item journal-latex
2387 Publish journal entries as a LaTeX document.
2389 @cindex publishing styles, journal-pdf
2390 @item journal-pdf
2391 Publish journal entries as a PDF document.
2393 @cindex publishing styles, journal-book-latex
2394 @item journal-book-latex
2395 Publish journal entries as a LaTeX book.
2397 @cindex publishing styles, journal-book-pdf
2398 @item journal-book-pdf
2399 Publish journal entries as a PDF book.
2401 @cindex publishing styles, journal-rdf
2402 @cindex publishing styles, RSS 1.0
2403 @item journal-rdf
2404 Publish journal entries as an RDF file (RSS 1.0).
2406 @cindex publishing styles, journal-rss
2407 @cindex publishing styles, RSS 2.0
2408 @item journal-rss
2409 Publish journal entries as an RSS file (RSS 2.0).
2411 @cindex publishing styles, journal-rss-entry
2412 @item journal-rss-entry
2413 Used internally by @code{journal-rss} and @code{journal-rdf} for
2414 publishing individual entries.
2416 @end table
2418 @subheading Options provided
2420 @table @code
2422 @item muse-journal-heading-regexp
2423 A regexp that matches a journal heading.
2425 Paren group 1 is the ISO date, group 2 is the optional category, and
2426 group 3 is the optional heading for the entry.
2428 @item muse-journal-date-format
2429 Date format to use for journal entries.
2431 @item muse-journal-html-heading-regexp
2432 A regexp that matches a journal heading from an HTML document.
2434 Paren group 1 is the ISO date, group 2 is the optional category, and
2435 group 3 is the optional heading for the entry.
2437 @item muse-journal-html-entry-template
2438 Template used to publish individual journal entries as HTML.
2440 This may be text or a filename.
2442 @item muse-journal-latex-section
2443 Template used to publish a LaTeX section.
2445 @item muse-journal-latex-subsection
2446 Template used to publish a LaTeX subsection.
2448 @item muse-journal-markup-tags
2449 A list of tag specifications, for specially marking up Journal entries.
2451 @xref{muse-publish-markup-tags}, for more information.
2453 This is used by @code{journal-latex} and its related styles, as well as
2454 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2455 @code{journal-rss} use.
2457 @item muse-journal-rdf-extension
2458 Default file extension for publishing RDF (RSS 1.0) files.
2460 @item muse-journal-rdf-base-url
2461 The base URL of the website referenced by the RDF file.
2463 @item muse-journal-rdf-header
2464 Header used for publishing RDF (RSS 1.0) files.
2466 This may be text or a filename.
2468 @item muse-journal-rdf-footer
2469 Footer used for publishing RDF (RSS 1.0) files.
2471 This may be text or a filename.
2473 @item muse-journal-rdf-date-format
2474 Date format to use for RDF entries.
2476 @item muse-journal-rdf-entry-template
2477 Template used to publish individual journal entries as RDF.
2479 This may be text or a filename.
2481 @item muse-journal-rdf-summarize-entries
2482 If non-nil, include only summaries in the RDF file, not the full data.
2484 The default is nil, because this annoys some subscribers.
2486 @item muse-journal-rss-heading-regexp
2487 A regexp that matches a journal heading from an HTML document.
2489 Paren group 1 is the ISO date, group 2 is the optional category,
2490 and group 3 is the optional heading for the entry.
2492 @item muse-journal-rss-extension
2493 Default file extension for publishing RSS 2.0 files.
2495 @item muse-journal-rss-base-url
2496 The base URL of the website referenced by the RSS file.
2498 @item muse-journal-rss-header
2499 Header used for publishing RSS 2.0 files.
2501 This may be text or a filename.
2503 @item muse-journal-rss-footer
2504 Footer used for publishing RSS 2.0 files.
2506 This may be text or a filename.
2508 @item muse-journal-rss-date-format
2509 Date format to use for RSS 2.0 entries.
2511 @item muse-journal-rss-entry-template
2512 Template used to publish individual journal entries as RSS 2.0.
2514 This may be text or a filename.
2516 @item muse-journal-rss-enclosure-types-alist
2517 File types that are accepted as RSS enclosures.
2519 This is an alist that maps file extension to content type.
2521 Useful for podcasting.
2523 @item muse-journal-rss-summarize-entries
2524 If non-nil, include only summaries in the RSS file, not the full data.
2526 The default is nil, because this annoys some subscribers.
2528 @item muse-journal-rss-markup-regexps
2529 List of markup rules for publishing a Muse journal page to RSS.
2531 For more information on the structure of this list,
2532 @xref{muse-publish-markup-regexps}.
2534 @item muse-journal-rss-markup-functions
2535 An alist of style types to custom functions for that kind of text.
2537 For more on the structure of this list,
2538 @xref{muse-publish-markup-functions}.
2540 @end table
2542 @node LaTeX, Poem, Journal, Publishing Styles
2543 @comment  node-name,  next,  previous,  up
2544 @section Publishing LaTeX documents
2546 This publishing style is capable of producing LaTeX or PDF documents.
2548 If you wish to publish PDF documents, you will need to have a good TeX
2549 installation.  For Debian and Ubuntu, this can be accomplished by
2550 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
2551 are also a must.
2553 @subheading Styles provided
2555 @table @code
2557 @cindex publishing styles, latex
2558 @item latex
2559 Publish a LaTeX document.
2561 @cindex publishing styles, pdf
2562 @item pdf
2563 Publish a PDF document, using an external LaTeX document conversion
2564 tool.
2566 @cindex publishing styles, latexcjk
2567 @item latexcjk
2568 Publish a LaTeX document with CJK (Chinese) encodings.
2570 @cindex publishing styles, pdfcjk
2571 @item pdfcjk
2572 Publish a PDF document with CJK (Chinese) encodings, using an external
2573 LaTeX document conversion tool.
2575 @cindex publishing styles, slides
2576 @item slides
2577 Publish a LaTeX document that uses the Beamer extension.  This is
2578 suitable for producing slides.
2580 Here is an example of a slide.
2582 @example
2583 <slide title="First Slide">
2584 Everything between the slide tags composes this slide.
2586 [[Some-sort-of-cute-image.png]]
2588  - A bullet point.
2589  - Another bullet point.
2590 </slide>
2591 @end example
2593 @cindex publishing styles, slides-pdf
2594 @item slides-pdf
2595 Publish a PDF document of slides, using the Beamer extension.
2597 @cindex publishing styles, lecture-notes
2598 @item lecture-notes
2599 Publish a LaTeX document that uses the Beamer extension.  This is
2600 suitable for producing lecture notes.
2602 This can also use the @verb{|<slide>|} tag.
2604 @cindex publishing styles, lecture-notes-pdf
2605 @item lecture-notes-pdf
2606 Publish a PDF document of lecture notes, using the Beamer extension.
2608 @end table
2610 @subheading Options provided
2612 @table @code
2614 @item muse-latex-extension
2615 Default file extension for publishing LaTeX files.
2617 @item muse-latex-pdf-extension
2618 Default file extension for publishing LaTeX files to PDF.
2620 @item muse-latex-pdf-program
2621 The program that is called to generate PDF content from LaTeX content.
2623 @item muse-latex-pdf-cruft
2624 Extensions of files to remove after generating PDF output successfully.
2626 @item muse-latex-header
2627 Header used for publishing LaTeX files.
2629 This may be text or a filename.
2631 @item muse-latex-footer
2632 Footer used for publishing LaTeX files.
2634 This may be text or a filename.
2636 @item muse-latexcjk-header
2637 Header used for publishing LaTeX files (CJK).
2639 This may be text or a filename.
2641 @item muse-latexcjk-footer
2642 Footer used for publishing LaTeX files (CJK).
2644 This may be text or a filename.
2646 @item muse-latex-slides-header
2647 Header for publishing of slides using LaTeX.
2649 This may be text or a filename.
2651 You must have the Beamer extension for LaTeX installed for this to work.
2653 @item muse-latex-lecture-notes-header
2654 Header publishing of lecture notes using LaTeX.
2656 This may be text or a filename.
2658 You must have the Beamer extension for LaTeX installed for this to work.
2660 @item muse-latex-markup-regexps
2661 List of markup regexps for identifying regions in a Muse page.
2663 For more on the structure of this list,
2664 @xref{muse-publish-markup-regexps}.
2666 @item muse-latex-markup-functions
2667 An alist of style types to custom functions for that kind of text.
2669 For more on the structure of this list,
2670 @xref{muse-publish-markup-functions}.
2672 @item muse-latex-markup-strings
2673 Strings used for marking up text.
2675 These cover the most basic kinds of markup, the handling of which
2676 differs little between the various styles.
2678 @item muse-latex-slides-markup-tags
2679 A list of tag specifications, for specially marking up LaTeX slides.
2681 @item muse-latexcjk-encoding-map
2682 An alist mapping emacs coding systems to appropriate CJK codings.
2683 Use the base name of the coding system (ie, without the -unix).
2685 @item muse-latexcjk-encoding-default
2686 The default Emacs buffer encoding to use in published files.
2688 This will be used if no special characters are found.
2690 @item muse-latex-markup-specials-document
2691 A table of characters which must be represented specially.
2692 These are applied to the entire document, sans already-escaped
2693 regions.
2695 @item muse-latex-markup-specials-example
2696 A table of characters which must be represented specially.
2697 These are applied to @verb{|example>|} regions.
2699 With the default interpretation of @verb{|<example>|} regions, no
2700 specials need to be escaped.
2702 @item muse-latex-markup-specials-literal
2703 A table of characters which must be represented specially.
2704 This applies to =monospaced text= and @verb{|<code>|} regions.
2706 @item muse-latex-markup-specials-url
2707 A table of characters which must be represented specially.
2708 These are applied to URLs.
2710 @item muse-latex-markup-specials-image
2711 A table of characters which must be represented specially.
2712 These are applied to image filenames.
2714 @item muse-latex-permit-contents-tag
2715 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
2716 contents.
2718 Most of the time, it is best to have a table of contents on the
2719 first page, with a new page immediately following.  To make this
2720 work with documents published in both HTML and LaTeX, we need to
2721 ignore the @verb{|<contents>|} tag.
2723 If you don't agree with this, then set this option to non-nil,
2724 and it will do what you expect.
2726 @end table
2728 @node Poem, Texinfo, LaTeX, Publishing Styles
2729 @comment  node-name,  next,  previous,  up
2730 @section Publish a poem to LaTex or PDF
2732 The @code{muse-poem} module makes it easy to attractively publish and
2733 reference poems in the following format, using the "memoir" module for
2734 LaTeX publishing.  It will also markup poems for every other output
2735 style, though none are nearly as pretty.
2737 @example
2738 Title
2741 Body of poem
2744 Annotations, history, notes, etc.
2745 @end example
2747 Once a poem is written in this format, just publish it to PDF using the
2748 @code{poem-pdf} style.  To make an inlined reference to a poem that
2749 you've written -- for example, from a blog page -- there is a "poem" tag
2750 defined by this module.
2752 @example
2753 <poem title="name.of.poem.page">
2754 @end example
2756 Let's assume the template above was called @file{name.of.poem.page};
2757 then the above tag would result in this inclusion.
2759 @example
2760 ** Title
2762 > Body of poem
2763 @end example
2765 John Wiegley uses this module for publishing all of the poems on his
2766 website, which are at
2767 @uref{http://www.newartisans.com/johnw/poems.html}.
2769 @subheading Styles provided
2771 @table @code
2773 @cindex publishing styles, poem-latex
2774 @item poem-latex
2775 Publish a poem in LaTeX form.
2777 @cindex publishing styles, poem-pdf
2778 @item poem-pdf
2779 Publish a poem to a PDF document.
2781 @cindex publishing styles, chapbook-latex
2782 @item chapbook-latex
2783 Publish a book of poems in LaTeX form.
2785 @cindex publishing styles, chapbook-pdf
2786 @item chapbook-pdf
2787 Publish a book of poems to a PDF document.
2789 @end table
2791 @subheading Options provided
2793 @table @code
2795 @item muse-poem-latex-header
2796 Header used for publishing LaTeX poems.
2798 This may be text or a filename.
2800 @item muse-poem-latex-footer
2801 Footer used for publishing LaTeX files.
2803 This may be text or a filename.
2805 @item muse-poem-markup-strings
2806 Strings used for marking up poems.
2808 These cover the most basic kinds of markup, the handling of which
2809 differs little between the various styles.
2811 @item muse-chapbook-latex-header
2812 Header used for publishing a book of poems in LaTeX form.
2814 This may be text or a filename.
2816 @item muse-chapbook-latex-footer
2817 Footer used for publishing a book of poems in LaTeX form.
2819 This may be text or a filename.
2821 @item muse-poem-chapbook-strings
2822 Strings used for marking up books of poems.
2824 These cover the most basic kinds of markup, the handling of which
2825 differs little between the various styles.
2827 @end table
2829 @node Texinfo, XML, Poem, Publishing Styles
2830 @comment  node-name,  next,  previous,  up
2831 @section Publish entries to Texinfo format or PDF
2833 Rules for publishing a Muse file as a Texinfo article.
2835 @subheading Styles provided
2837 @table @code
2839 @cindex publishing styles, texi
2840 @item texi
2841 Publish a file in Texinfo form.
2843 @cindex publishing styles, texi
2844 @item info
2845 Generate an Info file from a Muse file.
2847 @cindex publishing styles, info-pdf
2848 @item info-pdf
2849 Publish a file in PDF form.
2851 @end table
2853 @subheading Options provided
2855 @table @code
2857 @item muse-texinfo-process-natively
2858 If non-nil, use the Emacs `texinfmt' module to make Info files.
2860 @item muse-texinfo-extension
2861 Default file extension for publishing Texinfo files.
2863 @item muse-texinfo-info-extension
2864 Default file extension for publishing Info files.
2866 @item muse-texinfo-pdf-extension
2867 Default file extension for publishing PDF files.
2869 @item muse-texinfo-header
2870 Text to prepend to a Muse page being published as Texinfo.
2872 This may be text or a filename.
2873 It may contain @verb{|<lisp>|} markup tags.
2875 @item muse-texinfo-footer
2876 Text to append to a Muse page being published as Texinfo.
2878 This may be text or a filename.
2879 It may contain @verb{|<lisp>|} markup tags.
2881 @item muse-texinfo-markup-regexps
2882 List of markup rules for publishing a Muse page to Texinfo.
2884 For more on the structure of this list,
2885 @xref{muse-publish-markup-regexps}.
2887 @item muse-texinfo-markup-functions
2888 An alist of style types to custom functions for that kind of text.
2890 For more on the structure of this list,
2891 @xref{muse-publish-markup-functions}.
2893 @item muse-texinfo-markup-strings
2894 Strings used for marking up text.
2896 These cover the most basic kinds of markup, the handling of which
2897 differs little between the various styles.
2899 @item muse-texinfo-markup-specials
2900 A table of characters which must be represented specially.
2902 @item muse-texinfo-markup-specials
2903 A table of characters which must be represented specially.
2904 These are applied to URLs.
2906 @end table
2908 @node XML, , Texinfo, Publishing Styles
2909 @comment  node-name,  next,  previous,  up
2910 @section Publish entries to XML
2912 Muse is capable of publishing XML documents, with the help of the
2913 @file{muse-xml.el} module.
2915 A RelaxNG schema is available as part of the Muse distribution in the
2916 @file{etc/muse.rnc} file.
2918 @subheading Styles provided
2920 @table @code
2922 @cindex publishing styles, xml
2923 @item xml
2924 Publish a file in XML form.
2926 @end table
2928 @subheading Options provided
2930 @table @code
2932 @cindex muse-xml-encoding-map
2933 @item muse-xml-encoding-map
2934 An alist mapping Emacs coding systems to appropriate XML charsets.
2935 Use the base name of the coding system (i.e. without the -unix).
2937 @item muse-xml-markup-specials
2938 A table of characters which must be represented specially in all
2939 XML-like markup formats.
2941 @item muse-xml-markup-specials-url-extra
2942 A table of characters which must be represented specially in all
2943 XML-like markup formats.
2945 These are extra characters that are escaped within URLs.
2947 @item muse-xml-extension
2948 Default file extension used for publishing XML files.
2950 @item muse-xml-header
2951 Header used for publishing XML files.
2953 This may be text or a filename.
2955 @item muse-xml-footer
2956 Footer used for publishing XML files.
2958 This may be text or a filename.
2960 @item muse-xml-markup-regexps
2961 List of markup rules for publishing a Muse page to XML.
2963 For more on the structure of this list,
2964 @xref{muse-publish-markup-regexps}.
2966 @item muse-xml-markup-functions
2967 An alist of style types to custom functions for that kind of text.
2969 For more on the structure of this list,
2970 @xref{muse-publish-markup-functions}.
2972 @item muse-xml-markup-strings
2973 Strings used for marking up text.
2975 These cover the most basic kinds of markup, the handling of which
2976 differs little between the various styles.
2978 @item muse-xml-encoding-default
2979 The default Emacs buffer encoding to use in published files.
2981 This will be used if no special characters are found.
2983 @item muse-xml-charset-default
2984 The default XML charset to use if no translation is found in
2985 @code{muse-xml-encoding-map}.
2987 @end table
2990 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
2991 @comment  node-name,  next,  previous,  up
2992 @chapter Making your own publishing styles
2994 @menu
2995 * Common Elements::             Common functionality shared by styles.
2996 * Deriving Styles::             Deriving a new style from an existing
2997                                   one.
2998 @end menu
3000 @node Common Elements, Deriving Styles, , Extending Muse
3001 @comment  node-name,  next,  previous,  up
3002 @section Common functionality shared by styles
3003 @cindex publishing styles, common
3005 @menu
3006 * Markup Functions::            Specifying functions to mark up text.
3007 * Markup Regexps::              Markup rules for publishing.
3008 * Markup Strings::              Strings specific to a publishing style.
3009 * Markup Tags::                 Tag specifications for special markup.
3010 * Style Elements::              Parameters used for defining styles.
3011 @end menu
3013 @node Markup Functions, Markup Regexps, , Common Elements
3014 @comment  node-name,  next,  previous,  up
3015 @subsection Specifying functions to mark up text
3016 @cindex publishing, markup functions
3018 @anchor{muse-publish-markup-functions}
3019 @code{muse-publish-markup-functions}
3021 An alist of style types to custom functions for that kind of text.
3023 This is used by publishing styles to attempt to minimize the amount of
3024 custom regexps that each has to define.  @file{muse-publish} provides
3025 rules for the most common types of markup.
3027 Each member of the list is of the following form.
3029 @example
3030 (SYMBOL FUNCTION)
3031 @end example
3033 @itemize @bullet
3034 @item SYMBOL
3035 Describes the type of text to associate with this rule.
3036 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3038 @item FUNCTION
3039 Function to use to mark up this kind of rule if no suitable function is
3040 found through the @option{:functions} tag of the current style.
3041 @end itemize
3043 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
3044 @comment  node-name,  next,  previous,  up
3045 @subsection Markup rules for publishing
3046 @cindex publishing, markup regexps
3047 @cindex publishing, rules
3049 @anchor{muse-publish-markup-regexps}
3050 @code{muse-publish-markup-regexps}
3052 List of markup rules for publishing a page with Muse.
3054 The rules given in this variable are invoked first, followed by whatever
3055 rules are specified by the current style.
3057 Each member of the list is either a function, or a list of the following
3058 form.
3060 @example
3061 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3062 @end example
3064 @itemize @bullet
3065 @item REGEXP
3066 A regular expression, or symbol whose value is a regular expression,
3067 which is searched for using `re-search-forward'.
3069 @item TEXT-BEGIN-GROUP
3070 The matching group within that regexp which denotes the beginning of the
3071 actual text to be marked up.
3073 @item REPLACEMENT-TEXT
3074 A string that will be passed to `replace-match'.
3076 If it is not a string, but a function, it will be called to determine
3077 what the replacement text should be (it must return a string).  If it is
3078 a symbol, the value of that symbol should be a string.
3079 @end itemize
3081 The replacements are done in order, one rule at a time.  Writing
3082 the regular expressions can be a tricky business.  Note that case
3083 is never ignored.  `case-fold-search' is always bound to nil
3084 while processing the markup rules.
3086 @subheading Publishing order
3088 This is the order that the publishing rules are consulted, by default.
3089 This may be changed by customizing @code{muse-publish-markup-regexps}.
3091 @table @code
3093 @item trailing and leading whitespace
3094 Remove trailing and leading whitespace from a file.
3096 @item directive
3097 @samp{#directive}
3099 This is only recognized at the beginning of a file.
3101 @item comment
3102 @samp{; a commented line}
3104 @item tag
3105 @samp{<tag>}
3107 @item comment
3108 @samp{; comment}
3110 @item explicit links
3111 Prevent emphasis characters in explicit links from being marked up.
3113 Don't actually publish them here, just add a special no-emphasis text
3114 property.
3116 @item word
3117 Whitespace-delimited word, possibly with emphasis characters
3119 This function is responsible for marking up emphasis and escaping some
3120 specials.
3122 @item heading
3123 @samp{** Heading}
3125 Outline-mode style headings.
3127 @item enddots
3128 @samp{....}
3130 These are ellipses with a dot at end.
3132 @item dots
3133 @samp{...}
3135 Ellipses.
3137 @item rule
3138 @samp{----}
3140 Horizontal rule or section separator.
3142 @item no-break-space
3143 @samp{~~}
3145 Prevent lines from being split before or after these characters.
3147 @item fn-sep
3148 @samp{Footnotes:}
3150 beginning of footnotes section
3152 @item footnote
3153 @samp{[1]}
3155 Footnote definition or reference.  If at beginning of line, it is a
3156 definition.
3158 @item list
3159 @itemize @bullet
3160 @item
3161 @samp{ 1. }
3163 @item
3164 @samp{ - }
3166 @item
3167 @samp{term :: }
3168 @end itemize
3170 Numbered list, item list, or term definition list.
3172 @item table-el
3174 @file{table.el} style tables
3176 @item table
3177 @samp{table | cells}
3179 Muse tables or orgtbl-mode style tables.
3181 @item quote
3182 spaces before beginning of text
3184 Blockquotes.
3186 @item emdash
3187 @samp{--}
3189 2-wide dash
3191 @item verse
3192 @samp{> verse text}
3194 @item anchor
3195 @samp{#anchor}
3197 @item link
3198 @samp{[[explicit][links]]}
3200 @item url
3201 @samp{http://example.com/}
3203 @item email
3204 @samp{bare-email@@example.com}
3206 @end table
3208 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
3209 @comment  node-name,  next,  previous,  up
3210 @subsection Strings specific to a publishing style
3211 @cindex publishing, markup strings
3213 @dfn{Markup strings} are strings used for marking up text for a
3214 particular style.
3216 These cover the most basic kinds of markup, the handling of which
3217 differs little between the various styles.
3219 @subheading Available markup strings
3221 @table @code
3223 @item image-with-desc
3224 An image and a description.
3226 Argument 1: image without extension.  Argument 2: image extension.
3227 Argument 3: description.
3229 @item image
3230 An inlined image.
3232 Argument 1: image without extension.  Argument 2: image extension.
3234 @item image-link
3235 An image with a link around it.
3237 Argument 1: link.  Argument 2: image without extension.
3238 Argument 3: image extension.
3240 @item anchor-ref
3241 A reference to an anchor on the current page.
3243 Argument 1: anchor name.  Argument 2: description if one exists, or the
3244 original link otherwise.
3246 @item url
3247 A URL without a description.
3249 Argument 1: URL.
3251 @item link
3252 A link to a Muse page with a description.
3254 Argument 1: link.  Argument 2: description if one exists, or the
3255 original link otherwise.
3257 @item link-and-anchor
3258 A link to a Muse page with an anchor, and a description.
3260 Argument 1: link.  Argument 2: anchor name.
3261 Argument 3: description if one exists, or the original link otherwise.
3262 Argument 4: link without an extension.
3264 @item email-addr
3265 A link to an email address.
3267 Argument 1: email address.  Argument 2: email address.
3269 @item anchor
3270 An anchor.
3272 Argument 1: name of anchor.
3274 @item emdash
3275 A 2-length dash.
3277 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
3279 @item comment-begin
3280 Beginning of a comment.
3282 @item comment-end
3283 End of a comment.
3285 @item rule
3286 A horizontal line or space.
3288 @item no-break-space
3289 A space that separates two words which are not to be separated.
3291 @item footnote
3292 Beginning of footnote.
3294 @item footnote-end
3295 End of footnote.
3297 @item footnotemark
3298 Mark a reference for the current footnote.
3300 Argument 1: number of this footnote.
3302 @item footnotemark-end
3303 End of a reference for the current footnote.
3305 @item footnotetext
3306 Indicate the text of the current footnote.
3308 Argument 1: number of this footnote.
3310 @item footnotetext-end
3311 End of a footnote text line.
3313 @item fn-sep
3314 Text used to replace ``Footnotes:'' line.
3316 @item dots
3317 3 dots.
3319 @item enddots
3320 4 dots.
3322 @item part
3323 Beginning of a part indicator line.  This is used by book publishing.
3325 @item part-end
3326 End of a part indicator line.  This is used by book publishing.
3328 @item chapter
3329 Beginning of a chapter indicator line.  This is used by book publishing.
3331 @item chapter-end
3332 End of a chapter indicator line.  This is used by book publishing.
3334 @item section
3335 Beginning of level 1 section indicator line.
3337 Argument 1: level of section; always 1.
3339 @item section-end
3340 End of level 1 section indicator line.
3342 Argument 1: level of section; always 1.
3344 @item subsection
3345 Beginning of level 2 section indicator line.
3347 Argument 1: level of section; always 2.
3349 @item subsection-end
3350 End of level 2 section indicator line.
3352 Argument 1: level of section; always 2.
3354 @item subsubsection
3355 Beginning of level 3 section indicator line.
3357 Argument 1: level of section; always 3.
3359 @item subsubsection-end
3360 End of level 3 section indicator line.
3362 Argument 1: level of section; always 3.
3364 @item section-other
3365 Beginning of section indicator line, where level is greater than 3.
3367 Argument 1: level of section.
3369 @item section-other-end
3370 End of section indicator line, where level is greater than 3.
3372 Argument 1: level of section.
3374 @item begin-underline
3375 Beginning of underlined text.
3377 @item end-underline
3378 End of underlined text.
3380 @item begin-literal
3381 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
3382 =teletype text=.
3384 @item end-literal
3385 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
3386 text=.
3388 @item begin-emph
3389 Beginning of the first level of emphasized text.
3391 @item end-emph
3392 End of the first level of emphasized text.
3394 @item begin-more-emph
3395 Beginning of the second level of emphasized text.
3397 @item end-more-emph
3398 End of the second level of emphasized text.
3400 @item begin-most-emph
3401 Beginning of the third (and final) level of emphasized text.
3403 @item end-most-emph
3404 End of the third (and final) level of emphasized text.
3406 @item begin-verse
3407 Beginning of verse text.
3409 @item verse-space
3410 String used to each space that is further indented than the beginning of
3411 the verse.
3413 @item begin-verse-line
3414 Beginning of a line of verse.
3416 @item empty-verse-line
3417 End of a line of verse.
3419 @item begin-last-stanza-line
3420 Beginning of the last line of a verse stanza.
3422 @item end-last-stanza-line
3423 End of the last line of a verse stanza.
3425 @item end-verse
3426 End of verse text.
3428 @item begin-example
3429 Beginning of an example region.  To make use of this, an
3430 @samp{<example>} tag is needed.
3432 @item end-example
3433 End of an example region.  To make use of this, an @samp{</example>} tag
3434 is needed.
3436 @item begin-center
3437 Begin a centered line.
3439 @item end-center
3440 End a centered line.
3442 @item begin-quote
3443 Begin a quoted region.
3445 @item end-quote
3446 End a quoted region.
3448 @item begin-quote-item
3449 Begin a quote paragraph.
3451 @item end-quote-item
3452 End a quote paragraph.
3454 @item begin-uli
3455 Begin an unordered list.
3457 @item end-uli
3458 End an unordered list.
3460 @item begin-uli-item
3461 Begin an unordered list item.
3463 @item end-uli-item
3464 End an unordered list item.
3466 @item begin-oli
3467 Begin an ordered list.
3469 @item end-oli
3470 End an ordered list.
3472 @item begin-oli-item
3473 Begin an ordered list item.
3475 @item end-oli-item
3476 End an ordered list item.
3478 @item begin-dl
3479 Begin a definition list.
3481 @item end-dl
3482 End a definition list.
3484 @item begin-dl-item
3485 Begin a definition list item.
3487 @item end-dl-item
3488 End a definition list item.
3490 @item begin-ddt
3491 Begin a definition list term.
3493 @item end-ddt
3494 End a definition list term.
3496 @item begin-dde
3497 Begin a definition list entry.
3499 @item end-dde
3500 End a definition list entry.
3502 @item begin-table
3503 Begin a table.
3505 @item end-table
3506 End a table.
3508 @item begin-table-group
3509 Begin a table grouping.
3511 @item end-table-group
3512 End a table grouping.
3514 @item begin-table-row
3515 Begin a table row.
3517 @item end-table-row
3518 End a table row.
3520 @item begin-table-entry
3521 Begin a table entry.
3523 @item end-table-entry
3524 End a table entry.
3526 @end table
3528 @node Markup Tags, Style Elements, Markup Strings, Common Elements
3529 @comment  node-name,  next,  previous,  up
3530 @subsection Tag specifications for special markup
3531 @cindex publishing, markup tags
3533 @anchor{muse-publish-markup-tags}
3534 @code{muse-publish-markup-tags}
3536 A list of tag specifications, for specially marking up text.
3538 XML-style tags are the best way to add custom markup to Muse.  This is
3539 easily accomplished by customizing this list of markup tags.
3541 For each entry, the name of the tag is given, whether it expects a
3542 closing tag and/or an optional set of attributes, whether it is
3543 nestable, and a function that performs whatever action is desired within
3544 the delimited region.
3546 The tags themselves are deleted during publishing, before the function
3547 is called.  The function is called with three arguments, the beginning
3548 and end of the region surrounded by the tags.  If properties are
3549 allowed, they are passed as a third argument in the form of an alist.
3550 The `end' argument to the function is always a marker.
3552 Point is always at the beginning of the region within the tags, when the
3553 function is called.  Wherever point is when the function finishes is
3554 where tag markup will resume.
3556 These tag rules are processed once at the beginning of markup, and once
3557 at the end, to catch any tags which may have been inserted in-between.
3559 @node Style Elements, , Markup Tags, Common Elements
3560 @comment  node-name,  next,  previous,  up
3561 @subsection Parameters used for defining styles
3562 @cindex publishing, style elements
3564 Style elements are tags that define a style.  Use
3565 @code{muse-define-style} to create a new style.
3567 @example
3568 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3569 @end example
3571 @subheading Usable elements
3573 @table @option
3575 @item :suffix
3576 File extension to use for publishing files with this style.
3578 @item :link-suffix
3579 File extension to use for publishing links to Muse files with this
3580 style.
3582 @item :osuffix
3583 File extension to use for publishing second-stage files with this style.
3585 For example, PDF publishing generates a LaTeX file first, then a PDF
3586 from that LaTeX file.
3588 @item :regexps
3589 List of markup rules for publishing a page with Muse.
3590 @xref{muse-publish-markup-regexps}.
3592 @item :functions
3593 An alist of style types to custom functions for that kind of text.
3594 @xref{muse-publish-markup-functions}.
3596 @item :strings
3597 Strings used for marking up text with this style.
3599 These cover the most basic kinds of markup, the handling of which
3600 differs little between the various styles.
3602 @item :tags
3603 A list of tag specifications, used for handling extra tags.
3604 @xref{muse-publish-markup-tags}.
3606 @item :specials
3607 A table of characters which must be represented specially.
3609 @item :before
3610 A function that is to be executed on the newly-created publishing buffer
3611 (or the current region) before any publishing occurs.
3613 This is used to set extra parameters that direct the publishing process.
3615 @item :before-end
3616 A function that is to be executed on the publishing buffer (or the
3617 current region) immediately after applying all of the markup regexps.
3619 This is used to fix the order of table elements (header, footer, body)
3620 in XML-ish styles.
3622 @item :after
3623 A function that is to be executed on the publishing buffer after
3624 :before-end, and immediately after inserting the header and footer.
3626 This is used for generating the table of contents as well as setting the
3627 file coding system.
3629 @item :final
3630 A function that is to be executed after saving the published file, but
3631 while still in its buffer.
3633 This is used for generating second-stage documents like PDF files from
3634 just-published LaTeX files.
3636 @item :header
3637 Header used for publishing files of this style.
3639 This may be a variable, text, or a filename.  It is inserted at the
3640 beginning of a file, after evaluating the publishing markup.
3642 @item :footer
3643 Footer used for publishing files of this style.
3645 This may be a variable, text, or a filename.  It is inserted at the end
3646 of a file, after evaluating the publishing markup.
3648 @item :style-sheet
3649 Style sheet used for publishing files of this style.
3651 This may be a variable or text.  It is used in the header of HTML and
3652 XHTML based publishing styles.
3654 @item :browser
3655 The function used to browse the published result of files of this style.
3657 @end table
3659 @node Deriving Styles, , Common Elements, Extending Muse
3660 @comment  node-name,  next,  previous,  up
3661 @section Deriving a new style from an existing one
3662 @cindex publishing styles, deriving
3664 To create a new style from an existing one, use @code{muse-derive-style}
3665 as follows.  This is a good way to fix something you don't like about a
3666 particular publishing style, or to personalize it.
3668 @example
3669 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3670 @end example
3672 The derived name is a string defining the new style, such as "my-html".
3673 The base name must identify an existing style, such as "html" -- if you
3674 have loaded @file{muse-html}.  The style parameters are the same as
3675 those used to create a style, except that they override whatever
3676 definitions exist in the base style.  However, some definitions only
3677 partially override.  The following parameters support partial
3678 overriding.
3680 @xref{Style Elements}, for a complete list of all parameters.
3682 @table @option
3684 @item :functions
3685 If a markup function is not found in the derived style's function list,
3686 the base style's function list will be queried.
3688 @item :regexps
3689 All regexps in the current style and the base style(s) will be used.
3691 @item :strings
3692 If a markup string is not found in the derived style's string list, the
3693 base style's string list will be queried.
3695 @end table
3698 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
3699 @comment  node-name,  next,  previous,  up
3700 @chapter Getting Help and Reporting Bugs
3701 @cindex help, getting
3702 @cindex bugs, reporting
3704 After you have read this guide, if you still have questions about
3705 Muse, or if you have bugs to report, there are several places you can
3708 @itemize @bullet
3710 @item
3711 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
3712 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
3713 to it.
3715 @item
3716 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
3717 that Michael Olson (the current maintainer) made for Muse.
3719 @item
3720 Muse has several different mailing lists.
3722 @table @samp
3724 @item muse-el-announce
3725 Low-traffic list for Muse-related announcements.
3727 You can join this mailing list (@email{muse-el-announce@@gna.org})
3728 using the subscription form at
3729 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
3730 mailing list is also available via Gmane (@url{http://gmane.org/}). The
3731 group is called @samp{gmane.emacs.muse.announce}.
3733 @item muse-el-discuss
3734 Discussion, bugfixes, suggestions, tips, and the like for Muse.
3735 This mailing list also includes the content of muse-el-announce.
3737 You can join this mailing list (@email{muse-el-discuss@@gna.org})
3738 using the subscription form at
3739 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
3740 list is also available via Gmane with the identifier
3741 @samp{gmane.emacs.muse.general}.
3743 @item muse-el-logs
3744 Log messages for commits made to Muse.
3746 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
3747 the subscription form at
3748 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
3749 is also available via Gmane with the identifier
3750 @samp{gmane.emacs.muse.scm}.
3752 @item muse-el-commits
3753 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
3754 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
3755 sent to this list automatically.
3757 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
3758 the subscription form at
3759 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
3760 is also available via Gmane with the identifier
3761 @samp{gmane.emacs.muse.cvs}.
3763 @item muse-el-internationalization
3764 Discussion of translation of the Muse website and documentation into
3765 many languages.
3767 You can join this mailing list
3768 (@email{muse-el-internationalization@@gna.org}) using the subscription
3769 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
3770 mailing list is also available via Gmane with the identifier
3771 @samp{gmane.emacs.muse.internationalization}.
3773 @end table
3775 @item
3776 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
3777 contributors are frequently around and willing to answer your
3778 questions.  The @samp{#muse} channel is also available for
3779 Muse-specific help, and its current maintainer hangs out there.
3781 @item
3782 The maintainer of Emacs Muse, Michael Olson, may be contacted at
3783 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
3784 it is often better to use the muse-el-discuss mailing list.
3786 @end itemize
3788 @node History, Contributors, Getting Help and Reporting Bugs, Top
3789 @comment  node-name,  next,  previous,  up
3790 @chapter History of This Document
3791 @cindex history, of Muse
3793 @itemize
3794 @item 2004
3795 John Wiegley started Muse upon realizing that EmacsWiki had some serious
3796 limitations. Around February 2004, he started making "emacs-wiki version
3797 3.00 APLHA", which eventually became known as Muse.
3799 Most of those who frequent the emacs-wiki mailing list continued to use
3800 emacs-wiki, mainly because Planner hasn't been ported over to it.
3802 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
3803 John Wiegley's request.
3805 @item 2005
3806 Michael Olson overhauled this document and added many new sections in
3807 preparation for the first release of Muse (3.01).
3809 @end itemize
3811 @node Contributors, GNU Free Documentation License, History, Top
3812 @comment  node-name,  next,  previous,  up
3813 @chapter Contributors to This Documentation
3814 @cindex contributors
3816 The first draft of this document was taken from the emacs-wiki texinfo
3817 manual.  Michael Olson adapted it for Muse and added most of its
3818 content.
3820 John Sullivan did a majority of the work on the emacs-wiki texinfo
3821 manual.
3823 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
3824 emacs-wiki texinfo manual.
3827 @node GNU Free Documentation License, Concept Index, Contributors, Top
3828 @appendix GNU Free Documentation License
3829 @include doclicense.texi
3832 @node Concept Index,  , GNU Free Documentation License, Top
3833 @comment  node-name,  next,  previous,  up
3834 @unnumbered Index
3836 @printindex cp
3838 @bye