|
|
| How to decrease font in the code
examples |

|
2007-05-16 04:24:31 |
Hello to everyone,
I am trying to decrease the font size of the examples.
<para>
<example>
<title>My 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: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 04:50:12 |
Markus Innerebner wrote:
> Hello to everyone,
>
> I am trying to decrease the font size of the examples.
>
> <para>
> <example>
> <title>My 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: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 07:30:38 |
Hi
>
> Use CSS (assuming html output).
The output is pdf.
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 10:18:32 |
|
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
< markus innerebner.net">markus innerebner.net> wrote:Hello to everyone,
I am trying to decrease the font size of the examples.
<para> <example> <title>My 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: docbook-unsubscribe lists.oasis-open.org">docbook-unsubscribe lists.oasis-open.org For additional commands, e-mail: docbook-help lists.oasis-open.org">docbook-help lists.oasis-open.org
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 11:02:44 |
The attribute-set named 'monospace.verbatim.properties' lets
you set
properties on all programlisting elements. See this
reference:
http://www.sagehill.net/docbookxsl/Program
Listings.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).
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill.net
----- Original Message -----
From: "Markus Innerebner" <markus innerebner.net>
To: <docbook lists.oasis-open.org>
Sent: Wednesday, May 16, 2007 2:24 AM
Subject: [docbook] How to decrease font in the code
examples
> Hello to everyone,
>
> I am trying to decrease the font size of the examples.
>
> <para>
> <example>
> <title>My 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: docbook-unsubscribe lists.oasis-open.org
> For additional commands, e-mail: docbook-help lists.oasis-open.org
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 12:46:56 |
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/Program
Listings.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:otherwise>inherit</xsl:otherwise>*
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
thanks
Markus
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 12:50:42 |
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:otherwise>inherit</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 13:23:56 |
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 "<", then
you could wrap any words in <emphasis
role="strong"> to make it bold.
If you just want to
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs sagehill.net
----- Original Message -----
From: "Markus Innerebner" <markus innerebner.net>
Cc: "Bob Stayton" <bobs sagehill.net>;
<docbook lists.oasis-open.org>
Sent: Wednesday, May 16, 2007 10:50 AM
Subject: Re: [docbook] How to decrease font in the code
examples
> 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:otherwise>inherit</xsl:otherwise>
> </xsl:choose>
> </xsl:attribute>
> </xsl:attribute-set>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|
| Re: How to decrease font in the code
examples |

|
2007-05-16 13:27:07 |
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
> "<", 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: docbook-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-help lists.oasis-open.org
|
|