📜  \ rvert-Tex命令(1)

📅  最后修改于: 2023-12-03 14:38:58.815000             🧑  作者: Mango

'\rvert' and '\lvert' - TeX Commands

When using TeX or LaTeX, it is often necessary to typeset vertical bars to enclose expressions or indicate absolute values. The TeX commands \lvert and \rvert provide an easy way to do this by generating left and right vertical bars respectively.

Syntax

The syntax for using the \lvert and \rvert commands is quite simple. You can enclose your expression with the appropriate command to generate vertical bars. Here are a few examples.

\lvert x - 3 \rvert

This will produce:

$$ \lvert x - 3 \rvert $$

\lvert \frac{x^2 - 1}{x + 1} \rvert

This will produce:

$$ \lvert \frac{x^2 - 1}{x + 1} \rvert $$

Other Commands

The \lvert and \rvert commands are just two of a family of similar commands for generating various types of delimiters. Here are a few others:

  • \langle and \rangle generate angle brackets
  • \lbrace and \rbrace generate curly braces
  • \lceil and \rceil generate ceiling brackets (round brackets with the top bent up)
  • \lfloor and \rfloor generate floor brackets (round brackets with the bottom bent down)
Conclusion

The \lvert and \rvert commands are very useful for typesetting vertical bars in TeX and LaTeX. With their easy syntax, you'll be able to use them to denote absolute values, norms, and other expressions with ease.