Table of Contents
Please refer to the asciidoc user’s guide: http://asciidoctor.org/docs/asciidoc-writers-guide/
This cheat sheet is also very helpful: http://powerman.name/doc/asciidoc
-
To create a single HTML document:
asciidoc <text file>
-
To create HTML Slides:
asciidoc --backend slidy <text file>
-
To create a PDF:
a2x -fpdf -dbook --fop --no-xmllint -v <asciidoc file>
-
To create an EPUB:
a2x -fepub -dbook --no-xmllint -v <asciidoc file>
Create a simple asciidoc document:
hello_world.adoc
= My Document Title :data-uri: :icons: :toc2: :numbered: == Chapter 1 some content == Chapter 2 some more content .Some Table |==== ^| Heading1 ^| Heading2 | row1 column1 content | | | row2 column2 content |==== .Some Figure image::screenshot.png[Screenshot Text]
Take a screenshot of something and put it in the same directory as this .adoc and name it screenshot.png
Use a Makefile to compile the asciidoc into HTML and PDF.
Makefile
DOCS=hello_world.adoc all: $(DOCS) html pdf epub html: $(DOCS) asciidoc -v hello_world.adoc pdf: $(DOCS) a2x -fpdf -dbook --fop --no-xmllint -v hello_world.adoc epub: $(DOCS) a2x -fepub -dbook --no-xmllint -v hello_world.adoc clean: rm -f *.html *.pdf *.epub
Compile the doc
make clean && make