Skip to content

Instantly share code, notes, and snippets.

@nobuta05
Created August 23, 2020 13:27
Show Gist options
  • Save nobuta05/890870dc82711a1c502d8a62dfbe31d3 to your computer and use it in GitHub Desktop.
Save nobuta05/890870dc82711a1c502d8a62dfbe31d3 to your computer and use it in GitHub Desktop.
asciidoctor_example
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
gem "asciidoctor"
gem "asciidoctor-pdf"
gem "asciidoctor-pdf-cjk"
gem "asciidoctor-mathematical"

てすと

1. 見出し

以下が正しく表示されることを期待しています。

\[\begin{align*} \bigcup_{n\in\mathbb{N}} A_n = \liminf_{n} A_n . \end{align*}\]

以下では、定理としてblock要素となることを期待します。

とある性質

この文章はblock要素の中に記述されることを期待しています。また以下の数式も同様です。

\[\begin{align} \lambda = \bigcap_{n\in\mathbb{N}} A_n \end{align}\]

これは締めの文章です。

上記は正しく表示されているでしょうか?

vpath %.sty styles
vpath %.xsl styles
vpath %.css styles
.PHONY: all
all: output_asciidoctor-pdf.pdf output_dblatex_via_docbook.pdf output.html
output_asciidoctor-pdf.pdf: input.adoc
bundle exec asciidoctor-pdf -r asciidoctor-pdf-cjk -a scripts=cjk -a pdf-theme=default-with-fallback-font -r asciidoctor-mathematical -a mathematical-format=svg $< -o public/$@
rm stem*.svg
output_dblatex_via_docbook.pdf: input.xml myparam.xsl mytheme.sty
dblatex --texstyle=styles/mytheme.sty --xsl-user=styles/myparam.xsl -b xetex public/$< -o public/$@
input.xml: input.adoc
bundle exec asciidoctor -b docbook $< -o public/$@
output.html: input.adoc colony.css
bundle exec asciidoctor -a stylesheet=colony.css -a stylesdir=styles $< -o public/$@
.PHONY: clean
clean:
rm public/*.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment