ropensci-review-tools / babeldown

Helpers for Automatic Translation of Markdown-based Content
https://docs.ropensci.org/babeldown/
Other
21 stars 2 forks source link

equations and footnote don't play nicely #65

Closed xtimbeau closed 7 months ago

xtimbeau commented 7 months ago

When either a footnote is on the same line as an equation or when an equation is in the footnote some spaces disapear

---
title: "EqinFN"
description: "Une équation et une note de bas de page et c'est le bazar !"
---
sans note de bas de page, c'est ok $a$ est bien conservé dans sa beauté initiale

mais $a$ une équation avec une nbp ensuite [^1]

[^1]: une note de bas de page

mais quand il l'équation est dans la note de bas de page [^2]

[^2]: une équation $a$ dans une note de bas de page

gets translated to (please note the missing space after $a$ the first time and before $a$ the second time and that the semicolon is also missing, resulting in a dead footnote):

---
title: EqinFN
description: An equation and a footnote and it's a mess!
---

without a footnote, it's OK $a$ is well preserved in its original beauty

but $a$an equation with a nbp then [^1]

[^1] a footnote

but when the equation is in the footnote [^2]

[^2] an equation$a$ in a footnote
maelle commented 7 months ago

I can reproduce this. :+1:

maelle commented 7 months ago

also not great how the colon disappears