Open jtrussell opened 9 years ago
Just FYI I can definitely use \text{...}
as a workaround.
What version of gitbook are you using ? the 2.0.0-alpha ?
gitbook@1.5.0 gitbook-plugin-mathjax@0.0.6
Same issue. Seems Mathjax handled the text in middle as the formula.
What I configured more is that I added a script in head
, to enable Mathjax works on inline formula with single $
around.
<script type="text/x-mathjax-config;executed=true">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'] ],
processEscapes: true
}
});
</script>
The example is here: https://catalog.chn.moe/%E6%96%87%E7%AB%A0/%E4%BD%9C%E4%B8%9A/%E7%BB%9F%E8%AE%A1%E7%89%A9%E7%90%86%E7%A0%94%E8%AE%A8/%E5%B8%83%E6%9C%97%E8%BF%90%E5%8A%A8.html Markdown source code is here:
其中,$x'_\text{new}$、$p'_\text{new}$ 的定义为:
But, sometimes, that's OK to write two formula in a single line, as in the same example above:
I've found that it's caused by the pair of _
.
So, how to told gitbook do not translate underscores?
I use *
but never use _
to show italic.
I've solved the problem by modifying the code. If you face the same issue, use
"plugins": [
"mathjax@git+https://github.com/CHN-beta/plugin-mathjax.git#update_cdn"
],
First, thanks for the awesome plugin!
When I have a line that contains just a single formula it gets centered with padded with vertical padding as expected. The problem I have is when I want to start and end a line with a formula, something like:
This gets rendered as a single formula, the two inner-most delimiters getting interpreted as part of a larger formula, here's a screenshot:
Am I doing something wrong?