/asciidoc-theme

Asciidoctor PDF Themes to generate PDFs from AsciiDoc files

Primary LanguageShellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

LD AsciiDoc Theme

General Infos

This is a repository containing several themes to be used with Asciidoctor PDF. An in-depth theming guide can be found in the Asciidoctor PDF Theming Guide.

Following themes are part of this repository:

Please note that the themes may include our name, Liberale Demokraten - Die Sozialliberalen, at some parts, e.g. in the footer. But you should change that before you publish anything using these themes. The license of this project as well as the copyright notes below do not permit you to publish any content in the name of the authors or copyright holders unless explicitly permitted after all.

Sample PDF Files

Some sample PDF files (in German) can be found in the below links:

NOTE: The images and logos displayed in the linked PDFs may be protected, trademarked or otherwise copyrighted. Therefore, they also aren't covered by the license of this project itself, unless explicitly stated so. See the images folder for more.

Requirements

Installation

The installation of the theme is quite straightforward. Just clone this repository locally in a folder or download it as ZIP and unzip it. That's it. However, the above requirements should also be met for the theme to be used.

Linux Users

Simply install asciidoctor and asciidoctor-pdf with your distribution's package manager (e.g. apt-get). Should that not work for you, install ruby and call gem install asciidoctor and gem install asciidoctor-pdf in the shell.

Windows Users

For Windows users, this might be a bit trickier. Here, you can start by installing the RubyInstaller and then run gem install asciidoctor and gem install asciidoctor-pdf in the shell (e.g. PowerShell). To run the pdfconverter.sh script, you may need to install Cygwin. Alternatively, use a Linux distribution on your Windows machine using WSL, e.g. Debian for WSL and proceed as described above for Linux users.

Usage

With just Asciidoctor PDF

The classic usage (without pdfconverter.sh) is pretty straightforward as it is. Just call the following on your shell:

$ asciidoctor-pdf -a pdf-theme=ld-theme_plain.yml -a pdf-fontsdir=fonts/ document.adoc

The output will be document.pdf in the same direcotry.

With the Provided Script

However, with the pdfconverter.sh script, the usage is slightly easier:

$ bash pdfconverter.sh document.adoc

The above line equals to the same as the first example. With the script however, you can also easily specify which theme to use with the script:

Usage: bash pdfconverter.sh document.adoc [options]

options:
  -b | --braille
    Use the more accessible (braille) theme

  -c | --colored
    Use the colored theme

  --compass
    Use the compass theme

  -f=document.adoc | --filename=document.adoc
    convert the file 'document.adoc'

  -h | --help
    show usage (in German) and exit

  -v | --version
    show versioning information (in German) and exit

NOTE: The plain theme is set as the default theme. You can however also add a '-p' for it if you wish so.
CAUTION: The latest option may overwrite previously entered ones.

Writing an AsciiDoc

The themes are to be used to generate PDFs from AsciiDoc files. AsciiDoc files are just plaintext files written with the AsciiDoc syntax, slightly similar to but not the same as markdown. The sample .adoc files within this repository are written in AsciiDoc. You may find further information within the AsciiDoc Quick Reference.

Authors

The themes, documents and the shell script were written by Kasim Dönmez on behalf of the Liberale Demokraten - Die Sozialliberalen.

Copyright

Copyright © 2020 - present Liberale Demokraten - Die Sozialliberalen. Free use of this theme and the bash script is granted under the terms of the BSD 3-Clause license. For the full text of the license, see the LICENSE.txt file. All documents such as adoc and PDF files with the exception of the software documentation and the software itself are licensed under CC BY-SA 4.0 International.

Please note that some resources such as images and fonts, if present, might be licensed under different terms and be otherwise copyrighted or trademarked. See the directories images and fonts for further details.

The use of the resources provided by this project shall be done in a way that your modifications to the code, distribution thereof or use of the provided files does not imply any endorsement by the authors or copyright holders of this project. You shall not use this project or contents thereof in the name of the authors or copyright holders unless explicitly permitted.