Workbook User Guide

Usage

The workflow is simple. Just get your manuscript ready and run the software.

  1. Prepare manuscript.
  2. Run Workbook to generate PDF.

You can edit the manuscript and re-generate PDF as many times as you want. Clean up files when you are done. See the following sections for instruction.

Manuscript Preparation

Workbook accepts XHTML-like manuscript format. Technically, it is a subset of XHTML + MathML, expanded using class, id, title and other attributes. (A kind of microformats.)

Note:

Manuscript should look like this, for example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
 "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-type" content="application/xhtml+xml;"/>
    <meta name="author" content="John Doe"/>
    <meta name="date" content="2038-02-31"/>
    <title>Title</title>
  </head>
  <body>
    ...
  </body>
</html>

See the notation section for detail.

Generating PDF from Manuscript

As of writing this, command-line interface is the default.

When your manuscript is foo.xhtml, type workbook build foo.pdf to produce PDF.

You can try it out with the test data included in the distribution.

% cp /usr/share/doc/workbook ./
% cd workbook
% ls test/testdata.xhtml
test/testdata.xhtml
% workbook build test/testdata.pdf
...
% ls test/testdata.pdf
test/testdata.pdf
%

Cleaning Up Files

To clean up intermediate files, type workbook clean bookname.

% workbook clean test/testdata

To clean up all the generated files including PDF, type workbook distclean bookname.

% workbook distclean test/testdata

Advanced Usage

Using Existing HTML Documents as Manuscript

To import HTML file and accompanying images, etc., type workbook import filename.

% workbook import foo.html

Note that only clean HTML can be imported. This feature is very much preliminary.

Render Specific Language Only

langs option lets you extract elements with specific xml:lang attribute (and elements with no xml:lang attribute).

% workbook --langs="en" build test/testdata.pdf
% workbook --langs="all" build test/testdata.pdf

Note that invalid xml:lang value in the manuscript leads to inproper result.

Per-Project User Configuration

You can configure your project setting via user configuration files (still an experimental feature).

% workbook initproject .
% cp .book/html2latex.xsl.example .book/html2latex.xsl
% $EDITOR .book/html2latex.xsl

Troubleshooting