asciidoctor / asciidoctor-latex

:triangular_ruler: Add LaTeX features to AsciiDoc & convert AsciiDoc to LaTeX
http://asciidoctor.org
Other
111 stars 26 forks source link

Use align/aligned instead of equation/split #68

Closed tribut closed 6 years ago

tribut commented 6 years ago

This isn't the PR I promised to allow references to equations within environments, but it allows multiple equations on one line, such as:

[env.equationalign]
--
\curl \vH &= \vj + \vj^e + \pd{\vD}{t} & \quad&\text{Faraday's law}\\
\curl \vE &= - \pd{\vB}{t} && \text{Ampere's law}\\
\div \vB &= 0 && \text{Gauss' electric field law}\\
\div \vD &= q + q^e && \text{Gauss' magnetic field law}.
--

Note that in the html output this did already work, because Mathjax allows for more than one & alignment character in split environments.

The PDF output looks exactly the same as the old solution otherwise.

Differences that do exist are not relevant to asciidoctor-latex: https://tex.stackexchange.com/q/187938