You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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... 😬
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
(1) But the solution is not only to change that ugly code1 to ret[body.index] = typeRequired: if there are unused arguments, you'd end up with a sparse table, and #-counting elements will fail...
(2) Or will it? Yes sure, except if one is lucky with only two arguments. I think I found a bug in LuaJIT... Eek?
SILE v0.15.5 (LuaJIT 2.1.1727870382) [Rust]
> t = {}; t[2]="test"; print("Len=", #t);
Len= 2
Footnotes
Really bad coding in this inferArgTypes_aux function: 1. dirty mix of early return's and elseif's 2. unclear purpose, no doc hint nor exploitable signature for one to assume what were the intents, 3. deep recursion with an accumulator "of things unknown", a call for losing all predictability without noticing. And yes, @OlivierNicole one can criticize the code, and it's not ad hominem, it's just... bad code, as it happens to all of us. It's a call for improving it. Whatever the language (so Lua be it here), the programmer is the one who wandered off tracks here. ↩
Formula:
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
Read "commands". But you got the point. ↩
The text was updated successfully, but these errors were encountered: