summaryrefslogtreecommitdiff
path: root/docs/modules/stem
diff options
context:
space:
mode:
authorSarah White <graphitefriction@gmail.com>2020-11-19 15:45:59 -0700
committerSarah White <graphitefriction@gmail.com>2020-12-08 14:32:53 -0700
commit64ec52d2dacb0ff9c5e54ff47bc35f56a67b18ea (patch)
tree65bbc0d8d0d20350db63961a3b2e9b6b4f148a75 /docs/modules/stem
parenta0861ee354c26ab4480835c5f03ff16e7016ce61 (diff)
create integration modules; update stylesheet pages
Diffstat (limited to 'docs/modules/stem')
-rw-r--r--docs/modules/stem/nav.adoc3
-rw-r--r--docs/modules/stem/pages/asciimath-gem.adoc39
-rw-r--r--docs/modules/stem/pages/index.adoc14
-rw-r--r--docs/modules/stem/pages/mathjax.adoc7
4 files changed, 63 insertions, 0 deletions
diff --git a/docs/modules/stem/nav.adoc b/docs/modules/stem/nav.adoc
new file mode 100644
index 00000000..4f96cb52
--- /dev/null
+++ b/docs/modules/stem/nav.adoc
@@ -0,0 +1,3 @@
+* xref:index.adoc[]
+** xref:mathjax.adoc[]
+** xref:asciimath-gem.adoc[]
diff --git a/docs/modules/stem/pages/asciimath-gem.adoc b/docs/modules/stem/pages/asciimath-gem.adoc
new file mode 100644
index 00000000..5d9e82d7
--- /dev/null
+++ b/docs/modules/stem/pages/asciimath-gem.adoc
@@ -0,0 +1,39 @@
+= AsciiMath RubyGem
+:url-asciimath-repo: https://github.com/asciidoctor/AsciiMath
+
+Asciidoctor's built-in DocBook backend and MathJax aren't compatible, so Asciidoctor must explicitly convert xref:asciidoc:stem:stem.adoc[stem expressions] into something the DocBook toolchain can understand.
+Enter the {url-rubygem}/asciimath[AsciiMath RubyGem^].
+AsciiMath converts AsciiMath stem expressions in an AsciiDoc document to MathML and outputs them in a format that DocBook accepts.
+
+TIP: For more information, see the {url-asciimath-repo}[AsciiMath RubyGem repository^].
+
+== Install asciimath gem
+
+To enable AsciiMath support when converting to DocBook, you need to install the asciimath gem:
+
+ $ gem install asciimath
+
+== Activate asciimath stem expressions
+
+To activate AsciiMath, set the `stem` attribute in the document's header and assign it the value `asciimath`. (or by passing the attribute to the command line or API).
+
+.Set the stem attribute
+[source,asciidoc]
+----
+= Document Title
+:stem: asciimath
+----
+
+To learn how to create inline and block AsciiMath equations, see xref:asciidoc:stem:stem.adoc[].
+
+=== Using AsciiMath with the DocBook toolchain
+
+If you're generating a PDF from the DocBook output, the MathML produced by the asciimath gem needs to be interpreted and drawn into the PDF.
+In the DocBook toolchain, this is handled by JEuclid.
+
+Fortunately, the toolchain is already configured to use the JEuclid integration.
+When the DocBook toolchain generates the PDF, the JEuclid FOP plugin processes any MathML found in the DocBook file, including the expressions transformed from AsciiMath to MathML by the asciimath gem.
+As a result, AsciiMath stem expressions in the AsciiDoc file will render as expected in the generated PDF.
+
+There's no equivalent gem for converting STEM expressions written in LaTeX to MathML.
+Instead, you can convert the DocBook to PDF using the dblatex pipeline, which supports LaTeX expressions.
diff --git a/docs/modules/stem/pages/index.adoc b/docs/modules/stem/pages/index.adoc
new file mode 100644
index 00000000..6ea72af6
--- /dev/null
+++ b/docs/modules/stem/pages/index.adoc
@@ -0,0 +1,14 @@
+= STEM Processing
+
+[%autowidth]
+|===
+|Integration |Supported Versions |Converters
+
+|MathJax
+|2.7.9
+|HTML
+
+|AsciiMath
+|2.0.x
+|Docbook
+|===
diff --git a/docs/modules/stem/pages/mathjax.adoc b/docs/modules/stem/pages/mathjax.adoc
new file mode 100644
index 00000000..b27c7928
--- /dev/null
+++ b/docs/modules/stem/pages/mathjax.adoc
@@ -0,0 +1,7 @@
+= MathJax
+:url-mathjax: https://www.mathjax.org
+:url-asciimath: https://docs.mathjax.org/en/latest/input/asciimath.html
+:url-latexmath: https://docs.mathjax.org/en/latest/input/tex/index.html
+
+{url-mathjax}[MathJax^] is a JavaScript library for displaying Science, Technology, Engineering and Math (STEM) expressions in the browser.
+The Asciidoctor HTML backend relies on MathJax to parse and render {url-asciimath}[AsciiMath^] and {url-latexmath}[TeX and LaTeX^] math notation.