conref-task.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><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">Semantic Versioning 2.0.0</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__samples-dir"><var class="keyword varname">dita-ot-dir</var>/docsrc/samples</span></dd>
  25. <dt class="dt dlterm">Plug-In Info</dt>
  26. <dd class="dd">
  27. <ul class="ul">
  28. <li class="li" id="ID__plug-in-id"><span class="ph filepath"><var class="keyword varname">plug-in-id</var></span> is the unique ID of the plug-in, as
  29. defined in the plug-in’s configuration file (<span class="ph filepath">plugin.xml</span>).</li>
  30. <li class="li" id="ID__plug-in-zip"><span class="ph filepath"><var class="keyword varname">plug-in-zip</var></span> is the
  31. <var class="keyword varname">filename</var> or <var class="keyword varname">URL</var> of the plug-in’s distribution ZIP file
  32. (optional).</li>
  33. <li class="li"><span class="ph" id="ID__plugin-integrate-all">If no <var class="keyword varname">filename</var> or <var class="keyword varname">URL</var> argument is
  34. provided, the installation process reloads the current set of plug-ins from the
  35. <span class="ph filepath">plugins</span> directory. This approach can be used to add or remove multiple plug-ins
  36. at once, or any individual plug-ins you have already copied to (or removed from) the
  37. <span class="ph filepath">plugins</span> directory. Any plug-ins added or removed in the process will be listed by
  38. their plug-in ID.</span></li>
  39. <li class="li"><div class="note attention note_attention" id="ID__plugin-remove-subdir"><span class="note__title">Attention:</span> The <span class="keyword parmname">--uninstall</span> option also
  40. removes the corresponding subdirectory from the <span class="ph filepath">plugins</span>
  41. folder.</div></li>
  42. </ul>
  43. </dd>
  44. </dl>
  45. </section>
  46. <section><div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
  47. <span class="ph cmd">
  48. <span class="ph" id="ID__download-ot">Download the <span class="ph filepath">dita-ot-<span class="keyword">3.3.3</span>.zip</span>
  49. package from the project website at <a class="xref" href="https://www.dita-ot.org/download" target="_blank">dita-ot.org/download</a>.</span>
  50. </span>
  51. </li><li class="li step stepexpand">
  52. <span class="ph cmd" id="ID__open-terminal">Open a command prompt or terminal session, and then change to the directory where DITA
  53. Open Toolkit is installed.</span>
  54. <div class="itemgroup info">
  55. <ul class="ul" id="ID__basic-variables">
  56. <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>
  57. <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
  58. process.</li>
  59. <li class="li" id="ID__novice-variables-last">
  60. <p class="p" id="ID__common-format-info">
  61. <var class="keyword varname">format</var> is the output format (transformation type).
  62. This argument corresponds to the common parameter
  63. <span class="keyword parmname">transtype</span>.
  64. Use the same values as for the <span class="keyword parmname">transtype</span> build
  65. parameter, for example <span class="keyword option">html5</span> or <span class="keyword option">pdf</span>.
  66. </p>
  67. </li>
  68. <li class="li" id="ID__expert-variables-last">
  69. <p class="p">
  70. <var class="keyword varname">format</var> is the output format (transformation type).
  71. This argument corresponds to the common parameter
  72. <span class="keyword parmname">transtype</span>.
  73. Use the same values as for the <span class="keyword parmname">transtype</span> build
  74. parameter, for example <span class="keyword option">html5</span> or <span class="keyword option">pdf</span>.
  75. </p>
  76. <div class="p" id="ID__transtypes">You can create plug-ins to add new output formats; by default, the following values are
  77. available:
  78. <ul class="ul">
  79. <li class="li"><span class="keyword option">dita</span></li>
  80. <li class="li"><span class="keyword option">eclipsehelp</span></li>
  81. <li class="li"><span class="keyword option">html5</span></li>
  82. <li class="li"><span class="keyword option">htmlhelp</span></li>
  83. <li class="li"><span class="keyword option">markdown</span>, <span class="keyword option">markdown_gitbook</span>, and
  84. <span class="keyword option">markdown_github</span></li>
  85. <li class="li"><span class="keyword option">pdf</span></li>
  86. <li class="li"><span class="keyword option">tocjs</span></li>
  87. <li class="li"><span class="keyword option">troff</span></li>
  88. <li class="li"><span class="keyword option">xhtml</span></li>
  89. </ul>
  90. <div class="note tip note_tip"><span class="note__title">Tip:</span> See <a class="xref" href="../topics/output-formats.html" title="DITA Open Toolkit ships with several core transformations that generate different output formats from DITA content. Each transformation represents an implementation of the processing that is defined by OASIS in the DITA specification.">DITA-OT transformations (output formats)</a> for sample command line syntax and more information
  91. on each transformation.
  92. </div>
  93. </div>
  94. </li>
  95. <li class="li" id="ID__options">[<var class="keyword varname">options</var>] include the following optional build parameters:
  96. <dl class="dl parml">
  97. <dt class="dt pt dlterm">
  98. <span class="keyword parmname">--output</span>=<var class="keyword varname">dir</var></dt>
  99. <dt class="dt pt dlterm">
  100. <span class="keyword parmname">-o</span>
  101. <var class="keyword varname">dir</var>
  102. </dt>
  103. <dd class="dd pd" id="ID__d7e544">
  104. <p class="p">Specifies the path of the output directory; the path can be absolute or relative to the current
  105. directory.</p>
  106. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">output.dir</span>. By default, the output
  107. is written to the <span class="ph filepath">out</span> subdirectory of the current directory.</p>
  108. </dd>
  109. <dt class="dt pt dlterm">
  110. <span class="keyword parmname">--filter</span>=<var class="keyword varname">files</var>
  111. </dt>
  112. <dd class="dd pd">Specifies filter file(s) used to include, exclude, or flag content. </dd>
  113. <dd class="dd pd ddexpand">
  114. <p class="p">This argument corresponds to the common parameter <span class="keyword parmname">args.filter</span>. Relative paths are
  115. resolved against the current directory and internally converted to absolute paths.</p>
  116. <div class="note note note_note"><span class="note__title">Note:</span>
  117. <p class="p">To specify multiple filter files, use the system path separator character to delimit individual file
  118. paths (semicolon ‘<code class="ph codeph">;</code>’ on Windows, and colon ‘<code class="ph codeph">:</code>’ on macOS and Linux) and
  119. wrap the value in quotes:</p>
  120. <p class="p"><code class="ph codeph">--filter="filter1.ditaval;filter2.ditaval;filter3.ditaval"</code></p>
  121. <p class="p">DITAVAL files are evaluated in the order specified, so conditions specified in the first file take
  122. precedence over matching conditions specified in later files, just as conditions at the start of a
  123. DITAVAL document take precedence over matching conditions later in the same document.</p>
  124. </div>
  125. </dd>
  126. <dt class="dt pt dlterm">
  127. <span class="keyword parmname">--force</span>
  128. </dt>
  129. <dd class="dd pd">Force-install an existing plug-in.</dd>
  130. <dd class="dd pd ddexpand">Passed as an additional option to the installation command:
  131. <span class="keyword cmdname">dita</span>&nbsp;<span class="keyword parmname">--install</span>=<var class="keyword varname">plug-in-zip</var>&nbsp;<span class="keyword parmname">--force</span></dd>
  132. <dt class="dt pt dlterm">
  133. <span class="keyword parmname">--temp</span>=<var class="keyword varname">dir</var></dt>
  134. <dt class="dt pt dlterm">
  135. <span class="keyword parmname">-t</span>
  136. <var class="keyword varname">dir</var>
  137. </dt>
  138. <dd class="dd pd">Specifies the location of the temporary directory.</dd>
  139. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">dita.temp.dir</span>.</dd>
  140. <dt class="dt pt dlterm">
  141. <span class="keyword parmname">--verbose</span></dt>
  142. <dt class="dt pt dlterm">
  143. <span class="keyword parmname">-v</span>
  144. </dt>
  145. <dd class="dd pd">Verbose logging prints additional information to the console, including directory settings, effective
  146. values for Ant properties, input/output files, and informational messages to assist in troubleshooting.</dd>
  147. <dt class="dt pt dlterm">
  148. <span class="keyword parmname">--debug</span></dt>
  149. <dt class="dt pt dlterm">
  150. <span class="keyword parmname">-d</span>
  151. </dt>
  152. <dd class="dd pd">Debug logging prints considerably more additional information. The debug log includes all information from
  153. the verbose log, plus details on Java classes, additional Ant properties and overrides, preprocessing
  154. filters, parameters, and stages, and the complete build sequence. Debug logging requires additional
  155. resources and can slow down the build process, so it should only be enabled when further details are
  156. required to diagnose problems.</dd>
  157. <dt class="dt pt dlterm">
  158. <span class="keyword parmname">--logfile</span>=<var class="keyword varname">file</var></dt>
  159. <dt class="dt pt dlterm">
  160. <span class="keyword parmname">-l</span>
  161. <var class="keyword varname">file</var>
  162. </dt>
  163. <dd class="dd pd">Write logging messages to a file.</dd>
  164. <dt class="dt pt dlterm">
  165. <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var></dt>
  166. <dt class="dt pt dlterm">
  167. <span class="keyword parmname">-D</span><var class="keyword varname">parameter</var>=<var class="keyword varname">value</var>
  168. </dt>
  169. <dd class="dd pd">Specify a value for a DITA-OT or Ant build parameter.
  170. <p class="p">The GNU-style <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var> form is only available for
  171. parameters that are configured in the plug-in configuration file; the Java-style <span class="keyword parmname">-D</span>
  172. form can also be used to specify additional non-configured parameters or set system properties.</p>
  173. <p class="p">Parameters not implemented by the specified transformation type or referenced in a
  174. <span class="ph filepath">.properties</span> file are ignored.</p><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
  175. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  176. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span>
  177. file.
  178. </div></dd>
  179. <dt class="dt pt dlterm">
  180. <span class="keyword parmname">--propertyfile</span>=<var class="keyword varname">file</var>
  181. </dt>
  182. <dd class="dd pd">Use build parameters defined in the referenced <span class="ph filepath">.properties</span> file.
  183. <p class="p">Build parameters specified on the command line override those set in the <span class="ph filepath">.properties</span>
  184. file.</p></dd>
  185. </dl></li>
  186. </ul>
  187. </div>
  188. <div class="itemgroup stepresult" id="ID__running-ditaot-results">
  189. <p class="p">If processing is successful, nothing is printed in the terminal window. The built output is written to the
  190. specified output directory (by default, in the <span class="ph filepath">out</span> subdirectory of the current
  191. directory).</p>
  192. <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
  193. <span class="keyword cmdname">dita</span> command from any location on the file system without typing the path.
  194. </div>
  195. </div>
  196. </li><li class="li step stepexpand">
  197. <span class="ph cmd">Extending pre-processing</span>
  198. <div class="itemgroup info">
  199. <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
  200. 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>
  201. pre-processing.</div>
  202. <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
  203. subject to change between versions of DITA-OT. New versions may remove, reorder, combine, or add steps to
  204. the process, so the extension points <strong class="ph b">within</strong> the preprocessing stage should only be used if absolutely
  205. necessary.</div>
  206. </div>
  207. </li></ol></section>
  208. <section class="section postreq"><div class="tasklabel"><h2 class="sectiontitle tasklabel">What to do next</h2></div>
  209. <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
  210. set.</div>
  211. <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
  212. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  213. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span>
  214. file.
  215. </div>
  216. </section>
  217. </div>
  218. </article></main></body></html>