Skip to content

Misaligned superscripts and subscripts - part 2 #2324

Closed as not planned
Closed as not planned

Description

@ludwig-austermann

Description

Similarly to #539, super- and subscripts are still misaligned, when using accents. Accents on variables are vastly used by mathematicians, such that changing this should impact many documents.

Take:

#set page(width: auto, height: auto, margin: 5pt)

#let modifications = (x => $#x$, x => $hat(#x)$, x => $macron(#x)$, x => $tilde(#x)$)
#for modification in modifications {
  let mod(x) = $med #modification($#x$)_1^1 $
  box(box(
    $e_1^1 #mod($x$) #mod($y$) #mod($delta$) #mod($beta$) #mod($mu$) #mod($lambda$) #mod($l$) #mod($M$) #mod($(x)$)$,
    stroke: red + 0.2pt
  ), inset: (top: 1.6pt, bottom: 2.6pt), stroke: orange + 0.2pt)
  linebreak()
}

resulting in

subscripts

whereas similar latex code results in

grafik

One notices, that in latex all super- and subscripts are aligned, whereas these change in typst with accents. Furthermore, the horizontal placement is also misaligned in typst, as can be seen with the ̀ M`.

(I am using typst 0.8.0)

Reproduction URL

No response

Operating system

No response

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Oct 6, 2023
  2. changed the title [-]Write a short and descriptive title![/-] [+]Misaligned superscripts and subscripts - part 2[/+] on Oct 6, 2023
  3. added
    math
    duplicate
    on Oct 9, 2023
  4. Enivex commented on Oct 14, 2023

    @Enivex
    Collaborator

    Duplicate of #1672

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugduplicatemath

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions