Please enable JavaScript to view this site.

 

Navigation: Appendices > Q++Studio > Debugging > Logs > Diagnostic Logs

SARAs Instructions - qpp_TempSaras_lstSpecsAndRanges.txt

Scroll Prev Up Next More

qpp_TempSaras_lstSpecsAndRanges.txt lists prepared SARA search-and-replace instructions together with their page specifications prepared for diary generation.

 

It provides a readable view of the commands sent for execution, including native formatting specifiers when present.

 

SARAs can combine literal or regular-expression searches with formatting criteria on the find side and text or formatting changes on the replacement side. Their formatting strings share syntax with the FormatText macro function, but the SARA also determines which text qualifies for a match. See Editing Individual Saras for the complete settings.

 

This file establishes what was prepared. For recorded results, use LogGen1.CSV and qpplog.txt. A command in the list does not prove that it matched anything.

 

Layout, Order, and Page Specifications

 

Page Specs  Sara Instructions
2,3 {|Lundi de Pentecôte}={|L. de Pentecôte}

 

Page Specs is the prepared page selection; Sara Instructions is the command. Examples include a single page (24), a comma-separated list (26,27), and an inclusive range (16-19). Match this selection to the pages used by the execution trace. Do not silently substitute source-template pages or printed page labels.

 

Keep commands in their original order. In the complex-run example, the plugin loads 23 numbered SARA records, corresponding to the 23 logical commands in this file. Earlier commands may change the text or formatting seen by later commands. In this run, PCODELN in a SARA-hit CSV row corresponds to that command number; confirm the command text when joining the files.

 

The heading suggests two columns, but the complex sample is not a conventional escaped TSV file: command 10 contains a raw carriage return and tab in its replacement. One physical line is therefore not necessarily one command, and later tabs are not necessarily column separators. Preserve the bytes, use the first separating tab for the page specification, and identify complete commands before numbering them.

 

Read the Find Side Separately from the Replacement Side

 

{find options and formatting|search text}={replacement formatting|replacement text}

 

This schematic describes the commands shown here; the words are placeholders. In the simple example, both formatting sections are empty, and the instruction replaces “Lundi de Pentecôte” with “L. de Pentecôte”. In other commands, the left side can restrict matching by font as well as by text.

 

Example fragment

Meaning in these commands

rx

The find side uses a regular expression.

f Laenderkennzeichen2026 Regular

On the find side, a font criterion; on the replacement side, a requested font. Its position matters.

{|END}={|}

Find literal END and replace it with empty text.

$0

On a regular-expression replacement side, reinsert the entire matched text. Formatting can change while the text stays the same.

$1, $2, $3

Reinsert the corresponding captured group from the match.

s 4 / bs -0.5

Replacement formatting: font size 4 points / baseline shift −0.5 points.

 

An empty formatting section does not mean that every other SARA setting is at its default. Page restrictions, processing phase, and options held in the SARA definition also matter. Consult the definition when the prepared command does not expose a needed setting.

 

Example: Find by Font, Change the Size

 

25  {rx,f Laenderkennzeichen2026 Regular|( )}={s 4|$0}

 

Command 18 searches page 25 for a literal space matching the named font criterion. The parentheses capture that space. The replacement keeps the match through $0 and requests a 4-point size. Looking only for spaces in the output ignores the find-font requirement.

 

The same sample includes command 23 on pages 28–45, with a find-font criterion for AstrologyP01 and a replacement baseline shift of −0.5 points. Neither command has a recorded hit. When loading these commands, qpplog.txt reports the respective find font as FONT NOT AVAILABLE. That makes font availability a concrete check before changing the expression; it does not establish every reason for the non-match.

 

Example: Lookbehind and a Formatting-Only Hit

 

16-19   {rx|(?<=Kerstmis )(\(B\))}={COLOR(C=0 M=100 Y=0 K=0)|$0}

 

Command 6 matches the literal text “(B)” when it follows “Kerstmis ”. The lookbehind checks the preceding text without including it in the match. $0 retains “(B)” and the replacement applies the specified color. The complex-run CSV records three hits, described as “changed format only of «(B)»”. This does not color the word Kerstmis through this command.

 

Example: Capture Groups and Control Characters

 

24  {rx|(.{1,}\d{4})(\s)(\s)}={|$1$3}

 

Command 14 keeps captured groups 1 and 3 and omits group 2. One recorded result, at page 24/object 5, is:

 

replaced «Oktober 2028&c&t» with «Oktober 2028&t»

 

Here the hits log displays the return as &c and the tab as &t. The recorded replacement removes the return and retains the tab. Keep this display notation separate from the raw control characters in the instruction export and from regular-expression syntax such as \s.

 

Command 10 provides another example: it replaces a matched date-and-whitespace sequence between selected month names with a return followed by a tab. The TXT instruction contains those two raw characters, while CSV hit NO=309 displays the replacement as &c&t. A text viewer can make these look like different instructions.

 

Native Formatting and Regular-Expression Syntax

 

Use the references below for attribute spelling, units, supported values, and DTP-specific restrictions. The export is not a replacement for those specifications.

 

Reference

What to look up

Native Text Formatting

Text/font/color and other character attributes.

Native Paragraph Formatting

Paragraph attributes, indents, paragraph rules, and tab settings.

Native Textbox Formatting

Frame, background, positioning, picture, deletion, and applicable style commands.

Regular Expressions

Search patterns, captures, and the documented expression syntax.

 

For example, command 3 retains a matched month name with $0 while setting PRULEABOVE 1, PRABOVEREL 0, PRABOVEPOS 4.0, PRABOVEWIDTH 0.25, and PRABOVECOLOR(Black). Read these as a paragraph rule above with a 4.0 mm position under the specified relative-position setting and a 0.25-point width. The numbers do not all use the same unit.

 

Do not parse a command by splitting at every comma or vertical bar. A comma can occur inside an attribute value such as TABS(...); a vertical bar can separate formatting from text or be part of the expression. In command 23, [A|S|D|F|G|H|a|s|d|f|g|h] is a character class, whose bars are literal members, unlike the alternation in (April 2028|Augustus 2028). Preserve the supplied pattern when reporting it.

 

Encoding and Exact-Character Comparisons

 

The SARA instruction export is written in UTF-8. Use a Unicode-aware text viewer or parser and preserve the exact characters, spaces, tabs, returns, and regular-expression backslashes when comparing the prepared command with execution evidence. A control character may appear as a visible notation in a log and as a raw character in the instruction file, as shown above.

 

Special spaces and other non-printing characters can have distinct layout behavior. Use Special Character Markers — InDesign to interpret the documented markers, including:

 

Marker

Meaning

&c

Hard return

&t

Tabulation

&!s

Nonbreaking space

&$2003

Em space

&$200B

Zero space break

 

Distinguish a marker written as text from the character it represents and from the notation used by a diagnostic log. Preserve special spaces when comparing matches; replacing them with ordinary spaces can change matching or layout. For an internal or private-use code point not listed in the reference, establish its application-specific mapping before assigning a meaning.

 

Trace a Command through Both Processing Passes

 

In the simple run, qpplog.txt loads the command for pages 2,3 and records the replacement of “Lundi de Pentecôte” in object 21 on page 2 during the before-BOXFIT pass. In the after-BOXFIT pass it skips the same command because it belongs to the other pass. “No Saras specified” in that section does not contradict the earlier hit. The complex run likewise records before-BOXFIT processing and after-BOXFIT skips.

 

Guidance for an AI Assistant

 

For one disputed command, report its ordinal, page specification, full find criteria, replacement, phase, hit count, and relevant font/resource messages. Check the expected text at the moment that command runs, including changes made by earlier SARAs. A zero count means no hit was recorded in the supplied evidence, not that the expression is necessarily invalid.

 

Preserve spaces, code points, capture references, and regular-expression backslashes. Do not apply the temporary-table export’s backslash-decoding rules to this file. If testing outside Q++Studio, establish expression-engine compatibility before treating a different engine’s result as evidence. See the combined messages/hits topic for a worked command-to-hit comparison.

 


Topic 189910, last updated on 22-Oct-2026