User Tools

Site Tools


pergamonmystic:linkedhelp:report_formatting_macros

Mystic Help

Report Formatting Codes

What are Report Formatting Codes?

Mystic has several reports which produce content directly to a PDF document due to the potentially high numbers or readers or items involved, and the high numbers of pages which may be produced.

These reports are typical of a Warning Letters report.

Within these types of report, it is possible to send a large amount of text with embedded Mystic information to the PDF in the same way as a word-processed letter which has been mail-merged.

In order to correctly format this text, and place Mystic data (e.g. a reader name in the correct place), Report Formatting Codes (often called 'macros') are available.

Note that typically, the main focus of the report is added to the PDF by Mystic automatically and does not need the use of macros - e.g. In a Warning Letters report, use the reader macros to embeds the reader details in the cover text as required, but the book listing of items overdue will be added automatically.

How to use Macros

Macros are embedded in the text by placing them in the most appropriate location and surrounded by left and right square braces (i.e. [ and ]).

Some Macros are complete in themselves (e.g. embedding a reader name), but others are used to turn on and off a feature (e.g. switching to BOLD). The 'off' macro should be placed where required but prefixed by a forward slash ( / ) within the square-baskets.

For example:

  • [HID] - embeds a reader barcode number
  • [b]hello![/b] - embeds the word 'hello!' in bold text.

Formatting Macros

The following formatting macros are available:

  • [b]…[/b] - Bold text
  • [i]…[/i] - Italic text
  • [u]…[/u] - Underlined text
  • [h:#]…[/h] - Header text (Level 1: 2.5x font size, 2: 2x size, 3: 1.5x size)
  • [bq]…[bq] - Blockquoted text
  • [s:#] - Font size
  • [f:#] - Font name (can be courier_new, arial, times new_roman, symbol, zapfdingbats or wingdings)

Reader Macros

The following reader macros are available:

  • [HID] - The current reader's barcode
  • [GROUP] - The current reader's group (e.g. class) name
  • [NAME-NATURAL] - The current reader's natural form name (e.g. first name then surname)
  • [NAME-FIRST] - The current reader's first name only
  • [NAME-LAST] - The current reader's surname only
  • [ADDRESS] - The recorded address of the reader¹
  • [EMAIL] - The recorded email address of the reader¹
  • [FAX] - The recorded fax address of the reader¹
  • [MOBILE] - The recorded mobile telephone number of the reader¹
  • [NOTES] - Any notes attached to the reader's contact card¹
  • [POSTCODE] - The recorded postcode / zip code of the reader¹
  • [TELEPHONE] - The recorded telephone number of the reader¹
  • [VOIP] - The recorded VoIP number / address of the reader (e.g. Skype)¹

¹ These macros required the Contacts facility to be turned on.

Example Usage

The following text is an example of formatting codes used in a Warning Letter context:

 [f:times_new_roman][s:18][b]Class [GROUP] - [NAME-NATURAL][/b] 
 
 [s:14]Dear [NAME-FIRST], 
 
 You currently have the following item/s on loan and they are overdue. 
 
 Please bring these items back to the library so that other children can borrow them too.
 
 with best wishes,
 
 Library.
 

Which produces the following output:

—-


Mystic Linked Help Index
Pergamon Wiki Home

pergamonmystic/linkedhelp/report_formatting_macros.txt · Last modified: 2021/07/31 08:32 by admin