-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: do not break math #67
Conversation
I need to try the case with a one-character equation though. |
@@ -191,7 +194,7 @@ translate_part <- function(xml, | |||
non_splitting_tags = "text,softbreak", | |||
formality = formality, | |||
glossary_id = glossary_id, | |||
ignore_tags = "code,code_block,curly,notranslate" | |||
ignore_tags = "code,code_block,curly,math,notranslate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of this I had to re-record all fixtures 🙃
Code | ||
math_lines[4] | ||
Output | ||
[1] "E = m \\times c^2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this actually looks good in the output file, but that's how the backslash has to be recorded here.
Hi @maelle,
In #61 I proposed a way to deal with 1 and 2 (not very satisfying, I agree) by adding chararecters ( |
@xtimbeau thanks!
Have you installed tinkr from my branch? Running
See my latest commit, I was working on that.
Any example I could use? |
|
||
How nice is this equation? Note that $\alpha=1$ and $b$ is not defined. | ||
|
||
$i_t = j_t$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xtimbeau I had added this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, tinkr@one-char-math is working for one char equations (nice!)
And it is also working with multiple underscores (you're a magician)
---
title: multiple underscore
description: equations in babeldown
---
$e_t = e_{t-1} + \varepsilon_t$ une équation à `_` !
En bloc :
$$
e_t = e_{t-1} + \varepsilon_t
$$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I'll merge this if the checks pass. Then you can report new bugs in the coming weeks 😸
Fix #60
Fix #61
Fix #64
Fix #65
@xtimbeau could you please have a look?