This container holds notes that describe ways to highlight the text of a note. Any note can opt in to highlighting by setting the $SyntaxHighlighting value. For example, setting $SyntaxHighlighting to
markdown would tell Tinderbox to use the highlight methods found in
/Hints/Highlighters/markdown. Adding the built-in Hints container, generates two specimen highlighter notes in the
- Markdown. This is intended for users of Markdown.
- Syntax. A specimen file to show syntax styling in action, rather than represent any particular syntax.
The highlighting methods are a list of regular expressions and formats. The first line of a highlighting rule must not be indented; additional lines for each rule must be indented. Empty lines may be added between rules for clarity. For example:
would locate any of these words and colour them red.
A highlighter note may contain multiple style declarations reflecting the fact that any given note can only apply a single highlighter.
Highlighters set the base colour of notes to their $TextColor rather than to "black" (#000000). NOTE: this styling sets the RTF layer styling of text. Not all styling can be exported via (HTML) Export and deleting a rule does not not 'un-set' the style previously set by that rule.
Comments are preceded by // and continue for the rest of the line, thus:
color: red // perhaps dark red is better?
Highlighters can use any of the following rules:
- color: the text colour, a named colour or hex code value, e.g.
- background: the text background colour (highlight), a named colour or hex code value, e.g.
- size: text size in points, e.g.
- line-spacing: line-spacing as a multiple of the normal line spacing, e.g.
- indent: indent the paragraph in points, e.g.
- first-indent: indent the first line of a paragraph in points, e.g.
- bold: text bolded as a yes/no boolean, e.g.
- italic: text italicised as a yes/no boolean, e.g.
- strike: text struck-through as a yes/no boolean, e.g.
- underline: text underlined as a yes/no boolean, e.g.
- wildcards: yes/no boolean instructs the pattern to ignore regular expression meta-characters such as "*" and "+", e.g.
- case-sensitive: yes/no boolean instructs the pattern to regard upper- and lower-case letters as equivalent, e.g.
Highlighters allow you to set line-spacing as a multiple of the normal line spacing.
Highlighters allow you to set the indent of the paragraph, as well as its first-indent — the indentation of the paragraph's first line.