latex3 / mathtools

Mathematical tools to use with amsmath
LaTeX Project Public License v1.3c
54 stars 6 forks source link

[Feature proposal] New commands \coloniff etc. #59

Open siebenstreich opened 2 months ago

siebenstreich commented 2 months ago

The mathtools package provides commands like \coloneqq and \eqqcolon for typographically sound symbols for definitions of expressions via equality sign. However, the natural counterpart :⇔ for definitions of statements via the equivalence signs not there. I think it would only be natural to add analogous commands like \coloniff, \iffcolon and maybe also \colonLeftrightarrow, \Leftrightarrowcolon, \colonLongleftrightarrow, '\Longleftrightarrowcolon.

It's not only me who is missing those symbols, see this tex.stackexchange discussion.

daleif commented 2 months ago

Where are such symbols used? I've never heard of them. Are they in unicode?

siebenstreich commented 2 months ago

Example: On the set of positive integers, we define a partial order by x ≤ y :⇔ x divides y

On both sides of the ":⇔"-sign, there are logical statements, which are commonly connected with symbols like ⇔ and ⇒. So the usage of ":=" would not be correct here. Quite a few authors are using the ":⇔"-symbol in this situation.

I don't know if this symbol is in unicode. Probably it is not, unfortunately.

davidcarlisle commented 2 months ago

It's not a notation I've seen, of course there is no reason authors can't define it if they need it but I don't see that it's needed in a core package like mathtools. Unicode has := and =: and not any of the other suggested symbols.

car222222 commented 2 months ago

I do not think that these combined symbols not being in Unicode can be described as"unfortunate" (as @davidcarlisle has explained).

But if you really need something added to Unicode then that is not too difficult to do: it just needs thorough documentation of the need, and probably some patience!

Things to consider: is it really a totally new individual symbol? : or simply a meaningful typesetting construction that uses a combination of adjacent Unicode symbols?

Here are some other, similar, commonly used constructions that are (AFAIK) not in Unicode: ++ // :+ !! etc. not forgetting that we maths types can invent new notation every day of every year (at least until the year 2568 or beyond) -- whilst dropping hats:-).

car222222 commented 2 months ago

But my argument above is no reason for us not to provide (maybe via mathtools) a method for naming (TeX names) and easily defining new "compound math symbol commands" for such notations.

But possibly we already do have such helper functions: maybe check out all the math font stuff?

FrankMittelbach commented 2 months ago

@car222222 yes there could be such a declaration helper and probably there should be one. If we think about accessibility of math such a declaration would also have to cover specifying what that command should do with respect to accessibility, given that the notation is user-edefined.

However, for precisely this reason I don't think any such declaration helper should be defined right now but only after we have gained experience with providing accessible math and understand how a syntax for specifying accessibility of notation could or should look like. Doing it now, would mean the syntax would change in the near future. I would therefore think it is best to park this for now.

car222222 commented 2 months ago

On the whole I agree re the timing and the relevance of accessibility, especially the navigation of math formulas as this is very useful for all of us!

But we, in some sense, could start thinking about this now, together the very many other aspects of providing really useful, in very many ways, math output.