manual: Clarify what image-link, link, and link-and-anchor mean
[muse-el.git] / texi / muse.texi
blob1a318a68e53bcbaa1f501b6ebeb219e0eac09c34
1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename muse.info
4 @settitle Muse
5 @c %**end of header
7 @dircategory Emacs
8 @direntry
9 * Muse: (muse). Authoring and publishing environment for Emacs.
10 @end direntry
12 @syncodeindex fn cp
14 @copying
15 This manual is for Emacs Muse version 3.02.93 (3.03 RC3).
17 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc.
19 @quotation
20 Permission is granted to copy, distribute and/or modify this document
21 under the terms of the GNU Free Documentation License, Version 1.2 or
22 any later version published by the Free Software Foundation; with no
23 Invariant Sections, with the Front-Cover texts being ``A GNU
24 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
25 license is included in the section entitled ``GNU Free Documentation
26 License'' in this manual.
28 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
29 this GNU Manual, like GNU software.  Copies published by the Free
30 Software Foundation raise funds for GNU development.''
32 This document is part of a collection distributed under the GNU Free
33 Documentation License.  If you want to distribute this document
34 separately from the collection, you can do so by adding a copy of the
35 license to the document, as described in section 6 of the license.
37 All Emacs Lisp code contained in this document may be used, distributed,
38 and modified without restriction.
39 @end quotation
40 @end copying
42 @titlepage
43 @title Muse manual
44 @subtitle an authoring and publishing environment
45 @subtitle for GNU Emacs and XEmacs
47 @c The following two commands
48 @c start the copyright page.
49 @page
50 @vskip 0pt plus 1filll
51 @insertcopying
52 @end titlepage
54 @c So the toc is printed at the start
55 @contents
57 @ifnottex
58 @node Top, Preface, (dir), (dir)
59 @comment  node-name,  next,  previous,  up
60 @top Muse
62 @insertcopying
63 @end ifnottex
65 @menu
66 * Preface::                     About the documentation.
67 * Introduction::                What is Muse?
68 * Obtaining Muse::              How to get Muse releases and development
69                                   changes.
70 * Installation::                Compiling and installing Muse.
71 * Getting Started::             Settings for Muse.
72 * Projects::                    Creating and managing Muse projects.
73 * Keystroke Summary::           Keys used in Muse mode.
74 * Markup Rules::                Rules for using markup.
75 * Publishing Styles::           Publishing various types of documents.
76 * Extending Muse::              Making your own publishing styles.
77 * Getting Help and Reporting Bugs::  
78 * History::                     History of this document.
79 * Contributors::                Contributors to this documentation.
80 * GNU Free Documentation License::  The license for this documentation.
81 * Concept Index::               Search for terms.
83 @detailmenu
84  --- The Detailed Node Listing ---
86 How to Get Muse Releases and Development Changes
88 * Releases::                    Released versions of Muse.
89 * Development::                 Latest unreleased development changes.
91 Rules for Using Markup
93 * Paragraphs::                  Paragraphs: centering and quoting.
94 * Headings::                    Levels of headings.
95 * Directives::                  Directives at the beginning of a
96                                   document.
97 * Emphasizing Text::            Bold, italicized, and underlined text.
98 * Footnotes::                   Making notes to be shown at the end.
99 * Verse::                       Indicating poetic stanzas.
100 * Lists::                       Lists of items.
101 * Tables::                      Generation of data tables.
102 * Explicit Links::              Hyperlinks and email addresses with
103                                   descriptions.
104 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
105                                   links.
106 * Images::                      Publishing and displaying images.
107 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
108 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
109                                   for extensibility.
110 * Comments::                    Lines to omit from published output.
111 * Tag Summary::                 Tags that Muse recognizes.
113 Publishing Various Types of Documents
115 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
116 * Book::                        Publishing entries into a compilation.
117 * DocBook::                     Publishing in DocBook XML form.
118 * HTML::                        Publishing in HTML or XHTML form.
119 * Journal::                     Keeping a journal or blog.
120 * LaTeX::                       Publishing LaTeX documents.
121 * Poem::                        Publish a poem to LaTex or PDF.
122 * Texinfo::                     Publish entries to Texinfo format or PDF.
124 Integrating Muse and pyblosxom.cgi
126 * Blosxom Requirements::        Other tools needed for the Blosxom style.
127 * Blosxom Entries::             Format of a Blosxom entry and automation.
128 * Blosxom Options::             Blosxom styles and options provided.
130 Making your own publishing styles
132 * Common Elements::             Common functionality shared by styles.
133 * Deriving Styles::             Deriving a new style from an existing
134                                   one.
136 Common functionality shared by styles
138 * Markup Functions::            Specifying functions to marking up text.
139 * Markup Regexps::              Markup rules for publishing.
140 * Markup Strings::              Strings specific to a publishing style.
141 * Markup Tags::                 Tag specifications for special markup.
142 * Style Elements::              Parameters used for defining styles.
144 @end detailmenu
145 @end menu
147 @node Preface, Introduction, Top, Top
148 @comment  node-name,  next,  previous,  up
149 @chapter About the documentation
151 This document describes Muse, which was written by John Wiegley
152 and is now maintained by Michael Olson.  Several versions of it are
153 available on-line.
155 @itemize @bullet
156 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
157 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
158 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
159 @end itemize
161 @node Introduction, Obtaining Muse, Preface, Top
162 @comment  node-name,  next,  previous,  up
163 @chapter What is Muse?
165 Emacs Muse is an authoring and publishing environment for Emacs.  It
166 simplifies the process of writing documents and publishing them to
167 various output formats.
169 Muse consists of two main parts: an enhanced text-mode for authoring
170 documents and navigating within Muse projects, and a set of publishing
171 styles for generating different kinds of output.
173 This idea is not in any way new. Numerous systems exist -- even one
174 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
175 more modular environment, with a rather simple core, in which "styles"
176 are derived from to create new styles. Much of Muse's overall
177 functionality is optional. For example, you can use the publisher
178 without the major-mode, or the mode without doing any publishing; or if
179 you don't load the Texinfo or LaTeX modules, those styles won't be
180 available.
182 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
183 code has been restructured and rewritten, especially its publishing
184 functions. The focus in this revision is on the authoring and publishing
185 aspects, and the "wikiness" has been removed as a default behavior
186 (available in the optional @file{muse-wiki} module). CamelCase words are
187 no longer special by default.
189 @node Obtaining Muse, Installation, Introduction, Top
190 @comment  node-name,  next,  previous,  up
191 @chapter How to Get Muse Releases and Development Changes
193 @menu
194 * Releases::                    Released versions of Muse.
195 * Development::                 Latest unreleased development changes.
196 @end menu
198 @node Releases, Development, Obtaining Muse, Obtaining Muse
199 @comment  node-name,  next,  previous,  up
200 @section Released versions of Muse
202 Choose to install a release if you want to minimize risk.
204 Errors are corrected in development first.  User-visible changes will be
205 announced on the @email{muse-el-discuss@@gna.org} mailing list.
206 @xref{Getting Help and Reporting Bugs}.
208 @cindex releases, Debian package
209 @cindex Debian package for Muse
210 Debian and Ubuntu users can get Muse via apt-get.  The @file{muse-el}
211 package is available both at Michael Olson's APT repository and the
212 official Debian and Ubuntu repositories.  To make use of the former, add
213 the following line to your @file{/etc/apt/sources.list} file and run
214 @code{apt-get install muse}.
216 @example
217 deb http://www.mwolson.org/debian/ ./
218 @end example
220 @cindex releases, from source
221 Alternatively, you can download the latest release from
222 @uref{http://www.mwolson.org/static/dist/muse/} .
224 @node Development,  , Releases, Obtaining Muse
225 @comment  node-name,  next,  previous,  up
226 @section Latest unreleased development changes
227 @cindex development
229 Choose the development version if you want to live on the bleeding edge
230 of Muse development or try out new features before release.
232 @cindex arch revision control system, using
233 The Arch revision control system allows you to retrieve previous
234 versions and select specific features and bug fixes.  If you would like
235 to contribute to Muse development, it is highly recommended that you use
236 Arch, but this is not a requirement.
238 If you are new to Arch, you might find this tutorial helpful:
239 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
241 Downloading the Muse module with Arch and staying up-to-date involves
242 the following steps.
244 @enumerate
245 @item Install arch
247 @itemize @bullet
248 @item Debian and Ubuntu: @kbd{apt-get install tla}.
249 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
250 @end itemize
252 @item Register the archive.
253 @example
254 tla register-archive -f http://www.mwolson.org/archives/2005
255 @end example
257 @item Download the Muse package.
258 @example
259 # Download Muse into the @file{muse} directory.
260 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
261 @end example
263 @item List upstream changes that are missing from your local copy.
264 Do this whenever you want to see whether new changes have been committed
265 to Muse.
267 @example
268 # Change to the source directory you are interested in.
269 cd muse/
271 # Display the summary of changes
272 tla missing --summary
273 @end example
275 @cindex updating Muse with Arch
276 @item Update to the latest version by replaying missing changes.
277 @example
278 cd muse
279 tla replay
280 @end example
282 @end enumerate
284 There are other ways to interact with the Muse archive.
286 @itemize
287 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
288 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
289 @end itemize
291 The latest development snapshot will be kept up-to-date since it is
292 updated at the same time as the Arch repository.
294 @node Installation, Getting Started, Obtaining Muse, Top
295 @comment  node-name,  next,  previous,  up
296 @chapter Compiling and Installing Muse
298 Muse may be compiled and installed on your machine.
300 @subheading Compilation
302 This is an optional step, since Emacs Lisp source code does not
303 necessarily have to be byte-compiled.  It will yield a speed increase,
304 though.
306 A working copy of Emacs or XEmacs is needed in order to compile the
307 Emacs Muse.  By default, the program that is installed with the name
308 @command{emacs} will be used.
310 If you want to use the @command{xemacs} binary to perform the
311 compilation, you would need to edit @file{Makefile.defs} in the
312 top-level directory as follows.  You can put either a full path to an
313 Emacs or XEmacs binary or just the command name, as long as it is in the
314 @env{PATH}.
316 @example
317 EMACS    = xemacs
318 SITEFLAG = -no-site-file
319 @end example
321 Running @code{make} should compile the Muse source files in the
322 @file{lisp} directory.
324 @subheading Installation
326 Muse may be installed into your file hierarchy by doing the following.
328 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
329 where you want the source and compiled Muse files to be installed and
330 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
331 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
332 Compilation section if you are using XEmacs.
334 If you are installing Muse on a Debian or Ubuntu system, you might want
335 to change the value of @env{INSTALLINFO} as specified in
336 @file{Makefile.defs}.
338 If you wish to install Muse to different locations than the defaults
339 specify, edit @file{Makefile.defs} accordingly.
341 Run @code{make} as a normal user.
343 Run @code{make install} as the root user if you have chosen installation
344 locations that require this.
347 @node Getting Started, Projects, Installation, Top
348 @comment  node-name,  next,  previous,  up
349 @chapter Getting Started
350 @cindex settings
352 To use Muse, add the directory containing its files to your
353 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
354 the authoring mode, and the styles you wish to publish to.  An example
355 follows.
357 @lisp
358 (add-to-list 'load-path "<path to Muse>")
360 (require 'muse-mode)     ; load authoring mode
362 (require 'muse-html)     ; load publishing styles I use
363 (require 'muse-latex)
364 (require 'muse-texinfo)
365 (require 'muse-docbook)
366 @end lisp
368 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
369 an input document to any available style.  If you enable
370 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
371 command will be bound to @kbd{C-c C-t}.
373 If the currently opened file is part of a defined project in
374 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
376 You should also type @kbd{M-x customize-group}, and give the name
377 @samp{muse}.  Each of the options has its own documentation.
380 @node Projects, Keystroke Summary, Getting Started, Top
381 @comment  node-name,  next,  previous,  up
382 @chapter Creating and Managing Muse Projects
383 @cindex projects
385 Often you will want to publish all the files within a directory to a
386 particular set of output styles automatically.  To support, Muse
387 allows for the creations of "projects".  Here is a sample project, to
388 be defined in your @file{.emacs} file.
390 @lisp
391 (require 'muse-project)
393 (setq muse-project-alist
394       '(("website"                      ; my various writings
395          ("~/Pages" :default "index")
396          (:base "html" :path "~/public_html")
397          (:base "pdf" :path "~/public_html/pdf"))))
398 @end lisp
400 The above defines a project named "website", whose files are located
401 in the directory @file{~/Pages}.  The default page to visit is
402 @file{index}.  When this project is published, each page will be
403 output as HTML to the directory @file{~/public_html}, and as PDF to
404 the directory @file{~/public_html/pdf}.  Within any project page, you
405 may create a link to other pages using the syntax @samp{[[pagename]]}.
407 If you would like to include only some files from a directory in a Muse
408 project, you may use a regexp in place of @file{~/Pages} in the example.
410 By default, Muse expects all project files to have the file extension
411 @file{.muse}. Files without this extension will not be associated with
412 Muse mode and will not be considered part of any project, even if they
413 are within a project directory.
415 If you don't want to use @file{.muse}, you can customize the extension
416 by setting the value of @code{muse-file-extension}.
418 If you don't want to use any extension at all, and want Muse to
419 autodetect project files based on their location, then add the following
420 to your Muse settings file.
422 @lisp
423 (setq muse-file-extension nil
424       muse-mode-auto-p t)
425 @end lisp
427 Note that if you chose to have @code{muse-file-extension} set to
428 @code{nil}, you may have trouble if your @file{.emacs} file or other
429 init scripts attempt to visit a Muse file.  (A very common example of
430 this is if you use Planner with Muse and run @code{(plan)} from your
431 @file{.emacs}.)  If you wish to visit Muse files from your
432 @file{.emacs}, be sure to also add the following additional code before
433 any such visits happen:
435 @lisp
436 (add-hook 'find-file-hooks 'muse-mode-maybe)
437 @end lisp
439 @c PRE3_03: Give more examples
440 @c PRE3_03: Describe :set and other options fully
442 @node Keystroke Summary, Markup Rules, Projects, Top
443 @comment  node-name,  next,  previous,  up
444 @chapter Keys Used in Muse Mode
445 @cindex keystrokes
447 This is a summary of keystrokes available in every Muse buffer.
449 @table @kbd
451 @item C-c C-a (`muse-index')
452 Display an index of all known Muse pages.
454 @item C-c C-b (`muse-find-backlinks')
455 Find all pages that link to this page.
457 @item C-c C-e (`muse-edit-link-at-point')
458 Edit link at point.
460 @item C-c C-f (`muse-project-find-file')
461 Open another Muse page.  Prompt for the name.
463 @item C-c C-i (`muse-insert-tag')
464 Insert a tag interactively.
466 @item C-c C-l (`font-lock-mode')
467 Toggle font lock / highlighting for the current buffer.
469 @item C-c C-p (`muse-project-publish')
470 Publish any Muse pages that have changed.
472 @item C-c C-s (`muse-search')
473 Find text in all files of the current project.
475 @item C-c C-t (`muse-project-publish-this-file')
476 Publish the currently-visited file.  Prompt for the style if the current
477 file can be published using more than one style.
479 @item C-c C-T (`muse-publish-this-file')
480 Publish the currently-visited file.  Prompt for both the style and
481 output directory.
483 @item C-c C-v (`muse-browse-result')
484 Show the published result of this page.
486 @item C-c = (`muse-what-changed')
487 Diff this page against the last backup version.
489 @item C-c TAB l (`muse-insert-relative-link-to-file')
490 Insert a link to a file interactively.
492 @item C-c TAB t (`muse-insert-tag')
493 Insert a tag interactively.
495 @item C-c TAB u (`muse-insert-url')
496 Insert a URL interactively.
498 @item TAB
499 Move to the next Wiki reference.
501 @item S-TAB
502 Move to the previous Wiki reference.
504 @item M-TAB
505 Complete the name of a page from the current project at point.
507 @item M-RET
508 Insert a new list item at point, indenting properly.
510 @item C-<
511 Decrease the indentation of the list item at point.
513 @item C->
514 Increase the indentation of the list item at point.
516 @end table
519 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
520 @comment  node-name,  next,  previous,  up
521 @chapter Rules for Using Markup
522 @cindex markup
524 A Muse document uses special, contextual markup rules to determine how
525 to format the output result.  For example, if a paragraph is indented,
526 Muse assumes it should be quoted.
528 There are not too many markup rules, and all of them strive to be as
529 simple as possible so that you can focus on document creation, rather
530 than formatting.
532 @menu
533 * Paragraphs::                  Paragraphs: centering and quoting.
534 * Headings::                    Levels of headings.
535 * Directives::                  Directives at the beginning of a
536                                   document.
537 * Emphasizing Text::            Bold, italicized, and underlined text.
538 * Footnotes::                   Making notes to be shown at the end.
539 * Verse::                       Indicating poetic stanzas.
540 * Lists::                       Lists of items.
541 * Tables::                      Generation of data tables.
542 * Explicit Links::              Hyperlinks and email addresses with
543                                   descriptions.
544 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
545                                   links.
546 * Images::                      Publishing and displaying images.
547 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
548 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
549                                   for extensibility.
550 * Comments::                    Lines to omit from published output.
551 * Tag Summary::                 Tags that Muse recognizes.
552 @end menu
554 @node Paragraphs, Headings, Markup Rules, Markup Rules
555 @comment  node-name,  next,  previous,  up
556 @section Paragraphs: centering and quoting
557 @cindex paragraphs
559 Paragraphs in Muse must be separated by a blank line.
561 @cindex paragraphs, centered
562 @subheading Centered paragraphs and quotations
564 A line that begins with six or more columns of whitespace (either tabs
565 or spaces) indicates a centered paragraph.  Alternatively, you can use
566 the @verb{|<center>|} tag to surround regions that are to be published as
567 centered paragraphs.
569 @cindex paragraphs, quoted
570 @cindex quotations
571 But if a line begins with whitespace, though less than six columns, it
572 indicates a quoted paragraph.  Alternatively, you can use the
573 @verb{|<quote>|} tag to surround regions that are to be published as
574 quoted paragraphs.
576 @cindex examples
577 @cindex monospace, rendering blocks
578 @cindex HTML, rendering blocks in monospace
579 @subheading Literal paragraphs
581 The @verb{|<example>|} tag is used for examples, where whitespace should
582 be preserved, the text rendered in monospace, and any characters special
583 to the output style escaped.
585 @cindex literal text
586 @cindex HTML, inserting a raw block
587 There is also the @verb{|<literal>|} tag, which causes a marked block to
588 be entirely left alone.  This can be used for inserting a hand-coded
589 HTML blocks into HTML output, for example.
591 @node Headings, Directives, Paragraphs, Markup Rules
592 @comment  node-name,  next,  previous,  up
593 @section Levels of headings
594 @cindex headings
596 A heading becomes a chapter or section in printed output -- depending on
597 the style.  To indicate a heading, start a new paragraph with one or
598 more asterices, followed by a space and the heading title.  Then begin
599 another paragraph to enter the text for that section.
601 All levels of headings will be published.  Most publishing styles only
602 distinguish the between the first 4 levels, however.
604 @example
605 * First level
607 ** Second level
609 *** Third level
611 **** Fourth level
612 @end example
614 @node Directives, Emphasizing Text, Headings, Markup Rules
615 @comment  node-name,  next,  previous,  up
616 @section Directives at the beginning of a document
617 @cindex directives
619 Directives are lines beginning with the @samp{#} character that come
620 before any paragraphs or sections in the document.  Directives are of
621 the form ``#directive content of directive''.  You can use any
622 combination of uppercase and lowercase letters for directives, even if
623 the directive is not in the list below.
625 The @code{muse-publishing-directive} function may be used in header and
626 footer text to access directives.  For example, to access the
627 @samp{#title} directive, use @code{(muse-publishing-directive "title")}.
629 The following is a list of directives that Muse uses.
631 @table @code
632 @cindex #author
633 @item #author
634 The author of this document.
636 If this is not specified, Muse will attempt to figure it out from the
637 @code{user-full-name} variable.
639 @cindex #date
640 @item #date
641 The date that the document was last modified.
643 This is used by publishing styles that are able to embed the date
644 information.
646 @cindex #desc
647 @item #desc
648 A short description of this document.
650 This is used by the @code{journal} publishing style to embed information
651 inside of an RSS/RDF feed.
653 @cindex #title
654 @item #title
655 The title of this document.
657 If this is not specified, the name of the file is used.
659 @end table
661 @node Emphasizing Text, Footnotes, Directives, Markup Rules
662 @comment  node-name,  next,  previous,  up
663 @section Bold, italicized, and underlined text
664 @cindex emphasizing text
665 @cindex underlining text
666 @cindex italicizing text
667 @cindex verbatim text
668 @cindex monospace, rendering words
670 To emphasize text, surround it with certain specially recognized
671 characters.
673 @example
674 *emphasis*
675 **strong emphasis**
676 ***very strong emphasis***
677 _underlined_
678 =verbatim and monospace=
679 @end example
681 @cindex WYSIWYG
682 While editing a Muse document in Muse mode, these forms of emphasis will
683 be highlighted in a WYSIWYG manner.  Each of these forms may span
684 multiple lines.
686 Verbatim text will be colored as gray by default.  To change this,
687 customize @code{muse-verbatim-face}.
689 You can also use the @verb{|<code>|} tag to indicate verbatim and
690 monospace text.  This is handy for regions that have an ``='' in them.
692 @node Footnotes, Verse, Emphasizing Text, Markup Rules
693 @comment  node-name,  next,  previous,  up
694 @section Making notes to be shown at the end
695 @cindex footnotes
697 A footnote reference is simply a number in square brackets.  To define
698 the footnote, place this definition at the bottom of your file.
699 @samp{footnote-mode} can be used to greatly facilitate the creation of
700 these kinds of footnotes.
702 Footnotes are defined by the same number in brackets occurring at the
703 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
704 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
705 the point of insertion.
707 @node Verse, Lists, Footnotes, Markup Rules
708 @comment  node-name,  next,  previous,  up
709 @section Indicating poetic stanzas
710 @cindex verses
711 @cindex poetry
713 Poetry requires that whitespace be preserved, but without resorting to
714 monospace.  To indicate this, use the following markup, reminiscent of
715 email quotations.
717 @example
718 > A line of Emacs verse;
719 >   forgive its being so terse.
720 @end example
722 You can also use the @verb{|<verse>|} tag, if you prefer.
724 @example
725 <verse>
726 A line of Emacs verse;
727   forgive its being so terse.
728 </verse>
729 @end example
731 @cindex verses, multiple stanzas
732 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
733 follows.
735 @example
736 <verse>
737 A line of Emacs verse;
738   forgive its being so terse.
740 In terms of terse verse,
741   you could do worse.
742 </verse>
743 @end example
745 @node Lists, Tables, Verse, Markup Rules
746 @comment  node-name,  next,  previous,  up
747 @section Lists of items
748 @cindex lists
750 Lists are given using special characters at the beginning of a line.
751 Whitespace must occur before bullets or numbered items, to distinguish
752 from the possibility of those characters occurring in a real sentence.
754 @cindex lists, bullets
755 These are rendered as a bullet list.
757 @example
758 - bullet item one
759 - bullet item two
760 @end example
762 @cindex lists, enumerated
763 An enumerated list follows.
765 @example
766 1. Enum item one
767 2. Enum item two
768 @end example
770 @cindex lists, definitions
771 Here is a definition list.
773 @example
774 Term1 ::
775   This is a first definition
776   And it has two lines;
777   no, make that three.
779 Term2 ::
780   This is a second definition
781 @end example
783 @node Tables, Explicit Links, Lists, Markup Rules
784 @comment  node-name,  next,  previous,  up
785 @section Generation of data tables
786 @cindex tables
788 @cindex tables, simple
789 Only very simple tables are supported.  The syntax is as follows.
791 @example
792 Double bars  || Separate header fields
794 Single bars   | Separate body fields
795 Here are more | body fields
797 Triple bars ||| Separate footer fields
798 @end example
800 Some publishing styles require header fields to come first, then footer
801 fields, and then the body fields.  You can use any order for these
802 sections that you like, and Muse will re-order them for you at
803 publish-time.
805 If you wish to disable table generation for one Muse file, add the
806 directive @samp{#disable-tables t} to the top of the file.
808 @node Explicit Links, Implicit Links, Tables, Markup Rules
809 @comment  node-name,  next,  previous,  up
810 @section Hyperlinks and email addresses with descriptions
811 @cindex links, explicit
813 A hyperlink can reference a URL, or another page within a Muse
814 project.  In addition, descriptive text can be specified, which should
815 be displayed rather than the link text in output styles that supports
816 link descriptions.  The syntax is as follows.
818 @example
819 [[link target][link description]]
820 [[link target without description]]
821 @end example
823 Thus, the current maintainer's homepage for Muse can be found
824 @samp{[[http://www.mwolson.org/projects/EmacsMuse.html][here]]},
825 or at @samp{[[http://www.mwolson.org/projects/EmacsMuse.html]]}.
827 @node Implicit Links, Images, Explicit Links, Markup Rules
828 @comment  node-name,  next,  previous,  up
829 @section Bare URLs, WikiNames, and InterWiki links
830 @cindex links, implicit
831 @cindex links, raw
833 @cindex URLs
834 @cindex Email addresses
836 A URL or email address encountered in the input text is published as a
837 hyperlink.  These kind of links are called @dfn{implicit links} because
838 they are not separated from the rest of the Muse document in any way.
840 Some characters in URLs will prevent Muse from recognizing them as
841 implicit links. If you want to link to a URL containing spaces or any of
842 the characters ``][,"'`()<>^'', you will have to make the link
843 explicit. The punctuation characters ``.,;:'' are also not recognized as
844 part of a URL when they appear at its end. For information on how to
845 make an explicit link, see @ref{Explicit Links,,Hyperlinks and email
846 addresses with descriptions}.
848 @cindex WikiNames
849 If the @command{muse-wiki} module is loaded, another form of implicit
850 link will be made available.  WikiNames, which are typed in CamelCase,
851 are highlighted and published as links, provided that the file they
852 refer to exists.
854 Customization of WikiName recognition may be accomplished by editing the
855 @code{muse-wiki-wikiword-regexp} option and subsequently running
856 @code{(muse-configure-highlighting 'muse-colors-markupmuse-colors-markup)}.
857 If you use the Customize interface, the latter will be done
858 automatically.
860 @cindex InterWiki links
861 @cindex inter-project links
862 The @command{muse-wiki} module also allows for InterWiki links.  These
863 are similar to WikiWords, but they specify both the project and page of
864 a file.  The names of your project entries in @code{muse-project-alist}
865 will be used as InterWiki names by default.  Several examples follow.
867 @example
868 Blog::DocumentingMuse
869 Projects#EmacsMuse
870 Website
871 @end example
873 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
874 the project name, and @samp{DocumentingMuse} is the page name.  In the
875 second example, @samp{#} is the interwiki delimiter.  If the name of a
876 project occurs by itself in text, like the third case, it will be
877 colorized and published as a link to the default page of the given
878 project.
880 Customization of interwiki links may be accomplished by editing the
881 @code{muse-wiki-interwiki-alist} option.
883 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
884 @comment  node-name,  next,  previous,  up
885 @section Publishing and displaying images
886 @cindex images
887 @cindex links, with images
888 @subheading Image links
890 Links to images may be used in either the target or the description, or
891 both.  Thus, the following code will publish as a clickable image that
892 points to @url{http://www.mwolson.org/}.
894 @example
895 [[http://www.mwolson.org/][/static/logos/site-logo.png]]
896 @end example
898 @cindex images, displaying
899 @cindex images, local
900 @subheading Displaying images in Muse mode
901 If a link to a locally-available image is encountered in the link
902 description, Muse mode will attempt to display it if your version of
903 Emacs permits this.
905 This behavior may be toggled with @kbd{C-c C-i}, or disabled permanently
906 by setting the @code{muse-colors-inline-images} option to @code{nil}.
908 The method for finding images may be altered by customizing the
909 @code{muse-colors-inline-image-method} option.  One useful value for
910 this option is @code{muse-colors-use-publishing-directory}, which tells
911 Muse mode to look in the directory where the current file will be
912 published.  The default is to look in the current directory.  Relative
913 paths like @samp{../pics/} should work for either setting.
915 Eventually, it is hoped that Muse will be able to copy images from the a
916 ``source'' directory to a publishing directory by customizing
917 @code{muse-project-alist}, but this has not been implemented yet.
919 @cindex images, without descriptions
920 @cindex images, inlined
921 @subheading Publishing simple images
922 The following example will display correctly and publish correctly if a
923 @acronym{PNG} file called @file{TestLogo.png} exists in the
924 @file{../pics/} directory.  If text is on the same line as the picture,
925 it will remain so in the output.
927 @example
928 [[../myimage.png]]
929 @end example
931 @cindex images, captions
932 @subheading Publishing images with captions
933 If you want to add a caption to an image, use the following syntax.
934 This will center the image (if the output format supports it) and add a
935 centered caption below the picture.  Formats that do not support
936 centering the image will instead leave it against the left margin.
938 @example
939 [[../pics/mycat.png][My cat Dexter]]
940 @end example
942 Images with captions may only occur in their own paragraphs, with no
943 text on the same line.  Otherwise, the published output will not be
944 syntactically correct.
946 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
947 @comment  node-name,  next,  previous,  up
948 @section Inserting a horizontal line or anchor
950 @cindex horizontal rules
951 @cindex dashes
952 @subheading Horizontal Rules
954 Four or more dashes indicate a horizontal rule.  Be sure to put blank
955 lines around it, or it will be considered part of the proceeding or
956 following paragraph!
958 @cindex anchors
959 @cindex links, with target on same page
960 @subheading Anchors
962 If you begin a line with "#anchor" -- where "anchor" can be any word
963 that doesn't contain whitespace -- it defines an anchor at that point
964 into the document.  This point can be referenced using "page#anchor" as
965 the target in a Muse link.
967 @node Embedded Lisp, Comments, Horizontal Rules and Anchors, Markup Rules
968 @comment  node-name,  next,  previous,  up
969 @section Evaluating Emacs Lisp code in documents for extensibility
970 @cindex lisp, embedded
972 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
973 which is the only Muse tag supported in a style's header and footer
974 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
975 text you wish.  The inserted output will get marked up, if the
976 @verb{|<lisp>|} tag appears within the main text of the document.
978 @example
979 <lisp>(concat "This form gets " "inserted")</lisp>
980 @end example
982 @cindex lisp, and insert command
983 Note that you should not use the @code{insert} command within a set of
984 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
985 tags will be automatically inserted into the document.
987 @node Comments, Tag Summary, Embedded Lisp, Markup Rules
988 @comment  node-name,  next,  previous,  up
989 @section Lines to omit from published output
990 @cindex comments
991 @cindex publishing, omitting lines
993 Use the following syntax to indicate a comment.  Comments will not be
994 published.
996 @example
997 ; Comment text goes here.
998 @end example
1000 That is, only a semi-colon at the beginning of a line, followed by a
1001 literal space, will cause that line to be treated as a comment.
1003 @node Tag Summary, , Comments, Markup Rules
1004 @comment  node-name,  next,  previous,  up
1005 @section Tags that Muse recognizes
1006 @cindex tags
1007 @cindex inserting files at publish time
1008 @cindex publishing, including markup in headers and footers
1009 @cindex publishing, inserting files
1011 Muse has several built-in tags that may prove useful during publishing.
1012 @xref{muse-publish-markup-tags}, to see how to customize the tags that
1013 Muse uses, as well as make your own tags.
1015 @subheading Syntax
1017 If a tag takes arguments, it will look like this, where ``tagname'' is
1018 the name of the tag.
1020 @example
1021 <tagname arg1="string1" arg2="string2">
1022 @end example
1024 If you want the tag to look like it came straight from an XHTML
1025 document, you can alternatively do the following.
1027 @example
1028 <tagname arg1="string1" arg2="string2" />
1029 @end example
1031 If a tag surrounds some text, it will look like this.
1033 @example
1034 <tagname>Some text</tagname>
1035 @end example
1037 If a tag surrounds a large region, it will look like this.
1039 @example
1040 <tagname>
1041 Some text.
1042 Some more text.
1043 </tagname>
1044 @end example
1046 @subheading Tag listing
1048 This is the complete list of tags that Muse accepts, including those
1049 that were mentioned in previous sections.
1051 @table @samp
1053 @item <class>
1054 If publishing to HTML, surround the given text with a @verb{|<span>|}
1055 tag.  It takes one argument called ``name'' that specifies the class
1056 attribute of the @verb{|<span>|} tag.
1058 If publishing to a different format, do nothing extra to the text.
1060 @item <code>
1061 Treat the text surrounded by the tag as if they were enclosed in equal
1062 signs, that is, make it monospace.
1064 @item <command>
1065 Run a command on the region, replacing the region with the result of the
1066 command.  The command is specified with the ``interp'' argument.  If no
1067 value for ``interp'' is given, pass the entire region to the shell.
1069 The ``markup'' argument controls how this section is marked up.
1071 If it is omitted, publish the region with the normal Muse rules.
1073 If "nil", do not mark up the region at all, but prevent Muse from
1074 further interpreting it.
1076 If "example", treat the region as if it was surrounded by the
1077 @verb{|<example>|} tag.
1079 If "src", treat the included text as if it was surrounded by the
1080 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1081 doing this.
1083 If "verse", treat the region as if it was surrounded by the
1084 @verb{|<verse>|} tag, to preserve newlines.
1086 Otherwise, it should be the name of a function to call, with the buffer
1087 narrowed to the region.
1089 @item <comment>
1090 Treat the entire region as a comment.  If the option
1091 @var{muse-publish-comments-p} is nil, delete the region, otherwise
1092 publish it using the comment syntax of the current publishing style.
1094 @item <contents>
1095 Publish a Table of Contents.  This will either be inserted in-place or
1096 at the beginning of the document, depending on your publishing style.
1097 It does not have a delimiting tag.
1099 By default, only 2 levels of headings will be included in the generated
1100 Table of Contents.  To change this globally, customize the
1101 @var{muse-publish-contents-depth} option.  To change this only for the
1102 current tag, use the ``depth'' argument.
1104 @item <example>
1105 Publish the region in monospace, preserving the newlines in the region.
1106 This is useful for snippets of code.
1108 @item <include>
1109 Insert the given file at the current location during publishing.  The
1110 basic use of this tag is as follows, replacing ``included_file'' with
1111 the name of the file that you want to include.
1113 @example
1114 <include file="included_file">
1115 @end example
1117 The ``markup'' argument controls how this section is marked up.
1119 If it is omitted, publish the included text with the normal Muse
1120 rules.
1122 If "nil", do not mark up the included text at all.
1124 If "example", treat the included text as if it was surrounded by the
1125 @verb{|<example>|} tag.
1127 If "src", treat the included text as if it was surrounded by the
1128 @verb{|<src>|} tag.  You should also specify the ``lang'' attribute if
1129 doing this.
1131 If "verse", treat the included text as if it was surrounded by the
1132 @verb{|<verse>|} tag, to preserve newlines.
1134 Otherwise, it should be the name of a function to call after inserting
1135 the file with the buffer narrowed to the section inserted.
1137 @item <lisp>
1138 Evaluate the Emacs Lisp expressions between the initial and ending tags.
1139 The result is then inserted into the document, so you do not need to
1140 explicitly call @code{insert}.  All text properties are removed from the
1141 resulting text.
1143 This tag takes the ``markup'' argument.  See the description of
1144 @verb{|<command>|} for details.
1146 @item <literal>
1147 Make sure that the text enclosed by this tag is published without
1148 escaping it in any way.  This is useful for inserting markup directly
1149 into the published document, when Muse does not provide the desired
1150 functionality.
1152 @item <markup>
1153 Mark up the text between the initial and ending tags.  The markup
1154 command to use may be specified by the ``function'' argument.  The
1155 standard Muse markup routines are used by default if no ``function''
1156 argument is provided.
1158 This is useful for marking up regions in headers and footers.  One
1159 example that comes to mind is generating a published index of all of the
1160 files in the current project by doing the following.
1162 @example
1163 <markup><lisp>(muse-index-as-string t t)</lisp></markup>
1164 @end example
1166 @item <perl>
1167 Run the @command{perl} language interpreter on the region, replacing the
1168 region with the result of the command.
1170 This tag takes the ``markup'' argument.  See the description of
1171 @verb{|<command>|} for details.
1173 @item <python>
1174 Run the @command{python} language interpreter on the region, replacing
1175 the region with the result of the command.
1177 This tag takes the ``markup'' argument.  See the description of
1178 @verb{|<command>|} for details.
1180 @item <quote>
1181 Publish the region as a blockquote.  This will either be inserted
1182 in-place or at the beginning of the document, depending on your
1183 publishing style.  It does not have a delimiting tag.
1185 @item <ruby>
1186 Run the @command{ruby} language interpreter on the region, replacing the
1187 region with the result of the command.
1189 This tag takes the ``markup'' argument.  See the description of
1190 @verb{|<command>|} for details.
1192 @item <src>
1193 Publish the region using htmlize.
1194 The language to use may be specified by the ``lang'' attribute.
1196 Muse will look for a function named @var{lang}-mode, where @var{lang} is
1197 the value of the ``lang'' attribute.
1199 This tag requires htmlize 1.34 or later in order to work.  If this is
1200 not satisfied, or the current publishing style is not HTML-based, Muse
1201 will publish the region like an @verb{|<example>|} tag.
1203 @item <verbatim>
1204 This is used when you want to prevent Muse from trying to interpret some
1205 markup.  Surround the markup in @verb{|<verbatim>|} and
1206 @verb{|</verbatim>|}, and it will not be interpreted.
1208 This tag was used often in previous versions of Muse because they did
1209 not support whole-document escaping of specials.  Now, it will only be
1210 needed for other tags, and perhaps footnotes as well.
1212 @item <verse>
1213 Preserve the newlines in the region.  In formats like HTML, newlines are
1214 removed by default, hence the need for this tag.  In other publishing
1215 styles, this tag may cause the text to be indented slightly in a way
1216 that looks nice for poetry and prose.
1218 @end table
1220 @node Publishing Styles, Extending Muse, Markup Rules, Top
1221 @comment  node-name,  next,  previous,  up
1222 @chapter Publishing Various Types of Documents
1223 @cindex publishing styles
1225 One of the principle features of Muse is the ability to publish a simple
1226 input text to a variety of different output styles.  Muse also makes it
1227 easy to create new styles, or derive from an existing style.
1229 @menu
1230 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
1231 * Book::                        Publishing entries into a compilation.
1232 * DocBook::                     Publishing in DocBook XML form.
1233 * HTML::                        Publishing in HTML or XHTML form.
1234 * Journal::                     Keeping a journal or blog.
1235 * LaTeX::                       Publishing LaTeX documents.
1236 * Poem::                        Publish a poem to LaTex or PDF.
1237 * Texinfo::                     Publish entries to Texinfo format or PDF.
1238 @end menu
1240 @node Blosxom, Book, Publishing Styles, Publishing Styles
1241 @comment  node-name,  next,  previous,  up
1242 @section Integrating Muse and pyblosxom.cgi
1243 @cindex blog, one-file-per-entry style
1245 The Blosxom publishing style publishes a tree of categorised files to a
1246 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
1247 In other words, each blog entry corresponds with one file.
1249 @menu
1250 * Blosxom Requirements::        Other tools needed for the Blosxom style.
1251 * Blosxom Entries::             Format of a Blosxom entry and automation.
1252 * Blosxom Options::             Blosxom styles and options provided.
1253 @end menu
1255 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
1256 @comment  node-name,  next,  previous,  up
1257 @subsection Other tools needed for the Blosxom style
1259 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
1260 installed on a machine that you have upload access to.
1262 The following additional components are required in order to make the
1263 date of blog entries display as something sensible.
1265 @enumerate
1266 @item
1267 A script to gather date directives from the entire blog tree into a
1268 single file.  The file must associate a blog entry with a date.
1270 @item
1271 A plugin for (py)blosxom that reads this file.
1272 @end enumerate
1274 These 2 things are provided for @command{pyblosxom.cgi} in the
1275 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
1276 former service, while @file{hardcodedates.py} provides the latter
1277 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
1278 script will be found/written.
1280 Here is a sample listing from my @file{timestamps} file, which maps
1281 each file to a date.  This can really be in any format, as long as your
1282 date-gathering script and your plugin can both understand it.
1284 @example
1285 2005-04-01-14-16 personal/paper_cranes
1286 2005-03-21 personal/spring_break_over
1287 2004-10-24 personal/finished_free_culture
1288 @end example
1290 The script @file{contrib/pyblosxom/make-blog} demonstrates how to call
1291 @file{getstamps.py}.  Note that you will need to set the current
1292 directory to where your Muse files are, execute @file{getstamps.py}, and
1293 then move the generated timestamps file to your publishing directory.
1295 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
1296 @comment  node-name,  next,  previous,  up
1297 @subsection Format of a Blosxom entry and automation
1299 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
1300 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
1301 plus whatever normal content is desired.
1303 The date directive is not used directly by @command{pyblosxom.cgi} or
1304 this program.  You need to have the two additional items from the former
1305 section to make use of this feature.
1307 There is a function called @code{muse-blosxom-new-entry} that will
1308 automate the process of making a new blog entry.  To make use of it, do
1309 the following.
1311 @itemize @bullet
1312 @item
1313 Customize @code{muse-blosxom-base-directory} to the location that your
1314 blog entries are stored.
1316 @item
1317 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
1318 use the following code to assign this function to @kbd{C-c p l'}.
1320 @example
1321 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
1322 @end example
1324 @item
1325 You should create your directory structure ahead of time under your base
1326 directory.  These directories, which correspond with category names, may
1327 be nested.
1329 @item
1330 When you enter this key sequence, you will be prompted for the category
1331 of your entry and its title.  Upon entering this information, a new file
1332 will be created that corresponds with the title, but in lowercase
1333 letters and having special characters converted to underscores.  The
1334 title and date directives will be inserted automatically.
1335 @end itemize
1337 @node Blosxom Options, , Blosxom Entries, Blosxom
1338 @comment  node-name,  next,  previous,  up
1339 @subsection Blosxom styles and options provided
1341 The following styles and options are available in the Blosxom publishing
1342 style.
1344 @subheading Styles provided
1346 @table @code
1348 @cindex publishing styles, blosxom-html
1349 @item blosxom-html
1350 Publish Blosxom entries in HTML form.
1352 @cindex publishing styles, blosxom-xhtml
1353 @item blosxom-xhtml
1354 Publish Blosxom entries in XHTML form.
1356 @end table
1358 @subheading Options provided
1360 @table @code
1362 @item muse-blosxom-extension
1363 Default file extension for publishing Blosxom files.
1365 @item muse-blosxom-header
1366 Header used for publishing Blosxom files.
1368 This may be text or a filename.
1370 @item muse-blosxom-footer
1371 Footer used for publishing Blosxom files.
1373 This may be text or a filename.
1375 @item muse-blosxom-base-directory
1376 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
1378 This is the top-level directory where your blog entries may be found
1379 locally.
1381 @end table
1383 @node Book, DocBook, Blosxom, Publishing Styles
1384 @comment  node-name,  next,  previous,  up
1385 @section Publishing entries into a compilation
1387 This publishing style is used to output ``books'' in LaTeX or PDF
1388 format.
1390 Each page will become a separate chapter in the book, unless the style
1391 keyword @option{:nochapters} is used, in which case they are all run
1392 together as if one giant chapter.
1394 One way of publishing a book is to make a project for it, add the
1395 project to @code{muse-project-alist}, and use the @code{book-pdf} style
1396 with a very specific @code{:include} value to specify some page whose
1397 contents will be checked for the values of @code{#title} and
1398 @code{#date}, and whose name will be used in the output file.  Then to
1399 publish the book, visit the aforementioned page and use @kbd{C-c C-t} or
1400 @kbd{C-c C-p} to trigger the publishing process.  An example
1401 @code{muse-project-alist} for this method follows.
1403 @example
1404 (setq muse-project-alist
1405       '(("MyNotes" (:nochapters t  ; do automatically add chapters
1406                     :book-chapter "Computer Science"
1407                     "~/Notes/cs"
1408                     :book-chapter "Mathematics"
1409                     "~/Notes/math"
1410                     :book-chapter "Emacs"
1411                     "~/Notes/emacs"
1412                     :book-end t ; the rest will not be placed in the book
1413                     "~/Notes"   ; so we can find the notes-anthology page
1414                     "~/Notes/private"
1415                     :force-publish ("index")
1416                     :default "index")
1417          (:base "book-pdf"
1418                 :include "/notes-anthology[^/]*$"
1419                 :path "~/public_html/notes")
1420          ;; other publishing styles for each directory go here,
1421          ;; if desired
1422          )))
1423 @end example
1425 In this example, there would be a file called
1426 @file{~/Notes/notes-anthology.muse}, which would contain just the
1427 following.  The resulting book would be published to
1428 @file{~/public_html/notes/notes-anthology.pdf}.
1430 @example
1431 #title My Technology Ramblings
1432 @end example
1434 Another way is to call the @code{muse-book-publish-project} function
1435 manually, with a custom project entry.  An example of this may be found
1436 in John Wiegley's configuration file at
1437 @file{examples/johnw/muse-init.el}, in the @code{muse-publish-my-books}
1438 function.
1440 @subheading Styles provided
1442 @table @code
1444 @cindex publishing styles, book-latex
1445 @item book-latex
1446 Publish a book in LaTeX form.  The header and footer are different than
1447 the normal LaTeX publishing mode.
1449 @cindex publishing styles, book-pdf
1450 @item book-pdf
1451 Publish a book in PDF form.  The header and footer are different than
1452 the normal PDF publishing mode.
1454 @end table
1456 @subheading Options provided
1458 @table @code
1460 @item muse-book-before-publish-hook
1461 A hook run in the book buffer before it is marked up.
1463 @item muse-book-after-publish-hook
1464 A hook run in the book buffer after it is marked up.
1466 @item muse-book-latex-header
1467 Header used for publishing books to LaTeX.
1469 This may be text or a filename.
1471 @item muse-book-latex-footer
1472 Footer used for publishing books to LaTeX.
1474 This may be text or a filename.
1476 @end table
1478 @node DocBook, HTML, Book, Publishing Styles
1479 @comment  node-name,  next,  previous,  up
1480 @section Publishing in DocBook XML form
1482 This publishing style is used to generate DocBook XML files.
1484 @subheading Styles provided
1486 @table @code
1488 @cindex publishing styles, docbook
1489 @item docbook
1491 @end table
1493 @subheading Options provided
1495 @table @code
1497 @item muse-docbook-extension
1498 Default file extension for publishing DocBook XML files.
1500 @item muse-docbook-header
1501 Header used for publishing DocBook XML files.
1503 This may be text or a filename.
1505 @item muse-docbook-footer
1506 Footer used for publishing DocBook XML files.
1508 This may be text or a filename.
1510 @item muse-docbook-markup-regexps
1511 List of markup rules for publishing a Muse page to DocBook XML.
1513 @item muse-docbook-markup-functions
1514 An alist of style types to custom functions for that kind of text.
1516 @item muse-docbook-markup-strings
1517 Strings used for marking up text.
1519 These cover the most basic kinds of markup, the handling of which
1520 differs little between the various styles.
1522 @item muse-docbook-markup-specials
1523 A table of characters which must be represented specially.
1525 @item muse-docbook-encoding-default
1526 The default Emacs buffer encoding to use in published files.
1527 This will be used if no special characters are found.
1529 @item muse-docbook-charset-default
1530 The default DocBook XML charset to use if no translation is
1531 found in @code{muse-docbook-encoding-map}.
1533 @item muse-docbook-encoding-map
1534 An alist mapping emacs coding systems to appropriate DocBook charsets.
1535 Use the base name of the coding system (i.e. without the -unix).
1537 @end table
1539 @node HTML, Journal, DocBook, Publishing Styles
1540 @comment  node-name,  next,  previous,  up
1541 @section Publishing in HTML or XHTML form
1543 This publishing style is capable of producing HTML or XHTML documents.
1545 @subheading Styles provided
1547 @table @code
1549 @cindex publishing styles, html
1550 @item html
1551 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1553 @item xhtml
1554 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1556 @end table
1558 @subheading Options provided
1560 If an HTML option does not have a corresponding XHTML option, it will
1561 be used for both of these publishing styles.
1563 @table @code
1565 @item muse-html-extension
1566 Default file extension for publishing HTML files.
1568 @item muse-xhtml-extension
1569 Default file extension for publishing XHTML files.
1571 @item muse-html-style-sheet
1572 Store your stylesheet definitions here.
1574 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1575 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1576 @verb{|<lisp>|} markup tags.
1578 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1579 properly.
1581 @item muse-html-header
1582 Header used for publishing HTML files.
1584 This may be text or a filename.
1586 @item muse-html-footer
1587 Footer used for publishing HTML files.
1589 This may be text or a filename.
1591 @item muse-xhtml-header
1592 Header used for publishing XHTML files.
1594 This may be text or a filename.
1596 @item muse-xhtml-footer
1597 Footer used for publishing XHTML files.
1599 This may be text or a filename.
1601 @item muse-html-anchor-on-word
1602 When true, anchors surround the closest word.
1604 This allows you to select them in a browser (i.e. for pasting), but has
1605 the side-effect of marking up headers in multiple colors if your header
1606 style is different from your link style.
1608 @item muse-html-table-attributes
1609 The attribute to be used with HTML @verb{|<table>|} tags.
1611 If you want to make more-complicated tables in HTML, surround the HTML
1612 with the @verb{|literal|} tag, so that it does not get escaped.
1614 @item muse-html-markup-regexps
1615 List of markup rules for publishing a Muse page to HTML.
1617 @item muse-html-markup-functions
1618 An alist of style types to custom functions for that kind of text.
1620 @item muse-html-markup-strings
1621 Strings used for marking up text as HTML.
1623 These cover the most basic kinds of markup, the handling of which
1624 differs little between the various styles.
1626 @item muse-xhtml-markup-strings
1627 Strings used for marking up text as XHTML.
1629 These cover the most basic kinds of markup, the handling of which
1630 differs little between the various styles.
1632 @item muse-html-markup-tags
1633 A list of tag specifications, for specially marking up HTML.
1634 @xref{muse-publish-markup-tags}, for more information.
1636 @item muse-html-markup-specials
1637 A table of characters which must be represented specially.  By default,
1638 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1640 @item muse-html-meta-http-equiv
1641 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1643 @item muse-html-meta-content-type
1644 The content type used for the HTML @verb{|<meta>|} tag.
1646 If you are striving for XHTML 1.1 compliance, you may want to change
1647 this to ``application/xhtml+xml''.
1649 @item muse-html-meta-content-encoding
1650 The charset to append to the HTML @verb{|<meta>|} tag.
1652 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1653 and determine the HTML charset from emacs's coding.  If set to a string,
1654 this string will be used to force a particular charset.
1656 @item muse-html-charset-default
1657 The default HTML meta charset to use if no translation is found in
1658 @code{muse-html-encoding-map}.
1660 @item muse-html-encoding-default
1661 The default Emacs buffer encoding to use in published files.
1662 This will be used if no special characters are found.
1664 @item muse-html-encoding-map
1665 An alist mapping emacs coding systems to appropriate HTML charsets.
1666 Use the base name of the coding system (i.e. without the -unix).
1668 @end table
1670 @node Journal, LaTeX, HTML, Publishing Styles
1671 @comment  node-name,  next,  previous,  up
1672 @section Keeping a journal or blog
1673 @cindex journal
1674 @cindex blog, journal style
1676 The module facilitates the keeping and publication of a journal.  When
1677 publishing to HTML, it assumes the form of a web log, or blog.
1679 The input format for each entry is as follows.
1681 @example
1682 * 20040317: Title of entry
1684 text for the entry.
1686 <qotd>
1687 "You know who you are. It comes down to a simple gut check: You
1688 either love what you do or you don't. Period." -- P. Bronson
1689 </qotd>
1690 @end example
1692 The "qotd", or Quote of the Day, is entirely optional.  When generated
1693 to HTML, this entry is rendered as the following.
1695 @example
1696 <div class="entry">
1697   <div class="entry-qotd">
1698     <h3>Quote of the Day:</h3>
1699     <p>"You know who you are. It comes down to a simple gut
1700       check: You either love what you do or you don't. Period."
1701       -- P. Bronson</p>
1702   </div>
1703   <div class="entry-body">
1704     <div class="entry-head">
1705       <div class="entry-date">
1706         <span class="date">March 17, 2004</span>
1707       </div>
1708       <div class="entry-title">
1709         <h2>Title of entry</h2>
1710       </div>
1711     </div>
1712     <div class="entry-text">
1713       <p>Text for the entry.</p>
1714     </div>
1715   </div>
1716 </div>
1717 @end example
1719 The plurality of "div" tags makes it possible to display the entries in
1720 any form you wish, using a CSS style.
1722 Also, an .RDF file can be generated from your journal by publishing it
1723 with the "rdf" style.  It uses the first two sentences of the first
1724 paragraph of each entry as its "description", and auto-generates tags
1725 for linking to the various entries.
1727 @subheading Styles provided
1729 @table @code
1731 @cindex publishing styles, journal-html
1732 @item journal-html
1733 Publish journal entries as an HTML document.
1735 @cindex publishing styles, journal-xhtml
1736 @item journal-xhtml
1737 Publish journal entries as an XHTML document.
1739 @cindex publishing styles, journal-latex
1740 @item journal-latex
1741 Publish journal entries as a LaTeX document.
1743 @cindex publishing styles, journal-pdf
1744 @item journal-pdf
1745 Publish journal entries as a PDF document.
1747 @cindex publishing styles, journal-book-latex
1748 @item journal-book-latex
1749 Publish journal entries as a LaTeX book.
1751 @cindex publishing styles, journal-book-pdf
1752 @item journal-book-pdf
1753 Publish journal entries as a PDF book.
1755 @cindex publishing styles, journal-rdf
1756 @cindex publishing styles, RSS 1.0
1757 @item journal-rdf
1758 Publish journal entries as an RDF file (RSS 1.0).
1760 @cindex publishing styles, journal-rss
1761 @cindex publishing styles, RSS 2.0
1762 @item journal-rss
1763 Publish journal entries as an RSS file (RSS 2.0).
1765 @end table
1767 @subheading Options provided
1769 @table @code
1771 @item muse-journal-heading-regexp
1772 A regexp that matches a journal heading.
1774 Paren group 1 is the ISO date, group 2 is the optional category, and
1775 group 3 is the optional heading for the entry.
1777 @item muse-journal-date-format
1778 Date format to use for journal entries.
1780 @item muse-journal-html-heading-regexp
1781 A regexp that matches a journal heading from an HTML document.
1783 Paren group 1 is the ISO date, group 2 is the optional category, and
1784 group 3 is the optional heading for the entry.
1786 @item muse-journal-html-entry-template
1787 Template used to publish individual journal entries as HTML.
1789 @item muse-journal-latex-section
1790 Template used to publish a LaTeX section.
1792 @item muse-journal-latex-subsection
1793 Template used to publish a LaTeX subsection.
1795 @item muse-journal-latex-markup-tags
1796 A list of tag specifications, for specially marking up LaTeX.
1798 @xref{muse-publish-markup-tags}, for more information.
1800 @item muse-journal-rdf-extension
1801 Default file extension for publishing RDF (RSS 1.0) files.
1803 @item muse-journal-rdf-base-url
1804 The base URL of the website referenced by the RDF file.
1806 @item muse-journal-rdf-header
1807 Header used for publishing RDF (RSS 1.0) files.
1809 This may be text or a filename.
1811 @item muse-journal-rdf-footer
1812 Footer used for publishing RDF (RSS 1.0) files.
1814 This may be text or a filename.
1816 @item muse-journal-rdf-date-format
1817 Date format to use for RDF entries.
1819 @item muse-journal-rdf-entry-template
1820 Template used to publish individual journal entries as RDF.
1822 @item muse-journal-rdf-summarize-entries
1823 If non-nil, include only summaries in the RDF file, not the full data.
1825 @item muse-journal-rss-extension
1826 Default file extension for publishing RSS 2.0 files.
1828 @item muse-journal-rss-base-url
1829 The base URL of the website referenced by the RSS file.
1831 @item muse-journal-rss-header
1832 Header used for publishing RSS 2.0 files.
1834 This may be text or a filename.
1836 @item muse-journal-rss-footer
1837 Footer used for publishing RSS 2.0 files.
1839 This may be text or a filename.
1841 @item muse-journal-rss-date-format
1842 Date format to use for RSS 2.0 entries.
1844 @item muse-journal-rss-entry-template
1845 Template used to publish individual journal entries as RSS 2.0.
1847 @item muse-journal-rss-enclosure-types-alist
1848 File types that are accepted as RSS enclosures.
1850 This is an alist that maps file extension to content type.
1852 Useful for podcasting.
1854 @item muse-journal-rss-summarize-entries
1855 If non-nil, include only summaries in the RSS file, not the full data.
1857 Many RSS subscribers find this annoying.
1859 @item muse-journal-rss-markup-regexps
1860 List of markup rules for publishing a Muse journal page to RSS.
1862 For more information on the structure of this list,
1863 @xref{muse-publish-markup-regexps}.
1865 @item muse-journal-rss-markup-functions
1866 An alist of style types to custom functions for that kind of text.
1868 For more on the structure of this list,
1869 @xref{muse-publish-markup-functions}.
1871 @end table
1873 @node LaTeX, Poem, Journal, Publishing Styles
1874 @comment  node-name,  next,  previous,  up
1875 @section Publishing LaTeX documents
1877 This publishing style is capable of producing LaTeX or PDF documents.
1879 If you wish to publish PDF documents, you will need to have a good TeX
1880 installation.  For Debian and Ubuntu, this can be accomplished by
1881 installing the ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts
1882 are also a must.
1884 @subheading Styles provided
1886 @table @code
1888 @cindex publishing styles, latex
1889 @item latex
1890 Publish a LaTeX document.
1892 @cindex publishing styles, pdf
1893 @item pdf
1894 Publish a PDF document, using an external LaTeX document conversion
1895 tool.
1897 @cindex publishing styles, latexcjk
1898 @item latexcjk
1899 Publish a LaTeX document with CJK (Chinese) encodings.
1901 @cindex publishing styles, pdfcjk
1902 @item pdfcjk
1903 Publish a PDF document with CJK (Chinese) encodings, using an external
1904 LaTeX document conversion tool.
1906 @end table
1908 @subheading Options provided
1910 @table @code
1912 @item muse-latex-extension
1913 Default file extension for publishing LaTeX files.
1915 @item muse-latex-pdf-extension
1916 Default file extension for publishing LaTeX files to PDF.
1918 @item muse-latex-header
1919 Header used for publishing LaTeX files.
1921 This may be text or a filename.
1923 @item muse-latex-footer
1924 Footer used for publishing LaTeX files.
1926 This may be text or a filename.
1928 @item muse-latexcjk-header
1929 Header used for publishing LaTeX files (CJK).
1931 This may be text or a filename.
1933 @item muse-latexcjk-footer
1934 Footer used for publishing LaTeX files (CJK).
1936 This may be text or a filename.
1938 @item muse-latex-markup-regexps
1939 List of markup regexps for identifying regions in a Muse page.
1941 For more on the structure of this list,
1942 @xref{muse-publish-markup-regexps}.
1944 @item muse-latex-markup-functions
1945 An alist of style types to custom functions for that kind of text.
1947 For more on the structure of this list,
1948 @xref{muse-publish-markup-functions}.
1950 @item muse-latex-markup-strings
1951 Strings used for marking up text.
1953 These cover the most basic kinds of markup, the handling of which
1954 differs little between the various styles.
1956 @item muse-latexcjk-encoding-map
1957 An alist mapping emacs coding systems to appropriate CJK codings.
1958 Use the base name of the coding system (ie, without the -unix).
1960 @item muse-latexcjk-encoding-default
1961 The default Emacs buffer encoding to use in published files.
1963 This will be used if no special characters are found.
1965 @item muse-latex-markup-specials-example
1966 A table of characters which must be represented specially.
1967 These are applied to @verb{|example>|} regions.
1969 With the default interpretation of @verb{|<example>|} regions, no
1970 specials need to be escaped.
1972 @item muse-latex-markup-specials-document
1973 A table of characters which must be represented specially.
1974 These are applied to the entire document, sans already-escaped
1975 regions.
1977 @item muse-latex-markup-specials-literal
1978 A table of characters which must be represented specially.
1979 This applies to =monospaced text= and @verb{|<code>|} regions.
1981 @item muse-latex-markup-specials-url
1982 A table of characters which must be represented specially.
1983 These are applied to URLs.
1985 @item muse-latex-permit-contents-tag
1986 If nil, ignore @verb{|<contents>|} tags.  Otherwise, insert table of
1987 contents.
1989 Most of the time, it is best to have a table of contents on the
1990 first page, with a new page immediately following.  To make this
1991 work with documents published in both HTML and LaTeX, we need to
1992 ignore the @verb{|<contents>|} tag.
1994 If you don't agree with this, then set this option to non-nil,
1995 and it will do what you expect.
1997 @end table
1999 @node Poem, Texinfo, LaTeX, Publishing Styles
2000 @comment  node-name,  next,  previous,  up
2001 @section Publish a poem to LaTex or PDF
2003 The @code{muse-poem} module makes it easy to attractively publish and
2004 reference poems in the following format, using the "memoir" module for
2005 LaTeX publishing.  It will also markup poems for every other output
2006 style, though none are nearly as pretty.
2008 @example
2009 Title
2012 Body of poem
2015 Annotations, history, notes, etc.
2016 @end example
2018 Once a poem is written in this format, just publish it to PDF using the
2019 @code{poem-pdf} style.  To make an inlined reference to a poem that
2020 you've written -- for example, from a blog page -- there is a "poem" tag
2021 defined by this module.
2023 @example
2024 <poem title="name.of.poem.page">
2025 @end example
2027 Let's assume the template above was called @file{name.of.poem.page};
2028 then the above tag would result in this inclusion.
2030 @example
2031 ** Title
2033 > Body of poem
2034 @end example
2036 John Wiegley uses this module for publishing all of the poems on his
2037 website, which are at
2038 @uref{http://www.newartisans.com/johnw/poems.html}.
2040 @subheading Styles provided
2042 @table @code
2044 @cindex publishing styles, poem-latex
2045 @item poem-latex
2046 Publish a poem in LaTeX form.
2048 @cindex publishing styles, poem-pdf
2049 @item poem-pdf
2050 Publish a poem to a PDF document.
2052 @cindex publishing styles, chapbook-latex
2053 @item chapbook-latex
2054 Publish a book of poems in LaTeX form.
2056 @cindex publishing styles, chapbook-pdf
2057 @item chapbook-pdf
2058 Publish a book of poems to a PDF document.
2060 @end table
2062 @subheading Options provided
2064 @table @code
2066 @item muse-poem-latex-header
2067 Header used for publishing LaTeX poems.
2069 This may be text or a filename.
2071 @item muse-poem-latex-footer
2072 Footer used for publishing LaTeX files.
2074 This may be text or a filename.
2076 @item muse-poem-markup-strings
2077 Strings used for marking up poems.
2079 These cover the most basic kinds of markup, the handling of which
2080 differs little between the various styles.
2082 @item muse-chapbook-latex-header
2083 Header used for publishing a book of poems in LaTeX form.
2085 This may be text or a filename.
2087 @item muse-chapbook-latex-footer
2088 Footer used for publishing a book of poems in LaTeX form.
2090 This may be text or a filename.
2092 @item muse-poem-chapbook-strings
2093 Strings used for marking up books of poems.
2095 These cover the most basic kinds of markup, the handling of which
2096 differs little between the various styles.
2098 @end table
2100 @node Texinfo, , Poem, Publishing Styles
2101 @comment  node-name,  next,  previous,  up
2102 @section Publish entries to Texinfo format or PDF
2104 Rules for publishing a Muse file as a Texinfo article.
2106 @subheading Styles provided
2108 @table @code
2110 @cindex publishing styles, texi
2111 @item texi
2112 Publish a file in Texinfo form.
2114 @cindex publishing styles, texi
2115 @item info
2116 Generate an Info file from a Muse file.
2118 @cindex publishing styles, info-pdf
2119 @item info-pdf
2120 Publish a file in PDF form.
2122 @end table
2124 @subheading Options provided
2126 @table @code
2128 @item muse-texinfo-process-natively
2129 If non-nil, use the Emacs `texinfmt' module to make Info files.
2131 @item muse-texinfo-extension
2132 Default file extension for publishing Texinfo files.
2134 @item muse-texinfo-info-extension
2135 Default file extension for publishing Info files.
2137 @item muse-texinfo-pdf-extension
2138 Default file extension for publishing PDF files.
2140 @item muse-texinfo-header
2141 Text to prepend to a Muse page being published as Texinfo.
2143 This may be text or a filename.
2144 It may contain @verb{|<lisp>|} markup tags.
2146 @item muse-texinfo-footer
2147 Text to append to a Muse page being published as Texinfo.
2149 This may be text or a filename.
2150 It may contain @verb{|<lisp>|} markup tags.
2152 @item muse-texinfo-markup-regexps
2153 List of markup rules for publishing a Muse page to Texinfo.
2155 For more on the structure of this list,
2156 @xref{muse-publish-markup-regexps}.
2158 @item muse-texinfo-markup-functions
2159 An alist of style types to custom functions for that kind of text.
2161 For more on the structure of this list, see
2162 @xref{muse-publish-markup-functions}.
2164 @item muse-texinfo-markup-strings
2165 Strings used for marking up text.
2167 These cover the most basic kinds of markup, the handling of which
2168 differs little between the various styles.
2170 @item muse-texinfo-markup-specials
2171 A table of characters which must be represented specially.
2173 @end table
2176 @node Extending Muse, Getting Help and Reporting Bugs, Publishing Styles, Top
2177 @comment  node-name,  next,  previous,  up
2178 @chapter Making your own publishing styles
2180 @menu
2181 * Common Elements::             Common functionality shared by styles.
2182 * Deriving Styles::             Deriving a new style from an existing
2183                                   one.
2184 @end menu
2186 @node Common Elements, Deriving Styles, , Extending Muse
2187 @comment  node-name,  next,  previous,  up
2188 @section Common functionality shared by styles
2189 @cindex publishing styles, common
2191 @menu
2192 * Markup Functions::            Specifying functions to marking up text.
2193 * Markup Regexps::              Markup rules for publishing.
2194 * Markup Strings::              Strings specific to a publishing style.
2195 * Markup Tags::                 Tag specifications for special markup.
2196 * Style Elements::              Parameters used for defining styles.
2197 @end menu
2199 @node Markup Functions, Markup Regexps, , Common Elements
2200 @comment  node-name,  next,  previous,  up
2201 @subsection Specifying functions to mark up text
2202 @cindex publishing, markup functions
2204 @anchor{muse-publish-markup-functions}
2205 @code{muse-publish-markup-functions}
2207 An alist of style types to custom functions for that kind of text.
2209 This is used by publishing styles to attempt to minimize the amount of
2210 custom regexps that each has to define.  @file{muse-publish} provides
2211 rules for the most common types of markup.
2213 Each member of the list is of the following form.
2215 @example
2216 (SYMBOL FUNCTION)
2217 @end example
2219 @itemize @bullet
2220 @item SYMBOL
2221 Describes the type of text to associate with this rule.
2222 @code{muse-publish-markup-regexps} maps regexps to these symbols.
2224 @item FUNCTION
2225 Function to use to mark up this kind of rule if no suitable function is
2226 found through the @option{:functions} tag of the current style.
2227 @end itemize
2229 @node Markup Regexps, Markup Strings, Markup Functions, Common Elements
2230 @comment  node-name,  next,  previous,  up
2231 @subsection Markup rules for publishing
2232 @cindex publishing, markup regexps
2233 @cindex publishing, rules
2235 @anchor{muse-publish-markup-regexps}
2236 @code{muse-publish-markup-regexps}
2238 List of markup rules for publishing a page with Muse.
2240 The rules given in this variable are invoked first, followed by whatever
2241 rules are specified by the current style.
2243 Each member of the list is either a function, or a list of the following
2244 form.
2246 @example
2247 (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
2248 @end example
2250 @itemize @bullet
2251 @item REGEXP
2252 A regular expression, or symbol whose value is a regular expression,
2253 which is searched for using `re-search-forward'.
2255 @item TEXT-BEGIN-GROUP
2256 The matching group within that regexp which denotes the beginning of the
2257 actual text to be marked up.
2259 @item REPLACEMENT-TEXT
2260 A string that will be passed to `replace-match'.
2262 If it is not a string, but a function, it will be called to determine
2263 what the replacement text should be (it must return a string).  If it is
2264 a symbol, the value of that symbol should be a string.
2265 @end itemize
2267 The replacements are done in order, one rule at a time.  Writing
2268 the regular expressions can be a tricky business.  Note that case
2269 is never ignored.  `case-fold-search' is always bound to nil
2270 while processing the markup rules.
2272 @subheading Publishing order
2274 This is the order that the publishing rules are consulted, by default.
2275 This may be changed by customizing @code{muse-publish-markup-regexps}.
2277 @table @code
2279 @item trailing and leading whitespace
2280 Remove trailing and leading whitespace from a file.
2282 @item directive
2283 @samp{#directive}
2285 This is only recognized at the beginning of a file.
2287 @item tag
2288 @samp{<tag>}
2290 @item comment
2291 @samp{; comment}
2293 @item anchor
2294 @samp{#anchor}
2296 @item explicit links
2297 Prevent emphasis characters in explicit links from being marked up.
2299 Don't actually publish them here, just add a special no-emphasis text
2300 property.
2302 @item word
2303 Whitespace-delimited word, possibly with emphasis characters
2305 This function is responsible for marking up emphasis and escaping some
2306 specials.
2308 @item emdash
2309 @samp{--}
2311 2-wide dash
2313 @item heading
2314 @samp{** Heading}
2316 Outline-mode style headings.
2318 @item enddots
2319 @samp{....}
2321 These are ellipses with a dot at end.
2323 @item dots
2324 @samp{...}
2326 Ellipses.
2328 @item rule
2329 @samp{----}
2331 Horizontal rule or section separator.
2333 @item fn-sep
2334 @samp{Footnotes:}
2336 beginning of footnotes section
2338 @item footnote
2339 @samp{[1]}
2341 Footnote definition or reference.  If at beginning of line, it is a
2342 definition.
2344 @item list
2345 @itemize @bullet
2346 @item
2347 @samp{ 1. }
2349 @item
2350 @samp{ - }
2352 @item
2353 @samp{term :: }
2354 @end itemize
2356 Numbered list, item list, or term definition list.
2358 @item quote
2359 spaces before beginning of text
2361 Blockquotes.
2363 @item verse
2364 @samp{> verse text}
2366 @item table
2367 @samp{table | cells}
2369 @item link
2370 @samp{[[explicit][links]]}
2372 @item url
2373 @samp{http://example.com/}
2375 @item email
2376 @samp{bare-email@@example.com}
2378 @end table
2380 @node Markup Strings, Markup Tags, Markup Regexps, Common Elements
2381 @comment  node-name,  next,  previous,  up
2382 @subsection Strings specific to a publishing style
2383 @cindex publishing, markup strings
2385 @dfn{Markup strings} are strings used for marking up text for a
2386 particular style.
2388 These cover the most basic kinds of markup, the handling of which
2389 differs little between the various styles.
2391 @subheading Available markup strings
2393 @table @code
2395 @item image-with-desc
2396 An image and a description.
2398 Argument 1: image without extension.  Argument 2: image extension.
2399 Argument 3: description.
2401 @item image
2402 An inlined image.
2404 Argument 1: image without extension.  Argument 2: image extension.
2406 @item image-link
2407 An image with a link around it.
2409 Argument 1: link.  Argument 2: image without extension.
2410 Argument 3: image extension.
2412 @item anchor-ref
2413 A reference to an anchor on the current page.
2415 Argument 1: anchor name.  Argument 2: description if one exists, or the
2416 original link otherwise.
2418 @item url
2419 A URL without a description.
2421 Argument 1: URL.
2423 @item link
2424 A link to a Muse page with a description.
2426 Argument 1: link.  Argument 2: description if one exists, or the
2427 original link otherwise.
2429 @item link-and-anchor
2430 A link to a Muse page with an anchor, and a description.
2432 Argument 1: link.  Argument 2: anchor name.
2433 Argument 3: description if one exists, or the original link otherwise.
2434 Argument 4: link without an extension.
2436 @item email-addr
2437 A link to an email address.
2439 Argument 1: email address.  Argument 2: email address.
2441 @item emdash
2442 A 2-length dash.
2444 Argument 1: Initial whitespace.  Argument 2: Terminating whitespace.
2446 @item comment-begin
2447 Beginning of a comment.
2449 @item comment-end
2450 End of a comment.
2452 @item rule
2453 A horizontal line or space.
2455 @item no-break-space
2456 A space that separates two words which are not to be separated.
2458 @item footnote
2459 Beginning of footnote.
2461 @item footnote-end
2462 End of footnote.
2464 @item footnotemark
2465 Mark a reference for the current footnote.
2467 Argument 1: number of this footnote.
2469 @item footnotemark-end
2470 End of a reference for the current footnote.
2472 @item footnotetext
2473 Indicate the text of the current footnote.
2475 Argument 1: number of this footnote.
2477 @item footnotetext-end
2478 End of a footnote text line.
2480 @item fn-sep
2481 Text used to replace ``Footnotes:'' line.
2483 @item dots
2484 3 dots.
2486 @item enddots
2487 4 dots.
2489 @item part
2490 Beginning of a part indicator line.  This is used by book publishing.
2492 @item part-end
2493 End of a part indicator line.  This is used by book publishing.
2495 @item chapter
2496 Beginning of a chapter indicator line.  This is used by book publishing.
2498 @item chapter-end
2499 End of a chapter indicator line.  This is used by book publishing.
2501 @item section
2502 Beginning of level 1 section indicator line.
2504 Argument 1: level of section; always 1.
2506 @item section-end
2507 End of level 1 section indicator line.
2509 Argument 1: level of section; always 1.
2511 @item subsection
2512 Beginning of level 2 section indicator line.
2514 Argument 1: level of section; always 2.
2516 @item subsection-end
2517 End of level 2 section indicator line.
2519 Argument 1: level of section; always 2.
2521 @item subsubsection
2522 Beginning of level 3 section indicator line.
2524 Argument 1: level of section; always 3.
2526 @item subsubsection-end
2527 End of level 3 section indicator line.
2529 Argument 1: level of section; always 3.
2531 @item section-other
2532 Beginning of section indicator line, where level is greater than 3.
2534 Argument 1: level of section.
2536 @item section-other-end
2537 End of section indicator line, where level is greater than 3.
2539 Argument 1: level of section.
2541 @item begin-underline
2542 Beginning of underlined text.
2544 @item end-underline
2545 End of underlined text.
2547 @item begin-literal
2548 Beginning of verbatim text.  This includes @verb{|<code>|} tags and
2549 =teletype text=.
2551 @item end-literal
2552 End of verbatim text.  This includes @verb{|<code>|} tags and =teletype
2553 text=.
2555 @item begin-emph
2556 Beginning of the first level of emphasized text.
2558 @item end-emph
2559 End of the first level of emphasized text.
2561 @item begin-more-emph
2562 Beginning of the second level of emphasized text.
2564 @item end-more-emph
2565 End of the second level of emphasized text.
2567 @item begin-most-emph
2568 Beginning of the third (and final) level of emphasized text.
2570 @item end-most-emph
2571 End of the third (and final) level of emphasized text.
2573 @item begin-verse
2574 Beginning of verse text.
2576 @item verse-space
2577 String used to each space that is further indented than the beginning of
2578 the verse.
2580 @item begin-verse-line
2581 Beginning of a line of verse.
2583 @item empty-verse-line
2584 End of a line of verse.
2586 @item begin-last-stanza-line
2587 Beginning of the last line of a verse stanza.
2589 @item end-last-stanza-line
2590 End of the last line of a verse stanza.
2592 @item end-verse
2593 End of verse text.
2595 @item begin-example
2596 Beginning of an example region.  To make use of this, an
2597 @samp{<example>} tag is needed.
2599 @item end-example
2600 End of an example region.  To make use of this, an @samp{</example>} tag
2601 is needed.
2603 @item begin-center
2604 Begin a centered line.
2606 @item end-center
2607 End a centered line.
2609 @item begin-quote
2610 Begin a quoted region.
2612 @item end-quote
2613 End a quoted region.
2615 @item begin-uli
2616 Begin an unordered list.
2618 @item end-uli
2619 End an unordered list.
2621 @item begin-uli-item
2622 Begin an unordered list item.
2624 @item end-uli-item
2625 End an unordered list item.
2627 @item begin-oli
2628 Begin an ordered list.
2630 @item end-oli
2631 End an ordered list.
2633 @item begin-oli-item
2634 Begin an ordered list item.
2636 @item end-oli-item
2637 End an ordered list item.
2639 @item begin-dl
2640 Begin a definition list.
2642 @item end-dl
2643 End a definition list.
2645 @item begin-dl-item
2646 Begin a definition list item.
2648 @item end-dl-item
2649 End a definition list item.
2651 @item begin-ddt
2652 Begin a definition list term.
2654 @item end-ddt
2655 End a definition list term.
2657 @item begin-dde
2658 Begin a definition list entry.
2660 @item end-dde
2661 End a definition list entry.
2663 @item begin-table
2664 Begin a table.
2666 @item end-table
2667 End a table.
2669 @item begin-table-group
2670 Begin a table grouping.
2672 @item end-table-group
2673 End a table grouping.
2675 @item begin-table-row
2676 Begin a table row.
2678 @item end-table-row
2679 End a table row.
2681 @item begin-table-entry
2682 Begin a table entry.
2684 @item end-table-entry
2685 End a table entry.
2687 @end table
2689 @node Markup Tags, Style Elements, Markup Strings, Common Elements
2690 @comment  node-name,  next,  previous,  up
2691 @subsection Tag specifications for special markup
2692 @cindex publishing, markup tags
2694 @anchor{muse-publish-markup-tags}
2695 @code{muse-publish-markup-tags}
2697 A list of tag specifications, for specially marking up text.
2699 XML-style tags are the best way to add custom markup to Muse.  This is
2700 easily accomplished by customizing this list of markup tags.
2702 For each entry, the name of the tag is given, whether it expects a
2703 closing tag and/or an optional set of attributes, whether it is
2704 nestable, and a function that performs whatever action is desired within
2705 the delimited region.
2707 The tags themselves are deleted during publishing, before the function
2708 is called.  The function is called with three arguments, the beginning
2709 and end of the region surrounded by the tags.  If properties are
2710 allowed, they are passed as a third argument in the form of an alist.
2711 The `end' argument to the function is always a marker.
2713 Point is always at the beginning of the region within the tags, when the
2714 function is called.  Wherever point is when the function finishes is
2715 where tag markup will resume.
2717 These tag rules are processed once at the beginning of markup, and once
2718 at the end, to catch any tags which may have been inserted in-between.
2720 @node Style Elements, , Markup Tags, Common Elements
2721 @comment  node-name,  next,  previous,  up
2722 @subsection Parameters used for defining styles
2723 @cindex publishing, style elements
2725 Style elements are tags that define a style.  Use
2726 @code{muse-define-style} to create a new style.
2728 @example
2729 (muse-define-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2730 @end example
2732 @subheading Usable elements
2734 @table @option
2736 @item :suffix
2737 File extension to use for publishing files with this style.
2739 @item :link-suffix
2740 File extension to use for publishing links to Muse files with this
2741 style.
2743 @item :osuffix
2744 File extension to use for publishing second-stage files with this style.
2746 For example, PDF publishing generates a LaTeX file first, then a PDF
2747 from that LaTeX file.
2749 @item :regexps
2750 List of markup rules for publishing a page with Muse.
2751 @xref{muse-publish-markup-regexps}.
2753 @item :functions
2754 An alist of style types to custom functions for that kind of text.
2755 @xref{muse-publish-markup-functions}.
2757 @item :strings
2758 Strings used for marking up text with this style.
2760 These cover the most basic kinds of markup, the handling of which
2761 differs little between the various styles.
2763 @item :tags
2764 A list of tag specifications, used for handling extra tags.
2765 @xref{muse-publish-markup-tags}.
2767 @item :specials
2768 A table of characters which must be represented specially.
2770 @item :before
2771 A function that is to be executed on the newly-created publishing buffer
2772 (or the current region) before any publishing occurs.
2774 This is used to set extra parameters that direct the publishing process.
2776 @item :before-end
2777 A function that is to be executed on the publishing buffer (or the
2778 current region) immediately after applying all of the markup regexps.
2780 This is used to fix the order of table elements (header, footer, body)
2781 in XML-ish styles.
2783 @item :after
2784 A function that is to be executed on the publishing buffer after
2785 :before-end, and immediately after inserting the header and footer.
2787 This is used for generating the table of contents as well as setting the
2788 file coding system.
2790 @item :final
2791 A function that is to be executed after saving the published file, but
2792 while still in its buffer.
2794 This is used for generating second-stage documents like PDF files from
2795 just-published LaTeX files.
2797 @item :header
2798 Header used for publishing files of this style.
2800 This may be a variable, text, or a filename.  It is inserted at the
2801 beginning of a file, after evaluating the publishing markup.
2803 @item :footer
2804 Footer used for publishing files of this style.
2806 This may be a variable, text, or a filename.  It is inserted at the end
2807 of a file, after evaluating the publishing markup.
2809 @item :style-sheet
2810 Style sheet used for publishing files of this style.
2812 This may be a variable or text.  It is used in the header of HTML and
2813 XHTML based publishing styles.
2815 @item :browser
2816 The function used to browse the published result of files of this style.
2818 @end table
2820 @node Deriving Styles, , Common Elements, Extending Muse
2821 @comment  node-name,  next,  previous,  up
2822 @section Deriving a new style from an existing one
2823 @cindex publishing styles, deriving
2825 To create a new style from an existing one, use @code{muse-derive-style}
2826 as follows.  This is a good way to fix something you don't like about a
2827 particular publishing style, or to personalize it.
2829 @example
2830 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
2831 @end example
2833 The derived name is a string defining the new style, such as "my-html".
2834 The base name must identify an existing style, such as "html" -- if you
2835 have loaded @file{muse-html}.  The style parameters are the same as
2836 those used to create a style, except that they override whatever
2837 definitions exist in the base style.  However, some definitions only
2838 partially override.  The following parameters support partial
2839 overriding.
2841 @xref{Style Elements}, for a complete list of all parameters.
2843 @table @option
2845 @item :functions
2846 If a markup function is not found in the derived style's function list,
2847 the base style's function list will be queried.
2849 @item :regexps
2850 All regexps in the current style and the base style(s) will be used.
2852 @item :strings
2853 If a markup string is not found in the derived style's string list, the
2854 base style's string list will be queried.
2856 @end table
2859 @node Getting Help and Reporting Bugs, History, Extending Muse, Top
2860 @comment  node-name,  next,  previous,  up
2861 @chapter Getting Help and Reporting Bugs
2862 @cindex help, getting
2863 @cindex bugs, reporting
2865 After you have read this guide, if you still have questions about
2866 Muse, or if you have bugs to report, there are several places you can
2869 @itemize @bullet
2871 @item
2872 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsMuse} is the
2873 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
2874 to it.
2876 @item
2877 @uref{http://www.mwolson.org/projects/EmacsMuse.html} is the web page
2878 that Michael Olson (the current maintainer) made for Muse.
2880 @item
2881 Muse has four mailing lists.
2883 @table @samp
2885 @item muse-el-announce
2886 Low-traffic list for Muse-related announcements.
2888 You can join this mailing list (@email{muse-el-announce@@gna.org})
2889 using the subscription form at
2890 @url{http://mail.gna.org/listinfo/muse-el-announce/}.  This
2891 mailing list is also available via Gmane (@url{http://gmane.org/}). The
2892 group is called @samp{gmane.emacs.muse.announce}.
2894 @item muse-el-discuss
2895 Discussion, bugfixes, suggestions, tips, and the like for Muse.
2896 This mailing list also includes the content of muse-el-announce.
2898 You can join this mailing list (@email{muse-el-discuss@@gna.org})
2899 using the subscription form at
2900 @url{http://mail.gna.org/listinfo/muse-el-discuss/}.  This mailing
2901 list is also available via Gmane with the identifier
2902 @samp{gmane.emacs.muse.general}.
2904 @item muse-el-logs
2905 Log messages for commits made to Muse.
2907 You can join this mailing list (@email{muse-el-logs@@gna.org}) using
2908 the subscription form at
2909 @url{http://mail.gna.org/listinfo/muse-el-logs/}.  This mailing list
2910 is also available via Gmane with the identifier
2911 @samp{gmane.emacs.muse.scm}.
2913 @item muse-el-commits
2914 Generated bug reports for Emacs Muse.  If you use our bug-tracker at
2915 @url{https://gna.org/bugs/?group=muse-el}, the bug reports will be
2916 sent to this list automatically.
2918 You can join this mailing list (@email{muse-el-commits@@gna.org}) using
2919 the subscription form at
2920 @url{http://mail.gna.org/listinfo/muse-el-commits/}.  This mailing list
2921 is also available via Gmane with the identifier
2922 @samp{gmane.emacs.muse.cvs}.
2924 @item muse-el-internationalization
2925 Discussion of translation of the Muse website and documentation into
2926 many languages.
2928 You can join this mailing list
2929 (@email{muse-el-internationalization@@gna.org}) using the subscription
2930 form at @url{http://mail.gna.org/listinfo/internationalization/}.  This
2931 mailing list is also available via Gmane with the identifier
2932 @samp{gmane.emacs.muse.internationalization}.
2934 @end table
2936 @item
2937 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
2938 contributors are frequently around and willing to answer your
2939 questions.  The @samp{#muse} channel is also available for
2940 Muse-specific help, and its current maintainer hangs out there.
2942 @item
2943 The maintainer of Emacs Muse, Michael Olson, may be contacted at
2944 @email{mwolson@@gnu.org}.  He can be rather slow at answering email, so
2945 it is often better to use the muse-el-discuss mailing list.
2947 @end itemize
2949 @node History, Contributors, Getting Help and Reporting Bugs, Top
2950 @comment  node-name,  next,  previous,  up
2951 @chapter History of This Document
2952 @cindex history, of Muse
2954 @itemize
2955 @item 2004
2956 John Wiegley started Muse upon realizing that EmacsWiki had some serious
2957 limitations. Around February 2004, he started making "emacs-wiki version
2958 3.00 APLHA", which eventually became known as Muse.
2960 Most of those who frequent the emacs-wiki mailing list continued to use
2961 emacs-wiki, mainly because Planner hasn't been ported over to it.
2963 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
2964 John Wiegley's request.
2966 @item 2005
2967 Michael Olson overhauled this document and added many new sections in
2968 preparation for the first release of Muse (3.01).
2970 @end itemize
2972 @node Contributors, GNU Free Documentation License, History, Top
2973 @comment  node-name,  next,  previous,  up
2974 @chapter Contributors to This Documentation
2975 @cindex contributors
2977 The first draft of this document was taken from the emacs-wiki texinfo
2978 manual.  Michael Olson adapted it for Muse and added most of its
2979 content.
2981 John Sullivan did a majority of the work on the emacs-wiki texinfo
2982 manual.
2984 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
2985 emacs-wiki texinfo manual.
2988 @include doclicense.texi
2991 @node Concept Index,  , GNU Free Documentation License, Top
2992 @comment  node-name,  next,  previous,  up
2993 @unnumbered Index
2995 @printindex cp
2997 @bye