Parameter syntax:
first_character
Ssecond_character
[ Sthird_character
]?
Makes it easy and intuitive inserting special characters by typing the same ordinary character two or three times in a row.
The first time first_character
is typed, as expected, first_character
is inserted at caret position. Example: the first time, you type '-' (an ordinary dash), you insert '-'.
The second time first_character
is typed, previously inserted first_character
is replaced by second_character
. Example: the second time you type '-' , you insert a –
special character.
The third time first_character
is typed, previously inserted second_character
is replaced by third_character
. Example: the third time you type '-' , you insert a —
special character. This, of course, requires third_character
to have been specified, which is not mandatory.
This command is useless unless bound to the action of typing first_character
.
Characters may be specified literally, or by using their character entity name as defined in the DocBook DTD (whatever the schema to which the document is conforming), or by using the Unicode value of the character represented in hexadecimal (with a "0x
" prefix), octal (with a "0
" prefix) or decimal. See the examples below.
Examples (in the examples below, hexadecimal number 0x00ab
is used to represent the French opening guillemet "«
" and octal number 0273
is used to represent the French closing guillemet "»
"):
<binding> <charTyped char="-" /> <command name="insertCharSequence" parameter="- ndash mdash" /> </binding> <binding> <charTyped char="<" /> <command name="insertCharSequence" parameter="< 0x00ab" /> </binding> <binding> <charTyped char=">" /> <command name="insertCharSequence" parameter="> 0273" /> </binding>