From: Thomas Schraitle Date: Mon, 9 Sep 2013 15:00:31 +0000 (+0000) Subject: Fix for enhancement/bug#1312: Support font size in verbatim elements X-Git-Tag: release/1.79.1~6^2~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b8d51695f5e3ed54d742ebfc745f87215c670ae;p=docbook-dsssl Fix for enhancement/bug#1312: Support font size in verbatim elements --- diff --git a/testdocs/tests/screen.002.xml b/testdocs/tests/screen.002.xml new file mode 100644 index 000000000..d615a705b --- /dev/null +++ b/testdocs/tests/screen.002.xml @@ -0,0 +1,39 @@ + + +
+ +Unit Test: screen.002 +$Id: $ +ThomasSchraitle + + + + + Change Font Size Directly + If you want to change the font size directly, insert a + dbfo font-size="SIZE" + processing instruction into the respective verbatim + element: + Hello World]]> + This is used if you want to change the font size for only one + verbatim element, but leave the others intact. + + + + Change Font Size as Upper Element + If you want to change the font size for consecutive verbatim + elements, position the dbfo + font-size="SIZE" processing instruction outside the + verbatim element: + +Hello World +Hello Tux]]> + Any following verbatim elements will use the parent PI. This + is used if you want to change the font size for more than one + verbatim elements. To reset the font size, use dbfo font-size="". + + + +
diff --git a/xsl/fo/pi.xsl b/xsl/fo/pi.xsl index 463773805..28c0de3e0 100644 --- a/xsl/fo/pi.xsl +++ b/xsl/fo/pi.xsl @@ -150,6 +150,35 @@ + + Specifies “font-size” for block verbatim elements + + Use the dbfo font-size PI as a child of a + verbatim element (screen, programlisting, or + synopsis) to specify the “font-size”. + + + dbfo font-size="SIZE" + + + + font-size="SIZE" + + Specifies the font size (usually in points) + + + + + + + + + + + + + + Specifies presentation style for a funcsynopsis diff --git a/xsl/fo/verbatim.xsl b/xsl/fo/verbatim.xsl index 58f27c892..ee0d32676 100644 --- a/xsl/fo/verbatim.xsl +++ b/xsl/fo/verbatim.xsl @@ -66,16 +66,27 @@ + + + + + + - - - + + + + + +