ditac
command-line utilityditac
[option]* output_file
[in_dita_file]+userguide.ditamap
map to multi-page
XHTML:C:\docsrc> ditac -p center "fig table" ..\doc\userguide.htm userguide.ditamap
introduction.dita
and
quickstart.dita
topics to PDF:C:\docsrc> ditac draft1.pdf introduction.dita quickstart.dita
foo.ditamap
to multi-page XHTML. The XHTML
pages must be generated in the bar/
subdirectory.C:\docsrc> ditac bar\_.html foo.ditamap
@chunk
and @copy-to
attributes
specified in foo.ditamap
if any, and from the
basename of the map ("foo" in the case of our example)
otherwise.-p
is
equivalent to -param
.-p
param_name param_value-param
param_name
param_value-t
XSLT_stylesheet_URL_or_file-xslt
XSLT_stylesheet_URL_or_file-c
none|single|auto-chunk
none|single|auto-f
xhtml | xhtml1.1 | html | xhtml5 | html5 |
webhelp | webhelp5 | epub | epub3 | htmlhelp | ps | pdf | rtf | odt
| wml | docx | fo-format
xhtml | xhtml1.1 | html | xhtml5 |
html5 | webhelp | webhelp5 | epub | epub3 | htmlhelp | ps | pdf |
rtf | odt | wml | docx | fo-r
resource_path-resources
resource_path-i
resource_path-images
resource_path-resourcehandler
com.xmlmind.ditac.convert.ResourceProcessor res". ![]() |
RememberUnless option
-r ,
-resources , -i or
-images (or low-level option -resourcehandler )
are used, resources are not copied nor
converted. |
![]() |
RememberWhen generating
any of the XSL-FO based output formats (PDF, DOCX, ODT, etc),
specifying option
-r (or any of its aliases:
-resources , -i , etc) is generally
not useful as these output formats can embed the images referenced
in the source DITA document. However if your DITA document
references audio or video files or if your document embeds MathML
and the XSL-FO processor does not support MathML (e.g.
RenderX RenderX XEP ![]() -r is really needed. |
-filter
ditaval_URL_or_file-attrvalues
subject_scheme_map_URL_or_file-defaultattrvalues
subject_scheme_map_URL_or_file-attrvalues
except that the controlled attribute values found
in this subject scheme map will not be used if some
controlled attribute values are loaded from the subject scheme maps
referenced in the map or bookmap to be converted.-toc
<topicref>
(1) having no
<topicref>
descendants.-index
-frontmatter
spec<bookmap>
, this option adds
elements after any existing
<booklists>
elements.spec -> same_page [ ',' same_page ]* same_page -> section [ '+' section ]* section -> 'toc'|'figurelist'|'tablelist'|'examplelist'| 'equationlist'|'indexlist'
-frontmatter toc,figurelist+tablelist
-backmatter
spec-frontmatter
for more
information.
<bookmap>
, this option adds
elements before any existing
<booklists>
elements.-addindex
main.html
) and when no file
called index.html
has been generated, this
option copies main.html
to
index.html
. Applies
to formats: xhtml, xhtml1.1, html,
webhelp.-lang
language_code-foconverter pdf "executable_file" -foconverter ps "executable_file". Examples: "fr", "fr-CA". Needed to sort the index entries.
@xml:lang
attribute of the root element of the topic
map (if any, "en" otherwise).-v
-vv
-vvv
-o
options_URL_or_file-option
options_URL_or_fileditac.options
file.
$ ditac -v -o html.options foo.htm foo.ditamap
html.options
contains:-format html -p css http://www.acme.com/css/acme.css
$ ditac -v -format html -p css http://www.acme.com/css/acme.css \ foo.htm foo.ditamap
-ahf
executable_fileAHFCmd.exe
(run.sh
on platforms other than
Windows).
-foconverter AHF pdf '"executable_file" -x 3 -p @PDF -d "%I" -o "%O"' -foconverter AHF ps '"executable_file" -x 3 -p @PS -d "%I" -o "%O"'
-ahfconf
configuration_file-ahf
is also specified.-fop
executable_filefop
shell
script (fop.bat
on Windows).
-foconverter FOP pdf '"executable_file" -q -r -fo "%I" -pdf "%O"' -foconverter FOP ps '"executable_file" -q -r -fo "%I" -ps "%O"'
-fopconf
configuration_file-fop
is also
specified.
![]() |
RememberXSL-FO converters last registered with
ditac have priority over first registered
ones.However, no matter the order of command-line options,
XSL-FO converters registered using low-level option
-foconverter always have priority over those
registered using options -fop ,
-xep , -ahf , -xfc ,
which in turn always have priority over bundled XSL-FO converters
(such as the Apache
FOP ![]() |
-foconverter
processor_name
target_format commandditac
, a lower-level alternative to using
-xep
, -fop
, -ahf
or -xfc
.
Example:
-foconverter XFC rtf '/opt/xfc/bin/fo2rtf "%I" "%O"'
-foconverter FOP pdf \ '/opt/fop/fop -c /home/john/docs/fop.conf -q -r -fo "%I" -pdf "%O"'
![]() |
RememberXSL-FO converters last registered with
ditac have priority over first registered
ones.However, no matter the order of command-line options,
XSL-FO converters registered using low-level option
-foconverter always have priority over those
registered using options -fop ,
-xep , -ahf , -xfc ,
which in turn always have priority over bundled XSL-FO converters
(such as the Apache
FOP ![]() |
-hhc
exe_filehhc.exe
, the HTML Help
compiler.-imageconverter
input_file_extensions
output_file_extensions commandditac
.
Example:
-imageconverter .wmf.emf .svg \ '/opt/inkscape/bin/inkscape --export-type=svg -l -o "%I" "%O"'
![]() |
RememberImage converters last registered with
ditac have priority over first registered
ones.Note that image converters registered using option
-imageconverter always have priority over bundled
image converters (such as the stock
javax.imageio.ImageIO based image converter and the
Batik ![]() ![]() ![]() |
-plugin
plugin_name-resourcehandler
class_name
parameterscom.xmlmind.ditac.preprocess.ResourceHandler
.
String parameters is used to configure the newly created
ResourceHandler
.
-xep
executable_filexep
shell
script (xep.bat
on Windows).
-foconverter XEP pdf '"executable_file" -quiet -valid -fo "%I" -pdf "%O"' -foconverter XEP ps '"executable_file" -quiet -valid -fo "%I" -ps "%O"'
-xfc
executable_filefo2rtf
shell
script (fo2rtf.bat
on Windows).
fo2rtf
. Using this location, ditac infers
the locations of fo2wml
,
fo2docx
and
fo2odt
.-foconverter XFC rtf '"fo2rtf_executable_file" -rtf.target=MSWord "%I" "%O"' -foconverter XFC wml '"fo2wml_executable_file" "%I" "%O"' -foconverter XFC docx '"fo2docx_executable_file" "%I" "%O"' -foconverter XFC odf '"fo2odt_executable_file" "%I" "%O"'
![]() |
WARNINGXMLmind
XSL-FO Converter
![]() ![]() |
-preprocess
-automap
save_file-keepfo
-errout
-ignoreoptionsfile
ditac.options
options
file.
See below The
ditac.options
file.-validate
ditac
. Any
validation error will cause ditac
to immediately
stop running. Therefore the combination of the
-validate
and -dryrun
options gives you a simple way to thoroughly check your DITA
document.
-validate
option to
work, all the XML files (maps, topics, even .ditaval
filter files) loaded by ditac
must start with the
proper <!DOCTYPE> declaration.-dryrun
ditac
as a validator, and most notably
check cross-references. That is, do not generate any file; just
report errors if any .-version
ditac.options
fileditac.options
options file. The
content of this plain text file, encoded in the native encoding of the
platform (e.g. Windows-1252 on a Western Windows PC), is
automatically loaded by ditac
each time this command is
executed. The content of this file, command-line options separated by
whitespace, is prepended to the options specified in the
command-line.ditac.options
contains:-v -p number all
~/docsrc$ ditac -p center "fig table" ../doc/userguide.htm userguide.ditamap
~/docsrc$ ditac -v -p number all -p center "fig table" \ ../doc/userguide.htm userguide.ditamap
ditac.options
options file is found in the ditac user
preferences directory. This directory is:$HOME/.ditac/
on
Linux.$HOME/Library/Application
Support/XMLmind/ditac/
on the Mac.%APPDATA%\XMLmind\ditac\
on Windows. Example:
C:\Users\john\AppData\Roaming\XMLmind\ditac\
.ditac.options
options file is mainly
useful to configure ditac once for all by specifying values for the -fop
, -fopconf
, -xep
, -xfc
, -hhc
, -plugin
and
-imageconverter
options.-v -xep E:\opt\xep\xep.bat -fop E:\opt\fop\fop\fop.bat -xfc E:\opt\xfc\bin\fo2rtf.bat -hhc "C:\Program Files\HTML Help Workshop\hhc.exe"
![]() |
Remember
|
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public"> <public publicId="-//OASIS//DTD DITA Concept//EN" uri="dtd/concept.dtd"/> ... </catalog>
XSLT stylesheet | Description |
xsl/fo/fo.xsl |
Used to generate an intermediate XSL-FO file. After that, the XSL-FO file is converted to PDF , PostScript , RTF , WordprocessingML , Office Open XML (.docx) or OpenOffice/LibreOffice (.odt) by the means of an XSL-FO processor. |
xsl/xhtml/xhtml.xsl |
Used to generate XHTML 1.0 pages. |
xsl/xhtml/xhtml1_1.xsl |
Used to generate XHTML 1.1 pages. |
xsl/xhtml/html.xsl |
Used to generate HTML 4.01 pages. |
xsl/xhtml/xhtml5.xsl |
Used to generate XHTML 5 pages. |
xsl/webhelp/webhelp.xsl |
Used to generate Web Help containing XHTML 1 pages, which are then compiled
using XMLmind Web Help Compiler ![]() |
xsl/webhelp/webhelp5.xsl |
Used to generate Web Help containing XHTML 5 pages, which are then compiled
using XMLmind Web Help Compiler ![]() |
xsl/htmlhelp/htmlhelp.xsl |
Used to generate HTML Help files, which are then compiled using
hhc.exe . |
xsl/eclipsehelp/eclipsehelp.xsl |
Used to generate Eclipse Help files. |
xsl/epub/epub.xsl |
Used to generate EPUB 2 files, which are then archived in a .epub file (Zip archive having a .epub extension). |
xsl/epub/epub3.xsl |
Used to generate EPUB 3 files, which are then archived in a .epub file (Zip archive having a .epub extension). |
ditac
is passed command-line
option -plugin
plugin_name,
it will use the DTDs/schemas and the XSLT stylesheets found in the plug-in
subdirectory having specified name preferably to those found in
ditac_install_dir/schema/ and in
ditac_install_dir/xsl/.‣ Parent topic: Part I. Using XMLmind DITA Converter
(1) | Not counting
<topicref> s contained in
<frontmatter> and
<backmatter> . |