Literary versus Math Context in the Nemeth Code
This page is a summary of a lot of information scattered throughout the Nemeth Code book and may be somewhat difficult to follow without some of the background information on other pages. It is intended primarily as a Reference page for the pages on the use of the English-letter, Numeric, and Punctuation Indicators.
When I first started trying to understand the Nemeth code I got the impression that I could apply the rules if I could distinguish for each cell whether it was literary context or math context. For example, many symbols, including numbers, variables, and mathematical symbols, are always mathematical. However, the situation isn't quite that simple: some symbols change context depending on their surroundings and some are even ignored in determining context in certain situations.
Also, the rules are somewhat easier to state if one adds a third, special context involving unembellished grouping symbols.
The nature of a space affects the use of the LI according to Rule IV, Section 27. This distinction is not made explicit in the Nemeth Reference but it seems to me a natural way of explaining the rules.
In some cases the Nemeth rules require the deletion of spaces used in print and vice versa. The following rules refer to spaces in braille, not print.
- The required space between a shape that is followed by a plural, possessive, or ordinal ending and an optional following symbol that labels or identifies the shape is a literary space and is an exception to the general rule that such an ending does not terminate a mathematical expression. [IV 27b]
- The required space between a function name (spelled out or not) and an optional following argument is a mathematical space [27a] as is the required space between a shape symbol and an optional following symbol that labels the shape [27b] with the exception of the situation described in the previous rule.
- Spaces embedded in mathematical expressions or anywhere within mathematical context are mathematical spaces. This includes, but is not limited to, the required spaces preceding and following any of the Rule XX comparators [27-f], the required space following a mathematical comma in an enclosed list [27-d], the space between items in matrices and determinants [27-c], and spaces used in aligned sets of equations and other "pretty-printing" situations. [27-f]
- The required space preceding [27-b-3] or following [26-b-3] a sign of omission is a mathematical space. (Shapes used as signs of omission follow the semantics for signs of omission and not shapes.)
- If a linebreak replaces a space, it has the same context as the corresponding space
- Spaces are assumed to be literary spaces if not explicitly indicated otherwise according to these rules.
Literary context affects the use of the LI and the non-use of the PI. Literary context preceding certain punctuation marks can also necessitate the use of an intervening NI if a number would otherwise follow the punctuation. The purpose of the LI is to ensure that a letter or letter sequence used as a mathematical symbol is not misread as a braille single-letter contraction or short form word. An LI is thus only needed where a word would be appropriate, i.e. both preceded and followed by literary context.
The following situations are literary context:
- sequences of one or more letters and/or literary braille letter signs meant as either words, single-letter or short-form word contractions, abbreviations, or acronyms as opposed to mathematical symbols
- items in rule 1. whether in upper, lower, or mixed case and whether set in regular or non-regular type
- items in rule 1. even when typeset above or below the baseline are literary context at that level (but a change in level defaults to math context)[38iv]
- a literary space or a line break functioning as a literary space [38i]
- a literary (upper-cell) numeral or numeric symbol as would be on a title page [38ii]
- immediately following a spelled-out function name preceded by literary context and not followed by an argument [38v]
- a literary comma (dot 2)
- the open (left) single (inner) quotation mark, (dot 6) followed by (dots 236)
- an apostrophe (dot 3) not preceded by a PI
- any of the following lower-cell literary punctuation marks whether or not it has been preceded by a PI [38vii]
- a semi-colon (dots 23)
- a colon (dots 25)
- a literary period, (dots 256), which is not the same cell used for a decimal point
- a literary exclamation mark, (dots 235), which is not the same cell used for a factorial sign,
- question mark, (dots 236), which is not the same cell used for an omission symbol
- an open double (left outer) quotation mark, (dots 236)
- a close double (right outer) quotation mark, (dots 356)
- the close (right) single (inner) quotation mark, (dots 256) followed by (dot 3)
- the effect of a hyphen, short dash, long dash, or ellipsis is as follows
- with respect to the need for an LI, the context following a hyphen or short dash defaults to literary [a symbol cannot be in direct contact with a preceding long dash, or ellipsis] [42]
- with respect to the need for a PI or an NI, the context following a hyphen, short dash, long dash, or ellipsis is literary if and only if its preceding context is also literary according to the previous rules [38iii]
- the effect of an unembellished grouping symbol is as follows
- if the grouping symbol is an enclosing symbol in either a simple label or an enclosed list, then the context between the enclosing symbols is not literary
- with the respect to the need for an LI:
- if a symbol is in contact with only its preceding unembellished grouping sign, its preceding context is considered to be literary if it would be literary were the grouping sign were not present
- if a symbol is in contact with only its following unembellished grouping sign, its following context is considered to be literary if it would be literary were the grouping sign were not present
- in situations not explicitly mentioned, an unembellished grouping symbol is a mathematical symbol and the rules for math context apply
Nemeth braille doesn't use the lower-cell (dots 2356) parentheses of literary braille but has its own grouping symbols including left and right parentheses, left and right brackets, etc. as defined in Rule XVIII. These symbols can be embellished with subscripts, superscripts, primes and even modifiers. An embellished grouping symbol together with its embellishment creates mathematical context just as any any other mathematical expression and is not a special case. However unembellished grouping symbols give rise to several special situations.
Mathematics often uses one of a pair of grouping symbols without the other, uses non-matching grouping symbols, or uses a left (open) grouping symbol where one might expect a right (close) one and vice versa. Nemeth wisely limits any rules that distinguishes between left and right grouping symbols to the first two constructs below and there are no new rules—like the use of the same cell for the question mark and open double quote mark carried over from literary braille—that rely on only one or the other form being allowed in certain contexts.
Nemeth takes a generally syntactical approach to mathematics and thus includes symbols such as the vertical bars used to indicate absolute value as grouping symbols.
- A symbolic name in contact with both its opening and closing unembellished grouping signs—even if they are not of the same type—creates a special construct here called a simple label, e.g., (a) or [iii]. This construct is commonly used to indicate the argument of a function of one variable, e.g., f(x).
- An LI is not used with a symbol in a simple label
- An NI is not used with a number in a simple label although this is not a special case
- A PI is not allowed by definition
- Two or more items separated by dot 6 mathematical commas (with their required following spaces) and enclosed within a pair of grouping signs form a construct known as an enclosed list if all the items meet certain restrictions. This construct is commonly used to indicate the arguments of a function of two or more variables, e.g., f(x, y).
- An LI is not used with a symbol in an enclosed list although an ELI will be needed for letters set in special type
- An NI is not used with a number in an enclosed list although a TNI will be needed for numerals or numbers set in special type
- A PI is not allowed by construction since none of the literary lower-cell punctuation marks are allowed.
- An intervening PI is required if an apostrophe or any literary punctuation mark that uses one of the six lower-cell signs would otherwise be in contact with a preceding unembellished (or embellished) grouping sign
Proper identification of mathematical context is necessary to the proper use certain punctuation marks and also of the Punctuation Indicator.
When a comma is used in a mathematical context, it must be transcribed as either a mathematical comma or contracted comma as appropriate.
A PI must precede any of the six cells also used as Nemeth numerals when they are used as punctuation marks immediately following otherwise mathematical context. An intervening PI is also required before the apostrophe of a possessive ending following a mathematical expression but the context remains mathematical following the s.
These items all create or maintain mathematical context:
- any Nemeth indicator [37i] (such as a fraction, superscript or baseline indicator)
- any Nemeth numeral or numeric symbol whether or not preceded by a Numeric indicator [37ii]
- any Roman numeral whether or not preceded by a Letter Indicator [37iii]
- a long dash or ellipsis preceded by mathematical context or when the nature of the context is in doubt [37iv] but see [42] for spaces required with a long dash or ellipsis
- a grouping symbol is normally considered as a mathematical symbol creating mathematical context with the two exceptions previously stated with respect to a symbol potentially requiring an LI and in contact with only one unembellished grouping sign [37xiv]
- any reference symbol [37v]
- the general omission symbol [37vi]
- a single or multiple-letter symbolic name whether or not the name is preceded by a Letter Indicator [37vii, 37viii]
- following an ordinal, plural, or possessive endings which are joined to mathematical items even though a PI necessary precedes the apostrophe in the case of a possessive ending [37ix]
- if a non-math expression, such as a word, has been typeset above or below the baseline [37x] the return to the baseline defaults to mathematical context and would, for example, require a PI (but not a thus redundant baseline indicator) if an immediately following literary punctuation mark is intended to be on the baseline.
- a modified expression [37xi]
- mathematical symbols: the radical symbol [37xii], any shape symbol, operator, or comparator [37xiii], any abbreviated function name whether or not followed by an argument and any spelled-out function name followed by an argument [37xv] or any of the miscellaneous symbols of RULE XXII [37xvi]
- the contracted subscript-superscript comma
- with respect to the need for either a PI or an NI, the context following a hyphen or short dash preserves any preceding mathematical context according to the other rules in this list [37xvii] but with respect to the need for an LI, it does not [26b(10)]
- the mathematical comma, which must be followed by a space, preserves but does not create mathematical context
There can be ambiguities in poorly typeset or poorly marked-up technical material that make it impossible to be sure that the corresponding Nemeth code is correct in cases where Nemeth would transcribe the various possibilities differently. Some of these ambiguities could be resolved by humans. One possibility for machine transcription is to produce a list of ambiguities to be resolved by human intervention. Technical material set by modern electronic typesetting methods should be less likely to have ambiguities than older material.
Last updated March 1, 2002.
Home Main Nemeth Page