Bare strings in Aneamal `…`
Backticks group words, numbers or other symbols together. They are called bare string
markup because, unlike other string markup, they do not add any emphasis, styling or meaning to their grouped content.
Why would you mark something, if not to add features? The examples below demonstrate several use cases for bare strings.
How to
Mark both the start and end of a bare string with a backtick. Mind that the backtick which ends a bare string must be within the same block as the backtick that started it.
Examples
Link text and target text
A common use of bare strings is to serve as link text. Compare how the first link in the following example uses just the word before the arrow as link text whereas the second link applies to the whole bare string that precedes the arrow:
Aneamal homepage->https://aneamal.org/
`Aneamal homepage`->https://aneamal.org/
Aneamal homepage
Aneamal homepage
A bare string typically groups multiple words together, but it can also delimit a part of a word. The next example marks just the first two syllables Leeloo
of a longer name as target for links:
#`Leeloo`minaï Lekatariba-Lamina-Tchaï Ekbat de Sebat
Leeloominaï Lekatariba-Lamina-Tchaï Ekbat de Sebat
Markup that can not occur at the start of a line
Textual metadata can not be placed at the very start of a line, because it would be mistaken for a metadata declaration there. Likewise, a code string can not occur at the very start of a paragraph, since it would be mistaken for a code block. But you can wrap a code string in a bare string to evade this limitation:
`|whoami|` prints your username on many UNIX-like systems.
whoami prints your username on many UNIX-like systems.
The same trick works for accessing textual metadata at the start of a line:
`@version` is the current Aneamal version number.
31 is the current Aneamal version number.
Nested string markup
Most string markup should not be nested: making a word within italic text even more italic would be bad style and is not provided for in Aneamal. There are rare exceptions though. Consider the following sentence that contains two quotations:
He said: "She said: "It is sad!"."
He said: She said:
It is sad!.
The sentence was interpreted to contain two separate quotations: She said:
in its middle and .
at its end. That, however, was not the author’s intention. The intention was to have It is sad!
nested inside another quotation She said: ….
. The correct meaning can be enforced by wrapping the inner quoation in a bare string:
He said: "She said: `"It is sad!"`."
He said: She said:
It is sad!
.
Technically speaking, the ambiguity gets resolved by a higher precedence of bare string markup `…` in comparison to quoted strings "…" here. Bare strings also have a higher precedence than the emphasis marks *…*, ~…~, _…_ and bracketed strings (…) and […].
Link address
The end of an address in a link is usually identified correctly automatically, but that is not always possible. You can wrap addresses in backticks to avoid ambiguities. The following example has a link within the word tyrannosaurus. The backticks around the address separate the address from the second half of the word, saurus.
Tyranno->`https://en.wiktionary.org/wiki/tyrannus`saurus rex
Tyrannosaurus rex
For developers
Bare strings do not translate to any HTML tags when an Aneamal file is converted to a webpage.