[kde-doc-english] Re: formatting question for <author> sections
Shaun McCance
shaunm at gnome.org
Mon Jul 11 21:20:34 CEST 2011
On Mon, 2011-07-11 at 17:39 +0200, Burkhard Lück wrote:
> Am Dienstag, 5. Juli 2011, um 21:57:04 schrieb Jack:
> > Hello,
> >
> > While preparing a new version of the KMyMoney handbook, I've noticed
> > that the <author> sections are not consistent, in that some use entities
> > <author> &author.name; &author.name.mail; </author>
> > and some are fully written out
> > <author>
> > <firstname>author</firstname>
> > <surname>author</surname>
> > <affiliation>
> > <address><email>author at wherever.net</email></address>
> > </affiliation>
> > </author>
> >
> > What I find interesting, is that in the first case, the displayed
> > handbook page only has the author's name, not his email address, but in
> > the latter case, it shows both name and email. I've tried several
> > variations, and the email address only shows up with the full
> > <affiliation><address><email> format. (The .mail entities are all
> > defined with just <email>user at host</email>.)
> >
> > I suppose it is not really important whether an author's email address
> > shows up at chapter and section headings, but I like consistency, and
> > I'm curious if this is a known issue and whether there is any point in
> > adding <affiliation><address> around the <email> either in the
> > contributor.entities file, or just within the <author> sections in the
> > docbook files.
> >
> We have a bug report about a missing email in the sonnet handbook:
> https://bugs.kde.org/show_bug.cgi?id=248576
>
> See also:
> http://lists.kde.org/?l=kde-docbook&m=122556813815680&w=2
>
> I found missing email in the generated documentation back to a VM with kde
> 3.5.9, a very old bug, but apparently unnoticed.
>
> You can use:
>
> 1) <author> &author.name; &author.name.mail; </author>
> -> no email
> 2) <author>
> <firstname>author</firstname>
> <surname>author</surname>
> <affiliation>
> <address><email>author at wherever.net</email></address>
> </affiliation>
> </author>
> -> with email
> 3)<author>
> <firstname>author</firstname>
> <surname>author</surname>
> <affiliation>
> <address>&author.name.mail;</address>
> </affiliation>
> </author>
> -> with email
>
> No 2) + 3) make the file contibutor.entities useless :(
>
> I have no clue how to solve this ....
The email element was added to the content model of author in DocBook
4.2. Prior to that, you had to use the affiliation/address/email stuff.
Untested shot in the dark (I don't know your code or processes), but you
probably just need to make a simple change to kde-ttlpg.xsl in kdoctools
(and possibly correspondingly to kde-ttlpg-online.xsl). Line 21 reads:
<xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
Change that to this:
<xsl:apply-templates mode="titlepage.mode"
select="email | affiliation"/>
More information about the kde-doc-english
mailing list