conref-task.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><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</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.</span></li>
  38. <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
  39. removes the corresponding subdirectory from the <span class="ph filepath">plugins</span> folder.</div></li>
  40. </ul>
  41. </dd>
  42. </dl>
  43. </section>
  44. <div class="tasklabel"><h2 class="sectiontitle tasklabel">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand">
  45. <span class="ph cmd">
  46. <span class="ph" id="ID__download-ot">Download the <span class="ph filepath">dita-ot-<span class="keyword">3.0.4</span>.zip</span>
  47. package from the project website at <a class="xref" href="https://www.dita-ot.org/download" target="_blank">dita-ot.org/download</a>.</span>
  48. </span>
  49. </li><li class="li step stepexpand">
  50. <span class="ph cmd" id="ID__open-terminal">Open a command prompt or terminal session, and then change to the directory where the
  51. DITA Open Toolkit is installed.</span>
  52. <div class="itemgroup info">
  53. <ul class="ul" id="ID__basic-variables">
  54. <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>
  55. <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
  56. process.</li>
  57. <li class="li" id="ID__novice-variables-last">
  58. <p class="p" id="ID__common-format-info">
  59. <var class="keyword varname">format</var> is the output format (transformation type).
  60. This argument corresponds to the common parameter <span class="keyword parmname">transtype</span>.
  61. Use the same values as for the <span class="keyword parmname">transtype</span> build parameter,
  62. for example, <span class="keyword option">html5</span> or <span class="keyword option">pdf</span>.</p>
  63. </li>
  64. <li class="li" id="ID__expert-variables-last">
  65. <p class="p">
  66. <var class="keyword varname">format</var> is the output format (transformation type).
  67. This argument corresponds to the common parameter <span class="keyword parmname">transtype</span>.
  68. Use the same values as for the <span class="keyword parmname">transtype</span> build parameter,
  69. for example, <span class="keyword option">html5</span> or <span class="keyword option">pdf</span>.</p>
  70. <div class="p" id="ID__transtypes">You can create plug-ins to add new output formats; by default, the following values are
  71. available:
  72. <ul class="ul">
  73. <li class="li"><span class="keyword option">dita</span></li>
  74. <li class="li"><span class="keyword option">eclipsehelp</span></li>
  75. <li class="li"><span class="keyword option">html5</span></li>
  76. <li class="li"><span class="keyword option">htmlhelp</span></li>
  77. <li class="li"><span class="keyword option">markdown</span>, <span class="keyword option">markdown_gitbook</span>, and
  78. <span class="keyword option">markdown_github</span></li>
  79. <li class="li"><span class="keyword option">pdf</span></li>
  80. <li class="li"><span class="keyword option">tocjs</span></li>
  81. <li class="li"><span class="keyword option">troff</span></li>
  82. <li class="li"><span class="keyword option">xhtml</span></li>
  83. </ul>
  84. </div>
  85. </li>
  86. <li class="li" id="ID__options"><var class="keyword varname">options</var> include the following optional build parameters:
  87. <dl class="dl parml">
  88. <dt class="dt pt dlterm">
  89. <span class="keyword parmname">--output</span>=<var class="keyword varname">dir</var></dt>
  90. <dt class="dt pt dlterm">
  91. <span class="keyword parmname">-o</span>
  92. <var class="keyword varname">dir</var>
  93. </dt>
  94. <dd class="dd pd" id="ID__d7e331">Specifies the path of the output directory; the path can be absolute or relative to
  95. the current directory. This argument corresponds to the common parameter <span class="keyword parmname">output.dir</span>. By
  96. default, the output is written to the <span class="ph filepath">out</span> subdirectory of the current directory.</dd>
  97. <dt class="dt pt dlterm">
  98. <span class="keyword parmname">--filter</span>=<var class="keyword varname">file</var>
  99. </dt>
  100. <dd class="dd pd">Specifies filter file(s) used to include, exclude, or flag content. </dd>
  101. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">args.filter</span>. Relative paths are
  102. resolved against the current directory and internally converted to absolute paths.</dd>
  103. <dt class="dt pt dlterm">
  104. <span class="keyword parmname">--temp</span>=<var class="keyword varname">dir</var></dt>
  105. <dt class="dt pt dlterm">
  106. <span class="keyword parmname">-t</span>
  107. <var class="keyword varname">dir</var>
  108. </dt>
  109. <dd class="dd pd">Specifies the location of the temporary directory.</dd>
  110. <dd class="dd pd ddexpand">This argument corresponds to the common parameter <span class="keyword parmname">dita.temp.dir</span>.</dd>
  111. <dt class="dt pt dlterm">
  112. <span class="keyword parmname">--verbose</span></dt>
  113. <dt class="dt pt dlterm">
  114. <span class="keyword parmname">-v</span>
  115. </dt>
  116. <dd class="dd pd">Verbose logging.</dd>
  117. <dt class="dt pt dlterm">
  118. <span class="keyword parmname">--debug</span></dt>
  119. <dt class="dt pt dlterm">
  120. <span class="keyword parmname">-d</span>
  121. </dt>
  122. <dd class="dd pd">Debug logging.</dd>
  123. <dt class="dt pt dlterm">
  124. <span class="keyword parmname">--logfile</span>=<var class="keyword varname">file</var></dt>
  125. <dt class="dt pt dlterm">
  126. <span class="keyword parmname">-l</span>
  127. <var class="keyword varname">file</var>
  128. </dt>
  129. <dd class="dd pd">Write logging messages to a file.</dd>
  130. <dt class="dt pt dlterm">
  131. <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var></dt>
  132. <dt class="dt pt dlterm">
  133. <span class="keyword parmname">-D</span><var class="keyword varname">parameter</var>=<var class="keyword varname">value</var>
  134. </dt>
  135. <dd class="dd pd">Specify a value for a DITA-OT or Ant build parameter.
  136. <p class="p">The GNU-style <span class="keyword parmname">--parameter</span>=<var class="keyword varname">value</var> form is only available for
  137. parameters that are configured in the plug-in configuration file; the Java-style <span class="keyword parmname">-D</span>
  138. form can also be used to specify additional non-configured parameters or set system properties.</p>
  139. <p class="p">Parameters not implemented by the specified transformation type or referenced in a
  140. <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
  141. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  142. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span>
  143. file.</div></dd>
  144. <dt class="dt pt dlterm">
  145. <span class="keyword parmname">--propertyfile</span>=<var class="keyword varname">file</var>
  146. </dt>
  147. <dd class="dd pd">Use build parameters defined in the referenced <span class="ph filepath">.properties</span> file.
  148. <p class="p">Build parameters specified on the command line override those set in the <span class="ph filepath">.properties</span>
  149. file.</p></dd>
  150. </dl></li>
  151. </ul>
  152. </div>
  153. <div class="itemgroup stepresult" id="ID__running-ditaot-results">
  154. <p class="p">If processing is successful, nothing is printed in the terminal window. The built output is written to the
  155. specified output directory (by default, in the <span class="ph filepath">out</span> subdirectory of the current
  156. directory).</p>
  157. <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
  158. <span class="keyword cmdname">dita</span> command from any location on the file system without typing the path.</div>
  159. </div>
  160. </li><li class="li step stepexpand">
  161. <span class="ph cmd">Extending pre-processing</span>
  162. <div class="itemgroup info">
  163. <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
  164. 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>
  165. pre-processing.</div>
  166. <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
  167. subject to change between versions of DITA-OT. New versions may remove, reorder, combine, or add steps to
  168. the process, so the extension points <strong class="ph b">within</strong> the preprocessing stage should only be used if absolutely
  169. necessary.</div>
  170. </div>
  171. </li></ol>
  172. <section class="section postreq"><div class="tasklabel"><h2 class="sectiontitle tasklabel">What to do next</h2></div>
  173. <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
  174. set.</div>
  175. <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
  176. files is not consistent, set <span class="keyword option">args.input.dir</span> with the <span class="keyword cmdname">dita</span> command and
  177. reference its value with <code class="ph codeph">${args.input.dir}</code> in your <span class="ph filepath">.properties</span>
  178. file.</div>
  179. </section>
  180. </div>
  181. </article></main></body></html>