Skip to content

Latex: Fractions line height #337

@Gregoirevda

Description

@Gregoirevda

Describe the bug
Fractions are cut off on iOS

To Reproduce

  1. Without line height, text is cut off
<EnrichedMarkdownText
            flavor="github"
            markdownStyle={{
              paragraph: { fontSize: 25, },
              inlineMath: {},
            }}
            markdown={'Foo $\\frac{4}{1}$'}
            containerStyle={{ backgroundColor: 'white' }}
          />
Image
  1. With line height, the text is not vertically centered
<EnrichedMarkdownText
            flavor="github"
            markdownStyle={{
              paragraph: { fontSize: 25, lineHeight: 50 },
              inlineMath: {},
            }}
            markdown={'Foo $\\frac{4}{1}$'}
            containerStyle={{ backgroundColor: 'white' }}
          />
Image
  1. Setting a line height where the fraction is visible for the font size (eg lineHeight: fontSize * 2) will still lead to text being cut off for some latex expressions eg: $\\left| \\displaystyle\\frac{(-6) \\cdot 5}{-2} \\right|$

Device (please complete the following information):

  • OS: iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions