This is a template repository for quick starting asciidoctor book.
It has support for, latex and bibtex, making it a great choice for STEM books
See a sample book at index.adoc and its HTML rendering at thammegowda.github.io/asciidoc-book/
Asciidoc has tools in Java, Javascript, Ruby, and historically Python. At this time, much of the tools are in Ruby. So we need to setup ruby environment properly.
rbenv
if not already found.brew install rbenv # or conda install rbenv
# other platforms, follow instructions at https://github.com/rbenv/rbenv-installer
rbenv init
rbenv install 2.7.4 # install this version
rbenv global 2.7.4 # activate env
gem install asciidoctor
gem install rouge
gem install asciidoctor-latex --pre # this is for HTML
gem install asciidoctor-bibtex
# PDF support
# gem install asciidoctor-pdf
# follow instructions on https://github.com/asciidoctor/asciidoctor-mathematical
# gem install asciidoctor-mathematical # for latex in PDF
-
IntelliJ/PyCharm with Asciidoctor plugin
-
VS Code with Asciidoctor extension
Both of them are great! I used to use PyCharm, but now I am considering VS Code, simply because enabling extensions is easier than PyCharm’s counterpart.
VS Code best settings for asciidoctor
-
Install VS Code and Asciidoc extension
-
Cmd Pallet >
Asciidoc: Change preview security settings
> Allow everything (i.e.Disable
security). Without this latex will not render -
Settings > Asciidoc >
-
Set "Full path for the asciidoctor binary/executable" as
asciidoctor -r asciidoctor-bibtex --trace
-
Disable asciidoctor-js so our above command is used to render html in live preview
-
Without the above bibtex citations wont be rendered.
-
asciidoctor index.adoc -o index.html --trace \
-r asciidoctor-bibtex
Alternatively, run ./make.sh
which has above command