unexpected italics rendered in source view in formula block · Issue #4121 · marktext/marktext · GitHub
Skip to content

unexpected italics rendered in source view in formula block #4121

Closed

Description

@drancope

Description

In source view, inside $formulas$, unexpected italics are rendered when using subscript character "_" after a \text{} element and reverted to normal from the next subscript, also following a \text{} command.

\text{} is used to produce one or more characters in non italics shape. In formulas, the general norm shows text italicized.

  • [Y] Can you reproduce the issue?

Steps to reproduce

  1. Write this expression in normal view mode:
test text:

$\text{F}_\text{A} = \text{F}_\text{B}$ vs. $F_A = F_B$

End of test.
  1. View source

All text inside $ symbols should render normal in screen. Program should tell _ used to emph text from _ used to get subscript.

Actual behavior:
First formula appears partially italicized in screen. However, pdf results are ok.

Versions

  • MarkText version: 0.17.1
  • Operating system: Ubuntu 24.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 pri/lowSome low-priority bugs, such as styles, some bugs on non-primary features🐲 math blockIssue about math block🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions