tbook is a system that typesets XML documents with high-level LaTeX while HTML, XHTML+MathML and DocBook output are equally possible. It bases on the LaTeX-like tbook DTD developed for this project, XSLT transformations and further tools.
This manual is for tbook (version 1.5.2), which is an XML file format and an authoring tool.
Copyright © 2002–2004 Torsten Bronger <bronger@users.sourceforge.net>.
This documentation is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0 as published by Larry Wall. You can get it at http://dev.perl.org/rfc/346.html.
Authors of scientific or technical texts often experience the following two problems:
Authors of non-technical texts may face very similar problems.
The solution is to use XML. XML is a generic file format that has to be adapted for special purposes. tbook is one of these XML applications. It was inspired by LaTeX and can be used for documents typically written with it, although you don't need to know about LaTeX in order to use tbook.
tbook solves the above problems:
Postscript and PDF are generated via LaTeX which allows for very good layout quality. DocBook can be converted into fairly good RTFs that can be read by most wordprocessors.
Some people may dislike to lose control over the layout. These people can customise tbook's behaviour in many ways. However, the strict separation of contents and layout always remains intact.
Another difficulty is that XML files are text files, and they look rather intimidating at first sight. There are only few good XML editors available so far. However, some of them help you greatly nevertheless, e.g. GNU Emacs and Cooktop1 and new editing systems come into existence almost every week.
This is what tbook can do so far:
The installation is not trivial, mainly because tbook desperately needs some other applications, that are not included in the distribution. The most important ones are LaTeX, Ghostscript and Saxon.
However, tbook's homepage offers Linux RPMs for tbook and Saxon, and for Windows, the homepage offers a mere .EXE file that reduces the installation effort drastically.
tbook needs many LaTeX packages. Those that are part of the LaTeX core (babel, fontenc, array, etc) are nothing to worry about, every non-ancient LaTeX has them. The other packages are: booktabs, caption2, fancyhdr, geometry, helvet, hypcap, pdfcolmk, hyperref, marvosym, mathptmx, minitoc, natbib, nicefrac, pifont, preview, psfrag, ragged2e, relsize, sectsty, soul, url, wasysym. That's certainly a big part of the crème de la crème of LaTeX packages. Be aware that helvet, mathptmx, and hyperref must be as new as possible. If your versions are too old, LaTeX will gently complain.
Every modern LaTeX distribution contains most of them, maybe all; if your LaTeX distribution let you choose between different options, you should prefer a `complete' or `full' installation, else LaTeX itself will complain and tell you which package you have to install. You will find it on every CTAN server, e.g. http://www.tex.ac.uk/tex-archive/macros/latex/contrib/.
Your Babel system must know the human languages you want to use. Shouldn't be very surprising, and normally is no problem.
If you have any trouble, contact the current maintainer of tbook (the author of this document).
The installation of the tbook RPM is not different from any other RPM installation: Download the file, login as root, and then input e.g.
rpm -i tbook-1.5.2-1tb.i386.rpm
However, tbook depends on other programs and it would have been very inconvenient if I had included those dependencies within the RPM system. Only one dependency is explicit: Saxon. But you get an RPM version of Saxon from tbook's homepage, too (http://sourceforge.net/projects/tbookdtd). Saxon must be installed before you install tbook. Saxon itself needs Java, at least version 1.1, although JDK 1.3 makes Saxon run much faster. Warning: You can't use tbook with Saxon 7!
On tbook's homepage you also get an RPM version of xindy.
There are two possibilities to install tbook under Linux: The usual source distribution that is explained here, and the RPM installation described in the previous section. The RPM way is much simpler, however, it may not work for you; in this case you have to build tbook from the sources.
The following programs must be installed in order to run tbook:
Much of this may be already installed with your system.
For the Saxon you have to provide a shell script named saxon that calls it. It may look like this:
CLASSPATH=~/jars/saxon.jar:$CLASSPATH export CLASSPATH java -ms15000000 com.icl.saxon.StyleSheet $1 $2 $3 $4 $5 $6 $7 $8 $9
However, newer versions of Saxon (newer than 6.5.2) may need another class name. See the Saxon homepage at “installation”–“changes” for further details.
In order to install tbook with some convenience, you also need CWEB8, sed, patch and Flex9. However, the Linux/Intel binaries are included in the distribution, as well as all BibTeX-Styles, if you have trouble to build them.
If all preconditions are met, unpack the tar ball. If you wish, you can check the integrity of all files with non-ASCII characters with
md5sum -c tbook.md5
Adjust some paths in the Makefile, run make and then (as root) make install. You can pass LOCAL=... as an option to make and change the root of the installation. It's default value is local/. In particular, you can set it to the empty string.
After that, you will probably have to update TeX's file database, which depends on your TeX implementation. The program that does this may be called texhash or mktexlsr.
In the following I describe what happens exactly when running make install (unless, of course, you've changed some paths, which you probably will have to). You may read this only if you are really keen to know it.
There are also two methods to install tbook on the Windows operating system. The first one that should be prefered is to use the NSIS based installer/uninstaller program. Basically it's just an .EXE file called tbook-1.5.2.exe that you have to start. But before you do that, please install:
The tbook installer will also install Saxon 6.5.2 and xindy 2.0 for you.
This way has another advantage: A program called uninst.exe will uninstall tbook, delete the entries in autoexec.bat and in the registry. To uninstall tbook, you may also use the standard way via system control=>software.
This is an emergency solution in case that you can't (or don't want to) install tbook with the installer described in the previous section.
I withdrew the Windows sources distribution from the tbook download page. So if you really want to install tbook this way, please contact me.
Make sure that you have installed the following programs on your system:
Make sure that all programs are in your PATH environment variable and thus can be found by tbook!
Then install tbook: Copy the Zip file on your hard disk and unpack it with e.g. Winzip. All files are unpacked into a subdirectory of the current one. Open a command line interpreter (MS-DOS shell) and go into this subdirectory.
The first thing you have to do is to edit the file install.bat. Edit the SET ...=... entries at the beginning of the file and substitute your directory names for the default values. Then delete the two lines
pause goto end
at the beginning of install.bat.
Then start install.bat. Maybe you have to be administrator to do this. After this, set the environment variable TBLIBDIR and set it to the value that you also gave in install.bat. For this, you probably have to edit autoexec.bat. At least on my system.
Make sure that the binary files of tbook wander in a directory (BINDIR) that is part of your PATH!
After that, you will probably have to update TeX's file database. How this is done depends on your TeX implementation. With MikTeX e.g., it's an item in the MikTeX program group of the start bar.
That's it. Hopefully.
If you're looking for a good free XML editor, have a look at Cooktop.
First some words about where to get help. The text you are reading is available in Info format with
info tbook
in HTML (tbookman.html) in /usr/share/doc/tbook/, and in PDF format (tbookman.pdf) (e.g. on tbook's homepage). There are manpages available for tbtolatex, tbtohtml, tbtodocbk, tbprepare, and tbook itself.
A browsable DTD is stored in the /usr/share/doc/tbook/ directory, which may be found at a different place depending on the options you chose during installation. But it's also accessible online at http://tbookdtd.sourceforge.net/dtd/.
If all else fails, use the forums on tbook's homepage. See Web addresses.
If you want to start a new text project, enter a fresh directory and type
tbprepare <dn>
(The real document name must be substituted for <dn>.) This copies some make?? shell scripts and a file called <dn>.xml in the current directory. Then you may edit this XML file and enter your contents. Emacs does a great job here.
From the user's point of view, I now explain the most important part of tbook. It's about the programs that transform any tbook document into something else. This is obviously vital if you want to use tbook in a productive way.
You have the following commands available:
The scripts tbtolatex and tbtohtml accept -t as the very first argument. Then they will create not an XHTML file, but an HTML 4 file with bitmap equations and greater CSS compatibility for older browsers.
Additionally, you can call the following “make” scripts whenever you think it's appropriate. They will help you very much: For example, they prepare your graphics automatically for the different output formats. But they are also responsible for index and bibliography. They are constantly kept up-to-date with the document.
Please note that on some Unix/Linux installations you have to call the “make” scripts with./
– so you have to input./makeepss
instead ofmakeepss
.
(Most of theses files are updated by a call of tbtolatex, only makeidx and makebib are also updated by tbtohtml. tbtodocbk only updates makebib.)
Besides that, you will have to call LaTeX, pdfLaTeX and dvips as necessary.
makeepss, makepdfs, and makewebs process by default all graphics in your document. This may be annoying, because it usually consumes a long time and you only want to re-create one graphics. Therefore they accept an optional argument which is the name of a graphics. If it's given, they process only this graphics, as in
makewebs niceimage
This (re-)creates only the web version of the graphics that is included with
<graphics file="niceimage"/>
in the tbook document. Similarly you can give eqn-<number> to makeeqns:
makeeqns eqn-151
You can find out the number of the equation that you want to have re-created by using your browser to see which bitmap filename the formula has.
The dependencies of the make?? shell scripts and the tbto?? transformation programs are somewhat subtle. In general, if you've changed your XML file significantly (e.g., you've added a new graphics), you have to call tbtolatex in any case, because only then all make files are up to date.
Then you should call makeepss, makepdfs, and makewebs with the name of the graphics as argument.
Then you can do the transformation to HTML or DocBook, or call (pdf)LaTeX.
If you want to update your index or bibliography, call the transformation to the desired format, call makeidx or makebib respectively, and then the transformation again.
You can't destroy anything: In the worst case one call is waste of time.
Let's assume that you want to create a book in tbook format. It is supposed to be called “mybook”. So you create a new subdirectory and enter it with
mkdir mybook cd mybook
Now you must prepare the new directory for your project. Thus you enter
tbprepare mybook
Now you can list all files in the directory with dir
(Windows) or
ls -l
(Unix). You can see that not only the raw “make” scripts
have been created, but also a tiny file mybook.xml that you can
use as a beginning for your document.
Now write the document with your favourite XML or text editor. You may also rename your XML file (but leave the file extension).
Eventually you want to create something actually usable from your document. No problem, the command
tbtolatex -t mybook "two-column=true"
converts mybook.xml to mybook.tex. This two-column=true means that you want to have it typeset with two columns, see XSLT parameters. The -t means that tbook should assumes that you also (later) want to convert it to HTML 4.
But first, we want to assure that all graphics used in the document are in the correct format. You have already copied all vector images in EPS format, and all bitmaps in JPEG format into the document directory, as explained in Original graphics files. Now call
makeepss
which converts all JPEGs to EPS. This makes it possible to create with
latex mybook dvips mybook
a Postscript version of your book called mybook.ps. It may be necessary to call latex multiple times in order to get proper cross-referencing and table of contents.
The command
makepdfs
creates PDF versions of all EPS'es. Now you are ready to call
pdflatex mybook
in order to have your book in PDF format (mybook.pdf). The first pdflatex run may show error messages because it still finds old “ordinary LaTeX” help files but you can ignore that.
Now enter
makewebs
which creates web-ready bitmaps of all your graphics. With
tbtohtml -t mybook
you create mybook.html. You can already open that in your web browser. But it's more convenient to say
makepage
which creates a new subdirectory public-mybook and copies all web relevant stuff into that directory. Then you can zip everything in that directory and move it to your web provider. That's it.
If you have equations in your book, you want to have the bitmap equations created in order to see them on an HTML 4 page (remember that MathML is only possible with XHTML). You do this with
makeeqns
Normally the LaTeX package preview.sty is used for that which must be installed. You can switch it off with the XSLT parameter preview-latex, but then the process will take much longer, see XSLT parameters.
If you have a bibliography and an index with your document, you have to call
makebib makeidx
to create them or, if they are already there, to keep them up-to-date. They create bibliography and index for the last format to which you have converted. After that, you have to convert to HTML again or call LaTeX again, respectively, to actually see the changes.
Next to your tbook XML document, this directory must contain all graphics that you want to include. tbook knows four image types:
bitmap
vector
overlay
diagram
Please note that tbook may get confused if the same graphics is available in different formats in your texmf searchpath. For example, if you include a JPEG that is also available as a PNG in another directory (but where TeX looks for files), then pdfLaTeX will include that PNG which is surely not what you want.
Unfortunately there still is no perfect way to publish demanding documents in the World Wide Web, especially when they contain math. Therefore tbook offers a great variety of variants and combinations of them.
You must decide what is best for you. If you are lost, just omit all parameters, because this is probably good enough. However, that needn't be the best option, and the situation will change in the future.
tbook implements three levels of HTML support at the moment:
tbtohtml -t mybook
tbtohtml -t mybook css-mode=very-careful
If you create HTML 4 files with the argument -t, you will be able to savour your text in all modern browsers. If you use that “quirky mode”, even NS 4 can be made happy.
Without the -t option, tbook creates XHTML 1.1+MathML files. XHTML is the upcoming standard in the Web. But in order to read XHTML properly with a web browser, two conditions must be met:
But older browsers (I tested Netscape 6.2 and Internet Explorer 6) display it quite well (of course not the MathML parts).
text/xml
12.
XHTML pages that are served as ordinary HTML and that don't contain MathML may be displayed quite appealing.
Hickson's Trick: If you insist on proper MathML rendering, an interesting trick is to serve the same XHTML file as HTML for Internet Explorer and as XHTML for all others. Then both big browsers can view the MathML parts: Netscape/Mozilla via intrinsic features, and the IE via the free MathPlayer13 plugin. For this trick, have a look at http://software.hixie.ch/utilities/cgi/xhtml-for-ie/.
As an alternative to Hickson's trick, you can use the Universal Math Stylesheet (UMSS) with tbook. It has the advantage that you don't have to be able to install CGI scripts on your web server, and it is more universal. The disadvantages are that off-line viewing is a little bit inconvenient, and loading of the pages is slower.
See http://www.w3.org/Math/XSL/ for comprehensive information about the UMSS. There you can also download the four UMSS files. However for tbook, you only need pmathml.xsl and pmathmlcss.xsl. Copy both files in the same directory where the XHTML file is. This is also necessary for each copy of your document on a web server.
Then call tbook's XHTML conversion program tbtohtml with the XSLT parameter umss-rendering set to on. That's it.
Unfortunately Mozilla and Netscape use not-very-fast internal XSLT processors. Therefore a test document on my computer took 1.5 seconds to be displayed without the UMSS, and 4.2 s with it.
Other allowed values for umss-rendering can be found at http://www.w3.org/Math/XSL/ in the section “Specifying preferences”. They are used as values for the pref:renderer attribute.
You can validate your tbook files with nsgmls, an SGML validator that can be called by Emacs for you. It will show error messages, because it bases on an XML declaration file that is erroneous. Try to find this file (on my system it's called xml.dcl, but xml.decl is also possible) and change the line
128 32 UNUSED
to
128 32 128
You may also simply ignore those error messages.
But this modification will also help Jade which stands behind the docbook2?? translators. By the way, Jade may complain about namespace attributes, but this too is false alert.
At the moment, tbook is still an XSLT 1.0 application. Eventually it will be 2.0, though. Then, but only then it will support Saxon 7. Unfortunately, I see no possibility to support both Saxon 6.5.x and Saxon 7.x at the same time.
I don't support Xalan. I've never tried that, maybe it runs through without error messages, but Xalan is not able to create shell scripts, which would make things hopelessly awkward.
All of this is nothing for me to worry about, because Saxon 6.5.x is just so easy to install, even parallely with Saxon 7.
As soon as XSLT 2.0 is a finished specification, tbook will support it. Then you can use tbook with all XSLT processors. Well, all that support XSLT 2.0. But Xalan and Saxon will be surely among them.
tbtolatex, tbtohtml and tbtodocbk can pass parameters to the XSLT processor Saxon in the form <parametername>=<value>, so e.g.
tbtolatex test param1=value1 param2=value2 ...
For a list of the available parameters, have a look at tables XSLT parameters and Further XSLT parameters.
For Windows, you have to enclose every parameter pair with "..."
:
tbtolatex test "param1=value1" "param2=value2" ...
If you use XSLT parameters, make sure that all transformation scripts get the same set of parameters and values.
For your convenience, you may change these transformation scripts on your local system, but only in order to change the default values of the XSLT parameters. So you can adjust it to your personal taste without being forced to type it every single time. But never distribute such modified files under the original name!
First, the more important XSLT parameters:
anti-aliasing
.) If true, in
all HTML images copyright notices are inserted. In PNGs even image
description data. Needs active smoothing, because the p?m* tools are
used.
The following parameters are not so important, but nobody knows. Many of them must be considered internal and shouldn't be changed by the user.
basefontsize
” in
tbookdtd.dtx.
<object>
element
and the processing instruction for the MathPlayer plugin. The default
value makes tbook include it in the head of the XHTML file. For
making Konqueror (that has a bug regarding this) happy, use
body as the value for this parameter. The value
none prevents any inclusion of MathPlayer specific code.
With the XSLT parameter css-file you can give the file name of a special XML file with the following example contents:
<style xmlns="http://www.w3.org/1998/Style/CSS2"> h1 { color: red } </style>
This would print all first-level headings red. The <style>
tags
must look exactly like this, other XML tags are not allowed. Between
them you may insert arbitrary CSS (“Cascading Style Sheets”) commands.
They are loaded last and thus have priority. You can change the
final layout of your (X)HTML document in many ways. Other output
formats are not affected.
Let's have a look at another, more complete example. You want to change all colours in your HTML file. This black on white is boring and too bright for you. Therefore you create a file called mybook-css.xml with the following contents:
<style xmlns="http://www.w3.org/1998/Style/CSS2"> body { background-image: url("blue-tile.png"); background-color: navy; color: white } hr.footnoterule { color: white } div.title { font-size: x-large; color: yellow } div.title-article { font-size: x-large } div.partheadline { font-size: x-large } </style>
This sets a navy blue background, and the PNG bitmap
blue-tile.png as the background pattern. (You are responsible
that this PNG file exists.) The text colour is now white.
Additionally, all parts of the output that used to be `xx-large
'
are now only `x-large
' because Internet Explorer tends to print
them too big. This affects the title (both book and article) and the
parts headings.
For more info about the CSS please consult the W3C specification page, and you will find nice books about them in your favourite library/bookstore.
The default CSS commands for tbook documents can be found in tbookxsl.pdf which is produced with
make tbookxsl.pdf
in section 2.2.5, “CSS style sheets”. But even easier is to have a look at the beginning of an HTML file that tbook produces where you find the whole tbook CSS code. And then you can overwrite the things that you don't like with your own code.
Is in the LaTeX input path (in particular in the current directory) a file called tbook.cfg, it is included immediately before \begin{document}. Typically you will redefine here the macro \MakeTitlePage, but you can also change the document font for example:
\ifpdflatex\else\ifgallery\else \psfonts \makeatletter \RequirePackage{geometry} \@ifpackagelater{geometry}{2002/07/08}{% \def\opt{includehead,}}{\def\opt{}} \expandafter\geometry\expandafter{\opt nofoot,a4paper, lmargin=2.7cm,rmargin=3cm, % left and right margin tmargin=1.8cm,bmargin=3.9cm, % top and bottom margin headheight=0.5cm, headsep=0.5cm,twosideshift=0cm} \makeatother \fi\fi
The first three lines activate Times font, the rest sets the page
margins (for odd pages). Both is only done if we are not producing a
PDF (\ifpdflatex\else
) and if we are nor producing a
so-called gallery (\ifgallery\else
). Adjust the values for your
needs. You can also use another unit, like “in”.
With such a cfg file you can do very similar things as with a LaTeX sty file, see LaTeX sty file. But the cfg file mechanism is included in tbook to do simple things in a quick and simple way.
With the XSLT parameter sty-file you can include an arbitrary LaTeX package instead of the default tbook-pl.sty. In this file you may change the default behaviour in a cleaner way than it is possible with a cfg file. But you have to pay attention to the following:
\ifgallery\else \RequirePackage[...]{geometry} \fi
See LaTeX cfg file, for a complete example.
You can give the name of the desired LaTeX package in the class attribute of your top-level element. So if you say
<book class="mystyle.sty"> ...
then mystyle.sty is included, and not the default tbook-pl.sty. The file extension .sty in the class attribute is mandatory, otherwise it's ignored in the LaTeX output. However, an explicit sty-file parameter on the command line has the highest priority.
Finally, you can overwrite existing templates or add new ones in the so called driver files:
These files are almost empty, actually they only import the really big ones tblatex.xsl, tbhtml.xsl and tbdocbk.xsl, which are files that you shouldn't modify.
In DocBook, such files are called “customisation layers”.
Modifications of these files are especially useful for own letter designs, because the default is for a certain Bugs Bunny. For that, redefine the "letter" template and – for HTML output – the "closing" template.
You can use directly MathML's presentation and contents markup in
tbook files. For this, insert <math>
elements without
worrying about namespaces. But except for not too complicated equations
this is quite longish: Einstein's famous equation of equivalence of mass
and energy looks like
<math> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mn>2</mn> </msup> </math>
in MathML. I hope you agree with me that there is room for
improvement. Therefore tbook's formula elements <m>
(inline
equation), <dm>
(displayed or block equation), <ch>
(chemical formula), and <unit>
(physical quantity) use a
so-called simplified LaTeX syntax.
You may use roots, fractions, standard functions like “sin”, stretchable braces, sub- and superscripts and accents. You may nest these structures so deep until your XSLT processor complains. And you can use these elements inside MathML to get the best of both worlds. (However HTML output only contains valid MathML.)
Roots work with \sqrt, fractions with \frac, just as in LaTeX. Human text is included via \text that is known from AMSTeX. Standard functions are typed without a `\'. Stretchable braces are all braces immediately within a {...} grouping. Sub- and superscripts as in LaTeX with `_' and `^', but always a possible subscript before the superscript.
Accents are just written immediately before the accented variable or group, they're made wide accents if necessary. If you make a space between accent and anything that follows, the accent is treated as an operator. (So, a \vec becomes a \to.) You must use &hat; (Unicode 0x302) for the hat/circumflex accent since the ordinary ^ is already taken for superscripts.
Here an example:
<m>&hat;{1-x_{\text{eff}}} ≠ {( ∫_0^∞ sin(˜x) \frac{\sqrt[3]{1/e}}β dx )} ≠ lim_{x → ∞}\frac1x</m>
(In a Unicode-able editor you could see the special characters directly instead of their ugly &...; representations.) In printed output this will look like this:
For HTML output, the responsible stylesheet produces:
<math><mover accent="true"><mrow><mn>1</mn><mo>-</mo> <msub><mi>x</mi><mrow><mtext>eff</mtext></mrow></msub></mrow> <mo>^</mo></mover><mo>≠</mo><mrow><mo>(</mo> <munderover><mo>∫</mo><mn>0</mn><mo>∞</mo></munderover> <mi>sin</mi><mo stretchy="false">(</mo><mover accent="true"> <mi>x</mi><mo>~</mo></mover><mo stretchy="false">)</mo> <mfrac><mrow><mroot><mrow><mn>1</mn><mo>/</mo><mi>e</mi></mrow> <mn>3</mn></mroot></mrow><mi>&beta</mi></mfrac><mi>d</mi><mi>x</mi> <mo>)</mo></mrow><mo>≠</mo><munder><mi>lim</mi><mrow><mi>x</mi> <mo>→</mo><mo>∞</mo></mrow></munder><mfrac><mn>1</mn> <mi>x</mi></mfrac></math>
Lucky us.
Notice that you can use <m>
, <ch>
and <unit>
within MathML constructs. This is useful if you have to include
matrices, but it is especially useful for stacked equations, which
LaTeX calls “equation arrays”. See Equation arrays.
We have already seen that MathML should be avoided where possible. You may use it if you want, for more complicated formulae you must use it, unfortunately. This is true for matrices, but it is especially true for equation arrays and equation numbering.
For a detailed description of MathML, see the MathML specification.
tbook treats a <math>
element as an equation array, if it
consists of only one <mtable>
, with a groupalign
attribute or one or more <mlabeledtr>
rows. If you set
groupalign="right center left"
, this leads to an
eqnarray in LaTeX, and where `&' are in LaTeX,
you have to use <maligngroup/>
in MathML. Else the equations
are just stacked and not aligned.
But as already mentioned, you can also use <m>
inside
<math>
, which is very helpful for equation
arrays.
If you use these elements within a MathML equation array, you can generate alignment markers (in LaTeX known as `&' signs) with `#' signs17. Put them where they would be in LaTeX. Although MathML requires such a marker at the very beginning of an equation row, this is not true for LaTeX, and not true for tbook.
Here is an example:18
<math> <mtable groupalign="right center left"> <mtr> <mtd id="test"> <m> 1+1 #=# 2 </m> </mtd> <mtd> <m> 4 #=# 2 · 2 </m> </mtd> </mtr> </mtable> </math>
which is the same as LaTeX's
\begin{eqnarray} 1+1 &=& 2 \label{Test} \\ 4 &=& 2 \cdot 2 \nonumber \\ \end{eqnarray}
and you don't want to see the HTML/MathML output tbook must create for that.
(By the way, being the only child element of an <mtd>
,
<m>
is implicitly surrounded by an <mrow>
which is
necessary in this context.)
A tricky point is equation labelling and numbering. tbook supports three ways of giving an equation a label:
<math>
element has an id
attribute. For example:
<math id="Einstein"> <mi>E</mi> <mo>=</mo> <mi>m</mi> <msup> <mi>c</mi> <mn>2</mn> </msup> </math>
or simply
<dm id="Einstein">E=mc^2</dm>
You can refer to it with
<p>The <ref refid="Einstein">equation</ref> is the famous energy equivalence.</p>
<mtd>
element with an id
within an equation
array:
<math> <mtable groupalign="right center left"> <mtr> <mtd id="equation1"> <m> 1+1 #=# 2 </m> </mtd> <mtd> <m> 4 #=# 2 · 2 </m> </mtd> </mtr> </mtable> </math>
which you can refer to by saying
<p>If you want to see a pretty useless equation have a look at <ref refid="equation1">equation</ref>.</p>
<mlabeledtr>
element with an id
within an
equation array, and the contents of the first <mtd>
element of
such an <mlabeledtr>
row. This version is pretty obscure, and
you cannot refer to it with <ref>
but only with
<mathref>
.
I would recommend you to use only 1. and 2.
Unfortunately there is no standard way to input an overbrace construct in MathML. In LaTeX you can say
$\overbrace{(x_1, x_2, \ldots, x_n)}^{\text{$n$ elements}}$
Its tbook representation is
<mover> <m>(x_1, x_2, …, x_n)</m> <mover> <mo>⏞</mo> <mrow> <mi>n</mi> <mtext> elements</mtext> </mrow> </mover> </mover>
The underbrace works accordingly.
XML is an international file format. Every XML tag can have an
xml:lang
attribute, although the respective DTD must allow them
explicitly. tbook allows them for almost all its elements. The
value of this attribute is a language tag. tbook supports the
following XML language tags:
"en"
"de"
"fr"
"it"
"da"
"nl"
"pl"
"fi"
"pt"
"no"
"sv"
"ru"
"es"
"ca"
"en-US"
"en-GB"
"no-bok"
"no-nyn"
"pt-BR"
"de-DE"
"de-AT"
"de-1901"
"de-1996"
"de-DE-1901"
"de-AT-1901"
"de-DE-1996"
"de-AT-1996"
The “special” German orthography tags have been registered with IANA. If you need another language, contact the tbook maintainer.
You can use other language tags, too, but only the above are interpreted by tbook for LaTeX output. The language is switched on for the whole element. For example,
<chapter xml:lang="de"> <heading>Einleitung</heading> <p>In diesem Text werden wir sehen, daß ...</p> <p xml:lang="es">Andalucía es, sobre todo, una región agrícola. ...</p> </chapter>
embeds a chapter in German in a document that may be written in a wholly different language. The second paragraph however is in Spanish.
Mostly you will use this tag – if at all – only for the top-level element. For example, an article in French will begin with
<article xml:lang="fr"> ...
Almost every tbook element can have a style
and/or a
class
attribute. This is also true for HTML, and in both formats
they have the same meaning. Thus their values are passed without any
changes to the HTML file, so you can use that for layout changes in the
HTML output.
The class
attribute takes the name of a layout class. This is
actively used in a couple of tbook elements, e.g. in
<theorem>
, but also in the top-level elements, see LaTeX sty file. However you can make much more use of it in the HTML output.
The style
attribute takes CSS commands, see CSS.
Unfortunately it is impossible to preserve this information in DocBook,
and only very few CSS commands can be sensibly translated in LaTeX.
Just one of them is indeed realised so far, namely text colour.
There is no element that adds colour to a tbook document. However
you can add a style
attribute to most elements and put CSS
commands in it. This attribute is then passed to HTML, but the
colour information is interpreted for LaTeX output, too. All
different ways how to give colour information in CSS are supported. So
you may write
<p style="color: red">This is in red.</p> <p style="color: rgb(0,0,100%)">This is in blue.</p> <p style="color: rgb(255,255,0)">This is in yellow.</p> <p style="color: #f783ff">This is a shade of blue.</p>
and will get the desired result. You can also add other CSS commands,
however, the XSLT processor will only scan for the color:
property. Background colours are not supported. Page colours are not
yet supported. (Although both will work in HTML output, of course.)
You can use your old BibTeX file, although minor adjustments could be necessary. It is prefered, although not necessary, that if your BibTeX files contain accented characters or something like this, they should be 8-bit files.
tbook's BibTeX styles (by the way, created with custom-bib) will create decent LaTeX output, but for HTML and DocBook, a filter called bibfix tries to make BibTeX's almost-XML output real XML. If you've used strange LaTeX constructs in your BibTeX file, you either have to fix the BibTeX file, or you have to extend bibfix.l, a simple flex scanner, to convert them to XML.
Another possible source of trouble in old BibTeX files is the
`edition
' field. Best is to use an English number in letters
like "third"
.
A minimal tbook file looks like this:
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//Torsten Bronger//DTD tbook 1.5.2//EN" "http://tbookdtd.sourceforge.net/tbook152.dtd"> <book xml:lang="en-GB"> <frontmatter> <title>A little book</title> <author>Torsten Bronger</author> </frontmatter> <mainmatter> <chapter> <heading>First Chapter</heading> <p>Small is beautiful.</p> </chapter> </mainmatter> </book>
On the following pages, some special expressions are used in the “Possible Contents”. First I explain what they mean.
The term “inline element” denotes the following elements:
font manipulation:<em>
,<visual>
,<verb>
,
mathematics:<m>
,<math>
,<ch>
,
cross references:<cite>
,<pageref>
,<ref>
,<vref>
,<mathref>
,
index:<ix>
,<idx>
,<indexsee>
,
miscellaneous:<url>
,<hspace>
,<unit>
,<relax>
,<wrap>
,<footnote>
,<graphics>
,<latex>
.
The term “block element” denotes the following elements:
lists:<description>
,<enumerate>
,<itemize>
,
mathematics:<math>
,<dm>
,<ch>
,
quoted material:<quote>
,<blockquote>
,<verbatim>
,<verse>
,
miscellaneous:<p>
,<multipar>
,<tabular>
,<latex>
.
The term “figure/table” actually denotes the elements <figure>
and
<table>
, but where they are allowed, the two “big block”
elements <theorem>
and <proof>
are allowed, too.
Apart from that, in “Possible contents” the typical symbols of regular expression or EBNF are used:
An example: The element <section>
has the following “Possible
contents”:
heading, (block | float)*, subsection*
This means in human words: The contents of every <section>
element must start with one <heading>
element. This is
followed by an arbitrary number (also zero) of elements belonging to the
block or float category, in arbitrary order. After them
may follow <subsection>
elements, as many as you wish.
An online version of this element reference is available at
http://tbookdtd.sourceforge.net/dtd/.
<book>
– a book (root element)xml:lang
"en"
)
id
style/class
Possible Contents: frontmatter, mainmatter, backmatter?
Description:
This element embraces all other elements of a book. (Like the
<html>
tag does in HTML.)
If a class
attribute is given, and its contents ends with
.sty, the whole thing is interpreted as a LaTeX style file
that's included instead of tbook-pl.sty. However, an explicit
style file as an XSLT parameter sty-file
still has higher
precedence. Same with <article>
.
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//Torsten Bronger//DTD tbook 1.5.2//EN" "http://tbookdtd.sourceforge.net/tbook152.dtd"> <book xml:lang="en-GB"> <frontmatter> <title>A little book</title> <author>Torsten Bronger</author> </frontmatter> <mainmatter> <chapter> <heading>First Chapter</heading> <p>Small is beautiful.</p> </chapter> </mainmatter> </book>
<frontmatter>
– general info about a bookPossible Contents: title, author+, subtitle?, date?, keywords?, year?, city?, graphics?, typeset?, legalnotice?
Description: Everything that is normally mentioned before the table of contents. Only title and one author is a must, the rest if you wish, but the given order is (unfortunately) mandatory. The first mentioned author will also be printed after the copyright.
<author>
has to be simple, i.e. it mustn't contain any
additional information such as institute or email address. If it
does, that is ignored. (In contrast to in articles.)
<frontmatter> <title>Beyond Gravitation</title> <author>Wyle E Coyote</author> <author>Roadrunner</author> <subtitle>An Introduction</subtitle> <date>23. July 1968</date> <keywords>ACME, levers, umbrellas, earthquake pills, rocks</keywords> <year>1969</year> <city>Toontown</city> <graphics kind="bitmap" file="coverimage"/> <typeset>The authors.</typeset> <legalnotice>All rights reserved.</legalnotice> </frontmatter>
<mainmatter>
– the text contentsPossible Contents: (part | chapter)*, appendix?
Description: All parts and chapters of a book.
<mainmatter> <chapter kind="preface"> <heading>Preface</heading> <p>...</p> </chapter> <!-- Here will be the table of contents. --> <chapter kind="introduction"> <heading>Introduction</heading> <p>...</p> </chapter> <part id="sec:Preparation"> <heading>Preparation</heading> <chapter id="sec:Samples"> <heading>Samples</heading> <p>...</p> </chapter> <chapter id="sec:Equipment"> <heading>Equipment and Techniques</heading> <p>...</p> </chapter> </part> <appendix> <chapter id="sec:Blueprints"> <heading>Blueprints</heading> <p>...</p> </chapter> </appendix> </mainmatter>
<backmatter>
– references and indexPossible Contents: references?, index?
Description: Bibliography and index. Both optional, but pay attention to order.
<backmatter> <references bibfile="mybib"/> <index> <p>Command names are printed in bold face.</p> </index> </backmatter>
<article>
– an article (root element)xml:lang
"en"
)
id
style/class
Possible Contents: title, author+, date?, keywords?, year?, abstract?, (block element | figure/table)*, section*, references?
Description:
Embraces all elements of an article. Title and one author are
mandatory. Here – in contrast to book – the <author>
tag can
contain <newline>
and <footnote>
elements for e.g.
institute or email address.
As for the class
attribute, see <book>
above.
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE book PUBLIC "-//Torsten Bronger//DTD tbook 1.5.2//EN" "http://tbookdtd.sourceforge.net/tbook152.dtd"> <article> <title>The Grand Unifying Theory</title> <author>Thomas Ferguson</author> <keywords>life, universe, everything</keywords> <abstract> <p>Six by nine equals forty-two.</p> </abstract> <section> <heading>Motivation</heading> <p>Motivation is simple ...</p> </section> </article>
<letter>
– a letter (root element)from
formal
"true"
for “formal letter” or "false"
xml:lang
"en"
)
id
style/class
Possible Contents: city, date, to, subject, opening, block element*, closing
Description: Embraces all elements of a letter.
from
can be e.g. "Torsten Bronger"
. It should be
your personal id and should be globally unique, as far as one can
guarantee that. Because this attribute is used by the stylesheets to
ensure that they are responsible for you (correct letter head
etc).19 Moreover the owner
attribute in the address
book must match it.
If you don't set formal
explicitly, the default is taken from the
address book entry (even if you gave an explicit “to”-address and so
overruled the address book entry). If even that fails, "false"
(private letter) is assumed.
<letter from="Torsten Bronger <torsten.bronger@gmx.de>"> <city>Aachen</city> <date>2. September 2002</date> <to nickname="Jupp"/> <subject>Party!</subject> <opening>Hi Jupp,</opening> <p>...</p> <closing>Till then,</closing> </letter>
<heading>
– of a chapter etc.xml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
All structuring elements (<part>
, <chapter>
,
<section>
etc.) begin with this element. It contains of course
the title of that section.
See <chapter>
.
<part>
– of a bookxml:lang
id
style/class
Possible Contents: heading, chapter*
Description: Embraces a part of a book.
See <mainmatter>
.
<chapter>
– of a bookkind
"preface"
, "introduction"
, "acknowledgements"
or
"colophon"
– marks chapters with special meaning
xml:lang
id
style/class
Possible Contents: heading, aphorism?, (block element | figure/table)*, section*
Description:
A chapter of a book. It's always included into the TOC (i.e., there is
no star'ed version). In <aphorism>
you can let a nice witty
quote by a famous person being printed above the chapter beginning.
kind
marks special chapters that are not included into the TOC.
A "preface"
chapter is printed before the TOC; so far,
there is no difference between "acknowledgements"
and
"colophon"
yet.
<chapter kind="introduction"> <heading>Introduction</heading> <p>Before we begin ...</p> </chapter> <chapter> <heading>Crystal Growth</heading> <p>This can be a tricky thing. ...</p> <section> <heading>First Steps</heading> <p>First we take warm water, ...</p> </section> </chapter>
<section>
xml:lang
id
style/class
Possible Contents: heading, (block element | figure/table)*, subsection*
Description:
Encloses a section that is included into the table of contents in any
case.
See <chapter>
.
<subsection>
Possible Contents: heading, (block element | figure/table)*, subsubsection*
This element is totally analogous to <section>
,
it can contain the next lower level of structuring.
<subsection>
wanders in the TOC by default.
<subsubsection>
Possible Contents: heading, (block element | figure/table)*, paragraph*
This element is totally analogous to <section>
,
it can contain the second next lower level of structuring.
<paragraph>
Possible Contents: heading, (block element | figure/table)*, subparagraph*
This element is totally analogous to <section>
,
it can contain a lower level of structuring, below
<subsubsection>
. <paragraph>
doesn't get in the TOC by
default.
<subparagraph>
Possible Contents: heading, (block element | figure/table)*
This element is by and large analogous to
<section>
, but it can't contain a next lower
level of structuring, because it's the last one. <subparagraph>
doesn't get in the TOC by default.
<appendix>
xml:lang
id
style/class
Possible Contents: chapter*
Description:
This element encloses all appendix chapters. They are unusual only as
far as their numbering is concerned. So this element is very similar to
LaTeX's appendix
environment.
See <mainmatter>
.
<p>
– paragraphskip
"small"
, "med"
or "big"
xml:lang
id
style/class
Possible Contents: (Text | inline element | block element)*
Description: Embraces one paragraph. Empty lines produces a warning and are ignored.
See <chapter>
.
<multipar>
– sequence of simple paragraphsxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
This one can contain plain text and inline elements. The idea is that
every *
ends a paragraph and begins a new one, so you don't
have to type all this <p>...</p>
stuff every time. Empty lines
are ignored, but produce no warning.
<multipar> The <em>SI</em> developed from the metric system but today both terms can be used synonymously. It is worth mentioning that all metric countries have a different set of legal units, including some non-metric ones. The SI, in most cases, represents the core of the metric system, though.* The science that deals with measuring quantities and definition of units is metrology. Many countries run metrological institutes and partly they work as standardising authorities in their respective domains.* In regular international meetings these institutes decide about (re-)definitions of SI units. Since 1983 the seven base units have been defined as follows:* ... </multipar>
<newline>
– line breakvspace
Possible Contents: None.
Description:
Inserts a line break. In vspace
you can give a following skip.
It is only allowed at a few places.
<footnote>
xml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description: Inserts a footnote at the current position. It embraces the footnote text.
<p>Zaphod Beeblebrox<footnote>the president of the galaxy</footnote> was a friend of him.</p>
<em>
– emphasisPossible Contents: (Text | inline element)*
Description: Like \emph{...} in LaTeX. It highlights a word or a phase that you want to put emphasis on, usually by setting it in italics.
<p>This is a <em>very</em> important point.<p>
<visual>
– visual markupmarkup
"nm"
, "rm"
, "it"
, "sc"
, "bf"
, "sf"
,
"sl"
, "tt"
, "vs"
(required)
Possible Contents: (Text | inline element)*
Description:
Allows font style/variant change. The attribute markup
is the
same as in LaTeX's \text??
commands.
"nm"
"rm"
, "sf"
, and "tt"
.
"rm"
"it"
"sc"
"bf"
"sf"
"sl"
"tt"
"vs"
Every markup command leaves as much as possible intact from the previous
active markup. For example, a <visual markup="it">
in bold text
will switch to bold italics.
Of course, this element can hardly be mapped on DocBook elements. It is mostly realised via DocBook's <emphasis>.
<p><visual markup="bf">bold</visual>, <visual markup="it">italic</visual>, <visual markup="sc">Small Caps</visual>, <visual markup="sf">sans serif</visual>, <visual markup="sl">slanted</visual>, <visual markup="tt">typewriter</visual>, <visual markup="vs">versaliae</visual>.</p>
<ref>
– simple cross referencerefid
Possible Contents: (Text | inline element)*
Description:
This does the same as the LaTeX command \ref
. The referenced
object, that has the ID of refid
, must be a figure/table, section
etc., simply something that can bear a number. The contents of
<ref>
is the textual label that is put immediately before it,
e.g.
<table id="MainTable"> ... </table> ... <ref refid="MainTable">table</ref>
This yields something like `table~2.1
' for LaTeX, or for HTML
`table 2.1
' which is completely displayed as the link, and
not only the `2.1
'.
<ref>
s to equations put automatically parentheses around the
number.
<vref>
– cross reference with pagerefid
Possible Contents: (Text | inline element)*
Description:
See <ref>
, but here we use LaTeX's varioref package which
means that the page number is included into the reference. For HTML,
there is no difference between <ref>
and <vref>
.
<pageref>
– page referencerefid
Possible Contents: (Text | inline element)*
Description:
Inserts the page number of the object with the ID of refid
. In
HTML a `[here]
' is inserted (which you can click on), in LaTeX
a possibly given contents of the <pageref>
is inserted directly
before the page number. This means that
See <pageref refid="GUTformula">page</pageref>.
yields `See page~42
' in LaTeX and `See [here].
'
(clickable [here]
) in HTML.
<cite>
– bibliographic referencerefid
kind
"text"
, "paren"
, "imparen"
or "nocite"
Possible Contents: (Text | inline element)*
Description:
The element <cite>
is used to refer to other published or
unpublished material. Before you can use it, you have to build a
bibliographic database outside tbook. Eventually this will be
in an XML format, but till then tbook uses BibTeX for this
purpose.
So the first step is to create a BibTeX .bib file. Please have a look at the BibTeX documentation or at a good LaTeX book for how to do that. The bib file must be at a place where BibTeX finds it.
The element
<cite refid="Williams_Kelley1999"/>
inserts a citation reference to the bibliographic entry with the label
"Gruber2001"
at the current location. The refid
can also be a space
separated list of more than one citation:
For further reading, see <cite refid="Williams_Kelley1999 Crawford1998 Nelson1989"/>.
This refers to the following BibTeX entries in the bib file:
@MISC{Williams_Kelley1999, author = "Thomas Williams and Colin Kelley and Russel Lang and Dave Kotz and John Campbell and Gershon Elber and others", title = "Gnuplot", month = oct, year = 1999, url = "http://www.gnuplot.org", note = "Das Programm", } @MANUAL{Crawford1998, author = "Dick Crawford", title = "{g}nuplot, an Interactive Plotting Program", month = dec, year = 1998, url = "http://www.gnuplot.org", } @BOOK{Nelson1989, author = "Ross P. Nelson", title = "{Programmierhandbuch $80386$ -- Assemblerprogrammierung mit dem Mikroprozessor}", publisher = "Vieweg \& Sohn, Braunschweig", year = 1989, }
The attribute kind
determines the kind of insertion. For example,
<cite refid="Williams_Kelley1999" kind="text"/>
would be printed as
Williams et.al. (1999)
whereas "paren"
makes
(Williams et.al. 1999)
"imparen"
(“implicit parentheses”) produces
Williams et.al. 1999
If you don't give an explicit kind
attribute, tbook tries to
find the best choice according to the context. This means that implicit
parentheses are assumed if the <cite>
element is embraced by
parentheses, and "text"
otherwise.
You know these “kinds” probably from the natbib package, that's behind all this.
"nocite"
includes nothing in the text, just in the references list
at the end:
<cite refid="Bathe1986" kind="nocite"/>
By the way,
<cite refid="-" kind="nocite"/>
works like \nocite{*} LaTeX, i.e. all entries in your
bib file are included in the references list, explicitely cited
or not. (An `*
' is not allowed in refid
.)
The contents of the <cite>
element becomes the optional
parameter of LaTeX's \cite
command. Thus
<cite refid="Einstein1921"><em>first</em> chapter</cite>
yields:
Einstein (1921, first chapter)
<mathref>
– “odd” reference of a formularefid
Possible Contents: (Text | inline element)*
Description:
See <ref>
, but <mathref>
only works for equations that
have been labeled using the first column of an <mlabeledtr>
.
Actually such an equation should also have a real id
, so you
don't need <mathref>
. It's just to make MathML support a little
bit more complete.
(I needed an extra element for this kind of reference because I really
wanted to be able to point to such equations, but for validation issues
refid
can't be of type ID
, but must be CDATA
.)
<m>
– inline equationid
style/class
Possible Contents: Text
Description:
Corresponds to $...$
in LaTeX, but uses a somewhat different
expression syntax, see Almost LaTeX formulae. Attention: If
it has an id
, it's becoming a displayed Formula, with a
number.
You can use <m>
inside MathML's <math>
. The same
applies to <ch>
and <unit>
.
In principle, you can use <m>
wherever you can use
<mrow>
. However, sometimes it may be necessary to enclose
<m>
and friends with <mrow>
, because they may expand to
multiple MathML elements.
<dm>
– displayed equationid
style/class
Possible Contents: Text
Description:
Corresponds to \[...\]
in LaTeX, but uses a somewhat different
expression syntax, see Almost LaTeX formulae.
<ch>
– chemical formuladisplay
"inline"
or "block"
id
style/class
Possible Contents: Text
Description:
Corresponds to <m>
or <dm>
(according to
display
), but produces chemical formulae with e.g. unslanted
chemical element symbols, see Almost LaTeX formulae. e.g.
<ch>Al_xGa_{1-x}As</ch>
yields
i.e. tiny skips between the elements, upshape elements, but all subscripts are treated as mathematics.
For the explicit namespace see <m>
above. It makes it possible
to be used inside MathML's <math>
.
<theorem>
– (mathematical) theorem etc.countlike
"(none)"
, or "(global)"
layout
"plain"
(default), "definition"
, or "remark"
xml:lang
id
style/class
Possible Contents: heading?, subject?, (Text | inline element | block element)*
Description: Inserts a (mathematical) theorem, corollary, lemma, definition, or a remark, a note, an exercise, or an example. It is allowed everywhere where you could insert a floating figure.
For this element, the class
attribute is vital. It is interpreted
as the kind of the theorem. e.g., you could say
<theorem class="Remark">A short mathematical remark.</theorem>
If class
is omitted a default is used.
The countlike
contains another <theorem>
class with which
the current one should share numbering. Otherwise, every
<theorem>
class gets its own counting. For example,
<theorem class="Corollary" countlike="Lemma">A short mathematical corollary. If it's corollary number 4, the next lemma will have number 5.</theorem>
If you want to suppress counting, set countlike
to "(none)"
.
If you don't want to have the chapter number included into the theorem
number, set countlike
to "(global)"
.
The name of the theorem is the same as its class. If you want another
name, include a <heading>
element.
Within <subject>
...</subject>
, you can include
e.g. a special name for the theorem. This is printed within brackets
after the word “Theorem” (or whatever).
Example:
<theorem class="Korollar"> <heading>Corollary</heading> <subject>Streetmentioner's Corollary</subject> A short mathematical corollary.</theorem>
With the layout
attribute, you can choose another style.
Predefined are the AMSTeX styles "plain"
, "definition"
,
and "remark"
. If you want to add another one, you have to give
its definition in a LaTeX package.
Important: Only the very first occurrence of a certain
<theorem>
class is allowed to have <heading>
,
countlike
, or layout
.
<proof>
– mathematical proofxml:lang
id
style/class
Possible Contents: heading?, (Text | inline element | block element)*>
Description: Inserts a mathematical proof. It is allowed everywhere where you could insert a floating figure.
If <heading>
is given, it is used instead of the default word
“Proof” at the beginning.
<proof> Indirect: ... <p>(Some magic happens.)</p> <p>This contradicts <ref refid="eqn:variance">equation</ref>.</p> </proof>
This yields:
Proof. Indirect: ... (Some magic happens.) This contradicts equation (4).
<url>
– external referencename
Possible Contents: (Text | inline element)*
Description:
The contents of this element is hyperlinked with name
. For
printed output, the URL is printed in parentheses after the contents.
If the element is empty, the name
in printed with typewriter
style and is linked with itself.
<url name="http://www.w3c.org">W3C</url>
This yields
W3C
whereas
<url name="http://www.w3c.org"/>
leads to
http://www.w3c.org
<hspace>
– horizonal skipdim
Possible Contents: None.
Description: Makes a horizontal skip, as the LaTeX macro of the same name.
Hello<hspace dim="1em"/>world
yields
Hello world
<relax>
Possible Contents: None.
Description:
Does nothing. Had a meaning between <cite>
s in former times,
when <cite>
was defined differently. But I didn't want to
abandon it. Who knows what it still can be good for. And I dislike
input languages without a <relax>
.
<unit>
– physical quantityPossible Contents: Text
Description: Inserts a physical quantity, see Almost LaTeX formulae.
<unit>3 m</unit>
yields in LaTeX `$3$\,m
'. So it guarantees a neat skip
between number and unit, and for configurations with different fonts for
number in- and outside mathematics it chooses the correct one. Further
advantage: Things like
The gravitational constant is <unit>6.672·10^{-11} m^3 kg^{-1} s^2</unit>.
(notice the spaces!) yields
The gravitational constant is.
So, units in upshape with small skips inbetween. You must assure that
the first space is between the number and the unit, or
alternatively you must put a `~
' between number and unit.
For the explicit namespace see <m>
above. It makes it possible
to be used inside MathML's <math>
.
<latex>
– LaTeX codecode
desperate
"true"
or "false"
(default) – element for last phase of
production?
Possible Contents: Arbitrary.
Description:
This is some sort of emergency command: It inserts code
if we're
producing LaTeX output, and interprets the element's contents else.
It's totally ignored if desperate
is "true"
.
As an example I mention here the definition of the tbook predefined
entity `&LaTeX;
':
<!ENTITY LaTeX "<latex code='\LaTeX{}'>LaTeX</latex>">
Then &LaTeX;
prints a neat LaTeX logo in all
outputs.20
The contents of this element is tbook code, no HTML code!
The idea behind desperate
is that the transformation
tbook => LaTeX can be forced to interpret even
<latex>
'es with desperate="true"
if a special XSLT
parameter called desperate-measures is set to true,
see XSLT parameters. Have a look at an example:
<latex code="\newpage" desperate="true"/>
This is usually done in the very last phase of production, maybe for having better page breaks like in this example. Normally it is totally ignored, but if you call the LaTeX transformation with
tbtolatex mybook desperate-measures=true
the (hopefully) optimising page breaks are applied.
<wrap>
– inline wrapperxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
This doesn't format, it encloses inline elements that then get an
id
or a language via xml:lang
. It can be useful empty.
For example
<wrap id="NicePosition"/>
is equal to LaTeX's \label{NicePosition}. So you can refer
to a special position in your text with <pageref>
.
<quote>
– inline quotationxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description: Inserts an inline quotation, and adds the quotation marks according to the current language.
<p>An old German country saying: <quote xml:lang="de">Sind die Hühner platt wie Teller, war der Traktor wieder schneller.</quote></p>
Yields:
An old German country saying: ,,Sind die Hühner platt wie Teller, war der Traktor wieder schneller.“
<blockquote>
– displayed quotationxml:lang
id
style/class
Possible Contents: block element*
Description: Inserts a displayed quotation.
<p>An old German country saying: <blockquote xml:lang="de"><p>Sind die Hühner platt wie Teller, war der Traktor wieder schneller.</p></blockquote></p>
Yields:
An old German country saying:
Sind die Hühner platt wie Teller, war der Traktor wieder schneller.
<verb>
– preformatted inline materialPossible Contents: Text
Description:
Basically the same as LaTeX's \verb
. It typesets its contents
in typewriter style and avoid line breaks.
<p>Every Pascal program starts with the keyword `<verb>program</verb>'.</p>
yields
Every Pascal program starts with the keyword `program
'.
<verbatim>
– preformatted displayed materialxml:lang
id
style/class
Possible Contents: (Text | em | visual | ix | idx | indexsee)*
Description:
Corresponds to LaTeX's verbatim
environment. In this context
XML's <![CDATA[...]]>
is sometimes useful. Please note that –
in contrast to LaTeX – some formatting elements are allowed. So you
may print things in bold face, for example.
At least for LaTeX output you can activate syntax highlighting via
the class
attribute:
<verbatim class="C++"> int main() { cout << "Hello, world!\n"; return 0; } </verbatim>
The class
attribute can take all values that are understood by
the listings package of LaTeX.
<verse>
– lyricsxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description: Formats its contents in a way that line breaks are conserved, which is significant for e.g. lyrics.
<verse xml:lang="de">Hat der alte Hexenmeister Sich doch einmal wegbegeben. Und nun sollen seine Geister Auch nach meinem Willen leben. Seine Wort und Werke Merkt ich und den Brauch. Und mit Geistesstärke Tu ich Wunder auch. </verse>
This yields:
Hat der alte Hexenmeister Sich doch einmal wegbegeben. Und nun sollen seine Geister Auch nach meinem Willen leben. Seine Wort und Werke Merkt ich und den Brauch. Und mit Geistesstärke Tu ich Wunder auch.
<aphorism>
– an epigraphxml:lang
id
style/class
Possible Contents: (Text | inline element)*, caption?
Description:
Embraces a little witty quote for the beginning of a chapter. The
element must be immediately after the <heading>...</heading>
of
that chapter. <caption>
contains the origin, typically the name
of a more or less famous person. There must be up to one
<caption>
and it must come last within
<aphorism>
.
<aphorism>“Forty-two,” said Deep Thought with infinite majesty and calm. <caption>Douglas Adams, <em>The Hitchhiker's Guide to the Galaxy</em></caption> </aphorism>
This yields:
“Forty-two,” said Deep Thought with infinite majesty and calm. —Douglas Adams, The Hitchhiker's Guide to the Galaxy
<itemize>
xml:lang
id
style/class
Possible Contents: item*
Description:
A not numbered list of <item>
s.
<p>The most important problems are: <itemize> <item>rough edges</item> <item>small etch holes</item> <item>wriggling notch</item> </itemize> </p>
This yields:
The most important problems are:
<enumerate>
xml:lang
id
style/class
Possible Contents: item*
Description:
A numbered list of <item>
s.
<p>The three laws of Captain Ed Murphy:</p> <enumerate> <item>Nothing is as easy as it looks.</item> <item>Everything takes longer than you think.</item> <item>If anything can go wrong, it will.</item> </enumerate>
This yields:
The three laws of Captain Ed Murphy:
<description>
– glossary like listxml:lang
id
style/class
Possible Contents: (term, item)*
Description:
A glossary like list of <term>
–<item>
pairs.
<description> <term>Red</term> <item>Pretty colour at the low energy end of the visible electromagnetic spectrum.</item> <term>Nine</term> <item>Odd number exactly between eight and ten.</item> <term>Rigel</term> <item>Star in the constellation of Orion. A blue giant of spectral class B.</item> </description>
This yields:
<item>
– list itemxml:lang
id
style/class
Possible Contents: (Text | inline element | block element)*
Description:
May be used within <itemize>
,
<enumerate>
, and
<description>
.
<term>
– description termxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
See <description>
.
<figure>
– floating figurexml:lang
id
style/class
Possible Contents: graphics, caption?
Description:
Encloses a figure and possibly a caption, that is then placed as a
(numbered) float object. If you want to refer to a graphics by an
id
, give it's <figure>
parent element that id
.
If you have activated two-column printing for LaTeX output, tbook decides whether the float spans both columns or not.
<figure id="fig:overview"> <graphics kind="bitmap" file="overview"/> <caption>An overview of the whole transformation process.</caption> </figure>
<table>
– floating tablexml:lang
id
style/class
Possible Contents: tabular, caption?
Description:
Encloses a table (<tabular>
) and possibly a caption, that is
then places as a (numbered) float object. If you want to refer to a
table by an id
, give the <table>
element that id
.
If you have activated two-column printing for LaTeX output, tbook decides whether the float spans both columns or not.
<table id="tab:Matrix"> <tabular preamble="llllll"> <tabhead> <row> <cell>Doping below/above</cell> <cell colspan="5" align="center">Channel thickness</cell> </row> <hline from="2"/> <row> <cell align="center">(<unit>10^{17} cm^{-3}</unit>)</cell> <cell><unit>3 nm</unit></cell> <cell><unit>2.5 nm</unit></cell> <cell><unit>2 nm</unit></cell> <cell><unit>1.5 nm</unit></cell> <cell><unit>1 nm</unit></cell> </row> </tabhead> <tabbody> <srow> undoped | T111 | T112 | T113 | T114 | T121</srow> <srow> 1/2 | T141 | T144 | T141 | T143 | T163</srow> <srow> 2/4 | T161 | T162 | T164 | T151 | T152</srow> <srow> 4/8 | T153 | T154 | T171 | T172 | </srow> <srow> 8/16 | T192 | T191 | T193 | T194 | T214</srow> </tabbody> </tabular> <caption>Overview of all essential samples that have been prepared.</caption> </table>
This yields: (In real life it will look more pleasant.)
Doping below/above | Channel thickness
|
(10^17 cm^-3) | 3 nm | 2.5 nm | 2 nm | 1.5 nm | 1 nm
|
undoped | T111 | T112 | T113 | T114 | T121
|
1/2 | T141 | T144 | T141 | T143 | T163
|
2/4 | T161 | T162 | T164 | T151 | T152
|
4/8 | T153 | T154 | T171 | T172
| |
8/16 | T192 | T191 | T193 | T194 | T214
|
<graphics>
file
scale
kind
"vector"
, "bitmap"
, "overlay"
or "diagram"
(required)
basefontsize
xml:lang
id
style/class
Possible Contents: psfrag*
Description:
This includes a graphics that is taken from file
(without
file name extension). kind
is interpreted as follows:
"vector"
"bitmap"
"overlay"
"bitmap"
with an equally big EPS vector
image that is printed over the bitmap as a label layer. The EPS file
has the file name file
plus an `l
'.
"diagram"
Eventually the XML processor must see how to interpret kind
. I
explain here the way the current tbook tools go.
basefontsize
may be "10pt"
, "11pt"
or "12pt"
.
Sometimes one changes the global font size in a document which may make
all Psfrag labels look ugly, namely too big or too small. Or one
graphics migrate from one document to another with a different main font
size. With basefontsize
you can switch locally to the old font
size. Of course, you can also use this attribute to change the label
size for a certain graphics.
<graphics kind="overlay" file="wafer1"> <psfrag tag="GaAs"><ch>GaAs</ch></psfrag> <psfrag tag="AlAs"><ch>AlAs</ch></psfrag> <psfrag tag="4mu"><unit>4 µm</unit></psfrag> <psfrag tag="top layer"/> </graphics>
<caption>
– figure/table captionxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
The caption of a float object or the origin of an aphorism. If you use
it within a float, i.e. a <figure>
or a <table>
, you
can leave it empty; in this case the float only gets a number. It
doesn't get a number just because it has an id
!
<psfrag>
– graphics label replacementtag
number
"true"
/"false"
)
contrast
"boxed"
for white label background. "inverse"
for white
text colour.
relsize
"large"
/"small"
. default: "normal"
.
align
"left"
(default), "right"
, "center"
,
"ccenter"
interval
xml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
The tag
is searched in the surrounding vector graphics and the
contents of the <psfrag>
is substituted for it:
<psfrag tag="x-axis"><m>x</m>-axis</psfrag>
For this I use of course the fantastic Psfrag package. Is
<psfrag>
empty, tag
is substituted for itself, which
means that only font and size is adjusted to the main document:
<psfrag tag="Diagram"/>
If you want to erase something from an image, you have to replace it with whitespace:
<psfrag tag="was dull"> </psfrag>
align
determines alignment relatively to the replaced
tag
:
"left"
"right"
"center"
"ccenter"
number
is "true"
by default, if tag
is obviously a
number, or if interval
is given, else "false"
.
contrast="boxed"
sets the substitution on a white rectangle.
contrast="inverse"
shows the substitution in white colour. One
of both may be necessary for too dark/chaotic backgrounds.
relsize
should be clear.
interval
consists, if given, of three semicolon separated
numbers: start, end and step. Thus interval="0;10;1"
yields
automatically Psfrag substitutions for all numbers between 0 and 10.
This is very convenient for EPS files with a labeled axis. By the way,
tag
plays in this case the role of a pattern for the numbers in
the EPS file. This works somehow according to the DecimalFormat routine
of Java 1.1, if anybody knows this.
Some examples:
<psfrag tag="#" interval="1;10;2"/>
replaces 1, 3, 5, 7 and 9 by itself (i.e., it changes the font only). Now for something more complicated:
<psfrag tag="#.0" interval="-4.5;-6;-0.5">#,0</psfrag>
replaces -4.5
, -5.0
, -5.5
and -6.0
by the
same numbers, but with a comma instead of a point (for our non-English
friends). Additionally,
<psfrag tag="#.0" interval="-4.5;-6;-0.5">#,#</psfrag>
does the same, but in the output post-comma digits (and the comma) are omitted where they are zero anyway. Last example:
<psfrag tag="0.0" interval="-1.5;1;0.5">#,#</psfrag>
does the following substitutions: -1.5
=>
-1,5, -1.0
=> -1,
-0.5
=> -0,5, 0.0
=>
0, 0.5
=> 0,5 and
1.0
=> 1.
Besides, it doesn't do any harm if you declare too many replacements, so
you can use the same <psfrag>
for all your diagrams, for
example.
<tabular>
– tablepreamble
xml:lang
id
style/class
Possible Contents: tabhead?, tabbody
Description:
The preamble
looks like a simple LaTeX tabular preamble.
"lcc"
means “three columns, one left aligned, then two
centred”. Except l
, r
and c
nothing is allowed
(yet), in particular no vertical bars, because in very most cases they
are bad style.
See <table>
.
<tabhead>
– headline of a tablePossible Contents: (hline | row | srow)*
Description: Here every column gets a description.
See <table>
.
<tabbody>
– main matter of a tablePossible Contents: (hline | row | srow)*
Description: Contains the actual data rows of a table.
See <table>
.
<row>
– table rowxml:lang
id
style/class
Possible Contents: cell*
Description:
One row in a table with explicit <cell>
s.
See <table>
.
<srow>
– table row with simple syntaxxml:lang
id
style/class
Possible Contents: Text
Description:
One table row. The columns are separated by `|' characters.
This is intended for simple rows that don't need special formatting. It
saves you from typing this <cell>...</cell>
stuff.
See <table>
.
<hline>
– horizontal rule in a tablefrom
"1"
)
to
trim
"lr"
, "l"
, "r"
or "no"
– trimming of rule
ends
Possible Contents: None.
Description:
Inserts a horizontal line in a table. from
is the starting
column, to
the ending column. By default, a line spans the whole
width. Also by default, a line ending is trimmed (shortened) if the
line ends within the table. The trim
can change this.
"lr"
means “trim left and right”, "l"
, "r"
accordingly, and "no"
means “keep full length under all
circumstances”.
The three standard rules of LaTeX's booktabs package are always present and mustn't be given explicitly.
See <table>
.
<cell>
– table entrycolspan
"1"
)
align
"left"
, "center"
or "right"
– alignment (default:
value from preamble)
xml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description:
Encloses one rectangular row/column field in a table. colspan
corresponds to the \multicolumn
macro in LaTeX, and
align
is clear, I think.
See <table>
.
<title>
– title of the documentxml:lang
id
style/class
Possible Contents: (Text | inline element | newline)*
Description: Title of the document. Appears on the title page and in the title bar of the browser window.
See <article>
and
<frontmatter>
.
<author>
– full name of one authorxml:lang
id
style/class
Possible Contents: (Text | newline | footnote)*
Description: Name of one author. It is automatically split up into first- and lastname, so that it can be mirrored for some cases. The point between first- and lastname is normally the last space, but if you give an explicit `|', this is used for the distinction.
<newline>
and <footnote>
are interpreted only for
<article>
, for <book>
only the first text node is used.
See <article>
and
<frontmatter>
.
<subtitle>
xml:lang
id
style/class
Possible Contents: (Text | inline element | newline)*
Description: Works like the title and is used for the title page.
See <frontmatter>
.
<typeset>
– the artistxml:lang
id
style/class
Possible Contents: Text
Description: Name of the typesetter and maybe also the used font, program (TeX) etc.
See <frontmatter>
.
<date>
– of printxml:lang
id
style/class
Possible Contents: Text
Description: Date of print. The format is free, i.e. it will we printed unchanged as you've give it here.
See <article>
,
<frontmatter>
, and
<letter>
.
<keywords>
xml:lang
id
style/class
Possible Contents: Text
Description:
Keywords describing the document. This element is exclusively used for
meta information. For HTML, it creates <meta>
elements, in PDF
files it's used for the Acrobat Reader “Summary” field.
See <article>
and
<frontmatter>
.
<year>
– of copyrightid
style/class
Possible Contents: Text
Description: Year(s) for the copyright. If you omit it, the tbook stylesheets use the current year.
See <frontmatter>
.
<city>
xml:lang
id
style/class
Possible Contents: Text
Description: City of coming into existence. Also for the copyright. For a letter, this is the city printed directly before the date in the header.
See <frontmatter>
.
<legalnotice>
xml:lang
id
style/class
Possible Contents: (Text | inline element | p)*
Description:
A disclaimer or things like that. If you give it as an empty element
<legalnotice/>
, a default legal notice is used, which you may
not agree with.
See <frontmatter>
.
<abstract>
– summary of an articlexml:lang
id
style/class
Possible Contents: p+
See <article>
.
<references>
– list of cited materialbibfile
xml:lang
id
style/class
Possible Contents: block element*
Description: Inserts a references list. The contents of this element is printed as a preamble to it.
bibfile
denotes the bibliography file. A possibly included file
name extension is ignored. The default is the value of
bib-filename
, a parameter that can be given to the XSLT
stylesheet when calling the XSLT processor. If even that is not given,
"biblio"
is used.
See <article>
and
<backmatter>
.
<index>
xml:lang
id
style/class
Possible Contents: block element*
Description: Inserts an index. The contents of this element is printed as a preamble to it.
See <backmatter>
.
<ix>
– index entrysortkey
kind
"emph"
, "bold"
, "italic"
, "start"
or
"end"
xml:lang
Possible Contents: (Text | inline element (except footnote, cross reference, and index entry) | ix2)*
Description:
One index entry. There mustn't be more than one <ix2>
element
within <ix>
, and that must come last.
You don't have to watch out for special characters. Everything is escaped if necessary. Most Latin letters with diacritic symbols are sorted properly.
The optional <ix2>
contains the sub-entry, i.e. the second
level. To sum it up, the old MakeIndex commad
\index{S"anger!Twopac@2~Pac|emph}
looks in tbook like this:
<ix kind="emph">Sänger<ix2 sortkey="Twopac">2 Pac</ix2></ix>(Sänger = singer in German.)
<ix2>
– index sub entrysortkey
Possible Contents: (Text | inline element (except footnote, cross reference, and index entry))*
Description:
See <ix>
above.
See <ix>
.
<idx>
– index entry with insertionsortkey
kind
"emph"
, "bold"
, "italic"
, "start"
or
"end"
xml:lang
Possible Contents: (Text | inline element (except footnote, cross reference, and index entry))*
Description:
Does the same as <ix>
, but aditionally inserts its contents at
the current text position.
See <ix>
.
<indexsee>
– cross reference within indexPossible Contents: ix, ix+
Description:
This creates cross references within the index. Apparently it has to
contain at least two <ix>
elements. The last in the row is
allways the one all the others are pointing to.
<to>
– recipientnickname
xml:lang
id
style/class
Possible Contents: (Text | inline element | newline)*
Description:
Encloses the recipient. Single lines can be separated with
<newline/>
s. If the nickname
attribute is given
and there is contents, the contents of this element has higher
priority. So, if you want to use the address book, leave it empty:
<to nickname="Knuth"/>
See <letter>
.
<subject>
silent
"true"
or "false"
xml:lang
Possible Contents: (Text | inline element)*
Description:
The subject of a letter. This element is mandatory, but is suppressed
for informal letters (attribute formal="false"
). For formal
letters, it's printed. With silent
you may change that behaviour
explicitly.
See <letter>
.
<opening>
– begin of letterxml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description: Corresponds to \opening{...} in LaTeX. It begins the letter text.
See <letter>
.
<closing>
– end of letterkind
"above"
, "below"
or "signature"
xml:lang
id
style/class
Possible Contents: (Text | inline element)*
Description: It ends the letter with “Sincerely yours ...” or something like that.
The default for kind
is "signature"
for formal letters and
"above"
else. "above"
means that the contents of
<closing>
is printed above the space for the signature,
"below"
means, well, below, and "signature"
means above, but
with the name of the author below.
So, if you only want to have your name below the signature, you have to say:
<closing kind="signature"/>
See <letter>
.
Unfortunately tbook has to rely on many external applications which means that any bugs in those applications effectively are bugs in tbook, too.
Saxon is the XSLT processor used in tbook. It is called by tbtolatex, tbtohtml, and tbtodocbk.
𝔐
) are not defined in tbook. I excluded
them because Saxon can't process them in many cases. This is a known
Saxon bug. See the
Saxon bug tracker for the whole story.
Mozilla uses a very big bug tracking system called Bugzilla. Despite it it's unfortunately very rare that non-fatal bugs are fixed. But although the following list seems to be long, the problems are small by and large.
 
(Thin Space),  
(Em Space), ‌
(Zero Width Non-Joiner for breaking up
ligatures), and &bph;
(Break Permitted Here).
<mlabeledtr>
is necessary if you use stacked
equations with numbering. Unfortunately Mozilla ignores this tag and
prints such equations next to each other, so tbook uses <mtr>
tags instead as a provisional solution. However this means that the
position of the equation number is not optimal.
blah blah blah blah blah blah blah x -Achse blah blah blah blah blah
which is of course unacceptable.
<mrow>
(or {}
in LaTeX syntax) will
never be broken, neither in HTML nor in LaTeX. So if you write
<m>{E=mc^2}</m>
this whole equation will always be on the same
line.
There are also bad line breaks around a MathML equation, similar to the problems with small bitmap equations above. This, too, is a known Mozilla bug.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ <!ATTLIST mtd id ID #IMPLIED> ... the same for other MathML elements ... ]>
tbook does so by itself if you call it with the undocumented XSLT
parameter mathml-ids-in-doctype set to true. However,
the Internet Explorer is stupid enough to display the last
“]>
”. Therefore tbook uses slightly different CSS code in
this case, hiding the “]>
” by setting the text colour to
white. This works at least for Mozilla and IE6, but please test it
with other browsers, too, before you use it. Feedback concerning this
is welcome.21
Please also consult the list of known Explorer issues and the list of known MathPlayer issues at Design Science (the creators of the MathML plug-in for Internet Explorer).
(The following is probably also true for Mac OSX's Safari web browser since it uses the same code.)
Konqueror has buggy CSS support. This is not very special since all browsers fail to support CSS fully. However its kind of failure makes it impossible to work with demanding CSS code optimised for Internet Explorer and Mozilla's Gecko engine.
The exact problem of Konqueror is that floats (tables and figures) are overprinted by the text that is supposed to wrap around them.
In short, you have two possibilities: Ignore Konqueror and its users and wait for a better Konqueror version, or use the css-mode XSLT option with very-careful, see Further XSLT parameters. For example,
tbtohtml mybook css-mode=very-careful
Jade is used for validating tbook documents without converting them (e.g. Emacs calls Jade to test whether the syntax of the current tbook buffer is valid). It is also used to convert DocBook documents, which means that is converts tbook to RTF for example.
xmlns:...
attributes.
Jade isn't aware of XML's namespace conventions. You can ignore these
messages completely.
tbook's (X)HTML files will almost always be validated by web validators. However, sometimes the W3 validator claims that attributes in tbook's HTML4 output contain invalid characters. This is a limitation of XSLT 1.0 processors, and it only occurs if you use non-ASCII characters in ID and URL attributes. However, it is not possible to use XSLT 2.0 processors at the moment, for various reasons.
tbook prints a warning message in such cases. May may choose a less dangerous attribute value. On the other hand, those validation errors are absolutely nothing to worry about anyway.
The following things would be very nice for an upcoming tbook release. If anyone wants to help with this, please contact the tbook maintainer!
texify
' or a classical
make implementation. It would do everything that is necessary to
bring the current document up to date, including index, bibliography,
and graphics in all needed formats.
screenshot
s. Typically
screenshots will be PNGs, so they are stored in a lossless bitmap image
format. SVG may be an interesting extension, too.
A lot of tbook code is documented by DTX files. The command make doc transforms them into PDF files. tbookdtd.pdf is the best starting point; it contains succinct documentation of the tbook DTD, although the description of elements you can also find in section Elements reference. tbookxsl.pdf contains the documented source code of the XSLT stylesheets. But that file and even more the other PDFs that used to be DTX files have very poor documentation/source ratio.
(If you comment out the \OnlyDescription
in tbookdtd.dtx,
you get a list with most available entities and their LaTeX
realisation.)
Two programs, tbrplent.w and tbcrent.w, are CWEB files and thus can produce their own documentation by applying cweave to them. But make doc may have done this already.
... have a look at ltxmleb.pdf. It contains info that may be better to digest, has some facts about the adventure of creation, and offers a good references list. It doesn't contain documentation about tbook that's not documented in English elsewhere in the distribution.
[1] Windows only
[2] all of them at http://www.tex.ac.uk/
[3] http://www.cs.wisc.edu/~ghost/doc/AFPL/get704.htm ; don't use GNU Ghostscript
[4] all three at http://sourceforge.net/netpbm
[5] http://sourceforge.net/projects/xindy, or as an RPM from tbook's project page at http://sourceforge.net/projects/tbookdtd
[6] On CTAN at nonfree/support/jpeg2ps/
[7] http://sourceforge.net/projects/saxon, or as an RPM from tbook's project page at http://sourceforge.net/projects/tbookdtd
[8] http://www-cs-faculty.stanford.edu/~knuth/cweb.html
[9] sed, patch and Flex are part of the GNU project at http://www.gnu.org
[10] If you don't have custom-bib, use the prepared bst files in the bst/ directory.
[11] For free download at http://www.mozilla.org
[12] actually to
text/xhtml+xml
, but only few applications support this so far
[13] http://www.dessci.com/webmath/mathplayer
[14] Only linux and windows are tested, so the rest will surely fail. ;-) Well, it affects the look of the shell scripts being generated.
[15] Needs `preview' package (http://www.tex.ac.uk/tex-archive/macros/latex/contrib/preview/).
[16] If you don't want that at all, set it e.g. to #.
[17] because this is shorter than &
[18] Actually both <mtd>
s should be in
different <mtr>
s according to the MathML specification.
You may do this, but it is just additional typing, since it doesn't
matter for tbook. However the MathML that tbook produces
is absolutely free of such sloppyness.
[19] In a letter system that is better configurable than the current, this attribute is used to read in the correct parameters such as the letter head.
[20] Well, as good as the respective output can do it.
[21] Since 2003/10/22 this bug is fixed in sources. The upcoming versions (that will contain this fix presumably) are Mozilla 1.6 and Firebird 0.7.