Introduction
At this point there are two types of output that are supported from Asciidoctor: HTML and PDF. The same source file can be used to generate both types of output files, just using different commands from the tools that have been installed.
For simplicity, use the tools installed as part of the setup. The itc_gentools package should cover the majority of output generation for HTML and PDF files automatically.
The itc_gentools script provides a simple method for creating the HTML and PDF files automatically using the Asciidoctor tools that were installed during the setup.
The itc_gentools is maintained in its own repository here. The latest version will always be available at this location. Additional documentation will also be maintained here.
The itc_gentools Ruby Gem Package
The itc_gentools package can be found at the itc_gentools repository. The latest version is listed in the README.
Installation of itc_gentools
To install the package, you will need to download the GEM file for the latest version. On the home page of the tool, click the link for the latest version. On this page you will see a file called
itc_gentools-X.Y.Z.gem
where X.Y.Z is the version number. Download this file so you can access it via the Ruby command prompt.
The installation process assumed you have already installed Ruby on the computer as specified in the setup instructions. If you have not, then do that now. |
To install the Gem, run the command
gem install itc_gentools-X.Y.Z.gem
(remember to enter the proper version number).
The itc_gentools.rb script provides a simple method for creating the HTML and PDF files automatically using the Asciidoctor tools that were installed during the setup.
Generating Output
Once you have placed the Asciidoctor file into the <input> folder, to generate output, run the following command:
itc_gentools <output type> <source file>
Running the script without any parameters will show a help message.
If you are embedding any images (as opposed to generating them like through ditaa), make sure you copy the images folder along with the Asciidoctor file to the input folder. |
The following <output type> parameters are accepted (not case sensitive).
Parameter | Description |
---|---|
html |
produces an HTML file from the source file |
produces a PDF file from the source file |
|
both |
produces both HTML and PDF files from the source file |
The script checks for the existence of an output file by the same name before publishing the file (Asciidoctor will automatically overwrite the file by default). If the output file already exists, the script will abort. This especially important when using "both" as the output type since it means you will not have files generated from different versions of the same source file.