pdf2-creating-change-bars.dita 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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
  16. <indexterm>change bars</indexterm></indexterm>
  17. <indexterm>RenderX
  18. <indexterm>change bars</indexterm></indexterm>
  19. <indexterm>Antenna House
  20. <indexterm>change bars</indexterm></indexterm>
  21. <indexterm>Apache FOP
  22. <indexterm>change bars</indexterm></indexterm>
  23. <indexterm>PDF
  24. <indexterm>change bars</indexterm></indexterm>
  25. <indexterm>transformations</indexterm>
  26. </keywords>
  27. </metadata>
  28. </prolog>
  29. <conbody>
  30. <p>The DITA specification for <xmlatt>changebar</xmlatt> simply says:<lq>
  31. <dl>
  32. <dlentry>
  33. <dt><xmlatt>changebar</xmlatt></dt>
  34. <dd>When flag has been set, specify a changebar color, style, or character, according to the changebar
  35. support of the target output format. If flag has not been set, this attribute is ignored.</dd>
  36. </dlentry>
  37. </dl>
  38. </lq></p>
  39. <p>The current version of DITA Open Toolkit uses two <xmlelement>revprop</xmlelement> attribute values to define
  40. revision bars:</p>
  41. <ul>
  42. <li>
  43. <p>The <xmlatt>changebar</xmlatt> attribute value defines the style to use for the line. The list of possible
  44. values is the same as for other XSL-FO rules (see
  45. <xref keyref="fo-spec.change-bar-style"/>). The default value is <option>groove</option>.</p></li>
  46. <li>
  47. <p>The <xmlatt>color</xmlatt> attribute value specifies the change bar color using any color value recognized by
  48. XSL-FO, including the usual color names or a hex color value. The default value is
  49. <option>black</option>.</p></li>
  50. </ul>
  51. <fig>
  52. <title>Sample revision bar configuration</title>
  53. <codeblock outputclass="language-xml">&lt;revprop action="flag" changebar="solid" color="green"/></codeblock>
  54. </fig>
  55. <p>DITA-OT uses a default offset of 2 mm to place the revision bar near the edge of the text column. The offset,
  56. placement and width are not currently configurable via attribute values.</p>
  57. <!-- Doesn't look like there is any way to set the offset (defaults to `2mm2), placement, or width -->
  58. <!-- https://github.com/dita-ot/dita-ot/pull/3111#issuecomment-431110715 -->
  59. <!--
  60. <parml>
  61. <plentry>
  62. <pt>offset</pt>
  63. <pd>The space to offset the revision bar from the edge of the text column. You can use points (pt) or
  64. millimeters (mm).</pd>
  65. </plentry>
  66. <plentry>
  67. <pt>placement</pt>
  68. <pd>The side of the text column on which to place the revision bar. The allowed values are
  69. <option>start</option> (left side for left-to-right languages) and <option>end</option> (right side for
  70. left-to-right languages). The default value is <option>start</option>.</pd>
  71. </plentry>
  72. <plentry>
  73. <pt>width</pt>
  74. <pd>The width of the rule as a measurement value. Typical values are <option>1pt</option> and
  75. <option>0.5pt</option>, which renders a hairline rule.</pd>
  76. </plentry>
  77. </parml>
  78. -->
  79. <p>XSL-FO 1.1 does not provide for revision bars that are not rules, so there is no way to get text revision
  80. indicators instead of rules, for example, using a number in place of a rule. Antenna House Formatter provides a
  81. proprietary extension to enable this, but the DITA-OT PDF transformation does not take advantage of it.</p>
  82. </conbody>
  83. </concept>