3

I would like to use the following commands (in order to simplify writing):

\newcommand{\<}{\langle}
\renewcommand{\>}{\rangle}

Would there be any dangerous consequences of this? I know that by default \> inserts \medmuskip, but I am not using this command.

5
  • 1
    It is possible that you use this command indirectly without being aware of it, via some package or other. Commented Mar 26, 2019 at 20:04
  • Yes, this is exactly what worries me. Any suggestions on how to keep the things safe are welcome!
    – Skeeve
    Commented Mar 26, 2019 at 20:06
  • 1
    Redefining \> and \< might cause havoc if you need to use the tabbing environment.
    – Mico
    Commented Mar 26, 2019 at 20:19
  • @Mico More precisely, using $\<a\>$ in a tabbing environment would cause havoc. If this is needed, it's sufficient to use \langle and \rangle in the special situation. Nothing would happen otherwise.
    – egreg
    Commented Mar 26, 2019 at 22:25

1 Answer 1

6

You risk that some obscure package defines something in term of \> or define \< and \> themselves.

A quick search reveals that \< is defined in

amsdtx.cls
amsldoc.cls
circ.sty
cjhebrew.sty
gmmeta.sty
greektonoi.sty
jlreq.cls
lhcyralt.sty
lhcyrkoi.sty
lhcyrwin.sty
pax.sty
AlProTex.sty
dev209.sty

The command \> is redefined in

bxcjkjatype.sty
gn-logic14.sty
greektonoi.sty
lhcyralt.sty
lhcyrkoi.sty
lhcyrwin.sty
pax.sty
AlProTex.sty
sgamevar.sty
zxjatype.sty

I can't exclude there are other instances where different ways of defining commands are used.

I'd not do it anyway, even if it's not that risky. Better do

\usepackage{mathtools}

\DeclarePairedDelimiters{\foo}{\langle}{\rangle}

(choose a meaningful name for your application) and use

\foo{x} \foo[\big]{x} \foo[\Big]{x} \foo[\bigg]{x} \foo[\Bigg]{x} \foo*{x}

for choosing the size of the delimiters (the last one is for automatic sizing with \left and \right, use it carefully).

If you decide to use \< and \> beware that inside a tabbing environment you will have to use \langle and \rangle because tabbing redefines the two commands for its own purposes (but just inside the environment).

1
  • Thank you very much for such a detailed answer! I think I will use \DeclarePairedDelimiters, thanks for pointing out this interesting command.
    – Skeeve
    Commented Mar 27, 2019 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .