yihui / litedown

A lightweight version of R Markdown
https://yihui.org/litedown/
Other
181 stars 4 forks source link

parsing latex strings inside parentheses #34

Closed AlbertLei closed 1 month ago

AlbertLei commented 1 month ago

litedown seems not parse latex strings inside parentheses. eg:

The force ($F$) equals to mass ($m$) multiplied by the acceleration ($a$).

litedown output:

image

Would you consider changing the latex parsing rule to allow this? The previosu example is parsed "correctly" by pandoc and github (see below)

yihui commented 1 month ago

Fixed in xfun. Thanks for the report! You can install the development version via

remotes::install_github('yihui/xfun')

Or wait for an hour and

install.packages('xfun', repos = 'https://yihui.r-universe.dev')

Make sure packageVersion('') >= '0.48.5') after installation.