The workflow is simple. Just get your manuscript ready and run the software.
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.
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.
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 %
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
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.
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.
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
Q.It does not convert my manuscript.
A.Make sure the manuscript is valid XHTML using validator.
A. Building intermediate files helps troubleshooting.
% workbook build test/testdata.tex
Q.Is feature X supported?
A.Type workbook --help
to see the help message.
A.Sorry, not yet. Your help would be highly appreciated.