OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Numbered paragraphs


Thanks Stefan and Jens,

Both of your suggestions were useful in leading me to a possible resolution.

I tried Jens' solution, which worked as advertised, but then after looking at Stefan's, I decided to create an intermediate DocBook source with the numbering. This has the advantage of letting me merge back into the source content (like index entries) that might have been generated using the PDF.

I tried to do this in two ways. The first way was to insert a phrase with the number at the beginning of every paragraph. The second was to insert a sidebar in the same spot, then monkey with the parameters to get the sidebar contents in the outside margin (basically just change body.start.indent and body.end.indent to .5in, though I think this won't work with FO. It does work with XEP).

Both methods work, but even though it seemed a bit strange to insert sidebars all over the place, I went with the second method, which works and is valid DocBook (though if I use "real" sidebars in a book, I'll need to detect them to avoid nesting sidebars:).

Since the objective was not to get beautiful output, but rather to get a working draft that an indexer can use, this does what I need. And, it looks like it wouldn't take too much to make this look pretty good, if you wanted to have a production output that did this kind of thing.

Thanks again, Jens and Stefan, for pointing me in the right direction.

Best regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net



On Aug 1, 2014, at 3:56 PM, Stefan Seefeld <stefan@seefeld.name> wrote:

> On 08/01/2014 06:47 PM, Richard Hamilton wrote:
>> Before I dive into a customization, has anyone ever customized the fo stylesheets to generate paragraph numbers? That is, sequentially numbering every paragraph in a book from the beginning to the end.
>> 
>> The ideal would be to put them into the margin, but I'd be happy with any method that assigned a sequential number to each paragraph.
> 
> For an OMG specification I have used ordered lists to wrap all text to
> get essentially the same effect as you seem to seek (see
> http://www.omg.org/spec/VSIPL++/1.2/PDF/).
> You can find my customization in
> https://github.com/vsip/specs/tree/master/xsl, though this may look like
> a set of crude hacks to trained eyes. (Feel free to clone at your
> leisure....)
> 
>    Stefan
> 
> -- 
> 
>      ...ich hab' noch einen Koffer in Berlin...
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]