diff --git a/.gitignore b/.gitignore index 4f52b746..d53524b9 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,7 @@ tmp/ *.zip *.tar.* + +DocBook-Cookbook\.xpr + +*.xpr diff --git a/DocBook-Cookbook.xpr b/DocBook-Cookbook.xpr index 53dc56c7..82a9325f 100644 --- a/DocBook-Cookbook.xpr +++ b/DocBook-Cookbook.xpr @@ -1,9 +1,9 @@ - + - + document.types @@ -503,7 +503,11 @@ editor.font - DejaVu Sans Mono,0,13 + Source Code Pro,0,14 + + + editor.line.wrap + true editor.print.margin.columns @@ -538,19 +542,19 @@ font.for.author.v12 - Droid Serif,0,15 + Source Sans Pro,0,14 font.for.gui - DejaVu Sans Condensed,0,13 + Arial,0,14 font.for.schema - Droid Sans,0,15 + Source Serif Pro,0,14 font.for.text - Droid Sans,0,14 + Arial,0,14 key.editor.document.type.association.option.pane @@ -1615,6 +1619,8 @@ + + diff --git a/en/xml/fo/graphic-pageheader/db-graphic-pageheader.xsl b/en/xml/fo/graphic-pageheader/db-graphic-pageheader.xsl new file mode 100644 index 00000000..2e532850 --- /dev/null +++ b/en/xml/fo/graphic-pageheader/db-graphic-pageheader.xsl @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/en/xml/fo/graphic-pageheader/graphic-pageheader.xsl b/en/xml/fo/graphic-pageheader/graphic-pageheader.xsl new file mode 100644 index 00000000..a77a5867 --- /dev/null +++ b/en/xml/fo/graphic-pageheader/graphic-pageheader.xsl @@ -0,0 +1,295 @@ + + + + + logo/ + + Opensource.svg + + + + + + + + + + + + + + 1 + 1 + 3 + + + + + + 3 + 3 + 1 + + + + + + + + + + + + + + proportional-column-width( + + header + + + + + + ) + + + + + proportional-column-width( + + header + + + + + + ) + + + + + proportional-column-width( + + header + + + + + + ) + + + + + + + + + + + baseline + + + + + + + + + + + + + baseline + + + + + + + + + + + + + baseline + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/en/xml/fo/graphic-pageheader/graphic-pageheader_shortened.xsl b/en/xml/fo/graphic-pageheader/graphic-pageheader_shortened.xsl new file mode 100644 index 00000000..e2b7fc7e --- /dev/null +++ b/en/xml/fo/graphic-pageheader/graphic-pageheader_shortened.xsl @@ -0,0 +1,120 @@ + + + + + logo/ + + Opensource.svg + + + + + [...] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/en/xml/fo/logo/Opensource.png b/en/xml/fo/logo/Opensource.png new file mode 100644 index 00000000..3cdfebfd Binary files /dev/null and b/en/xml/fo/logo/Opensource.png differ diff --git a/en/xml/fo/logo/Opensource.svg b/en/xml/fo/logo/Opensource.svg new file mode 100644 index 00000000..c942b5b6 --- /dev/null +++ b/en/xml/fo/logo/Opensource.svg @@ -0,0 +1,187 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + open + source + initiative + + + R + + + + diff --git a/en/xml/fo/topic.graphic-pageheader.xml b/en/xml/fo/topic.graphic-pageheader.xml new file mode 100644 index 00000000..48e47be2 --- /dev/null +++ b/en/xml/fo/topic.graphic-pageheader.xml @@ -0,0 +1,230 @@ + + + + +
+ Inserting Text and Logos into Page Headers and Footers + + + + Peter + Schmelzer + + + + page header + page footer + header + footer + format + page + + + + graphic + logo + text + + + + +
+ Problem + You need to know how to insert text and a logo in your page + header. +
+ +
+ Solution + This example solution will place a logo on top right side of a + single-sided document or on the left/right side on a double-sided + document. Other placements are possible and will be shown in the + Discussion section. The logo is at max 1 + inch high to avoid conflicts with the body text area. Furthermore, + we will place the document title on the opposite of the logo, + centered to the logo high. The template for our solution is obtained + from 'pagesetup.xsl' style sheet. + A logo on every page in your document will give your work a + personal touch or a corporate identity. Furthermore it's a way to + protect your hard work against simple duplication through a copier + or a simple forwarding of parts of your document. + First of all you need to create a customization layer as described + in the following steps. If you have a customization layer style + sheet, you can skip the first step, otherwise follow the steps to + create your customization layer: + + + Create a customization layer as shown in . + + + Include the style sheet from into your + customization layer: + <?xml version="1.0" encoding="UTF-8"?> +<xsl:stylesheet version="1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:d="http://docbook.org/ns/docbook"> + <!-- ... --> + <xsl:include href="graphic-pageheader.xsl"/> + <!-- ... --> +</xsl:stylesheet> + + + Due to a missing attribute-set for the header or footer + content, we use the header.table Template + from the pagesetup.xsl and replace all + display-align="before" occurrences + with display-align="center". Add the modified + Template to your customization layer. + Because the header.table Template has more + than 150 lines, we skip the printout here and focus on the + logo and text placing. + If you don't want to add only the first part of our + solution and later the second one, you can include the hole + style sheet in the next step. + + + Include the style sheet into your + customization layer and modify it to fit your needs. + Subsequent, we will explain the options we will focus on: + + Placing a Logo in the Right Page Header + (<filename>graphic-pageheader.xsl</filename>) + + + graphic-pageheader/graphic-pageheader_shortened.xsl + + + + + + + + + + + + + + + + + + + + + The directory path to your logos. + + + This is the default value and will be used if no + parameters are passed. + + + We assume that your logo should be placed in the + header of all pages except title pages. You can + switch single- or double-sided with this variable. + + + A fo:block-element creates a rectangle + area on a page which can contain lists, tables or + graphics. In this demo, the document title is + visible on the left side of single-sided documents. + + + In this demo, the center position has no content, + but you can add a page number for example. + + + This is the place for our logo as described at the + top of our solution. + + + To avoid conflicts with the body text area, we + limit its height to 10mm. When you specify only + one parameter like height or + width, your logo will be scaled with + the correct aspect ratio. + + + The template which is called to import and place + the logo. + + + The file name is passed on the src attribute. + + + Our file defined at the top of our customization + layer. + + + + + Use your customization layer to transform your DocBook + document into FO. + + +
+
+ Discussion + The stylesheet graphic-pageheader.xsl creates + a logo in the right edge of your page and uses the parameter + logo.src.path to find the logo. By + default, a logo is stored in logo/. If your + logos are in a different location, change it with your XSLT + processor. For example, the following line uses the logo(s) image + source path logo.src.path parameter to find the logo(s). + This parameter is used within the position test to find the right + logo. + <xsl:param name="logo.src.path">logo/</xsl:param> +
+
+ See Also + + + Full parameter description for + fo:external-graphic + + + __________ + The Opensource-Logo is a trademark which is + owned by . This site is + not affiliated with or endorsed by the Open Source + Initiative. +
+