Skip to content

Add a \nicefrac-like function (and ideally make the default / operator configurable) #917

@matthewelmer

Description

@matthewelmer

I've been working on this function that makes something similar to LaTeX's \nicefrac:
#let over(a, b) = $#h(0pt)^(#scale(a, 140%)) #h(-1pt) slash #h(-2.5pt)_(#scale(b, 140%))$

$over(a, b)$ yields:
image

My function is very hacky and should instead be implemented properly. Following is an example of where it fails:
$a/(over(b, c))$ yields:
image

It would be even better if the behavior of the / operator was configurable in the template! i.e. the user could switch between the current default, a literal slash, or a nicefrac-like result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requestmathRelated to math category, with its syntax, layout, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions