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] Embedding indexterms for fo and html


Bob and Paul,

It indeed does look like the problem is whitespace around indexterms. I created a small example to illustrate the problem, and when I had something like:

here's some text <indexterm>
<primary>an index term</primary>
</indexterm>some more text

there was no problem. But, if I had this:

here's some text <indexterm>
<primary>an index term</primary>
</indexterm>
some more text

I would get extra space between "text" and "some more text"

The same thing happens if you have the following:

here's some text <indexterm>
<primary>an index term</primary>
</indexterm>
<indexterm><primary>another term</primary></indexterm>some more text

That may be unavoidable, given that the parser can't completely eliminate space between two elements that have white space between them. Otherwise all sorts of other things would no doubt break. However, now that I understand what's going on, it's easy to get what I need and avoid problems.

Thanks for your help.
Dick

On Mar 8, 2012, at 12:11 PM, PC Thoms wrote:

> When it comes to whitespace around index terms check out the following:
> 
> http://docbook.org/tdg51/en/html/indexterm.singular.html  See 
> Whitespace around index terms
> 
> A new line or whitespace before, or after, an <indexterm/> is very likely to produce a pdf index you won't be happy with.
> I only know about this because it is a problem I encountered previously.
> Hope this is helpful
> Paul
> 
> On Thu, Mar 8, 2012 at 4:26 PM, Bob Stayton <bobs@sagehill.net> wrote:
> Hi Dick,
> The stylesheets should not be inserting any white space for indexterms.  However, the XSLT processor might if the stylesheet customization layer has <xsl:output indent="yes"/>.  For FO output, that indent property should always be set to "no" to avoid adding such spaces.
> 
> If you have indent="no" and are still getting white spaces, I'd like to investigate further.
> 
> 
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- From: "Richard Hamilton" <hamilton@xmlpress.net>
> To: "Bob Stayton" <bobs@sagehill.net>
> Cc: "Xmplar" <info@xmplar.biz>; <docbook-apps@lists.oasis-open.org>
> Sent: Thursday, March 08, 2012 11:43 AM
> Subject: Re: [docbook-apps] Embedding indexterms for fo and html
> 
> 
> 
> I use a simple set of macros in nxml mode that make things very easy.
> 
> Once nice thing, which may have been discussed before, would be if the stylesheets could somehow avoid inserting extra spaces in the text in the places where index terms are included. I've ended up only putting index terms at the beginning or end of paragraphs or immediately after titles to avoid that problem. It would be nice to be able to put them exactly where the term is in the text, so that if there's a break in the middle of a paragraph, the index entry still points to the right place.
> 
> Dick Hamilton
> On Mar 8, 2012, at 11:25 AM, Bob Stayton wrote:
> 
> My experience is that a good index is made by an iterative process. The first pass of adding entries will have small inconsistencies in vocabulary, groupings, see, and see also. The index person has to be able to process the entries, review the index, and make adjustments in the indexterms.
> 
> For adding indexterms, a macro or two in your XML editor can speed things up quite a bit.
> 
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- From: Xmplar
> To: docbook-apps@lists.oasis-open.org
> Sent: Thursday, March 01, 2012 9:13 PM
> Subject: [docbook-apps] Embedding indexterms for fo and html
> 
> 
> I'm just starting to experiment with the automatic index generation, following the procedure in The Complete Guide, and wondered if anyone would like to comment on how they approached the procedure to generate indexes for PDF and HTML output. Are there any shortcuts to specifying the indexterms? Did you do any post-generation editing for the HTML index? It'd be great to get some insight.
> Thanks,
> 
> -- 
> Dave Gardiner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> 
> 



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