Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect symbol when converting markdown to typst #9063

Closed
ninpnin opened this issue Sep 6, 2023 · 1 comment
Closed

Incorrect symbol when converting markdown to typst #9063

ninpnin opened this issue Sep 6, 2023 · 1 comment
Labels

Comments

@ninpnin
Copy link

ninpnin commented Sep 6, 2023

When converting markdown to typst, the binomial symbol is turned into a division. So

${n\choose k}$

is turned into a division with parenthesis

$lr((n / k))$

while it should be

$binom(n,k)$

i.e. the binomial expression

The command to run is

pandoc binom-test.md -o binom-test.typ -t typst

The same thing happens on pandoc 3.1.6.2 and in the online interface.

@ninpnin ninpnin added the bug label Sep 6, 2023
@jgm
Copy link
Owner

jgm commented Sep 7, 2023

texmath parses this as

[ EDelimited
    "("
    ")"
    [ Right (EFraction NoLineFrac (EIdentifier "n") (EIdentifier "k"))
    ]
]

but the NoLineFrac is ignored by the typst writer, apparently.

jgm added a commit to jgm/texmath that referenced this issue Sep 7, 2023
@jgm jgm closed this as completed in 1c7a57f Sep 7, 2023
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Oct 31, 2023
texmath (0.12.8.4)
  * TeX reader: ignore `\allowbreak` (#230).
  * TeX reader: handle `*{5}{lr}` in array column specifier (#229).
  * OMML reader: allow `m:e` to be missing in `m:nary` (#228).
    Technically this is not allowed, according to the spec, but
    Word and LibreOffice seem to tolerate it.

texmath (0.12.8.3)
  * OMML writer: use "on" and "off" instead of "1" and "0" for
    m:CT_OnOff type.  It is said that "1" and "0" work in Word
    but not Powerpoint.

texmath (0.12.8.2)
  * Typst writer: use binom instead of a fraction (jgm/pandoc#9063).

texmath (0.12.8.1)
  * Typst writer: several fixes (#223, Lleu Yang).
    + Escape quotes (") in inQuotes
    + Accent `\8407` corresponds to `arrow()`
    + Write `#none`'s for matrices with blanks at the beginning of a row

texmath (0.12.8)
  * Expose Text.TeXMath.Shared [API change]
  * Typst writer: Fix bug where 's' turned into 'space' (#219).
  * Typst writer: Fix handling of overline (#214).
  * Typst writer: Fix underbrace (#217).
  * Typst writer: Improve some accents (#216).
  * TeX writer: don't include \ on last line of matrix.
  * TeX writer: Remove escaping of spaces inside \text{}.
    It isn't needed, and it causes problems in MathJax rendering.
  * TeX reader: allow empty matrices.
  * MathML writer: Fix rendering of vectors (#218).
  * Depend on external typst-symbols package.

texmath (0.12.7.1)
 * Typst writer:
   + Improve under/overbrace/bracket/line.
   + Fix bugs with super/subscript grouping (#212).
   + Fix case where super/subscript is on an empty element,
     by inserting a zws.

texmath (0.12.7)
  * Add typst writer. New module: Text.TeXMath.Writers.Typst.
  * TeX reader: Support multilined environment. Closes #210.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants