TransWikia.com

Why is `restriction` a relation-symbol?

TeX - LaTeX Asked on December 28, 2020

I do not understand why restriction (from package amssymb) is defined to be a relation-symbol. It is certainly not one in mathematics… Is there any special reason, or should I just consider it a bug and redefine it using mathbin?

One Answer

I'm not sure why amssymb defines restriction as a math relation symbol.

DeclareMathSymbol{upharpoonright} {mathrel}{AMSa}{"16}
 globalletrestrictionupharpoonright

Given these definitions, you can “fix” it according to your taste by making it an ordinary or binary operation symbol:

documentclass{article}
usepackage{amsmath,amssymb}

DeclareMathSymbol{ORDrestriction}{mathord}{AMSa}{"16}
DeclareMathSymbol{BINrestriction}{mathbin}{AMSa}{"16}


begin{document}

$frestriction A$ (relation)

$fORDrestriction A$ (ordinary)

$fBINrestriction A$ (binary operation)

end{document}

enter image description here

Once you have made your choice, you can remove the undesired definition and also the capitalized prefix.

If you want the relation spacing but also to avoid line breaks after the symbol, you can do

renewcommand{restriction}{upharpoonrightnolinebreak}

If you prefer cargo cult programming

renewcommand{restriction}{upharpoonrightnobreak}

Correct answer by egreg on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP