pdf2-creating-change-bars.dita 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <concept id="concept_gsc_vcf_vs">
  5. <title>Generating revision bars</title>
  6. <shortdesc>If you use Antenna House Formatter or RenderX XEP, you can generate revision bars in your PDF output by
  7. using the <xmlatt>changebar</xmlatt> and <xmlatt>color</xmlatt> attributes of the DITAVAL
  8. <xmlelement>revprop</xmlelement> element.</shortdesc>
  9. <prolog>
  10. <metadata>
  11. <keywords>
  12. <indexterm><xmlelement>revprop</xmlelement></indexterm>
  13. <indexterm><xmlatt>changebar</xmlatt></indexterm>
  14. <indexterm><xmlatt>color</xmlatt></indexterm>
  15. <indexterm>DITAVAL<indexterm>change bars</indexterm></indexterm>
  16. <indexterm>RenderX<indexterm>change bars</indexterm></indexterm>
  17. <indexterm>Antenna House<indexterm>change bars</indexterm></indexterm>
  18. <indexterm>Apache FOP<indexterm>change bars</indexterm></indexterm>
  19. <indexterm>PDF<indexterm>change bars</indexterm></indexterm>
  20. <indexterm>transformations<indexterm end="pdf"/></indexterm>
  21. </keywords>
  22. </metadata>
  23. </prolog>
  24. <conbody>
  25. <note>The Apache Formatting Objects Processor (FOP <keyword keyref="tool.fop.version"/>) bundled with DITA-OT does
  26. not yet support the XSL <codeph>fo:change-bar</codeph> formatting object. A patch has been submitted to enable
  27. this support in a future version of FOP.</note>
  28. <p>The DITA specification for <xmlatt>changebar</xmlatt> simply says:<lq>
  29. <dl>
  30. <dlentry>
  31. <dt><xmlatt>changebar</xmlatt></dt>
  32. <dd>When flag has been set, specify a changebar color, style, or character, according to the changebar
  33. support of the target output format. If flag has not been set, this attribute is ignored.</dd>
  34. </dlentry>
  35. </dl>
  36. </lq></p>
  37. <p>The current version of DITA Open Toolkit uses two <xmlelement>revprop</xmlelement> attribute values to define
  38. revision bars:</p>
  39. <ul>
  40. <li>
  41. <p>The <xmlatt>changebar</xmlatt> attribute value defines the style to use for the line. The list of possible
  42. values is the same as for other XSL-FO rules (see <xref keyref="fo-spec.change-bar-style"/>). The default
  43. value is <option>groove</option>.</p></li>
  44. <li>
  45. <p>The <xmlatt>color</xmlatt> attribute value specifies the change bar color using any color value recognized by
  46. XSL-FO, including the usual color names or a hex color value. The default value is
  47. <option>black</option>.</p></li>
  48. </ul>
  49. <fig>
  50. <title>Sample revision bar configuration</title>
  51. <codeblock outputclass="language-xml">&lt;revprop action="flag" changebar="solid" color="green"/></codeblock>
  52. </fig>
  53. <p>DITA-OT uses a default offset of 2 mm to place the revision bar near the edge of the text column. The offset,
  54. placement and width are not currently configurable via attribute values.</p>
  55. <!-- Doesn't look like there is any way to set the offset (defaults to `2mm2), placement, or width -->
  56. <!-- https://github.com/dita-ot/dita-ot/pull/3111#issuecomment-431110715 -->
  57. <!--
  58. <parml>
  59. <plentry>
  60. <pt>offset</pt>
  61. <pd>The space to offset the revision bar from the edge of the text column. You can use points (pt) or
  62. millimeters (mm).</pd>
  63. </plentry>
  64. <plentry>
  65. <pt>placement</pt>
  66. <pd>The side of the text column on which to place the revision bar. The allowed values are
  67. <option>start</option> (left side for left-to-right languages) and <option>end</option> (right side for
  68. left-to-right languages). The default value is <option>start</option>.</pd>
  69. </plentry>
  70. <plentry>
  71. <pt>width</pt>
  72. <pd>The width of the rule as a measurement value. Typical values are <option>1pt</option> and
  73. <option>0.5pt</option>, which renders a hairline rule.</pd>
  74. </plentry>
  75. </parml>
  76. -->
  77. <p>XSL-FO 1.1 does not provide for revision bars that are not rules, so there is no way to get text revision
  78. indicators instead of rules, for example, using a number in place of a rule. Antenna House Formatter provides a
  79. proprietary extension to enable this, but the DITA-OT PDF transformation does not take advantage of it.</p>
  80. </conbody>
  81. </concept>