This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

Highlighters

Highlighters

/Hints/Highlighters

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 /Hints/Highlighters container:

  • 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:

pattern:parent|grandparent|nextSibling|previousSibling

color: red

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:

pattern:parent

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. color: green or color: #00ff00
  • background: the text background colour (highlight), a named colour or hex code value, e.g. background: #ffff00 or background: yellow
  • size: text size in points, e.g. size: 14
  • line-spacing: line-spacing as a multiple of the normal line spacing, e.g. line-spacing 2
  • indent: indent the paragraph in points, e.g. indent: 32
  • first-indent: indent the first line of a paragraph in points, e.g. first-indent: 16
  • bold: text bolded as a yes/no boolean, e.g. bold: yes
  • italic: text italicised as a yes/no boolean, e.g. italic: yes
  • strike: text struck-through as a yes/no boolean, e.g. strike: yes
  • underline: text underlined as a yes/no boolean, e.g. underline: yes
  • wildcards: yes/no boolean instructs the pattern to ignore regular expression meta-characters such as "*" and "+", e.g. wildcards: no
  • case-sensitive: yes/no boolean instructs the pattern to regard upper- and lower-case letters as equivalent, e.g. case-sensitive: no

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.