Open cirosantilli opened 5 years ago
OK, after 20 total minutes of manual grepping I found the docinfo mechanism:
docinfo.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css" integrity="sha384-yFRtMMDnQtDRO8rLpMIKrtPCD5jdktao2TV19YiZYWMDkUR5GQZR/NOVTdquEx1j" crossorigin="anonymous">
and add to adoc document attributes:
:docinfo: shared
as in:
= bla
:stem:
:docinfo: shared
[latexmath]
++++
\sqrt{1+1} = 2
++++
@cirosantilli I had a look at this. If I modify your example above to set stem
to latexmath
then the KaTeX stylesheet is correctly included
= bla
:stem: latexmath
:docinfo: shared
[latexmath]
++++
\sqrt{1+1} = 2
++++
The readme does indicate that AsciiMath is not supported only LaTeX style math.
This is how it can be done automatically from the script: https://github.com/cirosantilli/cirosantilli.github.io/blob/28c4ae178359a0fc760fd8608499d321be705467/katex.rb#L88
This is how it can be done automatically from the script: https://github.com/cirosantilli/cirosantilli.github.io/blob/28c4ae178359a0fc760fd8608499d321be705467/katex.rb#L88
Hi there,
a.adoc
then:
with asciidoctor-katex (0.3.0) generates the katex markup, but the formula does not show correctly because the stylesheet was not added.
If I manually add:
to the HTML then it works, but it would be better if that was done automatically by the plugin.
Or at least document how to include it in the README of the project.