arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.41k stars 266 forks source link

Feature Request: Customize fraction #2441

Open andrew-murdza opened 1 week ago

andrew-murdza commented 1 week ago

Desired Behavior

A macro \customFrac{#1}{#2}{#3}{#4}{#5}{#6}

  • #1 is the numerator
  • #2 is the denominator
  • #3 is the vertical space between the numerator and the fraction bar
  • #4 is the vertical space between the denominator and the fraction bar
  • #5 is the fraction bar thickness
  • #6: 0 is \displaystyle, 1 is \textstyle, 2 is \scriptstyle, 3 \scriptscriptstyle (same as genfrac)

Environment

0.100.0

arnog commented 1 week ago

I am generally reluctant to add non-standard LaTeX commands for two reasons:

I would be more inclined to consider this if there is an existing LaTeX package defining this command.

Furthermore, it seems that something like this could be built using a combination of existing LaTeX commands, such as \stackrel, \raise, \mkern, \rule, etc... so it probably doesn't need to be a built-in command, but could be a user defined macro.

andrew-murdza commented 1 week ago

That would work. I will ask how to do this in the TeX Stack Exchange. Before I do that, I want to make sure \stackrel, \raise, \mkern, and \rule are the only needed commands (you said etc.). Unfortunately, if I say MathLive specifically they will close the question as off-topic (this has occurred with MathJax questions in the past). But if I say I can only use these macros without saying why then I think they will answer the question.