Joseph Herlant
version 1.0.0, 2014-02-27 : Initial version

1. Issue

When you write some block of code with apostrophes, these are transformed by pdflatex to backquotes. For example, this asciidoc block:

 [source,bash]
 -----
 awk '{print $1}'
 -----

Gets transformed to:

awk ’{print $1}’

And when it’s in an IT procedure from which you use some copy/paste, it can quickly become a nightmare.

2. Solution

Add this line at the end of your style file:

\usepackage{upquote}

If you don’t already have a custom one, copy the default one (/etc/asciidoc/dblatex/asciidoc-dblatex.sty) and add the line above at the end of it.

To generate the document using the custom style file, do it this way:

a2x -fpdf -L --dblatex-opts=" -s <CUSTOM_STYLE_FILE_PATH>" <ASCIIDOC_TEXT_FILE>