conref-task.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2020"><meta name="DC.rights.owner" content="(C) Copyright 2020"><meta name="DC.type" content="task"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="ID"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Conref file for tasks</title></head><body id="ID"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Conref file for tasks</h1>
  8. <div class="body taskbody">
  9. <section class="section context"><div class="tasklabel"><h2 class="sectiontitle tasklabel">About this task</h2></div>
  10. <p class="p" id="ID__semver-info">DITA-OT releases follow
  11. <a class="xref" href="https://semver.org" target="_blank" rel="external noopener">semantic versioning</a> guidelines. Version numbers use the
  12. <code class="ph codeph"><var class="keyword varname">major</var>.<var class="keyword varname">minor</var>.<var class="keyword varname">patch</var></code> syntax, where
  13. <var class="keyword varname">major</var> versions may include incompatible API changes, <var class="keyword varname">minor</var> versions add
  14. functionality in a backwards-compatible manner and <var class="keyword varname">patch</var> versions are maintenance releases
  15. that include backwards-compatible bug fixes.</p>
  16. <p class="p" id="ID__semver-plugins">Custom plug-ins developed for a previous <var class="keyword varname">major</var> version may require
  17. changes to work correctly with recent toolkit versions. Most plug-ins should be compatible with subsequent
  18. <var class="keyword varname">minor</var> and <var class="keyword varname">patch</var> versions of the <var class="keyword varname">major</var> release for
  19. which they were originally developed.</p>
  20. <dl class="dl">
  21. <dt class="dt dlterm">Standard Path / Directory Names</dt>
  22. <dd class="dd"><span class="ph filepath" id="ID__ot-dir"><var class="keyword varname">dita-ot-dir</var></span></dd>
  23. <dd class="dd ddexpand"><span class="ph filepath" id="ID__dita-cmd"><var class="keyword varname">dita-ot-dir</var>/bin/<span class="keyword cmdname">dita</span></span></dd>
  24. <dd class="dd ddexpand"><span class="ph filepath" id="ID__docsrc-dir"><var class="keyword varname">dita-ot-dir</var>/docsrc</span></dd>
  25. <dd class="dd ddexpand"><span class="ph filepath" id="ID__samples-dir"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span></dd>
  26. <dd class="dd ddexpand"><span class="ph filepath" id="ID__samples-absolute"><var class="keyword varname">/absolute/path/to/dita-ot-dir</var>/docsrc/samples</span></dd>
  27. <dt class="dt dlterm">Plug-In Info</dt>
  28. <dd class="dd">
  29. <ul class="ul">
  30. <li class="li" id="ID__plug-in-id"><span class="ph filepath"><var class="keyword varname">&lt;plug-in-id&gt;</var></span> is the unique ID of the
  31. plug-in, as defined in the plug-in’s configuration file (<span class="ph filepath">plugin.xml</span>).</li>
  32. <li class="li" id="ID__plug-in-zip"><span class="ph filepath"><var class="keyword varname">plug-in-zip</var></span> is the
  33. <var class="keyword varname">filename</var> or <var class="keyword varname">URL</var> of the plug-in’s distribution ZIP file
  34. (optional).</li>
  35. <li class="li" id="ID__plug-in">the optional <span class="ph filepath"><var class="keyword varname">&lt;plug-in&gt;</var></span> argument is one of
  36. the following:
  37. <ul class="ul">
  38. <li class="li">the unique <var class="keyword varname">ID</var> of the plug-in as defined in the plug-in registry at
  39. <a class="xref" href="https://www.dita-ot.org/plugins" target="_blank" rel="external noopener">dita-ot.org/plugins</a> (or a local registry)</li>
  40. <li class="li">the remote <var class="keyword varname">URL</var> of the plug-in’s distribution ZIP file</li>
  41. <li class="li">the name of a local ZIP <var class="keyword varname">file</var></li>
  42. </ul>
  43. </li>
  44. <li class="li"><span class="ph" id="ID__plugin-integrate-all">If no <var class="keyword varname">ID</var>, <var class="keyword varname">URL</var>, or
  45. <var class="keyword varname">file</var> argument is provided, the installation process reloads the current set of
  46. plug-ins from the <span class="ph filepath">plugins</span> directory. This approach can be used to add or remove
  47. multiple plug-ins at once, or any individual plug-ins you have already copied to (or removed from) the
  48. <span class="ph filepath">plugins</span> directory. Any plug-ins added or removed in the process will be listed
  49. by their plug-in ID.</span></li>
  50. <li class="li"><div class="note attention note_attention" id="ID__plugin-remove-subdir"><span class="note__title">Attention:</span> The <span class="keyword cmdname">uninstall</span> subcommand also
  51. removes the corresponding plug-in directory from the <span class="ph filepath">plugins</span> folder.
  52. </div></li>
  53. <li class="li"><div class="note note note_note"><span class="note__title">Note:</span>
  54. <span class="ph" id="ID__pre-subcommands-2-4-ph">In earlier versions of DITA-OT (2.4–3.4), use the double-hyphen option
  55. syntax <span class="keyword cmdname">dita</span></span>
  56. <span class="keyword parmname">--uninstall</span>. <span class="ph" id="ID__pre-subcommands-2-0-ph">In DITA-OT 2.0–2.3, use the
  57. single-hyphen form: <span class="keyword cmdname">dita</span></span>
  58. </div></li>
  59. </ul>
  60. </dd>
  61. </dl>
  62. </section>
  63. <section><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
  64. <span class="ph cmd">
  65. <span class="ph" id="ID__download-ot">Download the <span class="ph filepath">dita-ot-<span class="keyword">3.5</span>.zip</span>
  66. package from the project website at
  67. <a class="xref" href="https://www.dita-ot.org/download" target="_blank" rel="external noopener">dita-ot.org/download</a>.</span>
  68. </span>
  69. </li><li class="li step stepexpand">
  70. <span class="ph cmd" id="ID__open-terminal">Open a command prompt or terminal session, and then change to the directory where DITA
  71. Open Toolkit is installed.</span>
  72. <div class="itemgroup info">
  73. <ul class="ul" id="ID__basic-variables">
  74. <li class="li" id="ID__novice-variables-1"><span class="ph filepath"><var class="keyword varname">dita-ot-dir</var></span> is the DITA-OT installation directory.</li>
  75. <li class="li" id="ID__novice-variables-2"><var class="keyword varname">input-file</var> is the DITA map or DITA file that you want to
  76. process.</li>
  77. <li class="li" id="ID__novice-variables-last">
  78. <p class="p" id="ID__common-format-info">
  79. <var class="keyword varname">format</var> is the output format (transformation type). This argument corresponds to the
  80. common parameter <span class="keyword parmname">transtype</span>. Use the same values as for the
  81. <span class="keyword parmname">transtype</span> build parameter, for example <span class="keyword option">html5</span> or
  82. <span class="keyword option">pdf</span>. </p>
  83. </li>
  84. <li class="li" id="ID__expert-variables-last">
  85. <p class="p">
  86. <var class="keyword varname">format</var> is the output format (transformation type). This argument corresponds to the
  87. common parameter <span class="keyword parmname">transtype</span>. Use the same values as for the
  88. <span class="keyword parmname">transtype</span> build parameter, for example <span class="keyword option">html5</span> or
  89. <span class="keyword option">pdf</span>. </p>
  90. <div class="p" id="ID__transtypes">You can create plug-ins to add new output formats; by default, the following values are
  91. available:
  92. <ul class="ul">
  93. <li class="li"><span class="keyword option">dita</span></li>
  94. <li class="li"><span class="keyword option">eclipsehelp</span></li>
  95. <li class="li"><span class="keyword option">html5</span></li>
  96. <li class="li"><span class="keyword option">htmlhelp</span></li>
  97. <li class="li"><span class="keyword option">markdown</span>, <span class="keyword option">markdown_gitbook</span>, and
  98. <span class="keyword option">markdown_github</span></li>
  99. <li class="li"><span class="keyword option">pdf</span></li>
  100. <li class="li"><span class="keyword option">xhtml</span></li>
  101. </ul>
  102. <div class="note tip note_tip"><span class="note__title">Tip:</span> See
  103. <a class="xref" href="../topics/output-formats.html" title="DITA Open Toolkit ships with several core transformations that convert DITA content to different output formats. Additional formats are available from the plug-in registry at dita-ot.org/plugins.">DITA-OT transformations (output formats)</a> for sample command line syntax and more information on each
  104. transformation. </div>
  105. </div>
  106. </li>
  107. <li class="li" id="ID__options">[<var class="keyword varname">options</var>] include the following optional build parameters:
  108. <dl class="dl parml">
  109. <dt class="dt pt dlterm">
  110. <span class="keyword parmname">--debug</span></dt>
  111. <dt class="dt pt dlterm">
  112. <span class="keyword parmname">-d</span>
  113. </dt>
  114. <dd class="dd pd">Debug logging prints considerably more additional information. The debug log includes all information from
  115. the verbose log, plus details on Java classes, additional Ant properties and overrides, preprocessing
  116. filters, parameters, and stages, and the complete build sequence. Debug logging requires additional
  117. resources and can slow down the build process, so it should only be enabled when further details are
  118. required to diagnose problems.</dd>
  119. <dt class="dt pt dlterm">
  120. <span class="keyword parmname">--output</span>=<var class="keyword varname">dir</var></dt>
  121. <dt class="dt pt dlterm">
  122. <span class="keyword parmname">-o</span>
  123. <var class="keyword varname">dir</var>
  124. </dt>
  125. <dd class="dd pd" id="ID__d644e742">
  126. <p class="p">Specifies the path of the output directory; the path can be absolute or relative to the current
  127. directory.</p>
  128. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">output.dir</span>. By default, the output
  129. is written to the <span class="ph filepath">out</span> subdirectory of the current directory.</p>
  130. </dd>
  131. <dt class="dt pt dlterm">
  132. <span class="keyword parmname">--filter</span>=<var class="keyword varname">files</var>
  133. </dt>
  134. <dd class="dd pd">Specifies filter file(s) used to include, exclude, or flag content. </dd>
  135. <dd class="dd pd ddexpand">
  136. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">args.filter</span>. Relative paths are
  137. resolved against the current directory and internally converted to absolute paths.</p>
  138. <div class="note note note_note"><span class="note__title">Note:</span>
  139. <p class="p">To specify multiple filter files, use the system path separator character to delimit individual file
  140. paths (semicolon ‘<code class="ph codeph">;</code>’ on Windows, and colon ‘<code class="ph codeph">:</code>’ on macOS and Linux) and
  141. wrap the value in quotes:</p>
  142. <p class="p"><code class="ph codeph">--filter="filter1.ditaval;filter2.ditaval;filter3.ditaval"</code></p>
  143. <p class="p">DITAVAL files are evaluated in the order specified, so conditions specified in the first file take
  144. precedence over matching conditions specified in later files, just as conditions at the start of a
  145. DITAVAL document take precedence over matching conditions later in the same document.</p>
  146. </div>
  147. </dd>
  148. <dt class="dt pt dlterm">
  149. <span class="keyword parmname">--force</span>
  150. </dt>
  151. <dd class="dd pd">Force-install an existing plug-in.</dd>
  152. <dd class="dd pd ddexpand">Passed as an additional option to the installation subcommand: <span class="keyword cmdname">dita
  153. install</span>&nbsp;<var class="keyword varname">plug-in-zip</var>&nbsp;<span class="keyword parmname">--force</span></dd>
  154. <dt class="dt pt dlterm">
  155. <span class="keyword parmname">--help</span></dt>
  156. <dt class="dt pt dlterm">
  157. <span class="keyword parmname">-h</span>
  158. </dt>
  159. <dd class="dd pd">Print a list of available arguments, options, and subcommands.</dd>
  160. <dt class="dt pt dlterm">
  161. <span class="keyword parmname">--logfile</span>=<var class="keyword varname">file</var></dt>
  162. <dt class="dt pt dlterm">
  163. <span class="keyword parmname">-l</span>
  164. <var class="keyword varname">file</var>
  165. </dt>
  166. <dd class="dd pd">Write logging messages to a file.</dd>
  167. <dt class="dt pt dlterm">
  168. <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var></dt>
  169. <dt class="dt pt dlterm">
  170. <span class="keyword parmname">-D</span><var class="keyword varname">parameter</var>=<var class="keyword varname">value</var>
  171. </dt>
  172. <dd class="dd pd">Specify a value for a DITA-OT or Ant build parameter.
  173. <p class="p">The GNU-style <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var> form is only available for
  174. parameters that are configured in the plug-in configuration file; the Java-style <span class="keyword parmname">-D</span>
  175. form can also be used to specify additional non-configured parameters or set system properties.</p>
  176. <p class="p">Parameters not implemented by the specified transformation type or referenced in a
  177. <span class="ph filepath">.properties</span> file are ignored.</p>
  178. <div class="note tip note_tip"><span class="note__title">Tip:</span> If you are building in different environments where the location of the input
  179. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  180. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span> file.
  181. </div></dd>
  182. <dt class="dt pt dlterm">
  183. <span class="keyword parmname">--propertyfile</span>=<var class="keyword varname">file</var>
  184. </dt>
  185. <dd class="dd pd">Use build parameters defined in the referenced <span class="ph filepath">.properties</span> file.
  186. <p class="p">Build parameters specified on the command line override those set in the <span class="ph filepath">.properties</span>
  187. file.</p></dd>
  188. <dt class="dt pt dlterm">
  189. <span class="keyword parmname">--resource</span>=<var class="keyword varname">file</var>
  190. </dt>
  191. <dt class="dt pt dlterm">
  192. <span class="keyword parmname">-r</span>
  193. <var class="keyword varname">file</var>
  194. </dt>
  195. <dd class="dd pd">Process input with additional resources.
  196. <div class="p">For example, to process a single topic file with a map that contains key definitions, use a command like
  197. this:
  198. <pre class="pre codeblock"><code><span class="keyword cmdname">dita</span> <span class="keyword parmname">--input</span>=<span class="ph filepath">topic.dita</span> <span class="keyword parmname">--resource</span>=<span class="ph filepath">keys.ditamap</span> <span class="keyword parmname">--format</span>=<span class="keyword option">html5</span></code></pre>
  199. </div></dd>
  200. <dt class="dt pt dlterm">
  201. <span class="keyword parmname">--temp</span>=<var class="keyword varname">dir</var></dt>
  202. <dt class="dt pt dlterm">
  203. <span class="keyword parmname">-t</span>
  204. <var class="keyword varname">dir</var>
  205. </dt>
  206. <dd class="dd pd">Specifies the location of the temporary directory.</dd>
  207. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">dita.temp.dir</span>.</dd>
  208. <dt class="dt pt dlterm">
  209. <span class="keyword parmname">--verbose</span></dt>
  210. <dt class="dt pt dlterm">
  211. <span class="keyword parmname">-v</span>
  212. </dt>
  213. <dd class="dd pd">Verbose logging prints additional information to the console, including directory settings, effective
  214. values for Ant properties, input/output files, and informational messages to assist in troubleshooting.</dd>
  215. </dl></li>
  216. </ul>
  217. </div>
  218. <div class="itemgroup stepresult" id="ID__running-ditaot-results">
  219. <p class="p">If processing is successful, nothing is printed in the terminal window. The built output is written to the
  220. specified output directory (by default, in the <span class="ph filepath">out</span> subdirectory of the current
  221. directory).</p>
  222. <div class="note tip note_tip" id="ID__dita-in-path"><span class="note__title">Tip:</span> Add the absolute path for <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var></span><span class="ph filepath">/bin</span> to the <var class="keyword varname">PATH</var> environment variable to run the
  223. <span class="keyword cmdname">dita</span> command from any location on the file system without typing the path.
  224. </div>
  225. </div>
  226. </li><li class="li step stepexpand">
  227. <span class="ph cmd">Extending pre-processing</span>
  228. <div class="itemgroup info">
  229. <div class="note tip note_tip" id="ID__tip-extend-before-after-preprocessing"><span class="note__title">Tip:</span> For maximum compatibility with future versions of
  230. DITA-OT, most plug-ins should use the extension points that run <strong class="ph b">before</strong> or <strong class="ph b">after</strong>
  231. pre-processing.</div>
  232. <div class="note caution note_caution" id="ID__caution-extend-within-preprocessing"><span class="note__title">CAUTION:</span> The internal order of preprocessing steps is
  233. subject to change between versions of DITA-OT. New versions may remove, reorder, combine, or add steps to
  234. the process, so the extension points <strong class="ph b">within</strong> the preprocessing stage should only be used if absolutely
  235. necessary.</div>
  236. </div>
  237. </li></ol></section>
  238. <section class="section postreq"><div class="tasklabel"><h2 class="sectiontitle tasklabel">What to do next</h2></div>
  239. <div class="note tip note_tip" id="ID__template-properties"><span class="note__title">Tip:</span> Copy <span class="ph filepath"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span><span class="ph filepath">/properties/template.properties</span>; this template describes each of the properties you can
  240. set.</div>
  241. <div class="note tip note_tip" id="ID__pass-input-dir"><span class="note__title">Tip:</span> If you are building in different environments where the location of the input
  242. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  243. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span> file.
  244. </div>
  245. </section>
  246. </div>
  247. </article></main></body></html>