Document WikiNames and update header publishing information.
[muse-el.git] / muse.texi
blobda5551e33e5269bdf0034bd8cad9ac216133472d
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 the Emacs Muse version 3.01.91 (3.02 RC2).
17 Copyright (C) 2004, 2005 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 General Public License.
22 @end quotation
23 @end copying
25 @titlepage
26 @title Muse manual
27 @subtitle an authoring and publishing environment
28 @subtitle for GNU Emacs and XEmacs
30 @c The following two commands
31 @c start the copyright page.
32 @page
33 @vskip 0pt plus 1filll
34 @insertcopying
35 @end titlepage
37 @c So the toc is printed at the start
38 @contents
40 @ifnottex
41 @node Top, Preface, (dir), (dir)
42 @comment  node-name,  next,  previous,  up
43 @top Muse
45 @insertcopying
46 @end ifnottex
48 @menu
49 * Preface::                     About the documentation.
50 * Introduction::                What is Muse?
51 * Obtaining Muse::              How to get Muse releases and development
52                                   changes.
53 * Installation::                Compiling and installing Muse.
54 * Getting Started::             Settings for Muse.
55 * Projects::                    Creating and managing Muse projects.
56 * Keystroke Summary::           Keys used in Muse mode.
57 * Markup Rules::                Rules for using markup.
58 * Publishing Styles::           Publishing various types of documents.
59 * Getting Help and Reporting Bugs::  
60 * History::                     History of this document.
61 * Contributors::                Contributors to this documentation.
62 * GNU General Public License::  The license for this manual and Muse.
63 * Concept Index::               Search for terms.
65 @detailmenu
66  --- The Detailed Node Listing ---
68 How to Get Muse Releases and Development Changes
70 * Releases::                    Released versions of Muse.
71 * Development::                 Latest unreleased development changes.
73 Rules for Using Markup
75 * Paragraphs::                  Paragraphs: centering and quoting.
76 * Headings::                    Levels of headings.
77 * Emphasizing Text::            Bold, italicized, and underlined text.
78 * Footnotes::                   Making notes to be shown at the end.
79 * Verse::                       Indicating poetic stanzas.
80 * Lists::                       Lists of items.
81 * Tables::                      Generation of data tables.
82 * Explicit Links::              Hyperlinks and email addresses with
83                                   descriptions.
84 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
85                                   links.
86 * Images::                      Publishing and displaying images.
87 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
88 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
89                                   for extensibility.
91 Publishing Various Types of Documents
93 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
94 * Book::                        Publishing entries into a compilation.
95 * DocBook::                     Publishing in DocBook XML form.
96 * HTML::                        Publishing in HTML or XHTML form.
97 * Journal::                     Keeping a journal or blog.
98 * LaTeX::                       Publishing LaTeX documents.
99 * Poem::                        Publish a poem to LaTex or PDF.
100 * Texinfo::                     Publish entries to Texinfo format or PDF.
101 * Common Elements::             Common functionality shared by styles.
102 * Deriving Styles::             Deriving a new style from an existing
103                                   one.
105 Integrating Muse and pyblosxom.cgi
107 * Blosxom Requirements::        Other tools needed to the Blosxom style.
108 * Blosxom Entries::             Format of a Blosxom entry and automation.
109 * Blosxom Options::             Blosxom styles and options provided.
111 @end detailmenu
112 @end menu
114 @node Preface, Introduction, Top, Top
115 @comment  node-name,  next,  previous,  up
116 @chapter About the documentation
118 This document describes Muse, which was written by John Wiegley
119 and is now maintained by Michael Olson.  Several versions of it are
120 available on-line.
122 @itemize @bullet
123 @item PDF: http://www.mwolson.org/static/doc/muse.pdf
124 @item HTML (single file): http://www.mwolson.org/static/doc/muse.html
125 @item HTML (multiple files): http://www.mwolson.org/static/doc/muse/
126 @end itemize
128 @node Introduction, Obtaining Muse, Preface, Top
129 @comment  node-name,  next,  previous,  up
130 @chapter What is Muse?
132 Emacs Muse is an authoring and publishing environment for Emacs.  It
133 simplifies the process of writing documents and publishing them to
134 various output formats.
136 Muse consists of two main parts: an enhanced text-mode for authoring
137 documents and navigating within Muse projects, and a set of publishing
138 styles for generating different kinds of output.
140 This idea is not in any way new. Numerous systems exist -- even one
141 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
142 more modular environment, with a rather simple core, in which "styles"
143 are derived from to create new styles. Much of Muse's overall
144 functionality is optional. For example, you can use the publisher
145 without the major-mode, or the mode without doing any publishing; or if
146 you don't load the Texinfo or LaTeX modules, those styles won't be
147 available.
149 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
150 code has been restructured and rewritten, especially its publishing
151 functions. The focus in this revision is on the authoring and publishing
152 aspects, and the "wikiness" has been removed as a default behavior (to
153 be offered again as an optional module). CamelCase words are no longer
154 special by default.
156 @node Obtaining Muse, Installation, Introduction, Top
157 @comment  node-name,  next,  previous,  up
158 @chapter How to Get Muse Releases and Development Changes
160 @menu
161 * Releases::                    Released versions of Muse.
162 * Development::                 Latest unreleased development changes.
163 @end menu
165 @node Releases, Development, Obtaining Muse, Obtaining Muse
166 @comment  node-name,  next,  previous,  up
167 @section Released versions of Muse
169 Choose to install a release if you want to minimize risk.
171 Errors are corrected in development first.  User-visible changes will be
172 announced on the @email{emacs-wiki-discuss@@nongnu.org} mailing list.
173 This mailing list also provides support for @command{Planner} and
174 @command{emacs-wiki}, which is the predecessor of Muse.
175 @pxref{Getting Help and Reporting Bugs}.
177 @cindex releases, Debian package
178 @cindex Debian package for Muse
179 Debian users can get Muse via apt-get.  The @file{muse-el} package is
180 available both at Michael Olson's Debian repository and the official
181 Debian repository.  To make use of the former, add the following line to
182 your @file{/etc/apt/sources.list} file and run @code{apt-get install
183 muse}.
185 @example
186 deb http://www.mwolson.org/debian/ ./
187 @end example
189 @cindex releases, from source
190 Alternatively, you can download the latest release from
191 @uref{http://www.mwolson.org/static/dist/muse/} .
193 @node Development,  , Releases, Obtaining Muse
194 @comment  node-name,  next,  previous,  up
195 @section Latest unreleased development changes
196 @cindex development
198 Choose the development version if you want to live on the bleeding edge
199 of Muse development or try out new features before release.
201 @cindex arch revision control system, using
202 The Arch revision control system allows you to retrieve previous
203 versions and select specific features and bug fixes.  If you would like
204 to contribute to Muse development, it is highly recommended that you use
205 Arch, but this is not a requirement.
207 If you are new to Arch, you might find this tutorial helpful:
208 @uref{http://www.mwolson.org/projects/ArchTutorial.html}.
210 Downloading the Muse module with Arch and staying up-to-date involves
211 the following steps.
213 @enumerate
214 @item Install arch
216 @itemize @bullet
217 @item Debian: @kbd{apt-get install tla}.
218 @item Other distributions: see @uref{http://regexps.srparish.net/www/}.
219 @end itemize
221 @item Register the archive.
222 @example
223 tla register-archive -f http://www.mwolson.org/archives/2005
224 @end example
226 @item Download the Muse package.
227 @example
228 # Download Muse into the @file{muse} directory.
229 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
230 @end example
232 @item List upstream changes that are missing from your local copy.
233 Do this whenever you want to see whether new changes have been committed
234 to Muse.
236 @example
237 # Change to the source directory you are interested in.
238 cd muse/
240 # Display the summary of changes
241 tla missing --summary
242 @end example
244 @cindex updating Muse with Arch
245 @item Update to the latest version by replaying missing changes.
246 @example
247 cd muse
248 tla replay
249 @end example
251 @end enumerate
253 There are other ways to interact with the Muse archive.
255 @itemize
256 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
257 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
258 @end itemize
260 The latest development snapshot will be kept up-to-date since it is
261 updated at the same time as the Arch repository.
263 @node Installation, Getting Started, Obtaining Muse, Top
264 @comment  node-name,  next,  previous,  up
265 @chapter Compiling and Installing Muse
267 Muse may be compiled and installed on your machine.
269 @emph{Compilation}
271 This is an optional step, since Emacs Lisp source code does not
272 necessarily have to be byte-compiled.  It will yield a speed increase,
273 though.
275 A working copy of Emacs or XEmacs is needed in order to compile the
276 Emacs Muse.  By default, the program that is installed with the name
277 @command{emacs} will be used.
279 If you want to use the @command{xemacs} binary to perform the
280 compilation, you would need to edit @file{Makefile.defs} in the
281 top-level directory as follows.  You can put either a full path to an
282 Emacs or XEmacs binary or just the command name, as long as it is in the
283 @env{PATH}.
285 @example
286 EMACS    = xemacs
287 SITEFLAG = -no-site-file
288 @end example
290 Running @code{make} should compile the Muse source files in the
291 @file{lisp} directory.
293 @emph{Installation}
295 Muse may be installed into your file hierarchy by doing the following.
297 Edit the @file{Makefile.defs} file so that @env{ELISPDIR} points to
298 where you want the source and compiled Muse files to be installed and
299 @env{INFODIR} indicates where to put the Muse manual.  Of course, you
300 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
301 Compilation section if you are using XEmacs.
303 If you are installing Muse on a Debian system, you might want to change
304 the value of @env{INSTALLINFO} as specified in @file{Makefile.defs}.
306 If you wish to install Muse to different locations than the defaults
307 specify, edit @file{Makefile.defs} accordingly.
309 Run @code{make} as a normal user.
311 Run @code{make install} as the root user if you have chosen installation
312 locations that require this.
315 @node Getting Started, Projects, Installation, Top
316 @comment  node-name,  next,  previous,  up
317 @chapter Getting Started
318 @cindex settings
320 To use Muse, add the directory containing its files to your
321 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
322 the authoring mode, and the styles you wish to publish to.  An example
323 follows.
325 @lisp
326 (add-to-list 'load-path "<path to Muse>")
328 (require 'muse-mode)     ; load authoring mode
330 (require 'muse-html)     ; load publishing styles I use
331 (require 'muse-latex)
332 (require 'muse-texinfo)
333 (require 'muse-docbook)
334 @end lisp
336 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
337 an input document to any available style.  If you enable
338 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
339 command will be bound to @kbd{C-c C-t}.
341 If the currently opened file is part of a defined project in
342 @code{muse-project-alist}, it may be published using @kbd{C-c C-p}.
344 You should also type @kbd{M-x customize-group}, and give the name
345 @samp{muse}.  Change it to suit your preferences.  Each of the
346 options has its own documentation.
349 @node Projects, Keystroke Summary, Getting Started, Top
350 @comment  node-name,  next,  previous,  up
351 @chapter Creating and Managing Muse Projects
352 @cindex projects
354 Often you will want to publish all the files within a directory to a
355 particular set of output styles automatically.  To support, Muse
356 allows for the creations of "projects".  Here is a sample project, to
357 be defined in your @file{.emacs} file.
359 @lisp
360 (require 'muse-project)
362 (setq muse-project-alist
363       '(("website"                      ; my various writings
364          ("~/Pages" :default "index")
365          (:base "html" :path "~/public_html")
366          (:base "pdf" :path "~/public_html/pdf"))))
367 @end lisp
369 The above defines a project named "website", whose files are located
370 in the directory @file{~/Pages}.  The default page to visit is
371 @file{index}.  When this project is published, each page will be
372 output as HTML to the directory @file{~/public_html}, and as PDF to
373 the directory @file{~/public_html/pdf}.  Within any project page, you
374 may create a link to other pages using the syntax @samp{[[pagename]]}.
377 @node Keystroke Summary, Markup Rules, Projects, Top
378 @comment  node-name,  next,  previous,  up
379 @chapter Keys Used in Muse Mode
380 @cindex keystrokes
382 This is a summary of keystrokes available in every Muse buffer.
384 @table @kbd
386 @item C-c C-a (`muse-index')
387 Display an index of all known Muse pages.
389 @item C-c C-b (`muse-browse-result')
390 Show the published result of this page.
392 @item C-c C-e (`muse-edit-link-at-point')
393 Edit link at point.
395 @item C-c C-f (`muse-project-find-file'), also C-c C-v
396 Open another Muse page.  Prompt for the name.
398 @item C-c C-l (`font-lock-mode')
399 Highlight/refresh the current buffer.
401 @item C-c C-p (`muse-project-publish')
402 Publish any Muse pages that have changed.
404 @item C-c C-v (`muse-project-find-file'), also C-c C-f
405 Open another Muse page.  Prompt for the name.
407 @item C-c = (`muse-what-changed')
408 Diff this page against the last backup version.
410 @item C-c TAB (`muse-insert-tag')
411 Insert a tag interactively.
413 @item TAB
414 Move to the next Wiki reference.
416 @item S-TAB
417 Move to the previous Wiki reference.
419 @end table
422 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
423 @comment  node-name,  next,  previous,  up
424 @chapter Rules for Using Markup
425 @cindex markup
427 A Muse document uses special, contextual markup rules to determine how
428 to format the output result.  For example, if a paragraph is indented,
429 Muse assumes it should be quoted.
431 There are not too many markup rules, and all of them strive to be as
432 simple as possible so that you can focus on document creation, rather
433 than formatting.
435 @menu
436 * Paragraphs::                  Paragraphs: centering and quoting.
437 * Headings::                    Levels of headings.
438 * Emphasizing Text::            Bold, italicized, and underlined text.
439 * Footnotes::                   Making notes to be shown at the end.
440 * Verse::                       Indicating poetic stanzas.
441 * Lists::                       Lists of items.
442 * Tables::                      Generation of data tables.
443 * Explicit Links::              Hyperlinks and email addresses with
444                                   descriptions.
445 * Implicit Links::              Bare URLs, WikiNames, and InterWiki
446                                   links.
447 * Images::                      Publishing and displaying images.
448 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
449 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
450                                   for extensibility.
451 @end menu
453 @node Paragraphs, Headings, Markup Rules, Markup Rules
454 @comment  node-name,  next,  previous,  up
455 @section Paragraphs: centering and quoting
456 @cindex paragraphs
458 Paragraphs in Muse must be separated by a blank line.
460 @cindex paragraphs, centered
461 @strong{Centered paragraphs and quotations}
463 A line that begins with six or more columns of whitespace (either tabs
464 or spaces) indicates a centered paragraph.
466 @cindex paragraphs, quoted
467 @cindex quotations
468 But if a line begins with whitespace, though less than six columns, it
469 indicates a quoted paragraph.
471 @cindex examples
472 @cindex monospace, rendering blocks
473 @cindex HTML, rendering blocks in monospace
474 @strong{Literal paragraphs}
476 The @verb{|<example>|} tag is used for examples, where whitespace should
477 be preserved, the text rendered in monospace, and any characters special
478 to the output style escaped.
480 @cindex literal text
481 @cindex HTML, inserting a raw block
482 There is also the @verb{|<literal>|} tag, which causes a marked block to
483 be entirely left alone.  This can be used for inserting a hand-coded
484 HTML blocks into HTML output, for example.
486 @node Headings, Emphasizing Text, Paragraphs, Markup Rules
487 @comment  node-name,  next,  previous,  up
488 @section Levels of headings
489 @cindex headings
491 A heading becomes a chapter or section in printed output -- depending on
492 the style.  To indicate a heading, start a new paragraph with one or
493 more asterices, followed by a space and the heading title.  Then begin
494 another paragraph to enter the text for that section.
496 All levels of headings will be published.  Most publishing styles only
497 distinguish the between the first 4 levels, however.
499 @example
500 * First level
502 ** Second level
504 *** Third level
506 **** Fourth level
507 @end example
509 @node Emphasizing Text, Footnotes, Headings, Markup Rules
510 @comment  node-name,  next,  previous,  up
511 @section Bold, italicized, and underlined text
512 @cindex emphasizing text
513 @cindex underlining text
514 @cindex italicizing text
515 @cindex verbatim text
516 @cindex monospace, rendering words
518 To emphasize text, surround it with certain specially recognized
519 characters.
521 @example
522 *emphasis*
523 **strong emphasis**
524 ***very strong emphasis***
525 _underlined_
526 =verbatim and monospace=
527 @end example
529 @cindex WYSIWYG
530 While editing a Muse document in Muse mode, these forms of emphasis will
531 be highlighted in a WYSIWYG manner.  Each of these forms may span
532 multiple lines.
534 Verbatim text will be colored as gray by default.  To change this,
535 customize @code{muse-verbatim-face}.
537 @node Footnotes, Verse, Emphasizing Text, Markup Rules
538 @comment  node-name,  next,  previous,  up
539 @section Making notes to be shown at the end
540 @cindex footnotes
542 A footnote reference is simply a number in square brackets.  To define
543 the footnote, place this definition at the bottom of your file.
544 @samp{footnote-mode} can be used to greatly facilitate the creation of
545 these kinds of footnotes.
547 Footnotes are defined by the same number in brackets occurring at the
548 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
549 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
550 the point of insertion.
552 @node Verse, Lists, Footnotes, Markup Rules
553 @comment  node-name,  next,  previous,  up
554 @section Indicating poetic stanzas
555 @cindex verses
556 @cindex poetry
558 Poetry requires that whitespace be preserved, but without resorting to
559 monospace.  To indicate this, use the following markup, reminiscent of
560 email quotations.
562 @example
563 > A line of Emacs verse;
564 >   forgive its being so terse.
565 @end example
567 You can also use the @verb{|<verse>|} tag, if you prefer.
569 @example
570 <verse>
571 A line of Emacs verse;
572   forgive its being so terse.
573 </verse>
574 @end example
576 @cindex verses, multiple stanzas
577 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
578 follows.
580 @example
581 <verse>
582 A line of Emacs verse;
583   forgive its being so terse.
585 This a second stanza:
586 Something longer should go here,
587 But the author is out of ideas.
588 </verse>
589 @end example
591 @node Lists, Tables, Verse, Markup Rules
592 @comment  node-name,  next,  previous,  up
593 @section Lists of items
594 @cindex lists
596 Lists are given using special characters at the beginning of a line.
597 Whitespace must occur before bullets or numbered items, to distinguish
598 from the possibility of those characters occurring in a real sentence.
600 @cindex lists, bullets
601 These are rendered as a bullet list.
603 @example
604  - bullet item one
605  - bullet item two
606 @end example
608 @cindex lists, enumerated
609 An enumerated list follows.
611 @example
612  1. Enum item one
613  2. Enum item two
614 @end example
616 @cindex lists, definitions
617 Here is a definition list.
619 @example
620 Term1 ::
621   This is a first definition
622   And it has two lines;
623   no, make that three.
625 Term2 ::
626   This is a second definition
627 @end example
629 @node Tables, Explicit Links, Lists, Markup Rules
630 @comment  node-name,  next,  previous,  up
631 @section Generation of data tables
632 @cindex tables
634 @cindex tables, simple
635 Only very simple tables are supported.  The syntax is as follows.
637 @example
638   Double bars  || Separate header fields
640   Single bars   | Separate body fields
641   Here are more | body fields
643   Triple bars ||| Separate footer fields
644 @end example
646 Some publishing styles require header fields to come first, then footer
647 fields, and then the body fields.  You can use any order for these
648 sections that you like, and Muse will re-order them for you at
649 publish-time.
651 @node Explicit Links, Implicit Links, Tables, Markup Rules
652 @comment  node-name,  next,  previous,  up
653 @section Hyperlinks and email addresses with descriptions
654 @cindex links, explicit
656 A hyperlink can reference a URL, or another page within a Muse
657 project.  In addition, descriptive text can be specified, which should
658 be displayed rather than the link text in output styles that supports
659 link descriptions.  The syntax is as follows.
661 @example
662 [[link target][link description]]
663 [[link target without description]]
664 @end example
666 Thus, the current maintainer's homepage for Muse can be found
667 @samp{[[http://www.mwolson.org/projects/MuseMode.html][here]]},
668 or at @samp{[[http://www.mwolson.org/projects/MuseMode.html]]}.
670 @node Implicit Links, Images, Explicit Links, Markup Rules
671 @comment  node-name,  next,  previous,  up
672 @section Bare URLs, WikiNames, and InterWiki links
673 @cindex links, implicit
674 @cindex links, raw
675 @cindex URLs
676 @cindex Email addresses
678 A URL or email address encountered in the input text is published as a
679 hyperlink.  These kind of links are called @dfn{implicit links} because
680 they are not separated from the rest of the Muse document in any way.
682 @cindex WikiNames
683 If the @command{muse-wiki} module is loaded, another form of implicit
684 link will be made available.  WikiNames, which are typed in camelcase,
685 will be highlighted and published as links, provided that the file they
686 refer to exists.
688 @cindex InterWiki links
689 @cindex inter-project links
690 The @command{muse-wiki} module also allows for InterWiki links.  These
691 are similar to WikiWords, but they specify both the project and page of
692 a file.  The names of your project entries in @code{muse-project-alist}
693 will be used as InterWiki names by default.  Several examples follow.
695 @example
696 Blog::DocumentingMuse
697 Projects#MuseMode
698 Website
699 @end example
701 In the first case, the interwiki delimiter is @samp{::}, @samp{Blog} is
702 the project name, and @samp{DocumentingMuse} is the page name.  In the
703 second example, @samp{#} is the interwiki delimiter.  If the name of a
704 project occurs by itself in text, like the third case, it will be
705 colorized and published as a link to the default page of the given
706 project.
708 Customization of interwiki links may be accomplished by editing the
709 @code{muse-wiki-interwiki-alist} option.
711 @node Images, Horizontal Rules and Anchors, Implicit Links, Markup Rules
712 @comment  node-name,  next,  previous,  up
713 @section Publishing and displaying images
714 @cindex images
715 @cindex links, with images
716 @strong{Image links}
718 Links to images may be used in either the target or the description, or
719 both.  Thus, the following code will publish as a clickable image that
720 points to @url{http://www.mwolson.org/}.
722 @example
723 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
724 @end example
726 @cindex images, displaying
727 @cindex images, inlined
728 @cindex images, local
729 If a link to a locally-available image is encountered in the link
730 description, Muse mode will attempt to display it if your version of
731 Emacs permits this.  The following example will display correctly and
732 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
733 exists in the @file{../pics/} directory.
735 @example
736 [[TestPage][../pics/TestLogo.png]]
737 @end example
739 @cindex images, without a description
740 An image link is not required to have a description.  The link
741 @samp{[[../myimage.png]]} will display and publish as expected.
743 @node Horizontal Rules and Anchors, Embedded Lisp, Images, Markup Rules
744 @comment  node-name,  next,  previous,  up
745 @section Inserting a horizontal line or anchor
747 @cindex horizontal rules
748 @cindex dashes
749 @strong{Horizontal Rules}
751 Four or more dashes indicate a horizontal rule.  Be sure to put blank
752 lines around it, or it will be considered part of the proceeding or
753 following paragraph!
755 @cindex anchors
756 @cindex links, with target on same page
757 @strong{Anchors}
759 If you begin a line with "#anchor" -- where "anchor" can be any word
760 that doesn't contain whitespace -- it defines an anchor at that point
761 into the document.  This point can be referenced using "page#anchor" as
762 the target in a Muse link.
764 @node Embedded Lisp, , Horizontal Rules and Anchors, Markup Rules
765 @comment  node-name,  next,  previous,  up
766 @section Evaluating Emacs Lisp code in documents for extensibility
767 @cindex lisp, embedded
769 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
770 which is the only Muse tag supported in a style's header and footer
771 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
772 text you wish.  The inserted output will get marked up, if the
773 @verb{|<lisp>|} tag appears within the main text of the document.
775 @example
776 <lisp>(concat "This form gets " "inserted")</lisp>
777 @end example
779 @cindex lisp, and insert command
780 Note that you should not use the @code{insert} command within a set of
781 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
782 tags will be automatically inserted into the document.
784 @node Publishing Styles, Getting Help and Reporting Bugs, Markup Rules, Top
785 @comment  node-name,  next,  previous,  up
786 @chapter Publishing Various Types of Documents
787 @cindex publishing styles
789 One of the principle features of Muse is the ability to publish a simple
790 input text to a variety of different output styles.  Muse also makes it
791 easy to create new styles, or derive from an existing style.
793 @menu
794 * Blosxom::                     Integrating Muse and pyblosxom.cgi.
795 * Book::                        Publishing entries into a compilation.
796 * DocBook::                     Publishing in DocBook XML form.
797 * HTML::                        Publishing in HTML or XHTML form.
798 * Journal::                     Keeping a journal or blog.
799 * LaTeX::                       Publishing LaTeX documents.
800 * Poem::                        Publish a poem to LaTex or PDF.
801 * Texinfo::                     Publish entries to Texinfo format or PDF.
802 * Common Elements::             Common functionality shared by styles.
803 * Deriving Styles::             Deriving a new style from an existing
804                                   one.
805 @end menu
807 @node Blosxom, Book, Publishing Styles, Publishing Styles
808 @comment  node-name,  next,  previous,  up
809 @section Integrating Muse and pyblosxom.cgi
810 @cindex blog, one-file-per-entry style
812 The Blosxom publishing style publishes a tree of categorised files to a
813 mirrored tree of stories to be served by blosxom.cgi or pyblosxom.cgi.
814 In other words, each blog entry corresponds with one file.
816 @menu
817 * Blosxom Requirements::        Other tools needed to the Blosxom style.
818 * Blosxom Entries::             Format of a Blosxom entry and automation.
819 * Blosxom Options::             Blosxom styles and options provided.
820 @end menu
822 @node Blosxom Requirements, Blosxom Entries, Blosxom, Blosxom
823 @comment  node-name,  next,  previous,  up
824 @subsection Other tools needed to the Blosxom style
826 You will need to have @command{pyblosxom.cgi} or @command{blosxom.cgi}
827 installed on a machine that you have upload access to.
829 The following additional components are required in order to make the
830 date of blog entries display as something sensible.
832 @enumerate
833 @item
834 A script to gather date directives from the entire blog tree into a
835 single file.  The file must associate a blog entry with a date.
837 @item
838 A plugin for (py)blosxom that reads this file.
839 @end enumerate
841 These 2 things are provided for @command{pyblosxom.cgi} in the
842 @file{contrib/pyblosxom} subdirectory.  @file{getstamps.py} provides the
843 former service, while @file{hardcodedates.py} provides the latter
844 service.  Eventually it is hoped that a @command{blosxom.cgi} plugin and
845 script will be found/written.
847 Here is a sample listing from my @file{timestamps} file, which maps
848 each file to a date.  This can really be in any format, as long as your
849 date-gathering script and your plugin can both understand it.
851 @example
852 2005-04-01-14-16 personal/paper_cranes
853 2005-03-21 personal/spring_break_over
854 2004-10-24 personal/finished_free_culture
855 @end example
857 @node Blosxom Entries, Blosxom Options, Blosxom Requirements, Blosxom
858 @comment  node-name,  next,  previous,  up
859 @subsection Format of a Blosxom entry and automation
861 Each Blosxom file must include `#date yyyy-mm-dd', or optionally the
862 longer `#date yyyy-mm-dd-hh-mm', a title (using the #title directive),
863 plus whatever normal content is desired.
865 The date directive is not used directly by @command{pyblosxom.cgi} or
866 this program.  You need to have the two additional items from the former
867 section to make use of this feature.
869 There is a function called @code{muse-blosxom-new-entry} that will
870 automate the process of making a new blog entry.  To make use of it, do
871 the following.
873 @itemize @bullet
874 @item
875 Customize @code{muse-blosxom-base-directory} to the location that your
876 blog entries are stored.
878 @item
879 Assign the @code{muse-blosxom-new-entry} function to a key sequence.  I
880 use the following code to assign this function to @kbd{C-c p l'}.
882 @example
883 (global-set-key "\C-cpl" 'muse-blosxom-new-entry)
884 @end example
886 @item
887 You should create your directory structure ahead of time under your base
888 directory.  These directories, which correspond with category names, may
889 be nested.
891 @item
892 When you enter this key sequence, you will be prompted for the category
893 of your entry and its title.  Upon entering this information, a new file
894 will be created that corresponds with the title, but in lowercase
895 letters and having special characters converted to underscores.  The
896 title and date directives will be inserted automatically.
897 @end itemize
899 @node Blosxom Options, , Blosxom Entries, Blosxom
900 @comment  node-name,  next,  previous,  up
901 @subsection Blosxom styles and options provided
903 The following styles and options are available in the Blosxom publishing
904 style.
906 @emph{Styles provided}
908 @table @code
910 @cindex publishing styles, blosxom-html
911 @item blosxom-html
912 Publish Blosxom entries in HTML form.
914 @cindex publishing styles, blosxom-xhtml
915 @item blosxom-xhtml
916 Publish Blosxom entries in XHTML form.
918 @end table
920 @emph{Options provided}
922 @table @code
924 @item muse-blosxom-extension
925 Default file extension for publishing Blosxom files.
927 @item muse-blosxom-header
928 Header used for publishing Blosxom files.
930 This may be text or a filename.
932 @item muse-blosxom-footer
933 Footer used for publishing Blosxom files.
935 This may be text or a filename.
937 @item muse-blosxom-base-directory
938 Base directory of blog entries, used by @code{muse-blosxom-new-entry}.
940 This is the top-level directory where your blog entries may be found
941 locally.
943 @end table
945 @node Book, DocBook, Blosxom, Publishing Styles
946 @comment  node-name,  next,  previous,  up
947 @section Publishing entries into a compilation
949 This publishing style is used to output ``books'' in LaTeX or PDF
950 format.
952 Each page will become a separate chapter in the book, unless the style
953 keyword @option{:nochapters} is used, in which case they are all run
954 together as if one giant chapter.
956 You will need to call the @code{muse-book-publish-project} function in
957 order to publish this style.  An example of this may be found in John
958 Wiegley's configuration file at @file{examples/johnw/muse-johnw.el}.
960 @emph{Styles provided}
962 @table @code
964 @cindex publishing styles, book-latex
965 @item book-latex
966 Publish a book in LaTeX form.  The header and footer are different than
967 the normal LaTeX publishing mode.
969 @cindex publishing styles, book-pdf
970 @item book-pdf
971 Publish a book in PDF form.  The header and footer are different than
972 the normal PDF publishing mode.
974 @end table
976 @emph{Options provided}
978 @table @code
980 @item muse-book-before-publish-hook
981 A hook run in the book buffer before it is marked up.
983 @item muse-book-after-publish-hook
984 A hook run in the book buffer after it is marked up.
986 @item muse-book-latex-header
987 Header used for publishing books to LaTeX.
989 This may be text or a filename.
991 @item muse-book-latex-footer
992 Footer used for publishing books to LaTeX.
994 This may be text or a filename.
996 @end table
998 @node DocBook, HTML, Book, Publishing Styles
999 @comment  node-name,  next,  previous,  up
1000 @section Publishing in DocBook XML form
1002 This publishing style is used to generate DocBook XML files.
1004 @emph{Styles provided}
1006 @table @code
1008 @cindex publishing styles, docbook
1009 @item docbook
1011 @end table
1013 @emph{Options provided}
1015 @table @code
1017 @item muse-docbook-extension
1018 Default file extension for publishing DocBook XML files.
1020 @item muse-docbook-header
1021 Header used for publishing DocBook XML files.
1023 This may be text or a filename.
1025 @item muse-docbook-footer
1026 Footer used for publishing DocBook XML files.
1028 This may be text or a filename.
1030 @item muse-docbook-publishing-regexps
1031 List of markup rules for publishing a Muse page to DocBook XML.
1033 @item muse-docbook-markup-function
1034 An alist of style types to custom functions for that kind of text.
1036 @item muse-docbook-publishing-strings
1037 Strings used for marking up text.
1039 These cover the most basic kinds of markup, the handling of which
1040 differs little between the various styles.
1042 @item muse-docbook-markup-specials
1043 A table of characters which must be represented specially.
1045 @end table
1047 @node HTML, Journal, DocBook, Publishing Styles
1048 @comment  node-name,  next,  previous,  up
1049 @section Publishing in HTML or XHTML form
1051 This publishing style is capable of producing HTML or XHTML documents.
1053 @emph{Styles provided}
1055 @table @code
1057 @cindex publishing styles, html
1058 @item html
1059 Supports publishing to HTML 4.0 and HTML 4.01, Strict or Transitional.
1061 @item xhtml
1062 Supports publishing to XHTML 1.0 and XHTML 1.1, Strict or Transitional.
1064 @end table
1066 @emph{Options provided}
1068 If an HTML option does not have a corresponding XHTML option, it will
1069 be used for both of these publishing styles.
1071 @table @code
1073 @item muse-html-extension
1074 Default file extension for publishing HTML files.
1076 @item muse-html-style-sheet
1077 Store your stylesheet definitions here.
1079 This is used in @code{muse-html-header}.  You can put raw CSS in here or
1080 a @verb{|<link>|} tag to an external stylesheet.  This text may contain
1081 @verb{|<lisp>|} markup tags.
1083 If you are using XHTML, make sure to close the @verb{|<link>|} tag
1084 properly.
1086 @item muse-html-header
1087 Header used for publishing HTML files.
1089 This may be text or a filename.
1091 @item muse-html-footer
1092 Footer used for publishing HTML files.
1094 This may be text or a filename.
1096 @item muse-xhtml-header
1097 Header used for publishing XHTML files.
1099 This may be text or a filename.
1101 @item muse-xhtml-footer
1102 Footer used for publishing XHTML files.
1104 This may be text or a filename.
1106 @item muse-html-anchor-on-word
1107 When true, anchors surround the closest word.
1109 This allows you to select them in a browser (i.e. for pasting), but has
1110 the side-effect of marking up headers in multiple colors if your header
1111 style is different from your link style.
1113 @item muse-html-table-attributes
1114 The attribute to be used with HTML @verb{|<table>|} tags.
1116 Note that since Muse supports direct insertion of HTML tags, you can
1117 easily create any kind of table you want, as long as each line begins at
1118 column 0 (to prevent it from being blockquoted).
1120 @item muse-html-markup-regexps
1121 List of markup rules for publishing a Muse page to HTML.
1123 @item muse-html-markup-functions
1124 An alist of style types to custom functions for that kind of text.
1126 @item muse-html-markup-strings
1127 Strings used for marking up text as HTML.
1129 These cover the most basic kinds of markup, the handling of which
1130 differs little between the various styles.
1132 @item muse-xhtml-markup-strings
1133 Strings used for marking up text as XHTML.
1135 These cover the most basic kinds of markup, the handling of which
1136 differs little between the various styles.
1138 @item muse-html-markup-tags
1139 A list of tag specifications, for specially marking up HTML.
1140 @xref{muse-publish-markup-tags}, for more information.
1142 @item muse-html-markup-specials
1143 A table of characters which must be represented specially.  By default,
1144 this includes @samp{"}, @samp{<}, @samp{>}, and @samp{&}.
1146 @item muse-html-meta-http-equiv
1147 The http-equiv attribute used for the HTML @verb{|<meta>|} tag.
1149 @item muse-html-meta-content-type
1150 The content type used for the HTML @verb{|<meta>|} tag.
1152 If you are striving for XHTML 1.1 compliance, you may want to change
1153 this to ``application/xhtml+xml''.
1155 @item muse-html-meta-content-encoding
1156 The charset to append to the HTML @verb{|<meta>|} tag.
1158 If set to the symbol 'detect, use @code{muse-html-encoding-map} to try
1159 and determine the HTML charset from emacs's coding.  If set to a string,
1160 this string will be used to force a particular charset.
1162 @item muse-html-charset-default
1163 The default HTML meta charset to use if no translation is found in
1164 @code{muse-html-encoding-map}.
1166 @item muse-html-encoding-default
1167 The default Emacs buffer encoding to use in published files.
1168 This will be used if no special characters are found.
1170 @item muse-html-encoding-map
1171 An alist mapping emacs coding systems to appropriate HTML charsets.
1172 Use the base name of the coding system (i.e. without the -unix).
1174 @end table
1176 @node Journal, LaTeX, HTML, Publishing Styles
1177 @comment  node-name,  next,  previous,  up
1178 @section Keeping a journal or blog
1179 @cindex journal
1180 @cindex blog, journal style
1182 The module facilitates the keeping and publication of a journal.  When
1183 publishing to HTML, it assumes the form of a web log, or blog.
1185 The input format for each entry is as follows.
1187 @example
1188   * 20040317: Title of entry
1190   Text for the entry.
1192   <qotd>
1193   "You know who you are. It comes down to a simple gut check: You
1194   either love what you do or you don't. Period." -- P. Bronson
1195   </qotd>
1196 @end example
1198 The "qotd", or Quote of the Day, is entirely optional.  When generated
1199 to HTML, this entry is rendered as the following.
1201 @example
1202   <div class="entry">
1203     <div class="entry-qotd">
1204       <h3>Quote of the Day:</h3>
1205       <p>"You know who you are. It comes down to a simple gut
1206         check: You either love what you do or you don't. Period."
1207         -- P. Bronson</p>
1208     </div>
1209     <div class="entry-body">
1210       <div class="entry-head">
1211         <div class="entry-date">
1212           <span class="date">March 17, 2004</span>
1213         </div>
1214         <div class="entry-title">
1215           <h2>Title of entry</h2>
1216         </div>
1217       </div>
1218       <div class="entry-text">
1219         <p>Text for the entry.</p>
1220       </div>
1221     </div>
1222   </div>
1223 @end example
1225 The plurality of "div" tags makes it possible to display the entries in
1226 any form you wish, using a CSS style.
1228 Also, an .RDF file can be generated from your journal by publishing it
1229 with the "rdf" style.  It uses the first two sentences of the first
1230 paragraph of each entry as its "description", and auto-generates tags
1231 for linking to the various entries.
1233 @emph{Styles provided}
1235 @table @code
1237 @cindex publishing styles, journal-html
1238 @item journal-html
1239 Publish journal entries as an HTML document.
1241 @cindex publishing styles, journal-xhtml
1242 @item journal-xhtml
1243 Publish journal entries as an XHTML document.
1245 @cindex publishing styles, journal-latex
1246 @item journal-latex
1247 Publish journal entries as a LaTeX document.
1249 @cindex publishing styles, journal-pdf
1250 @item journal-pdf
1251 Publish journal entries as a PDF document.
1253 @cindex publishing styles, journal-book-latex
1254 @item journal-book-latex
1255 Publish journal entries as a LaTeX book.
1257 @cindex publishing styles, journal-book-pdf
1258 @item journal-book-pdf
1259 Publish journal entries as a PDF book.
1261 @cindex publishing styles, journal-rdf
1262 @cindex publishing styles, RSS 1.0
1263 @item journal-rdf
1264 Publish journal entries as an RDF file (RSS 1.0).
1266 @cindex publishing styles, journal-rss
1267 @cindex publishing styles, RSS 2.0
1268 @item journal-rss
1269 Publish journal entries as an RSS file (RSS 2.0).
1271 @end table
1273 @emph{Options provided}
1275 @table @code
1277 @item muse-journal-heading-regexp
1278 A regexp that matches a journal heading.
1280 Paren group 1 is the ISO date, group 2 is the optional category, and
1281 group 3 is the optional heading for the entry.
1283 @item muse-journal-date-format
1284 Date format to use for journal entries.
1286 @item muse-journal-html-heading-regexp
1287 A regexp that matches a journal heading from an HTML document.
1289 Paren group 1 is the ISO date, group 2 is the optional category, and
1290 group 3 is the optional heading for the entry.
1292 @item muse-journal-html-entry-template
1293 Template used to publish individual journal entries as HTML.
1295 @item muse-journal-latex-section
1296 Template used to publish a LaTeX section.
1298 @item muse-journal-latex-subsection
1299 Template used to publish a LaTeX subsection.
1301 @item muse-journal-latex-markup-tags
1302 A list of tag specifications, for specially marking up LaTeX.
1304 @xref{muse-publish-markup-tags}, for more information.
1306 @item muse-journal-rdf-extension
1307 Default file extension for publishing RDF (RSS 1.0) files.
1309 @item muse-journal-rdf-base-url
1310 The base URL of the website referenced by the RDF file.
1312 @item muse-journal-rdf-header
1313 Header used for publishing RDF (RSS 1.0) files.
1315 This may be text or a filename.
1317 @item muse-journal-rdf-footer
1318 Footer used for publishing RDF (RSS 1.0) files.
1320 This may be text or a filename.
1322 @item muse-journal-rdf-date-format
1323 Date format to use for RDF entries.
1325 @item muse-journal-rdf-entry-template
1326 Template used to publish individual journal entries as RDF.
1328 @item muse-journal-rdf-summarize-entries
1329 If non-nil, include only summaries in the RDF file, not the full data.
1331 @item muse-journal-rss-extension
1332 Default file extension for publishing RSS 2.0 files.
1334 @item muse-journal-rss-base-url
1335 The base URL of the website referenced by the RSS file.
1337 @item muse-journal-rss-header
1338 Header used for publishing RSS 2.0 files.
1340 This may be text or a filename.
1342 @item muse-journal-rss-footer
1343 Footer used for publishing RSS 2.0 files.
1345 This may be text or a filename.
1347 @item muse-journal-rss-date-format
1348 Date format to use for RSS 2.0 entries.
1350 @item muse-journal-rss-entry-template
1351 Template used to publish individual journal entries as RSS 2.0.
1353 @item muse-journal-rss-enclosure-types-alist
1354 File types that are accepted as RSS enclosures.
1356 This is an alist that maps file extension to content type.
1358 Useful for podcasting.
1360 @item muse-journal-rss-summarize-entries
1361 If non-nil, include only summaries in the RSS file, not the full data.
1363 Many RSS subscribers find this annoying.
1365 @item muse-journal-rss-markup-regexps
1366 List of markup rules for publishing a Muse journal page to RSS.
1368 For more information on the structure of this list,
1369 @xref{muse-publish-markup-regexps}.
1371 @item muse-journal-rss-markup-functions
1372 An alist of style types to custom functions for that kind of text.
1374 For more on the structure of this list,
1375 @xref{muse-publish-markup-functions}.
1377 @end table
1379 @node LaTeX, Poem, Journal, Publishing Styles
1380 @comment  node-name,  next,  previous,  up
1381 @section Publishing LaTeX documents
1383 This publishing style is capable of producing LaTeX or PDF documents.
1385 If you wish to publish PDF documents, you will need to have a good TeX
1386 installation.  For Debian, this can be accomplished by installing the
1387 ``tetex-bin'' and ``tetex-extra'' packages.  TeX fonts are also a must.
1389 @emph{Styles provided}
1391 @table @code
1393 @cindex publishing styles, latex
1394 @item latex
1395 Publish a LaTeX document.
1397 @cindex publishing styles, pdf
1398 @item pdf
1399 Publish a PDF document, using an external LaTeX document conversion
1400 tool.
1402 @cindex publishing styles, latexcjk
1403 @item latexcjk
1404 Publish a LaTeX document with CJK (Chinese) encodings.
1406 @cindex publishing styles, pdfcjk
1407 @item pdfcjk
1408 Publish a PDF document with CJK (Chinese) encodings, using an external
1409 LaTeX document conversion tool.
1411 @end table
1413 @emph{Options provided}
1415 @table @code
1417 @item muse-latex-extension
1418 Default file extension for publishing LaTeX files.
1420 @item muse-latex-pdf-extension
1421 Default file extension for publishing LaTeX files to PDF.
1423 @item muse-latex-header
1424 Header used for publishing LaTeX files.
1426 This may be text or a filename.
1428 @item muse-latex-footer
1429 Footer used for publishing LaTeX files.
1431 This may be text or a filename.
1433 @item muse-latexcjk-header
1434 Header used for publishing LaTeX files (CJK).
1436 This may be text or a filename.
1438 @item muse-latexcjk-footer
1439 Footer used for publishing LaTeX files (CJK).
1441 This may be text or a filename.
1443 @item muse-latex-markup-regexps
1444 List of markup regexps for identifying regions in a Muse page.
1446 For more on the structure of this list,
1447 @xref{muse-publish-markup-regexps}.
1449 @item muse-latex-markup-functions
1450 An alist of style types to custom functions for that kind of text.
1452 For more on the structure of this list,
1453 @xref{muse-publish-markup-functions}.
1455 @item muse-latex-markup-strings
1456 Strings used for marking up text.
1458 These cover the most basic kinds of markup, the handling of which
1459 differs little between the various styles.
1461 @item muse-latexcjk-encoding-map
1462 An alist mapping emacs coding systems to appropriate CJK codings.
1463 Use the base name of the coding system (ie, without the -unix).
1465 @item muse-latexcjk-encoding-default
1466 The default Emacs buffer encoding to use in published files.
1468 This will be used if no special characters are found.
1470 @item muse-latex-markup-specials
1471 A table of characters which must be represented specially.
1473 @end table
1475 @node Poem, Texinfo, LaTeX, Publishing Styles
1476 @comment  node-name,  next,  previous,  up
1477 @section Publish a poem to LaTex or PDF
1479 The @code{muse-poem} module makes it easy to attractively publish and
1480 reference poems in the following format, using the "memoir" module for
1481 LaTeX publishing.  It will also markup poems for every other output
1482 style, though none are nearly as pretty.
1484 @example
1485 Title
1488 Body of poem
1491 Annotations, history, notes, etc.
1492 @end example
1494 Once a poem is written in this format, just publish it to PDF using the
1495 @code{poem-pdf} style.  To make an inlined reference to a poem that
1496 you've written -- for example, from a blog page -- there is a "poem" tag
1497 defined by this module.
1499 @example
1500 <poem title="name.of.poem.page">
1501 @end example
1503 Let's assume the template above was called @file{name.of.poem.page};
1504 then the above tag would result in this inclusion.
1506 @example
1507 ** Title
1509 > Body of poem
1510 @end example
1512 John Wiegley uses this module for publishing all of the poems on his
1513 website, which are at
1514 @uref{http://www.newartisans.com/johnw/poems.html}.
1516 @emph{Styles provided}
1518 @table @code
1520 @cindex publishing styles, poem-latex
1521 @item poem-latex
1522 Publish a poem in LaTeX form.
1524 @cindex publishing styles, poem-pdf
1525 @item poem-pdf
1526 Publish a poem to a PDF document.
1528 @cindex publishing styles, chapbook-latex
1529 @item chapbook-latex
1530 Publish a book of poems in LaTeX form.
1532 @cindex publishing styles, chapbook-pdf
1533 @item chapbook-pdf
1534 Publish a book of poems to a PDF document.
1536 @end table
1538 @emph{Options provided}
1540 @table @code
1542 @item muse-poem-latex-header
1543 Header used for publishing LaTeX poems.
1545 This may be text or a filename.
1547 @item muse-poem-latex-footer
1548 Footer used for publishing LaTeX files.
1550 This may be text or a filename.
1552 @item muse-poem-markup-strings
1553 Strings used for marking up poems.
1555 These cover the most basic kinds of markup, the handling of which
1556 differs little between the various styles.
1558 @item muse-chapbook-latex-header
1559 Header used for publishing a book of poems in LaTeX form.
1561 This may be text or a filename.
1563 @item muse-chapbook-latex-footer
1564 Footer used for publishing a book of poems in LaTeX form.
1566 This may be text or a filename.
1568 @item muse-poem-chapbook-strings
1569 Strings used for marking up books of poems.
1571 These cover the most basic kinds of markup, the handling of which
1572 differs little between the various styles.
1574 @end table
1576 @node Texinfo, Common Elements, Poem, Publishing Styles
1577 @comment  node-name,  next,  previous,  up
1578 @section Publish entries to Texinfo format or PDF
1580 Rules for publishing a Muse file as a Texinfo article.
1582 @emph{Styles provided}
1584 @table @code
1586 @cindex publishing styles, texi
1587 @item texi
1588 Publish a file in Texinfo form.
1590 @cindex publishing styles, texi
1591 @item info
1592 Generate an Info file from a Muse file.
1594 @cindex publishing styles, info-pdf
1595 @item info-pdf
1596 Publish a file in PDF form.
1598 @end table
1600 @emph{Options provided}
1602 @table @code
1604 @item muse-texinfo-process-natively
1605 If non-nil, use the Emacs `texinfmt' module to make Info files.
1607 @item muse-texinfo-extension
1608 Default file extension for publishing Texinfo files.
1610 @item muse-texinfo-info-extension
1611 Default file extension for publishing Info files.
1613 @item muse-texinfo-pdf-extension
1614 Default file extension for publishing PDF files.
1616 @item muse-texinfo-header
1617 Text to prepend to a Muse page being published as Texinfo.
1619 This may be text or a filename.
1620 It may contain @verb{|<lisp>|} markup tags.
1622 @item muse-texinfo-footer
1623 Text to append to a Muse page being published as Texinfo.
1625 This may be text or a filename.
1626 It may contain @verb{|<lisp>|} markup tags.
1628 @item muse-texinfo-markup-regexps
1629 List of markup rules for publishing a Muse page to Texinfo.
1631 For more on the structure of this list,
1632 @xref{muse-publish-markup-regexps}.
1634 @item muse-texinfo-markup-functions
1635 An alist of style types to custom functions for that kind of text.
1637 For more on the structure of this list, see
1638 @xref{muse-publish-markup-functions}.
1640 @item muse-texinfo-markup-strings
1641 Strings used for marking up text.
1643 These cover the most basic kinds of markup, the handling of which
1644 differs little between the various styles.
1646 @item muse-texinfo-markup-specials
1647 A table of characters which must be represented specially.
1649 @end table
1651 @node Common Elements, Deriving Styles, Texinfo, Publishing Styles
1652 @comment  node-name,  next,  previous,  up
1653 @section Common functionality shared by styles
1654 @cindex publishing styles, common
1656 @table @code
1658 @cindex publishing, markup functions
1659 @anchor{muse-publish-markup-functions}
1660 @item muse-publish-markup-functions
1661 An alist of style types to custom functions for that kind of text.
1663 This is used by publishing styles to attempt to minimize the amount of
1664 custom regexps that each has to define.  @file{muse-publish} provides
1665 rules for the most common types of markup.
1667 Each member of the list is of the following form.
1669 @example
1670   (SYMBOL FUNCTION)
1671 @end example
1673 @itemize @bullet
1674 @item SYMBOL
1675 Describes the type of text to associate with this rule.
1676 @code{muse-publish-markup-regexps} maps regexps to these symbols.
1678 @item FUNCTION
1679 Function to use to mark up this kind of rule if no suitable function is
1680 found through the @option{:functions} tag of the current style.
1681 @end itemize
1683 @cindex publishing, markup regexps
1684 @anchor{muse-publish-markup-regexps}
1685 @item muse-publish-markup-regexps
1686 List of markup rules for publishing a page with Muse.
1688 The rules given in this variable are invoked first, followed by whatever
1689 rules are specified by the current style.
1691 Each member of the list is either a function, or a list of the following
1692 form.
1694 @example
1695   (REGEXP/SYMBOL TEXT-BEGIN-GROUP REPLACEMENT-TEXT/FUNCTION/SYMBOL)
1696 @end example
1698 @itemize @bullet
1699 @item REGEXP
1700 A regular expression, or symbol whose value is a regular expression,
1701 which is searched for using `re-search-forward'.
1703 @item TEXT-BEGIN-GROUP
1704 The matching group within that regexp which denotes the beginning of the
1705 actual text to be marked up.
1707 @item REPLACEMENT-TEXT
1708 A string that will be passed to `replace-match'.
1710 If it is not a string, but a function, it will be called to determine
1711 what the replacement text should be (it must return a string).  If it is
1712 a symbol, the value of that symbol should be a string.
1713 @end itemize
1715 The replacements are done in order, one rule at a time.  Writing
1716 the regular expressions can be a tricky business.  Note that case
1717 is never ignored.  `case-fold-search' is always bound to nil
1718 while processing the markup rules.
1720 @cindex publishing, markup tags
1721 @anchor{muse-publish-markup-tags}
1722 @item muse-publish-markup-tags
1723 A list of tag specifications, for specially marking up text.
1725 XML-style tags are the best way to add custom markup to Muse.  This is
1726 easily accomplished by customizing this list of markup tags.
1728 For each entry, the name of the tag is given, whether it expects a
1729 closing tag and/or an optional set of attributes, and a function that
1730 performs whatever action is desired within the delimited region.
1732 The tags themselves are deleted during publishing, before the function
1733 is called.  The function is called with three arguments, the beginning
1734 and end of the region surrounded by the tags.  If properties are
1735 allowed, they are passed as a third argument in the form of an alist.
1736 The `end' argument to the function is always a marker.
1738 Point is always at the beginning of the region within the tags, when the
1739 function is called.  Wherever point is when the function finishes is
1740 where tag markup will resume.
1742 These tag rules are processed once at the beginning of markup, and once
1743 at the end, to catch any tags which may have been inserted in-between.
1745 @end table
1747 @node Deriving Styles, , Common Elements, Publishing Styles
1748 @comment  node-name,  next,  previous,  up
1749 @section Deriving a new style from an existing one
1750 @cindex publishing styles, deriving
1752 To create a new style from an existing one, use @code{muse-derive-style}
1753 as follows.  This is a good way to fix something you don't like about a
1754 particular publishing style, or to personalize it.
1756 @example
1757 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
1758 @end example
1760 The derived name is a string defining the new style, such as "my-html".
1761 The base name must identify an existing style, such as "html" -- if you
1762 have loaded @file{muse-html}.  The style parameters are the same as
1763 those used to create a style, except that they override whatever
1764 definitions exist in the base style.  However, some definitions only
1765 partially override.  The following parameters support partial
1766 overriding.
1768 @table @option
1770 @item :functions
1771 If a markup function is not found in the derived style's function list,
1772 the base style's function list will be queried.
1774 @item :strings
1775 If a markup string is not found in the derived style's string list, the
1776 base style's string list will be queried.
1778 @item :before
1779 If this option is specified, it will be consulted rather than the
1780 corresponding value in the derived style.  This applies to the following
1781 options as well.
1783 @item :before-end
1785 @item :after
1787 @end table
1790 @node Getting Help and Reporting Bugs, History, Publishing Styles, Top
1791 @comment  node-name,  next,  previous,  up
1792 @chapter Getting Help and Reporting Bugs
1793 @cindex help, getting
1794 @cindex bugs, reporting
1796 After you have read this guide, if you still have questions about
1797 Muse, or if you have bugs to report, there are several places you can
1800 @itemize @bullet
1802 @item
1803 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
1804 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
1805 to it.
1807 @item
1808 @uref{http://www.mwolson.org/projects/MuseMode.html} is the web page
1809 that Michael Olson (the current maintainer) made for Muse.
1811 @item
1812 You can join the mailing list at @email{emacs-wiki-discuss@@nongnu.org}
1813 using the subscription form at
1814 @uref{http://mail.nongnu.org/mailman/listinfo/ emacs-wiki-discuss}.
1815 This mailing list provides support for Muse, @command{Planner} and
1816 @command{emacs-wiki}, which is the predecessor of Muse.
1818 There are additional methods for accessing the mailing list, adding
1819 content to it, and searching it.  Consult
1820 @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsWikiMailingList} for
1821 more information.
1823 @item
1824 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
1825 contributors are frequently around and willing to answer your
1826 questions.  The @samp{#muse} channel is also available for
1827 Muse-specific help, and its current maintainer hangs out there.
1829 @item
1830 The maintainer of MuseMode, Michael Olson, may be contacted at
1831 @email{mwolson@@gnu.org}.
1833 @end itemize
1835 @node History, Contributors, Getting Help and Reporting Bugs, Top
1836 @comment  node-name,  next,  previous,  up
1837 @chapter History of This Document
1838 @cindex history, of Muse
1840 @itemize
1841 @item 2004
1842 John Wiegley started Muse upon realizing that EmacsWiki had some serious
1843 limitations. Around February 2004, he started making "emacs-wiki version
1844 3.00 APLHA", which eventually became known as Muse.
1846 Most of those who frequent the emacs-wiki mailing list continued to use
1847 emacs-wiki, mainly because Planner hasn't been ported over to it.
1849 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
1850 John Wiegley's request.
1852 @item 2005
1853 Michael Olson overhauled this document and added many new sections in
1854 preparation for the first release of Muse (3.01).
1856 @end itemize
1858 @node Contributors, GNU General Public License, History, Top
1859 @comment  node-name,  next,  previous,  up
1860 @chapter Contributors to This Documentation
1861 @cindex contributors
1863 The first draft of this document was taken from the emacs-wiki texinfo
1864 manual.  Michael Olson adapted it for Muse and added most of its
1865 content.
1867 John Sullivan did a majority of the work on the emacs-wiki texinfo
1868 manual.
1870 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
1871 emacs-wiki texinfo manual.
1873 @node GNU General Public License, Concept Index, Contributors, Top
1874 @comment  node-name,  next,  previous,  up
1875 @appendix GNU GENERAL PUBLIC LICENSE
1876 @center Version 2, June 1991
1877 @cindex GPL
1878 @cindex GNU General Public License
1880 @c This file is intended to be included in another file.
1882 @display
1883 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
1884 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1886 Everyone is permitted to copy and distribute verbatim copies
1887 of this license document, but changing it is not allowed.
1888 @end display
1890 @appendixsec Preamble
1892   The licenses for most software are designed to take away your
1893 freedom to share and change it.  By contrast, the GNU General Public
1894 License is intended to guarantee your freedom to share and change free
1895 software---to make sure the software is free for all its users.  This
1896 General Public License applies to most of the Free Software
1897 Foundation's software and to any other program whose authors commit to
1898 using it.  (Some other Free Software Foundation software is covered by
1899 the GNU Library General Public License instead.)  You can apply it to
1900 your programs, too.
1902   When we speak of free software, we are referring to freedom, not
1903 price.  Our General Public Licenses are designed to make sure that you
1904 have the freedom to distribute copies of free software (and charge for
1905 this service if you wish), that you receive source code or can get it
1906 if you want it, that you can change the software or use pieces of it
1907 in new free programs; and that you know you can do these things.
1909   To protect your rights, we need to make restrictions that forbid
1910 anyone to deny you these rights or to ask you to surrender the rights.
1911 These restrictions translate to certain responsibilities for you if you
1912 distribute copies of the software, or if you modify it.
1914   For example, if you distribute copies of such a program, whether
1915 gratis or for a fee, you must give the recipients all the rights that
1916 you have.  You must make sure that they, too, receive or can get the
1917 source code.  And you must show them these terms so they know their
1918 rights.
1920   We protect your rights with two steps: (1) copyright the software, and
1921 (2) offer you this license which gives you legal permission to copy,
1922 distribute and/or modify the software.
1924   Also, for each author's protection and ours, we want to make certain
1925 that everyone understands that there is no warranty for this free
1926 software.  If the software is modified by someone else and passed on, we
1927 want its recipients to know that what they have is not the original, so
1928 that any problems introduced by others will not reflect on the original
1929 authors' reputations.
1931   Finally, any free program is threatened constantly by software
1932 patents.  We wish to avoid the danger that redistributors of a free
1933 program will individually obtain patent licenses, in effect making the
1934 program proprietary.  To prevent this, we have made it clear that any
1935 patent must be licensed for everyone's free use or not licensed at all.
1937   The precise terms and conditions for copying, distribution and
1938 modification follow.
1940 @iftex
1941 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1942 @end iftex
1943 @ifinfo
1944 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1945 @end ifinfo
1947 @enumerate 0
1948 @item
1949 This License applies to any program or other work which contains
1950 a notice placed by the copyright holder saying it may be distributed
1951 under the terms of this General Public License.  The ``Program'', below,
1952 refers to any such program or work, and a ``work based on the Program''
1953 means either the Program or any derivative work under copyright law:
1954 that is to say, a work containing the Program or a portion of it,
1955 either verbatim or with modifications and/or translated into another
1956 language.  (Hereinafter, translation is included without limitation in
1957 the term ``modification''.)  Each licensee is addressed as ``you''.
1959 Activities other than copying, distribution and modification are not
1960 covered by this License; they are outside its scope.  The act of
1961 running the Program is not restricted, and the output from the Program
1962 is covered only if its contents constitute a work based on the
1963 Program (independent of having been made by running the Program).
1964 Whether that is true depends on what the Program does.
1966 @item
1967 You may copy and distribute verbatim copies of the Program's
1968 source code as you receive it, in any medium, provided that you
1969 conspicuously and appropriately publish on each copy an appropriate
1970 copyright notice and disclaimer of warranty; keep intact all the
1971 notices that refer to this License and to the absence of any warranty;
1972 and give any other recipients of the Program a copy of this License
1973 along with the Program.
1975 You may charge a fee for the physical act of transferring a copy, and
1976 you may at your option offer warranty protection in exchange for a fee.
1978 @item
1979 You may modify your copy or copies of the Program or any portion
1980 of it, thus forming a work based on the Program, and copy and
1981 distribute such modifications or work under the terms of Section 1
1982 above, provided that you also meet all of these conditions:
1984 @enumerate a
1985 @item
1986 You must cause the modified files to carry prominent notices
1987 stating that you changed the files and the date of any change.
1989 @item
1990 You must cause any work that you distribute or publish, that in
1991 whole or in part contains or is derived from the Program or any
1992 part thereof, to be licensed as a whole at no charge to all third
1993 parties under the terms of this License.
1995 @item
1996 If the modified program normally reads commands interactively
1997 when run, you must cause it, when started running for such
1998 interactive use in the most ordinary way, to print or display an
1999 announcement including an appropriate copyright notice and a
2000 notice that there is no warranty (or else, saying that you provide
2001 a warranty) and that users may redistribute the program under
2002 these conditions, and telling the user how to view a copy of this
2003 License.  (Exception: if the Program itself is interactive but
2004 does not normally print such an announcement, your work based on
2005 the Program is not required to print an announcement.)
2006 @end enumerate
2008 These requirements apply to the modified work as a whole.  If
2009 identifiable sections of that work are not derived from the Program,
2010 and can be reasonably considered independent and separate works in
2011 themselves, then this License, and its terms, do not apply to those
2012 sections when you distribute them as separate works.  But when you
2013 distribute the same sections as part of a whole which is a work based
2014 on the Program, the distribution of the whole must be on the terms of
2015 this License, whose permissions for other licensees extend to the
2016 entire whole, and thus to each and every part regardless of who wrote it.
2018 Thus, it is not the intent of this section to claim rights or contest
2019 your rights to work written entirely by you; rather, the intent is to
2020 exercise the right to control the distribution of derivative or
2021 collective works based on the Program.
2023 In addition, mere aggregation of another work not based on the Program
2024 with the Program (or with a work based on the Program) on a volume of
2025 a storage or distribution medium does not bring the other work under
2026 the scope of this License.
2028 @item
2029 You may copy and distribute the Program (or a work based on it,
2030 under Section 2) in object code or executable form under the terms of
2031 Sections 1 and 2 above provided that you also do one of the following:
2033 @enumerate a
2034 @item
2035 Accompany it with the complete corresponding machine-readable
2036 source code, which must be distributed under the terms of Sections
2037 1 and 2 above on a medium customarily used for software interchange; or,
2039 @item
2040 Accompany it with a written offer, valid for at least three
2041 years, to give any third party, for a charge no more than your
2042 cost of physically performing source distribution, a complete
2043 machine-readable copy of the corresponding source code, to be
2044 distributed under the terms of Sections 1 and 2 above on a medium
2045 customarily used for software interchange; or,
2047 @item
2048 Accompany it with the information you received as to the offer
2049 to distribute corresponding source code.  (This alternative is
2050 allowed only for noncommercial distribution and only if you
2051 received the program in object code or executable form with such
2052 an offer, in accord with Subsection b above.)
2053 @end enumerate
2055 The source code for a work means the preferred form of the work for
2056 making modifications to it.  For an executable work, complete source
2057 code means all the source code for all modules it contains, plus any
2058 associated interface definition files, plus the scripts used to
2059 control compilation and installation of the executable.  However, as a
2060 special exception, the source code distributed need not include
2061 anything that is normally distributed (in either source or binary
2062 form) with the major components (compiler, kernel, and so on) of the
2063 operating system on which the executable runs, unless that component
2064 itself accompanies the executable.
2066 If distribution of executable or object code is made by offering
2067 access to copy from a designated place, then offering equivalent
2068 access to copy the source code from the same place counts as
2069 distribution of the source code, even though third parties are not
2070 compelled to copy the source along with the object code.
2072 @item
2073 You may not copy, modify, sublicense, or distribute the Program
2074 except as expressly provided under this License.  Any attempt
2075 otherwise to copy, modify, sublicense or distribute the Program is
2076 void, and will automatically terminate your rights under this License.
2077 However, parties who have received copies, or rights, from you under
2078 this License will not have their licenses terminated so long as such
2079 parties remain in full compliance.
2081 @item
2082 You are not required to accept this License, since you have not
2083 signed it.  However, nothing else grants you permission to modify or
2084 distribute the Program or its derivative works.  These actions are
2085 prohibited by law if you do not accept this License.  Therefore, by
2086 modifying or distributing the Program (or any work based on the
2087 Program), you indicate your acceptance of this License to do so, and
2088 all its terms and conditions for copying, distributing or modifying
2089 the Program or works based on it.
2091 @item
2092 Each time you redistribute the Program (or any work based on the
2093 Program), the recipient automatically receives a license from the
2094 original licensor to copy, distribute or modify the Program subject to
2095 these terms and conditions.  You may not impose any further
2096 restrictions on the recipients' exercise of the rights granted herein.
2097 You are not responsible for enforcing compliance by third parties to
2098 this License.
2100 @item
2101 If, as a consequence of a court judgment or allegation of patent
2102 infringement or for any other reason (not limited to patent issues),
2103 conditions are imposed on you (whether by court order, agreement or
2104 otherwise) that contradict the conditions of this License, they do not
2105 excuse you from the conditions of this License.  If you cannot
2106 distribute so as to satisfy simultaneously your obligations under this
2107 License and any other pertinent obligations, then as a consequence you
2108 may not distribute the Program at all.  For example, if a patent
2109 license would not permit royalty-free redistribution of the Program by
2110 all those who receive copies directly or indirectly through you, then
2111 the only way you could satisfy both it and this License would be to
2112 refrain entirely from distribution of the Program.
2114 If any portion of this section is held invalid or unenforceable under
2115 any particular circumstance, the balance of the section is intended to
2116 apply and the section as a whole is intended to apply in other
2117 circumstances.
2119 It is not the purpose of this section to induce you to infringe any
2120 patents or other property right claims or to contest validity of any
2121 such claims; this section has the sole purpose of protecting the
2122 integrity of the free software distribution system, which is
2123 implemented by public license practices.  Many people have made
2124 generous contributions to the wide range of software distributed
2125 through that system in reliance on consistent application of that
2126 system; it is up to the author/donor to decide if he or she is willing
2127 to distribute software through any other system and a licensee cannot
2128 impose that choice.
2130 This section is intended to make thoroughly clear what is believed to
2131 be a consequence of the rest of this License.
2133 @item
2134 If the distribution and/or use of the Program is restricted in
2135 certain countries either by patents or by copyrighted interfaces, the
2136 original copyright holder who places the Program under this License
2137 may add an explicit geographical distribution limitation excluding
2138 those countries, so that distribution is permitted only in or among
2139 countries not thus excluded.  In such case, this License incorporates
2140 the limitation as if written in the body of this License.
2142 @item
2143 The Free Software Foundation may publish revised and/or new versions
2144 of the General Public License from time to time.  Such new versions will
2145 be similar in spirit to the present version, but may differ in detail to
2146 address new problems or concerns.
2148 Each version is given a distinguishing version number.  If the Program
2149 specifies a version number of this License which applies to it and ``any
2150 later version'', you have the option of following the terms and conditions
2151 either of that version or of any later version published by the Free
2152 Software Foundation.  If the Program does not specify a version number of
2153 this License, you may choose any version ever published by the Free Software
2154 Foundation.
2156 @item
2157 If you wish to incorporate parts of the Program into other free
2158 programs whose distribution conditions are different, write to the author
2159 to ask for permission.  For software which is copyrighted by the Free
2160 Software Foundation, write to the Free Software Foundation; we sometimes
2161 make exceptions for this.  Our decision will be guided by the two goals
2162 of preserving the free status of all derivatives of our free software and
2163 of promoting the sharing and reuse of software generally.
2165 @iftex
2166 @heading NO WARRANTY
2167 @end iftex
2168 @ifinfo
2169 @center NO WARRANTY
2170 @end ifinfo
2172 @item
2173 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2174 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
2175 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2176 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2177 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2178 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
2179 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
2180 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2181 REPAIR OR CORRECTION.
2183 @item
2184 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2185 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2186 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2187 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2188 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2189 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2190 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2191 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2192 POSSIBILITY OF SUCH DAMAGES.
2193 @end enumerate
2195 @iftex
2196 @heading END OF TERMS AND CONDITIONS
2197 @end iftex
2198 @ifinfo
2199 @center END OF TERMS AND CONDITIONS
2200 @end ifinfo
2202 @page
2203 @appendixsec Appendix: How to Apply These Terms to Your New Programs
2205   If you develop a new program, and you want it to be of the greatest
2206 possible use to the public, the best way to achieve this is to make it
2207 free software which everyone can redistribute and change under these terms.
2209   To do so, attach the following notices to the program.  It is safest
2210 to attach them to the start of each source file to most effectively
2211 convey the exclusion of warranty; and each file should have at least
2212 the ``copyright'' line and a pointer to where the full notice is found.
2214 @smallexample
2215 @var{one line to give the program's name and a brief idea of what it does.}
2216 Copyright (C) @var{yyyy}  @var{name of author}
2218 This program is free software; you can redistribute it and/or modify
2219 it under the terms of the GNU General Public License as published by
2220 the Free Software Foundation; either version 2 of the License, or
2221 (at your option) any later version.
2223 This program is distributed in the hope that it will be useful,
2224 but WITHOUT ANY WARRANTY; without even the implied warranty of
2225 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2226 GNU General Public License for more details.
2228 You should have received a copy of the GNU General Public License along
2229 with this program; if not, write to the Free Software Foundation, Inc.,
2230 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2231 @end smallexample
2233 Also add information on how to contact you by electronic and paper mail.
2235 If the program is interactive, make it output a short notice like this
2236 when it starts in an interactive mode:
2238 @smallexample
2239 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
2240 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
2241 This is free software, and you are welcome to redistribute it
2242 under certain conditions; type `show c' for details.
2243 @end smallexample
2245 The hypothetical commands @samp{show w} and @samp{show c} should show
2246 the appropriate parts of the General Public License.  Of course, the
2247 commands you use may be called something other than @samp{show w} and
2248 @samp{show c}; they could even be mouse-clicks or menu items---whatever
2249 suits your program.
2251 You should also get your employer (if you work as a programmer) or your
2252 school, if any, to sign a ``copyright disclaimer'' for the program, if
2253 necessary.  Here is a sample; alter the names:
2255 @example
2256 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
2257 `Gnomovision' (which makes passes at compilers) written by James Hacker.
2259 @var{signature of Ty Coon}, 1 April 1989
2260 Ty Coon, President of Vice
2261 @end example
2263 This General Public License does not permit incorporating your program into
2264 proprietary programs.  If your program is a subroutine library, you may
2265 consider it more useful to permit linking proprietary applications with the
2266 library.  If this is what you want to do, use the GNU Library General
2267 Public License instead of this License.
2270 @node Concept Index,  , GNU General Public License, Top
2271 @comment  node-name,  next,  previous,  up
2272 @unnumbered Index
2274 @printindex cp
2276 @bye
2278 @c Local Variables:
2279 @c ispell-local-pdict: "ispell-dict"
2280 @c End: