1 \input texinfo @c -*-texinfo-*-
9 * Muse: (muse). Authoring and publishing environment for Emacs.
15 This manual is for Emacs Muse version 3.11.
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 * Journal:: Keeping a journal or blog.
138 * LaTeX:: Publishing LaTeX documents.
139 * Poem:: Publish a poem to LaTeX or PDF.
140 * Texinfo:: Publish entries to Texinfo format or PDF.
141 * XML:: Publish entries to XML.
143 Integrating Muse and pyblosxom.cgi
145 * Blosxom Requirements:: Other tools needed for the Blosxom style.
146 * Blosxom Entries:: Format of a Blosxom entry and automation.
147 * Blosxom Options:: Blosxom styles and options provided.
149 Making your own publishing styles
151 * Common Elements:: Common functionality shared by styles.
152 * Deriving Styles:: Deriving a new style from an existing
155 Common functionality shared by styles
157 * Markup Functions:: Specifying functions to mark up text.
158 * Markup Regexps:: Markup rules for publishing.
159 * Markup Strings:: Strings specific to a publishing style.
160 * Markup Tags:: Tag specifications for special markup.
161 * Style Elements:: Parameters used for defining styles.
163 Miscellaneous add-ons, like a minor mode
165 * Muse List Edit Minor Mode:: Edit lists easily in other major modes.
170 @node Preface, Introduction, Top, Top
171 @comment node-name, next, previous, up
172 @chapter About the documentation
174 This document describes Muse, which was written by John Wiegley and is
175 now maintained by Michael Olson. Several versions of this manual are
179 @item PDF: http://mwolson.org/static/doc/muse.pdf
180 @item HTML (single file): http://mwolson.org/static/doc/muse.html
181 @item HTML (multiple files): http://mwolson.org/static/doc/muse/
184 @node Introduction, Obtaining Muse, Preface, Top
185 @comment node-name, next, previous, up
186 @chapter What is Muse?
188 Emacs Muse (also known as ``Muse'' or ``Emacs-Muse'') is an authoring
189 and publishing environment for Emacs. It simplifies the process of
190 writing documents and publishing them to various output formats.
192 Muse consists of two main parts: an enhanced text-mode for authoring
193 documents and navigating within Muse projects, and a set of publishing
194 styles for generating different kinds of output.
196 What makes Muse distinct from other text-publishing systems is a modular
197 environment, with a rather simple core, in which "styles" are derived
198 from to create new styles. Much of Muse's overall functionality is
199 optional. For example, you can use the publisher without the
200 major-mode, or the mode without doing any publishing; or if you don't
201 load the Texinfo or LaTeX modules, those styles won't be available.
203 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
204 code has been restructured and rewritten, especially its publishing
205 functions. The focus in this revision is on the authoring and
206 publishing aspects, and the "wikiness" has been removed as a default
207 behavior (available in the optional @file{muse-wiki} module). CamelCase
208 words are no longer special by default.
210 One of the principal aims in the development of Muse is to make it very
211 easy to produce good-looking, standards-compliant documents.
213 @node Obtaining Muse, Installation, Introduction, Top
214 @comment node-name, next, previous, up
215 @chapter How to Get Muse Releases and Development Changes
218 * Releases:: Released versions of Muse.
219 * Development:: Latest unreleased development changes.
222 @node Releases, Development, Obtaining Muse, Obtaining Muse
223 @comment node-name, next, previous, up
224 @section Released versions of Muse
226 Choose to install a release if you want to minimize risk.
228 Errors are corrected in development first. User-visible changes will be
229 announced on the @email{muse-el-discuss@@gna.org} mailing list.
230 @xref{Getting Help and Reporting Bugs}.
232 @cindex releases, Debian package
233 @cindex Debian package for Muse
234 Debian users can get Muse via apt-get. The @file{muse-el} package is
235 available both at Michael Olson's APT repository and the official Debian
236 repository. To make use of the former, add the following line to your
237 @file{/etc/apt/sources.list} file and run @code{apt-get install muse}.
240 deb http://mwolson.org/debian/ ./
243 @cindex releases, Ubuntu package
244 @cindex Ubuntu package for Muse
245 Ubuntu users can also get Muse via apt-get. The @file{muse-el} package
246 is available both at Michael Olson's APT repository and the official
247 Ubuntu repository. To make use of the former, add the following line to
248 your @file{/etc/apt/sources.list} file and run @code{apt-get install
252 deb http://mwolson.org/ubuntu/ ./
255 The reason for making separate Debian and Ubuntu packages is that this
256 manual is under the GFDL, and Debian will not allow it to be distributed
257 in its main repository. Ubuntu, on the other hand, permits this manual
258 to be included with the @file{muse-el} package.
260 @cindex releases, from source
261 Alternatively, you can download the latest release from
262 @uref{http://download.gna.org/muse-el/} .
264 @node Development, , Releases, Obtaining Muse
265 @comment node-name, next, previous, up
266 @section Latest unreleased development changes
269 Choose the development version if you want to live on the bleeding edge
270 of Muse development or try out new features before release.
272 @cindex git version control system, using
273 The git version control system allows you to keep up-to-date with the
274 latest changes to the development version of Muse. It also allows you
275 to contribute changes (via commits, if you are have developer access to
276 the repository, or via patches, otherwise). If you would like to
277 contribute to Muse development, it is highly recommended that you use
280 If you are new to git, you might find this tutorial helpful:
281 @uref{http://www.kernel.org/pub/software/scm/git/docs/tutorial.html}.
283 Downloading the Muse module with git and staying up-to-date involves
290 @item Debian and Ubuntu: @kbd{apt-get install git-core}.
291 @item Windows: @uref{http://git.or.cz/gitwiki/WindowsInstall}.
292 @item Other operating systems: download, compile, and install the source
293 from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
294 package for your operating system.
297 @item Download the Muse development branch.
299 If you have developer access to Muse, do:
302 git clone ssh://repo.or.cz/srv/git/muse-el.git muse
308 git clone git://repo.or.cz/muse-el.git muse
311 If you are behind a restrictive firewall, and do not have developer
312 access, then do the following instead:
315 git clone http://repo.or.cz/r/muse-el.git muse
318 @item List upstream changes that are missing from your local copy.
319 Do this whenever you want to see whether new changes have been committed
320 to Muse. If you wish, you may skip this step and proceed directly to
324 # Change to the source directory you are interested in.
327 # Fetch new changes from the repository, but don't apply them yet
330 # Display log messages for the new changes
334 ``origin'' is git's name for the location where you originally got Muse
335 from. You can change this location at any time by editing the
336 @file{.git/config} file in the directory where the Muse source was
339 @cindex updating Muse with git
340 @item Update to the latest version by pulling in any missing changes.
347 git will show how many files changed, and will provide a visual display
348 for how many lines were changed in each file.
352 There are other ways to interact with the Muse repository.
355 @item Browse git repo: @uref{http://repo.or.cz/w/muse-el.git}
356 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/muse-latest.tar.gz}
357 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/muse-latest.zip}
360 The latest development snapshot can lag behind the git repo by as much
361 as 20 minutes, but never more than that.
363 @subheading Becoming a Muse developer
364 @cindex developer, becoming
366 If you want commit access to the shared Muse repository, then register
367 an account at @uref{http://repo.or.cz} (be sure to add an SSH key), and
368 contact the current maintainer at @email{mwolson@@gnu.org}. It would be
369 best to send some patches to the @email{muse-el-discuss@@gna.org}
370 mailing list first, so that he knows that you know what you are doing.
371 @xref{Getting Help and Reporting Bugs}, for instructions on subscribing
374 You must also be willing to sign a copyright assignment for your changes
375 to Muse, since Muse is a GNU project. The current maintainer will
376 assist you in this process if you contact him.
378 For information on committing changes to Muse and performing
379 development, please consult
380 @uref{http://emacswiki.org/cgi-bin/wiki/MuseDevelopment}.
382 @node Installation, Getting Started, Obtaining Muse, Top
383 @comment node-name, next, previous, up
384 @chapter Compiling and Installing Muse
386 Muse may be compiled and installed on your machine.
388 @subheading Compilation
389 @cindex compiling Muse
391 This is an optional step, since Emacs Lisp source code does not
392 necessarily have to be byte-compiled. Byte-compilation may yield a very
393 slight speed increase.
395 A working copy of Emacs or XEmacs is needed in order to compile Emacs
396 Muse. By default, the program that is installed with the name
397 @command{emacs} will be used.
399 If you want to use the @command{xemacs} binary to perform the
400 compilation, you must copy @file{Makefile.defs.default} to
401 @file{Makefile.defs} in the top-level directory, and then edit
402 @file{Makefile.defs} as follows. You can put either a full path to an
403 Emacs or XEmacs binary or just the command name, as long as it is in the
408 SITEFLAG = -no-site-file
409 # Edit the section as necessary
410 install_info = install-info --section "XEmacs 21.4" $(1).info \
414 Running @code{make} in the top-level directory should compile the Muse
415 source files in the @file{lisp} directory, and generate an autoloads
416 file in @file{lisp/muse-autoloads.el}.
418 @subheading Installation
419 @cindex installing Muse
421 Muse may be installed into your file hierarchy by doing the following.
423 Copy @file{Makefile.defs.default} to @file{Makefile.defs} in the
424 top-level directory, if you haven't done so already. Then edit the
425 @file{Makefile.defs} file so that @env{ELISPDIR} points to where you
426 want the source and compiled Muse files to be installed and
427 @env{INFODIR} indicates where to put the Muse manual. You may use a
428 combination of @env{DESTDIR} and @env{PREFIX} to further determine where
429 the installed files should be placed. As mentioned earlier, you will
430 want to edit @env{EMACS} and @env{SITEFLAG} as shown in the Compilation
431 section if you are using XEmacs.
433 If you are installing Muse on a Debian or Ubuntu system, you might want
434 to change the value of @env{INSTALLINFO} as specified in
435 @file{Makefile.defs}.
437 If you wish to install Muse to different locations than the defaults
438 specify, edit @file{Makefile.defs} accordingly.
440 Run @code{make} as a normal user, if you haven't done so already.
442 Run @code{make install} as the root user if you have chosen installation
443 locations that require root permissions.
446 @cindex ELPA package for Muse
448 For those used to installing software packages, there will be a
449 @code{muse} package available in the Emacs Lisp Package Archive
450 (abbreviated ``ELPA'') as of the 3.10 release of Muse. This package
451 will be compiled and installed automatically in a user-specific
452 location. For more information on ELPA, see
453 @uref{http://tromey.com/elpa/}.
455 @node Getting Started, Projects, Installation, Top
456 @comment node-name, next, previous, up
457 @chapter Getting Started
461 * Loading Muse:: How to load Muse.
462 * Using Muse Mode:: How to edit files in Muse.
463 * Publishing Files Overview:: Publishing a single file or project.
464 * File Extensions:: Using a different file extension.
467 @node Loading Muse, Using Muse Mode, Getting Started, Getting Started
468 @comment node-name, next, previous, up
469 @section How to Load Muse
470 @cindex settings, init file
472 To use Muse, add the directory containing its files to your
473 @code{load-path} variable, in your @file{.emacs} file. Then, load in
474 the authoring mode, and the styles you wish to publish to. An example
478 (add-to-list 'load-path "<path to Muse>")
480 (require 'muse-mode) ; load authoring mode
482 (require 'muse-html) ; load publishing styles I use
483 (require 'muse-latex)
484 (require 'muse-texinfo)
485 (require 'muse-docbook)
487 (require 'muse-project) ; publish files in projects
490 An easy way of seeing which settings are available and changing settings
491 is to use the Muse customization interface. To do this, type
492 @kbd{M-x customize-group muse RET}. Each of the options has its own
493 documentation. Options are grouped logically according to what effect
496 @node Using Muse Mode, Publishing Files Overview, Loading Muse, Getting Started
497 @comment node-name, next, previous, up
498 @section How to Edit Files in Muse
499 @cindex editing Muse files
501 Muse Mode should automatically be activated when you visit a file with a
502 ``.muse'' extension. One such file is @file{QuickStart.muse}, which is
503 available in the @file{examples} directory of the Muse distribution.
504 You can tell that Muse Mose has been activated by checking for the text
505 ``Muse'' in your mode line. If Muse Mode has not been activated, you
506 may activate it by type @kbd{M-x muse-mode RET}.
508 You will notice that Muse files are highlighted very simply. Links are
509 colored blue, headings are large and bold text, and @verb{|<example>|}
510 tags are colored in grey.
512 There are several different ways to edit things like links, which hide
513 the underlying Muse markup. One way is to toggle font-locking off by
514 hitting @kbd{C-c C-l}, which is also @kbd{M-x font-lock-mode}, make
515 changes, and then hit @kbd{C-c C-l} again to toggle font-locking back
516 on. Another way is just to move into the text and edit it. Markup can
517 also be removed by normal deletion methods, though some side effects
518 might require a second deletion.
520 For the particular case of editing links, it is easiest to move to the
521 link and do @kbd{C-c C-e}, which is also @kbd{M-x
522 muse-edit-link-at-point}. This prompts you for the link and its
523 description, using the previous contents of the link as initial values.
524 A link to another Muse file may be created by hitting @kbd{C-c TAB l}.
525 A link to a URL may be created by hitting @kbd{C-c TAB u}. Links may be
526 followed by hitting @kbd{RET} on them.
528 If you want to add a new list item, this may by accomplished by hitting
529 @kbd{M-RET}. This will put a dash and some spaces on the screen. The
530 dash is the Muse markup that indicates a list item. It is also possible
531 to created ``nested'' lists with this command, by adjusting the number
532 of spaces in front of the dashes. If you have lists with long lines,
533 you can move to a list item and hit @kbd{M-q} to wrap it onto multiple
536 @node Publishing Files Overview, File Extensions, Using Muse Mode, Getting Started
537 @comment node-name, next, previous, up
538 @section Publishing a Single File or Project
539 @cindex editing Muse files
541 The command @kbd{M-x muse-project-publish-this-file} will publish the
542 current document to any available publishing style (a publishing style
543 is an output format, like HTML or Docbook), placing the output in the
544 current directory. If you are in Muse Mode, this command will be bound
545 to @kbd{C-c C-t}. If the file has been published recently, and its
546 contents have not changed, running @kbd{C-c C-t} again will not publish
547 the file. To force publishing in this case, do @kbd{C-u C-c C-t}.
549 If you have set up projects and are visiting a file that is part of a
550 project, then @kbd{C-c C-t} will restrict the output formats to those
551 which are used by the project, and will automatically publish to the
552 output directory defined by the project. If you want to publish to a
553 different directory or use a different format, then use @kbd{C-c M-C-t},
554 which is also @kbd{M-x muse-publish-this-file}.
556 If the currently opened file is part of a defined project in
557 @code{muse-project-alist}, it (and the rest of the changed files in a
558 project) may be published using @kbd{C-c C-p}.
560 @node File Extensions, , Publishing Files Overview, Getting Started
561 @comment node-name, next, previous, up
562 @section Using a Different File Extension
563 @cindex file extension, specifying
565 By default, Muse expects all project files to have the file extension
566 @file{.muse}. Files without this extension will not be associated with
567 Muse mode and will not be considered part of any project, even if they
568 are within a project directory.
570 If you don't want to use @file{.muse}, you can customize the extension
571 by setting the value of @code{muse-file-extension}.
573 If you don't want to use any extension at all, and want Muse to
574 autodetect project files based on their location, then add the following
575 to your Muse settings file.
578 (setq muse-file-extension nil
582 Note that if you chose to have @code{muse-file-extension} set to
583 @code{nil}, you may have trouble if your @file{.emacs} file or other
584 init scripts attempt to visit a Muse file. (A very common example of
585 this is if you use Planner with Muse and run @code{(plan)} from your
586 @file{.emacs}.) If you wish to visit Muse files from your
587 @file{.emacs}, be sure to also add the following additional code before
588 any such visits happen:
591 (add-hook 'find-file-hooks 'muse-mode-maybe)
595 @node Projects, Keystroke Summary, Getting Started, Top
596 @comment node-name, next, previous, up
597 @chapter Creating and Managing Muse Projects
600 Often you will want to publish all the files within a directory to a
601 particular set of output styles automatically. To support, Muse
602 allows for the creation of "projects".
605 * Single Project:: A single-project example.
606 * Multiple Projects:: A multiple-project example.
607 * Projects and Subdirectories:: Publishing subdirectories in projects.
608 * Options for Projects:: Listing of available options for projects.
611 @node Single Project, Multiple Projects, Projects, Projects
612 @comment node-name, next, previous, up
613 @section A Single-Project Example
614 @cindex projects, single
616 Here is a sample project, which may be defined in your @file{.emacs}
620 (setq muse-project-alist
621 '(("Website" ("~/Pages" :default "index")
622 (:base "html" :path "~/public_html")
623 (:base "pdf" :path "~/public_html/pdf"))))
626 The above defines a project named "website", whose files are located
627 in the directory @file{~/Pages}. The default page to visit is
628 @file{index}. When this project is published, each page will be
629 output as HTML to the directory @file{~/public_html}, and as PDF to
630 the directory @file{~/public_html/pdf}. Within any project page, you
631 may create a link to other pages using the syntax @samp{[[pagename]]}.
633 If you would like to include only some files from a directory in a Muse
634 project, you may use a regexp in place of @file{~/Pages} in the example.
636 @node Multiple Projects, Projects and Subdirectories, Single Project, Projects
637 @comment node-name, next, previous, up
638 @section A Multiple-Project Example
639 @cindex projects, multiple
641 It is possible to specify multiple projects. Here is an example of
642 three projects: a generic website, a projects area, and a day-planner
643 (the day-planner part requires Planner Mode---see
644 @uref{http://wjsullivan.net/PlannerMode.html} to get it).
647 (setq muse-project-alist
648 '(("Website" ("~/Pages" :default "index")
649 (:base "html" :path "~/public_html"))
650 (("Projects" ("~/Projects" :default "index")
652 :path "~/public_html/projects"
653 :exclude "/TopSecret")
655 :path "~/public_html/projects/pdf"
656 :exclude "/TopSecret")))
659 :major-mode planner-mode
660 :visit-link planner-visit-link)
661 (:base "planner-xhtml"
662 :path "~/public_html/plans"))))
665 The @option{:major-mode} attribute specifies which major to use when
666 visiting files in this directory.
668 The @option{:visit-link} attribute specifies the function to call when
671 The @option{:exclude} attribute has a regexp that matches files to never
674 @node Projects and Subdirectories, Options for Projects, Multiple Projects, Projects
675 @comment node-name, next, previous, up
676 @section Publishing Subdirectories in Projects
677 @cindex projects, subdirectories
679 If you want to publish a directory and all of its subdirectories, Muse
680 provides two convenience functions that together generate the proper
681 rules for you. Note that we use the backtick to begin this
682 muse-project-alist definition, rather than a single quote.
685 (setq muse-project-alist
686 `(("Website" ("~/Pages" :default "index")
687 (:base "html" :path "~/public_html"))
688 ("Blog" (,@@(muse-project-alist-dirs "~/Blog")
690 ;; Publish this directory and its subdirectories. Arguments
691 ;; are as follows. The above `muse-project-alist-dirs' part
693 ;; 1. Source directory
694 ;; 2. Output directory
695 ;; 3. Publishing style
696 ;; remainder: Other things to put in every generated style
697 ,@@(muse-project-alist-styles "~/Blog"
702 The @code{muse-project-alist-dirs} function takes a directory and
703 returns it and all of its subdirectories in a list.
705 The @code{muse-project-alist-styles} function is explained by the
708 The ``blosxom'' text is the name of another publishing style, much like
709 ``html''. @xref{Blosxom}, for further information about it. You can
710 use any publishing style you like for the third argument to
711 @code{muse-project-alist-styles}.
713 @node Options for Projects, , Projects and Subdirectories, Projects
714 @comment node-name, next, previous, up
715 @section Listing of Available Options for Projects
716 @cindex projects, options
717 @cindex muse-project-alist, reference
719 This is a listing of all of the various options (or, more accurately:
720 attributes) that may be specified in @code{muse-project-alist}.
722 Each muse-project-alist entry looks like this:
725 (PROJECT-NAME (SOURCES)
729 We refer to these names below.
731 ``Attributes'', which compose SOURCES and OUTPUTS, are a pair of values.
732 The first value is a keyword, like @option{:default}. The second part
733 is the value associated with that keyword, such as the text ``index''.
734 If you are familiar with Emacs Lisp property lists, the concept is
735 similar to that, except that in the SOURCES section, single directories
736 can be interspersed with two-value attributes.
738 @subheading Project Name
740 This is a string that indicates the name of the project. It is
741 primarily used for publishing interwiki links with the
742 @file{muse-wiki.el} module.
746 This part of a muse-project-alist entry consists of two-value
747 attributes, and also directory names. If you are publishing a book, the
748 order of directories and attributes is significant.
750 The minimal content for the sources section is a list of directories.
755 Indicates a new chapter of a book. The text of the title of the chapter
756 comes immediately after this keyword.
759 Indicates the end of a book. Directories listed after this one are
760 ignored when publishing a book. The value ``t'' (without quotes) should
761 come immediately after this keyword.
764 A function to call while publishing a book. This is useful for doing
765 something just after a particular chapter.
768 Indicates the beginning of a new part of the book. The text of the
769 title should come immediately after this keyword.
772 Indicate a particular publishing style to use for this part of the book.
773 If this is specified, it should come just after a @option{:part}
777 The default page to visit when browsing a project. Also, if you are
778 using the @file{muse-wiki.el} module, publishing a link to just a
779 project's name will cause it to link to this default file.
782 This specifies a list of pages which should be published every time a
783 project is published (by using @kbd{C-c C-p}, for example), regardless
784 of whether their contents have changed. This is useful for updating
785 Index pages, pages that use the @verb{|<include>|} tag, and other pages
786 that have dynamically-generated content.
789 This specifies the major mode to use when visiting files in this
790 project. The default is @code{muse-mode}.
793 This indicates that while publishing a book, do not automatically create
794 chapters. Values which may follow this are nil (the default, which
795 means that we automatically create chapters), or non-nil, which means
796 that we manually specify chapters with the @option{:book-chapter}
799 @item :publish-project
800 Indicates which function we should call when publishing a project.
803 This specifies a list of variables and values to set when publishing a
804 project. The list should be a property list, which is in the form:
807 (VAR1 VALUE1 VAR2 VALUE2 ...)
811 Specifies the function to call when visiting a link. The default is
812 @code{muse-visit-link-default}. The arguments for that function should
813 be (1) the link and (2) whether to visit the link in a new window.
819 This part of a muse-project-alist entry is composed of lists of
820 attributes. Each list is called an ``output style''.
822 The minimal content for an output style is a @option{:base} attribute
823 and a @option{:path} attribute.
828 Publishing style to use, such as ``html'', ``docbook'', or ``pdf''.
831 An external URL which can be used to access published files. This is
832 mainly used by the @file{muse-wiki} module when publishing links between
833 two separate projects, if the projects are served on different domains.
835 It is also used by the @file{muse-journal} module to create the RSS or
839 Exclude items matching a regexp from being published. The regexp should
840 usually begin with "/".
843 Only include items matching a regexp when publishing. The regexp should
844 usually begin with "/".
847 The directory in which to store published files.
850 A file containing the timestamps (that is, time of creation) for files
851 in this project. It might eventually used by the @file{muse-blosxom}
852 module, but this option is not currently in use by any Muse code.
857 @node Keystroke Summary, Markup Rules, Projects, Top
858 @comment node-name, next, previous, up
859 @chapter Keys Used in Muse Mode
862 This is a summary of keystrokes available in every Muse buffer.
866 @item C-c C-a (`muse-index')
867 Display an index of all known Muse pages.
869 @item C-c C-b (`muse-find-backlinks')
870 Find all pages that link to this page.
872 @item C-c C-e (`muse-edit-link-at-point')
875 @item C-c C-f (`muse-project-find-file')
876 Open another Muse page. Prompt for the name.
878 @item C-c C-i l, C-c TAB l (`muse-insert-relative-link-to-file')
879 Insert a link to a file interactively.
881 @item C-c C-i t, C-c TAB t (`muse-insert-tag')
882 Insert a tag interactively.
884 @item C-c C-i u, C-c TAB u (`muse-insert-url')
885 Insert a URL interactively.
887 @item C-c C-l (`font-lock-mode')
888 Toggle font lock / highlighting for the current buffer.
890 @item C-c C-p (`muse-project-publish')
891 Publish any Muse pages that have changed.
893 @item C-c C-s (`muse-search')
894 Find text in all files of the current project.
896 @item C-c C-t (`muse-project-publish-this-file')
897 Publish the currently-visited file. Prompt for the style if the current
898 file can be published using more than one style.
900 @item C-c C-S-t, or C-c C-M-t (`muse-publish-this-file')
901 Publish the currently-visited file. Prompt for both the style and
904 @item C-c C-v (`muse-browse-result')
905 Show the published result of this page.
907 @item C-c = (`muse-what-changed')
908 Diff this page against the last backup version.
911 Move to the next Wiki reference.
914 Move to the previous Wiki reference.
917 Complete the name of a page from the current project at point.
920 Insert a new list item at point, indenting properly.
923 Decrease the indentation of the list item at point.
926 Increase the indentation of the list item at point.
928 @item M-x muse-colors-toggle-inline-images RET
929 Toggle display of inlined images on/off.
931 @item M-x muse-update-values RET
932 Update various values that are automatically generated.
934 Call this after changing @code{muse-project-alist}.
938 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
939 @comment node-name, next, previous, up
940 @chapter Rules for Using Markup
943 A Muse document uses special, contextual markup rules to determine how
944 to format the output result. For example, if a paragraph is indented,
945 Muse assumes it should be quoted.
947 There are not too many markup rules, and all of them strive to be as
948 simple as possible so that you can focus on document creation, rather
952 * Paragraphs:: Paragraphs: centering and quoting.
953 * Headings:: Levels of headings.
954 * Directives:: Directives at the beginning of a
956 * Emphasizing Text:: Bold, italicized, and underlined text.
957 * Footnotes:: Making notes to be shown at the end.
958 * Verse:: Indicating poetic stanzas.
959 * Lists:: Lists of items.
960 * Tables:: Generation of data tables.
961 * Explicit Links:: Hyperlinks and email addresses with
963 * Implicit Links:: Bare URLs, WikiNames, and InterWiki
965 * Images:: Publishing and displaying images.
966 * Horizontal Rules and Anchors:: Inserting a horizontal line or anchor.
967 * Embedded Lisp:: Evaluating Emacs Lisp code in documents
969 * Citations:: Support for citing other resources.
970 * Comments:: Lines to omit from published output.
971 * Tag Summary:: Tags that Muse recognizes.
974 @node Paragraphs, Headings, Markup Rules, Markup Rules
975 @comment node-name, next, previous, up
976 @section Paragraphs: centering and quoting
979 Paragraphs in Muse must be separated by a blank line.
981 @cindex paragraphs, centered
982 @subheading Centered paragraphs and quotations
984 A line that begins with six or more columns of whitespace (either tabs
985 or spaces) indicates a centered paragraph. Alternatively, you can use
986 the @verb{|<center>|} tag to surround regions that are to be published as
989 @cindex paragraphs, quoted
991 But if a line begins with whitespace, though less than six columns, it
992 indicates a quoted paragraph. Alternatively, you can use the
993 @verb{|<quote>|} tag to surround regions that are to be published as
997 @cindex monospace, rendering blocks
998 @cindex HTML, rendering blocks in monospace
999 @subheading Literal paragraphs
1001 The @verb{|<example>|} tag is used for examples, where whitespace should
1002 be preserved, the text rendered in monospace, and any characters special
1003 to the output style escaped.
1005 @cindex literal text
1006 @cindex HTML, inserting a raw block
1007 There is also the @verb{|<literal>|} tag, which causes a marked block to
1008 be entirely left alone. This can be used for inserting a hand-coded
1009 HTML blocks into HTML output, for example.
1011 If you want some text to only be inserted when publishing to a
1012 particular publishing style, use the @option{style} attribute for the
1013 @verb{|<literal>|} tag. An example follows.
1016 <literal style="latex">
1017 A LaTeX-based style was used in the publishing of this document.
1021 This will leave the region alone if the current publishing style is
1022 ``latex'' or based on ``latex'', such as ``pdf'', and delete the region
1023 otherwise. It is also possible to leave the text alone only for one
1024 particular style, rather than its derivations, by adding
1025 @code{exact="t"} to the tag.
1027 @node Headings, Directives, Paragraphs, Markup Rules
1028 @comment node-name, next, previous, up
1029 @section Levels of headings
1032 A heading becomes a chapter or section in printed output -- depending on
1033 the style. To indicate a heading, start a new paragraph with one or
1034 more asterices, followed by a space and the heading title. Then begin
1035 another paragraph to enter the text for that section.
1037 All levels of headings will be published. Most publishing styles only
1038 distinguish the between the first 4 levels, however.
1050 @node Directives, Emphasizing Text, Headings, Markup Rules
1051 @comment node-name, next, previous, up
1052 @section Directives at the beginning of a document
1055 Directives are lines beginning with the @samp{#} character that come
1056 before any paragraphs or sections in the document. Directives are of
1057 the form ``#directive content of directive''. You can use any
1058 combination of uppercase and lowercase letters for directives, even if
1059 the directive is not in the list below.
1061 The @code{muse-publishing-directive} function may be used in header and
1062 footer text to access directives. For example, to access the
1063 @code{#title} directive, use @code{(muse-publishing-directive "title")}.
1065 The following is a list of directives that Muse uses.
1070 The author of this document.
1072 If this is not specified, Muse will attempt to figure it out from the
1073 @code{user-full-name} variable.
1077 The date that the document was last modified.
1079 This is used by publishing styles that are able to embed the date
1084 A short description of this document.
1086 This is used by the @code{journal} publishing style to embed information
1087 inside of an RSS/RDF feed.
1091 The title of this document.
1093 If this is not specified, the name of the file is used.
1097 @node Emphasizing Text, Footnotes, Directives, Markup Rules
1098 @comment node-name, next, previous, up
1099 @section Bold, italicized, and underlined text
1100 @cindex emphasizing text
1101 @cindex underlining text
1102 @cindex italicizing text
1103 @cindex verbatim text
1104 @cindex monospace, rendering words
1106 To emphasize text, surround it with certain specially recognized
1112 ***very strong emphasis***
1114 =verbatim and monospace=
1118 While editing a Muse document in Muse mode, these forms of emphasis will
1119 be highlighted in a WYSIWYG manner. Each of these forms may span
1122 Verbatim text will be colored as gray by default. To change this,
1123 customize @code{muse-verbatim-face}.
1125 You can also use the @verb{|<code>|} tag to indicate verbatim and
1126 monospace text. This is handy for regions that have an ``='' in them.
1128 @node Footnotes, Verse, Emphasizing Text, Markup Rules
1129 @comment node-name, next, previous, up
1130 @section Making notes to be shown at the end
1133 A footnote reference is simply a number in square brackets. To define
1134 the footnote, place this definition at the bottom of your file.
1135 @samp{footnote-mode} can be used to greatly facilitate the creation of
1136 these kinds of footnotes.
1138 Footnotes are defined by the same number in brackets occurring at the
1139 beginning of a line. Use footnote-mode's @kbd{C-c ! a} command, to very
1140 easily insert footnotes while typing. Use @kbd{C-x C-x} to return to
1141 the point of insertion.
1143 @node Verse, Lists, Footnotes, Markup Rules
1144 @comment node-name, next, previous, up
1145 @section Indicating poetic stanzas
1149 Poetry requires that whitespace be preserved, but without resorting to
1150 monospace. To indicate this, use the following markup, reminiscent of
1154 > A line of Emacs verse;
1155 > forgive its being so terse.
1158 You can also use the @verb{|<verse>|} tag, if you prefer.
1162 A line of Emacs verse;
1163 forgive its being so terse.
1167 @cindex verses, multiple stanzas
1168 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
1173 A line of Emacs verse;
1174 forgive its being so terse.
1176 In terms of terse verse,
1181 @node Lists, Tables, Verse, Markup Rules
1182 @comment node-name, next, previous, up
1183 @section Lists of items
1186 Lists are given using special characters at the beginning of a line.
1187 Whitespace must occur before bullets or numbered items, to distinguish
1188 from the possibility of those characters occurring in a real sentence.
1190 @cindex lists, bullets
1191 These are rendered as a bullet list.
1200 @cindex lists, enumerated
1201 An enumerated list follows.
1210 @cindex lists, definitions
1211 Here is a definition list.
1215 This is a first definition
1216 And it has two lines;
1217 no, make that three.
1219 Term2 :: This is a second definition
1222 @subheading Nested lists
1224 @cindex lists, nested
1225 It is possible to nest lists of the same or different kinds. The
1226 ``level'' of the list is determined by the amount of initial whitespace.
1231 - Level 1, bullet item one
1232 1. Level 2, enum item one
1233 2. Level 2, enum item two
1234 - Level 1, bullet item two
1235 1. Level 2, enum item three
1236 2. Level 2, enum item four
1240 @subheading Breaking list items
1242 @cindex lists, breaking lines
1243 If you want to break up a line within any list type, just put one blank
1244 line between the end of the previous line and the beginning of the next
1245 line, using the same amount of initial indentation.
1248 - bullet item 1, line 1
1250 bullet item 1, line 2
1256 - bullet item 2, line 1
1258 bullet item 2, line 2
1261 @node Tables, Explicit Links, Lists, Markup Rules
1262 @comment node-name, next, previous, up
1263 @section Generation of data tables
1266 @cindex tables, simple
1267 Only very simple tables are supported. The syntax is as follows.
1270 Double bars || Separate header fields
1272 Single bars | Separate body fields
1273 Here are more | body fields
1275 Triple bars ||| Separate footer fields
1278 Some publishing styles require header fields to come first, then footer
1279 fields, and then the body fields. You can use any order for these
1280 sections that you like, and Muse will re-order them for you at
1283 If you wish to disable table generation for one Muse file, add the
1284 directive @samp{#disable-tables t} to the top of the file.
1286 @subheading Other table formats
1288 @cindex tables, orgtbl-mode style
1289 It is possible to publish very basic Orgtbl-mode style tables.
1292 | org | style | table |
1293 |------+-------+-------|
1297 |------+-------+-------|
1301 If you are used to the way that Org Mode publishes these tables, then
1302 customize `muse-html-table-attributes' to the following, in order to get
1303 a similar kind of output.
1306 border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"
1309 @cindex tables, table.el style
1310 @file{table.el} style tables are also supported, as long as
1311 @file{table.el} itself supports outputting tables for a particular
1312 publishing style. At the time of this writing, the ``html'', ``latex'',
1313 and ``docbook'' styles are supported by @file{table.el}. Styles derived
1314 from these styles will also work.
1326 @node Explicit Links, Implicit Links, Tables, Markup Rules
1327 @comment node-name, next, previous, up
1328 @section Hyperlinks and email addresses with descriptions
1329 @cindex links, explicit
1331 A hyperlink can reference a URL, or another page within a Muse
1332 project. In addition, descriptive text can be specified, which should
1333 be displayed rather than the link text in output styles that supports
1334 link descriptions. The syntax is as follows.
1337 [[link target][link description]]
1338 [[link target without description]]
1341 Thus, the current maintainer's homepage for Muse can be found
1342 @samp{[[http://mwolson.org/projects/EmacsMuse.html][here]]},
1343 or at @samp{[[http://mwolson.org/projects/EmacsMuse.html]]}.
1345 @node Implicit Links, Images, Explicit Links, Markup Rules
1346 @comment node-name, next, previous, up
1347 @section Bare URLs, WikiNames, and InterWiki links
1348 @cindex links, implicit
1352 @cindex Email addresses
1354 A URL or email address encountered in the input text is published as a
1355 hyperlink. These kind of links are called @dfn{implicit links} because
1356 they are not separated from the rest of the Muse document in any way.
1358 Some characters in URLs will prevent Muse from recognizing them as
1359 implicit links. If you want to link to a URL containing spaces or any of
1360 the characters ``][,"'`()<>^'', you will have to make the link
1361 explicit. The punctuation characters ``.,;:'' are also not recognized as
1362 part of a URL when they appear at its end. For information on how to
1363 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
1364 addresses with descriptions}.
1367 If the @command{muse-wiki} module is loaded, another form of implicit
1368 link will be made available. WikiNames, which are typed in CamelCase,
1369 are highlighted and published as links, provided that the file they
1372 Customization of WikiName recognition may be accomplished by editing the
1373 @code{muse-wiki-wikiword-regexp} option and subsequently running
1374 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
1375 If you use the Customize interface, the latter will be done
1378 @cindex InterWiki links
1379 @cindex inter-project links
1380 The @command{muse-wiki} module also allows for InterWiki links. These
1381 are similar to WikiWords, but they specify both the project and page of
1382 a file. The names of your project entries in @code{muse-project-alist}
1383 will be used as InterWiki names by default. Several examples follow.
1386 Blog::DocumentingMuse
1391 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
1392 the project name, and @samp{DocumentingMuse} is the page name. In the
1393 second example, @samp{#} is the interwiki delimiter. If the name of a
1394 project occurs by itself in text, like the third case, it will be
1395 colorized and published as a link to the default page of the given
1398 Customization of interwiki links may be accomplished by editing the
1399 @code{muse-wiki-interwiki-alist} option.
1401 It is also possible to link to an anchor in an interwiki document. This
1402 is called a ``three-part link''. Examples of this follow.
1405 Blog::DocumentingMuse#anchor1
1406 Projects#EmacsMuse#anchor2
1409 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
1410 @comment node-name, next, previous, up
1411 @section Publishing and displaying images
1413 @cindex links, with images
1414 @subheading Image links
1416 Links to images may be used in either the target or the description, or
1417 both. Thus, the following code will publish as a clickable image that
1418 points to @url{http://mwolson.org/}.
1421 [[http://mwolson.org/][/static/logos/site-logo.png]]
1424 Normally, images in the link part will be inlined.
1426 If you want these images to be published as links instead, place the
1427 text ``URL:'' immediately in front of the link text. An example
1431 [[URL:http://mwolson.org/static/logos/site-logo.png]]
1434 @cindex images, displaying
1435 @cindex images, local
1436 @subheading Displaying images in Muse mode
1437 If a link to a locally-available image is encountered in the link
1438 description, Muse mode will attempt to display it if your version of
1441 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
1442 by setting the @code{muse-colors-inline-images} option to @code{nil}.
1444 The method for finding images may be altered by customizing the
1445 @code{muse-colors-inline-image-method} option. One useful value for
1446 this option is @code{muse-colors-use-publishing-directory}, which tells
1447 Muse mode to look in the directory where the current file will be
1448 published. The default is to look in the current directory. Relative
1449 paths like @samp{../pics/} should work for either setting.
1451 Eventually, it is hoped that Muse will be able to copy images from the a
1452 ``source'' directory to a publishing directory by customizing
1453 @code{muse-project-alist}, but this has not been implemented yet.
1455 @cindex images, without descriptions
1456 @cindex images, inlined
1457 @subheading Publishing simple images
1458 The following example will display correctly and publish correctly if a
1459 @acronym{PNG} file called @file{TestLogo.png} exists in the
1460 @file{../pics/} directory. If text is on the same line as the picture,
1461 it will remain so in the output.
1467 @cindex images, captions
1468 @subheading Publishing images with captions
1469 If you want to add a caption to an image, use the following syntax.
1470 This will center the image (if the output format supports it) and add a
1471 centered caption below the picture. Formats that do not support
1472 centering the image will instead leave it against the left margin.
1475 [[../pics/mycat.png][My cat Dexter]]
1478 Images with captions may only occur in their own paragraphs, with no
1479 text on the same line. Otherwise, the published output will not be
1480 syntactically correct.
1482 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
1483 @comment node-name, next, previous, up
1484 @section Inserting a horizontal line or anchor
1486 @cindex horizontal rules
1488 @subheading Horizontal Rules
1490 Four or more dashes indicate a horizontal rule. Be sure to put blank
1491 lines around it, or it will be considered part of the proceeding or
1492 following paragraph!
1495 @cindex links, with target on same page
1498 If you begin a line with "#anchor" -- where "anchor" can be any word
1499 that doesn't contain whitespace -- it defines an anchor at that point
1500 into the document. This point can be referenced using "page#anchor" as
1501 the target in a Muse link.
1503 @node Embedded Lisp, Citations, Horizontal Rules and Anchors, Markup Rules
1504 @comment node-name, next, previous, up
1505 @section Evaluating Emacs Lisp code in documents for extensibility
1506 @cindex lisp, embedded
1508 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
1509 which is the only Muse tag supported in a style's header and footer
1510 text. With the @verb{|<lisp>|} tag, you may generated whatever output
1511 text you wish. The inserted output will get marked up, if the
1512 @verb{|<lisp>|} tag appears within the main text of the document.
1515 <lisp>(concat "This form gets " "inserted")</lisp>
1518 @cindex lisp, and insert command
1519 Note that you should not use the @code{insert} command within a set of
1520 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
1521 tags will be automatically inserted into the document.
1523 It is also possible to treat the output as if it were surrounded by the
1524 @verb{|<example>|}, @verb{|<src>|}, or @verb{|<verse>|} tags, by
1525 specifying ``example'', ``src'', or ``verse'' as the @option{markup}
1526 attribute of the @verb{|<lisp>|} tag.
1529 <lisp markup="example">
1530 (concat "Insert" " me")
1534 Other languages also have tags that cause source code to be evaluated.
1535 @xref{Tag Summary}, for details.
1537 @node Citations, Comments, Embedded Lisp, Markup Rules
1538 @comment node-name, next, previous, up
1539 @section Support for citing other resources
1541 @cindex tags, <cite>
1545 Here is an example of what citations look like in a Muse document.
1553 Some text before <cite>Miller1999</cite> and after the citation.
1555 This is an author-only citation <cite type="author">Miller1999</cite>.
1557 And this is a year-only citation <cite type="year">Miller1999</cite>.
1559 Finally, this is a multi-head citation
1560 <cite>Miller1999,Andrews2005</cite>.
1563 @subheading Overview
1565 The @code{#bibsource} directive defines the source of the
1566 bibliographies. The following sources are possible.
1569 @item DocBook + RefDB:
1572 @item LaTeX + bibtex:
1573 the name of an appropriate bibtex file
1575 @item LaTeX + RefDB:
1576 if the input file is called "foo.muse", then set this to "foo.bib"
1579 Citations are encoded as @verb{|<cite>|} elements which enclose the
1580 citation keys as they are defined in the bibliography file or database.
1581 In multi-head citations, the citation keys have to be separated by
1582 colons or semicolons. The @code{latex} and @code{docbook} styles
1583 translate these to the proper separator automatically.
1585 The @verb{|<cite>|} elements take an optional ``type'' attribute that
1586 defines how the citation is rendered. If the attribute is missing,
1587 you'll get a regular citation according to the bibliography style,
1588 e.g.'' (Miller et al., 1999)''. If the attribute is set to "author",
1589 only the name of the author(s) will be rendered. Accordingly, "year"
1590 will cause the year to be printed. This is useful to create citations
1594 Miller et al. had already shown in a previous publication (1999) that
1595 this is not going to work.
1598 Remember that refdb-mode (the Emacs interface to RefDB) can retrieve
1599 references by simply marking the citation key and running the
1600 @code{refdb-getref-by-field-on-region} command. Later versions of
1601 @code{refdb-mode} will also allow to insert references as Muse citations
1602 (which is already implemented for DocBook, TEI, and LaTeX documents).
1604 You may have noticed that there is no element to indicate the position
1605 of the bibliography. The latter is always created at a valid position
1606 close to the end of the document. The functions
1607 @code{muse-docbook-bibliography} and @code{muse-latex-bibliography} are
1608 called in the header or footer to generate this content, so it is
1609 possible to change the exact position.
1611 @node Comments, Tag Summary, Citations, Markup Rules
1612 @comment node-name, next, previous, up
1613 @section Lines to omit from published output
1615 @cindex publishing, omitting lines
1617 Use the following syntax to indicate a comment. Comments will not be
1621 ; Comment text goes here.
1624 That is, only a semi-colon at the beginning of a line, followed by a
1625 literal space, will cause that line to be treated as a comment.
1627 You can alternatively surround the region with the @verb{|<comment>|}
1630 If you wish the comment to be published, but just commented out using
1631 the comment syntax of the output format, then set
1632 @option{muse-publish-comments-p} to non-nil.
1634 @node Tag Summary, , Comments, Markup Rules
1635 @comment node-name, next, previous, up
1636 @section Tags that Muse recognizes
1638 @cindex inserting files at publish time
1639 @cindex publishing, including markup in headers and footers
1640 @cindex publishing, inserting files
1642 Muse has several built-in tags that may prove useful during publishing.
1643 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1644 Muse uses, as well as make your own tags.
1648 If a tag takes arguments, it will look like this, where ``tagname'' is
1649 the name of the tag.
1652 <tagname arg1="string1" arg2="string2">
1655 If you want the tag to look like it came straight from an XHTML
1656 document, you can alternatively do the following.
1659 <tagname arg1="string1" arg2="string2" />
1662 If a tag surrounds some text, it will look like this.
1665 <tagname>Some text</tagname>
1668 If a tag surrounds a large region, it will look like this.
1677 @subheading Tag listing
1679 This is the complete list of tags that Muse accepts, including those
1680 that were mentioned in previous sections.
1685 Insert a citation to another source.
1687 This takes the argument @option{type}, which indicates the type of
1688 citation. The valid types are "author" and "year". If this argument is
1689 omitted, include both author and year in the citation.
1691 The bibliography to use for the citation may be specified by the
1692 @option{#bibsource} directive.
1694 @xref{Citations}, for additional information.
1697 If publishing to HTML, surround the given text with a @verb{|<span>|}
1698 tag. It takes one argument called ``name'' that specifies the ``class''
1699 attribute of the @verb{|<span>|} tag.
1701 If publishing to a different format, do nothing extra to the text.
1704 Treat the text surrounded by the tag as if they were enclosed in equal
1705 signs, that is, make it monospace.
1708 Run a command on the region, replacing the region with the result of the
1709 command. The command is specified with the ``interp'' argument. If no
1710 value for ``interp'' is given, pass the entire region to the shell.
1712 The ``markup'' argument controls how this section is marked up.
1714 If it is omitted, publish the region with the normal Muse rules.
1716 If "nil", do not mark up the region at all, but prevent Muse from
1717 further interpreting it.
1719 If "example", treat the region as if it was surrounded by the
1720 @verb{|<example>|} tag.
1722 If "src", treat the included text as if it was surrounded by the
1723 @verb{|<src>|} tag. You should also specify the ``lang'' attribute if
1726 If "verse", treat the region as if it was surrounded by the
1727 @verb{|<verse>|} tag, to preserve newlines.
1729 Otherwise, it should be the name of a function to call, with the buffer
1730 narrowed to the region.
1733 Treat the entire region as a comment. If the option
1734 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1735 publish it using the comment syntax of the current publishing style.
1738 Publish a Table of Contents. This will either be inserted in-place or
1739 at the beginning of the document, depending on your publishing style.
1740 It does not have a delimiting tag.
1742 By default, only 2 levels of headings will be included in the generated
1743 Table of Contents. To change this globally, customize the
1744 @var{muse-publish-contents-depth} option. To change this only for the
1745 current tag, use the ``depth'' argument.
1748 Publish the region in monospace, preserving the newlines in the region.
1749 This is useful for snippets of code.
1752 Insert the given file at the current location during publishing. The
1753 basic use of this tag is as follows, replacing ``included_file'' with
1754 the name of the file that you want to include.
1757 <include file="included_file">
1760 The ``markup'' argument controls how this section is marked up.
1762 If it is omitted, publish the included text with the normal Muse
1765 If "nil", do not mark up the included text at all.
1767 If "example", treat the included text as if it was surrounded by the
1768 @verb{|<example>|} tag.
1770 If "src", treat the included text as if it was surrounded by the
1771 @verb{|<src>|} tag. You should also specify the ``lang'' attribute if
1774 If "verse", treat the included text as if it was surrounded by the
1775 @verb{|<verse>|} tag, to preserve newlines.
1777 Otherwise, it should be the name of a function to call after inserting
1778 the file with the buffer narrowed to the section inserted.
1781 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1782 The result is then inserted into the document, so you do not need to
1783 explicitly call @code{insert}. All text properties are removed from the
1786 This tag takes the ``markup'' argument. See the description of
1787 @verb{|<command>|} for details.
1790 Make sure that the text enclosed by this tag is published without
1791 escaping it in any way. This is useful for inserting markup directly
1792 into the published document, when Muse does not provide the desired
1796 Mark up the text between the initial and ending tags. The markup
1797 command to use may be specified by the ``function'' argument. The
1798 standard Muse markup routines are used by default if no ``function''
1799 argument is provided.
1801 This is useful for marking up regions in headers and footers. One
1802 example that comes to mind is generating a published index of all of the
1803 files in the current project by doing the following.
1806 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1810 Run the @command{perl} language interpreter on the region, replacing the
1811 region with the result of the command.
1813 This tag takes the ``markup'' argument. See the description of
1814 @verb{|<command>|} for details.
1817 Run the @command{python} language interpreter on the region, replacing
1818 the region with the result of the command.
1820 This tag takes the ``markup'' argument. See the description of
1821 @verb{|<command>|} for details.
1824 Publish the region as a blockquote. This will either be inserted
1825 in-place or at the beginning of the document, depending on your
1826 publishing style. It does not have a delimiting tag.
1829 Run the @command{ruby} language interpreter on the region, replacing the
1830 region with the result of the command.
1832 This tag takes the ``markup'' argument. See the description of
1833 @verb{|<command>|} for details.
1836 Publish the region using htmlize.
1837 The language to use may be specified by the ``lang'' attribute.
1839 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1840 the value of the ``lang'' attribute.
1842 This tag requires htmlize 1.34 or later in order to work. If this is
1843 not satisfied, or the current publishing style is not HTML-based, Muse
1844 will publish the region like an @verb{|<example>|} tag.
1847 This is used when you want to prevent Muse from trying to interpret some
1848 markup. Surround the markup in @verb{|<verbatim>|} and
1849 @verb{|</verbatim>|}, and it will not be interpreted.
1851 This tag was used often in previous versions of Muse because they did
1852 not support whole-document escaping of specials. Now, it will only be
1853 needed for other tags, and perhaps footnotes as well.
1856 Preserve the newlines in the region. In formats like HTML, newlines are
1857 removed by default, hence the need for this tag. In other publishing
1858 styles, this tag may cause the text to be indented slightly in a way
1859 that looks nice for poetry and prose.
1863 @node Publishing Styles, Extending Muse, Markup Rules, Top
1864 @comment node-name, next, previous, up
1865 @chapter Publishing Various Types of Documents
1866 @cindex publishing styles
1868 One of the principle features of Muse is the ability to publish a simple
1869 input text to a variety of different output styles. Muse also makes it
1870 easy to create new styles, or derive from an existing style.
1873 * Blosxom:: Integrating Muse and pyblosxom.cgi.
1874 * Book:: Publishing entries into a compilation.
1875 * ConTeXt:: Publishing ConTeXt documents.
1876 * DocBook:: Publishing in DocBook XML form.
1877 * HTML:: Publishing in HTML or XHTML form.
1878 * Journal:: Keeping a journal or blog.
1879 * LaTeX:: Publishing LaTeX documents.
1880 * Poem:: Publish a poem to LaTeX or PDF.
1881 * Texinfo:: Publish entries to Texinfo format or PDF.
1882 * XML:: Publish entries to XML.
1885 @node Blosxom, Book, Publishing Styles, Publishing Styles
1886 @comment node-name, next, previous, up
1887 @section Integrating Muse and pyblosxom.cgi
1888 @cindex blog, one-file-per-entry style
1890 The Blosxom publishing style publishes a tree of categorised files to a
1891 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1892 In other words, each blog entry corresponds with one file.
1895 * Blosxom Requirements:: Other tools needed for the Blosxom style.
1896 * Blosxom Entries:: Format of a Blosxom entry and automation.
1897 * Blosxom Options:: Blosxom styles and options provided.
1900 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1901 @comment node-name, next, previous, up
1902 @subsection Other tools needed for the Blosxom style
1904 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1905 installed on a machine that you have upload access to.
1907 The major difficulty in both of these programs is specifying the date of
1908 the entries. Both programs rely on the file modification time rather
1909 than any data contained in the entries themselves. A plugin is needed
1910 in order for these programs to be able to get the correct date.
1912 @subheading PyBlosxom
1914 There are two different ways of accomplishing this in pyblosxom. The
1915 first way involves gathering the timestamps (as specified by the
1916 @code{#date} directive) into one file and then sending that file along
1917 with published entries to the webserver.
1919 The second will read each file at render time and parse the
1920 @code{#postdate} directive. Muse will translate the @code{#date}
1921 directive into @code{#postdate} at publish time, so you don't have to do
1924 @subsubheading Placing timestamps in one file
1926 The following additional components are required in order to make the
1927 date of blog entries display as something sensible.
1931 A script to gather date directives from the entire blog tree into a
1932 single file. The file must associate a blog entry with a date.
1935 A plugin for (py)blosxom that reads this file.
1938 These 2 things are provided for @command{pyblosxom.cgi} in the
1939 @file{contrib/pyblosxom} subdirectory. @file{getstamps.py} provides the
1940 former service, while @file{hardcodedates.py} provides the latter
1943 Here is a sample listing from my @file{timestamps} file, which maps
1944 each file to a date. This can really be in any format, as long as your
1945 date-gathering script and your plugin can both understand it.
1948 2005-04-01-14-16 personal/paper_cranes
1949 2005-03-21 personal/spring_break_over
1950 2004-10-24 personal/finished_free_culture
1953 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1954 @file{getstamps.py}. Note that you will need to set the current
1955 directory to where your Muse files are, execute @file{getstamps.py}, and
1956 then move the generated timestamps file to your publishing directory.
1958 @subsubheading Getting timestamp from entry while rendering
1960 Alternately, the pyblosxom metadate plugin may be used. On the plus
1961 side, there is no need to run a script to gather the date. On the
1962 downside, each entry is read twice rather than once when the page is
1963 rendered. Set the value of @code{muse-blosxom-use-metadate} to non-nil
1964 to enable adding a @code{#postdate} directive to all published files.
1968 M-x customize-variable RET muse-blosxom-use-metadate RET
1971 With the metadate plugin installed in pyblosxom, the date set in this
1972 directive will be used instead of the file's modification time. The
1973 plugin is included with Muse at @file{contrib/pyblosxom/metadate.py}.
1977 It is also possible to use Blosxom, which is written in Perl, to serve
1978 blog entries that were published with Muse. The steps are as follows.
1982 Download and install blosxom from @url{http://blosxom.sourceforge.net/}.
1985 Install the metadate plugin. It is available in
1986 @file{contrib/blosxom/metadate_0_0_3}.
1989 Every time you make a new blog entry, change to the blosxom data
1990 directory and execute the @file{contrib/blosxom/getstamps.pl} script.
1991 This script has only recently been made, and may still have some bugs,
1992 so use with caution.
1996 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1997 @comment node-name, next, previous, up
1998 @subsection Format of a Blosxom entry and automation
2000 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
2001 longer `#date yyyy-mm-dd-hh-mm', a title (using the @code{#title}
2002 directive), plus whatever normal content is desired.
2004 The date directive is not used directly by @command{pyblosxom.cgi} or
2005 this program. You need to have the two additional items from the former
2006 section to make use of this feature.
2008 There is a function called @code{muse-blosxom-new-entry} that will
2009 automate the process of making a new blog entry. To make use of it, do
2014 Customize @code{muse-blosxom-base-directory} to the location that your
2015 blog entries are stored.
2018 Assign the @code{muse-blosxom-new-entry} function to a key sequence. I
2019 use the following code to assign this function to @kbd{C-c p l'}.
2022 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
2026 You should create your directory structure ahead of time under your base
2027 directory. These directories, which correspond with category names, may
2031 When you enter this key sequence, you will be prompted for the category
2032 of your entry and its title. Upon entering this information, a new file
2033 will be created that corresponds with the title, but in lowercase
2034 letters and having special characters converted to underscores. The
2035 title and date directives will be inserted automatically.
2038 @node Blosxom Options, , Blosxom Entries, Blosxom
2039 @comment node-name, next, previous, up
2040 @subsection Blosxom styles and options provided
2042 The following styles and options are available in the Blosxom publishing
2045 @subheading Styles provided
2049 @cindex publishing styles, blosxom-html
2051 Publish Blosxom entries in HTML form.
2053 @cindex publishing styles, blosxom-xhtml
2055 Publish Blosxom entries in XHTML form.
2059 @subheading Options provided
2063 @item muse-blosxom-extension
2064 Default file extension for publishing Blosxom files.
2066 @item muse-blosxom-header
2067 Header used for publishing Blosxom files.
2069 This may be text or a filename.
2071 @item muse-blosxom-footer
2072 Footer used for publishing Blosxom files.
2074 This may be text or a filename.
2076 @item muse-blosxom-base-directory
2077 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
2079 This is the top-level directory where your blog entries may be found
2084 @node Book, ConTeXt, Blosxom, Publishing Styles
2085 @comment node-name, next, previous, up
2086 @section Publishing entries into a compilation
2088 This publishing style is used to output ``books'' in LaTeX or PDF
2091 Each page will become a separate chapter in the book, unless the style
2092 keyword @option{:nochapters} is used, in which case they are all run
2093 together as if one giant chapter.
2095 One way of publishing a book is to make a project for it, add the
2096 project to @code{muse-project-alist}, and use the @code{book-pdf} style
2097 with a very specific @option{:include} value to specify some page whose
2098 contents will be checked for the values of @code{#title} and
2099 @code{#date}, and whose name will be used in the output file. Then to
2100 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
2101 @kbd{C-c C-p} to trigger the publishing process. An example
2102 @code{muse-project-alist} for this method follows.
2105 (setq muse-project-alist
2106 '(("MyNotes" (:nochapters t ; do automatically add chapters
2107 :book-chapter "Computer Science"
2109 :book-chapter "Mathematics"
2111 :book-chapter "Emacs"
2113 :book-end t ; the rest will not be placed in the book
2114 "~/Notes" ; so we can find the notes-anthology page
2116 :force-publish ("index")
2119 :include "/notes-anthology[^/]*$"
2120 :path "~/public_html/notes")
2121 ;; other publishing styles for each directory go here,
2126 In this example, there would be a file called
2127 @file{~/Notes/notes-anthology.muse}, which would contain just the
2128 following. The resulting book would be published to
2129 @file{~/public_html/notes/notes-anthology.pdf}.
2132 #title My Technology Ramblings
2135 Another way is to call the @code{muse-book-publish-project} function
2136 manually, with a custom project entry. An example of this may be found
2137 in John Wiegley's configuration file at
2138 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
2141 @subheading Styles provided
2145 @cindex publishing styles, book-latex
2147 Publish a book in LaTeX form. The header and footer are different than
2148 the normal LaTeX publishing mode.
2150 @cindex publishing styles, book-pdf
2152 Publish a book in PDF form. The header and footer are different than
2153 the normal PDF publishing mode.
2157 @subheading Options provided
2161 @item muse-book-before-publish-hook
2162 A hook run in the book buffer before it is marked up.
2164 @item muse-book-after-publish-hook
2165 A hook run in the book buffer after it is marked up.
2167 @item muse-book-latex-header
2168 Header used for publishing books to LaTeX.
2170 This may be text or a filename.
2172 @item muse-book-latex-footer
2173 Footer used for publishing books to LaTeX.
2175 This may be text or a filename.
2178 @node ConTeXt, DocBook, Book, Publishing Styles
2179 @comment node-name, next, previous, up
2180 @section Publishing ConTeXt documents
2182 This publishing style is capable of producing ConTeXt or PDF documents.
2184 If you wish to publish PDF documents based on ConTeXt, you will need to
2185 have it installed. For Debian and Ubuntu, this can be accomplished by
2186 installing the ``texlive'' package.
2188 @subheading Styles provided
2192 @cindex publishing styles, context
2194 Publish a ConTeXt document.
2196 @cindex publishing styles, context-pdf
2198 Publish a PDF document, using an external ConTeXt document conversion
2201 @cindex publishing styles, context-slides
2202 @item context-slides
2203 Produce slides from a ConTeXt document.
2205 Here is an example of a slide.
2210 [[Some-sort-of-cute-image.png]]
2215 - Another bullet point.
2222 @cindex publishing styles, context-slides-pdf
2223 @item context-slides-pdf
2224 Publish a PDF document of ConTeXt slides.
2228 @subheading Options provided
2232 @item muse-context-extension
2233 Default file extension for publishing ConTeXt files.
2235 @item muse-context-pdf-extension
2236 Default file extension for publishing ConTeXt files to PDF.
2238 @item muse-context-pdf-program
2239 The program that is called to generate PDF content from ConTeXt content.
2241 @item muse-context-pdf-cruft
2242 Extensions of files to remove after generating PDF output successfully.
2244 @item muse-context-header
2245 Header used for publishing ConTeXt files.
2247 This may be text or a filename.
2249 @item muse-context-footer
2250 Footer used for publishing ConTeXt files.
2252 This may be text or a filename.
2254 @item muse-context-markup-regexps
2255 List of markup regexps for identifying regions in a Muse page.
2257 For more on the structure of this list,
2258 @xref{muse-publish-markup-regexps}.
2260 @item muse-context-markup-functions
2261 An alist of style types to custom functions for that kind of text.
2263 For more on the structure of this list,
2264 @xref{muse-publish-markup-functions}.
2266 @item muse-context-markup-strings
2267 Strings used for marking up text.
2269 These cover the most basic kinds of markup, the handling of which
2270 differs little between the various styles.
2272 @item muse-context-slides-header
2273 Header for publishing a presentation (slides) using ConTeXt.
2275 Any of the predefined modules, which are available in the
2276 tex/context/base directory, can be used by writing a "module" directive
2277 at the top of the Muse file; if no such directive is provided, module
2278 pre-01 is used. Alternatively, you can use your own style ("mystyle",
2279 in this example) by replacing "\usemodule[]" with "\input mystyle".
2281 This may be text or a filename.
2283 @item muse-context-slides-markup-strings
2284 Strings used for marking up text in ConTeXt slides.
2286 @item muse-context-markup-specials-document
2287 A table of characters which must be represented specially.
2288 These are applied to the entire document, sans already-escaped
2291 @item muse-context-markup-specials-example
2292 A table of characters which must be represented specially.
2293 These are applied to @verb{|example>|} regions.
2295 With the default interpretation of @verb{|<example>|} regions, no
2296 specials need to be escaped.
2298 @item muse-context-markup-specials-literal
2299 A table of characters which must be represented specially.
2300 This applies to =monospaced text= and @verb{|<code>|} regions.
2302 @item muse-context-markup-specials-url
2303 A table of characters which must be represented specially.
2304 These are applied to URLs.
2306 @item muse-context-markup-specials-image
2307 A table of characters which must be represented specially.
2308 These are applied to image filenames.
2310 @item muse-context-permit-contents-tag
2311 If nil, ignore @verb{|<contents>|} tags. Otherwise, insert table of
2314 Most of the time, it is best to have a table of contents on the
2315 first page, with a new page immediately following. To make this
2316 work with documents published in both HTML and ConTeXt, we need to
2317 ignore the @verb{|<contents>|} tag.
2319 If you don't agree with this, then set this option to non-nil,
2320 and it will do what you expect.
2324 @node DocBook, HTML, ConTeXt, Publishing Styles
2325 @comment node-name, next, previous, up
2326 @section Publishing in DocBook XML form
2328 This publishing style is used to generate DocBook XML files.
2330 @subheading Styles provided
2334 @cindex publishing styles, docbook
2336 Publish a file in Docbook form.
2340 @subheading Options provided
2342 This publishing style uses the same options for markup up special
2343 characters as the ``xml'' publishing style. @xref{XML}, for details.
2347 @item muse-docbook-extension
2348 Default file extension for publishing DocBook XML files.
2350 @item muse-docbook-header
2351 Header used for publishing DocBook XML files.
2353 This may be text or a filename.
2355 @item muse-docbook-footer
2356 Footer used for publishing DocBook XML files.
2358 This may be text or a filename.
2360 @item muse-docbook-markup-regexps
2361 List of markup rules for publishing a Muse page to DocBook XML.
2363 @item muse-docbook-markup-functions
2364 An alist of style types to custom functions for that kind of text.
2366 @item muse-docbook-markup-strings
2367 Strings used for marking up text.
2369 These cover the most basic kinds of markup, the handling of which
2370 differs little between the various styles.
2372 @item muse-docbook-encoding-default
2373 The default Emacs buffer encoding to use in published files.
2374 This will be used if no special characters are found.
2376 @item muse-docbook-charset-default
2377 The default DocBook XML charset to use if no translation is
2378 found in @code{muse-xml-encoding-map}.
2382 @node HTML, Journal, DocBook, Publishing Styles
2383 @comment node-name, next, previous, up
2384 @section Publishing in HTML or XHTML form
2386 This publishing style is capable of producing HTML or XHTML documents.
2388 @subheading Styles provided
2392 @cindex publishing styles, html
2394 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
2397 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
2401 @subheading Options provided
2403 If an HTML option does not have a corresponding XHTML option, it will
2404 be used for both of these publishing styles.
2406 These publishing styles use the same options for markup up special
2407 characters as the ``xml'' publishing style. @xref{XML}, for details.
2411 @item muse-html-extension
2412 Default file extension for publishing HTML files.
2414 @item muse-xhtml-extension
2415 Default file extension for publishing XHTML files.
2417 @item muse-html-style-sheet
2418 Store your stylesheet definitions here.
2420 This is used in @code{muse-html-header}. You can put raw CSS in here or
2421 a @verb{|<link>|} tag to an external stylesheet. This text may contain
2422 @verb{|<lisp>|} markup tags.
2424 If you are publishing to XHTML, then customize the
2425 @code{muse-xhtml-style-sheet} option instead.
2427 @item muse-xhtml-style-sheet
2428 Store your stylesheet definitions here.
2430 This is used in @code{muse-xhtml-header}. You can put raw CSS in here
2431 or a @verb{|<link>|} tag to an external stylesheet. This text may
2432 contain @verb{|<lisp>|} markup tags.
2434 @item muse-html-header
2435 Header used for publishing HTML files.
2437 This may be text or a filename.
2439 @item muse-html-footer
2440 Footer used for publishing HTML files.
2442 This may be text or a filename.
2444 @item muse-xhtml-header
2445 Header used for publishing XHTML files.
2447 This may be text or a filename.
2449 @item muse-xhtml-footer
2450 Footer used for publishing XHTML files.
2452 This may be text or a filename.
2454 @item muse-html-anchor-on-word
2455 When true, anchors surround the closest word.
2457 This allows you to select them in a browser (i.e. for pasting), but has
2458 the side-effect of marking up headers in multiple colors if your header
2459 style is different from your link style.
2461 @item muse-html-table-attributes
2462 The attribute to be used with HTML @verb{|<table>|} tags.
2464 If you want to make more-complicated tables in HTML, surround the HTML
2465 with the @verb{|literal|} tag, so that it does not get escaped.
2467 @item muse-html-markup-regexps
2468 List of markup rules for publishing a Muse page to HTML.
2470 @item muse-html-markup-functions
2471 An alist of style types to custom functions for that kind of text.
2473 @item muse-html-markup-strings
2474 Strings used for marking up text as HTML.
2476 These cover the most basic kinds of markup, the handling of which
2477 differs little between the various styles.
2479 @item muse-xhtml-markup-strings
2480 Strings used for marking up text as XHTML.
2482 These cover the most basic kinds of markup, the handling of which
2483 differs little between the various styles.
2485 @item muse-html-markup-tags
2486 A list of tag specifications, for specially marking up HTML.
2487 @xref{muse-publish-markup-tags}, for more information.
2489 @item muse-html-meta-http-equiv
2490 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
2492 @item muse-html-meta-content-type
2493 The content type used for the HTML @verb{|<meta>|} tag.
2495 If you are striving for XHTML 1.1 compliance, you may want to change
2496 this to ``application/xhtml+xml''.
2498 @item muse-html-meta-content-encoding
2499 The charset to append to the HTML @verb{|<meta>|} tag.
2501 If set to the symbol 'detect, use @code{muse-xml-encoding-map} to try
2502 and determine the HTML charset from emacs's coding. If set to a string,
2503 this string will be used to force a particular charset.
2505 @item muse-html-charset-default
2506 The default HTML meta charset to use if no translation is found in
2507 @code{muse-xml-encoding-map}.
2509 @item muse-html-encoding-default
2510 The default Emacs buffer encoding to use in published files.
2511 This will be used if no special characters are found.
2515 @node Journal, LaTeX, HTML, Publishing Styles
2516 @comment node-name, next, previous, up
2517 @section Keeping a journal or blog
2519 @cindex blog, journal style
2521 The module facilitates the keeping and publication of a journal. When
2522 publishing to HTML, it assumes the form of a web log, or blog.
2524 The input format for each entry is as follows.
2527 * 20040317: Title of entry
2532 "You know who you are. It comes down to a simple gut check: You
2533 either love what you do or you don't. Period." -- P. Bronson
2537 The "qotd", or Quote of the Day, is entirely optional. When generated
2538 to HTML, this entry is rendered as the following.
2542 <div class="entry-qotd">
2543 <h3>Quote of the Day:</h3>
2544 <p>"You know who you are. It comes down to a simple gut
2545 check: You either love what you do or you don't. Period."
2548 <div class="entry-body">
2549 <div class="entry-head">
2550 <div class="entry-date">
2551 <span class="date">March 17, 2004</span>
2553 <div class="entry-title">
2554 <h2>Title of entry</h2>
2557 <div class="entry-text">
2558 <p>Text for the entry.</p>
2564 The plurality of "div" tags makes it possible to display the entries in
2565 any form you wish, using a CSS style.
2567 Also, an .RDF file can be generated from your journal by publishing it
2568 with the "rdf" style. It uses the first two sentences of the first
2569 paragraph of each entry as its "description", and auto-generates tags
2570 for linking to the various entries.
2572 @subheading muse-project-alist considerations
2574 If you wish to publish an RDF or RSS feed, it is important to include
2575 the @option{:base-url} attribute in your @code{muse-project-alist} entry
2576 for your Journal projects. An example follows.
2579 (setq muse-project-alist
2580 '(("Journal" ("~/Journal/"
2582 (:base "journal-rss"
2583 :base-url "http://example.org/journal/"
2584 :path "~/public_html/journal"))))
2587 @subheading Styles provided
2591 @cindex publishing styles, journal-html
2593 Publish journal entries as an HTML document.
2595 @cindex publishing styles, journal-xhtml
2597 Publish journal entries as an XHTML document.
2599 @cindex publishing styles, journal-latex
2601 Publish journal entries as a LaTeX document.
2603 @cindex publishing styles, journal-pdf
2605 Publish journal entries as a PDF document.
2607 @cindex publishing styles, journal-book-latex
2608 @item journal-book-latex
2609 Publish journal entries as a LaTeX book.
2611 @cindex publishing styles, journal-book-pdf
2612 @item journal-book-pdf
2613 Publish journal entries as a PDF book.
2615 @cindex publishing styles, journal-rdf
2616 @cindex publishing styles, RSS 1.0
2618 Publish journal entries as an RDF file (RSS 1.0).
2620 @cindex publishing styles, journal-rss
2621 @cindex publishing styles, RSS 2.0
2623 Publish journal entries as an RSS file (RSS 2.0).
2625 @cindex publishing styles, journal-rss-entry
2626 @item journal-rss-entry
2627 Used internally by @code{journal-rss} and @code{journal-rdf} for
2628 publishing individual entries.
2632 @subheading Options provided
2636 @item muse-journal-heading-regexp
2637 A regexp that matches a journal heading.
2639 Paren group 1 is the ISO date, group 2 is the optional category, and
2640 group 3 is the optional heading for the entry.
2642 @item muse-journal-date-format
2643 Date format to use for journal entries.
2645 @item muse-journal-html-heading-regexp
2646 A regexp that matches a journal heading from an HTML document.
2648 Paren group 1 is the ISO date, group 2 is the optional category, and
2649 group 3 is the optional heading for the entry.
2651 @item muse-journal-html-entry-template
2652 Template used to publish individual journal entries as HTML.
2654 This may be text or a filename.
2656 @item muse-journal-latex-section
2657 Template used to publish a LaTeX section.
2659 @item muse-journal-latex-subsection
2660 Template used to publish a LaTeX subsection.
2662 @item muse-journal-markup-tags
2663 A list of tag specifications, for specially marking up Journal entries.
2665 @xref{muse-publish-markup-tags}, for more information.
2667 This is used by @code{journal-latex} and its related styles, as well as
2668 the @code{journal-rss-entry} style, which both @code{journal-rdf} and
2669 @code{journal-rss} use.
2671 @item muse-journal-rdf-extension
2672 Default file extension for publishing RDF (RSS 1.0) files.
2674 @item muse-journal-rdf-base-url
2675 The base URL of the website referenced by the RDF file.
2677 @item muse-journal-rdf-header
2678 Header used for publishing RDF (RSS 1.0) files.
2680 This may be text or a filename.
2682 @item muse-journal-rdf-footer
2683 Footer used for publishing RDF (RSS 1.0) files.
2685 This may be text or a filename.
2687 @item muse-journal-rdf-date-format
2688 Date format to use for RDF entries.
2690 @item muse-journal-rdf-entry-template
2691 Template used to publish individual journal entries as RDF.
2693 This may be text or a filename.
2695 @item muse-journal-rdf-summarize-entries
2696 If non-nil, include only summaries in the RDF file, not the full data.
2698 The default is nil, because this annoys some subscribers.
2700 @item muse-journal-rss-heading-regexp
2701 A regexp that matches a journal heading from an HTML document.
2703 Paren group 1 is the ISO date, group 2 is the optional category,
2704 and group 3 is the optional heading for the entry.
2706 @item muse-journal-rss-extension
2707 Default file extension for publishing RSS 2.0 files.
2709 @item muse-journal-rss-base-url
2710 The base URL of the website referenced by the RSS file.
2712 @item muse-journal-rss-header
2713 Header used for publishing RSS 2.0 files.
2715 This may be text or a filename.
2717 @item muse-journal-rss-footer
2718 Footer used for publishing RSS 2.0 files.
2720 This may be text or a filename.
2722 @item muse-journal-rss-date-format
2723 Date format to use for RSS 2.0 entries.
2725 @item muse-journal-rss-entry-template
2726 Template used to publish individual journal entries as RSS 2.0.
2728 This may be text or a filename.
2730 @item muse-journal-rss-enclosure-types-alist
2731 File types that are accepted as RSS enclosures.
2733 This is an alist that maps file extension to content type.
2735 Useful for podcasting.
2737 @item muse-journal-rss-summarize-entries
2738 If non-nil, include only summaries in the RSS file, not the full data.
2740 The default is nil, because this annoys some subscribers.
2742 @item muse-journal-rss-markup-regexps
2743 List of markup rules for publishing a Muse journal page to RSS.
2745 For more information on the structure of this list,
2746 @xref{muse-publish-markup-regexps}.
2748 @item muse-journal-rss-markup-functions
2749 An alist of style types to custom functions for that kind of text.
2751 For more on the structure of this list,
2752 @xref{muse-publish-markup-functions}.
2756 @node LaTeX, Poem, Journal, Publishing Styles
2757 @comment node-name, next, previous, up
2758 @section Publishing LaTeX documents
2760 This publishing style is capable of producing LaTeX or PDF documents.
2762 If you wish to publish PDF documents, you will need to have a good LaTeX
2763 installation. For Debian and Ubuntu, this can be accomplished by
2764 installing the ``tetex-bin'' and ``tetex-extra'' packages. TeX fonts
2767 If your LaTeX installation has the file @file{grffile.sty}, which may be
2768 found in the @file{texlive-latex-recommended} package for Debian and
2769 Ubuntu, then consider using it by adding the following to your header
2770 file. This allows spaces in filenames to work.
2773 \usepackage@{grffile@}
2776 @subheading Styles provided
2780 @cindex publishing styles, latex
2782 Publish a LaTeX document.
2784 @cindex publishing styles, pdf
2786 Publish a PDF document, using an external LaTeX document conversion
2789 @cindex publishing styles, latexcjk
2791 Publish a LaTeX document with CJK (Chinese) encodings.
2793 @cindex publishing styles, pdfcjk
2795 Publish a PDF document with CJK (Chinese) encodings, using an external
2796 LaTeX document conversion tool.
2798 @cindex publishing styles, slides
2800 Publish a LaTeX document that uses the Beamer extension. This is
2801 suitable for producing slides.
2803 Here is an example of a slide.
2806 <slide title="First Slide">
2807 Everything between the slide tags composes this slide.
2809 [[Some-sort-of-cute-image.png]]
2812 - Another bullet point.
2816 @cindex publishing styles, slides-pdf
2818 Publish a PDF document of slides, using the Beamer extension.
2820 @cindex publishing styles, lecture-notes
2822 Publish a LaTeX document that uses the Beamer extension. This is
2823 suitable for producing lecture notes.
2825 This can also use the @verb{|<slide>|} tag.
2827 @cindex publishing styles, lecture-notes-pdf
2828 @item lecture-notes-pdf
2829 Publish a PDF document of lecture notes, using the Beamer extension.
2833 @subheading Options provided
2837 @item muse-latex-extension
2838 Default file extension for publishing LaTeX files.
2840 @item muse-latex-pdf-extension
2841 Default file extension for publishing LaTeX files to PDF.
2843 @item muse-latex-pdf-program
2844 The program that is called to generate PDF content from LaTeX content.
2846 @item muse-latex-pdf-cruft
2847 Extensions of files to remove after generating PDF output successfully.
2849 @item muse-latex-header
2850 Header used for publishing LaTeX files.
2852 This may be text or a filename.
2854 @item muse-latex-footer
2855 Footer used for publishing LaTeX files.
2857 This may be text or a filename.
2859 @item muse-latexcjk-header
2860 Header used for publishing LaTeX files (CJK).
2862 This may be text or a filename.
2864 @item muse-latexcjk-footer
2865 Footer used for publishing LaTeX files (CJK).
2867 This may be text or a filename.
2869 @item muse-latex-slides-header
2870 Header for publishing of slides using LaTeX.
2872 This may be text or a filename.
2874 You must have the Beamer extension for LaTeX installed for this to work.
2876 @item muse-latex-lecture-notes-header
2877 Header publishing of lecture notes using LaTeX.
2879 This may be text or a filename.
2881 You must have the Beamer extension for LaTeX installed for this to work.
2883 @item muse-latex-markup-regexps
2884 List of markup regexps for identifying regions in a Muse page.
2886 For more on the structure of this list,
2887 @xref{muse-publish-markup-regexps}.
2889 @item muse-latex-markup-functions
2890 An alist of style types to custom functions for that kind of text.
2892 For more on the structure of this list,
2893 @xref{muse-publish-markup-functions}.
2895 @item muse-latex-markup-strings
2896 Strings used for marking up text.
2898 These cover the most basic kinds of markup, the handling of which
2899 differs little between the various styles.
2901 @item muse-latex-slides-markup-tags
2902 A list of tag specifications, for specially marking up LaTeX slides.
2904 @item muse-latexcjk-encoding-map
2905 An alist mapping emacs coding systems to appropriate CJK codings.
2906 Use the base name of the coding system (ie, without the -unix).
2908 @item muse-latexcjk-encoding-default
2909 The default Emacs buffer encoding to use in published files.
2911 This will be used if no special characters are found.
2913 @item muse-latex-markup-specials-document
2914 A table of characters which must be represented specially.
2915 These are applied to the entire document, sans already-escaped
2918 @item muse-latex-markup-specials-example
2919 A table of characters which must be represented specially.
2920 These are applied to @verb{|example>|} regions.
2922 With the default interpretation of @verb{|<example>|} regions, no
2923 specials need to be escaped.
2925 @item muse-latex-markup-specials-literal
2926 A table of characters which must be represented specially.
2927 This applies to =monospaced text= and @verb{|<code>|} regions.
2929 @item muse-latex-markup-specials-url
2930 A table of characters which must be represented specially.
2931 These are applied to URLs.
2933 @item muse-latex-markup-specials-image
2934 A table of characters which must be represented specially.
2935 These are applied to image filenames.
2937 @item muse-latex-permit-contents-tag
2938 If nil, ignore @verb{|<contents>|} tags. Otherwise, insert table of
2941 Most of the time, it is best to have a table of contents on the
2942 first page, with a new page immediately following. To make this
2943 work with documents published in both HTML and LaTeX, we need to
2944 ignore the @verb{|<contents>|} tag.
2946 If you don't agree with this, then set this option to non-nil,
2947 and it will do what you expect.
2951 @node Poem, Texinfo, LaTeX, Publishing Styles
2952 @comment node-name, next, previous, up
2953 @section Publish a poem to LaTeX or PDF
2955 The @code{muse-poem} module makes it easy to attractively publish and
2956 reference poems in the following format, using the "memoir" module for
2957 LaTeX publishing. It will also markup poems for every other output
2958 style, though none are nearly as pretty.
2967 Annotations, history, notes, etc.
2970 Once a poem is written in this format, just publish it to PDF using the
2971 @code{poem-pdf} style. To make an inlined reference to a poem that
2972 you've written -- for example, from a blog page -- there is a "poem" tag
2973 defined by this module.
2976 <poem title="name.of.poem.page">
2979 Let's assume the template above was called @file{name.of.poem.page};
2980 then the above tag would result in this inclusion.
2988 John Wiegley uses this module for publishing all of the poems on his
2989 website, which are at
2990 @uref{http://www.newartisans.com/johnw/poems.html}.
2992 @subheading Styles provided
2996 @cindex publishing styles, poem-latex
2998 Publish a poem in LaTeX form.
3000 @cindex publishing styles, poem-pdf
3002 Publish a poem to a PDF document.
3004 @cindex publishing styles, chapbook-latex
3005 @item chapbook-latex
3006 Publish a book of poems in LaTeX form.
3008 @cindex publishing styles, chapbook-pdf
3010 Publish a book of poems to a PDF document.
3014 @subheading Options provided
3018 @item muse-poem-latex-header
3019 Header used for publishing LaTeX poems.
3021 This may be text or a filename.
3023 @item muse-poem-latex-footer
3024 Footer used for publishing LaTeX files.
3026 This may be text or a filename.
3028 @item muse-poem-markup-strings
3029 Strings used for marking up poems.
3031 These cover the most basic kinds of markup, the handling of which
3032 differs little between the various styles.
3034 @item muse-chapbook-latex-header
3035 Header used for publishing a book of poems in LaTeX form.
3037 This may be text or a filename.
3039 @item muse-chapbook-latex-footer
3040 Footer used for publishing a book of poems in LaTeX form.
3042 This may be text or a filename.
3044 @item muse-poem-chapbook-strings
3045 Strings used for marking up books of poems.
3047 These cover the most basic kinds of markup, the handling of which
3048 differs little between the various styles.
3052 @node Texinfo, XML, Poem, Publishing Styles
3053 @comment node-name, next, previous, up
3054 @section Publish entries to Texinfo format or PDF
3056 Rules for publishing a Muse file as a Texinfo article.
3058 @subheading Styles provided
3062 @cindex publishing styles, texi
3064 Publish a file in Texinfo form.
3066 @cindex publishing styles, texi
3068 Generate an Info file from a Muse file.
3070 @cindex publishing styles, info-pdf
3072 Publish a file in PDF form.
3076 @subheading Options provided
3080 @item muse-texinfo-process-natively
3081 If non-nil, use the Emacs `texinfmt' module to make Info files.
3083 @item muse-texinfo-extension
3084 Default file extension for publishing Texinfo files.
3086 @item muse-texinfo-info-extension
3087 Default file extension for publishing Info files.
3089 @item muse-texinfo-pdf-extension
3090 Default file extension for publishing PDF files.
3092 @item muse-texinfo-header
3093 Text to prepend to a Muse page being published as Texinfo.
3095 This may be text or a filename.
3096 It may contain @verb{|<lisp>|} markup tags.
3098 @item muse-texinfo-footer
3099 Text to append to a Muse page being published as Texinfo.
3101 This may be text or a filename.
3102 It may contain @verb{|<lisp>|} markup tags.
3104 @item muse-texinfo-markup-regexps
3105 List of markup rules for publishing a Muse page to Texinfo.
3107 For more on the structure of this list,
3108 @xref{muse-publish-markup-regexps}.
3110 @item muse-texinfo-markup-functions
3111 An alist of style types to custom functions for that kind of text.
3113 For more on the structure of this list,
3114 @xref{muse-publish-markup-functions}.
3116 @item muse-texinfo-markup-strings
3117 Strings used for marking up text.
3119 These cover the most basic kinds of markup, the handling of which
3120 differs little between the various styles.
3122 @item muse-texinfo-markup-specials
3123 A table of characters which must be represented specially.
3125 @item muse-texinfo-markup-specials
3126 A table of characters which must be represented specially.
3127 These are applied to URLs.
3131 @node XML, , Texinfo, Publishing Styles
3132 @comment node-name, next, previous, up
3133 @section Publish entries to XML
3135 Muse is capable of publishing XML documents, with the help of the
3136 @file{muse-xml.el} module.
3138 A RelaxNG schema is available as part of the Muse distribution in the
3139 @file{etc/muse.rnc} file.
3141 @subheading Styles provided
3145 @cindex publishing styles, xml
3147 Publish a file in XML form.
3151 @subheading Options provided
3155 @cindex muse-xml-encoding-map
3156 @item muse-xml-encoding-map
3157 An alist mapping Emacs coding systems to appropriate XML charsets.
3158 Use the base name of the coding system (i.e. without the -unix).
3160 @item muse-xml-markup-specials
3161 A table of characters which must be represented specially in all
3162 XML-like markup formats.
3164 @item muse-xml-markup-specials-url-extra
3165 A table of characters which must be represented specially in all
3166 XML-like markup formats.
3168 These are extra characters that are escaped within URLs.
3170 @item muse-xml-extension
3171 Default file extension used for publishing XML files.
3173 @item muse-xml-header
3174 Header used for publishing XML files.
3176 This may be text or a filename.
3178 @item muse-xml-footer
3179 Footer used for publishing XML files.
3181 This may be text or a filename.
3183 @item muse-xml-markup-regexps
3184 List of markup rules for publishing a Muse page to XML.
3186 For more on the structure of this list,
3187 @xref{muse-publish-markup-regexps}.
3189 @item muse-xml-markup-functions
3190 An alist of style types to custom functions for that kind of text.
3192 For more on the structure of this list,
3193 @xref{muse-publish-markup-functions}.
3195 @item muse-xml-markup-strings
3196 Strings used for marking up text.
3198 These cover the most basic kinds of markup, the handling of which
3199 differs little between the various styles.
3201 @item muse-xml-encoding-default
3202 The default Emacs buffer encoding to use in published files.
3204 This will be used if no special characters are found.
3206 @item muse-xml-charset-default
3207 The default XML charset to use if no translation is found in
3208 @code{muse-xml-encoding-map}.
3213 @node Extending Muse, Miscellaneous, Publishing Styles, Top
3214 @comment node-name, next, previous, up
3215 @chapter Making your own publishing styles
3218 * Common Elements:: Common functionality shared by styles.
3219 * Deriving Styles:: Deriving a new style from an existing
3223 @node Common Elements, Deriving Styles, , Extending Muse
3224 @comment node-name, next, previous, up
3225 @section Common functionality shared by styles
3226 @cindex publishing styles, common
3229 * Markup Functions:: Specifying functions to mark up text.
3230 * Markup Regexps:: Markup rules for publishing.
3231 * Markup Strings:: Strings specific to a publishing style.
3232 * Markup Tags:: Tag specifications for special markup.
3233 * Style Elements:: Parameters used for defining styles.
3236 @node Markup Functions, Markup Regexps, , Common Elements
3237 @comment node-name, next, previous, up
3238 @subsection Specifying functions to mark up text
3239 @cindex publishing, markup functions
3241 @anchor{muse-publish-markup-functions}
3242 @code{muse-publish-markup-functions}
3244 An alist of style types to custom functions for that kind of text.
3246 This is used by publishing styles to attempt to minimize the amount of
3247 custom regexps that each has to define. @file{muse-publish} provides
3248 rules for the most common types of markup.
3250 Each member of the list is of the following form.
3258 Describes the type of text to associate with this rule.
3259 @code{muse-publish-markup-regexps} maps regexps to these symbols.
3262 Function to use to mark up this kind of rule if no suitable function is
3263 found through the @option{:functions} tag of the current style.
3266 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
3267 @comment node-name, next, previous, up
3268 @subsection Markup rules for publishing
3269 @cindex publishing, markup regexps
3270 @cindex publishing, rules
3272 @anchor{muse-publish-markup-regexps}
3273 @code{muse-publish-markup-regexps}
3275 List of markup rules for publishing a page with Muse.
3277 The rules given in this variable are invoked first, followed by whatever
3278 rules are specified by the current style.
3280 Each member of the list is either a function, or a list of the following
3284 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
3289 A regular expression, or symbol whose value is a regular expression,
3290 which is searched for using `re-search-forward'.
3292 @item TEXT-BEGIN-GROUP
3293 The matching group within that regexp which denotes the beginning of the
3294 actual text to be marked up.
3296 @item REPLACEMENT-TEXT
3297 A string that will be passed to `replace-match'.
3299 If it is not a string, but a function, it will be called to determine
3300 what the replacement text should be (it must return a string). If it is
3301 a symbol, the value of that symbol should be a string.
3304 The replacements are done in order, one rule at a time. Writing
3305 the regular expressions can be a tricky business. Note that case
3306 is never ignored. `case-fold-search' is always bound to nil
3307 while processing the markup rules.
3309 @subheading Publishing order
3311 This is the order that the publishing rules are consulted, by default.
3312 This may be changed by customizing @code{muse-publish-markup-regexps}.
3316 @item trailing and leading whitespace
3317 Remove trailing and leading whitespace from a file.
3322 This is only recognized at the beginning of a file.
3325 @samp{; a commented line}
3333 @item explicit links
3334 Prevent emphasis characters in explicit links from being marked up.
3336 Don't actually publish them here, just add a special no-emphasis text
3340 Whitespace-delimited word, possibly with emphasis characters
3342 This function is responsible for marking up emphasis and escaping some
3348 Outline-mode style headings.
3353 These are ellipses with a dot at end.
3363 Horizontal rule or section separator.
3365 @item no-break-space
3368 Prevent lines from being split before or after these characters.
3373 beginning of footnotes section
3378 Footnote definition or reference. If at beginning of line, it is a
3393 Numbered list, item list, or term definition list.
3397 @file{table.el} style tables
3400 @samp{table | cells}
3402 Muse tables or orgtbl-mode style tables.
3405 spaces before beginning of text
3421 @samp{[[explicit][links]]}
3424 @samp{http://example.com/}
3427 @samp{bare-email@@example.com}
3431 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
3432 @comment node-name, next, previous, up
3433 @subsection Strings specific to a publishing style
3434 @cindex publishing, markup strings
3436 @dfn{Markup strings} are strings used for marking up text for a
3439 These cover the most basic kinds of markup, the handling of which
3440 differs little between the various styles.
3442 @subheading Available markup strings
3446 @item image-with-desc
3447 An image and a description.
3449 Argument 1: image without extension. Argument 2: image extension.
3450 Argument 3: description.
3455 Argument 1: image without extension. Argument 2: image extension.
3458 An image with a link around it.
3460 Argument 1: link. Argument 2: image without extension.
3461 Argument 3: image extension.
3464 A reference to an anchor on the current page.
3466 Argument 1: anchor name. Argument 2: description if one exists, or the
3467 original link otherwise.
3470 A URL without a description.
3475 A link to a Muse page with a description.
3477 Argument 1: link. Argument 2: description if one exists, or the
3478 original link otherwise.
3480 @item link-and-anchor
3481 A link to a Muse page with an anchor, and a description.
3483 Argument 1: link. Argument 2: anchor name.
3484 Argument 3: description if one exists, or the original link otherwise.
3485 Argument 4: link without an extension.
3488 A link to an email address.
3490 Argument 1: email address. Argument 2: email address.
3495 Argument 1: name of anchor.
3500 Argument 1: Initial whitespace. Argument 2: Terminating whitespace.
3503 Beginning of a comment.
3509 A horizontal line or space.
3511 @item no-break-space
3512 A space that separates two words which are not to be separated.
3515 Beginning of footnote.
3521 Mark a reference for the current footnote.
3523 Argument 1: number of this footnote.
3525 @item footnotemark-end
3526 End of a reference for the current footnote.
3529 Indicate the text of the current footnote.
3531 Argument 1: number of this footnote.
3533 @item footnotetext-end
3534 End of a footnote text line.
3537 Text used to replace ``Footnotes:'' line.
3546 Beginning of a part indicator line. This is used by book publishing.
3549 End of a part indicator line. This is used by book publishing.
3552 Beginning of a chapter indicator line. This is used by book publishing.
3555 End of a chapter indicator line. This is used by book publishing.
3558 Beginning of level 1 section indicator line.
3560 Argument 1: level of section; always 1.
3563 End of level 1 section indicator line.
3565 Argument 1: level of section; always 1.
3568 Beginning of level 2 section indicator line.
3570 Argument 1: level of section; always 2.
3572 @item subsection-end
3573 End of level 2 section indicator line.
3575 Argument 1: level of section; always 2.
3578 Beginning of level 3 section indicator line.
3580 Argument 1: level of section; always 3.
3582 @item subsubsection-end
3583 End of level 3 section indicator line.
3585 Argument 1: level of section; always 3.
3588 Beginning of section indicator line, where level is greater than 3.
3590 Argument 1: level of section.
3592 @item section-other-end
3593 End of section indicator line, where level is greater than 3.
3595 Argument 1: level of section.
3597 @item begin-underline
3598 Beginning of underlined text.
3601 End of underlined text.
3604 Beginning of verbatim text. This includes @verb{|<code>|} tags and
3608 End of verbatim text. This includes @verb{|<code>|} tags and =teletype
3612 Beginning of the first level of emphasized text.
3615 End of the first level of emphasized text.
3617 @item begin-more-emph
3618 Beginning of the second level of emphasized text.
3621 End of the second level of emphasized text.
3623 @item begin-most-emph
3624 Beginning of the third (and final) level of emphasized text.
3627 End of the third (and final) level of emphasized text.
3630 Beginning of verse text.
3633 String used to each space that is further indented than the beginning of
3636 @item begin-verse-line
3637 Beginning of a line of verse.
3639 @item empty-verse-line
3640 End of a line of verse.
3642 @item begin-last-stanza-line
3643 Beginning of the last line of a verse stanza.
3645 @item end-last-stanza-line
3646 End of the last line of a verse stanza.
3652 Beginning of an example region. To make use of this, an
3653 @samp{<example>} tag is needed.
3656 End of an example region. To make use of this, an @samp{</example>} tag
3660 Begin a centered line.
3663 End a centered line.
3666 Begin a quoted region.
3669 End a quoted region.
3671 @item begin-quote-item
3672 Begin a quote paragraph.
3674 @item end-quote-item
3675 End a quote paragraph.
3678 Begin an unordered list.
3681 End an unordered list.
3683 @item begin-uli-item
3684 Begin an unordered list item.
3687 End an unordered list item.
3690 Begin an ordered list.
3693 End an ordered list.
3695 @item begin-oli-item
3696 Begin an ordered list item.
3699 End an ordered list item.
3702 Begin a definition list.
3705 End a definition list.
3708 Begin a definition list item.
3711 End a definition list item.
3714 Begin a definition list term.
3717 End a definition list term.
3720 Begin a definition list entry.
3723 End a definition list entry.
3731 @item begin-table-group
3732 Begin a table grouping.
3734 @item end-table-group
3735 End a table grouping.
3737 @item begin-table-row
3743 @item begin-table-entry
3744 Begin a table entry.
3746 @item end-table-entry
3751 @node Markup Tags, Style Elements, Markup Strings, Common Elements
3752 @comment node-name, next, previous, up
3753 @subsection Tag specifications for special markup
3754 @cindex publishing, markup tags
3756 @anchor{muse-publish-markup-tags}
3757 @code{muse-publish-markup-tags}
3759 A list of tag specifications, for specially marking up text.
3761 XML-style tags are the best way to add custom markup to Muse. This is
3762 easily accomplished by customizing this list of markup tags.
3764 For each entry, the name of the tag is given, whether it expects a
3765 closing tag and/or an optional set of attributes, whether it is
3766 nestable, and a function that performs whatever action is desired within
3767 the delimited region.
3769 The tags themselves are deleted during publishing, before the function
3770 is called. The function is called with three arguments, the beginning
3771 and end of the region surrounded by the tags. If properties are
3772 allowed, they are passed as a third argument in the form of an alist.
3773 The `end' argument to the function is always a marker.
3775 Point is always at the beginning of the region within the tags, when the
3776 function is called. Wherever point is when the function finishes is
3777 where tag markup will resume.
3779 These tag rules are processed once at the beginning of markup, and once
3780 at the end, to catch any tags which may have been inserted in-between.
3782 @node Style Elements, , Markup Tags, Common Elements
3783 @comment node-name, next, previous, up
3784 @subsection Parameters used for defining styles
3785 @cindex publishing, style elements
3787 Style elements are tags that define a style. Use
3788 @code{muse-define-style} to create a new style.
3791 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3794 @subheading Usable elements
3799 File extension to use for publishing files with this style.
3802 File extension to use for publishing links to Muse files with this
3806 File extension to use for publishing second-stage files with this style.
3808 For example, PDF publishing generates a LaTeX file first, then a PDF
3809 from that LaTeX file.
3812 List of markup rules for publishing a page with Muse.
3813 @xref{muse-publish-markup-regexps}.
3816 An alist of style types to custom functions for that kind of text.
3817 @xref{muse-publish-markup-functions}.
3820 Strings used for marking up text with this style.
3822 These cover the most basic kinds of markup, the handling of which
3823 differs little between the various styles.
3826 A list of tag specifications, used for handling extra tags.
3827 @xref{muse-publish-markup-tags}.
3830 A table of characters which must be represented specially.
3833 A function that is to be executed on the newly-created publishing buffer
3834 (or the current region) before any publishing occurs.
3836 This is used to set extra parameters that direct the publishing process.
3839 A function that is to be executed on the publishing buffer (or the
3840 current region) immediately after applying all of the markup regexps.
3842 This is used to fix the order of table elements (header, footer, body)
3846 A function that is to be executed on the publishing buffer after
3847 :before-end, and immediately after inserting the header and footer.
3849 This is used for generating the table of contents as well as setting the
3853 A function that is to be executed after saving the published file, but
3854 while still in its buffer.
3856 This is used for generating second-stage documents like PDF files from
3857 just-published LaTeX files.
3860 Header used for publishing files of this style.
3862 This may be a variable, text, or a filename. It is inserted at the
3863 beginning of a file, after evaluating the publishing markup.
3866 Footer used for publishing files of this style.
3868 This may be a variable, text, or a filename. It is inserted at the end
3869 of a file, after evaluating the publishing markup.
3872 Style sheet used for publishing files of this style.
3874 This may be a variable or text. It is used in the header of HTML and
3875 XHTML based publishing styles.
3878 The function used to browse the published result of files of this style.
3882 @node Deriving Styles, , Common Elements, Extending Muse
3883 @comment node-name, next, previous, up
3884 @section Deriving a new style from an existing one
3885 @cindex publishing styles, deriving
3887 To create a new style from an existing one, use @code{muse-derive-style}
3888 as follows. This is a good way to fix something you don't like about a
3889 particular publishing style, or to personalize it.
3892 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
3895 The derived name is a string defining the new style, such as "my-html".
3896 The base name must identify an existing style, such as "html" -- if you
3897 have loaded @file{muse-html}. The style parameters are the same as
3898 those used to create a style, except that they override whatever
3899 definitions exist in the base style. However, some definitions only
3900 partially override. The following parameters support partial
3903 @xref{Style Elements}, for a complete list of all parameters.
3908 If a markup function is not found in the derived style's function list,
3909 the base style's function list will be queried.
3912 All regexps in the current style and the base style(s) will be used.
3915 If a markup string is not found in the derived style's string list, the
3916 base style's string list will be queried.
3920 @node Miscellaneous, Getting Help and Reporting Bugs, Extending Muse, Top
3921 @comment node-name, next, previous, up
3922 @chapter Miscellaneous add-ons, like a minor mode
3925 * Muse List Edit Minor Mode:: Edit lists easily in other major modes.
3928 @node Muse List Edit Minor Mode, , , Miscellaneous
3929 @comment node-name, next, previous, up
3930 @section Edit lists easily in other major modes
3931 @cindex muse-list-edit-minor-mode
3933 @code{muse-list-edit-minor-mode} is meant to be used with other major
3934 modes, such as Message (for composing email) and debian-changelog-mode
3935 (for editing debian/changelog files).
3937 It implements practically perfect support for editing and filling lists.
3938 It can even handle nested lists. In addition to Muse-specific list
3939 items ("-", numbers, definition lists, footnotes), it can also handle
3940 items that begin with "*" or "+". Filling list items behaves in the
3941 same way that it does in Muse, regardless of whether filladapt is also
3942 enabled, which is the primary reason to use this tool.
3944 @subheading Installation
3946 To use it, add ``(require 'muse-mode)'' to your Emacs customization file
3947 and add the function @code{turn-on-muse-list-edit-minor-mode} to any
3948 mode hooks where you wish to enable this minor mode.
3950 @subheading Keybindings
3952 @code{muse-list-edit-minor-mode} uses the following keybindings.
3956 @item M-RET (`muse-l-e-m-m-insert-list-item')
3957 Insert a new list item at point, using the indentation level of the
3960 @item C-< (`muse-l-e-m-m-decrease-list-item-indent')
3961 Decrease indentation of the current list item.
3963 @item C-> (`muse-l-e-m-m-increase-list-item-indent')
3964 Increase indentation of the current list item.
3968 @subheading Functions
3970 @defun muse-list-edit-minor-mode
3971 This is a global minor mode for editing files with lists.
3972 It is meant to be used with other major modes, and not with Muse mode.
3974 Interactively, with no prefix argument, toggle the mode.
3975 With universal prefix @var{arg} turn mode on.
3976 With zero or negative @var{arg} turn mode off.
3978 This minor mode provides the Muse keybindings for editing lists,
3979 and support for filling lists properly.
3981 It recognizes not only Muse-style lists, which use the "-"
3982 character or numbers, but also lists that use asterisks or plus
3983 signs. This should make the minor mode generally useful.
3985 Definition lists and footnotes are also recognized.
3987 Note that list items may omit leading spaces, for compatibility
3988 with modes that set @code{left-margin}, such as
3989 @code{debian-changelog-mode}.
3992 @defun turn-on-muse-list-edit-minor-mode
3993 Unconditionally turn on Muse list edit minor mode.
3996 @defun turn-off-muse-list-edit-minor-mode
3997 Unconditionally turn off Muse list edit minor mode.
4000 @node Getting Help and Reporting Bugs, History, Miscellaneous, Top
4001 @comment node-name, next, previous, up
4002 @chapter Getting Help and Reporting Bugs
4003 @cindex help, getting
4004 @cindex bugs, reporting
4006 After you have read this guide, if you still have questions about
4007 Muse, or if you have bugs to report, there are several places you can
4013 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
4014 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
4018 @uref{http://mwolson.org/projects/EmacsMuse.html} is the web page
4019 that Michael Olson (the current maintainer) made for Muse.
4022 Muse has several different mailing lists.
4026 @item muse-el-announce
4027 Low-traffic list for Muse-related announcements.
4029 You can join this mailing list (@email{muse-el-announce@@gna.org})
4030 using the subscription form at
4031 @url{http://mail.gna.org/listinfo/muse-el-announce/}. This
4032 mailing list is also available via Gmane (@url{http://gmane.org/}). The
4033 group is called @samp{gmane.emacs.muse.announce}.
4035 @item muse-el-discuss
4036 Discussion, bugfixes, suggestions, tips, and the like for Muse.
4037 This mailing list also includes the content of muse-el-announce.
4039 You can join this mailing list (@email{muse-el-discuss@@gna.org})
4040 using the subscription form at
4041 @url{http://mail.gna.org/listinfo/muse-el-discuss/}. This mailing
4042 list is also available via Gmane with the identifier
4043 @samp{gmane.emacs.muse.general}.
4046 Log messages for commits made to Muse.
4048 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
4049 the subscription form at
4050 @url{http://mail.gna.org/listinfo/muse-el-logs/}. This mailing list
4051 is also available via Gmane with the identifier
4052 @samp{gmane.emacs.muse.scm}.
4054 @item muse-el-commits
4055 Generated bug reports for Emacs Muse. If you use our bug-tracker at
4056 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
4057 sent to this list automatically.
4059 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
4060 the subscription form at
4061 @url{http://mail.gna.org/listinfo/muse-el-commits/}. This mailing list
4062 is also available via Gmane with the identifier
4063 @samp{gmane.emacs.muse.cvs}.
4065 @item muse-el-internationalization
4066 Discussion of translation of the Muse website and documentation into
4069 You can join this mailing list
4070 (@email{muse-el-internationalization@@gna.org}) using the subscription
4071 form at @url{http://mail.gna.org/listinfo/internationalization/}. This
4072 mailing list is also available via Gmane with the identifier
4073 @samp{gmane.emacs.muse.internationalization}.
4078 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
4079 contributors are frequently around and willing to answer your
4080 questions. The @samp{#muse} channel is also available for
4081 Muse-specific help, and its current maintainer hangs out there.
4084 The maintainer of Emacs Muse, Michael Olson, may be contacted at
4085 @email{mwolson@@gnu.org}. He can be rather slow at answering email, so
4086 it is often better to use the muse-el-discuss mailing list.
4090 @node History, Contributors, Getting Help and Reporting Bugs, Top
4091 @comment node-name, next, previous, up
4092 @chapter History of This Document
4093 @cindex history, of Muse
4097 John Wiegley started Muse upon realizing that EmacsWiki had some serious
4098 limitations. Around February 2004, he started making "emacs-wiki version
4099 3.00 APLHA", which eventually became known as Muse.
4101 Most of those who frequent the emacs-wiki mailing list continued to use
4102 emacs-wiki, mainly because Planner hasn't been ported over to it.
4104 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
4105 John Wiegley's request.
4108 Michael Olson overhauled this document and added many new sections in
4109 preparation for the first release of Muse (3.01).
4113 @node Contributors, GNU Free Documentation License, History, Top
4114 @comment node-name, next, previous, up
4115 @chapter Contributors to This Documentation
4116 @cindex contributors
4118 The first draft of this document was taken from the emacs-wiki texinfo
4119 manual. Michael Olson adapted it for Muse and added most of its
4122 John Sullivan did a majority of the work on the emacs-wiki texinfo
4125 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
4126 emacs-wiki texinfo manual.
4129 @node GNU Free Documentation License, Concept Index, Contributors, Top
4130 @appendix GNU Free Documentation License
4131 @include doclicense.texi
4134 @node Concept Index, , GNU Free Documentation License, Top
4135 @comment node-name, next, previous, up