5.4 The Basic Set of Fields ↑
5.4.1 Title
The word title can be used as both a label and a type.
A Collection must have one and only one field of type title, and it should be the first field within a Collection.
A Title consists of a few words telling you what the Note is about.
Each Note in a Collection must have a unique Title (unless you’ve changed the Note ID Configuration from the default); however Notenik will automatically append a number, or increment one if already present, in order to allow a Note to be added that would otherwise be a duplicate.
When editing, the title field will appear as a single line of editable text.
When displayed, the title field will often be displayed in a bold and/or larger font, and often without being accompanied by its label.
When used as a sort field, title values will be sorted by their lowest-common-denominator representation (ignoring case, spacing and punctuation).
The title field (or other Note Identifiers) serves as a Note’s unique identifier within its Collection, in three different ways:
-
In its original form, as entered by the user, when presented to the user;
-
In its lowest common denominator form (as described above), when used internally by Notenik;
-
In a lightly transformed form, when creating a file name for the note, to be used on disk.
When a title is used within an HTML document or fragment, Notenik will apply Markdown parsing to the field. This is primarily useful in applying styling within a Title field.
Also see the Long Title field, for cases in which longer titles are desired at the top of Streamline Reading displays.
Styling
Note titles may contain some limited HTML elements, or their Markdown equivalents, in order to apply some limited styling. The following elements are supported within the title field.
| Styling | Markdown allowed | HTML allowed |
|---|---|---|
| emphasis (appears as italics) | *words* or _words_ |
<em>words</em> |
| underscores within a word (e.g. SP_Type) |
SP_Type |
n/a |
| cite (appears as italics) | n/a |
<cite>Title</cite> |
| strong (appears as bold) | **words** or __words__ |
<strong>words</strong> |
code |
`code` | not supported |
|
line break |
not supported |
<br /> |
| “Smart Quotes” |
" – Straight double quotes |
n/a |
Sensible support for these elements requires several interesting considerations.
- When presented in web form, as on the Display tab, any embedded Markdown must be converted to HTML ;
- HTML must be preserved when the field appears in a web context;
- Original formatting codes (Markdown and/or HTML) must be preserved in the raw field value;
- When presented in a list or an outline or a table, the title should be shown without formatting elements of any kind (neither original codes nor any generated ones);
- When being used to generate a unique Note ID, or a sort key, or a filename, all formatting codes should be discarded.
When using a Title field as a variable in a Merge Template, consider use of the Title Variant - ^T Variable Modifier, especially if any of your title values contain any span elements for styling (emphasis, etc.).