1 \input texinfo @c -*-texinfo-*-
9 * Muse: (muse). Authoring and publishing environment for Emacs.
15 This manual is for Emacs Muse version 3.12.
17 Copyright @copyright{} 2004, 2005, 2006, 2007,
18 2008 Free Software Foundation, Inc.
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.
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.
51 @vskip 0pt plus 1filll
55 @c So the toc is printed at the start
59 @node Top, Preface, (dir), (dir)
60 @comment node-name, next, previous, up
67 * Preface:: About the documentation.
68 * Introduction:: What is Muse?
69 * Obtaining Muse:: How to get Muse releases and development
71 * Installation:: Compiling and installing Muse.
72 * Getting Started:: Setting up Muse and editing files.
73 * Projects:: Creating and managing Muse projects.
74 * Keystroke Summary:: Keys used in Muse mode.
75 * Markup Rules:: Rules for using markup.
76 * Publishing Styles:: Publishing various types of documents.
77 * Extending Muse:: Making your own publishing styles.
78 * Miscellaneous:: Miscellaneous add-ons, like a minor mode.
79 * Getting Help and Reporting Bugs::
80 * History:: History of this document.
81 * Contributors:: Contributors to this documentation.
82 * GNU Free Documentation License:: The license for this documentation.
83 * Concept Index:: Search for terms.
86 --- The Detailed Node Listing ---
88 How to Get Muse Releases and Development Changes
90 * Releases:: Released versions of Muse.
91 * Development:: Latest unreleased development changes.
95 * Loading Muse:: How to load Muse.
96 * Using Muse Mode:: How to edit files in Muse.
97 * Publishing Files Overview:: Publishing a single file or project.
98 * File Extensions:: Using a different file extension.
100 Creating and Managing Muse Projects
102 * Single Project:: A single-project example.
103 * Multiple Projects:: A multiple-project example.
104 * Projects and Subdirectories:: Publishing subdirectories in projects.
105 * Options for Projects:: Listing of available options for projects.
107 Rules for Using Markup
109 * Paragraphs:: Paragraphs: centering and quoting.
110 * Headings:: Levels of headings.
111 * Directives:: Directives at the beginning of a
113 * Emphasizing Text:: Bold, italicized, and underlined text.
114 * Footnotes:: Making notes to be shown at the end.
115 * Verse:: Indicating poetic stanzas.
116 * Lists:: Lists of items.
117 * Tables:: Generation of data tables.
118 * Explicit Links:: Hyperlinks and email addresses with
120 * Implicit Links:: Bare URLs, WikiNames, and InterWiki
122 * Images:: Publishing and displaying images.
123 * Horizontal Rules and Anchors:: Inserting a horizontal line or anchor.
124 * Embedded Lisp:: Evaluating Emacs Lisp code in documents
126 * Citations:: Support for citing other resources.
127 * Comments:: Lines to omit from published output.
128 * Tag Summary:: Tags that Muse recognizes.
130 Publishing Various Types of Documents
132 * Blosxom:: Integrating Muse and pyblosxom.cgi.
133 * Book:: Publishing entries into a compilation.
134 * ConTeXt:: Publishing ConTeXt documents.
135 * DocBook:: Publishing in DocBook XML form.
136 * HTML:: Publishing in HTML or XHTML form.
137 * Ikiwiki:: Integrating with ikiwiki.
138 * Journal:: Keeping a journal or blog.
139 * LaTeX:: Publishing LaTeX documents.
140 * Poem:: Publish a poem to LaTeX or PDF.
141 * Texinfo:: Publish entries to Texinfo format or PDF.
142 * XML:: Publish entries to XML.
144 Integrating Muse and pyblosxom.cgi
146 * Blosxom Requirements:: Other tools needed for the Blosxom style.
147 * Blosxom Entries:: Format of a Blosxom entry and automation.
148 * Blosxom Options:: Blosxom styles and options provided.
150 Making your own publishing styles
152 * Markup Functions:: Specifying functions to mark up text.
153 * Markup Regexps:: Markup rules for publishing.
154 * Markup Strings:: Strings specific to a publishing style.
155 * Markup Tags:: Tag specifications for special markup.
156 * Style Elements:: Parameters used for defining styles.
157 * Deriving Styles:: Deriving a new style from an existing
160 Miscellaneous add-ons, like a minor mode
162 * Muse List Edit Minor Mode:: Edit lists easily in other major modes.
167 @node Preface, Introduction, Top, Top
168 @comment node-name, next, previous, up
169 @chapter About the documentation
171 This document describes Muse, which was written by John Wiegley and is
172 now maintained by Michael Olson. Several versions of this manual are
176 @item PDF: http://mwolson.org/static/doc/muse.pdf
177 @item HTML (single file): http://mwolson.org/static/doc/muse.html
178 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
181 @node Introduction, Obtaining Muse, Preface, Top
182 @comment node-name, next, previous, up
183 @chapter What is Muse?
185 Emacs Muse (also known as ``Muse'' or ``Emacs-Muse'') is an authoring
186 and publishing environment for Emacs. It simplifies the process of
187 writing documents and publishing them to various output formats.
189 Muse consists of two main parts: an enhanced text-mode for authoring
190 documents and navigating within Muse projects, and a set of publishing
191 styles for generating different kinds of output.
193 What makes Muse distinct from other text-publishing systems is a modular
194 environment, with a rather simple core, in which "styles" are derived
195 from to create new styles. Much of Muse's overall functionality is
196 optional. For example, you can use the publisher without the
197 major-mode, or the mode without doing any publishing; or if you don't
198 load the Texinfo or LaTeX modules, those styles won't be available.
200 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
201 code has been restructured and rewritten, especially its publishing
202 functions. The focus in this revision is on the authoring and
203 publishing aspects, and the "wikiness" has been removed as a default
204 behavior (available in the optional @file{muse-wiki} module). CamelCase
205 words are no longer special by default.
207 One of the principal aims in the development of Muse is to make it very
208 easy to produce good-looking, standards-compliant documents.
210 @node Obtaining Muse, Installation, Introduction, Top
211 @comment node-name, next, previous, up
212 @chapter How to Get Muse Releases and Development Changes
215 * Releases:: Released versions of Muse.
216 * Development:: Latest unreleased development changes.
219 @node Releases, Development, Obtaining Muse, Obtaining Muse
220 @comment node-name, next, previous, up
221 @section Released versions of Muse
223 Choose to install a release if you want to minimize risk.
225 Errors are corrected in development first. User-visible changes will be
226 announced on the @email{muse-el-discuss@@gna.org} mailing list.
227 @xref{Getting Help and Reporting Bugs}.
229 @cindex releases, Debian package
230 @cindex Debian package for Muse
231 Debian users can get Muse via apt-get. The @file{muse-el} package is
232 available both at Michael Olson's APT repository and the official Debian
233 repository. To make use of the former, add the following line to your
234 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
237 deb http://mwolson.org/debian/ ./
240 @cindex releases, Ubuntu package
241 @cindex Ubuntu package for Muse
242 Ubuntu users can also get Muse via apt-get. The @file{muse-el} package
243 is available both at Michael Olson's APT repository and the official
244 Ubuntu repository. To make use of the former, add the following line to
245 your @file{/etc/apt/sources.list} file and run @code{apt-get install
249 deb http://mwolson.org/ubuntu/ ./
252 The reason for making separate Debian and Ubuntu packages is that this
253 manual is under the GFDL, and Debian will not allow it to be distributed
254 in its main repository. Ubuntu, on the other hand, permits this manual
255 to be included with the @file{muse-el} package.
257 @cindex releases, from source
258 Alternatively, you can download the latest release from
259 @uref{http://download.gna.org/muse-el/} .
261 @node Development, , Releases, Obtaining Muse
262 @comment node-name, next, previous, up
263 @section Latest unreleased development changes
266 Choose the development version if you want to live on the bleeding edge
267 of Muse development or try out new features before release.
269 @cindex git version control system, using
270 The git version control system allows you to keep up-to-date with the
271 latest changes to the development version of Muse. It also allows you
272 to contribute changes (via commits, if you are have developer access to
273 the repository, or via patches, otherwise). If you would like to
274 contribute to Muse development, it is highly recommended that you use
277 If you are new to git, you might find this tutorial helpful:
278 @uref{http://www.kernel.org/pub/software/scm/git/docs/tutorial.html}.
280 Downloading the Muse module with git and staying up-to-date involves
287 @item Debian and Ubuntu: @kbd{apt-get install git-core}.
288 @item Windows: @uref{http://git.or.cz/gitwiki/WindowsInstall}.
289 @item Other operating systems: download, compile, and install the source
290 from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
291 package for your operating system.
294 @item Download the Muse development branch.
296 If you have developer access to Muse, do:
299 git clone ssh://repo.or.cz/srv/git/muse-el.git muse
305 git clone git://repo.or.cz/muse-el.git muse
308 If you are behind a restrictive firewall, and do not have developer
309 access, then do the following instead:
312 git clone http://repo.or.cz/r/muse-el.git muse
315 @item List upstream changes that are missing from your local copy.
316 Do this whenever you want to see whether new changes have been committed
317 to Muse. If you wish, you may skip this step and proceed directly to
321 # Change to the source directory you are interested in.
324 # Fetch new changes from the repository, but don't apply them yet
327 # Display log messages for the new changes
331 ``origin'' is git's name for the location where you originally got Muse
332 from. You can change this location at any time by editing the
333 @file{.git/config} file in the directory where the Muse source was
336 @cindex updating Muse with git
337 @item Update to the latest version by pulling in any missing changes.
344 git will show how many files changed, and will provide a visual display
345 for how many lines were changed in each file.
349 There are other ways to interact with the Muse repository.
352 @item Browse git repo: @uref{http://repo.or.cz/w/muse-el.git}
353 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
354 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
357 The latest development snapshot can lag behind the git repo by as much
358 as 20 minutes, but never more than that.
360 @subheading Becoming a Muse developer
361 @cindex developer, becoming
363 If you want commit access to the shared Muse repository, then register
364 an account at @uref{http://repo.or.cz} (be sure to add an SSH key), and
365 contact the current maintainer at @email{mwolson@@gnu.org}. It would be
366 best to send some patches to the @email{muse-el-discuss@@gna.org}
367 mailing list first, so that he knows that you know what you are doing.
368 @xref{Getting Help and Reporting Bugs}, for instructions on subscribing
371 You must also be willing to sign a copyright assignment for your changes
372 to Muse, since Muse is a GNU project. The current maintainer will
373 assist you in this process if you contact him.
375 For information on committing changes to Muse and performing
376 development, please consult
377 @uref{http://emacswiki.org/cgi-bin/wiki/MuseDevelopment}.
379 @node Installation, Getting Started, Obtaining Muse, Top
380 @comment node-name, next, previous, up
381 @chapter Compiling and Installing Muse
383 Muse may be compiled and installed on your machine.
385 @subheading Compilation
386 @cindex compiling Muse
388 This is an optional step, since Emacs Lisp source code does not
389 necessarily have to be byte-compiled. Byte-compilation may yield a very
390 slight speed increase.
392 A working copy of Emacs or XEmacs is needed in order to compile Emacs
393 Muse. By default, the program that is installed with the name
394 @command{emacs} will be used.
396 If you want to use the @command{xemacs} binary to perform the
397 compilation, you must copy @file{Makefile.defs.default} to
398 @file{Makefile.defs} in the top-level directory, and then edit
399 @file{Makefile.defs} as follows. You can put either a full path to an
400 Emacs or XEmacs binary or just the command name, as long as it is in the
405 SITEFLAG = -no-site-file
406 # Edit the section as necessary
407 install_info = install-info --section "XEmacs 21.4" $(1).info \
411 Running @code{make} in the top-level directory should compile the Muse
412 source files in the @file{lisp} directory, and generate an autoloads
413 file in @file{lisp/muse-autoloads.el}.
415 @subheading Installation
416 @cindex installing Muse
418 Muse may be installed into your file hierarchy by doing the following.
420 Copy @file{Makefile.defs.default} to @file{Makefile.defs} in the
421 top-level directory, if you haven't done so already. Then edit the
422 @file{Makefile.defs} file so that @env{ELISPDIR} points to where you
423 want the source and compiled Muse files to be installed and
424 @env{INFODIR} indicates where to put the Muse manual. You may use a
425 combination of @env{DESTDIR} and @env{PREFIX} to further determine where
426 the installed files should be placed. As mentioned earlier, you will
427 want to edit @env{EMACS} and @env{SITEFLAG} as shown in the Compilation
428 section if you are using XEmacs.
430 If you are installing Muse on a Debian or Ubuntu system, you might want
431 to change the value of @env{INSTALLINFO} as specified in
432 @file{Makefile.defs}.
434 If you wish to install Muse to different locations than the defaults
435 specify, edit @file{Makefile.defs} accordingly.
437 Run @code{make} as a normal user, if you haven't done so already.
439 Run @code{make install} as the root user if you have chosen installation
440 locations that require root permissions.
443 @cindex ELPA package for Muse
445 For those used to installing software packages, there will be a
446 @code{muse} package available in the Emacs Lisp Package Archive
447 (abbreviated ``ELPA'') as of the 3.10 release of Muse. This package
448 will be compiled and installed automatically in a user-specific
449 location. For more information on ELPA, see
450 @uref{http://tromey.com/elpa/}.
452 @node Getting Started, Projects, Installation, Top
453 @comment node-name, next, previous, up
454 @chapter Getting Started
458 * Loading Muse:: How to load Muse.
459 * Using Muse Mode:: How to edit files in Muse.
460 * Publishing Files Overview:: Publishing a single file or project.
461 * File Extensions:: Using a different file extension.
464 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
465 @comment node-name, next, previous, up
466 @section How to Load Muse
467 @cindex settings, init file
469 To use Muse, add the directory containing its files to your
470 @code{load-path} variable, in your @file{.emacs} file. Then, load in
471 the authoring mode, and the styles you wish to publish to. An example
475 (add-to-list 'load-path "<path to Muse>")
477 (require 'muse-mode) ; load authoring mode
479 (require 'muse-html) ; load publishing styles I use
480 (require 'muse-latex)
481 (require 'muse-texinfo)
482 (require 'muse-docbook)
484 (require 'muse-project) ; publish files in projects
487 An easy way of seeing which settings are available and changing settings
488 is to use the Muse customization interface. To do this, type
489 @kbd{M-x customize-group muse RET}. Each of the options has its own
490 documentation. Options are grouped logically according to what effect
493 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
494 @comment node-name, next, previous, up
495 @section How to Edit Files in Muse
496 @cindex editing Muse files
498 Muse Mode should automatically be activated when you visit a file with a
499 ``.muse'' extension. One such file is @file{QuickStart.muse}, which is
500 available in the @file{examples} directory of the Muse distribution.
501 You can tell that Muse Mode has been activated by checking for the text
502 ``Muse'' in your mode line. If Muse Mode has not been activated, you
503 may activate it by type @kbd{M-x muse-mode RET}.
505 You will notice that Muse files are highlighted very simply. Links are
506 colored blue, headings are large and bold text, and @verb{|<example>|}
507 tags are colored in grey.
509 There are several different ways to edit things like links, which hide
510 the underlying Muse markup. One way is to toggle font-locking off by
511 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
512 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
513 on. Another way is just to move into the text and edit it. Markup can
514 also be removed by normal deletion methods, though some side effects
515 might require a second deletion.
517 For the particular case of editing links, it is easiest to move to the
518 link and do @kbd{C-c C-e}, which is also @kbd{M-x
519 muse-edit-link-at-point}. This prompts you for the link and its
520 description, using the previous contents of the link as initial values.
521 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
522 A link to a URL may be created by hitting @kbd{C-c TAB u}. Links may be
523 followed by hitting @kbd{RET} on them.
525 If you want to add a new list item, this may by accomplished by hitting
526 @kbd{M-RET}. This will put a dash and some spaces on the screen. The
527 dash is the Muse markup that indicates a list item. It is also possible
528 to created ``nested'' lists with this command, by adjusting the number
529 of spaces in front of the dashes. If you have lists with long lines,
530 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
533 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
534 @comment node-name, next, previous, up
535 @section Publishing a Single File or Project
536 @cindex editing Muse files
538 The command @kbd{M-x muse-project-publish-this-file} will publish the
539 current document to any available publishing style (a publishing style
540 is an output format, like HTML or Docbook), placing the output in the
541 current directory. If you are in Muse Mode, this command will be bound
542 to @kbd{C-c C-t}. If the file has been published recently, and its
543 contents have not changed, running @kbd{C-c C-t} again will not publish
544 the file. To force publishing in this case, do @kbd{C-u C-c C-t}.
546 If you have set up projects and are visiting a file that is part of a
547 project, then @kbd{C-c C-t} will restrict the output formats to those
548 which are used by the project, and will automatically publish to the
549 output directory defined by the project. If you want to publish to a
550 different directory or use a different format, then use @kbd{C-c M-C-t},
551 which is also @kbd{M-x muse-publish-this-file}.
553 If the currently opened file is part of a defined project in
554 @code{muse-project-alist}, it (and the rest of the changed files in a
555 project) may be published using @kbd{C-c C-p}.
557 @node File Extensions, , Publishing Files Overview, Getting Started
558 @comment node-name, next, previous, up
559 @section Using a Different File Extension
560 @cindex file extension, specifying
562 By default, Muse expects all project files to have the file extension
563 @file{.muse}. Files without this extension will not be associated with
564 Muse mode and will not be considered part of any project, even if they
565 are within a project directory.
567 If you don't want to use @file{.muse}, you can customize the extension
568 by setting the value of @code{muse-file-extension}.
570 If you don't want to use any extension at all, and want Muse to
571 autodetect project files based on their location, then add the following
572 to your Muse settings file.
575 (setq muse-file-extension nil
579 Note that if you chose to have @code{muse-file-extension} set to
580 @code{nil}, you may have trouble if your @file{.emacs} file or other
581 init scripts attempt to visit a Muse file. (A very common example of
582 this is if you use Planner with Muse and run @code{(plan)} from your
583 @file{.emacs}.) If you wish to visit Muse files from your
584 @file{.emacs}, be sure to also add the following additional code before
585 any such visits happen:
588 (add-hook 'find-file-hooks 'muse-mode-maybe)
592 @node Projects, Keystroke Summary, Getting Started, Top
593 @comment node-name, next, previous, up
594 @chapter Creating and Managing Muse Projects
597 Often you will want to publish all the files within a directory to a
598 particular set of output styles automatically. To support, Muse
599 allows for the creation of "projects".
602 * Single Project:: A single-project example.
603 * Multiple Projects:: A multiple-project example.
604 * Projects and Subdirectories:: Publishing subdirectories in projects.
605 * Options for Projects:: Listing of available options for projects.
608 @node Single Project, Multiple Projects, Projects, Projects
609 @comment node-name, next, previous, up
610 @section A Single-Project Example
611 @cindex projects, single
613 Here is a sample project, which may be defined in your @file{.emacs}
617 (setq muse-project-alist
618 '(("Website" ("~/Pages" :default "index")
619 (:base "html" :path "~/public_html")
620 (:base "pdf" :path "~/public_html/pdf"))))
623 The above defines a project named "website", whose files are located
624 in the directory @file{~/Pages}. The default page to visit is
625 @file{index}. When this project is published, each page will be
626 output as HTML to the directory @file{~/public_html}, and as PDF to
627 the directory @file{~/public_html/pdf}. Within any project page, you
628 may create a link to other pages using the syntax @samp{[[pagename]]}.
630 If you would like to include only some files from a directory in a Muse
631 project, you may use a regexp in place of @file{~/Pages} in the example.
633 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
634 @comment node-name, next, previous, up
635 @section A Multiple-Project Example
636 @cindex projects, multiple
638 It is possible to specify multiple projects. Here is an example of
639 three projects: a generic website, a projects area, and a day-planner
640 (the day-planner part requires Planner Mode---see
641 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
644 (setq muse-project-alist
645 '(("Website" ("~/Pages" :default "index")
646 (:base "html" :path "~/public_html"))
647 (("Projects" ("~/Projects" :default "index")
649 :path "~/public_html/projects"
650 :exclude "/TopSecret")
652 :path "~/public_html/projects/pdf"
653 :exclude "/TopSecret")))
656 :major-mode planner-mode
657 :visit-link planner-visit-link)
658 (:base "planner-xhtml"
659 :path "~/public_html/plans"))))
662 The @option{:major-mode} attribute specifies which major to use when
663 visiting files in this directory.
665 The @option{:visit-link} attribute specifies the function to call when
668 The @option{:exclude} attribute has a regexp that matches files to never
671 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
672 @comment node-name, next, previous, up
673 @section Publishing Subdirectories in Projects
674 @cindex projects, subdirectories
676 If you want to publish a directory and all of its subdirectories, Muse
677 provides two convenience functions that together generate the proper
678 rules for you. Note that we use the backtick to begin this
679 muse-project-alist definition, rather than a single quote.
682 (setq muse-project-alist
683 `(("Website" ("~/Pages" :default "index")
684 (:base "html" :path "~/public_html"))
685 ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
687 ;; Publish this directory and its subdirectories. Arguments
688 ;; are as follows. The above `muse-project-alist-dirs' part
690 ;; 1. Source directory
691 ;; 2. Output directory
692 ;; 3. Publishing style
693 ;; remainder: Other things to put in every generated style
694 ,@@(muse-project-alist-styles "~/Blog"
699 The @code{muse-project-alist-dirs} function takes a directory and
700 returns it and all of its subdirectories in a list.
702 The @code{muse-project-alist-styles} function is explained by the
705 The ``blosxom'' text is the name of another publishing style, much like
706 ``html''. @xref{Blosxom}, for further information about it. You can
707 use any publishing style you like for the third argument to
708 @code{muse-project-alist-styles}.
710 @node Options for Projects, , Projects and Subdirectories, Projects
711 @comment node-name, next, previous, up
712 @section Listing of Available Options for Projects
713 @cindex projects, options
714 @cindex muse-project-alist, reference
716 This is a listing of all of the various options (or, more accurately:
717 attributes) that may be specified in @code{muse-project-alist}.
719 Each muse-project-alist entry looks like this:
722 (PROJECT-NAME (SOURCES)
726 We refer to these names below.
728 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
729 The first value is a keyword, like @option{:default}. The second part
730 is the value associated with that keyword, such as the text ``index''.
731 If you are familiar with Emacs Lisp property lists, the concept is
732 similar to that, except that in the SOURCES section, single directories
733 can be interspersed with two-value attributes.
735 @subheading Project Name
737 This is a string that indicates the name of the project. It is
738 primarily used for publishing interwiki links with the
739 @file{muse-wiki.el} module.
743 This part of a muse-project-alist entry consists of two-value
744 attributes, and also directory names. If you are publishing a book, the
745 order of directories and attributes is significant.
747 The minimal content for the sources section is a list of directories.
752 Indicates a new chapter of a book. The text of the title of the chapter
753 comes immediately after this keyword.
756 Indicates the end of a book. Directories listed after this one are
757 ignored when publishing a book. The value ``t'' (without quotes) should
758 come immediately after this keyword.
761 A function to call while publishing a book. This is useful for doing
762 something just after a particular chapter.
765 Indicates the beginning of a new part of the book. The text of the
766 title should come immediately after this keyword.
769 Indicate a particular publishing style to use for this part of the book.
770 If this is specified, it should come just after a @option{:part}
774 The default page to visit when browsing a project. Also, if you are
775 using the @file{muse-wiki.el} module, publishing a link to just a
776 project's name will cause it to link to this default file.
779 This specifies a list of pages which should be published every time a
780 project is published (by using @kbd{C-c C-p}, for example), regardless
781 of whether their contents have changed. This is useful for updating
782 Index pages, pages that use the @verb{|<include>|} tag, and other pages
783 that have dynamically-generated content.
786 This specifies the major mode to use when visiting files in this
787 project. The default is @code{muse-mode}.
790 This indicates that while publishing a book, do not automatically create
791 chapters. Values which may follow this are nil (the default, which
792 means that we automatically create chapters), or non-nil, which means
793 that we manually specify chapters with the @option{:book-chapter}
796 @item :publish-project
797 Indicates which function we should call when publishing a project.
800 This specifies a list of variables and values to set when publishing a
801 project. The list should be a property list, which is in the form:
804 (VAR1 VALUE1 VAR2 VALUE2 ...)
808 Specifies the function to call when visiting a link. The default is
809 @code{muse-visit-link-default}. The arguments for that function should
810 be (1) the link and (2) whether to visit the link in a new window.
816 This part of a muse-project-alist entry is composed of lists of
817 attributes. Each list is called an ``output style''.
819 The minimal content for an output style is a @option{:base} attribute
820 and a @option{:path} attribute.
825 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
828 An external URL which can be used to access published files. This is
829 mainly used by the @file{muse-wiki} module when publishing links between
830 two separate projects, if the projects are served on different domains.
832 It is also used by the @file{muse-journal} module to create the RSS or
836 Exclude items matching a regexp from being published. The regexp should
837 usually begin with "/".
840 Only include items matching a regexp when publishing. The regexp should
841 usually begin with "/".
844 The directory in which to store published files.
847 A file containing the timestamps (that is, time of creation) for files
848 in this project. It might eventually used by the @file{muse-blosxom}
849 module, but this option is not currently in use by any Muse code.
854 @node Keystroke Summary, Markup Rules, Projects, Top
855 @comment node-name, next, previous, up
856 @chapter Keys Used in Muse Mode
859 This is a summary of keystrokes available in every Muse buffer.
863 @item C-c C-a (`muse-index')
864 Display an index of all known Muse pages.
866 @item C-c C-b (`muse-find-backlinks')
867 Find all pages that link to this page.
869 @item C-c C-e (`muse-edit-link-at-point')
872 @item C-c C-f (`muse-project-find-file')
873 Open another Muse page. Prompt for the name.
875 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
876 Insert a link to a file interactively.
878 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
879 Insert a tag interactively.
881 @item C-c C-i u, C-c TAB u (`muse-insert-url')
882 Insert a URL interactively.
884 @item C-c C-l (`font-lock-mode')
885 Toggle font lock / highlighting for the current buffer.
887 @item C-c C-p (`muse-project-publish')
888 Publish any Muse pages that have changed.
890 @item C-c C-s (`muse-search')
891 Find text in all files of the current project.
893 @item C-c C-t (`muse-project-publish-this-file')
894 Publish the currently-visited file. Prompt for the style if the current
895 file can be published using more than one style.
897 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
898 Publish the currently-visited file. Prompt for both the style and
901 @item C-c C-v (`muse-browse-result')
902 Show the published result of this page.
904 @item C-c = (`muse-what-changed')
905 Diff this page against the last backup version.
908 Move to the next Wiki reference.
911 Move to the previous Wiki reference.
914 Complete the name of a page from the current project at point.
917 Insert a new list item at point, indenting properly.
920 Decrease the indentation of the list item at point.
923 Increase the indentation of the list item at point.
925 @item M-x muse-colors-toggle-inline-images RET
926 Toggle display of inlined images on/off.
928 @item M-x muse-update-values RET
929 Update various values that are automatically generated.
931 Call this after changing @code{muse-project-alist}.
935 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
936 @comment node-name, next, previous, up
937 @chapter Rules for Using Markup
940 A Muse document uses special, contextual markup rules to determine how
941 to format the output result. For example, if a paragraph is indented,
942 Muse assumes it should be quoted.
944 There are not too many markup rules, and all of them strive to be as
945 simple as possible so that you can focus on document creation, rather
949 * Paragraphs:: Paragraphs: centering and quoting.
950 * Headings:: Levels of headings.
951 * Directives:: Directives at the beginning of a
953 * Emphasizing Text:: Bold, italicized, and underlined text.
954 * Footnotes:: Making notes to be shown at the end.
955 * Verse:: Indicating poetic stanzas.
956 * Lists:: Lists of items.
957 * Tables:: Generation of data tables.
958 * Explicit Links:: Hyperlinks and email addresses with
960 * Implicit Links:: Bare URLs, WikiNames, and InterWiki
962 * Images:: Publishing and displaying images.
963 * Horizontal Rules and Anchors:: Inserting a horizontal line or anchor.
964 * Embedded Lisp:: Evaluating Emacs Lisp code in documents
966 * Citations:: Support for citing other resources.
967 * Comments:: Lines to omit from published output.
968 * Tag Summary:: Tags that Muse recognizes.
971 @node Paragraphs, Headings, Markup Rules, Markup Rules
972 @comment node-name, next, previous, up
973 @section Paragraphs: centering and quoting
976 Paragraphs in Muse must be separated by a blank line.
978 @cindex paragraphs, centered
979 @subheading Centered paragraphs and quotations
981 A line that begins with six or more columns of whitespace (either tabs
982 or spaces) indicates a centered paragraph. Alternatively, you can use
983 the @verb{|<center>|} tag to surround regions that are to be published
984 as centered paragraphs.
986 @cindex paragraphs, quoted
988 But if a line begins with whitespace, though less than six columns, it
989 indicates a quoted paragraph. Alternatively, you can use the
990 @verb{|<quote>|} tag to surround regions that are to be published as
994 @cindex monospace, rendering blocks
995 @cindex HTML, rendering blocks in monospace
996 @subheading Literal paragraphs
998 The @verb{|<example>|} tag is used for examples, where whitespace should
999 be preserved, the text rendered in monospace, and any characters special
1000 to the output style escaped.
1002 @cindex literal text
1003 @cindex HTML, inserting a raw block
1004 There is also the @verb{|<literal>|} tag, which causes a marked block to
1005 be entirely left alone. This can be used for inserting a hand-coded
1006 HTML blocks into HTML output, for example.
1008 If you want some text to only be inserted when publishing to a
1009 particular publishing style, use the @option{style} attribute for the
1010 @verb{|<literal>|} tag. An example follows.
1013 <literal style="latex">
1014 A LaTeX-based style was used in the publishing of this document.
1018 This will leave the region alone if the current publishing style is
1019 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
1020 otherwise. It is also possible to leave the text alone only for one
1021 particular style, rather than its derivations, by adding
1022 @code{exact="t"} to the tag.
1025 @subheading Line breaks
1027 If you need a line break, then use the @samp{<br>} tag. Most of the
1028 time this tag is unnecessary, because Muse will automatically detect
1029 paragraphs by means of blank lines. If you want to preserve newlines in
1030 several lines of text, then use verse markup instead (@pxref{Verse}).
1032 @node Headings, Directives, Paragraphs, Markup Rules
1033 @comment node-name, next, previous, up
1034 @section Levels of headings
1037 A heading becomes a chapter or section in printed output -- depending on
1038 the style. To indicate a heading, start a new paragraph with one or
1039 more asterices, followed by a space and the heading title. Then begin
1040 another paragraph to enter the text for that section.
1042 All levels of headings will be published. Most publishing styles only
1043 distinguish the between the first 4 levels, however.
1055 @node Directives, Emphasizing Text, Headings, Markup Rules
1056 @comment node-name, next, previous, up
1057 @section Directives at the beginning of a document
1060 Directives are lines beginning with the @samp{#} character that come
1061 before any paragraphs or sections in the document. Directives are of
1062 the form ``#directive content of directive''. You can use any
1063 combination of uppercase and lowercase letters for directives, even if
1064 the directive is not in the list below.
1066 The @code{muse-publishing-directive} function may be used in header and
1067 footer text to access directives. For example, to access the
1068 @code{#title} directive, use @code{(muse-publishing-directive "title")}.
1070 The following is a list of directives that Muse uses.
1075 The author of this document.
1077 If this is not specified, Muse will attempt to figure it out from the
1078 @code{user-full-name} variable.
1082 The date that the document was last modified.
1084 This is used by publishing styles that are able to embed the date
1089 A short description of this document.
1091 This is used by the @code{journal} publishing style to embed information
1092 inside of an RSS/RDF feed.
1096 The title of this document.
1098 If this is not specified, the name of the file is used.
1102 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1103 @comment node-name, next, previous, up
1104 @section Bold, italicized, and underlined text
1105 @cindex emphasizing text
1106 @cindex underlining text
1107 @cindex italicizing text
1108 @cindex verbatim text
1109 @cindex monospace, rendering words
1111 To emphasize text, surround it with certain specially recognized
1117 ***very strong emphasis***
1119 =verbatim and monospace=
1123 While editing a Muse document in Muse mode, these forms of emphasis will
1124 be highlighted in a WYSIWYG manner. Each of these forms may span
1127 Verbatim text will be colored as gray by default. To change this,
1128 customize @code{muse-verbatim-face}.
1130 You can also use the @verb{|<code>|} tag to indicate verbatim and
1131 monospace text. This is handy for regions that have an ``='' in them.
1133 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1134 @comment node-name, next, previous, up
1135 @section Making notes to be shown at the end
1138 A footnote reference is simply a number in square brackets. To define
1139 the footnote, place this definition at the bottom of your file.
1140 @samp{footnote-mode} can be used to greatly facilitate the creation of
1141 these kinds of footnotes.
1143 Footnotes are defined by the same number in brackets occurring at the
1144 beginning of a line. Use footnote-mode's @kbd{C-c ! a} command, to very
1145 easily insert footnotes while typing. Use @kbd{C-x C-x} to return to
1146 the point of insertion.
1148 @node Verse, Lists, Footnotes, Markup Rules
1149 @comment node-name, next, previous, up
1150 @section Indicating poetic stanzas
1154 Poetry requires that whitespace be preserved, but without resorting to
1155 monospace. To indicate this, use the following markup, reminiscent of
1159 > A line of Emacs verse;
1160 > forgive its being so terse.
1163 You can also use the @verb{|<verse>|} tag, if you prefer.
1167 A line of Emacs verse;
1168 forgive its being so terse.
1172 @cindex verses, multiple stanzas
1173 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1178 A line of Emacs verse;
1179 forgive its being so terse.
1181 In terms of terse verse,
1186 @node Lists, Tables, Verse, Markup Rules
1187 @comment node-name, next, previous, up
1188 @section Lists of items
1191 Lists are given using special characters at the beginning of a line.
1192 Whitespace must occur before bullets or numbered items, to distinguish
1193 from the possibility of those characters occurring in a real sentence.
1195 @cindex lists, bullets
1196 These are rendered as a bullet list.
1205 @cindex lists, enumerated
1206 An enumerated list follows.
1215 @cindex lists, definitions
1216 Here is a definition list.
1220 This is a first definition
1221 And it has two lines;
1222 no, make that three.
1224 Term2 :: This is a second definition
1227 @subheading Nested lists
1229 @cindex lists, nested
1230 It is possible to nest lists of the same or different kinds. The
1231 ``level'' of the list is determined by the amount of initial whitespace.
1236 - Level 1, bullet item one
1237 1. Level 2, enum item one
1238 2. Level 2, enum item two
1239 - Level 1, bullet item two
1240 1. Level 2, enum item three
1241 2. Level 2, enum item four
1245 @subheading Breaking list items
1247 @cindex lists, breaking lines
1248 If you want to break up a line within any list type, just put one blank
1249 line between the end of the previous line and the beginning of the next
1250 line, using the same amount of initial indentation.
1253 - bullet item 1, line 1
1255 bullet item 1, line 2
1261 - bullet item 2, line 1
1263 bullet item 2, line 2
1266 @node Tables, Explicit Links, Lists, Markup Rules
1267 @comment node-name, next, previous, up
1268 @section Generation of data tables
1271 @cindex tables, simple
1272 Only very simple tables are supported. The syntax is as follows.
1275 Double bars || Separate header fields
1277 Single bars | Separate body fields
1278 Here are more | body fields
1280 Triple bars ||| Separate footer fields
1283 Some publishing styles require header fields to come first, then footer
1284 fields, and then the body fields. You can use any order for these
1285 sections that you like, and Muse will re-order them for you at
1288 If you wish to disable table generation for one Muse file, add the
1289 directive @samp{#disable-tables t} to the top of the file.
1291 @subheading Other table formats
1293 @cindex tables, orgtbl-mode style
1294 It is possible to publish very basic Orgtbl-mode style tables.
1297 | org | style | table |
1298 |------+-------+-------|
1302 |------+-------+-------|
1306 If you are used to the way that Org Mode publishes these tables, then
1307 customize `muse-html-table-attributes' to the following, in order to get
1308 a similar kind of output.
1311 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1314 @cindex tables, table.el style
1315 @file{table.el} style tables are also supported, as long as
1316 @file{table.el} itself supports outputting tables for a particular
1317 publishing style. At the time of this writing, the ``html'', ``latex'',
1318 and ``docbook'' styles are supported by @file{table.el}. Styles derived
1319 from these styles will also work.
1331 @node Explicit Links, Implicit Links, Tables, Markup Rules
1332 @comment node-name, next, previous, up
1333 @section Hyperlinks and email addresses with descriptions
1334 @cindex links, explicit
1336 A hyperlink can reference a URL, or another page within a Muse
1337 project. In addition, descriptive text can be specified, which should
1338 be displayed rather than the link text in output styles that supports
1339 link descriptions. The syntax is as follows.
1342 [[link target][link description]]
1343 [[link target without description]]
1346 Thus, the current maintainer's homepage for Muse can be found
1347 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1348 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1350 @node Implicit Links, Images, Explicit Links, Markup Rules
1351 @comment node-name, next, previous, up
1352 @section Bare URLs, WikiNames, and InterWiki links
1353 @cindex links, implicit
1357 @cindex Email addresses
1359 A URL or email address encountered in the input text is published as a
1360 hyperlink. These kind of links are called @dfn{implicit links} because
1361 they are not separated from the rest of the Muse document in any way.
1363 Some characters in URLs will prevent Muse from recognizing them as
1364 implicit links. If you want to link to a URL containing spaces or any of
1365 the characters ``][,"'`()<>^'', you will have to make the link
1366 explicit. The punctuation characters ``.,;:'' are also not recognized as
1367 part of a URL when they appear at its end. For information on how to
1368 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1369 addresses with descriptions}.
1372 If the @command{muse-wiki} module is loaded, another form of implicit
1373 link will be made available. WikiNames, which are typed in CamelCase,
1374 are highlighted and published as links, provided that the file they
1377 Customization of WikiName recognition may be accomplished by editing the
1378 @code{muse-wiki-wikiword-regexp} option and subsequently running
1379 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1380 If you use the Customize interface, the latter will be done
1383 @cindex InterWiki links
1384 @cindex inter-project links
1385 The @command{muse-wiki} module also allows for InterWiki links. These
1386 are similar to WikiWords, but they specify both the project and page of
1387 a file. The names of your project entries in @code{muse-project-alist}
1388 will be used as InterWiki names by default. Several examples follow.
1391 Blog::DocumentingMuse
1396 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1397 the project name, and @samp{DocumentingMuse} is the page name. In the
1398 second example, @samp{#} is the interwiki delimiter. If the name of a
1399 project occurs by itself in text, like the third case, it will be
1400 colorized and published as a link to the default page of the given
1403 Customization of interwiki links may be accomplished by editing the
1404 @code{muse-wiki-interwiki-alist} option.
1406 It is also possible to link to an anchor in an interwiki document. This
1407 is called a ``three-part link''. Examples of this follow.
1410 Blog::DocumentingMuse#anchor1
1411 Projects#EmacsMuse#anchor2
1414 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1415 @comment node-name, next, previous, up
1416 @section Publishing and displaying images
1418 @cindex links, with images
1419 @subheading Image links
1421 Links to images may be used in either the target or the description, or
1422 both. Thus, the following code will publish as a clickable image that
1423 points to @url{http://mwolson.org/}.
1426 [[http://mwolson.org/][/static/logos/site-logo.png]]
1429 Normally, images in the link part will be inlined.
1431 If you want these images to be published as links instead, place the
1432 text ``URL:'' immediately in front of the link text. An example
1436 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1439 @cindex images, displaying
1440 @cindex images, local
1441 @subheading Displaying images in Muse mode
1442 If a link to a locally-available image is encountered in the link
1443 description, Muse mode will attempt to display it if your version of
1446 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1447 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1449 The method for finding images may be altered by customizing the
1450 @code{muse-colors-inline-image-method} option. One useful value for
1451 this option is @code{muse-colors-use-publishing-directory}, which tells
1452 Muse mode to look in the directory where the current file will be
1453 published. The default is to look in the current directory. Relative
1454 paths like @samp{../pics/} should work for either setting.
1456 Eventually, it is hoped that Muse will be able to copy images from the a
1457 ``source'' directory to a publishing directory by customizing
1458 @code{muse-project-alist}, but this has not been implemented yet.
1460 @cindex images, without descriptions
1461 @cindex images, inlined
1462 @subheading Publishing simple images
1463 The following example will display correctly and publish correctly if a
1464 @acronym{PNG} file called @file{TestLogo.png} exists in the
1465 @file{../pics/} directory. If text is on the same line as the picture,
1466 it will remain so in the output.
1472 @cindex images, captions
1473 @subheading Publishing images with captions
1474 If you want to add a caption to an image, use the following syntax.
1475 This will center the image (if the output format supports it) and add a
1476 centered caption below the picture. Formats that do not support
1477 centering the image will instead leave it against the left margin.
1480 [[../pics/mycat.png][My cat Dexter]]
1483 Images with captions may only occur in their own paragraphs, with no
1484 text on the same line. Otherwise, the published output will not be
1485 syntactically correct.
1487 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1488 @comment node-name, next, previous, up
1489 @section Inserting a horizontal line or anchor
1491 @cindex horizontal rules
1493 @subheading Horizontal Rules
1495 Four or more dashes indicate a horizontal rule. Be sure to put blank
1496 lines around it, or it will be considered part of the proceeding or
1497 following paragraph!
1500 @cindex links, with target on same page
1503 If you begin a line with "#anchor" -- where "anchor" can be any word
1504 that doesn't contain whitespace -- it defines an anchor at that point
1505 into the document. This point can be referenced using "page#anchor" as
1506 the target in a Muse link.
1508 @node Embedded Lisp, Citations, Horizontal Rules and Anchors, Markup Rules
1509 @comment node-name, next, previous, up
1510 @section Evaluating Emacs Lisp code in documents for extensibility
1511 @cindex lisp, embedded
1513 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag.
1514 With the @verb{|<lisp>|} tag, you may generate whatever output text you
1515 wish. The inserted output will get marked up if the @verb{|<lisp>|}
1516 tag appears within the main text of the document.
1519 <lisp>(concat "This form gets " "inserted")</lisp>
1522 @cindex lisp, and insert command
1523 Note that you should not use the @code{insert} command within a set of
1524 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1525 tags will be automatically inserted into the document.
1527 It is also possible to treat the output as if it were surrounded by the
1528 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1529 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1530 attribute of the @verb{|<lisp>|} tag.
1533 <lisp markup="example">
1534 (concat "Insert" " me")
1538 Other languages also have tags that cause source code to be evaluated.
1539 @xref{Tag Summary}, for details.
1541 @node Citations, Comments, Embedded Lisp, Markup Rules
1542 @comment node-name, next, previous, up
1543 @section Support for citing other resources
1545 @cindex tags, <cite>
1549 Here is an example of what citations look like in a Muse document.
1557 Some text before <cite>Miller1999</cite> and after the citation.
1559 This is an author-only citation <cite type="author">Miller1999</cite>.
1561 And this is a year-only citation <cite type="year">Miller1999</cite>.
1563 Finally, this is a multi-head citation
1564 <cite>Miller1999,Andrews2005</cite>.
1567 @subheading Overview
1569 The @code{#bibsource} directive defines the source of the
1570 bibliographies. The following sources are possible.
1573 @item DocBook + RefDB:
1576 @item LaTeX + bibtex:
1577 the name of an appropriate bibtex file
1579 @item LaTeX + RefDB:
1580 if the input file is called "foo.muse", then set this to "foo.bib"
1583 Citations are encoded as @verb{|<cite>|} elements which enclose the
1584 citation keys as they are defined in the bibliography file or database.
1585 In multi-head citations, the citation keys have to be separated by
1586 colons or semicolons. The @code{latex} and @code{docbook} styles
1587 translate these to the proper separator automatically.
1589 The @verb{|<cite>|} elements take an optional ``type'' attribute that
1590 defines how the citation is rendered. If the attribute is missing,
1591 you'll get a regular citation according to the bibliography style,
1592 e.g.'' (Miller et al., 1999)''. If the attribute is set to "author",
1593 only the name of the author(s) will be rendered. Accordingly, "year"
1594 will cause the year to be printed. This is useful to create citations
1598 Miller et al. had already shown in a previous publication (1999) that
1599 this is not going to work.
1602 Remember that refdb-mode (the Emacs interface to RefDB) can retrieve
1603 references by simply marking the citation key and running the
1604 @code{refdb-getref-by-field-on-region} command. Later versions of
1605 @code{refdb-mode} will also allow to insert references as Muse citations
1606 (which is already implemented for DocBook, TEI, and LaTeX documents).
1608 You may have noticed that there is no element to indicate the position
1609 of the bibliography. The latter is always created at a valid position
1610 close to the end of the document. The functions
1611 @code{muse-docbook-bibliography} and @code{muse-latex-bibliography} are
1612 called in the header or footer to generate this content, so it is
1613 possible to change the exact position.
1615 @node Comments, Tag Summary, Citations, Markup Rules
1616 @comment node-name, next, previous, up
1617 @section Lines to omit from published output
1619 @cindex publishing, omitting lines
1621 Use the following syntax to indicate a comment. Comments will not be
1625 ; Comment text goes here.
1628 That is, only a semi-colon at the beginning of a line, followed by a
1629 literal space, will cause that line to be treated as a comment.
1631 You can alternatively surround the region with the @verb{|<comment>|}
1634 If you wish the comment to be published, but just commented out using
1635 the comment syntax of the output format, then set
1636 @option{muse-publish-comments-p} to non-nil.
1638 @node Tag Summary, , Comments, Markup Rules
1639 @comment node-name, next, previous, up
1640 @section Tags that Muse recognizes
1642 @cindex inserting files at publish time
1643 @cindex publishing, including markup in headers and footers
1644 @cindex publishing, inserting files
1646 Muse has several built-in tags that may prove useful during publishing.
1647 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1648 Muse uses, as well as make your own tags.
1650 Only a small subset of these tags are available in header and footer
1651 text. The @code{muse-publish-markup-header-footer-tags} option lists
1652 the tags that are allowed in headers and footers.
1656 If a tag takes arguments, it will look like this, where ``tagname'' is
1657 the name of the tag.
1660 <tagname arg1="string1" arg2="string2">
1663 If you want the tag to look like it came straight from an XHTML
1664 document, you can alternatively do the following.
1667 <tagname arg1="string1" arg2="string2" />
1670 If a tag surrounds some text, it will look like this.
1673 <tagname>Some text</tagname>
1676 If a tag surrounds a large region, it will look like this.
1685 @subheading Tag listing
1687 This is the complete list of tags that Muse accepts, including those
1688 that were mentioned in previous sections.
1693 Insert a line break.
1695 Muse will automatically detect paragraphs when publishing by means of
1696 blank lines, so this tag is usually unnecessary.
1699 Insert a citation to another source.
1701 This takes the argument @option{type}, which indicates the type of
1702 citation. The valid types are "author" and "year". If this argument is
1703 omitted, include both author and year in the citation.
1705 The bibliography to use for the citation may be specified by the
1706 @option{#bibsource} directive.
1708 @xref{Citations}, for additional information.
1711 If publishing to HTML, surround the given text with a @verb{|<span>|}
1712 tag. It takes one argument called ``name'' that specifies the ``class''
1713 attribute of the @verb{|<span>|} tag.
1715 If publishing to a different format, do nothing extra to the text.
1718 Treat the text surrounded by the tag as if they were enclosed in equal
1719 signs, that is, make it monospace.
1722 Run a command on the region, replacing the region with the result of the
1723 command. The command is specified with the ``interp'' argument. If no
1724 value for ``interp'' is given, pass the entire region to the shell.
1726 The ``markup'' argument controls how this section is marked up.
1728 If it is omitted, publish the region with the normal Muse rules.
1730 If "nil", do not mark up the region at all, but prevent Muse from
1731 further interpreting it.
1733 If "example", treat the region as if it was surrounded by the
1734 @verb{|<example>|} tag.
1736 If "src", treat the included text as if it was surrounded by the
1737 @verb{|<src>|} tag. You should also specify the ``lang'' attribute if
1740 If "verse", treat the region as if it was surrounded by the
1741 @verb{|<verse>|} tag, to preserve newlines.
1743 Otherwise, it should be the name of a function to call, with the buffer
1744 narrowed to the region.
1747 Treat the entire region as a comment. If the option
1748 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1749 publish it using the comment syntax of the current publishing style.
1752 Publish a Table of Contents. This will either be inserted in-place or
1753 at the beginning of the document, depending on your publishing style.
1754 It does not have a delimiting tag.
1756 By default, only 2 levels of headings will be included in the generated
1757 Table of Contents. To change this globally, customize the
1758 @var{muse-publish-contents-depth} option. To change this only for the
1759 current tag, use the ``depth'' argument.
1762 Insert a <div> tag into HTML documents, and do not insert anything
1763 special for other non-HTML publishing formats.
1765 If the ``style'' argument is provided, include it with the published
1766 @verb{|<div>|} tag. Likewise for the ``id'' argument.
1769 Publish the region in monospace, preserving the newlines in the region.
1770 This is useful for snippets of code.
1773 Insert the given file at the current location during publishing. The
1774 basic use of this tag is as follows, replacing ``included_file'' with
1775 the name of the file that you want to include.
1778 <include file="included_file">
1781 The ``markup'' argument controls how this section is marked up.
1783 If it is omitted, publish the included text with the normal Muse
1786 If "nil", do not mark up the included text at all.
1788 If "example", treat the included text as if it was surrounded by the
1789 @verb{|<example>|} tag.
1791 If "src", treat the included text as if it was surrounded by the
1792 @verb{|<src>|} tag. You should also specify the ``lang'' attribute if
1795 If "verse", treat the included text as if it was surrounded by the
1796 @verb{|<verse>|} tag, to preserve newlines.
1798 Otherwise, it should be the name of a function to call after inserting
1799 the file with the buffer narrowed to the section inserted.
1802 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1803 The result is then inserted into the document, so you do not need to
1804 explicitly call @code{insert}. All text properties are removed from the
1807 This tag takes the ``markup'' argument. See the description of
1808 @verb{|<command>|} for details.
1811 Make sure that the text enclosed by this tag is published without
1812 escaping it in any way. This is useful for inserting markup directly
1813 into the published document, when Muse does not provide the desired
1817 Mark up the text between the initial and ending tags. The markup
1818 command to use may be specified by the ``function'' argument. The
1819 standard Muse markup routines are used by default if no ``function''
1820 argument is provided.
1822 This is useful for marking up regions in headers and footers. One
1823 example that comes to mind is generating a published index of all of the
1824 files in the current project by doing the following.
1827 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1831 Run the @command{perl} language interpreter on the region, replacing the
1832 region with the result of the command.
1834 This tag takes the ``markup'' argument. See the description of
1835 @verb{|<command>|} for details.
1838 Run the @command{python} language interpreter on the region, replacing
1839 the region with the result of the command.
1841 This tag takes the ``markup'' argument. See the description of
1842 @verb{|<command>|} for details.
1845 Publish the region as a blockquote. This will either be inserted
1846 in-place or at the beginning of the document, depending on your
1847 publishing style. It does not have a delimiting tag.
1850 Run the @command{ruby} language interpreter on the region, replacing the
1851 region with the result of the command.
1853 This tag takes the ``markup'' argument. See the description of
1854 @verb{|<command>|} for details.
1857 Publish the region using htmlize.
1858 The language to use may be specified by the ``lang'' attribute.
1860 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1861 the value of the ``lang'' attribute.
1863 This tag requires htmlize 1.34 or later in order to work. If this is
1864 not satisfied, or the current publishing style is not HTML-based, Muse
1865 will publish the region like an @verb{|<example>|} tag.
1868 This is used when you want to prevent Muse from trying to interpret some
1869 markup. Surround the markup in @verb{|<verbatim>|} and
1870 @verb{|</verbatim>|}, and it will not be interpreted.
1872 This tag was used often in previous versions of Muse because they did
1873 not support whole-document escaping of specials. Now, it will only be
1874 needed for other tags, and perhaps footnotes as well.
1877 Preserve the newlines in the region. In formats like HTML, newlines are
1878 removed by default, hence the need for this tag. In other publishing
1879 styles, this tag may cause the text to be indented slightly in a way
1880 that looks nice for poetry and prose.
1884 @node Publishing Styles, Extending Muse, Markup Rules, Top
1885 @comment node-name, next, previous, up
1886 @chapter Publishing Various Types of Documents
1887 @cindex publishing styles
1889 One of the principle features of Muse is the ability to publish a simple
1890 input text to a variety of different output styles. Muse also makes it
1891 easy to create new styles, or derive from an existing style.
1894 * Blosxom:: Integrating Muse and pyblosxom.cgi.
1895 * Book:: Publishing entries into a compilation.
1896 * ConTeXt:: Publishing ConTeXt documents.
1897 * DocBook:: Publishing in DocBook XML form.
1898 * HTML:: Publishing in HTML or XHTML form.
1899 * Ikiwiki:: Integrating with ikiwiki.
1900 * Journal:: Keeping a journal or blog.
1901 * LaTeX:: Publishing LaTeX documents.
1902 * Poem:: Publish a poem to LaTeX or PDF.
1903 * Texinfo:: Publish entries to Texinfo format or PDF.
1904 * XML:: Publish entries to XML.
1907 @node Blosxom, Book, Publishing Styles, Publishing Styles
1908 @comment node-name, next, previous, up
1909 @section Integrating Muse and pyblosxom.cgi
1910 @cindex blog, one-file-per-entry style
1912 The Blosxom publishing style publishes a tree of categorised files to a
1913 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1914 In other words, each blog entry corresponds with one file.
1917 * Blosxom Requirements:: Other tools needed for the Blosxom style.
1918 * Blosxom Entries:: Format of a Blosxom entry and automation.
1919 * Blosxom Options:: Blosxom styles and options provided.
1922 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1923 @comment node-name, next, previous, up
1924 @subsection Other tools needed for the Blosxom style
1926 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1927 installed on a machine that you have upload access to.
1929 The major difficulty in both of these programs is specifying the date of
1930 the entries. Both programs rely on the file modification time rather
1931 than any data contained in the entries themselves. A plugin is needed
1932 in order for these programs to be able to get the correct date.
1934 @subheading PyBlosxom
1936 There are two different ways of accomplishing this in pyblosxom. The
1937 first way involves gathering the timestamps (as specified by the
1938 @code{#date} directive) into one file and then sending that file along
1939 with published entries to the webserver.
1941 The second will read each file at render time and parse the
1942 @code{#postdate} directive. Muse will translate the @code{#date}
1943 directive into @code{#postdate} at publish time, so you don't have to do
1946 @subsubheading Placing timestamps in one file
1948 The following additional components are required in order to make the
1949 date of blog entries display as something sensible.
1953 A script to gather date directives from the entire blog tree into a
1954 single file. The file must associate a blog entry with a date.
1957 A plugin for (py)blosxom that reads this file.
1960 These 2 things are provided for @command{pyblosxom.cgi} in the
1961 @file{contrib/pyblosxom} subdirectory. @file{getstamps.py} provides the
1962 former service, while @file{hardcodedates.py} provides the latter
1965 Here is a sample listing from my @file{timestamps} file, which maps
1966 each file to a date. This can really be in any format, as long as your
1967 date-gathering script and your plugin can both understand it.
1970 2005-04-01-14-16 personal/paper_cranes
1971 2005-03-21 personal/spring_break_over
1972 2004-10-24 personal/finished_free_culture
1975 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1976 @file{getstamps.py}. Note that you will need to set the current
1977 directory to where your Muse files are, execute @file{getstamps.py}, and
1978 then move the generated timestamps file to your publishing directory.
1980 @subsubheading Getting timestamp from entry while rendering
1982 Alternately, the pyblosxom metadate plugin may be used. On the plus
1983 side, there is no need to run a script to gather the date. On the
1984 downside, each entry is read twice rather than once when the page is
1985 rendered. Set the value of @code{muse-blosxom-use-metadate} to non-nil
1986 to enable adding a @code{#postdate} directive to all published files.
1990 M-x customize-variable RET muse-blosxom-use-metadate RET
1993 With the metadate plugin installed in pyblosxom, the date set in this
1994 directive will be used instead of the file's modification time. The
1995 plugin is included with Muse at @file{contrib/pyblosxom/metadate.py}.
1999 It is also possible to use Blosxom, which is written in Perl, to serve
2000 blog entries that were published with Muse. The steps are as follows.
2004 Download and install blosxom from @url{http://blosxom.sourceforge.net/}.
2007 Install the metadate plugin. It is available in
2008 @file{contrib/blosxom/metadate_0_0_3}.
2011 Every time you make a new blog entry, change to the blosxom data
2012 directory and execute the @file{contrib/blosxom/getstamps.pl} script.
2013 This script has only recently been made, and may still have some bugs,
2014 so use with caution.
2018 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
2019 @comment node-name, next, previous, up
2020 @subsection Format of a Blosxom entry and automation
2022 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
2023 longer `#date yyyy-mm-dd-hh-mm', a title (using the @code{#title}
2024 directive), plus whatever normal content is desired.
2026 The date directive is not used directly by @command{pyblosxom.cgi} or
2027 this program. You need to have the two additional items from the former
2028 section to make use of this feature.
2030 There is a function called @code{muse-blosxom-new-entry} that will
2031 automate the process of making a new blog entry. To make use of it, do
2036 Customize @code{muse-blosxom-base-directory} to the location that your
2037 blog entries are stored.
2040 Assign the @code{muse-blosxom-new-entry} function to a key sequence. I
2041 use the following code to assign this function to @kbd{C-c p l'}.
2044 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
2048 You should create your directory structure ahead of time under your base
2049 directory. These directories, which correspond with category names, may
2053 When you enter this key sequence, you will be prompted for the category
2054 of your entry and its title. Upon entering this information, a new file
2055 will be created that corresponds with the title, but in lowercase
2056 letters and having special characters converted to underscores. The
2057 title and date directives will be inserted automatically.
2060 @node Blosxom Options, , Blosxom Entries, Blosxom
2061 @comment node-name, next, previous, up
2062 @subsection Blosxom styles and options provided
2064 The following styles and options are available in the Blosxom publishing
2067 @subheading Styles provided
2071 @cindex publishing styles, blosxom-html
2073 Publish Blosxom entries in HTML form.
2075 @cindex publishing styles, blosxom-xhtml
2077 Publish Blosxom entries in XHTML form.
2081 @subheading Options provided
2085 @item muse-blosxom-extension
2086 Default file extension for publishing Blosxom files.
2088 @item muse-blosxom-header
2089 Header used for publishing Blosxom files.
2091 This may be text or a filename.
2093 @item muse-blosxom-footer
2094 Footer used for publishing Blosxom files.
2096 This may be text or a filename.
2098 @item muse-blosxom-base-directory
2099 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
2101 This is the top-level directory where your blog entries may be found
2106 @node Book, ConTeXt, Blosxom, Publishing Styles
2107 @comment node-name, next, previous, up
2108 @section Publishing entries into a compilation
2110 This publishing style is used to output ``books'' in LaTeX or PDF
2113 Each page will become a separate chapter in the book, unless the style
2114 keyword @option{:nochapters} is used, in which case they are all run
2115 together as if one giant chapter.
2117 One way of publishing a book is to make a project for it, add the
2118 project to @code{muse-project-alist}, and use the @code{book-pdf} style
2119 with a very specific @option{:include} value to specify some page whose
2120 contents will be checked for the values of @code{#title} and
2121 @code{#date}, and whose name will be used in the output file. Then to
2122 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
2123 @kbd{C-c C-p} to trigger the publishing process. An example
2124 @code{muse-project-alist} for this method follows.
2127 (setq muse-project-alist
2128 '(("MyNotes" (:nochapters t ; do automatically add chapters
2129 :book-chapter "Computer Science"
2131 :book-chapter "Mathematics"
2133 :book-chapter "Emacs"
2135 :book-end t ; the rest will not be placed in the book
2136 "~/Notes" ; so we can find the notes-anthology page
2138 :force-publish ("index")
2141 :include "/notes-anthology[^/]*$"
2142 :path "~/public_html/notes")
2143 ;; other publishing styles for each directory go here,
2148 In this example, there would be a file called
2149 @file{~/Notes/notes-anthology.muse}, which would contain just the
2150 following. The resulting book would be published to
2151 @file{~/public_html/notes/notes-anthology.pdf}.
2154 #title My Technology Ramblings
2157 Another way is to call the @code{muse-book-publish-project} function
2158 manually, with a custom project entry. An example of this may be found
2159 in John Wiegley's configuration file at
2160 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
2163 @subheading Styles provided
2167 @cindex publishing styles, book-latex
2169 Publish a book in LaTeX form. The header and footer are different than
2170 the normal LaTeX publishing mode.
2172 @cindex publishing styles, book-pdf
2174 Publish a book in PDF form. The header and footer are different than
2175 the normal PDF publishing mode.
2179 @subheading Options provided
2183 @item muse-book-before-publish-hook
2184 A hook run in the book buffer before it is marked up.
2186 @item muse-book-after-publish-hook
2187 A hook run in the book buffer after it is marked up.
2189 @item muse-book-latex-header
2190 Header used for publishing books to LaTeX.
2192 This may be text or a filename.
2194 @item muse-book-latex-footer
2195 Footer used for publishing books to LaTeX.
2197 This may be text or a filename.
2200 @node ConTeXt, DocBook, Book, Publishing Styles
2201 @comment node-name, next, previous, up
2202 @section Publishing ConTeXt documents
2204 This publishing style is capable of producing ConTeXt or PDF documents.
2206 If you wish to publish PDF documents based on ConTeXt, you will need to
2207 have it installed. For Debian and Ubuntu, this can be accomplished by
2208 installing the ``texlive'' package.
2210 @subheading Styles provided
2214 @cindex publishing styles, context
2216 Publish a ConTeXt document.
2218 @cindex publishing styles, context-pdf
2220 Publish a PDF document, using an external ConTeXt document conversion
2223 @cindex publishing styles, context-slides
2224 @item context-slides
2225 Produce slides from a ConTeXt document.
2227 Here is an example of a slide.
2232 [[Some-sort-of-cute-image.png]]
2237 - Another bullet point.
2244 @cindex publishing styles, context-slides-pdf
2245 @item context-slides-pdf
2246 Publish a PDF document of ConTeXt slides.
2250 @subheading Options provided
2254 @item muse-context-extension
2255 Default file extension for publishing ConTeXt files.
2257 @item muse-context-pdf-extension
2258 Default file extension for publishing ConTeXt files to PDF.
2260 @item muse-context-pdf-program
2261 The program that is called to generate PDF content from ConTeXt content.
2263 @item muse-context-pdf-cruft
2264 Extensions of files to remove after generating PDF output successfully.
2266 @item muse-context-header
2267 Header used for publishing ConTeXt files.
2269 This may be text or a filename.
2271 @item muse-context-footer
2272 Footer used for publishing ConTeXt files.
2274 This may be text or a filename.
2276 @item muse-context-markup-regexps
2277 List of markup regexps for identifying regions in a Muse page.
2279 For more on the structure of this list,
2280 @xref{muse-publish-markup-regexps}.
2282 @item muse-context-markup-functions
2283 An alist of style types to custom functions for that kind of text.
2285 For more on the structure of this list,
2286 @xref{muse-publish-markup-functions}.
2288 @item muse-context-markup-strings
2289 Strings used for marking up text.
2291 These cover the most basic kinds of markup, the handling of which
2292 differs little between the various styles.
2294 @item muse-context-slides-header
2295 Header for publishing a presentation (slides) using ConTeXt.
2297 Any of the predefined modules, which are available in the
2298 tex/context/base directory, can be used by writing a "module" directive
2299 at the top of the Muse file; if no such directive is provided, module
2300 pre-01 is used. Alternatively, you can use your own style ("mystyle",
2301 in this example) by replacing "\usemodule[]" with "\input mystyle".
2303 This may be text or a filename.
2305 @item muse-context-slides-markup-strings
2306 Strings used for marking up text in ConTeXt slides.
2308 @item muse-context-markup-specials-document
2309 A table of characters which must be represented specially.
2310 These are applied to the entire document, sans already-escaped
2313 @item muse-context-markup-specials-example
2314 A table of characters which must be represented specially.
2315 These are applied to @verb{|example>|} regions.
2317 With the default interpretation of @verb{|<example>|} regions, no
2318 specials need to be escaped.
2320 @item muse-context-markup-specials-literal
2321 A table of characters which must be represented specially.
2322 This applies to =monospaced text= and @verb{|<code>|} regions.
2324 @item muse-context-markup-specials-url
2325 A table of characters which must be represented specially.
2326 These are applied to URLs.
2328 @item muse-context-markup-specials-image
2329 A table of characters which must be represented specially.
2330 These are applied to image filenames.
2332 @item muse-context-permit-contents-tag
2333 If nil, ignore @verb{|<contents>|} tags. Otherwise, insert table of
2336 Most of the time, it is best to have a table of contents on the
2337 first page, with a new page immediately following. To make this
2338 work with documents published in both HTML and ConTeXt, we need to
2339 ignore the @verb{|<contents>|} tag.
2341 If you don't agree with this, then set this option to non-nil,
2342 and it will do what you expect.
2346 @node DocBook, HTML, ConTeXt, Publishing Styles
2347 @comment node-name, next, previous, up
2348 @section Publishing in DocBook XML form
2350 This publishing style is used to generate DocBook XML files.
2352 @subheading Styles provided
2356 @cindex publishing styles, docbook
2358 Publish a file in Docbook form.
2362 @subheading Options provided
2364 This publishing style uses the same options for markup up special
2365 characters as the ``xml'' publishing style. @xref{XML}, for details.
2369 @item muse-docbook-extension
2370 Default file extension for publishing DocBook XML files.
2372 @item muse-docbook-header
2373 Header used for publishing DocBook XML files.
2375 This may be text or a filename.
2377 @item muse-docbook-footer
2378 Footer used for publishing DocBook XML files.
2380 This may be text or a filename.
2382 @item muse-docbook-markup-regexps
2383 List of markup rules for publishing a Muse page to DocBook XML.
2385 @item muse-docbook-markup-functions
2386 An alist of style types to custom functions for that kind of text.
2388 @item muse-docbook-markup-strings
2389 Strings used for marking up text.
2391 These cover the most basic kinds of markup, the handling of which
2392 differs little between the various styles.
2394 @item muse-docbook-encoding-default
2395 The default Emacs buffer encoding to use in published files.
2396 This will be used if no special characters are found.
2398 @item muse-docbook-charset-default
2399 The default DocBook XML charset to use if no translation is
2400 found in @code{muse-xml-encoding-map}.
2404 @node HTML, Ikiwiki, DocBook, Publishing Styles
2405 @comment node-name, next, previous, up
2406 @section Publishing in HTML or XHTML form
2408 This publishing style is capable of producing HTML or XHTML documents.
2410 @subheading Styles provided
2414 @cindex publishing styles, html
2416 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2419 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2423 @subheading Options provided
2425 If an HTML option does not have a corresponding XHTML option, it will
2426 be used for both of these publishing styles.
2428 These publishing styles use the same options for markup up special
2429 characters as the ``xml'' publishing style. @xref{XML}, for details.
2433 @item muse-html-extension
2434 Default file extension for publishing HTML files.
2436 @item muse-xhtml-extension
2437 Default file extension for publishing XHTML files.
2439 @item muse-html-style-sheet
2440 Store your stylesheet definitions here.
2442 This is used in @code{muse-html-header}. You can put raw CSS in here or
2443 a @verb{|<link>|} tag to an external stylesheet. This text may contain
2444 @verb{|<lisp>|} markup tags.
2446 If you are publishing to XHTML, then customize the
2447 @code{muse-xhtml-style-sheet} option instead.
2449 @item muse-xhtml-style-sheet
2450 Store your stylesheet definitions here.
2452 This is used in @code{muse-xhtml-header}. You can put raw CSS in here
2453 or a @verb{|<link>|} tag to an external stylesheet. This text may
2454 contain @verb{|<lisp>|} markup tags.
2456 @item muse-html-header
2457 Header used for publishing HTML files.
2459 This may be text or a filename.
2461 @item muse-html-footer
2462 Footer used for publishing HTML files.
2464 This may be text or a filename.
2466 @item muse-xhtml-header
2467 Header used for publishing XHTML files.
2469 This may be text or a filename.
2471 @item muse-xhtml-footer
2472 Footer used for publishing XHTML files.
2474 This may be text or a filename.
2476 @item muse-html-anchor-on-word
2477 When true, anchors surround the closest word.
2479 This allows you to select them in a browser (i.e. for pasting), but has
2480 the side-effect of marking up headers in multiple colors if your header
2481 style is different from your link style.
2483 @item muse-html-table-attributes
2484 The attribute to be used with HTML @verb{|<table>|} tags.
2486 If you want to make more-complicated tables in HTML, surround the HTML
2487 with the @verb{|literal|} tag, so that it does not get escaped.
2489 @item muse-html-markup-regexps
2490 List of markup rules for publishing a Muse page to HTML.
2492 @item muse-html-markup-functions
2493 An alist of style types to custom functions for that kind of text.
2495 @item muse-html-markup-strings
2496 Strings used for marking up text as HTML.
2498 These cover the most basic kinds of markup, the handling of which
2499 differs little between the various styles.
2501 @item muse-xhtml-markup-strings
2502 Strings used for marking up text as XHTML.
2504 These cover the most basic kinds of markup, the handling of which
2505 differs little between the various styles.
2507 @item muse-html-markup-tags
2508 A list of tag specifications, for specially marking up HTML.
2509 @xref{muse-publish-markup-tags}, for more information.
2511 @item muse-html-meta-http-equiv
2512 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2514 @item muse-html-meta-content-type
2515 The content type used for the HTML @verb{|<meta>|} tag.
2517 If you are striving for XHTML 1.1 compliance, you may want to change
2518 this to ``application/xhtml+xml''.
2520 @item muse-html-meta-content-encoding
2521 The charset to append to the HTML @verb{|<meta>|} tag.
2523 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2524 and determine the HTML charset from emacs's coding. If set to a string,
2525 this string will be used to force a particular charset.
2527 @item muse-html-charset-default
2528 The default HTML meta charset to use if no translation is found in
2529 @code{muse-xml-encoding-map}.
2531 @item muse-html-encoding-default
2532 The default Emacs buffer encoding to use in published files.
2533 This will be used if no special characters are found.
2537 @node Ikiwiki, Journal, HTML, Publishing Styles
2538 @comment node-name, next, previous, up
2539 @section Integrating with ikiwiki
2541 Ikiwiki is a wiki compiler (@url{http://ikiwiki.info/}). Emacs Muse can
2542 be used as a source format for Ikiwiki pages with the plugin
2543 @file{IkiWiki::Plugin::muse}.
2545 The @file{lisp/muse-ikiwiki.el} file provides publishing functions and
2546 styles for Ikiwiki. The plugin for Ikiwiki to recognize Muse files is
2547 provided by the @file{examples/ikiwiki/muse} file. Two sample init
2548 files are available in the @file{examples/ikiwiki} directory. Configure
2549 your @file{ikiwiki.setup} file so that the @code{muse_init} variable
2550 has the location of your Muse init file.
2552 If you are using CGI, The directory @file{examples/ikiwiki/IkiWiki} must
2553 be copied to the same directory as the CGI script that Ikiwiki
2554 generates. When publishing your wiki, the @var{PERL5LIB} environment
2555 variable must contain the path to the @file{examples/ikiwiki/IkiWiki}
2558 @subheading Styles provided
2562 @cindex publishing styles, ikiwiki
2564 Supports publishing XHTML output that Ikiwiki can understand.
2568 @subheading Options provided
2572 @item muse-ikiwiki-header
2573 Header used for publishing Ikiwiki output files.
2575 This may be text or a filename.
2577 @item muse-ikiwiki-footer
2578 Footer used for publishing Ikiwiki output files.
2580 This may be text or a filename.
2584 @subheading Other relevant options
2588 @item muse-colors-evaluate-lisp-tags
2589 Specify whether to evaluate the contents of @verb{|<lisp>|} tags at
2590 display time. If nil, don't evaluate them. If non-nil, evaluate
2593 The actual contents of the buffer are not changed, only the
2596 @item muse-html-src-allowed-modes
2597 Modes that we allow the @verb{|<src>|} tag to colorize. If @code{t},
2598 permit the @verb{|<src>|} tag to colorize any mode.
2600 If a list of mode names, such as @code{'("html" "latex")}, and the lang
2601 argument to @verb{|<src>|} is not in the list, then use fundamental mode
2604 @item muse-publish-enable-dangerous-tags
2605 If non-nil, publish tags like @verb{|<lisp>|} and @verb{|<command>|}
2606 that can call external programs or expose sensitive information.
2607 Otherwise, ignore tags like this.
2609 This is useful to set to @code{nil} when the file to publish is coming
2610 from an untrusted source.
2614 @node Journal, LaTeX, Ikiwiki, Publishing Styles
2615 @comment node-name, next, previous, up
2616 @section Keeping a journal or blog
2618 @cindex blog, journal style
2620 The module facilitates the keeping and publication of a journal. When
2621 publishing to HTML, it assumes the form of a web log, or blog.
2623 The input format for each entry is as follows.
2626 * 20040317: Title of entry
2631 "You know who you are. It comes down to a simple gut check: You
2632 either love what you do or you don't. Period." -- P. Bronson
2636 The "qotd", or Quote of the Day, is entirely optional. When generated
2637 to HTML, this entry is rendered as the following.
2641 <div class="entry-qotd">
2642 <h3>Quote of the Day:</h3>
2643 <p>"You know who you are. It comes down to a simple gut
2644 check: You either love what you do or you don't. Period."
2647 <div class="entry-body">
2648 <div class="entry-head">
2649 <div class="entry-date">
2650 <span class="date">March 17, 2004</span>
2652 <div class="entry-title">
2653 <h2>Title of entry</h2>
2656 <div class="entry-text">
2657 <p>Text for the entry.</p>
2663 The plurality of "div" tags makes it possible to display the entries in
2664 any form you wish, using a CSS style.
2666 Also, an .RDF file can be generated from your journal by publishing it
2667 with the "rdf" style. It uses the first two sentences of the first
2668 paragraph of each entry as its "description", and auto-generates tags
2669 for linking to the various entries.
2671 @subheading muse-project-alist considerations
2673 If you wish to publish an RDF or RSS feed, it is important to include
2674 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2675 for your Journal projects. An example follows.
2678 (setq muse-project-alist
2679 '(("Journal" ("~/Journal/"
2681 (:base "journal-rss"
2682 :base-url "http://example.org/journal/"
2683 :path "~/public_html/journal"))))
2686 @subheading Styles provided
2690 @cindex publishing styles, journal-html
2692 Publish journal entries as an HTML document.
2694 @cindex publishing styles, journal-xhtml
2696 Publish journal entries as an XHTML document.
2698 @cindex publishing styles, journal-latex
2700 Publish journal entries as a LaTeX document.
2702 @cindex publishing styles, journal-pdf
2704 Publish journal entries as a PDF document.
2706 @cindex publishing styles, journal-book-latex
2707 @item journal-book-latex
2708 Publish journal entries as a LaTeX book.
2710 @cindex publishing styles, journal-book-pdf
2711 @item journal-book-pdf
2712 Publish journal entries as a PDF book.
2714 @cindex publishing styles, journal-rdf
2715 @cindex publishing styles, RSS 1.0
2717 Publish journal entries as an RDF file (RSS 1.0).
2719 @cindex publishing styles, journal-rss
2720 @cindex publishing styles, RSS 2.0
2722 Publish journal entries as an RSS file (RSS 2.0).
2724 @cindex publishing styles, journal-rss-entry
2725 @item journal-rss-entry
2726 Used internally by @code{journal-rss} and @code{journal-rdf} for
2727 publishing individual entries.
2731 @subheading Options provided
2735 @item muse-journal-heading-regexp
2736 A regexp that matches a journal heading.
2738 Paren group 1 is the ISO date, group 2 is the optional category, and
2739 group 3 is the optional heading for the entry.
2741 @item muse-journal-date-format
2742 Date format to use for journal entries.
2744 @item muse-journal-html-heading-regexp
2745 A regexp that matches a journal heading from an HTML document.
2747 Paren group 1 is the ISO date, group 2 is the optional category, and
2748 group 3 is the optional heading for the entry.
2750 @item muse-journal-html-entry-template
2751 Template used to publish individual journal entries as HTML.
2753 This may be text or a filename.
2755 @item muse-journal-latex-section
2756 Template used to publish a LaTeX section.
2758 @item muse-journal-latex-subsection
2759 Template used to publish a LaTeX subsection.
2761 @item muse-journal-markup-tags
2762 A list of tag specifications, for specially marking up Journal entries.
2764 @xref{muse-publish-markup-tags}, for more information.
2766 This is used by @code{journal-latex} and its related styles, as well as
2767 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2768 @code{journal-rss} use.
2770 @item muse-journal-rdf-extension
2771 Default file extension for publishing RDF (RSS 1.0) files.
2773 @item muse-journal-rdf-base-url
2774 The base URL of the website referenced by the RDF file.
2776 @item muse-journal-rdf-header
2777 Header used for publishing RDF (RSS 1.0) files.
2779 This may be text or a filename.
2781 @item muse-journal-rdf-footer
2782 Footer used for publishing RDF (RSS 1.0) files.
2784 This may be text or a filename.
2786 @item muse-journal-rdf-date-format
2787 Date format to use for RDF entries.
2789 @item muse-journal-rdf-entry-template
2790 Template used to publish individual journal entries as RDF.
2792 This may be text or a filename.
2794 @item muse-journal-rdf-summarize-entries
2795 If non-nil, include only summaries in the RDF file, not the full data.
2797 The default is nil, because this annoys some subscribers.
2799 @item muse-journal-rss-heading-regexp
2800 A regexp that matches a journal heading from an HTML document.
2802 Paren group 1 is the ISO date, group 2 is the optional category,
2803 and group 3 is the optional heading for the entry.
2805 @item muse-journal-rss-extension
2806 Default file extension for publishing RSS 2.0 files.
2808 @item muse-journal-rss-base-url
2809 The base URL of the website referenced by the RSS file.
2811 @item muse-journal-rss-header
2812 Header used for publishing RSS 2.0 files.
2814 This may be text or a filename.
2816 @item muse-journal-rss-footer
2817 Footer used for publishing RSS 2.0 files.
2819 This may be text or a filename.
2821 @item muse-journal-rss-date-format
2822 Date format to use for RSS 2.0 entries.
2824 @item muse-journal-rss-entry-template
2825 Template used to publish individual journal entries as RSS 2.0.
2827 This may be text or a filename.
2829 @item muse-journal-rss-enclosure-types-alist
2830 File types that are accepted as RSS enclosures.
2832 This is an alist that maps file extension to content type.
2834 Useful for podcasting.
2836 @item muse-journal-rss-summarize-entries
2837 If non-nil, include only summaries in the RSS file, not the full data.
2839 The default is nil, because this annoys some subscribers.
2841 @item muse-journal-rss-markup-regexps
2842 List of markup rules for publishing a Muse journal page to RSS.
2844 For more information on the structure of this list,
2845 @xref{muse-publish-markup-regexps}.
2847 @item muse-journal-rss-markup-functions
2848 An alist of style types to custom functions for that kind of text.
2850 For more on the structure of this list,
2851 @xref{muse-publish-markup-functions}.
2855 @node LaTeX, Poem, Journal, Publishing Styles
2856 @comment node-name, next, previous, up
2857 @section Publishing LaTeX documents
2859 This publishing style is capable of producing LaTeX or PDF documents.
2861 If you wish to publish PDF documents, you will need to have a good LaTeX
2862 installation. For Debian and Ubuntu, this can be accomplished by
2863 installing the ``tetex-bin'' and ``tetex-extra'' packages. TeX fonts
2866 If your LaTeX installation has the file @file{grffile.sty}, which may be
2867 found in the @file{texlive-latex-recommended} package for Debian and
2868 Ubuntu, then consider using it by adding the following to your header
2869 file. This allows spaces in filenames to work.
2872 \usepackage@{grffile@}
2875 @subheading Styles provided
2879 @cindex publishing styles, latex
2881 Publish a LaTeX document.
2883 @cindex publishing styles, pdf
2885 Publish a PDF document, using an external LaTeX document conversion
2888 @cindex publishing styles, latexcjk
2890 Publish a LaTeX document with CJK (Chinese) encodings.
2892 @cindex publishing styles, pdfcjk
2894 Publish a PDF document with CJK (Chinese) encodings, using an external
2895 LaTeX document conversion tool.
2897 @cindex publishing styles, slides
2899 Publish a LaTeX document that uses the Beamer extension. This is
2900 suitable for producing slides.
2902 Here is an example of a slide.
2905 <slide title="First Slide">
2906 Everything between the slide tags composes this slide.
2908 [[Some-sort-of-cute-image.png]]
2911 - Another bullet point.
2915 @cindex publishing styles, slides-pdf
2917 Publish a PDF document of slides, using the Beamer extension.
2919 @cindex publishing styles, lecture-notes
2921 Publish a LaTeX document that uses the Beamer extension. This is
2922 suitable for producing lecture notes.
2924 This can also use the @verb{|<slide>|} tag.
2926 @cindex publishing styles, lecture-notes-pdf
2927 @item lecture-notes-pdf
2928 Publish a PDF document of lecture notes, using the Beamer extension.
2932 @subheading Options provided
2936 @item muse-latex-extension
2937 Default file extension for publishing LaTeX files.
2939 @item muse-latex-pdf-extension
2940 Default file extension for publishing LaTeX files to PDF.
2942 @item muse-latex-pdf-browser
2943 The program to use when browsing a published PDF file.
2945 This should be a format string.
2947 @item muse-latex-pdf-program
2948 The program that is called to generate PDF content from LaTeX content.
2950 @item muse-latex-pdf-cruft
2951 Extensions of files to remove after generating PDF output successfully.
2953 @item muse-latex-header
2954 Header used for publishing LaTeX files.
2956 This may be text or a filename.
2958 @item muse-latex-footer
2959 Footer used for publishing LaTeX files.
2961 This may be text or a filename.
2963 @item muse-latexcjk-header
2964 Header used for publishing LaTeX files (CJK).
2966 This may be text or a filename.
2968 @item muse-latexcjk-footer
2969 Footer used for publishing LaTeX files (CJK).
2971 This may be text or a filename.
2973 @item muse-latex-slides-header
2974 Header for publishing of slides using LaTeX.
2976 This may be text or a filename.
2978 You must have the Beamer extension for LaTeX installed for this to work.
2980 @item muse-latex-lecture-notes-header
2981 Header publishing of lecture notes using LaTeX.
2983 This may be text or a filename.
2985 You must have the Beamer extension for LaTeX installed for this to work.
2987 @item muse-latex-markup-regexps
2988 List of markup regexps for identifying regions in a Muse page.
2990 For more on the structure of this list,
2991 @xref{muse-publish-markup-regexps}.
2993 @item muse-latex-markup-functions
2994 An alist of style types to custom functions for that kind of text.
2996 For more on the structure of this list,
2997 @xref{muse-publish-markup-functions}.
2999 @item muse-latex-markup-strings
3000 Strings used for marking up text.
3002 These cover the most basic kinds of markup, the handling of which
3003 differs little between the various styles.
3005 @item muse-latex-slides-markup-tags
3006 A list of tag specifications, for specially marking up LaTeX slides.
3008 @item muse-latexcjk-encoding-map
3009 An alist mapping emacs coding systems to appropriate CJK codings.
3010 Use the base name of the coding system (ie, without the -unix).
3012 @item muse-latexcjk-encoding-default
3013 The default Emacs buffer encoding to use in published files.
3015 This will be used if no special characters are found.
3017 @item muse-latex-markup-specials-document
3018 A table of characters which must be represented specially.
3019 These are applied to the entire document, sans already-escaped
3022 @item muse-latex-markup-specials-example
3023 A table of characters which must be represented specially.
3024 These are applied to @verb{|example>|} regions.
3026 With the default interpretation of @verb{|<example>|} regions, no
3027 specials need to be escaped.
3029 @item muse-latex-markup-specials-literal
3030 A table of characters which must be represented specially.
3031 This applies to =monospaced text= and @verb{|<code>|} regions.
3033 @item muse-latex-markup-specials-url
3034 A table of characters which must be represented specially.
3035 These are applied to URLs.
3037 @item muse-latex-markup-specials-image
3038 A table of characters which must be represented specially.
3039 These are applied to image filenames.
3041 @item muse-latex-permit-contents-tag
3042 If nil, ignore @verb{|<contents>|} tags. Otherwise, insert table of
3045 Most of the time, it is best to have a table of contents on the
3046 first page, with a new page immediately following. To make this
3047 work with documents published in both HTML and LaTeX, we need to
3048 ignore the @verb{|<contents>|} tag.
3050 If you don't agree with this, then set this option to non-nil,
3051 and it will do what you expect.
3055 @node Poem, Texinfo, LaTeX, Publishing Styles
3056 @comment node-name, next, previous, up
3057 @section Publish a poem to LaTeX or PDF
3059 The @code{muse-poem} module makes it easy to attractively publish and
3060 reference poems in the following format, using the "memoir" module for
3061 LaTeX publishing. It will also markup poems for every other output
3062 style, though none are nearly as pretty.
3071 Annotations, history, notes, etc.
3074 Once a poem is written in this format, just publish it to PDF using the
3075 @code{poem-pdf} style. To make an inlined reference to a poem that
3076 you've written -- for example, from a blog page -- there is a "poem" tag
3077 defined by this module.
3080 <poem title="name.of.poem.page">
3083 Let's assume the template above was called @file{name.of.poem.page};
3084 then the above tag would result in this inclusion.
3092 John Wiegley uses this module for publishing all of the poems on his
3093 website, which are at
3094 @uref{http://www.newartisans.com/johnw/poems.html}.
3096 @subheading Styles provided
3100 @cindex publishing styles, poem-latex
3102 Publish a poem in LaTeX form.
3104 @cindex publishing styles, poem-pdf
3106 Publish a poem to a PDF document.
3108 @cindex publishing styles, chapbook-latex
3109 @item chapbook-latex
3110 Publish a book of poems in LaTeX form.
3112 @cindex publishing styles, chapbook-pdf
3114 Publish a book of poems to a PDF document.
3118 @subheading Options provided
3122 @item muse-poem-latex-header
3123 Header used for publishing LaTeX poems.
3125 This may be text or a filename.
3127 @item muse-poem-latex-footer
3128 Footer used for publishing LaTeX files.
3130 This may be text or a filename.
3132 @item muse-poem-markup-strings
3133 Strings used for marking up poems.
3135 These cover the most basic kinds of markup, the handling of which
3136 differs little between the various styles.
3138 @item muse-chapbook-latex-header
3139 Header used for publishing a book of poems in LaTeX form.
3141 This may be text or a filename.
3143 @item muse-chapbook-latex-footer
3144 Footer used for publishing a book of poems in LaTeX form.
3146 This may be text or a filename.
3148 @item muse-poem-chapbook-strings
3149 Strings used for marking up books of poems.
3151 These cover the most basic kinds of markup, the handling of which
3152 differs little between the various styles.
3156 @node Texinfo, XML, Poem, Publishing Styles
3157 @comment node-name, next, previous, up
3158 @section Publish entries to Texinfo format or PDF
3160 Rules for publishing a Muse file as a Texinfo article.
3162 @subheading Styles provided
3166 @cindex publishing styles, texi
3168 Publish a file in Texinfo form.
3170 @cindex publishing styles, texi
3172 Generate an Info file from a Muse file.
3174 @cindex publishing styles, info-pdf
3176 Publish a file in PDF form.
3180 @subheading Options provided
3184 @item muse-texinfo-process-natively
3185 If non-nil, use the Emacs `texinfmt' module to make Info files.
3187 @item muse-texinfo-extension
3188 Default file extension for publishing Texinfo files.
3190 @item muse-texinfo-info-extension
3191 Default file extension for publishing Info files.
3193 @item muse-texinfo-pdf-extension
3194 Default file extension for publishing PDF files.
3196 @item muse-texinfo-header
3197 Text to prepend to a Muse page being published as Texinfo.
3199 This may be text or a filename.
3200 It may contain @verb{|<lisp>|} markup tags.
3202 @item muse-texinfo-footer
3203 Text to append to a Muse page being published as Texinfo.
3205 This may be text or a filename.
3206 It may contain @verb{|<lisp>|} markup tags.
3208 @item muse-texinfo-markup-regexps
3209 List of markup rules for publishing a Muse page to Texinfo.
3211 For more on the structure of this list,
3212 @xref{muse-publish-markup-regexps}.
3214 @item muse-texinfo-markup-functions
3215 An alist of style types to custom functions for that kind of text.
3217 For more on the structure of this list,
3218 @xref{muse-publish-markup-functions}.
3220 @item muse-texinfo-markup-strings
3221 Strings used for marking up text.
3223 These cover the most basic kinds of markup, the handling of which
3224 differs little between the various styles.
3226 @item muse-texinfo-markup-specials
3227 A table of characters which must be represented specially.
3229 @item muse-texinfo-markup-specials
3230 A table of characters which must be represented specially.
3231 These are applied to URLs.
3235 @node XML, , Texinfo, Publishing Styles
3236 @comment node-name, next, previous, up
3237 @section Publish entries to XML
3239 Muse is capable of publishing XML documents, with the help of the
3240 @file{muse-xml.el} module.
3242 A RelaxNG schema is available as part of the Muse distribution in the
3243 @file{etc/muse.rnc} file.
3245 @subheading Styles provided
3249 @cindex publishing styles, xml
3251 Publish a file in XML form.
3255 @subheading Options provided
3259 @cindex muse-xml-encoding-map
3260 @item muse-xml-encoding-map
3261 An alist mapping Emacs coding systems to appropriate XML charsets.
3262 Use the base name of the coding system (i.e. without the -unix).
3264 @item muse-xml-markup-specials
3265 A table of characters which must be represented specially in all
3266 XML-like markup formats.
3268 @item muse-xml-markup-specials-url-extra
3269 A table of characters which must be represented specially in all
3270 XML-like markup formats.
3272 These are extra characters that are escaped within URLs.
3274 @item muse-xml-extension
3275 Default file extension used for publishing XML files.
3277 @item muse-xml-header
3278 Header used for publishing XML files.
3280 This may be text or a filename.
3282 @item muse-xml-footer
3283 Footer used for publishing XML files.
3285 This may be text or a filename.
3287 @item muse-xml-markup-regexps
3288 List of markup rules for publishing a Muse page to XML.
3290 For more on the structure of this list,
3291 @xref{muse-publish-markup-regexps}.
3293 @item muse-xml-markup-functions
3294 An alist of style types to custom functions for that kind of text.
3296 For more on the structure of this list,
3297 @xref{muse-publish-markup-functions}.
3299 @item muse-xml-markup-strings
3300 Strings used for marking up text.
3302 These cover the most basic kinds of markup, the handling of which
3303 differs little between the various styles.
3305 @item muse-xml-encoding-default
3306 The default Emacs buffer encoding to use in published files.
3308 This will be used if no special characters are found.
3310 @item muse-xml-charset-default
3311 The default XML charset to use if no translation is found in
3312 @code{muse-xml-encoding-map}.
3317 @node Extending Muse, Miscellaneous, Publishing Styles, Top
3318 @comment node-name, next, previous, up
3319 @chapter Making your own publishing styles
3322 * Markup Functions:: Specifying functions to mark up text.
3323 * Markup Regexps:: Markup rules for publishing.
3324 * Markup Strings:: Strings specific to a publishing style.
3325 * Markup Tags:: Tag specifications for special markup.
3326 * Style Elements:: Parameters used for defining styles.
3327 * Deriving Styles:: Deriving a new style from an existing
3331 @node Markup Functions, Markup Regexps, , Extending Muse
3332 @comment node-name, next, previous, up
3333 @section Specifying functions to mark up text
3334 @cindex publishing, markup functions
3336 @anchor{muse-publish-markup-functions}
3337 @code{muse-publish-markup-functions}
3339 An alist of style types to custom functions for that kind of text.
3341 This is used by publishing styles to attempt to minimize the amount of
3342 custom regexps that each has to define. @file{muse-publish} provides
3343 rules for the most common types of markup.
3345 Each member of the list is of the following form.
3353 Describes the type of text to associate with this rule.
3354 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3357 Function to use to mark up this kind of rule if no suitable function is
3358 found through the @option{:functions} tag of the current style.
3361 @node Markup Regexps, Markup Strings, Markup Functions, Extending Muse
3362 @comment node-name, next, previous, up
3363 @section Markup rules for publishing
3364 @cindex publishing, markup regexps
3365 @cindex publishing, rules
3367 @anchor{muse-publish-markup-regexps}
3368 @code{muse-publish-markup-regexps}
3370 List of markup rules for publishing a page with Muse.
3372 The rules given in this variable are invoked first, followed by whatever
3373 rules are specified by the current style.
3375 Each member of the list is either a function, or a list of the following
3379 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3384 A regular expression, or symbol whose value is a regular expression,
3385 which is searched for using `re-search-forward'.
3387 @item TEXT-BEGIN-GROUP
3388 The matching group within that regexp which denotes the beginning of the
3389 actual text to be marked up.
3391 @item REPLACEMENT-TEXT
3392 A string that will be passed to `replace-match'.
3394 If it is not a string, but a function, it will be called to determine
3395 what the replacement text should be (it must return a string). If it is
3396 a symbol, the value of that symbol should be a string.
3399 The replacements are done in order, one rule at a time. Writing
3400 the regular expressions can be a tricky business. Note that case
3401 is never ignored. `case-fold-search' is always bound to nil
3402 while processing the markup rules.
3404 @subheading Publishing order
3406 This is the order that the publishing rules are consulted, by default.
3407 This may be changed by customizing @code{muse-publish-markup-regexps}.
3411 @item trailing and leading whitespace
3412 Remove trailing and leading whitespace from a file.
3417 This is only recognized at the beginning of a file.
3420 @samp{; a commented line}
3428 @item explicit links
3429 Prevent emphasis characters in explicit links from being marked up.
3431 Don't actually publish them here, just add a special no-emphasis text
3435 Whitespace-delimited word, possibly with emphasis characters
3437 This function is responsible for marking up emphasis and escaping some
3443 Outline-mode style headings.
3448 These are ellipses with a dot at end.
3458 Horizontal rule or section separator.
3460 @item no-break-space
3463 Prevent lines from being split before or after these characters.
3468 Break a line at point.
3473 Beginning of footnotes section.
3478 Footnote definition or reference. If at beginning of line, it is a
3493 Numbered list, item list, or term definition list.
3497 @file{table.el} style tables
3500 @samp{table | cells}
3502 Muse tables or orgtbl-mode style tables.
3505 spaces before beginning of text
3521 @samp{[[explicit][links]]}
3524 @samp{http://example.com/}
3527 @samp{bare-email@@example.com}
3531 @node Markup Strings, Markup Tags, Markup Regexps, Extending Muse
3532 @comment node-name, next, previous, up
3533 @section Strings specific to a publishing style
3534 @cindex publishing, markup strings
3536 @dfn{Markup strings} are strings used for marking up text for a
3539 These cover the most basic kinds of markup, the handling of which
3540 differs little between the various styles.
3542 @subheading Available markup strings
3546 @item image-with-desc
3547 An image and a description.
3549 Argument 1: image without extension. Argument 2: image extension.
3550 Argument 3: description.
3555 Argument 1: image without extension. Argument 2: image extension.
3558 An image with a link around it.
3560 Argument 1: link. Argument 2: image without extension.
3561 Argument 3: image extension.
3564 A reference to an anchor on the current page.
3566 Argument 1: anchor name. Argument 2: description if one exists, or the
3567 original link otherwise.
3570 A URL without a description.
3575 A link to a Muse page with a description.
3577 Argument 1: link. Argument 2: description if one exists, or the
3578 original link otherwise.
3580 @item link-and-anchor
3581 A link to a Muse page with an anchor, and a description.
3583 Argument 1: link. Argument 2: anchor name.
3584 Argument 3: description if one exists, or the original link otherwise.
3585 Argument 4: link without an extension.
3588 A link to an email address.
3590 Argument 1: email address. Argument 2: email address.
3595 Argument 1: name of anchor.
3600 Argument 1: Initial whitespace. Argument 2: Terminating whitespace.
3603 Beginning of a comment.
3609 A horizontal line or space.
3611 @item no-break-space
3612 A space that separates two words which are not to be separated.
3615 Beginning of footnote.
3621 Mark a reference for the current footnote.
3623 Argument 1: number of this footnote.
3625 @item footnotemark-end
3626 End of a reference for the current footnote.
3629 Indicate the text of the current footnote.
3631 Argument 1: number of this footnote.
3633 @item footnotetext-end
3634 End of a footnote text line.
3637 Text used to replace ``Footnotes:'' line.
3646 Beginning of a part indicator line. This is used by book publishing.
3649 End of a part indicator line. This is used by book publishing.
3652 Beginning of a chapter indicator line. This is used by book publishing.
3655 End of a chapter indicator line. This is used by book publishing.
3658 Beginning of level 1 section indicator line.
3660 Argument 1: level of section; always 1.
3663 End of level 1 section indicator line.
3665 Argument 1: level of section; always 1.
3668 Beginning of level 2 section indicator line.
3670 Argument 1: level of section; always 2.
3672 @item subsection-end
3673 End of level 2 section indicator line.
3675 Argument 1: level of section; always 2.
3678 Beginning of level 3 section indicator line.
3680 Argument 1: level of section; always 3.
3682 @item subsubsection-end
3683 End of level 3 section indicator line.
3685 Argument 1: level of section; always 3.
3688 Beginning of section indicator line, where level is greater than 3.
3690 Argument 1: level of section.
3692 @item section-other-end
3693 End of section indicator line, where level is greater than 3.
3695 Argument 1: level of section.
3697 @item begin-underline
3698 Beginning of underlined text.
3701 End of underlined text.
3704 Beginning of verbatim text. This includes @verb{|<code>|} tags and
3708 End of verbatim text. This includes @verb{|<code>|} tags and =teletype
3712 Beginning of the first level of emphasized text.
3715 End of the first level of emphasized text.
3717 @item begin-more-emph
3718 Beginning of the second level of emphasized text.
3721 End of the second level of emphasized text.
3723 @item begin-most-emph
3724 Beginning of the third (and final) level of emphasized text.
3727 End of the third (and final) level of emphasized text.
3730 Beginning of verse text.
3733 String used to each space that is further indented than the beginning of
3736 @item begin-verse-line
3737 Beginning of a line of verse.
3739 @item empty-verse-line
3740 End of a line of verse.
3742 @item begin-last-stanza-line
3743 Beginning of the last line of a verse stanza.
3745 @item end-last-stanza-line
3746 End of the last line of a verse stanza.
3752 Beginning of an example region. To make use of this, an
3753 @samp{<example>} tag is needed.
3756 End of an example region. To make use of this, an @samp{</example>} tag
3760 Begin a centered line.
3763 End a centered line.
3766 Begin a quoted region.
3769 End a quoted region.
3771 @item begin-quote-item
3772 Begin a quote paragraph.
3774 @item end-quote-item
3775 End a quote paragraph.
3778 Begin an unordered list.
3781 End an unordered list.
3783 @item begin-uli-item
3784 Begin an unordered list item.
3787 End an unordered list item.
3790 Begin an ordered list.
3793 End an ordered list.
3795 @item begin-oli-item
3796 Begin an ordered list item.
3799 End an ordered list item.
3802 Begin a definition list.
3805 End a definition list.
3808 Begin a definition list item.
3811 End a definition list item.
3814 Begin a definition list term.
3817 End a definition list term.
3820 Begin a definition list entry.
3823 End a definition list entry.
3831 @item begin-table-group
3832 Begin a table grouping.
3834 @item end-table-group
3835 End a table grouping.
3837 @item begin-table-row
3843 @item begin-table-entry
3844 Begin a table entry.
3846 @item end-table-entry
3851 @node Markup Tags, Style Elements, Markup Strings, Extending Muse
3852 @comment node-name, next, previous, up
3853 @section Tag specifications for special markup
3854 @cindex publishing, markup tags
3856 @anchor{muse-publish-markup-tags}
3857 @code{muse-publish-markup-tags}
3859 A list of tag specifications, for specially marking up text.
3861 XML-style tags are the best way to add custom markup to Muse. This is
3862 easily accomplished by customizing this list of markup tags.
3864 For each entry, the name of the tag is given, whether it expects a
3865 closing tag and/or an optional set of attributes, whether it is
3866 nestable, and a function that performs whatever action is desired within
3867 the delimited region.
3869 The tags themselves are deleted during publishing, before the function
3870 is called. The function is called with three arguments, the beginning
3871 and end of the region surrounded by the tags. If properties are
3872 allowed, they are passed as a third argument in the form of an alist.
3873 The `end' argument to the function is always a marker.
3875 Point is always at the beginning of the region within the tags, when the
3876 function is called. Wherever point is when the function finishes is
3877 where tag markup will resume.
3879 These tag rules are processed once at the beginning of markup, and once
3880 at the end, to catch any tags which may have been inserted in-between.
3882 @node Style Elements, Deriving Styles, Markup Tags, Extending Muse
3883 @comment node-name, next, previous, up
3884 @section Parameters used for defining styles
3885 @cindex publishing, style elements
3887 Style elements are tags that define a style. Use either
3888 @code{muse-define-style} or @code{muse-derive-style}
3889 (@pxref{Deriving Styles}) to create a new style.
3891 @defun muse-define-style name &rest elements
3894 @subheading Usable elements
3899 File extension to use for publishing files with this style.
3902 File extension to use for publishing links to Muse files with this
3906 File extension to use for publishing second-stage files with this style.
3908 For example, PDF publishing generates a LaTeX file first, then a PDF
3909 from that LaTeX file.
3912 List of markup rules for publishing a page with Muse.
3913 @xref{muse-publish-markup-regexps}.
3916 An alist of style types to custom functions for that kind of text.
3917 @xref{muse-publish-markup-functions}.
3920 Strings used for marking up text with this style.
3922 These cover the most basic kinds of markup, the handling of which
3923 differs little between the various styles.
3926 A list of tag specifications, used for handling extra tags.
3927 @xref{muse-publish-markup-tags}.
3930 A table of characters which must be represented specially.
3933 A function that is to be executed on the newly-created publishing buffer
3934 (or the current region) before any publishing occurs.
3936 This is used to set extra parameters that direct the publishing process.
3939 A function that is to be executed on the publishing buffer (or the
3940 current region) immediately after applying all of the markup regexps.
3942 This is used to fix the order of table elements (header, footer, body)
3946 A function that is to be executed on the publishing buffer after
3947 :before-end, and immediately after inserting the header and footer.
3949 This is used for generating the table of contents as well as setting the
3953 A function that is to be executed after saving the published file, but
3954 while still in its buffer.
3956 This is used for generating second-stage documents like PDF files from
3957 just-published LaTeX files.
3959 The function must accept three arguments: the name of the muse source
3960 file, the name of the just-published file, and the name of the
3961 second-stage target file. The name of the second-stage target file is
3962 the same as that of the just-published file if no second-stage
3963 publishing is required.
3966 Header used for publishing files of this style.
3968 This may be a variable, text, or a filename. It is inserted at the
3969 beginning of a file, after evaluating the publishing markup.
3972 Footer used for publishing files of this style.
3974 This may be a variable, text, or a filename. It is inserted at the end
3975 of a file, after evaluating the publishing markup.
3978 Style sheet used for publishing files of this style.
3980 This may be a variable or text. It is used in the header of HTML and
3981 XHTML based publishing styles.
3984 The function used to browse the published result of files of this style.
3988 @node Deriving Styles, , Style Elements, Extending Muse
3989 @comment node-name, next, previous, up
3990 @section Deriving a new style from an existing one
3991 @cindex publishing styles, deriving
3993 To create a new style from an existing one, use @code{muse-derive-style}
3994 as follows. This is a good way to fix something you don't like about a
3995 particular publishing style, or to personalize it.
3997 @defun muse-derive-style new-name base-name &rest elements
4000 The derived name is a string defining the new style, such as "my-html".
4001 The base name must identify an existing style, such as "html" -- if you
4002 have loaded @file{muse-html}. The style parameters are the same as
4003 those used to create a style, except that they override whatever
4004 definitions exist in the base style. However, some definitions only
4005 partially override. The following parameters support partial
4008 @xref{Style Elements}, for a complete list of all parameters.
4013 If a markup function is not found in the derived style's function list,
4014 the base style's function list will be queried.
4017 All regexps in the current style and the base style(s) will be used.
4020 If a markup string is not found in the derived style's string list, the
4021 base style's string list will be queried.
4025 @node Miscellaneous, Getting Help and Reporting Bugs, Extending Muse, Top
4026 @comment node-name, next, previous, up
4027 @chapter Miscellaneous add-ons, like a minor mode
4030 * Muse List Edit Minor Mode:: Edit lists easily in other major modes.
4033 @node Muse List Edit Minor Mode, , , Miscellaneous
4034 @comment node-name, next, previous, up
4035 @section Edit lists easily in other major modes
4036 @cindex muse-list-edit-minor-mode
4038 @code{muse-list-edit-minor-mode} is meant to be used with other major
4039 modes, such as Message (for composing email) and debian-changelog-mode
4040 (for editing debian/changelog files).
4042 It implements practically perfect support for editing and filling lists.
4043 It can even handle nested lists. In addition to Muse-specific list
4044 items ("-", numbers, definition lists, footnotes), it can also handle
4045 items that begin with "*" or "+". Filling list items behaves in the
4046 same way that it does in Muse, regardless of whether filladapt is also
4047 enabled, which is the primary reason to use this tool.
4049 @subheading Installation
4051 To use it, add ``(require 'muse-mode)'' to your Emacs customization file
4052 and add the function @code{turn-on-muse-list-edit-minor-mode} to any
4053 mode hooks where you wish to enable this minor mode.
4055 @subheading Keybindings
4057 @code{muse-list-edit-minor-mode} uses the following keybindings.
4061 @item M-RET (`muse-l-e-m-m-insert-list-item')
4062 Insert a new list item at point, using the indentation level of the
4065 @item C-< (`muse-l-e-m-m-decrease-list-item-indent')
4066 Decrease indentation of the current list item.
4068 @item C-> (`muse-l-e-m-m-increase-list-item-indent')
4069 Increase indentation of the current list item.
4073 @subheading Functions
4075 @defun muse-list-edit-minor-mode
4076 This is a global minor mode for editing files with lists.
4077 It is meant to be used with other major modes, and not with Muse mode.
4079 Interactively, with no prefix argument, toggle the mode.
4080 With universal prefix @var{arg} turn mode on.
4081 With zero or negative @var{arg} turn mode off.
4083 This minor mode provides the Muse keybindings for editing lists,
4084 and support for filling lists properly.
4086 It recognizes not only Muse-style lists, which use the "-"
4087 character or numbers, but also lists that use asterisks or plus
4088 signs. This should make the minor mode generally useful.
4090 Definition lists and footnotes are also recognized.
4092 Note that list items may omit leading spaces, for compatibility
4093 with modes that set @code{left-margin}, such as
4094 @code{debian-changelog-mode}.
4097 @defun turn-on-muse-list-edit-minor-mode
4098 Unconditionally turn on Muse list edit minor mode.
4101 @defun turn-off-muse-list-edit-minor-mode
4102 Unconditionally turn off Muse list edit minor mode.
4105 @node Getting Help and Reporting Bugs, History, Miscellaneous, Top
4106 @comment node-name, next, previous, up
4107 @chapter Getting Help and Reporting Bugs
4108 @cindex help, getting
4109 @cindex bugs, reporting
4111 After you have read this guide, if you still have questions about
4112 Muse, or if you have bugs to report, there are several places you can
4118 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
4119 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
4123 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
4124 that Michael Olson (the current maintainer) made for Muse.
4127 Muse has several different mailing lists.
4131 @item muse-el-announce
4132 Low-traffic list for Muse-related announcements.
4134 You can join this mailing list (@email{muse-el-announce@@gna.org})
4135 using the subscription form at
4136 @url{http://mail.gna.org/listinfo/muse-el-announce/}. This
4137 mailing list is also available via Gmane (@url{http://gmane.org/}). The
4138 group is called @samp{gmane.emacs.muse.announce}.
4140 @item muse-el-discuss
4141 Discussion, bugfixes, suggestions, tips, and the like for Muse.
4142 This mailing list also includes the content of muse-el-announce.
4144 You can join this mailing list (@email{muse-el-discuss@@gna.org})
4145 using the subscription form at
4146 @url{http://mail.gna.org/listinfo/muse-el-discuss/}. This mailing
4147 list is also available via Gmane with the identifier
4148 @samp{gmane.emacs.muse.general}.
4151 Log messages for commits made to Muse.
4153 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
4154 the subscription form at
4155 @url{http://mail.gna.org/listinfo/muse-el-logs/}. This mailing list
4156 is also available via Gmane with the identifier
4157 @samp{gmane.emacs.muse.scm}.
4159 @item muse-el-commits
4160 Generated bug reports for Emacs Muse. If you use our bug-tracker at
4161 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
4162 sent to this list automatically.
4164 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
4165 the subscription form at
4166 @url{http://mail.gna.org/listinfo/muse-el-commits/}. This mailing list
4167 is also available via Gmane with the identifier
4168 @samp{gmane.emacs.muse.cvs}.
4170 @item muse-el-internationalization
4171 Discussion of translation of the Muse website and documentation into
4174 You can join this mailing list
4175 (@email{muse-el-internationalization@@gna.org}) using the subscription
4176 form at @url{http://mail.gna.org/listinfo/internationalization/}. This
4177 mailing list is also available via Gmane with the identifier
4178 @samp{gmane.emacs.muse.internationalization}.
4183 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
4184 contributors are frequently around and willing to answer your
4185 questions. The @samp{#muse} channel is also available for
4186 Muse-specific help, and its current maintainer hangs out there.
4189 The maintainer of Emacs Muse, Michael Olson, may be contacted at
4190 @email{mwolson@@gnu.org}. He can be rather slow at answering email, so
4191 it is often better to use the muse-el-discuss mailing list.
4195 @node History, Contributors, Getting Help and Reporting Bugs, Top
4196 @comment node-name, next, previous, up
4197 @chapter History of This Document
4198 @cindex history, of Muse
4202 John Wiegley started Muse upon realizing that EmacsWiki had some serious
4203 limitations. Around February 2004, he started making "emacs-wiki version
4204 3.00 APLHA", which eventually became known as Muse.
4206 Most of those who frequent the emacs-wiki mailing list continued to use
4207 emacs-wiki, mainly because Planner hasn't been ported over to it.
4209 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
4210 John Wiegley's request.
4213 Michael Olson overhauled this document and added many new sections in
4214 preparation for the first release of Muse (3.01).
4218 @node Contributors, GNU Free Documentation License, History, Top
4219 @comment node-name, next, previous, up
4220 @chapter Contributors to This Documentation
4221 @cindex contributors
4223 The first draft of this document was taken from the emacs-wiki texinfo
4224 manual. Michael Olson adapted it for Muse and added most of its
4227 John Sullivan did a majority of the work on the emacs-wiki texinfo
4230 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
4231 emacs-wiki texinfo manual.
4234 @node GNU Free Documentation License, Concept Index, Contributors, Top
4235 @appendix GNU Free Documentation License
4236 @include doclicense.texi
4239 @node Concept Index, , GNU Free Documentation License, Top
4240 @comment node-name, next, previous, up