Introduction

      Installation

        Essentials

        Full-featured installation (PDF)

Introduction

The texts stored on the libraries are formatted with a dialect of the Emacs Muse markup, which is described in deep details in the manual.

The files are pure plain text (with the popular and ubiquitous UTF-8 encoding), and you can edit them with any editor.

The following how-to explains how to install on your very own machine the needed code to generate the HTML, EPUB and PDF (imposed and not) formats, starting from a muse formatted plain text file. You can retrieve those files for any text on the library downloading the “plain text source” file from the list of available downloads.

Installation

The programs are written in Perl. Every GNU/Linux operating system comes with Perl installed. They are supposed to work on Mac and Windows too, but you have to find your way to get Perl installed (together with a way to install modules from CPAN, the repository of Perl code, usually the program called App::cpanminus, which is invoked with the command cpanm).

Given that Debian and Ubuntu are the most used distributions around, the following tutorial will assume that the user run one of them.

Essentials

Install cpanm to retrieve the modules from CPAN and the template engine. Please become root before proceeding (Ubuntu: sudo su -, Debian: su -, please note the dash, it’s part of the command).

# apt-get install perl-modules perl-doc \
          cpanminus libtemplate-tiny-perl \
          libcam-pdf-perl libpdf-api2-perl

Then install the needed code from CPAN:

# cpanm Text::Amuse::Compile
Full-featured installation (PDF)

To produce PDFs you need TeXlive. In theory, only a subset is needed, but here for brevity we install the full version. Ok, it’s 1 gigabyte and half of download, about 3 as installed size, but nowadays disk space is cheap. [1] Keep in mind that you can still get EPUB and HTML without this.

# apt-get install texlive-full fonts-sil-charis

This will install the executable muse-compile.pl which by default will get you all the formats provided by the library.


$wget http://theanarchistlibrary.org/library/john-zerzan-tonality-and-totality.muse
--2014-05-17 23:28:41--  http://theanarchistlibrary.org/library/john-zerzan-tonality-and-totality.muse
Resolving theanarchistlibrary.org (theanarchistlibrary.org)... 192.235.78.154
 Connecting to theanarchistlibrary.org (theanarchistlibrary.org)|192.235.78.154|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 49128 (48K) [text/plain]
Saving to: ‘john-zerzan-tonality-and-totality.muse’

100%[=======================================>] 49,128       107K/s   in 0.4s

2014-05-17 23:28:42 (107 KB/s) — ‘john-zerzan-tonality-and-totality.muse’ saved [49128/49128]

$ muse-compile.pl --pdf --epub --html --a4-pdf \
           john-zerzan-tonality-and-totality.muse
Using Text::Amuse 0.43, Text::Amuse::Compiler 0.43, PDF::Imposition 0.14
Working on john-zerzan-tonality-and-totality.muse file in /tmp
* Created john-zerzan-tonality-and-totality.html
* Created john-zerzan-tonality-and-totality.epub
* Created john-zerzan-tonality-and-totality.a4.pdf
* Created john-zerzan-tonality-and-totality.tex
* Created john-zerzan-tonality-and-totality.pdf

Please see muse-compile.pl --help for more information.

-- Marco (marco -AT- theanarchistlibrary.org)

[1] If you manage to strip down the installation to the minimum, please let me know, and I’ll update the tutorial.

Latest entries

Loading...