Text Formatting

Using tags to apply bold, italic, and colour etc to sections of text.

Take a a required layout output text, such as this (where the line is a single text element, and needs different formatting for parts, bold in this case.)

The items will be available from 01.03.2021:

Firstly the whole line needs to be wrapped in <ft></ft> tags.

Secondly, the date needs to be made bold, using <x=B><x=b> tags to switch bold on and off.

Thirdly, non bold sections still need to be defined as a text item (otherwise they will not show) using the <t></t> tags

So the raw line with formatting control tags would be

<ft><t>The items will be available from</t><t x=”B”>01.03.2021]</t><t x=”b”>:</t></ft>

This line could have the date substituted for a data or server variable, and could either be created in a script, or read in “as is” from an external text file or db. *if added in script the included ” would need to be substituted for \[.

Key things to note. Any text outside of the <ft></ft> tags in this element will make the whole line literal text and no formatting will take place, and format tags are likely to be output instead of converted.

Also all of the below are legitimate, and will not course an error;

<ft></ft>  –  just empty on layout

<ft><t>test</t></ft> should be fine and put test on the layout

<ft>test</ft> – would NOT put test on the layout as it is not within a text tag, so nothing would be put on the layout in this case

Gotcha’s

Anything in the text element after the final </ft> such as the colon below

<ft><t>The items will be available from</t><t x=”B”>01.03.2021]</t><t x=”b”></t></ft>:

will cause an error as the </ft> is not the last item in the text string.

Whilst an compound line like below, with the start of the text outside the <ft></ft> tags will cause the line to be interpreted as simple text, and the output displayed on the final document will be the literal text.

The items will be available from<ft><t x=”B”>01.03.2021]</t><t x=”b”>:</t></ft>

Much more help can be found at