开源软件名称(OpenSource Name):asciidoctor/asciidoctor-latex开源软件地址(OpenSource Url):https://github.com/asciidoctor/asciidoctor-latex开源编程语言(OpenSource Language):Ruby 49.4%开源软件介绍(OpenSource Introduction):Asciidoctor LaTeXTable of Contents
1. IntroductionAsciidoctor LaTeX defines an extended syntax for the AsciiDoc markup language (AsciiDoc-LaTeX) 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:
Below, we describe the main
features of AsciiDoc-LaTeX. However, since this document
will not render fully in GitHub, you
are encouraged to compile it yourself using
Asciidoctor LaTeX is developed by James Carlson, Jakub Jirutka, and Dan Allen. Display of mathematical text relies on MathJax. 2. FeaturesAsciiDoc-LaTeX 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 AsciiDoc-LaTeX environments. 2.1. Inline and displayed formulasExample
Imagine that 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 2.2. EnvironmentsExample
[env.theorem] -- The Diophantine equation \[ x^n + y^n = z^n \] for $n > 2$ has only trivial solutions -- 2.3. Click blocksA 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. Example
[env.question] -- What is the speed of light? -- [click.answer] -- 300,000 km/sec -- 3. Installation3.1. From RubygemsRun 3.2. From GitHubIf you would like to install a development version from the repository, use: $ git clone https://github.com/asciidoctor/asciidoctor-latex.git $ cd asciidoctor-latex $ gem build asciidoctor-latex.gemspec $ gem install *.gem 4. ContributingIf you wish to contribute to the asciidoctor-latex project, you should set up your environments to use Jakub Jirutka’s asciidoctor-doctest. At the moment you will need to use the version which handles dialects using
in your Gemfile. Run all tests with At the moment the tests are for the latex dialect. 5. DialectsAsciidoctor LaTeX processes three dialects of the core AsciiDoc language:
To set the dialect with the Ruby API, use for example :
6. MacrosMacros can be included in the body of an AsciiDoc-LaTeX file using the [env.texmacro] -- \def\AA{\mathbb{A}} \def\BB{\mathbb{B}} \newcommand{\set}[1]{ \{\,#1\, \} } \newcommand{\sett}[2]{ \{\,#1\, \mid\, #2\, \} } -- To include a LaTeX macro file MACRO_FILE, insert the code
7. SwitchesTex header
To generate a tex file with a minimal header, do: $ asciidoctor-latex -a header=no foo.adoc Print style
An alternate css file, Asciidoctor-LaTeX’s default form at is 8. Document formatAsciidoctor supports two closely-related
math formats, AsciiDoc-LaTeX
and AsciiMath.
In AsciiDoc-LaTeX,
one can write \[ e^{2\pi \sqrt{-1}} = 1, \] for in-line and display mathematial
text, respectively.
You will need to express dollar-denominated
currency using
escaped dollar signs, as
in the sentence, "He paid \$100 for that
theorem." In AsciiMath, one writes
[stem] ++++ e^{2\pi \sqrt{-1}} = 1. ++++ 9. AsciiDoc-LaTeX environmentsAsciiDoctor LaTeX supports an [env.theorem] -- There exist infinitely many prime numbers. -- renders as an automatically numbered theorem. Environments can contain in-line and display mathematics, e.g., [env.theorem] -- A two-by-two matrix is invertible if its determinant is nonzero, i.e., if \[ \left|\begin{matrix} a & b \\ c & d \end{matrix}\right| \ne 0 \] This result extends to $n\times n$ matrices. -- There is complete freedom in parameter [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] -- A mathematician, a philosopher, and a lawyer met at the local bar for a drink. The lawyer said ... -- One can make cross references by labeling the environment as in [env.joke#mathjoke1] -- A mathematician, a philosopher, and a lawyer met at the local bar for a drink. The lawyer said ... -- then referencing it later as <<mathjoke1>> Certain environments receive special treatment.
For numbered equations, use [env.equation] -- a^{p-1} \equiv 1\ \text{mod}\ p -- An equation number will be displayed only when a label for cross-referencing is provided, e.g., [env.equation#little-fermat] -- a^{p-1} \equiv 1\ \text{mod}\ p -- For sets of equations, use [env.equationalign] -- A & = 4\pi r^2 \\ V & = \frac{4}{3} \pi r^3 -- |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论