[docbook-apps] Re: footnote in title

2011-08-26 Thread Norman Walsh
Stefan Seefeld ste...@seefeld.name writes:
 My book title contains a footnote, which is ignored in the recto
 titlepage, but not the verso.

A book title with a footnote. Wow.

 Can anyone please point me into the right direction ? What template
 processes the title footnote in the recto / verso modes, and what change
 do I need to apply to move the footnote display onto the recto page ?

If you put this template in your customization layer:

   xsl:template match=title mode=book.titlepage.recto.mode
 ...
   /xsl:template

I believe it'll be called for the book's recto title. It's not
immediately obvious to me why the current book title processing looses
the footnote, but there's book.verso.title in titlepage.xsl that might
be a good starting place.

Be seeing you,
  norm

-- 
Norman Walsh n...@nwalsh.com  | Few men are so sufficiently
http://www.oasis-open.org/docbook/ | discerning to appreciate all the
Chair, DocBook Technical Committee | evil that they do.--La
   | Rochefoucauld


pgpqxKE5iOfKV.pgp
Description: PGP signature


Re: [docbook-apps] Re: footnote in title

2011-08-26 Thread Niels Muller Larsen

A bit early in a work to start with footnotes already at the title ;-)

Niels Muller Larsen, MSc
Programmer, Teacher

Mob: +45 2040 5740
Web: http://deformation.org
Web: http://eaaa.eu
Mail: n...@acm.org
Public key: 0xD4DB4A5E
(http://keyserver.veridis.com:11371/search?q=0xD4DB4A5E)

Help a swallow land at Capistrano.

On 08/26/11 13:01, Norman Walsh wrote:

Stefan Seefeldste...@seefeld.name  writes:

My book title contains a footnote, which is ignored in the recto
titlepage, but not the verso.


A book title with a footnote. Wow.


Can anyone please point me into the right direction ? What template
processes the title footnote in the recto / verso modes, and what change
do I need to apply to move the footnote display onto the recto page ?


If you put this template in your customization layer:

xsl:template match=title mode=book.titlepage.recto.mode
  ...
/xsl:template

I believe it'll be called for the book's recto title. It's not
immediately obvious to me why the current book title processing looses
the footnote, but there's book.verso.title in titlepage.xsl that might
be a good starting place.

 Be seeing you,
   norm



-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Re: footnote in title

2011-08-26 Thread Stefan Seefeld
On 08/26/2011 07:01 AM, Norman Walsh wrote:
 Stefan Seefeld ste...@seefeld.name writes:
 My book title contains a footnote, which is ignored in the recto
 titlepage, but not the verso.

 A book title with a footnote. Wow.

Yeah. To my defense: I didn't author it. It's a specification that I
translated from LaTeX into DocBook, and now want to make sure is (in
most aspects) as similarly rendered as the original. (The original is
here: http://www.hpec-si.org/spec-1.0-final.pdf)



 Can anyone please point me into the right direction ? What template
 processes the title footnote in the recto / verso modes, and what change
 do I need to apply to move the footnote display onto the recto page ?

 If you put this template in your customization layer:

 xsl:template match=title mode=book.titlepage.recto.mode
 ...
 /xsl:template

 I believe it'll be called for the book's recto title. It's not
 immediately obvious to me why the current book title processing looses
 the footnote, but there's book.verso.title in titlepage.xsl that might
 be a good starting place.

OK, I'll have a look. Thanks for your help.

Thanks,
Stefan

-- 

  ...ich hab' noch einen Koffer in Berlin...


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Fonto color and profiling

2011-08-26 Thread Demis Biscaro

Hello,
I'm writing a user manual and I want to insert some additional 
considerations for our technicians. However I need to hyde these 
additional considerations in the version for customers. So I've used 
successfully the profiling method in a single step, as explained by Bob 
Stayton in his book (I use Saxon processor).
Now I would like setting a different colour for these additional 
considerations.


For example:

section
titleThis is a section for customers and technicians/title
paraThi is a paragraph for customers and technicians./para
/section

section condition=tech
titleThis is a section ONLY for technicians/title
paraThis is a paragraph ONLY for technicians./para
/section

section
titleThis is a mixed section/title
para condition=techThis is a paragraph ONLY for technicians./para
paraThis is a paragraph for customers and technicians./para
para condition=techThis is another paragraph ONLY for 
technicians./para

/section


I'd like that text of paragraphs, sections, ecc. marked with 
condition=tech are displayed in a colour different from the rest of 
the document (for instance RED instead than BLACK).


I've tried to customize my stylesheet but I've obtained only partial 
results for tag like para and phrase. I suppose there is a (simple) 
general solution to this problem but I haven't found it yet.


Is there anyone that can help me?

Thank you,

Demis Biscaro

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Fonto color and profiling

2011-08-26 Thread David Cramer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

So one approach is to put something like the following in your
customization layer. This matches text nodes and xref with an ancestor
containing security=reviewer (and allows for things like
security=reviewer;internal). We have to match xref since it's an empty
element that's filled in with text later by the xslts. Then we do
apply-imports so that the nodes will be processed by the templates in
the base xslts.

For fo:

  xsl:template match=text()[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]
priority=10
fo:inline xmlns:fo=http://www.w3.org/1999/XSL/Format;
background-color=yellowxsl:apply-imports//fo:inline
  /xsl:template

For html:

xsl:template match=text()[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]span
class=remarkxsl:apply-imports//span/xsl:template

And then in your css:

.remark {
background: yellow;
}

David

On 08/26/2011 08:38 AM, Demis Biscaro wrote:
 Hello,
 I'm writing a user manual and I want to insert some additional
 considerations for our technicians. However I need to hyde these
 additional considerations in the version for customers. So I've used
 successfully the profiling method in a single step, as explained by Bob
 Stayton in his book (I use Saxon processor).
 Now I would like setting a different colour for these additional
 considerations.
 
 For example:
 
 section
 titleThis is a section for customers and technicians/title
 paraThi is a paragraph for customers and technicians./para
 /section
 
 section condition=tech
 titleThis is a section ONLY for technicians/title
 paraThis is a paragraph ONLY for technicians./para
 /section
 
 section
 titleThis is a mixed section/title
 para condition=techThis is a paragraph ONLY for technicians./para
 paraThis is a paragraph for customers and technicians./para
 para condition=techThis is another paragraph ONLY for
 technicians./para
 /section
 
 
 I'd like that text of paragraphs, sections, ecc. marked with
 condition=tech are displayed in a colour different from the rest of
 the document (for instance RED instead than BLACK).
 
 I've tried to customize my stylesheet but I've obtained only partial
 results for tag like para and phrase. I suppose there is a (simple)
 general solution to this problem but I haven't found it yet.
 
 Is there anyone that can help me?
 
 Thank you,
 
 Demis Biscaro
 
 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOV6cnAAoJEMHeSXG7afUhlykH/jrgbx90mCM0hsoh2LUopK0o
Np2FE+Su2jmf2D2/44UKA90KZIJa99EmVxJ22dRjN5E2Wrdd16mHgycTMVzltqRY
u3jM4jdyp4TEB1QvzwbJMlwL75gZYoGJKD2uo6JvPQG5VjrhEv8AiZNzFFtOVFGo
feWUdScaAaYeGABXWDBCMrvfqN3KBZFMdcWao6XOGGlkGVil5qfMRPikyPfWV6Hl
3RzQIjZg4nKIKJD0IkhUdVYzRf7GZdjsTPvb/3NSXAaSJLwNrVEUyZgGxu6PYq44
KT8ZAhdTgQmDa4cR8RQ+HEWKtJzQaTEGS8GTpuK+t5Ys3E9ZWz+xRIQWZG2nXzc=
=qT9w
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Fonto color and profiling

2011-08-26 Thread Demis Biscaro

I've applied your suggestion for fo, adding some changes:

xsl:template match=text()[
contains(concat(';',ancestor::*/@condition,';'),';tech;') ] | xref[
contains(concat(';',ancestor::*/@condition,';'),';tech;') ]
priority=10
fo:inline xmlns:fo=http://www.w3.org/1999/XSL/Format;
color=#FFxsl:apply-imports//fo:inline
/xsl:template

and it works perfectly!

Thank you a lot!

Demis


Il 26/08/2011 16.01, David Cramer ha scritto:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

So one approach is to put something like the following in your
customization layer. This matches text nodes and xref with an ancestor
containing security=reviewer (and allows for things like
security=reviewer;internal). We have to match xref since it's an empty
element that's filled in with text later by the xslts. Then we do
apply-imports so that the nodes will be processed by the templates in
the base xslts.

For fo:

   xsl:template match=text()[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]
priority=10
fo:inline xmlns:fo=http://www.w3.org/1999/XSL/Format;
background-color=yellowxsl:apply-imports//fo:inline
   /xsl:template

For html:

 xsl:template match=text()[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ] | xref[
contains(concat(';',ancestor::*/@security,';'),';reviewer;') ]span
class=remarkxsl:apply-imports//span/xsl:template

And then in your css:

.remark {
background: yellow;
}

David

On 08/26/2011 08:38 AM, Demis Biscaro wrote:

Hello,
I'm writing a user manual and I want to insert some additional
considerations for our technicians. However I need to hyde these
additional considerations in the version for customers. So I've used
successfully the profiling method in a single step, as explained by Bob
Stayton in his book (I use Saxon processor).
Now I would like setting a different colour for these additional
considerations.

For example:

section
titleThis is a section for customers and technicians/title
paraThi is a paragraph for customers and technicians./para
/section

section condition=tech
titleThis is a section ONLY for technicians/title
paraThis is a paragraph ONLY for technicians./para
/section

section
titleThis is a mixed section/title
para condition=techThis is a paragraph ONLY for technicians./para
paraThis is a paragraph for customers and technicians./para
para condition=techThis is another paragraph ONLY for
technicians./para
/section


I'd like that text of paragraphs, sections, ecc. marked with
condition=tech are displayed in a colour different from the rest of
the document (for instance RED instead than BLACK).

I've tried to customize my stylesheet but I've obtained only partial
results for tag like para and phrase. I suppose there is a (simple)
general solution to this problem but I haven't found it yet.

Is there anyone that can help me?

Thank you,

Demis Biscaro

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOV6cnAAoJEMHeSXG7afUhlykH/jrgbx90mCM0hsoh2LUopK0o
Np2FE+Su2jmf2D2/44UKA90KZIJa99EmVxJ22dRjN5E2Wrdd16mHgycTMVzltqRY
u3jM4jdyp4TEB1QvzwbJMlwL75gZYoGJKD2uo6JvPQG5VjrhEv8AiZNzFFtOVFGo
feWUdScaAaYeGABXWDBCMrvfqN3KBZFMdcWao6XOGGlkGVil5qfMRPikyPfWV6Hl
3RzQIjZg4nKIKJD0IkhUdVYzRf7GZdjsTPvb/3NSXAaSJLwNrVEUyZgGxu6PYq44
KT8ZAhdTgQmDa4cR8RQ+HEWKtJzQaTEGS8GTpuK+t5Ys3E9ZWz+xRIQWZG2nXzc=
=qT9w
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org




--
__
Demis Biscaro

RD Software
CMZ SISTEMI ELETTRONICI
Via dell'Artigianato, 21 I-31050 VASCON (TV)
Tel. +39.0422.447411  Fax +39.0422.447444
mail to: demis.bisc...@cmz.it
http://www.cmz.it
__


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] footnote in title

2011-08-26 Thread Bob Stayton

Hi Stefan,
I investigated how the book title is handled on the two title pages, and found the 
following:


a.  The recto title is processed using the template named 'division.title'.  It uses 
that template because it is specified in the titlepage.templates.xml configuration 
file for book titles (and part, set, and reference).


b.  The verso title is processed using the template named 'book.verso.title', again 
because that template is specified in the titlepage.templates.xml configuration file.


The difference is that the 'division.title' template applies templates in 
mode=object.title.markup, while the 'book.verso.title' template does not.  The 
'object.title.markup' mode engages the gentext templates in the locale file such as 
common/en.xml and then fills in the title.


However, the object.title.markup mode has a template param named 'allow-anchors' that 
allows the title to be processed in one of two modes: one with active links (normal 
mode) and one without (mode=no.anchor.mode).  The two modes are necessary because in 
some contexts (table of contents, running headers), you don't want the title to 
include footnotes, index entries, etc.


The default value of the template's param is allow-anchors=0, which means no links. 
So if you want links then you have to pass the 1 value when you apply the template. 
The stylesheets pass that param value for the primary title in most cases. 
Unfortunately, the division.title template does not do that.  I believe that is a bug, 
as division title is used only for the primary title and not for those other purposes, 
so it should support any such links.


If you want a local fix, you should copy the template named division.title from 
fo/division.xsl to your customization layer and add the param.


Change:

 xsl:variable name=title
   xsl:apply-templates select=$node mode=object.title.markup/
 /xsl:variable

to:

 xsl:variable name=title
   xsl:apply-templates select=$node mode=object.title.markup
 xsl:with-param name=allow-anchors select=1/
   /xsl:apply-templates
  /xsl:variable

That should fix the footnote.

Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: Stefan Seefeld ste...@seefeld.name

To: DocBook Apps Mailing List docbook-apps@lists.oasis-open.org
Sent: Thursday, August 25, 2011 6:43 PM
Subject: [docbook-apps] footnote in title



Hello,

I'm trying to customize a titlepage for FO / PDF, and have run into an
issue:

My book title contains a footnote, which is ignored in the recto
titlepage, but not the verso.
I'd like to only generate a recto titlepage, and thus need to modify the
recto template to render the footnote the same way the verso template
does (if it is called).

Can anyone please point me into the right direction ? What template
processes the title footnote in the recto / verso modes, and what change
do I need to apply to move the footnote display onto the recto page ?

Thanks,
   Stefan

--

 ...ich hab' noch einen Koffer in Berlin...


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] footnote in title

2011-08-26 Thread Stefan Seefeld
Hi Bob,

thanks a lot for a detailed explanation. I appreciate that.

I had actually already figured out that I may get the desired effect by
replacing a call to xsl:call-template name=division.title by a call
to xsl:apply-templates mode=titlepage.mode, though I didn't
understand what that did in detail.

I have just tried out your suggested patch, which didn't seem to make a
difference, so I may be missing something.

I'm also wondering: With both recto and verso pages, it seems like a
feature that the footnote only appears in one of the two. Doesn't your
patch cause the footnote to show up on both, recto and verso ?

Thanks again for your help,

Stefan


-- 

  ...ich hab' noch einen Koffer in Berlin...


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] footnote in title

2011-08-26 Thread Bob Stayton

Hi Stefan,
It worked for me.  Are you sure you are using division.title?  Add an xsl:message to 
your customized teimplate to confirm that it is being used.


I only addressed the issue of the recto page, as you said you were turning off the 
verso page.  My patch does not affect the verso title, because it does not use the 
division.title template.  You are probably right that the verso page should use 
no.anchor.mode for the title, since that is a secondary use of the title.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net


- Original Message - 
From: Stefan Seefeld ste...@seefeld.name

To: Bob Stayton b...@sagehill.net
Cc: DocBook Apps Mailing List docbook-apps@lists.oasis-open.org
Sent: Friday, August 26, 2011 10:07 AM
Subject: Re: [docbook-apps] footnote in title



Hi Bob,

thanks a lot for a detailed explanation. I appreciate that.

I had actually already figured out that I may get the desired effect by
replacing a call to xsl:call-template name=division.title by a call
to xsl:apply-templates mode=titlepage.mode, though I didn't
understand what that did in detail.

I have just tried out your suggested patch, which didn't seem to make a
difference, so I may be missing something.

I'm also wondering: With both recto and verso pages, it seems like a
feature that the footnote only appears in one of the two. Doesn't your
patch cause the footnote to show up on both, recto and verso ?

Thanks again for your help,

   Stefan


--

 ...ich hab' noch einen Koffer in Berlin...






-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] footnote in title

2011-08-26 Thread Stefan Seefeld
On 08/26/2011 01:19 PM, Bob Stayton wrote:
 Hi Stefan,
 It worked for me.  Are you sure you are using division.title?  Add an
 xsl:message to your customized teimplate to confirm that it is being
 used.

Yup, I did that, and it is indeed being called. I'm not sure why it
doesn't work (I'm using the 'ns' stylesheets, in case that matters).

But given that I have a workaround, I don't think this is worth to be
further debugged if it works in trunk.

Thanks again !

Stefan

-- 

  ...ich hab' noch einen Koffer in Berlin...


-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org