Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeX-like "def" macro doesn't allow inverting the arguments order (a.k.a. "overset" not supported) #2133

Open
Omikhleia opened this issue Oct 16, 2024 · 1 comment
Labels
bug Software bug issue

Comments

@Omikhleia
Copy link
Member

Omikhleia commented Oct 16, 2024

Formula:

\def{overset}{\munderover{#2}{}{#1}}
R^n \overset{A}{→} R^m

This issue should have been a proposal: "Let's support TeX-like \overset which is a nice convenience"... and here would have been expected to produce the arrow with a smaller A on top of it... and surely a simple macro is enough, right?

... But the above crashes with "Wrong number of arguments (2) for command overset (should be 1)"

Extra test: as in the code, fractions are defined as \def{frac}{\mfrac{#2}{#1}} and \frac{x}{y} gives x / y...
Let's try \def{invfrac}{\mfrac{#2}{#1}} and expecting it to be produce y / x...
Same failure as above.

So we have these def-macro thing "to save (us) some typing"...
How can we achieve \overset? "When macros are not enough, creating new mathematical elements is quite simple" (... followed by lots of not-so-simple explanation for a newcomer). Sure. It's typically a case where a macro would have been neat, though.

🌵 My dear math friends, yes, again... Will you start to typeset some real maths one day? Just askin'

Subsidiary remark: Nowhere does the documentation says how little of the TeX-like math syntax1 is currently supported... and if there are any real goals in making it more complete.... But the reality check leads to serious doubts... 😬

Footnotes

  1. Read "commands". But you got the point.

@Omikhleia Omikhleia added the bug Software bug issue label Oct 16, 2024
@Omikhleia Omikhleia changed the title TeX-like "def" macro doesn't allow inversing the order of arguments (a.k.a. "overset" is not supported) TeX-like "def" macro doesn't allow inverting the arguments order (a.k.a. "overset" not supported) Oct 16, 2024
@Omikhleia
Copy link
Member Author

Omikhleia commented Oct 17, 2024

To make it clear, the goal here would be to support TeX math \overset and \underset (and possibly too \stackrel)

Subsidiary question: How to have them considered as relations.

Additional reference:

https://github.com/jgm/texmath/blob/4315006320ea7119fb1c1a1ca5aaf755b0a2bff7/src/Text/TeXMath/Readers/TeX.hs#L745-L755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
Status: To do
Development

No branches or pull requests

1 participant