Sitecore PXM 8.0: Add Vulgar Fraction Support


Sitecore Print Experience Manager (PXM) is great; you can create dazzling printable documents that reuse your existing Sitecore content. You can enable your designers to add a personal touch to each document, or configure automation to allow document creation on the fly.

One of the primary components of PXM is its InDesign Connector plugin (IDC). It facilitates communication between Sitecore PXM and InDesign, allowing a designer to:

  • add Sitecore content to an existing InDesign document
  • create and update PXM Projects, which are a Sitecore representation of an InDesign document
  • manipulate master documents, which are essentially InDesign templates
  • save content changes directly into Sitecore items

“Vulgar” Fractions

Vulgar fractions are simply fractions that are “non-standard.” Examples of standard fractions are below. These are the ones Sitecore PXM supports out-of-the-box:

  • ¼ – ¼
  • ½ – ½
  • ¾ – ¾

There are a whole host of others, however, that can be added. Some include:

  • ⅛ – ⅛
  • ⅗ – ⅗
  • ⅚ – ⅚

How To Add Support for the Vulgar Fractions to PXM

  1. Open Website\Print Studio\Data\special.xml – this is the file that is used to map an HTML code (e.g. ⅛) to the corresponding UTF-8 character value (e.g. 8539).
  2. If you want to keep your file (roughly) in order by index, scroll down to the entry with index=”8501″.
  3. Insert the following elements:
    [code language="xml"]
     <codeposition index="8528" entity="frac17"/>
     <codeposition index="8529" entity="frac19"/>
     <codeposition index="8530" entity="frac110"/>
     <codeposition index="8531" entity="frac13"/>
     <codeposition index="8532" entity="frac23"/>
     <codeposition index="8533" entity="frac15"/>
     <codeposition index="8534" entity="frac25"/>
     <codeposition index="8535" entity="frac35"/>
     <codeposition index="8536" entity="frac45"/>
     <codeposition index="8537" entity="frac16"/>
     <codeposition index="8538" entity="frac56"/>
     <codeposition index="8539" entity="frac18"/>
     <codeposition index="8540" entity="frac38"/>
     <codeposition index="8541" entity="frac58"/>
     <codeposition index="8542" entity="frac78"/>
  4. Recycle the Sitecore PXM AppPool.


If you’re curious, this configuration is used by the Sitecore.PrintStudio.PublishingEngine.Text.Parsers.Html.HtmlEntityHelper to map between the HTML code  (e.g. &frac18;) to the corresponding UTF-8 character value (e.g. 8539).

Leave a Reply

Powered by

Up ↑

%d bloggers like this: