On Monday, March 23, 2015 at 1:18:46 AM UTC-7, Lex Trotman wrote: > > On 23 March 2015 at 18:45, Marco Ciampa <[email protected] <javascript:>> > wrote: > > On Mon, Mar 23, 2015 at 10:00:21AM +1100, Lex Trotman wrote: > >> Since the HTMLs are generated directly by Asciidoc there is no > >> toolchain to do that. Asciidoc itself can't because it is a streaming > >> processor that does not load the whole document in one go. > > [...] > > THAT is a big limit!
> Why not converting it in a 2 pass and do away with javascript? [...] And the docbook xslt toolchain produces html without javascript. > Len, is there an example of how to use the DocBook XSLT toolchain with all this? I'd like to be able to use that, and to produce PDFs, but it's taking me a while to get to it, and an example would be very useful. As far as the two-pass asciidoc, it's not technically necessary. As Lex mentions, other toolchains do this. But there's also another way to do it. I'm writing a Python script which pulls useful information from the HTML output, and then modifies the original AsciiDoc file with anchor labels and whatnot. In a sense, that's the first-pass part as an external script, and so far, it seems to be working quite well. You can implement default labels at the section level, or override them inside the document. The resulting labels are written into the anchors in the AsciiDoc file as labels (which are ignored by the html5 backend), and then all the links that refer to those same anchors are rewritten with the labels if necessary. The script is still being worked on, but I'm pretty pleased with how it's going. I can do a fuller writeup later if anyone's interested. —Ken -- 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.
