Skip to content

Units with parantheses in fractions don't render as expected #78

@Netzwerk2

Description

@Netzwerk2

When writing units with a fraction as the exponent the unit is rendered incorrectly.
The following minimal example demonstrates this behaviour

#import "@preview/zero:0.6.1": zi

#let J-kg-K = zi.declare("J / (kg K)")
#let K-1-2 = zi.declare("K^(1/2)")

$
  #J-kg-K() \ 
  #K-1-2(fraction: "inline") \
  #K-1-2(fraction: "fraction") \
  #K-1-2(fraction: "power")
$
Image

While this can be circumvented with multiple slashes for normal units ("J / kg / K") the same is not possible for units which have fractions as exponents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions