List Info

Thread: Chapter names in xrefs to sections




Chapter names in xrefs to sections
user name
2006-09-25 01:24:32
Hi

I have a book with a couple of chapters. I often use xref to
link to
specific sections. My trouble is that when I do xref to a
section, then
the link text doesn't indicate the chapter where the
section is placed.
For example:

<book>

<chapter>
<title>First chapter</title>
<sect1 id="section.1_1">
<title>First section</title>
<para>Blah</para>
</sect1>
</chapter>

<chapter>
<title>Second chapter</title>
<sect1>
<title>First section (of second chapter)</title>
<para><xref linkend="section.1_1"
/></para>
</sect1>
</chapter>

</book>

Now, the resulting xref text says
  the section called “First section”
But I would like to see a text that says
  the section called “First section” (in the chapter
"First chapter")

Otherwise if a reader will try to find by hand (instead of
just clicking
on a link) the target section then he will probably search
for the
section called “First section” within the second chapter.
When section
numbering is turned on (by section.autolabel parameter),
this gets even
worse. Upon seeing xref text like
  Section 1, “First section”
reader is easily fooled into searching for section number 1
within the
same chapter, so I would to see here something like
  Section 1, “First section” (in the chapter 1, "First
chapter")

It would be even better if only the xrefs pointing outside
of the
chapter have this additional "(in the chapter
..." part. Xrefs that stay
within the same chapter don't need them.

Any idea how to do achieve this behavior ?

-- 
Michalis

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )