# Command-line tool arguments for DITA-OT

Reference list of DITA-specific command line tool arguments.

## Parameters available to all transforms

The following common parameters are available for all transformation output types.

Table 1. Common DITA-OT parameters
Argument | Description
--- | ---
`/debug` | Specifies that DITA-OT print debugging information for your project. Allowed values are "yes" and "no". Default value is "no".
`/draft` | Indicates whether draft-comment and required-cleanup elements are included in the generated file. Corresponds to XSLT parameter DRAFT in most XSLT modules. Allowed values are "yes" and "no". Default value is "no". Tip: For PDF output, setting `${args.draft}` to "yes" will also cause the contents of `<titlealts>` to appear below the title.
`/grammarcache` | Specifies whether to use the grammar caching feature of the XML parser. Allowed values are "yes" and "no". Default value is "yes". Note: For most users, this is an important option that dramatically speeds up processing time. However, there is a known problem with using this feature for documents that use XML Entities. If your build fails with parser errors about entity resolution, try setting this parameter to "no".
`/i` | Typically defines the location of the .ditamap file for your documentation project. However, the property can be set to a .dita file, as well. DITA-OT reads this file to find the .dita files that comprise the content for the documentation project.
`/logdir` | Defines the location where DITA-OT places log files for your project.
`/outext` | Specifies the file extension for HTML files in your project's output. Corresponds to XHTML parameter `OUTEXT`. Default values is ".html".
`/basedir` | The directory where your project's ant build script resides. The DITA-OT will look for your .dita files relative to this directory. DITA-OT's default build script sets this as an attribute of the project, but you can also define it as a project property.
`/filter` | Defines the location of your project's filter file. Filter files end with the `.ditaval` suffix and are used to filter, include and exclude, content in the generated document. Alternatively, you can create multiple versions of your document by creating a different `.ditamap` file for each version.
`/outdir` | The location of the directory to hold output from your documentation project.
`/transtype` | Defines the output type for a specific Ant target. Plug-ins may add new values for this option; by default, the following values are available: pdf xhtml htmlhelp eclipsehelp eclipsecontent odt troff rtf javahelp legacypdf docbook
`/validate` | Specifies whether DITA-OT should validate your content files. Allowed values are "yes" and "no". Default value is "yes".

## Parameters available for all XHTML based transforms

The following parameters are available for all output types that are based on the XHTML transform type, including:

- XHTML
- HTMLHelp
- JavaHelp
- eclipsehelp

Table 2. XHTML and related parameters
Argument | Description
--- | ---
`/artlbl` | Adds a label to each image containing the image's filename. Allowed values are "yes" and "no". Default value is "no".
`/copycss` | Indicates whether you want to copy your own .css file to the output directory.
`/args.css` | The name of your custom .css file.
`/csspath` | The location of your copied .css file relative to the output directory. Corresponds to XSLT parameter `CSSPATH`.
`/cssroot` | The directory that contains your custom .css file. DITA-OT will copy the file from this location.
`/ftr` | Specifies the location of a well-formed XML file containing your custom running-footer for the document body. Corresponds to XSLT parameter `FTR`. Note: The fragment must be valid XML, with a single root element, common practice is to place all content into <div>.
`/usetasklabels` | Specifies whether to generate locale-based default headings for sections within task topics. Allowed values are "YES" and "NO". Default value is "NO". Corresponds to the XSLT parameter `GENERATE-TASK-LABELS`.
`/hdf` | Specifies the location of a well-formed XML file to be placed in the document head.
`/hdr` | Specifies the location of a well-formed XML file containing your custom running-header for the document body. Corresponds to XSLT parameter `HDR`. Note: The fragment must be valid XML, with a single root element, common practice is to place all content into <div>.
`/indexshow` | Indicates whether `indexterm` element should appear in the output. Allowed values are "yes" and "no". Default value is "no".
`/xhtmlclass` | Specifies whether to include DITA class ancestry inside generated XHTML elements. Allowed values are "no" and "yes"; the default is "yes" in release 1.5.2 (it was "no" in 1.5 and 1.5.1). For example, the prereq element in a task (which is specialized from section) would generate "`class="section prereq`". Corresponds to the XSLT parameter `PRESERVE-DITA-CLASS`.
`/xsl` | Specifies an XSL file that is used rather than the default XSL transform, located in `toolkitdir\xsl\dita2xhtml.xsl`. Property must specify the full path and XSL file name.
`/generateouter` | Specifies whether to generate files for content files that are not located in or beneath the directory containing your `ditmap` file. Supported values are: "1" (default) – do not generate outer files "2 – generate outer files "3" – old solution.
`/onlytopicinmap` | Specifies whether files that are linked to, or referenced with a conref attribute, should generate output. If set to "yes", only files that are referenced directly from the map will generate output files.
`/outercontrol` | Specifies whether content files are located in or below the directory containing your `.ditamap` file. Supported values are: "fail" – fail quickly if files are going to be generated/copied outside of that directory "warn" (default) – complete if files will be generated/copied outside, but log a warning "quiet" – quietly finish with only those files (no warning or error). The `gen-list-without-flagging` Ant task generates a harmless warning for content outside the map directory; you can suppress these warnings by setting the `outer.control` property to "quiet". Warning: Microsoft HTML Help Compiler cannot produce HTMLHelp for documentation projects that use outer content. Your content files must reside in or below the directory containing the `.ditamap` file, and the map file cannot specify ".." at the start of `href` attributes for `topicref` elements.

## PDF-specific command line tool options

The following table describes command line tool options that are specific to the PDF transformation type.

Table 3. PDF parameters
Argument | Description
--- | ---
`/foincluderellinks` | Specifies which links to include in the PDF file. Values are: "none" (default) – no links are included. "all" – all links are included. "nofamily" – hard coded links and reltable-based links are included. Parent, child, next, and previous links are not included.
`/fooutputrellinks` | Specifies whether to show links in your project's output. Values are "yes" (include all links) and "no" (the default, include no links). If `${args.fo.include.rellinks}` is specified, this parameter is ignored. Note: This parameter is deprecated in favor of `${args.fo.include.rellinks}`.
`/xslpdf` | Specifies an XSL file that is used in place of the default XSL transform at `demo\fo\xsl\fo\topic2fo_shell.xsl`. You must specify the full path and XSL file name.
`/fouserconfig` | The parameter to specify the user configuration file for FOP.
`/retaintopicfo` | Specifies whether to leave the generated FO file for a PDF project.

## ODT-specific command line tool options

The ODT transform, which produces a document using the Open Document Format, is available in the 1.5.2 version of the DITA-OT.

Table 4. ODT related parameters
Argument | Description
--- | ---
`/odtimgembed` | Determines whether images are embedded as binary objects within the ODT file.
`/odtincluderellinks` | Specifies which links to include in the ODT file. Values are: "none" (default) – no links are included. "all" – all links are included. "nofamily" – hard coded links and reltable-based links are included. Parent, child, next, and previous links are not included.

## EclipseContent-specific command line tool options

The "eclipsecontent" transform type produces normalized DITA files, along with Eclipse TOC and project files.

Table 5. EclipseContent options
Argument | Description
--- | ---
`/eclipsecontenttoc` | Specifies the name of the TOC file for an Eclipse Content project.

## XHTML-specific command line tool options

Parameters in this section are used by the "xhtml" transtype, but not by other XHTML based transforms.

Table 6. Options for the "xhtml" transform type
Argument | Description
--- | ---
`/xhtmltoc` | Specifies the name of the entry point for an XHTML project. Default value is `index.html`

## EclipseHelp-specific command line tool options

The following table describes command line tool options that are specific to the EclipseHelp transformation type, which is an XHTML based output for use with the Eclipse Help System.

Argument | Description
--- | ---
`/eclipsehelptoc` | Specifies the name of the TOC file.
`/provider` | Specifies the name of the person or organization providing an Eclipse Help project. Default value is `DITA`. Tip: The toolkit ignores the value of this property when processing an Eclipse Collection Map, `eclipse.dtd`.
`/version` | Specifies the version number to include in the output. Default value is `0.0.0`. Tip: The toolkit ignores the value of this property when processing an Eclipse Collection Map, `eclipse.dtd`.

## HTMLHelp-specific command line tool options

The following table describes command line tool options that are specific to the HTML Help compiled help transformation target.

Argument | Description
--- | ---
`/htmlhelpincludefile` | Specifies the name of a file that you want included in an HTMLHelp project.

## JavaHelp-specific command line tool options

The following table describes command line tool options that are specific to the JavaHelp transformation target.

Argument | Description
--- | ---
`/javahelpmap` | Specifies the name of the ditamap file for a JavaHelp project.
`/javahelptoc` | Specifies the name of the file containing the TOC in your JavaHelp output. Default value is the name of the ditamap file for your project.

## Other Toolkit command line tool options

The following table describes additional command line tool options specific to the DITA Open Toolkit that you may override.

Argument | Description
--- | ---
`/ditalocale` | Specifies the language locale file to use for sorting index entries. The JavaHelp transformation type also uses this parameter.
`/cleantemp` | Specifies whether DITA-OT should delete the files in the temporary directory, `dita.temp.dir`, when it finishes a build. Allowed values are "yes" and "no". Default value is "yes".
`/ditadir` | The location of your DITA-OT installation. Verify that your project's build script points to the correct location.
`/ditaext` | Deprecated, `dita.ext` parameter should be used instead. Defines the file extension for content files in the directory specified with the `dita.temp.dir` property. Allowed values are ".xml" and ".dita"; Default value is ".xml".
`/tempdir` | Defines the directory where DITA-OT will create a temporary directory to place temporary files generated during the transformation process.

Parent topic: Running DITA-OT from command-line tool