When I write
\\
in Markdown it is replaced by
<br />
in the generated HTML output. Can I get \\
with some escapes or other tricks ? I need it for multline
in MathJax. I tried \\\\
but that gives \<br />
instead.
When I write
\\
in Markdown it is replaced by
<br />
in the generated HTML output. Can I get \\
with some escapes or other tricks ? I need it for multline
in MathJax. I tried \\\\
but that gives \<br />
instead.
Of course \newline
is a workaround, but it would still be good to know how to get \\
.
Four backslashes work for me: \\\\
produces <p>\\</p>
.
But I am not using MathJax. Did you see the issues with MathJax section? Maybe that will shed light on yer issue.
Thanks — it turns out that I needed to wrap in <div></div>
, which makes \\\\
work.
EDIT I spoke too early. For another code block it does not work. Can someone with MathJax enabled check how
<div>
$$
J_g = \begin{bmatrix}
J\_{f,x} & J\_{f,y} \\\\
0 & I
\end{bmatrix}
$$
</div>
renders for them on v0.21
? Particularly what comes after {f,y}
in the HTML.
I am now under the illusion that I figured it out. Looking at the source it seems that Hugo uses EXTENSION_BACKSLASH_LINE_BREAK
for BlackFriday, which can be disabled by
[blackfriday]
extensionsmask = ["backslashLineBreak"]
in the configuration. This appears to fix the issue.