On 26 May 2011 12:25, Gary Funck <[email protected]> wrote: > On 03/22/11 19:35:22, Lex Trotman wrote: >> Well, for HTML and xhtml generated by ASCIIDOC I don't believe that >> there is any way to refer to the section (paragraphs are not numbered) >> numbers. >> >> For pdf and HTML generated by dblatex or fop all numbering and the >> format of cross references is determined by these toolchains so there >> is some possibility, but isn't controlled by asciidoc. >> >> dblatex probably requires changing the latex stylesheet, whilst fop >> could require that you change the XSL that converts docbook to fo. >> >> Or to put it simply, I don't know a way without a lot of effort. > > We also have an application that requires paragraph numbering.
Hi Gary, you don't say what your backend is. For xhtml you can number paragraphs using css generated content with a counter. I havn't tried figuring out how to generate references to it though. It is easy to configure asciidoc html backend to generate an <a> entity before each paragraph. For other backends you need to look at its options. It may need configuration in asciidoc and the backend, but docbook does allow references to access their content remotely so it should be possible to get it to refer to the paragraph number, maybe :-) I would investigate your backend more completely before I wrote a frontend processor, remember I didn't say its impossible, just that it might take a bit of effort to ferret out the method for each backend you want to use. And if you do please post the answer here so we can put it in a FAQ or similar for others. > > Would some sort of pre-processor make sense that inserts the > paragraph numbers explicitly (using some sort of tag), as > well as creating hyperlinks from the reference to the > paragraph? Is that idea feasible/practical? Possible, but would have to be specific to each backend I think. Cheers Lex -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/asciidoc?hl=en.
