Created
August 23, 2020 13:27
-
-
Save nobuta05/890870dc82711a1c502d8a62dfbe31d3 to your computer and use it in GitHub Desktop.
asciidoctor_example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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