Chapter 6
TeX4ht
Options
Following is an incomplete list of options that can be passed to the tex4ht.sty
package. These options can be used to modify the compilation process, for example
to select a SVG format for generated images, to request math environments to be
convert as images or to split sections as separate HTML pages.
The options may be defined in the .4ht
files and may depend on the output
format, so it is not feasible to provide their full list. Most of the following options
work only in the HTML
output.
There are several ways how to pass the options to TeX4ht
. The non-recommended
way is to pass them as options to tex4ht.sty
using \usepackage
command in the
TeX file.
Recommended solutions don’t require modifications of the TeX files.
One way is to pass the options to make4ht
as an command line argument, next to
the filename:
For more information on calling scripts see the section 4.
The second way is to pass options in the \Preamble
command in a custom
configuration file. Note that first option in the \Preamble
command must be
xhtml.
See the section Private Configuration Files for more details on configuration files.
6.1 List of options
- -css
-
to ignore
CSS
code, use command line option-css
. - -xtpipes
-
to avoid
xtpipes
post-processing the output. This might be useful for DocbookXML
or ODT output. - 0
-
pagination shall be obtained through the option
0
or1
, at locations marked with\PageBreak
. - 1, 2, 3, 4, 5, 6, 7
-
for automatic sectioning pagination (to break at various section levels), use the appropriate command line option
1, 2, 3, 4,
5, 6, 7
. Option 1 break pages at parts, 2 at chapters, 3 at sections, 4 at subsections, 5 at subsubsections and 6 at paragraphs. - DOCTYPE
-
to request a
DOCTYPE
declaration, use the command line optionDOCTYPE
. - Gin-dim
-
for key dimensions of the graphic, try this option.
- Gin-dim+
-
for key dimensions when the bounding box is not available.
- Gin-percent
-
calculate size of the graphics on the relation to the page width.
- NoFonts
-
don’t use original font style information.
- NoSections
-
don’t use frames for text alignment environments in the ODT output.
- PMath
-
Option to choose positioned math. Example:
\def\({\PMath$}
;\def\){$\EndPMath}
;\def\[{\PMath$$}
;\def\]{$$\EndPMath}
. - RL2LR
-
to reverse the direction of RL sentences.
- TocLink
-
option to request links from the tables of contents.
- ^13
-
option for active superscript character.
- _13
-
option for active subscript character.
- accent-
-
This option is available only together with new-accents. It produces pictures for some math accents.
- bib-
-
for degraded bibliography friendlier for conversion to
.doc
. - bibtex2
-
Option
bibtex2
requires compilation of\jobname j.aux
with bibtex. - charset
-
for alternate character set, use the command line option
charset=...
(e.g.,charset=utf-8
). - css-in
-
the inline
CSS
code will be extracted from the input of the previous compilation, so an extra compilaion might be needed for this option to make it effective. - css2
-
for
CSS
2 code. - cut-fullname
-
by default filenames for files created by section breaking options base their names on truncated section type names. Use this option to disable truncating.
- early^
-
for default catcode of superscript in the
\Preamble
. - early_
-
for default catcode of subscript in the
\Preamble
. - endnotes
-
for end notes instead of footnotes, use this option.
- enumerate+
-
for enumerated list elements that keep the list couter value. This will use the description list like
<dt>...</dt>
for the list counter. - enumerate-
-
for enumerated list element’s
<li>
’s with value attributes, use this command line option. This will be an ordered list with the value of list counter provided as an attribute namely,value
of the<li>
element. - fancylogo
-
try to visually emulate
\TeX
and\LaTeX
logos. - fastmathjax
-
turn-off post-processing of math in the MathJax mode. It can speed-up the compilation, but it can result in invalid characters in the generated HTML file.
- fn-in
-
for inline footnotes use this option.
- fn-out
-
for offline footnotes.
- fonts
-
use HTML elements and CSS for LATeX font commands, such as
\textit
. - fonts+
-
for marking of the base font, use this option.
- font
-
for adjusted font size, use the command line option
font=...
(e.g., font=-2). - frames-
-
for frames support.
frames
is also valid option for frames support. - frames-fn
-
for content,
TOC
and footnotes in three frames. - frames
-
for
TOC
and content in two frames. - gif
-
for bitmaps of pictures in
.gif
format, use this option. - graphics-
-
if the included graphics are of degraded quality, try the command line options
graphics-num
orgraphics-
. Thenum
should provide the density of pixels in the bitmaps (e.g., 110). - hidden-ref
-
option to hide clickable index and bibliography references.
- html+
-
for stricter
HTML
code. - imgdir
-
for addressing images in a subdirectory, use the option
\imgdir:.../
. - image-maps
-
for
image-maps
support. - index
-
for n-column index, use the command line option,
index=n
(e.g., index=2). - info-oo
-
for extra tracing information while generating open office output.
- info
-
for extra information in the
\jobname.log
file. - itemize+
-
for original characters used as bullets in the
itemize
list. - java
-
for
java
support. - javahelp
-
for
JavaHelp
output format, use this command line option. - javascript
-
for
javascript
support. - jh-
-
for sources failing to produce
XML
versions ofHTML
, try this command line option. - jpg
-
for bitmaps of pictures in
.jpg
format, use this option. - li-
-
for enumerated list elements li’s with value attributes.
- math-
-
option to use when sources fail to produce clean math code.
- mathjax
-
use MathJax for the math rendering.
- mathltx-
-
option to use when sources fail to produce clean
mathltx
code. - mathml-
-
option to use when sources fail to produce clean
MathML
code. - mathplayer
-
for
MathML
on Internet Explorer + MathPlayer. - minitoc<
-
for mini tocs immediately after the header use the command line option,
minitoc<
. - mouseover
-
for pop ups on mouse over.
- new-accents
-
alternative configurations for accented characters.
- next
-
for linear cross-links of pages, use this option.
- nikud
-
for Hebrew vowels, use the command line option,
nikud
. - no-DOCTYPE
-
to remove
DOCTYPE
declaration from the output. - no-VERSION
-
to remove
<?xml version="..."?>
processing instruction from the output. - NoFonts
-
disable ht-fonts processing in the document.
- no-halign
-
suppress
\halign
redefinition. It doesn’t work with thetabular
environment. - no^
-
for non-active
^
(superscript), use the optionno^
. - no_
-
for non-active
_
(subscript command), use the command line option,no_
. - no_^
-
for both non-active superscript and subscript, use the option
no_^
. - nolayers
-
to remove overlays of slides, use this option.
- nominitoc
-
this will eliminate mini tables of contents from the output.
- nostyle
-
to prevent default CSS style for section titles and page dimensions.
- notoc*
-
for tocs without
*
entries, use this option. Thenotoc*
option is applicable only to pages that are automatically decomposed into separate web pages along section divides. It shall be used when\addcontentsline
instructions are present in the sources. - obj-toc
-
for frames-like object based table of contents, use the command line option
obj-toc
. - p-width
-
for width specifications of tabular
p
entries, use this option. - p-indent
-
for indented paragraphs, without blank spaces.
- pic-RL
-
for pictorial RL.
- pic-align
-
for pictorial align environment.
- pic-array
-
for pictorial array.
- pic-cases
-
for pictorial cases environment.
- pic-eqalign
-
for pictorial equalign environment.
- pic-eqnarray
-
for pictorial eqnarray.
- pic-equation
-
for pictorial equations.
- pic-fbox
-
for pictorial or bitmapped fbox’es.
- pic-framebox
-
for bitmap fameboxes.
- pic-longtable
-
for bitmapped longtable.
- pic-m+
-
for pictorial
$...$
and$$...$$
environments with LATeX alt, use the command line optionpic-m+
(not safe). - pic-m
-
for pictorial
$...$
environments, use the command line optionpic-m
(not recommended). - pic-matrix
-
for pictorial matrix.
- pic-tabular
-
use this option for pictorial tabular.
- plain-
-
for scaled down implimentation.
- prog-ref
-
for pointers to code files from root fragments, use the command line option
prof-ref
. This is for debugging. - refcaption
-
for links into captions, instead of flat heads, use this option.
- rl2lr
-
to reverse the direction of Hebrew words, use this option.
- sec-filename
-
for file names derived from section titles, use the command line option
sec-filename
. - sections+
-
for back links to table of contents, use this option.
- svg-
-
for external
SVG
files, try this option. - svg-obj
-
same as above.
- svg
-
for dvi pictures in
svg
format. - svg-inline
-
same as the svg, but the
SVG
files are included in the document body. - tab-eq
-
for tab-based layout of equation environment, use this option.
- texsource
-
add the original LaTeX math code as an annotation in MathML. Works only in the HTML+MathML mode.
- trace-onmo
-
for mouseover tracing of compilation, use the command line option,
trace-onmo
. - url-enc
-
for
URL
encoding within href, use this option.\Configure{url-encoder}
can be used to fine tune encoding. - url-il2-pl
-
for il2-pl
URL
encoding. - ver
-
for vertically stacked frames. Effective when
frames
option is requested. - xht
-
for file name extension,
.xht
, use this command line option. - xhtml
-
for
XML
code, use the command line option,xml
orxhtml
. - xml
-
See previous entry.
6.2 Options for the ODT output
- bib-
-
produces degraded bibliography that should be friendlier for conversion to Word.
- description-inline
-
use run-in style for description lists.
- endnotes
-
convert footnotes to endnotes.
- hidden-ref
-
hide clickable index and bibliography references.
- NoSections
-
don’t use sections for text alignment environments.
- tab-eq
-
tab based layout of equations.
- timestamp
-
save creation date in the document metadata.
- TocLink
-
request links from table of contents.