Liblouis User's and Programmer's Manual
2.4 Braille Indicator Opcodes ¶
Braille indicators are dot patterns which are inserted into the braille text to indicate such things as capitalization, italic type, computer braille, etc. The opcodes which define them are followed only by a dot pattern, which may be one or more cells.
modeletter attribute dots¶capsletter dotsThe dot pattern which indicates that a certain mode is entered and ends after a single character. A “mode” is a state in which dot patterns must be interpreted a certain way. For example, in uppercase mode dots ‘1’ is to be interpreted as a capital “A” and not a small “a”. In numeric mode dots ‘1’ is to be interpreted as a “1”. The attribute operand identifies the mode and corresponds with the name of the character class that determines when the mode must be entered and exited.
modeletteris also used to mark every character when a mode must last for several characters but when there is nobegmodedefinition, or when the sequence happens in the middle of a word andbegmodewordis defined but noendmodeword(seebegmode,begmodewordandendmodeword)capsletteris an alias formodeletter uppercase. The following two examples are equivalent:capsletter 6
modeletter uppercase 6
emphletter(seeemphletter) is the counterpart ofmodeletterfor indication of emphasis.begmodeword attribute dots¶begcapsword dotsThe dot pattern which indicates that a certain mode is entered for the following word or remainder of the current word. The mode is automatically terminated by the first character that is not a letter.
For uppercase mode, you can define a list of characters that can appear within a word in capitals without terminating the block. Do this by using the
capsmodecharsopcode (seecapsmodechars).Example:
begcapsword 6-6
begemphword(seebegemphword) is the counterpart ofbegmodewordfor indication of emphasis.endmodeword attribute dots¶endcapsword dotsThe dot pattern which terminates a mode within a word. It is used in cases where the block is not terminated automatically by a word boundary, a number or punctuation. A common case is when an uppercase block is followed directly by a lowercase letter.
For example:
endcapsword 6-3
endemphword(seeendemphword) is the counterpart ofendmodewordfor indication of emphasis.capsmodechars charactersNormally, any character other than a letter will automatically cancel the
begcapswordindicator. However, by using thecapsmodecharsopcode, you can specify a list of characters that are legal within a capitalized word. In some Braille codes, this might be the case for the hyphen character, ‘-’.Example:
capsmodechars -
begmode attribute dots¶begcaps dotsThe dot pattern which indicates that a mode is entered until it is terminated by a
endmodeindicator. It is used in some Braille codes to mark a whole sentence or several words as capital letters. The block can contain capital letters as well as non-alphabetic characters, punctuation, numbers etc.This is the most general opening mark, i.e. it can be used for opening at any position.
Example:
begcaps 6-6-6
begemph(seebegemph) is the counterpart ofbegmodefor indication of emphasis.endmode attribute dots¶endcaps dotsThe dot pattern which terminates a mode.
endcaps 6-3
endemph(seeendemph) is the counterpart ofendmodefor indication of emphasis.letsign dotsThis indicator is needed in Grade 2 to show that a single letter is not a contraction. It is also used when an abbreviation happens to be a sequence of letters that is the same as a contraction. For example:
letsign 56
noletsign letters-
The letters in the operand will not be preceded by a letter sign. More than one
noletsignopcode can be used. This is equivalent to a single entry containing all the letters. In addition, if a single letter, such as ‘a’ in English, is defined as aword(seeword) orlargesign(seelargesign), it will be treated as though it had also been specified in anoletsignentry. noletsignbefore charactersIf any of the characters precedes a single letter without a space a letter sign is not used. By default the characters apostrophe (‘'’) and period (‘.’) have this property. Use of a
noletsignbeforeentry cancels the defaults. If more than onenoletsignbeforeentry is used, the characters in all entries are combined.noletsignafter charactersIf any of the characters follows a single letter without a space a letter sign is not used. By default the characters apostrophe (‘'’) and period (‘.’) have this property. Use of a
noletsignafterentry cancels the defaults. If more than onenoletsignafterentry is used the characters in all entries are combined.nocontractsign dots-
The dots in this opcode are used to indicate a letter or a sequence of letters that are not a contraction, e.g. ‘CD’ (see
contraction). The opcode is similar to theletsignopcode (seeletsign).Note: This opcode was implemented in Liblouis specifically in order to support Unified English Braille (UEB). It may be used in any table, but may have unpredicted side-effects if used outside the intended context. Use with great care, and test thoroughly.
numsign dotsThe translator inserts this indicator before numbers made up of digits defined with the
litdigitopcode (seelitdigit) to show that they are a number and not letters or some other symbols. A number is terminated when a space, a letter or any other none-litdigitopcode (seelitdigit) character is encountered.You can define characters or strings to be part of a number by using the
midnumopcode (seemidnum), thenumericmodecharsopcode (seenumericmodechars) or themidendnumericmodecharsopcode (seemidendnumericmodechars).Example:
numsign 3456
nonumsign dotsUsually the end of a number doesn’t need to be indicated as the reader expects the number to end at a space character. However for mixed number word combinations you might want to have an indicator that lets the reader notice the end of the number.
For a word like “123abc” for example the reader expects an indicator between the number “123” and the characters “abc”. This can be achieved using the
nonumsign.Example:
nonumsign 56
numericnocontchars characters-
This opcode specifies the characters that require a
nonumsignopcode (seenonumsign) if they appear after a number with no intervening space, e.g. ‘1a’ or ‘2-B’.These characters will typically be the letters a-j, which usually constitute the literary digits (see
litdigitopcode (seelitdigit)). However, in some Braille codes, all letters fall in this category.Note: This opcode is case sensitive. So, if you need a
nonumsignopcode (seenonumsign) to also appear before the capital letters a-j, you should include these letters in the definition. This is especially relevant if you are also using thebegcapsandendcapsopcodes (seebegcapsandendcaps). In this case, you might otherwise end up having numbers immediately followed by capital letters with no indicator between.Note: This opcode was implemented in Liblouis specifically in order to support Unified English Braille (UEB). It may be used in any table, but may have unpredicted side-effects if used outside the intended context. Use with great care, and test thoroughly.
Example:
numericnocontchars abcdefghij
numericmodechars charactersmidendnumericmodechars characters-
Any of these characters can appear within a number without terminating the effect of the number sign (see
numsign). In other words, they don’t cancel numeric mode.The difference between the two opcodes is that
numericmodecharsopcode (seenumericmodechars) characters can appear anywhere in a number whereasmidendnumericmodecharsopcode (seemidendnumericmodechars) characters can appear only in the middle or at the end of a number. Likemidendnumericmodechars,numericmodecharscharacters keep numeric mode active, but in addition they activate numeric mode immediately when at least one digit follows, and the number sign will precede thenumericmodecharscharacter in this case.Note: This opcode was implemented in Liblouis specifically in order to support Unified English Braille (UEB). It may be used in any table, but may have unpredicted side-effects if used outside the intended context. Use with great care, and test thoroughly.
Example:
numericmodechars ., midendnumericmodechars -/