GNU TeXmacsUser manualReferenceAboutEnglish·中文
Semantics of mathematical symbols

The mathematical symbols in TeXmacs all come with a certain number of properties which correspond to their intended meaning. For instance, TeXmacs is aware that \(+\) is an infix operator, whereas ! is rather a postfix, and , a separator.

TeXmacs has special symbols \(\mathrm{e} = 2.71828 \cdots\), \(\pi = 3.14159 \cdots\) and \(\mathrm{i}\) for important mathematical constants, which display differently from the mere characters \(e\), \(\pi\) and \(i\), and which can be entered using the shortcuts E⇥⇥, P⇥⇥ and I⇥⇥. We recommend to systematically use these shortcuts.

Inversely, semantically distinct symbols may display in a similar way. For instance, the comma separator, as in \(f (x, y)\), is different from the decimal comma, as in \(3 {,} 14159 \cdots\). Notice that the two symbols admit different spacing rules. Semantically distinct symbols which are rendered by the same glyph are called homoglyphs. Notice that our semantics is purely syntactic: for instance, the \(+\) infix is commonly used for addition, but sometimes also for the concatenation of strings. Nevertheless, these two uses do not differ from a syntactical point of view, since the \(+\) symbol remains a binary infix with the same precedence with respect to other symbols.

The most confusing homoglyphs are the various invisible symbols supported by TeXmacs:

Again it is recommended that authors carefully enter these various invisible symbols when appropriate. It is particularly important to distinguish between multiplication and function application, since there is no 100% safe automatic way to make this distinction (we already mentioned the formulas \(a (b + c)\) and \(f (x + y)\) before).

TeXmacs supports two quite general schemes for entering homoglyphs. On the one hand, we often rely on the standard variant system. For instance, \(\times\) and \(\ast\) are obtained using *⇥ and *⇥⇥. In table ? we have given the complete list of homoglyphs supported by TeXmacs.

Shortcut Glyph Example Semantics
* \(ab\) Multiplication
␣ \(\sin x\) Function application
,⇥⇥ \(a_{i j} = a_{j i}\) Invisible separator
+⇥⇥⇥⇥ \(17 {}^3 /_8\) Invisible addition
.⇥⇥⇥ \(\ensuremath{\mathord{}} + 1\) Invisible symbol
(⇥ \(\Phi \equiv \forall x, P (x) \) Invisible bracket(s)
| \(|\) \(| - x | = | x |\) Absolute value
|⇥ \(|\) \(\{ x \in \mathbb{R}|x > 0 \}\) Separating bar
|⇥⇥ \(|\) \(\langle a_i^2 | a_j^2 \rangle\) Extensible middle bar
|⇥⇥⇥⇥ \(|\) \(11 \mathrel{|} 1001\) Divides relation
, , \(f (x, y)\) Comma separator
,⇥ , \(123 {,} 456\) Decimal comma
. . \(123.456\) Decimal point
.⇥ . \(\lambda x . x^2\) Dot connector
*⇥⇥⇥ \(\cdot\) \(\boldsymbol{v} \cdot \boldsymbol{w}\) Dot multiplication
.⇥⇥ \(\cdot\) \(\cdot + 1\) Dummy wildcard
: \(:\) \(\{ x \in E : P (x) \}\) Separator
:⇥ \(:\) \(x : \textsf{Int}\) Type satisfaction
/⇥ \(:\) \(121 : 11 = 11\) Division
\⇥ \(\backslash\) \(\backslash x\) Backslash
\⇥⇥ \(\backslash\) \(\mathbb{N}^{>} =\mathbb{N} \setminus \{ 0 \}\) Set minus
& \(\wedge\) \(1 = 1 \wedge 2 = 2\) Logical and
*& \(\wedge\) \(\mathrm{d} x \wedge \mathrm{d} y\) Wedge product

Table 1. Homoglyphs supported by TeXmacs.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".