On 4 February 2015 at 08:54, Marco Ciampa <[email protected]> wrote:
> On Tue, Feb 03, 2015 at 11:21:23PM +1100, Lex Trotman wrote:
>> On 3 February 2015 at 22:56, Marco Ciampa <[email protected]> wrote:
>> > On Tue, Jan 27, 2015 at 09:00:25AM +1000, Lex Trotman wrote:
>> >> >
>> >> > Any hint?
>> >> >
>> >>
>> >> Perhaps you should ask on the relevant toolchain list, dblatex and FOP
>> >> are both separate projects.  Whilst people here will answer if they
>> >> know, it is not specifically the purpose of this list to answer
>> >> toolchain questions.  That said, did you search the list archives, I
>> >> can't really believe that there has been no previous answer on how to
>> >> set fonts.
>> >
>> > Easy answer, no, but anyway you are right.
>> >
>> > I asked here because I imagine that, using a2x I am brought to think that
>> > somehow this is a asciidoc toolchain problem, so intrinsecly an asciidoc
>> > problem.
>>
>> Its a common misunderstanding, a2x is simply a script that runs the
>> toolchains.
>
> If it is so a common misunderstanding then someone should consider that
> users have some points here. It is because, since a2x is distributed with
> asciidoctor, its output is in a way considered a2x responsibility.
> Demanding the onus to the user to study every aspect of the backend it is
> a weakness. It is like saying that if XYX Linux distro do not work,
> distro devs are not to blame for not choosing the right version of the
> lib but just the library devs since the library that is distributed with
> is broken.

Well, Linux distros do *not* provide help for each application they
distribute, they push that upstream to the application project.
Asciidoc is a volunteer run project, as I said people will answer your
toolchain questions if they can, but there should be more expertise in
the specific toolchain on the particular toolchain list.

>
> Sorry for my bad english, I hope I have explained my point clear enough.
>
>> > In this respect I thought to report here an easy fix that I have found.
>>
>> Thank you.
>>
>> > Instead to use a2x directly, using a2x to produce docbook and then
>> > specify this option to dblatex:
>> >
>> > so instead to use
>> >
>> >  a2x test.adoc
>> >
>> > simply using
>> >
>> >  a2x -f docbook test.adoc
>> >  dblatex -b xetex test.xml
>>
>> I think you can do it from a2x with:
>>
>> a2x --dblatex-opts="-b xetex" test.adoc
>
> :-) why you assumed I did not try this?
>
> I really do not know why, but this does _not_ work on my system
> (Ubuntu Linux 14.04-64).
>
> If I use a2x I always get an error. (this:
> ...
> building additional files...
> checking if compiling is necessary...
> the output file doesn't exist
> xelatex -interaction=batchmode programma.tex
> xelatex failed
> programma.tex:93: Environment alltt undefined.
> programma.tex:93: leading text: \begin{alltt}
> programma.tex:96: \begin{quote} on input line 92 ended by \end{alltt}.
> programma.tex:96: leading text: \end{alltt}
> Unexpected error occured
> Error: xelatex compilation failed
>
> a2x: ERROR: "dblatex" -t pdf -p
> "/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s
> "/etc/asciidoc/dblatex/asciidoc-dblatex.sty" -b xetex -P
> latex.output.revhistory=0 -P doc.publisher.show=0 -P doc.collab.show=0 -s
> pdf-cover-dblatex.sty -V
> "/home/marco/Scrivania/Robotica/corso/programma/programma.xml" returned
> non-zero exit status 1
> )
>
> Using the 2 phase command instead, same options, works flawlessly.

Are you sure you used the same options shown in the dblatex command
printed in the error message?  Including the -p
"/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s
"/etc/asciidoc/dblatex/asciidoc-dblatex.sty" options?  These options
are to workaround literal layout issues with dblatex and to make the
dblatex PDF style more Asciidoc-ish.  This is where the {alltt}
package is required that causes the error you see.  It seems to not be
defined when you use xetex instead of tex.  Perhaps you can install it
in some way.


>
> BTW I observed that using first a2x to transform asciidoc to docbook and
> then pdflatex to transform docbook to pdf does not produce the same
> output of using a2x all in one command, even with the same latex options.
>
> Do not ask me why it is so. I haven't the slightest idea...

See above.

>
>> and you can set a2x options inside the asciidoc source, see
>> http://asciidoc.org/a2x.1.html which will bring you back to "a2x
>> test.adoc" and you will never forget the dblatex option :)
>
> ah veeery nice! I missed this completely!
>
> But I find this is a good and a bad thing at the same time since I could
> be using a different asciidoc processor in the future, as asciidoctor,
> and it means mixing asciidoc content data with processore specific
> options (like mixing code and data): not a good thing IMHO.

Its an option for your convenience, certainly you will have to change
it if you change processors.


>
>> > resolved all font problems. Even accented chars in section titles!
>>
>> Understandable, xetex is unicode compliant IIUC.
>
> Then why not setting xetex as default on a2x? Before you write to me, I
> already know you answer: because it is not a a2x default but a backend
> (dblatex) default, right? :-)

Well, they are the experts in dblatex, why don't they think that using
xetex by default is the right thing?

Notwithstanding it not being the dblatex default, its not the Asciidoc
default because nobody has asked for it to be and nobody has fixed the
bug you encountered above.

Cheers
Lex

>
>> > Hope will help someone. I think this should be reported on asciicod FAQ 
>> > page.
>>
>> Happy to get a PR.
>
> testing continue...
>
> --
>
>
> Marco Ciampa
>
> I know a joke about UDP, but you might not get it.
>
> +------------------------+
> | GNU/Linux User  #78271 |
> | FSFE fellow       #364 |
> +------------------------+
>
> --
> 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/d/optout.

-- 
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/d/optout.

Reply via email to