pdf2-creating-change-bars.dita 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.md file for applicable licenses.-->
  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> attribute of the DITAVAL <xmlelement>revprop</xmlelement> element. </shortdesc>
  8. <conbody>
  9. <note>FOP 1.1 does not support the XSL <codeph>fo:change-bar</codeph> formatting object.</note>
  10. <p>The DITA specification for <xmlatt>changebar</xmlatt> simply says:<lq>
  11. <dl>
  12. <dlentry>
  13. <dt><xmlatt>changebar</xmlatt></dt>
  14. <dd>When flag has been set, specify a changebar color, style, or character, according to the changebar
  15. support of the target output format. If flag has not been set, this attribute is ignored.</dd>
  16. </dlentry>
  17. </dl>
  18. </lq></p>
  19. <p>The syntax for <xmlatt>changebar</xmlatt> is a sequence of name and value pairs that are delimited by semicolons,
  20. for example:</p>
  21. <codeblock>&lt;revprop action="flag" val="rev01"
  22. <b>changebar="color:black;style:solid;width:0.5pt"</b>
  23. /&gt;</codeblock>
  24. <p>To produce a revision bar, you must specify a value for <parmname>style</parmname> and should specify a value for
  25. <parmname>width</parmname> so you get a visible rule.</p>
  26. <p>Each name and value pair corresponds to an attribute of the <xref keyref="fo-spec.change-bar-begin"/>. The
  27. following attributes and values are available:</p>
  28. <parml>
  29. <plentry>
  30. <pt>style</pt>
  31. <pd>The style to use for the line, as for other XSL-FO rules (<xref keyref="fo-spec.change-bar-style"/>). The
  32. value <option>solid</option> produces a solid rule; the default value is <option>none</option>.</pd>
  33. </plentry>
  34. <plentry>
  35. <pt>color</pt>
  36. <pd>Any color value recognized by XSL-FO, including the usual color names or a hex color value. The default
  37. value is <option>black</option>.</pd>
  38. </plentry>
  39. <plentry>
  40. <pt>offset</pt>
  41. <pd>The space to offset the revision bar from the edge of the text column. You can use points (pt) or
  42. millimeters (mm).</pd>
  43. </plentry>
  44. <plentry>
  45. <pt>placement</pt>
  46. <pd>The side of the text column on which to place the revision bar. The allowed values are
  47. <option>start</option> (left side for left-to-right languages) and <option>end</option> (right side for
  48. left-to-right languages). The default value is <option>start</option>.</pd>
  49. </plentry>
  50. <plentry>
  51. <pt>width</pt>
  52. <pd>The width of the rule as a measurement value. Typical values are <option>1pt</option> and
  53. <option>0.5pt</option>, which renders a hairline rule.</pd>
  54. </plentry>
  55. </parml>
  56. <draft-comment author="ekimber">The current handling of <xmlatt>changebar</xmlatt> is a little Simon Says. It really
  57. needs to interpret any value that is not this specific syntax as "put a change bar out with reasonable defaults".
  58. Likewise, needs more appropriate defaults and a little value checking. I plan to add that but not reflecting those
  59. changes here until I actually make them.</draft-comment>
  60. <p>XSL-FO 1.1 does not provide for revision bars that are not rules, so there is no way to get text revision
  61. indicators instead of rules, for example, using a number in place of a rule. Antenna House Formatter provides a
  62. proprietary extension to enable this, but the DITA-OT PDF transformation does not take advantage of it.</p>
  63. </conbody>
  64. </concept>