Begin work on Publishing Styles section of manual.
[muse-el.git] / muse.texi
blob52c758ca6ff55f00f11b27c717a6f5ca5d333bea
1 \input texinfo @c -*-texinfo-*-
2 @include{http://www.mwolson.org/default.css}
3 @c %**start of header
4 @setfilename muse.info
5 @settitle Muse
6 @c %**end of header
8 @dircategory Emacs
9 @direntry
10 * Muse: (muse). Authoring and publishing environment for Emacs.
11 @end direntry
13 @syncodeindex fn cp
15 @copying
16 This manual is for the Emacs Muse version 3.00.90 (RC1).
18 Copyright (C) 2004, 2005 Free Software Foundation, Inc.
20 @quotation
21 Permission is granted to copy, distribute and/or modify this document
22 under the terms of the GNU General Public License.
23 @end quotation
24 @end copying
26 @titlepage
27 @title Muse manual
28 @subtitle an authoring and publishing environment
29 @subtitle for GNU Emacs and XEmacs
31 @c The following two commands
32 @c start the copyright page.
33 @page
34 @vskip 0pt plus 1filll
35 @insertcopying
36 @end titlepage
38 @c So the toc is printed at the start
39 @contents
41 @ifnottex
42 @node Top, Preface, (dir), (dir)
43 @comment  node-name,  next,  previous,  up
44 @top Muse
46 @insertcopying
47 @end ifnottex
49 @menu
50 * Preface::                     About the documentation.
51 * Introduction::                What is Muse?
52 * Installation::                How to get the stable and development
53                                   versions.
54 * Getting Started::             Settings for Muse.
55 * Projects::                    Creating a Muse project.
56 * Keystroke Summary::           Keys used in Muse mode.
57 * Markup Rules::                Rules for creating special markup.
58 * Publishing Styles::           Generating different kinds of documents.
59 * Getting Help and Reporting Bugs::  Further ways of getting help.
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 Installation
70 * Releases::                    Released versions of Muse.
71 * Development::                 Latest unreleased changes.
73 Markup Rules
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 * Links::                       Hyperlinks and email addresses.
83 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
84 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
85                                   for extensibility.
87 Publishing Styles
89 * Deriving Styles::             Deriving from an existing style.
91 @end detailmenu
92 @end menu
94 @node Preface, Introduction, Top, Top
95 @comment  node-name,  next,  previous,  up
96 @chapter Preface
98 This document describes Muse, which was written by John Wiegley
99 and is now maintained by Michael Olson.
101 This document is a work in progress, and your contribution will be
102 greatly appreciated.
104 @node Introduction, Installation, Preface, Top
105 @comment  node-name,  next,  previous,  up
106 @chapter Introduction
108 Emacs Muse is an authoring and publishing environment for Emacs.  It
109 simplifies the process of writings documents and publishing them to
110 various output formats.
112 Muse consists of two main parts: an enhanced text-mode for authoring
113 documents and navigating within Muse projects, and a set of publishing
114 styles for generating different kinds of output.
116 This idea is not in any way new. Numerous systems exist -- even one
117 other for Emacs itself (Bhl Mode). What Muse adds to the picture is a
118 more modular environment, with a rather simple core, in which "styles"
119 are derived from to create new styles. Much of Muse's overall
120 functionality is optional. For example, you can use the publisher
121 without the major-mode, or the mode without doing any publishing; or if
122 you don't load the Texinfo or LaTeX modules, those styles won't be
123 available.
125 The Muse codebase is a departure from emacs-wiki.el version 2.44. The
126 code has been restructured and rewritten, especially its publishing
127 functions. The focus in this revision is on the authoring and publishing
128 aspects, and the "wikiness" has been removed as a default behavior (to
129 be offered again as an optional module). CamelCase words are no longer
130 special by default.
132 @node Installation, Getting Started, Introduction, Top
133 @comment  node-name,  next,  previous,  up
134 @chapter Installation
136 @menu
137 * Releases::                    Released versions of Muse.
138 * Development::                 Latest unreleased changes.
139 @end menu
141 @node Releases, Development, Installation, Installation
142 @comment  node-name,  next,  previous,  up
143 @section Installing a release
145 Choose to install a release if you want to minimize risk.  Currently
146 Muse is in a pre-release stage, so no official releases have been made
147 yet.
149 Errors are corrected in development first.  Once fixes are confirmed, a
150 new release will be made.  User-visible changes will be announced on the
151 @email{emacs-wiki-discuss@@nongnu.org} mailing list.  @pxref{Getting
152 Help and Reporting Bugs}.
154 @cindex Debian package for Muse
156 Debian users can get Muse via apt-get.  @file{Muse} is available only at
157 Michael Olson's Debian repository.
159 @cindex releases, from source
161 You can also install the source distribution.
163 @enumerate
164 @item Download and unpack the latest version from @uref{http://www.mwolson.org/static/dist/muse/} .
165 @item Edit your @file{~/.emacs}.
167 @example
168 ;; Add the directories to your load path
169 (add-to-list 'load-path "/path/to/muse")
170 ;; Load Muse
171 (require 'muse)
172 @end example
174 @end enumerate
176 You can download the archive at the following locations:
178 @itemize
179 @item Current and past releases: @uref{http://www.mwolson.org/static/dist/muse/}
180 @end itemize
182 @node Development,  , Releases, Installation
183 @comment  node-name,  next,  previous,  up
184 @section Installing the development version
185 @cindex development
187 Choose the development version if you want to live on the bleeding
188 edge of Muse development or try out new features before release.
190 @cindex arch revision control system, downloading
191 The Arch revision control system allows you to retrieve previous
192 versions and select specific features and bug fixes.
194 Downloading the modules for the first time:
196 @enumerate
197 @item Install arch. Debian: @kbd{apt-get install tla} .  Other distros: see @uref{http://regexps.srparish.net/www/} .
198 @item Register the archive and download the modules.
200 @example
201 # Register the archive
202 tla register-archive http://www.mwolson.org/archives/2005
204 # Download Muse into the @file{muse/} subdirectory
205 tla get mwolson@@gnu.org--2005/muse--main--1.0 muse
206 @end example
208 @item Open your @file{~/.emacs} and add the @file{Muse/} directory to your load path.
210 @example
211 (add-to-list 'load-path "/path/to/muse")
212 @end example
214 @end enumerate
216 To list upstream changes not in local copy:
218 @example
219 # Change to the source directory you are interested in. Example:
220 cd muse/
222 # Display the summary of changes
223 tla missing --summary
224 @end example
226 @cindex updating Muse with Arch
228 To update to the latest version:
230 @example
231 cd muse
232 tla replay
233 @end example
235 You can also obtain the archive at the following locations on the web:
237 @itemize
238 @item Browse arch repository: @uref{http://www.mwolson.org/archives/}
239 @item Latest development snapshot: @uref{http://www.mwolson.org/static/dist/muse-latest.tar.gz}
240 @end itemize
242 The latest development snapshot will be kept up to date since it is
243 updated at the same time as the Arch repository.
246 @node Getting Started, Projects, Installation, Top
247 @comment  node-name,  next,  previous,  up
248 @chapter Getting Started
249 @cindex settings
251 To use Muse, add the directory containing its files to your
252 @code{load-path} variable, in your @file{.emacs} file.  Then, load in
253 the authoring mode, and the styles you wish to publish to.  For
254 example:
256 @lisp
257 (add-to-list 'load-path "<path to Muse>")
259 (require 'muse-mode)     ; load authoring mode
261 (require 'muse-html)     ; load publishing styles I use
262 (require 'muse-latex)
263 (require 'muse-texinfo)
264 (require 'muse-docbook)
265 @end lisp
267 Once loaded, the command @kbd{M-x muse-publish-this-file} will publish
268 an input document to any available style.  If you enable
269 @file{muse-mode} within a buffer, by typing @kbd{M-x muse-mode}, this
270 command will be bound to @kbd{C-c C-t}.
272 You should also type @kbd{M-x customize-group}, and give the name
273 @samp{muse}.  Change it to suit your preferences.  Each of the
274 options has its own documentation.
277 @node Projects, Keystroke Summary, Getting Started, Top
278 @comment  node-name,  next,  previous,  up
279 @chapter Projects
280 @cindex projects
282 Often you will want to publish all the files within a directory to a
283 particular set of output styles automatically.  To support, Muse
284 allows for the creations of "projects".  Here is a sample project, to
285 be defined in your @file{.emacs} file:
287 @lisp
288 (require 'muse-project)
290 (setq muse-project-alist
291       '(("website"                      ; my various writings
292          ("~/Pages" :default "index")
293          (:base "html" :path "~/public_html")
294          (:base "pdf" :path "~/public_html/pdf"))))
295 @end lisp
297 The above defines a project named "website", whose files are located
298 in the directory @file{~/Pages}.  The default page to visit is
299 @file{index}.  When this project is published, each page will be
300 output as HTML to the directory @file{~/public_html}, and as PDF to
301 the directory @file{~/public_html/pdf}.  Within any project page, you
302 may create a link to other pages using the syntax @samp{[[pagename]]}.
305 @node Keystroke Summary, Markup Rules, Projects, Top
306 @comment  node-name,  next,  previous,  up
307 @chapter Keystroke Summary
308 @cindex keystrokes
310 Here is a summary of keystrokes available in every Muse buffer:
312 @table @kbd
314 @item C-c C-a (`muse-index')
315 Display an index of all known Muse pages.
317 @item C-c C-b (`muse-browse-result')
318 Show the published result of this page.
320 @item C-c C-e (`muse-edit-link-at-point')
321 Edit link at point.
323 @item C-c C-f (`muse-project-find-file'), also C-c C-v
324 Open another Muse page.  Prompt for the name.
326 @item C-c C-l (`font-lock-mode')
327 Highlight/refresh the current buffer.
329 @item C-c C-p (`muse-project-publish')
330 Publish any Muse pages that have changed.
332 @item C-c C-v (`muse-project-find-file'), also C-c C-f
333 Open another Muse page.  Prompt for the name.
335 @item C-c = (`muse-what-changed')
336 Diff this page against the last backup version.
338 @item C-c TAB (`muse-insert-tag')
339 Insert a tag interactively.
341 @item TAB
342 Move to the next Wiki reference.
344 @item S-TAB
345 Move to the previous Wiki reference.
347 @end table
350 @node Markup Rules, Publishing Styles, Keystroke Summary, Top
351 @comment  node-name,  next,  previous,  up
352 @chapter Markup Rules
353 @cindex markup
355 A Muse document uses special, contextual markup rules to determine how
356 to format the output result.  For example, if a paragraph is indented,
357 Muse assumes it should be quoted.
359 There are not too many markup rules, and all of them strive to be as
360 simple as possible so that you can focus on document creation, rather
361 than formatting.
363 @menu
364 * Paragraphs::                  Paragraphs: centering and quoting.
365 * Headings::                    Levels of headings.
366 * Emphasizing Text::            Bold, italicized, and underlined text.
367 * Footnotes::                   Making notes to be shown at the end.
368 * Verse::                       Indicating poetic stanzas.
369 * Lists::                       Lists of items.
370 * Tables::                      Generation of data tables.
371 * Links::                       Hyperlinks and email addresses.
372 * Horizontal Rules and Anchors::  Inserting a horizontal line or anchor.
373 * Embedded Lisp::               Evaluating Emacs Lisp code in documents
374                                   for extensibility.
375 @end menu
377 @node Paragraphs, Headings, Markup Rules, Markup Rules
378 @comment  node-name,  next,  previous,  up
379 @section Paragraphs
380 @cindex paragraphs
382 Paragraphs in Muse must be separated by a blank line.
384 @cindex paragraphs, centered
385 @strong{Centered paragraphs and quotations}
387 A line that begins with six or more columns of whitespace (either tabs
388 or spaces) indicates a centered paragraph.
390 @cindex paragraphs, quoted
391 @cindex quotations
392 But if a line begins with whitespace, though less than six columns, it
393 indicates a quoted paragraph.
395 @cindex examples
396 @cindex monospace, rendering blocks
397 @cindex HTML, rendering blocks in monospace
398 @strong{Literal paragraphs}
400 The @verb{|<example>|} tag is used for examples, where whitespace should
401 be preserved, the text rendered in monospace, and any characters special
402 to the output style escaped.
404 @cindex literal text
405 @cindex HTML, inserting a raw block
406 There is also the @verb{|<literal>|} tag, which causes a marked block to
407 be entirely left alone.  This can be used for inserting a hand-coded
408 HTML blocks into HTML output, for example.
410 @node Headings, Emphasizing Text, Paragraphs, Markup Rules
411 @comment  node-name,  next,  previous,  up
412 @section Headings
413 @cindex headings
415 A heading becomes a chapter or section in printed output -- depending on
416 the style.  To indicate a heading, start a new paragraph with one to
417 three asterices, followed by a space and the heading title.  Then begin
418 another paragraph to enter the text for that section.
420 Only 3 levels of headings will be published as headings.  A fourth level
421 of headings will be marked up, but displayed as plain text.
423 @example
424 * First level
426 ** Second level
428 *** Third level
429 @end example
431 @node Emphasizing Text, Footnotes, Headings, Markup Rules
432 @comment  node-name,  next,  previous,  up
433 @section Emphasizing Text
434 @cindex emphasizing text
435 @cindex underlining text
436 @cindex italicizing text
437 @cindex verbatim text
438 @cindex monospace, rendering words
440 To emphasize text, surround it with certain specially recognized
441 characters:
443 @example
444 *emphasis*
445 **strong emphasis**
446 ***very strong emphasis***
447 _underlined_
448 =verbatim and monospace=
449 @end example
451 @cindex WYSIWYG
452 While editing a Muse document in Muse mode, these forms of emphasis will
453 be highlighted in a WYSIWYG manner.  Each of these forms may span
454 multiple lines, with the exception of the verbatim and monospace form.
456 @node Footnotes, Verse, Emphasizing Text, Markup Rules
457 @comment  node-name,  next,  previous,  up
458 @section Footnotes
459 @cindex footnotes
461 A footnote reference is simply a number in square brackets.  To define
462 the footnote, place this definition at the bottom of your file.
463 @samp{footnote-mode} can be used to greatly facilitate the creation of
464 these kinds of footnotes.
466 Footnotes are defined by the same number in brackets occurring at the
467 beginning of a line.  Use footnote-mode's @kbd{C-c ! a} command, to very
468 easily insert footnotes while typing.  Use @kbd{C-x C-x} to return to
469 the point of insertion.
471 @node Verse, Lists, Footnotes, Markup Rules
472 @comment  node-name,  next,  previous,  up
473 @section Verse
474 @cindex verses
475 @cindex poetry
477 Poetry requires that whitespace be preserved, but without resorting to
478 monospace.  To indicate this, use the following markup, reminiscent of
479 email quotations:
481 @example
482 > A line of Emacs verse;
483 >   forgive its being so terse.
484 @end example
486 You can also use the @verb{|<verse>|} tag, if you prefer:
488 @example
489 <verse>
490 A line of Emacs verse;
491   forgive its being so terse.
492 </verse>
493 @end example
495 Multiple stanzas may be included in one set of @verb{|<verse>|} tags, as
496 follows.
498 @cindex verses, multiple stanzas
499 @example
500 <verse>
501 A line of Emacs verse;
502   forgive its being so terse.
504 This a second stanza:
505 Something longer should go here,
506 But the author is out of ideas.
507 </verse>
508 @end example
510 @node Lists, Tables, Verse, Markup Rules
511 @comment  node-name,  next,  previous,  up
512 @section Lists
513 @cindex lists
515 Lists are given using special characters at the beginning of a line.
516 Whitespace must occur before bullets or numbered items, to distinguish
517 from the possibility of those characters occurring in a real sentence.
519 @cindex lists, bullets
520 These are rendered as a bullet list:
522 @example
523   - bullet item one
524   - bullet item two
525 @end example
527 @cindex lists, enumerated
528 An enumerated list:
530 @example
531   1. Enum item one
532   2. Enum item two
533 @end example
535 @cindex lists, definitions
536 And a definition list:
538 @example
539 Term1 ::
540   This is a first definition
541   And it has two lines;
542   no, make that three.
544 Term2 ::
545   This is a second definition
546 @end example
548 @node Tables, Links, Lists, Markup Rules
549 @comment  node-name,  next,  previous,  up
550 @section Tables
551 @cindex tables
553 @cindex tables, simple
554 Only very simple tables are supported.  The syntax is:
556 @example
557   Double bars  || Separate header fields
559   Single bars   | Separate body fields
560   Here are more | body fields
562   Triple bars ||| Separate footer fields
563 @end example
565 @node Links, Horizontal Rules and Anchors, Tables, Markup Rules
566 @comment  node-name,  next,  previous,  up
567 @section Links
568 @cindex links
570 @cindex links, explicit
572 A hyperlink can reference a URL, or another page within a Muse
573 project.  In addition, descriptive text can be specified, which should
574 be displayed rather than the link text in output styles that supports
575 link descriptions.  The syntax is:
577 @example
578 [[link target][link description]]
579 [[link target without description]]
580 @end example
582 Thus, the current maintainer's homepage for Muse can be found
583 @samp{[[http://www.mwolson.org/projects/MuseMode.html][here]]},
584 or at @samp{[[http://www.mwolson.org/projects/MuseMode.html]]}.
586 @cindex images
587 @cindex links, with images
588 @strong{Image links}
590 Links to images may be used in either the target or the description, or
591 both.  Thus, the following code will publish as a clickable image that
592 points to @url{http://www.mwolson.org/}.
594 @example
595 [[http://www.mwolson.org/][http://www.mwolson.org/static/logos/site-logo.png]]
596 @end example
598 @cindex images, local
599 @cindex images, displaying
600 If a link to a locally-available image is encountered in the link
601 description, Muse mode will attempt to display it if your version of
602 Emacs permits this.  The following example will display correctly and
603 publish correctly if a @acronym{PNG} file called @file{TestLogo.png}
604 exists in the @file{../pics/} directory.
606 @example
607 [[TestPage][../pics/TestLogo.png]]
608 @end example
610 @cindex images, without a description
611 An image link is not required to have a description.  The link
612 @samp{[[../myimage.png]]} will display and publish as expected.
614 @cindex links, raw
615 @cindex URLs
616 @cindex Email addresses
617 @cindex images, inlined
618 @strong{Bare URLs and Email addresses}
620 A URL or email address encountered in the input text is published as
621 a hyperlink if the output style supports it.  If it is an image URL,
622 it will be inlined if possible.
624 @node Horizontal Rules and Anchors, Embedded Lisp, Links, Markup Rules
625 @comment  node-name,  next,  previous,  up
626 @section Horizontal Rules and Anchors
628 @cindex horizontal rules
629 @cindex dashes
630 @strong{Horizontal Rules}
632 Four or more dashes indicate a horizontal rule.  Be sure to put blank
633 lines around it, or it will be considered part of the proceeding or
634 following paragraph!
636 @cindex anchors
637 @cindex links, with target on same page
638 @strong{Anchors}
640 If you begin a line with "#anchor" -- where "anchor" can be any word
641 that doesn't contain whitespace -- it defines an anchor at that point
642 into the document.  This point can be referenced using "page#anchor" as
643 the target in a Muse link.
645 @node Embedded Lisp, , Horizontal Rules and Anchors, Markup Rules
646 @comment  node-name,  next,  previous,  up
647 @section Embedded Lisp
648 @cindex lisp, embedded
650 Arbitrary kinds of markup can be achieved using the @verb{|<lisp>|} tag,
651 which is the only Muse tag supported in a style's header and footer
652 text.  With the @verb{|<lisp>|} tag, you may generated whatever output
653 text you wish.  The inserted output will get marked up, if the
654 @verb{|<lisp>|} tag appears within the main text of the document.
656 @example
657 <lisp>(concat "This form gets " "inserted")</lisp>
658 @end example
660 @cindex lisp, and insert command
661 Note that you should not use the @code{insert} command within a set of
662 @verb{|<lisp>|} tags, since the return value from the @verb{|<lisp>|}
663 tags will be automatically inserted into the document.
665 @node Publishing Styles, Getting Help and Reporting Bugs, Markup Rules, Top
666 @comment  node-name,  next,  previous,  up
667 @chapter Publishing Styles
668 @cindex publishing styles
670 One of the principle features of Muse is the ability to publish a simple
671 input text to a variety of different output styles.  Muse also makes it
672 easy to create new styles, or derive from an existing style.
674 @menu
675 * Deriving Styles::             Deriving a style from an existing one.
676 @end menu
678 @node Deriving Styles, , Publishing Styles, Publishing Styles
679 @comment  node-name,  next,  previous,  up
680 @section Deriving styles
681 @cindex publishing styles, deriving
683 To create a new style from an existing one, use @code{muse-derive-style}
684 as follows.  This is a good way to fix something you don't like about a
685 particular publishing style, or to personalize it.
687 @example
688 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
689 @end example
691 The derived name is a string defining the new style, such as "my-html".
692 The base name must identify an existing style, such as "html" -- if you
693 have loaded @file{muse-html}.  The style parameters are the same as
694 those used to create a style, except that they override whatever
695 definitions exist in the base style.  However, some definitions only
696 partially override.  Those which support partial overriding are:
698 @table @option
700 @item :functions
701 If a markup function is not found in the derived style's function list,
702 the base style's function list will be queried.
704 @item :strings
705 If a markup string is not found in the derived style's string list, the
706 base style's string list will be queried.
708 @item :before
709 If this option is specified, it will be consulted rather than the
710 corresponding value in the derived style.  This applies to the following
711 options as well.
713 @item :before-end
715 @item :after
717 @end table
720 @node Getting Help and Reporting Bugs, History, Publishing Styles, Top
721 @comment  node-name,  next,  previous,  up
722 @chapter Getting Help and Reporting Bugs
723 @cindex help, getting
724 @cindex bugs, reporting
726 After you have read this guide, if you still have questions about
727 Muse, or if you have bugs to report, there are several places you can
730 @uref{http://www.mwolson.org/projects/MuseMode.html} is the page that
731 Michael Olson made for Muse.  For the duration of his
732 maintainership, it may be considered the official Muse website.
734 @uref{http://www.emacswiki.org/cgi-bin/wiki/MuseMode} is the
735 emacswiki.org page, and anyone may add tips, hints, or bug descriptions
736 to it.
738 You can join the mailing list at
739 @email{emacs-wiki-discuss@@nongnu.org} using the subscription form at
740 @uref{http://mail.nongnu.org/mailman/listinfo/
741 emacs-wiki-discuss}. This mailing list is also available via Gmane
742 (@uref{http://gmane.org/}). The group is called
743 @samp{gmane.emacs.wiki.general}.
745 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
746 contributors are frequently around and willing to answer your
747 questions.  The @samp{#muse} channel is also available for
748 Muse-specific help, and its current maintainer hangs out there.
750 You can also contact the maintainer of MuseMode, Michael Olson,
751 at @email{mwolson@@gnu.org}.
753 @node History, Contributors, Getting Help and Reporting Bugs, Top
754 @comment  node-name,  next,  previous,  up
755 @chapter History
756 @cindex history, of Muse
758 @itemize
759 @item 2004
761 John Wiegley started Muse upon realizing that EmacsWiki had some serious
762 limitations. Around February 2004, he started making "emacs-wiki version
763 3.00 APLHA", which eventually became known as Muse.
765 Most of those who frequent the emacs-wiki mailing list continued to use
766 emacs-wiki, mainly because Planner hasn't been ported over to it.
768 As of 2004-12-01, Michael Olson became the maintainer of Muse, as per
769 John Wiegley's request.
771 @end itemize
773 @node Contributors, GNU General Public License, History, Top
774 @comment  node-name,  next,  previous,  up
775 @chapter Contributors
776 @cindex contributors
778 The first draft of this document was taken from the emacs-wiki texinfo
779 manual.  Michael Olson adapted it for Muse and added most of its
780 content.
782 John Sullivan did a majority of the work on the emacs-wiki texinfo
783 manual.
785 While Sacha Chua maintained emacs-wiki, she worked quite a bit on the
786 emacs-wiki texinfo manual.
788 @node GNU General Public License, Concept Index, Contributors, Top
789 @comment  node-name,  next,  previous,  up
790 @appendix GNU GENERAL PUBLIC LICENSE
791 @center Version 2, June 1991
792 @cindex GPL
793 @cindex GNU General Public License
795 @c This file is intended to be included in another file.
797 @display
798 Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
799 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
801 Everyone is permitted to copy and distribute verbatim copies
802 of this license document, but changing it is not allowed.
803 @end display
805 @appendixsec Preamble
807   The licenses for most software are designed to take away your
808 freedom to share and change it.  By contrast, the GNU General Public
809 License is intended to guarantee your freedom to share and change free
810 software---to make sure the software is free for all its users.  This
811 General Public License applies to most of the Free Software
812 Foundation's software and to any other program whose authors commit to
813 using it.  (Some other Free Software Foundation software is covered by
814 the GNU Library General Public License instead.)  You can apply it to
815 your programs, too.
817   When we speak of free software, we are referring to freedom, not
818 price.  Our General Public Licenses are designed to make sure that you
819 have the freedom to distribute copies of free software (and charge for
820 this service if you wish), that you receive source code or can get it
821 if you want it, that you can change the software or use pieces of it
822 in new free programs; and that you know you can do these things.
824   To protect your rights, we need to make restrictions that forbid
825 anyone to deny you these rights or to ask you to surrender the rights.
826 These restrictions translate to certain responsibilities for you if you
827 distribute copies of the software, or if you modify it.
829   For example, if you distribute copies of such a program, whether
830 gratis or for a fee, you must give the recipients all the rights that
831 you have.  You must make sure that they, too, receive or can get the
832 source code.  And you must show them these terms so they know their
833 rights.
835   We protect your rights with two steps: (1) copyright the software, and
836 (2) offer you this license which gives you legal permission to copy,
837 distribute and/or modify the software.
839   Also, for each author's protection and ours, we want to make certain
840 that everyone understands that there is no warranty for this free
841 software.  If the software is modified by someone else and passed on, we
842 want its recipients to know that what they have is not the original, so
843 that any problems introduced by others will not reflect on the original
844 authors' reputations.
846   Finally, any free program is threatened constantly by software
847 patents.  We wish to avoid the danger that redistributors of a free
848 program will individually obtain patent licenses, in effect making the
849 program proprietary.  To prevent this, we have made it clear that any
850 patent must be licensed for everyone's free use or not licensed at all.
852   The precise terms and conditions for copying, distribution and
853 modification follow.
855 @iftex
856 @appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
857 @end iftex
858 @ifinfo
859 @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
860 @end ifinfo
862 @enumerate 0
863 @item
864 This License applies to any program or other work which contains
865 a notice placed by the copyright holder saying it may be distributed
866 under the terms of this General Public License.  The ``Program'', below,
867 refers to any such program or work, and a ``work based on the Program''
868 means either the Program or any derivative work under copyright law:
869 that is to say, a work containing the Program or a portion of it,
870 either verbatim or with modifications and/or translated into another
871 language.  (Hereinafter, translation is included without limitation in
872 the term ``modification''.)  Each licensee is addressed as ``you''.
874 Activities other than copying, distribution and modification are not
875 covered by this License; they are outside its scope.  The act of
876 running the Program is not restricted, and the output from the Program
877 is covered only if its contents constitute a work based on the
878 Program (independent of having been made by running the Program).
879 Whether that is true depends on what the Program does.
881 @item
882 You may copy and distribute verbatim copies of the Program's
883 source code as you receive it, in any medium, provided that you
884 conspicuously and appropriately publish on each copy an appropriate
885 copyright notice and disclaimer of warranty; keep intact all the
886 notices that refer to this License and to the absence of any warranty;
887 and give any other recipients of the Program a copy of this License
888 along with the Program.
890 You may charge a fee for the physical act of transferring a copy, and
891 you may at your option offer warranty protection in exchange for a fee.
893 @item
894 You may modify your copy or copies of the Program or any portion
895 of it, thus forming a work based on the Program, and copy and
896 distribute such modifications or work under the terms of Section 1
897 above, provided that you also meet all of these conditions:
899 @enumerate a
900 @item
901 You must cause the modified files to carry prominent notices
902 stating that you changed the files and the date of any change.
904 @item
905 You must cause any work that you distribute or publish, that in
906 whole or in part contains or is derived from the Program or any
907 part thereof, to be licensed as a whole at no charge to all third
908 parties under the terms of this License.
910 @item
911 If the modified program normally reads commands interactively
912 when run, you must cause it, when started running for such
913 interactive use in the most ordinary way, to print or display an
914 announcement including an appropriate copyright notice and a
915 notice that there is no warranty (or else, saying that you provide
916 a warranty) and that users may redistribute the program under
917 these conditions, and telling the user how to view a copy of this
918 License.  (Exception: if the Program itself is interactive but
919 does not normally print such an announcement, your work based on
920 the Program is not required to print an announcement.)
921 @end enumerate
923 These requirements apply to the modified work as a whole.  If
924 identifiable sections of that work are not derived from the Program,
925 and can be reasonably considered independent and separate works in
926 themselves, then this License, and its terms, do not apply to those
927 sections when you distribute them as separate works.  But when you
928 distribute the same sections as part of a whole which is a work based
929 on the Program, the distribution of the whole must be on the terms of
930 this License, whose permissions for other licensees extend to the
931 entire whole, and thus to each and every part regardless of who wrote it.
933 Thus, it is not the intent of this section to claim rights or contest
934 your rights to work written entirely by you; rather, the intent is to
935 exercise the right to control the distribution of derivative or
936 collective works based on the Program.
938 In addition, mere aggregation of another work not based on the Program
939 with the Program (or with a work based on the Program) on a volume of
940 a storage or distribution medium does not bring the other work under
941 the scope of this License.
943 @item
944 You may copy and distribute the Program (or a work based on it,
945 under Section 2) in object code or executable form under the terms of
946 Sections 1 and 2 above provided that you also do one of the following:
948 @enumerate a
949 @item
950 Accompany it with the complete corresponding machine-readable
951 source code, which must be distributed under the terms of Sections
952 1 and 2 above on a medium customarily used for software interchange; or,
954 @item
955 Accompany it with a written offer, valid for at least three
956 years, to give any third party, for a charge no more than your
957 cost of physically performing source distribution, a complete
958 machine-readable copy of the corresponding source code, to be
959 distributed under the terms of Sections 1 and 2 above on a medium
960 customarily used for software interchange; or,
962 @item
963 Accompany it with the information you received as to the offer
964 to distribute corresponding source code.  (This alternative is
965 allowed only for noncommercial distribution and only if you
966 received the program in object code or executable form with such
967 an offer, in accord with Subsection b above.)
968 @end enumerate
970 The source code for a work means the preferred form of the work for
971 making modifications to it.  For an executable work, complete source
972 code means all the source code for all modules it contains, plus any
973 associated interface definition files, plus the scripts used to
974 control compilation and installation of the executable.  However, as a
975 special exception, the source code distributed need not include
976 anything that is normally distributed (in either source or binary
977 form) with the major components (compiler, kernel, and so on) of the
978 operating system on which the executable runs, unless that component
979 itself accompanies the executable.
981 If distribution of executable or object code is made by offering
982 access to copy from a designated place, then offering equivalent
983 access to copy the source code from the same place counts as
984 distribution of the source code, even though third parties are not
985 compelled to copy the source along with the object code.
987 @item
988 You may not copy, modify, sublicense, or distribute the Program
989 except as expressly provided under this License.  Any attempt
990 otherwise to copy, modify, sublicense or distribute the Program is
991 void, and will automatically terminate your rights under this License.
992 However, parties who have received copies, or rights, from you under
993 this License will not have their licenses terminated so long as such
994 parties remain in full compliance.
996 @item
997 You are not required to accept this License, since you have not
998 signed it.  However, nothing else grants you permission to modify or
999 distribute the Program or its derivative works.  These actions are
1000 prohibited by law if you do not accept this License.  Therefore, by
1001 modifying or distributing the Program (or any work based on the
1002 Program), you indicate your acceptance of this License to do so, and
1003 all its terms and conditions for copying, distributing or modifying
1004 the Program or works based on it.
1006 @item
1007 Each time you redistribute the Program (or any work based on the
1008 Program), the recipient automatically receives a license from the
1009 original licensor to copy, distribute or modify the Program subject to
1010 these terms and conditions.  You may not impose any further
1011 restrictions on the recipients' exercise of the rights granted herein.
1012 You are not responsible for enforcing compliance by third parties to
1013 this License.
1015 @item
1016 If, as a consequence of a court judgment or allegation of patent
1017 infringement or for any other reason (not limited to patent issues),
1018 conditions are imposed on you (whether by court order, agreement or
1019 otherwise) that contradict the conditions of this License, they do not
1020 excuse you from the conditions of this License.  If you cannot
1021 distribute so as to satisfy simultaneously your obligations under this
1022 License and any other pertinent obligations, then as a consequence you
1023 may not distribute the Program at all.  For example, if a patent
1024 license would not permit royalty-free redistribution of the Program by
1025 all those who receive copies directly or indirectly through you, then
1026 the only way you could satisfy both it and this License would be to
1027 refrain entirely from distribution of the Program.
1029 If any portion of this section is held invalid or unenforceable under
1030 any particular circumstance, the balance of the section is intended to
1031 apply and the section as a whole is intended to apply in other
1032 circumstances.
1034 It is not the purpose of this section to induce you to infringe any
1035 patents or other property right claims or to contest validity of any
1036 such claims; this section has the sole purpose of protecting the
1037 integrity of the free software distribution system, which is
1038 implemented by public license practices.  Many people have made
1039 generous contributions to the wide range of software distributed
1040 through that system in reliance on consistent application of that
1041 system; it is up to the author/donor to decide if he or she is willing
1042 to distribute software through any other system and a licensee cannot
1043 impose that choice.
1045 This section is intended to make thoroughly clear what is believed to
1046 be a consequence of the rest of this License.
1048 @item
1049 If the distribution and/or use of the Program is restricted in
1050 certain countries either by patents or by copyrighted interfaces, the
1051 original copyright holder who places the Program under this License
1052 may add an explicit geographical distribution limitation excluding
1053 those countries, so that distribution is permitted only in or among
1054 countries not thus excluded.  In such case, this License incorporates
1055 the limitation as if written in the body of this License.
1057 @item
1058 The Free Software Foundation may publish revised and/or new versions
1059 of the General Public License from time to time.  Such new versions will
1060 be similar in spirit to the present version, but may differ in detail to
1061 address new problems or concerns.
1063 Each version is given a distinguishing version number.  If the Program
1064 specifies a version number of this License which applies to it and ``any
1065 later version'', you have the option of following the terms and conditions
1066 either of that version or of any later version published by the Free
1067 Software Foundation.  If the Program does not specify a version number of
1068 this License, you may choose any version ever published by the Free Software
1069 Foundation.
1071 @item
1072 If you wish to incorporate parts of the Program into other free
1073 programs whose distribution conditions are different, write to the author
1074 to ask for permission.  For software which is copyrighted by the Free
1075 Software Foundation, write to the Free Software Foundation; we sometimes
1076 make exceptions for this.  Our decision will be guided by the two goals
1077 of preserving the free status of all derivatives of our free software and
1078 of promoting the sharing and reuse of software generally.
1080 @iftex
1081 @heading NO WARRANTY
1082 @end iftex
1083 @ifinfo
1084 @center NO WARRANTY
1085 @end ifinfo
1087 @item
1088 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
1089 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
1090 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
1091 PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
1092 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1093 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
1094 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
1095 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
1096 REPAIR OR CORRECTION.
1098 @item
1099 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1100 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
1101 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
1102 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
1103 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
1104 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
1105 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
1106 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
1107 POSSIBILITY OF SUCH DAMAGES.
1108 @end enumerate
1110 @iftex
1111 @heading END OF TERMS AND CONDITIONS
1112 @end iftex
1113 @ifinfo
1114 @center END OF TERMS AND CONDITIONS
1115 @end ifinfo
1117 @page
1118 @appendixsec Appendix: How to Apply These Terms to Your New Programs
1120   If you develop a new program, and you want it to be of the greatest
1121 possible use to the public, the best way to achieve this is to make it
1122 free software which everyone can redistribute and change under these terms.
1124   To do so, attach the following notices to the program.  It is safest
1125 to attach them to the start of each source file to most effectively
1126 convey the exclusion of warranty; and each file should have at least
1127 the ``copyright'' line and a pointer to where the full notice is found.
1129 @smallexample
1130 @var{one line to give the program's name and a brief idea of what it does.}
1131 Copyright (C) @var{yyyy}  @var{name of author}
1133 This program is free software; you can redistribute it and/or modify
1134 it under the terms of the GNU General Public License as published by
1135 the Free Software Foundation; either version 2 of the License, or
1136 (at your option) any later version.
1138 This program is distributed in the hope that it will be useful,
1139 but WITHOUT ANY WARRANTY; without even the implied warranty of
1140 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1141 GNU General Public License for more details.
1143 You should have received a copy of the GNU General Public License along
1144 with this program; if not, write to the Free Software Foundation, Inc.,
1145 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1146 @end smallexample
1148 Also add information on how to contact you by electronic and paper mail.
1150 If the program is interactive, make it output a short notice like this
1151 when it starts in an interactive mode:
1153 @smallexample
1154 Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
1155 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1156 This is free software, and you are welcome to redistribute it
1157 under certain conditions; type `show c' for details.
1158 @end smallexample
1160 The hypothetical commands @samp{show w} and @samp{show c} should show
1161 the appropriate parts of the General Public License.  Of course, the
1162 commands you use may be called something other than @samp{show w} and
1163 @samp{show c}; they could even be mouse-clicks or menu items---whatever
1164 suits your program.
1166 You should also get your employer (if you work as a programmer) or your
1167 school, if any, to sign a ``copyright disclaimer'' for the program, if
1168 necessary.  Here is a sample; alter the names:
1170 @example
1171 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
1172 `Gnomovision' (which makes passes at compilers) written by James Hacker.
1174 @var{signature of Ty Coon}, 1 April 1989
1175 Ty Coon, President of Vice
1176 @end example
1178 This General Public License does not permit incorporating your program into
1179 proprietary programs.  If your program is a subroutine library, you may
1180 consider it more useful to permit linking proprietary applications with the
1181 library.  If this is what you want to do, use the GNU Library General
1182 Public License instead of this License.
1185 @node Concept Index,  , GNU General Public License, Top
1186 @comment  node-name,  next,  previous,  up
1187 @unnumbered Index
1189 @printindex cp
1191 @bye
1193 @c Local Variables:
1194 @c ispell-local-pdict: "ispell-dict"
1195 @c End: