anchor.diff:  :tex: LaTeX
   :article: http://noteshare.io/book/transcendental-numbers-and-periods[article]
   :ns: http://www.noteshare.io[Noteshare.io]
  -
  -
  -Asciidoc-LaTeX defines an extended mathematical syntax
  +:sc: http://www.scripta.io[Scripta.io]
  +
  +== Introduction
  +
  +Asciidoc-LaTeX defines an extended syntax
   for the Asciidoc markup language
  -that closely parallels LaTeX.  The
  -Asciidoctor-LaTeX converter renders documents written
  -in this extended markup language into both HTML
  -and LaTeX.footnote:[Many, but not all Asciidoc language
  -features are covered by this release.]
  -
  -Below, we descibe the main
  -features of {adl}.  However, since
  -it will not render in GitHub, you
  -are encouraged to view this write-up:
  -https://vschool.s3.amazonaws.com/manuscripts/372.html[Asciidoc-LaTeX].
  -For more information on using {adl}, please consult the
  -http://www.noteshare.io/book/asciidoctor-latex-manual[Asciidoctor-LaTeX manual].
  -For more information on conversion of {adl}
  -documents to {tex}, see the file `tech-report.adoc` in
  -this repository or consult the
  -https://vschool.s3.amazonaws.com/manuscripts/389.html[online version],
  -which has a table of contents.
  -
  -Asciidoctor-LaTeX is developed by James Carlson, Jakub Jirutka, and Dan Allen.
  +that closely parallels LaTeX for inline and display mathematical formulas and for environments.
  +Documents written in this extended markup language can be converted into  HTML or LaTeX:
  +
  +Render as HTML::
  +Use `asciidoctor-latex -b html foo.adoc` to produce `foo.html`.
  +
  +Render as LaTeX:: Use `sasciidoctor-latex foo.adoc`
  +to produce `foo.tex`, then use `xelatex foo.tex` to create `foo.pdf`.
  +
  +Below, we describe the main
  +features of {adl}.  However, since this document
  +it will not render fully in GitHub, you
  +are encouraged to compile it yourself using
  +`asciidoctor-latex -b html README.adoc` or to view this
  + http://www.shoobox.io/share/230[online version].  The
  +online version is hosted at http://www.shoobox.io[shoobox.io],
  +a site for editing and distributing Asciidoc and Asciidoc-LaTeX documents.
  +
  +Asciidoctor-LaTeX is developed by James Carlson, Jakub Jirutka, and Dan Allen.  Display of mathematical text
  +relies on http://docs.mathjax.org/en/latest/start.html[MathJax].
  +
  +== Features
  +
  +{adl} renders inline and displayed mathematical, and it supports a construct akin to LaTeX environments
  +for theorems, equations, etc.  These and other features are described briefly below and more fully in XX.
  +
  +=== Inline and displayed formulas
  +
  +ifdef::env_standard[]
  +.Example
  +Imagine that `foo.adoc` contains the text below.
  +The inline and displayed formulas will be correctly rendered as html or tex.
  +----
  +The formula $a^2 + b^2 = c^2$ relates the sides
  +and hypotenuse of a right triangle.  The formula
  +\[
  +\int_0^1 x^n dx = \frac{1}{n+1}
  +\]
  +is something we all learn in Calculus
  +----
  +endif::[]
  +
  +ifndef::env_standard[]
  +
  +.Example
  +Imagine that `foo.adoc` contains the text below.
  +It will be correctly rendered as html or tex.
  +----
  + The formula \$a^2 + b^2 = c^2\$ relates the sides
  + and hypotenuse of a right triangle.  The formula
  + \[
  + \int_0^1 x^n dx = \frac{1}{n+1}
  + \]
  + is something we all learn in Calculus
  +----
  +
  +.Rendered Text
  +[blue]#The formula $a^2 + b^2 = c^2$ relates the sides
  +and hypotenuse of a right triangle.  The formula
  +\[
  +\int_0^1 x^n dx = \frac{1}{n+1}
  +\]
  +is something we all learn in Calculus.#
  +endif::[]
  +
  +=== Environments
  +
  +ifdef::env_standard[]
  +.Example
  +--
  +--
  +
  +----
  +  [env.theorem]
  +  --
  + The Diophantine equation
  + \[
  +    x^n + y^n = z^n
  + \]
  + for \$n > 2\$ has only trivial solutions
  +--
  +----
  +endif::[]
  +
  +ifndef::env_standard[]
  +.Example
  +
  +----
  + [env.theorem]
  + --
  + The Diophantine equation
  + \[
  +    x^n + y^n = z^n
  + \]
  + for \$n > 2\$ has only trivial solutions
  + --
  +----
  +
  +.Rendered Text
  +--
  +--
  +
  +[env.theorem]
  +--
  +The Diophantine equation
  +\[
  +  x^n + y^n = z^n
  +\]
  +for $n > 2$ has only trivial solutions.
  +--
  +endif::[]
  +
  +
  +=== Click blocks
  +
  +A click block displays its title but not its body.
  +If you click on the title, the body is displayed.
  +Click on the title again to hide the body.
  +
  +The title of a click block is displayed in blue.
  +
  +ifdef::env_standard[]
  +.Example
  +--
  +--
  +
  +----
  +  [env.question]
  +  --
  +  What is the speed of light?
  +  --
  +
  +  [click.answer]
  +  --
  +  300,000 km/sec
  +  --
  +----
  +endif::[]
  +
  +ifndef::env_standard[]
  +.Example
  +--
  +--
  +
  +----
  +  [env.question]
  +  --
  +  What is the speed of light?
  +  --
  +
  +  [click.answer]
  +  --
  +  300,000 km/sec
  +  --
  +----
  +
  +.Rendered Text
  +--
  +--
  +
  +[env.question]
  +--
  +What is the speed of light?
  +--
  +
  +[click.answer]
  +--
  +300,000 km/sec
  +--
  +
  +endif::[]
  +
   
   
   == Installation
   
   === From Rubygems
   
  -The development release, currenty 1.5.0.9.dev, is at
  -https://rubygems.org/gems/asciidoctor-latex[RubyGems.org]
  -Beta alert!
  -
  -NOTE: Version 1.5.0.7 is "stable".  Version 1.5.0.9 introduces
  -
  -new syntax with switches for three 'dialects'. See below.
  -
  -There are three dialects that you can set with the `:dialect` attribute:
  -
  -- `asciidoc`
  -- `asciidoc-manuscript`
  -- `asciidoc-latex`
  -
  -See the option flag `-a` to set the dialect from the command line. For example:
  -
  - $ asciidoctor-latex -a dialect=manuscript foo.adoc
  -
  -Be sure to use XeLaTex for tex'ing.
  -
  -To set the dialect with the Ruby API, use for example :
  -
  -----
  -      Asciidoctor.convert str, { 'dialect' => 'latex' }
  -----
  +Run `gem install asciidoc-latex` to install from
  +https://rubygems.org/gems/asciidoctor-latex[RubyGems.org].
  +See the https://github.com/asciidoctor/asciidoctor-latex/blob/master/CHANGELOG.adoc[change log]
  +for a list of updates.
   
   === From GitHub
   
  
positive.code: \]
  This result extends to $n\times n$ matrices.
  --
  ----
  
  There is complete freedom in parameter `NAME`
  of `[env.NAME]`, Thus,one can write
  ----
  [env.definition]
  --
  An integer $n$ is *prime* if (a) it is not
  $\pm 1$ and (b) it has no divisors other
  than $\pm 1$ and $\pm n$.
  --
  ----
  or
  ----
  [env.joke]
  --
  
negative.code: math formats, [blue]#Asciidoc-LaTeX#
  and [blue]#AsciiMath#.
  In Asciidoc-LaTeX,
  one can write `\$ a^2 + b^2 = c^2 \$` and
  ----
   \[
      e^{2\pi \sqrt{-1}} = 1,
  