conref-task.dita 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="ID">
  5. <title>Conref file for tasks</title>
  6. <taskbody>
  7. <context>
  8. <p id="semver-info">DITA-OT releases follow
  9. <xref keyref="semver"/> guidelines. Version numbers use the
  10. <codeph><varname>major</varname>.<varname>minor</varname>.<varname>patch</varname></codeph> syntax, where
  11. <varname>major</varname> versions may include incompatible API changes, <varname>minor</varname> versions add
  12. functionality in a backwards-compatible manner and <varname>patch</varname> versions are maintenance releases
  13. that include backwards-compatible bug fixes.</p>
  14. <p id="semver-plugins">Custom plug-ins developed for a previous <varname>major</varname> version may require
  15. changes to work correctly with recent toolkit versions. Most plug-ins should be compatible with subsequent
  16. <varname>minor</varname> and <varname>patch</varname> versions of the <varname>major</varname> release for
  17. which they were originally developed.</p>
  18. <dl>
  19. <dlentry>
  20. <dt>Standard Path / Directory Names</dt>
  21. <dd><filepath id="ot-dir"><varname>dita-ot-dir</varname></filepath></dd>
  22. <dd><filepath id="dita-cmd"><varname>dita-ot-dir</varname>/bin/<cmdname>dita</cmdname></filepath></dd>
  23. <dd><filepath id="samples-dir"><varname>dita-ot-dir</varname>/docsrc/samples</filepath></dd>
  24. </dlentry>
  25. <dlentry>
  26. <dt>Plug-In Info</dt>
  27. <dd>
  28. <ul>
  29. <li id="plug-in-id"><filepath><varname>plug-in-id</varname></filepath> is the unique ID of the plug-in, as
  30. defined in the plug-in's configuration file (<filepath>plugin.xml</filepath>).</li>
  31. <li id="plug-in-zip"><filepath><varname>plug-in-zip</varname></filepath> is the
  32. <varname>filename</varname> or <varname>URL</varname> of the plug-in's distribution ZIP file
  33. (optional).</li>
  34. <li><ph id="plugin-integrate-all">If no <varname>filename</varname> or <varname>URL</varname> argument is
  35. provided, the installation process reloads the current set of plug-ins from the
  36. <filepath>plugins</filepath> directory. This approach can be used to add or remove multiple plug-ins
  37. at once, or any individual plug-ins you have already copied to (or removed from) the
  38. <filepath>plugins</filepath> directory.</ph></li>
  39. <li><note id="plugin-remove-subdir" type="attention">The <parmname>--uninstall</parmname> option also
  40. removes the corresponding subdirectory from the <filepath>plugins</filepath> folder.</note></li>
  41. </ul>
  42. </dd>
  43. </dlentry>
  44. </dl>
  45. </context>
  46. <steps>
  47. <step>
  48. <cmd>
  49. <!-- Used in installation topic & Release Notes -->
  50. <ph id="download-ot">Download the <filepath>dita-ot-<keyword keyref="maintenance-version"/>.zip</filepath>
  51. package from the project website at <xref keyref="download.dita-ot"/>.</ph>
  52. </cmd>
  53. </step>
  54. <step>
  55. <cmd id="open-terminal">Open a command prompt or terminal session, and then change to the directory where the
  56. DITA Open Toolkit is installed.</cmd>
  57. <info>
  58. <ul id="basic-variables">
  59. <li id="novice-variables-1"><filepath conref="#ID/ot-dir"/> is the DITA-OT installation directory.</li>
  60. <li id="novice-variables-2"><varname>input-file</varname> is the DITA map or DITA file that you want to
  61. process.</li>
  62. <!-- ↓ excerpt-variables (shift left to avoid indendation in codeblock/coderef) ↓ -->
  63. <li id="novice-variables-last" audience="novice">
  64. <p id="common-format-info">
  65. <varname>format</varname> is the output format (transformation type).
  66. This argument corresponds to the common parameter <parmname>transtype</parmname>.
  67. Use the same values as for the <parmname>transtype</parmname> build parameter,
  68. for example, <option>html5</option> or <option>pdf</option>.</p>
  69. </li>
  70. <!-- ↑ end-excerpt ↑ -->
  71. <li id="expert-variables-last" audience="expert">
  72. <p conref="#ID/common-format-info"/>
  73. <p id="transtypes">You can create plug-ins to add new output formats; by default, the following values are
  74. available:
  75. <ul>
  76. <li><option>dita</option></li>
  77. <li><option>eclipsehelp</option></li>
  78. <li><option>html5</option></li>
  79. <li platform="windows"><option>htmlhelp</option></li>
  80. <li><option>markdown</option>, <option>markdown_gitbook</option>, and
  81. <option>markdown_github</option></li>
  82. <li><option>pdf</option></li>
  83. <li><option>tocjs</option></li>
  84. <li><option>troff</option></li>
  85. <li><option>xhtml</option></li>
  86. </ul>
  87. </p>
  88. </li>
  89. <li id="options"><varname>options</varname> include the following optional build parameters:
  90. <parml conref="../parameters/dita-command-arguments.dita#dita-command-properties/dita_build_options">
  91. <plentry>
  92. <pt/>
  93. <pd/>
  94. </plentry>
  95. </parml></li>
  96. </ul>
  97. </info>
  98. <stepresult id="running-ditaot-results">
  99. <p>If processing is successful, nothing is printed in the terminal window. The built output is written to the
  100. specified output directory (by default, in the <filepath>out</filepath> subdirectory of the current
  101. directory).</p>
  102. <note id="dita-in-path" type="tip">Add the absolute path for <filepath conref="#ID/ot-dir"
  103. /><filepath>/bin</filepath> to the <varname>PATH</varname> environment variable to run the
  104. <cmdname>dita</cmdname> command from any location on the file system without typing the path.</note>
  105. </stepresult>
  106. </step>
  107. <step>
  108. <cmd>Extending pre-processing</cmd>
  109. <info>
  110. <note id="tip-extend-before-after-preprocessing" type="tip">For maximum compatibility with future versions of
  111. DITA-OT, most plug-ins should use the extension points that run <b>before</b> or <b>after</b>
  112. pre-processing.</note>
  113. <note id="caution-extend-within-preprocessing" type="caution">The internal order of preprocessing steps is
  114. subject to change between versions of DITA-OT. New versions may remove, reorder, combine, or add steps to
  115. the process, so the extension points <b>within</b> the preprocessing stage should only be used if absolutely
  116. necessary.</note>
  117. </info>
  118. </step>
  119. </steps>
  120. <postreq>
  121. <note type="tip" id="template-properties">Copy <filepath conref="#ID/samples-dir"
  122. /><filepath>/properties/template.properties</filepath>; this template describes each of the properties you can
  123. set.</note>
  124. <note type="tip" id="pass-input-dir">If you are building in different environments where the location of the input
  125. files is not consistent, set <option>args.input.dir</option> with the <cmdname>dita</cmdname> command and
  126. reference its value with <codeph>${args.input.dir}</codeph> in your <filepath>.properties</filepath>
  127. file.</note>
  128. </postreq>
  129. </taskbody>
  130. </task>