Typographical conventions in mathematical formulae
Typographical conventions in mathematical formulae provide uniformity across mathematical texts and help the readers of those texts to grasp new concepts quickly. Mathematical notation includes letters from various alphabets, as well as special mathematical symbols. Letters in various fonts often have specific, fixed meanings in particular areas of mathematics. A mathematical article or a theorem typically starts from the definitions of the introduced symbols, such as: "Let G = be a graph with the vertex set V and edge set E...". Theoretically it is admissible to write "Let X = be a graph with the vertex set a and edge set q..."; however, this would decrease readability, since the reader has to consciously memorize these unusual notations in a limited context. Usage of subscripts and superscripts is also an important convention. In the early days of computers with limited graphical capabilities for text, subscripts and superscripts were represented with the help of additional notation. In particular, n2 could be written as n^2 or n**2 and n2 could be written as n_2.
International recommendations
Various international authorities, including IUPAC, NIST and ISO have produced similar recommendations with regard to typesetting variables and other mathematical symbols. In general, anything that represents a variable should be set in italic type, and everything else should be set in roman type. This applies equally to characters from the Latin/English alphabet as to letters from any other alphabet, most notably Greek. Any operator, such as cos or ∑, should therefore be set roman. Note that each element must be set depending upon its own merits, including subscripts and superscripts. Thus, hi would be suitable for the interior height of a dome, while hi would represent one instance from a set of heights. Notice that numbers are not variables, and so are always set roman. Likewise, in some special cases symbols are used to represent general constants, such as π used to represent the ratio of a circle's circumference to its diameter, and such general constants can be set in roman. For vectors, matrices and tensors, it is recommended to set the variable itself in boldface. Hence, ui would be suitable for the initial velocity, while ui would represent one instance from a set of velocities. Italic is still used for variables, both for lowercase and for uppercase symbols. The only general situation where italic is not used for bolded symbols is for vector operators, such as ∇, set bold and roman.
The rules of mathematical typography differ from country to country; thus, American mathematical journals and books will tend to use slightly different conventions from those of European journals. One advantage of mathematical notation is its modularity—it is possible to write extremely complicated formulae involving multiple levels of super- or subscripting, and multiple levels of fraction bars. However, it is considered poor style to set up a formula in such a way as to leave more than a certain number of levels; for example, in non-math publications might be rewritten as Incidentally, the above formula demonstrates the American rule that italic type is used for all letters representing variables and parameters except uppercase Greek letters, which are in upright type. Upright type is also standard for digits and punctuation; currently, the ISO-mandated style of using upright for constants is not widespread. Bold Latin capital letters usually represent matrices, and bold lowercase letters are often used for vectors. The names of well-known functions, such as sin x and exp x are written in lowercase upright letters. Certain important constructs are sometimes referred to by blackboard bold letters. For example, some authors denote the set of natural numbers by. Other authors prefer to use bold Latin for these symbols. Donald Knuth's TeX typesetting engine incorporates a large amount of additional knowledge about American-style mathematical typography.