TeX - LaTeX Asked on July 15, 2021
I wish to typeset the following two operators:
newcommand{Incr}[1]{ #1!+!!+ }
. However, this caused many spacing problems in the sense that the spacing between the two pluses varied in the document, sometimes they were not even ligated. I want a solution that makes the space between the pluses a constant.newcommand{Diff}[2]{ #1-!!-#2 }
. However I face the similar issues here too.Can you provide a solution to this?
Edit:
The highlighted in the following images are the intended usage. (The screenshots are taken from Tao’s Analysis I.)
The doubleplus
postfix operator seems just an ordinary symbol, so
newcommand{Incr}{{+}{+}}
is the simplest way to go.
For Diff
two minus signs with some negative space between them should be good:
newcommand{Diff}{{-}mspace{-9mu}{-}}
Try different values of the negative space until you're satisfied.
In context:
documentclass{article}
usepackage{amsmath}
newcommand{Incr}{{+}{+}}
newcommand{Diff}{{-}mspace{-9mu}{-}}
begin{document}
for instance $3Incr=4$
where $nIncr$ actually emph{redefines}
of the form $aDiff b$ where
end{document}
Correct answer by egreg on July 15, 2021
For the difference operator, you can use e.g. $A smallsetminus B$ (A smallsetminus B
) or $A setminus B$ (A setminus B
) (both in the amssymb
package). In general, for binary math operators use DeclareMathOperator
(it adds required spacing around it), in amsmath
.
Answered by vonbrand on July 15, 2021
For the increment operator, you might try doubleplus
, from unicode-math
, stix
and several other packages.
Answered by Davislor on July 15, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP