Next: , Previous: Blosxom, Up: Publishing Styles


9.2 Publishing entries into a compilation

This publishing style is used to output “books” in LaTeX or PDF format.

Each page will become a separate chapter in the book, unless the style keyword :nochapters is used, in which case they are all run together as if one giant chapter.

One way of publishing a book is to make a project for it, add the project to muse-project-alist, and use the book-pdf style with a very specific :include value to specify some page whose contents will be checked for the values of #title and #date, and whose name will be used in the output file. Then to publish the book, visit the aforementioned page and use C-c C-t or C-c C-p to trigger the publishing process. An example muse-project-alist for this method follows.

     (setq muse-project-alist
           '(("MyNotes" (:nochapters t  ; do automatically add chapters
                         :book-chapter "Computer Science"
                         "~/Notes/cs"
                         :book-chapter "Mathematics"
                         "~/Notes/math"
                         :book-chapter "Emacs"
                         "~/Notes/emacs"
                         :book-end t ; the rest will not be placed in the book
                         "~/Notes"   ; so we can find the notes-anthology page
                         "~/Notes/private"
                         :force-publish ("index")
                         :default "index")
              (:base "book-pdf"
                     :include "/notes-anthology[^/]*$"
                     :path "~/public_html/notes")
              ;; other publishing styles for each directory go here,
              ;; if desired
              )))

In this example, there would be a file called ~/Notes/notes-anthology.muse, which would contain just the following. The resulting book would be published to ~/public_html/notes/notes-anthology.pdf.

     #title My Technology Ramblings

Another way is to call the muse-book-publish-project function manually, with a custom project entry. An example of this may be found in John Wiegley's configuration file at examples/johnw/muse-init.el, in the muse-publish-my-books function.

Styles provided

book-latex
Publish a book in LaTeX form. The header and footer are different than the normal LaTeX publishing mode.


book-pdf
Publish a book in PDF form. The header and footer are different than the normal PDF publishing mode.

Options provided

muse-book-before-publish-hook
A hook run in the book buffer before it is marked up.
muse-book-after-publish-hook
A hook run in the book buffer after it is marked up.
muse-book-latex-header
Header used for publishing books to LaTeX.

This may be text or a filename.

muse-book-latex-footer
Footer used for publishing books to LaTeX.

This may be text or a filename.