Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/26/d173627097/htdocs/e-node/docs/PLP/inc/parser/handler.php on line 1552

Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d173627097/htdocs/e-node/docs/PLP/inc/parser/handler.php:1552) in /homepages/26/d173627097/htdocs/e-node/docs/PLP/inc/actions.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /homepages/26/d173627097/htdocs/e-node/docs/PLP/inc/parser/handler.php:1552) in /homepages/26/d173627097/htdocs/e-node/docs/PLP/lib/tpl/dokuwiki/main.php on line 12
text_style_tags [PrintList Pro version 6 documentation]

User Tools

Site Tools


text_style_tags

Text Style Tags

If the attributed option has been set in PL_SetFormat, special tags can be used in any text contained in a PrintList Pro area to print multi-styled characters.

These tags work just like HTML tags: <tag>styled text</tag>.

Style Tag
Bold<b>
Italic<i>
Underline<u> or <ins>
Strike-through<del>
Set font size to # points<s #>
Increase font size by # quarters (1/4) of current size<s +#>
Decrease font size by # quarters (1/4) of current size<s -#>
Set font by name<f “font name”>
(needs to be quoted if the name contains more than one word)
Set color (any format can be used, e.g. <c 0xFFFF0000> <c 1.0,0,0> <c P123> <c dark orange>)<c color name>

4D internal format for styled text is stored as <SPAN STYLE=“style attributes”> where the style attributes used by PrintList Pro are:

  • font-family
  • font-size
  • font-weight (bold/normal)
  • font-style (italic/normal)
  • text-decoration (underline / line-through/none)
  • color (#RRGGBB)
  • background-color (#RRGGBB)

It is also possible to set the format as attributed, and specify the style attributes using the PL_SetFormat command.

Example for an longint column:

  C_TEXT($format)
  $format:="<c blue>+#####</c>;<i><c red>-#####</c></i>;<s+1><c green><b>ZERO</b></c></s>"
  PL_SetFormat ($area;1;$column;0;0;1;1;1;0)
  // Right-aligned (it is a number; default of zero will use 2), auto-sized height (because ZERO is bigger),
  // attributed, with "compatible" line spacing and default vertical alignment

With the above settings:

  • Positive numbers will be printed in blue roman characters with a plus sign.
  • Negative numbers will be printed in red italic characters with a minus sign.
  • Zeros will be printed in green bold, font size increased by 25%, with the text “ZERO”.
  • Here is the result:

Note: if the number format is too “small” to hold the number, 4D (and PrintList Pro) will display it as “<<<<<<<<<<<<<<<<<<”, which will interfere with the opening tag character “<” if the column is attributed (multi-styled). In the example above (using “## ###” as a number format), this will be the case for all numbers exceeding 99,999. Make sure that the format used will not cause the number to overflow, lest unexpected results might ensue.

text_style_tags.txt · Last modified: 2017/05/22 14:00 by plp_admin