= Precompiled Math
:math:
:stem: latexmath
== Equations in normal blocks
[latexmath]
++++
k_{n+1} = n^2 + k_n^2 - k_{n-1}
++++
Some useful text! Formula for quadratic root:
[stem]
++++
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
++++
Inline equation works too! latexmath:[a^2+b^2=c^2]. Or as stem
stem:[a^2+b^2=c^2]. Pretty nice, huh?
== Equations in table cells
Equations in asciidoc style table cells work, too!
[%header]
|===
| Demo | Contents
| Inline Equation in *Asciidoc* Cells
a|
This is an *inline* equation: latexmath:[E=m \cdot c^2].
| Block Equation in *Asciidoc* Cells
a| The following is a stem block:
[stem]
++++
a^2+b^2=c^2+d^2
++++
|===
asciidoctor invocation
pwd is /doc
asciidoctor --destination-dir=/doc/build -a imagesdir=images -r asciidoctor-mathematical /doc/sample.adoc
Expected Result
All generated images should got into /doc/build/images
If I remove the a attribute from the table cell to test with non-adoc cells, asciidoctor fails with:
asciidoctor: FAILED: /doc/sample.adoc: Failed to load AsciiDoc document - undefined method `lines=' for #<Asciidoctor::Table::Cell:0x0000564584ebe888>
Did you mean? lines
lineno
Use --trace for backtrace
This is bug #73?
I've noticed that the behavior is like expected if using asciidoctor-pdf instead of asciidoctor.
Steps to Reproduce
sample.adoc
based on sample.adoc
asciidoctor invocation
pwd is
/doc
Expected Result
All generated images should got into
/doc/build/images
Actual Result
However, there are relative paths to
images
in the generated HTML for all generated images:Remarks
If I remove the
a
attribute from the table cell to test with non-adoc cells, asciidoctor fails with:This is bug #73?
I've noticed that the behavior is like expected if using
asciidoctor-pdf
instead ofasciidoctor
.