Hello,

Yes, I'm impatient! :)
I finally figured out how to solve this: you have to use a custom style
containing this line:

*\usepackage{upquote}*


If you don't already have 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, don't forget to do it this way:

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

If it can help someone I'd be happy! :)

Regards,
Joseph



On Tue, Sep 3, 2013 at 11:09 PM, Joseph Herlant <[email protected]> wrote:

> Also tried to put the passthtough block below but it never appears in the
> pdf.
> It seems that all the latex code gets eliminated even before it generates
> the xml file destinated to dblatex...
>
> ++++
> \begin{lstlisting}[language=bash,firstnumber=1,upquote=true,]
> awk '{print $1}'
> \end{lstlisting}
> ++++
>
>
>
>
> Le mardi 3 septembre 2013 22:46:26 UTC+2, Joseph Herlant a écrit :
>
>> Hello,
>>
>> When I write som 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}’*
>>
>> Which I cannot copy/paste to a terminal without generating errors.
>>
>> I know how to correct that as soon as I have the .tex file, but I would
>> like to know how to correct this directly from asciidoc.
>>
>> In .tex file, I add "upquote=true" like this:
>>
>> *\begin{lstlisting}[language=bash,firstnumber=1,upquote=true,]*
>> *awk '{print $1}'*
>> *\end{lstlisting}*
>>
>>
>> Does anyone know how to add the upquote option directly from asciidoc?
>> This would be really great!
>>
>> Thanks a lot for any help.
>>
>> Regards,
>>
>> Joseph
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "asciidoc" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/asciidoc/GqqyRost9KA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to