Configure colors for the redline preprocessor

Redlining allows users to compare a map with an earlier version of itself. By default, the PDF output file highlights added text in blue and deleted text in red, but you can change these colors.

Note: When the Apache FOP engine is implemented as the PDF rendering engine, the vertical marker in the left margin will not appear; however, the rest of the tracked changes will appear. If you want the vertical marker to appear, you need to install RenderX XEP or Antenna House Formatter.
Redline colors are applied using the redline preprocessor, based on the %OutputGenDir%/data/resources/redline.ditaval file shown below:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This sets the background for deleted text to red and for added text to blue. Used by redline PDF transform -->
<val>
   <!-- the changebar attribute supports the following fields : 
      style:[none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset]
      width:Xpt
      placement:[start | end | left | right | inside | outside | alternate]
      offset:Xpt
      color: #FFFFFF - color code -->
   <revprop action="flag" val="deltaxml-add" backcolor="#3399CC" changebar="style:solid;width:1pt;offset:5pt;color:#3399CC"/>
   <revprop action="flag" val="deltaxml-delete" backcolor="#CC0000" changebar="style:solid;width:1pt;offset:5pt;color:#CC0000"/>
</val>

The redline.ditaval file is a standard Ditaval file, and the values are configured in the <revprop> element. The <revprop> element identifies a value in the rev attribute that must be highlighted by the redline preprocessor. Unlike the other conditional processing attributes, which can be used for both filtering and flagging, the rev attribute can only be used for flagging.

Note: For more information about the <revprop> element, see the DITA language specification.

The following attributes are supported in the <revprop> element:

Table 1. <revprop> attributes for redlining
Attribute Description
action Behavior of the flag; valid values are:
  • flag: Tells the preprocessor to include and flag (highlight) the modified content in the output.
  • passthrough: Tells the preprocessor to include the modified content in the output, without highlighting it.
val Type of action to flag; valid values are:
  • deltaxml-add: Text that was added since the last revision
  • deltaxml-delete: Text was was removed from the last revision
backcolor Background color of the modified text; enter a six-digit color hex code (for example, CC0000 for red). This attribute is ignored if action is not set to flag.
changebar Characteristics of the change bar; valid values are:
  • style:[none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset]
  • width:Xpt
  • placement:[start | end | left | right | inside | outside | alternate]
  • offset:Xpt
  • color:#FFFFFF
For example, the following code displays a solid, blue change bar that is one-point wide and offset from the text by five points:
changebar="style:solid;width:1pt;offset:5pt;color:#3399CC"
This attribute is ignored if action is not set to flag.

To change the default colors for the redline preprocessor:

  1. Open the %OutputGenDir%/data/resources/client/redline.ditaval file.
    Note: If this is the first time that you are modifying the redline.ditaval file, open the redline.ditaval.orig file and save it as redline.ditaval (remove the .orig suffix).
  2. Locate the val attribute for the behavior to configure.

    For example, to change how added text is highlighted, look for the val="deltaxml-add" attribute:

    <revprop action="flag" val="deltaxml-add" backcolor="#3399CC" changebar="style:solid;width:1pt;offset:5pt;color:#3399CC"/>
  3. Change the properties as desired.

    For example, to change the background and change bar colors to green and make the change bar a dotted line, configure the following:

    <revprop action="flag" val="deltaxml-add" backcolor="#76EE00" changebar="style:dotted;width:1pt;offset:5pt;color:#76EE00"/>
  4. Save and close the client Ditaval file (for example, redline-acme.ditaval).
  5. Restart the Output Generator service.