You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
= 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
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
$ find ./ -name 'stem-*' ./images/stem-e21aaf56997f76dcc4584ad75fd32494.png ./images/stem-f5419604efe38ee8591c30c2a37fe800.png ./build/images/stem-560f2ca395ac37caca2a4729e62691d2.png ./build/images/stem-e1affc0a43f89ae2da953b789d29e42c.png ./build/images/stem-0b241139835e83278d5b9e608a543ce0.png
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
.The text was updated successfully, but these errors were encountered: