mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Feature Request: Customize fraction

Open andrew-murdza opened this issue 1 year ago • 2 comments

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

andrew-murdza avatar Jul 06 '24 18:07 andrew-murdza

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

  • it reduces the interoperability with other LaTeX engines
  • it makes it more difficult to interpret the output semantically

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.

arnog avatar Jul 07 '24 04:07 arnog

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.

andrew-murdza avatar Jul 07 '24 08:07 andrew-murdza