Closed dinh-toan closed 9 months ago
Using it as $$\mid$$
it renders as |
.
Thanks and it does not render double bars. Another example for my case is writing the absolute value. More precisely, $$|p|$$
stills breaks equation.
Note that this symbol can be generated in numerous different ways, so just try a different one.
But what you are trying to achieve has more adequate ways in LaTeX. I recommend using an online tool to help you build your equations.
Is it possible to address the parsing problem in Al Folio? I think ensuring robust math rendering is a crucial aspect of Al Folio's functionality.
$$\|a\|$$
renders ||a||
.
Also, are you sure only |a|
is a valid LaTeX equation? If so, I am afraid we may be with our hands tied here, since we rely on MathJax to convert LaTeX equations.
Yes, |a|
is indeed valid LaTex code. I believe we are not with our hands tied here as this code renders correctly in MathJax—I've confirmed this using the MathJax Live demo available at https://www.mathjax.org/#demo.
In my opinion, this issue might stem from Al Folio automatically converting inline delimiters from $$..$$
to \( ..\)
before employing MathJax for math expression rendering. Perhaps, I'm wrong.
Hummm interesting. Did a quick search on this, and maybe it can be customized inside MathJax, since it seems to be a limitation of kramdown, which is the markdown flavor of jekyll. But I don't think this is worth the trouble, since kramdown docs itself states:
Note that LaTeX code that uses the pipe symbol | in inline math statements may lead to a line being recognized as a table line. This problem can be avoided by using the \vert command instead of |!
Thank you Geogre.
Have you checked that your issue isn't already filed?
Bug description
Markdown rendering problem with vertical bar '|' inside math delimiters '$$'
How to reproduce the bug
Description
Every time I need to write an inline math expression with a vertical bar |, for example
abc $$m|n$$ def
It seems that al-folio does not recognize math delimiters, but instead thinks I am trying to write a markdown table. Moreover, the problem worsens when there are multiple math expressions within a single paragraph.How to reproduce the issue
This theme supports rendering beautiful $$\mid |$$ ... inside a paragraph, it will produce an inline expression $$m^2$$....
Illustrated images
Code
Site
Error messages and logs
No response
What operating system are you using?
Mac
Where are you seeing the problem on?
Deployed site
More info
No response