Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Dave Pawson

Markus Innerebner wrote:

Hello to everyone,

I am trying to decrease the font size of the examples.

   para
 example
   titleMy First Example/title
   programlisting
   ![CDATA[
 root
child id=123/
 /root
  ]]
 /programlisting
 /example
   /para


Is there a way to specify it somewhere? The problem is, I have a big xml 
document,  that actually occupies the hole page.

Therefore I want to decrease the font of the example.



Use CSS (assuming html output).

Use a role attribute on the element,
then CSS to Style the output.

HTH




regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Markus Innerebner

Hi



Use CSS (assuming html output).

The output is pdf.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Tom Van de Putte

Markus,

What you need is to change the values in your xsl stylesheets.

Information on how to do that within the docbook-xsl package can be found at

http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html

Hope this is helpfull,
Tom Van de Putte.


On 5/16/07, Markus Innerebner [EMAIL PROTECTED] wrote:


Hello to everyone,

I am trying to decrease the font size of the examples.

para
  example
titleMy First Example/title
programlisting
![CDATA[
  root
 child id=123/
  /root
   ]]
  /programlisting
  /example
/para


Is there a way to specify it somewhere? The problem is, I have a big xml
document,  that actually occupies the hole page.
Therefore I want to decrease the font of the example.

Thanks for any help

Markus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Markus Innerebner
Hi Bob
The attribute-set named 'monospace.verbatim.properties' lets you set 
properties on all programlisting elements.  See this reference:


http://www.sagehill.net/docbookxsl/ProgramListings.html#ReduceFontSize

If you only want to change the size when a programlisting is within an 
example element, then you would need to use an xsl:choose statement 
within the font-size attribute setting, as shown in the example (but 
you would use a different test, testing for ancestor::example).

Thanks a lot.

So one short question arises me when reading the reference.
If I understand it correctly, it is also possible to emphasize some tags 
inside a programlisting;
This means for instance, if I want in the output the element child (and 
only that element) to be bold  I have to do something like that:


programlisting**
![CDATA[
 root
**?db-emphasised db-font-weight **font-weight=bold

   child id=123/
 /root
]]
/programlisting


xsl:attribute-set name=monospace.verbatim.properties
 xsl:attribute name=font-weight
   xsl:choose
 *xsl:when test=processing-instruction('*db-font-weight*')
   xsl:value-of 
select=processing-instruction('*db-font-weight*')/
 /xsl:when
 xsl:otherwiseinherit/xsl:otherwise*
   /xsl:choose
 /xsl:attribute
/xsl:attribute-set

thanks

Markus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Markus Innerebner

Sorry for the bad code format.
now I correct it.

programlisting
![CDATA[
root?db-font-weight=bold?
  child id=123/
/root
]]
/programlisting


xsl:attribute-set name=monospace.verbatim.properties
xsl:attribute name=font-weight
  xsl:choose
 xsl:when test=processing-instruction('db-font-weight')
  xsl:value-of select=processing-instruction('db-font-weight')/
 /xsl:when
xsl:otherwiseinherit/xsl:otherwise
  /xsl:choose
/xsl:attribute
/xsl:attribute-set

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook] How to decrease font in the code examples

2007-05-16 Thread Markus Innerebner

Bob Stayton wrote:
Well, no.  The processing instruction would be applied to the whole 
programlisting, because that is the level at which the attribute-set 
is applied.  In any case, I believe any markup inside CDATA would not 
be recognized in an XPath select statement.


If you want to emphasize only certain content, then I don't think you 
can use CDATA.  You could remove the CDATA and replace  with 
lt;, then you could wrap any words in emphasis role=strong to 
make it bold.



Ok. I am gonna do that.

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[docbook-apps] RE: [docbook] How to decrease font in the code examples

2007-05-16 Thread Mauritz Jeanson
 -Original Message-
 From: Markus Innerebner 
 
  Use CSS (assuming html output).
 The output is pdf.


[moved to the docbook-apps list, which is more appropriate in this case]


There is an attribute-set for example properties:
http://docbook.sourceforge.net/release/xsl/current/doc/fo/example.properties
.html

You can modify it in your customization layer:

xsl:attribute-set name=example.properties
use-attribute-sets=formal.object.properties
  xsl:attribute name=font-size
xsl:value-of select=$body.font.master * 0.7/
xsl:textpt/xsl:text
  /xsl:attribute
/xsl:attribute-set

This will make the font size in examples 70% of body.font.master (which is
10pt).

/MJ



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]