textbar
Renders a vertical bar character within text mode, commonly used for absolute values or set-builder notation.
Overview
Provides a typographically correct vertical bar specifically designed for text contexts, distinct from mathematical bars.
- Essential for writing proper absolute value notation in inline text
- Used in linguistics for phonetic transcriptions
- Appears in set-builder notation when writing in natural language
- Preferred over the keyboard character (|) for better spacing and typography
- Often employed in computer science documentation for command-line syntax
Examples
Specifying absolute value in text mode within a mathematical expression
The magnitude is |x| \text{ if } x \text{\textbar} x \geq 0Using textbar as a conditional separator in mathematical text
P(A \text{\textbar} B) = \frac{P(A \cap B)}{P(B)}Defining a piecewise function with textbar as delimiter
f(x) = \begin{cases} x & \text{\textbar} x > 0 \\ 0 & \text{\textbar} x \leq 0 \end{cases}