This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path00001007040200.zettel
45 lines (34 loc) · 2.79 KB
/
00001007040200.zettel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
title: Zettelmarkup: Literal-like formatting
tags: #manual #zettelmarkup #zettelstore
syntax: zmk
role: manual
There are some reasons to mark text that should be rendered as uninterpreted:
* Mark text as literal, sometimes as part of a program.
* Mark text as input you give into a computer via a keyboard.
* Mark text as output from some computer, e.g. shown at the command line.
=== Literal text
Literal text somehow relates to [[verbatim blocks|00001007030500]]: their content should not be interpreted further, but may be rendered special.
It is specified by two grave accent characters (""''`''"", ''U+0060''), followed by the text, followed by again two grave accent characters, optionally followed by an [[attribute|00001007050000]] specification.
Similar to the verbatim block, the literal element allows also a modifier letter grave accent (""''ˋ''"", ''U+02CB'') as an alternative to the grave accent character[^On some devices, such as an iPhone / iPad, a grave accent character is harder to enter and is often confused with a modifier letter grave accent.].
However, all four characters must be the same.
The literal element supports the default attribute: when given, all spaces in the text are rendered in HTML as open box characters (""''␣''"", ''U+2423'').
The use of a generic attribute allwos to specify a (programming) language that controls syntax colouring when rendered in HTML.
If you want to specify a grave accent character in the text, either use modifier grave accent characters as delimiters for the element, or place a backslash character before the grave accent character you want to use inside the element.
If you want to enter a backslash character, you need to enter two of these.
Examples:
* ``\`\`abc def\`\``` is rendered in HTML as ::``abc def``::{=example}.
* ``\`\`abc def\`\`{-}`` is rendered in HTML as ::``abc def``{-}::{=example}.
* ``\`\`abc\\\`def\`\``` is rendered in HTML as ::``abc\`def``::{=example}.
* ``\`\`abc\\\\def\`\``` is rendered in HTML as ::``abc\\def``::{=example}.
=== Keyboard input
To mark text as input into a computer program, delimit your text with two plus sign characters (""''+''"", ''U+002B'') on each side.
Example:
* ``++STRG-C++`` renders in HTML as ::++STRG-C++::{=example}.
* ``++STRG C++{-}`` renders in HTML as ::++STRG C++{-}::{=example}.
Attributes can be specified, the default attribute has the same semantic as for literal text.
=== Computer output
To mark text as output from a computer program, delimit your text with two equal sign characters (""''=''"", ''U+003D'') on each side.
Examples:
* ``==The result is: 42==`` renders in HTML as ::==The result is: 42==::{=example}.
* ``==The result is: 42=={-}`` renders in HTML as ::==The result is: 42=={-}::{=example}.
Attributes can be specified, the default attribute has the same semantic as for literal text.