Mathpix / mathpix-markdown-it

Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
MIT License
465 stars 42 forks source link

PR into master from dev/olga/8817-Converting-wedge-to-Asciimath #311

Closed OlgaRedozubova closed 3 months ago

OlgaRedozubova commented 3 months ago

branch: dev/olga/8817-Converting-wedge-to-Asciimath

Fixes [mmd] Converting \wedge to Asciimath #8817

  1. This PR makes changes to the Asciimath conversion for ^{\wedge} and ^\wedge

Latex: $100(1.03)^{\wedge} 2 t=5000$ Asciimath: 100(1.03)^2t=5000

Latex: 3 a^{\wedge} 2 x^{\wedge} 2+24 a^{\wedge} 2 x+48 a^{\wedge} 2 Asciimath: 3a^2x^2+24a^2x+48a^2

Latex: $100(1.03)^\wedge 2 t=5000$ Asciimath: 100(1.03)^2t=5000

  1. In the event that {\wedge} is not after the ^ signs, the conversion has not changed

Latex: $\wedge(p \vee q u r) \wedge(p \vee \neg q v \neg r)$ Asciimath: ^^(p vv qur)^^(p vv not qv not r)

Screenshot 2024-03-12 at 21 15 39
  1. Also changed Asciimath for such cases:

Latex: $1^{\wedge}\Rightarrow 0100011000$ Asciimath: 1^=>0100011000

Screenshot 2024-03-12 at 21 18 58

Latex: $\llbracket{}^{\wedge} \alpha \rrbracket_{M, w, g}$ Asciimath: [[^alpha]]_(M,w,g)

Screenshot 2024-03-12 at 21 22 17

Latex: $\frac{\partial(\exp(\phi^{\wedge})\mathrm{p})}{\partial\phi}=-(\mathrm{Rp})^{\wedge}\mathrm{J}_{\mathrm{l}}$ Asciimath: (del(exp(phi^)p))/(del phi)=-(Rp)^J_(l)

Screenshot 2024-03-12 at 21 26 57