You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
2.3 KiB
145 lines
2.3 KiB
4 years ago
|
[#charref-attributes]
|
||
|
= Predefined Attributes for Character Replacements
|
||
|
|
||
|
[#charref-attributes-table]
|
||
|
// tag::table[]
|
||
|
.Predefined attributes for character replacements ^[1][2][3]^
|
||
|
[width="75%", cols="^4m,^3l,^3"]
|
||
|
|===
|
||
|
|Attribute name |Replacement text |Appearance
|
||
|
|
||
|
|blank
|
||
|
e|nothing
|
||
|
|{empty}
|
||
|
|
||
|
|empty
|
||
|
e|nothing
|
||
|
|{empty}
|
||
|
|
||
|
|sp
|
||
|
e|single space
|
||
|
|{sp}
|
||
|
|
||
|
|nbsp
|
||
|
| 
|
||
|
|{nbsp}
|
||
|
|
||
|
|zwsp^[4]^
|
||
|
|​
|
||
|
|{zwsp}
|
||
|
|
||
|
|wj^[5]^
|
||
|
|⁠
|
||
|
|{wj}
|
||
|
|
||
|
|apos
|
||
|
|'
|
||
|
|{apos}
|
||
|
|
||
|
|quot
|
||
|
|"
|
||
|
|{quot}
|
||
|
|
||
|
|lsquo
|
||
|
|‘
|
||
|
|{lsquo}
|
||
|
|
||
|
|rsquo
|
||
|
|’
|
||
|
|{rsquo}
|
||
|
|
||
|
|ldquo
|
||
|
|“
|
||
|
|{ldquo}
|
||
|
|
||
|
|rdquo
|
||
|
|”
|
||
|
|{rdquo}
|
||
|
|
||
|
|deg
|
||
|
|°
|
||
|
|{deg}
|
||
|
|
||
|
|plus
|
||
|
|+
|
||
|
|{plus}
|
||
|
|
||
|
|brvbar
|
||
|
|¦
|
||
|
|¦
|
||
|
|
||
|
|vbar
|
||
|
|\|
|
||
|
|{vbar}
|
||
|
|
||
|
|amp
|
||
|
|&
|
||
|
|&
|
||
|
|
||
|
|lt
|
||
|
|<
|
||
|
|<
|
||
|
|
||
|
|gt
|
||
|
|>
|
||
|
|>
|
||
|
|
||
|
|startsb
|
||
|
|[
|
||
|
|[
|
||
|
|
||
|
|endsb
|
||
|
|]
|
||
|
|]
|
||
|
|
||
|
|caret
|
||
|
|^
|
||
|
|^
|
||
|
|
||
|
|asterisk
|
||
|
|*
|
||
|
|*
|
||
|
|
||
|
|tilde
|
||
|
|~
|
||
|
|~
|
||
|
|
||
|
|backslash
|
||
|
|\
|
||
|
|\
|
||
|
|
||
|
|backtick
|
||
|
|`
|
||
|
|`
|
||
|
|
||
|
|two-colons
|
||
|
|::
|
||
|
|::
|
||
|
|
||
|
|two-semicolons
|
||
|
|;;
|
||
|
|;;
|
||
|
|
||
|
|cpp
|
||
|
|C++
|
||
|
|C++
|
||
|
|===
|
||
|
|
||
|
^[1]^ Some replacements are Unicode characters, whereas others are numeric character references (e.g., \").
|
||
|
These character references are used whenever the use of the Unicode character could interfere with the AsciiDoc syntax or confuse the renderer (i.e., the browser).
|
||
|
It's up to the converter to transform the reference into something the renderer understands (something both the man page and PDF converter handle).
|
||
|
|
||
|
^[2]^ Asciidoctor does not prevent you from reassigning predefined attributes.
|
||
|
However, it's best to treat them as read-only unless the output format requires the use of a different encoding scheme.
|
||
|
These attributes are an effective tool for decoupling content and presentation.
|
||
|
|
||
|
^[3]^ Asciidoctor allows you to use any of the named character references (aka named entities) defined in HTML (e.g., \€ resolves to €).
|
||
|
However, using named character references can cause problems when generating non-HTML output such as PDF because the lookup table needed to resolve these names may not be defined.
|
||
|
Our recommendation is avoid using named character references--with the exception of those defined in XML (i.e., lt, gt, amp, quot and apos).
|
||
|
Instead, use numeric character references (e.g., \€).
|
||
|
|
||
|
^[4]^ The Zero Width Space (ZWSP) is a code point in Unicode that shows where a long word can be split if necessary.
|
||
|
|
||
|
^[5]^ The word joiner (WJ) is a code point in Unicode that prevents a line break at its position.
|
||
|
// end::table[]
|