3 Emacs Muse is an authoring and publishing environment for Emacs. It
4 simplifies the process of writings documents and publishing them to
5 various output formats.
7 Muse consists of two main parts: an enhanced text-mode for authoring
8 documents and navigating within Muse projects, and a set of publishing
9 styles for generating different kinds of output.
15 To use Muse, add the directory containing its files to your
16 =load-path= variable, in your =.emacs= file. Then, load in the
17 authoring mode, and the styles you wish to publish to. For example:
20 (add-to-list 'load-path "<path to Muse>")
22 (require 'muse-mode) ; load authoring mode
24 (require 'muse-html) ; load publishing styles I use
26 (require 'muse-texinfo)
27 (require 'muse-docbook)
30 Once loaded, the command =M-x muse-publish-this-file= will publish an
31 input document to any available style. If you enable =muse-mode=
32 within a buffer, by typing =M-x muse-mode=, this command will be bound
35 * Creating a Muse project
37 Often you will want to publish all the files within a directory to a
38 particular set of output styles automatically. To support, Muse
39 allows for the creations of "projects". Here is a sample project, to
40 be defined in your =.emacs= file:
43 (require 'muse-project)
45 (setq muse-project-alist
46 '(("website" ; my various writings
47 ("~/Pages" :default "index")
48 (:base "html" :path "~/public_html")
49 (:base "pdf" :path "~/public_html/pdf"))))
52 The above defines a project named "website", whose files are located
53 in the directory =~/Pages=. The default page to visit is =index=.
54 When this project is published, each page will be output as HTML to
55 the directory =~/public_html=, and as PDF to the directory
56 =~/public_html/pdf=. Within any project page, you may create a link
57 to other pages using the syntax =[[pagename]]=.
61 A Muse document uses special, contextual markup rules to determine how
62 to format the output result. For example, if a paragraph is indented,
63 Muse assumes it should be quoted.
65 There are not too many markup rules, and all of them strive to be as
66 simple as possible so that you can focus on document creation, rather
71 Separate paragraphs in Muse must be separate by a blank line.
73 For example, the input text used for this section is:
76 Separate paragraphs in Muse must be separate by a blank line.
78 For example, the input text used for this section is:
81 ** Centered paragraphs and quotations
83 A line that begins with six or more columns of whitespace (either tabs
84 or spaces) indicates a centered paragraph.
90 But if a line begins with whitespace, though less than six columns,
91 it indicates a quoted paragraph.
95 A heading becomes a chapter or section in printed output -- depending
96 on the style. To indicate a heading, start a new paragraph with one
97 to three asterices, followed by a space and the heading title. Then
98 begin another paragraph to enter the text for that section.
110 Four or more dashes indicate a horizontal rule. Be sure to put blank
111 lines around it, or it will be considered part of the proceeding or
116 The separator above was produced by typing:
124 To emphasize text, surround it with certain specially recognized
130 ***very strong emphasis***
132 =verbatim and monospace=
135 The above list renders as:
140 ***very strong emphasis***
142 =verbatim and monospace=
147 A footnote reference is simply a number in square
148 brackets<verbatim>[1]</verbatim>.[1] To define the footnote, place
149 this definition at the bottom of your file. =footnote-mode= can be
150 used to greatly facilitate the creation of these kinds of footnotes.
154 [1] Footnotes are defined by the same number in brackets
155 occurring at the beginning of a line. Use footnote-mode's
156 C-c ! a command, to very easily insert footnotes while
157 typing. Use C-x C-x to return to the point of insertion.
162 Poetry requires that whitespace be preserved, but without resorting to
163 monospace. To indicate this, use the following markup, reminiscent of
167 > A line of Emacs verse;
168 > forgive its being so terse.
171 The above is rendered as:
173 > A line of Emacs verse;
174 > forgive its being so terse.
176 You can also use the =<literal><verse></literal>= tag, if you prefer:
180 A line of Emacs verse;
181 forgive its being so terse.
185 ** Literal paragraphs
187 The =<literal><example></literal>= tag is used for examples, where
188 whitespace should be preserved, the text rendered in monospace, and
189 any characters special to the output style escaped.
191 There is also the =<literal><literal></literal>= tag, which causes a
192 marked block to be entirely left alone. This can be used for
193 inserting a hand-coded HTML blocks into HTML output, for example.
197 Lists are given using special characters at the beginning of a line.
198 Whitespace must occur before bullets or numbered items, to distinguish
199 from the possibility of those characters occurring in a real sentence.
201 The supported kinds of lists are:
207 1. Enumerated item one
208 2. Enumerated item two
210 Term1 :: A definition one
212 Term2 :: A definition two
215 These are rendered as a bullet list:
225 And a definition list:
228 This is a first definition
229 And it has two lines;
233 This is a second definition
238 Only very simple tables are supported. The syntax is:
241 Double bars || Separate header fields
243 Single bars | Separate body fields
244 Here are more | body fields
246 Triple bars ||| Separate footer fields
249 The above is rendered as:
251 Double bars || Separate header fields
253 Single bars | Separate body fields
254 Here are more | body fields
256 Triple bars ||| Separate footer fields
259 Double bars || Separate header fields
261 Single bars | Separate body fields
262 Here are more | body fields
264 Triple bars ||| Separate footer fields
267 ** Anchors and tagged links
269 =#example= If you begin a line with "#anchor" -- where "anchor" can be
270 any word that doesn't contain whitespace -- it defines an anchor at
271 that point into the document. This point can be referenced using
272 "page#anchor" as the target in a Muse link (see below).
274 ** URLs and E-mail addresses
276 A URL or e-mail address encountered in the input text is published as
277 a hyperlink if the output style supports it. If it is an image URL,
278 it will be inlined if possible. For example, the latest Muse source
280 http://www.newartisans.com/johnw/Emacs/muse.tar.gz and mail may be
281 sent to johnw@gnu.org
285 A hyperlink can reference a URL, or another page within a Muse
286 project. In addition, descriptive text can be specified, which should
287 be displayed rather than the link text in output styles that supports
288 link descriptions. The syntax is:
291 [[link target][link description]]
292 [[link target without description]]
295 Thus, Muse can be downloaded [[http://www.newartisans.com/johnw/Emacs/muse.tar.gz][here]], or at
296 [[http://www.newartisans.com/johnw/Emacs/muse.tar.gz]].
300 Arbitrary kinds of markup can be achieved using the
301 =<literal><lisp></literal>= tag, which is the only Muse tag supported
302 in a style's header and footer text. With the
303 =<literal><lisp></literal>= tag, you may generated whatever output
304 text you wish. The inserted output will get marked up, if the
305 =<literal><lisp></literal>= tag appears within the main text of the
309 <lisp>(concat "This form gets " "inserted")</lisp>
312 The above renders as: <lisp>(concat "This form gets " "inserted")</lisp>.
318 One of the principle features of Muse is the ability to publish a
319 simple input text to a variety of different output styles. Muse also
320 makes it easy to create new styles, or derive from an existing style.
322 ** Deriving from an existing style
324 To create a new style from an existing one, use =muse-derive-style=:
327 (muse-derive-style DERIVED-NAME BASE-NAME STYLE-PARAMETERS)
330 The derived name is a string defining the new style, such as
331 "my-html". The base name must identify an existing style, such as
332 "html" -- if you have loaded =muse-html=. The style parameters are
333 the same as those used to create a style, except that they override
334 whatever definitions exist in the base style. However, some
335 definitions only partially override. Those which support partial
339 If a markup function is not found in the derived style's function
340 list, the base style's function list will be queried.
350 ** Overriding an existing style
352 ** Creating a new style
355 [1] This is a footnote.