Kallauch, Benjamin (EEIN | 16 Apr 11:24 2015
Picon

Graphical admonition in FO: Alignment?

Dear all,
 
I have some difficulties to understand how to align the List Item Graphic with the first text line in the list body. In my example (attachment) the list body seems to be aligned with the top of the graphic (the graphic has actually no surrounding white space around). The background colors and line are set manually to see better what’s going on. What I need is to align the list body text with the middle of the graphic, not the top.
 
Several tests with the fo-attribute “alignment-baseline” did not bring any solution. Here is my current stylesheet code for generating this type of admonition:
 
<xsl:template match="tip" name="volkswagen.tip.graphical.admonition">
        <xsl:variable name="id">
                <xsl:call-template name="object.id"/>
        </xsl:variable>
        <xsl:variable name="graphic.width">
                <xsl:apply-templates select="." mode="admon.graphic.width"/>
        </xsl:variable>
 
        <fo:block id="{$id}" xsl:use-attribute-sets="graphical.admonition.properties" border="thin dotted black">
                <fo:list-block provisional-distance-between-starts="{$graphic.width} + 6pt" provisional-label-separation="6pt">
                        <fo:list-item>
                                <fo:list-item-label end-indent="label-end()">
                                        <fo:block background-color="#EEFFEE">
                                                <fo:external-graphic width="auto" height="auto" content-width="{$graphic.width}">
                                                        <xsl:attribute name="src">
                                                                <xsl:call-template name="admon.graphic"/>
                                                        </xsl:attribute>
                                                </fo:external-graphic>
                                        </fo:block>
                                </fo:list-item-label>
                                <fo:list-item-body start-indent="body-start()">
                                        <fo:block xsl:use-attribute-sets="admonition.properties" background-color="#FFEEEE">
                                                <xsl:apply-templates/>
                                        </fo:block>
                                </fo:list-item-body>
                        </fo:list-item>
                </fo:list-block>
        </fo:block>
</xsl:template>
 
Does anyone has a good idea how to control alignment between list item labels and their body text?
 
Thanks, Ben.
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
Eisele, Kai Alexander | 15 Apr 12:11 2015
Picon

Listings placeable at the End of Printed Output?

Hi,

 

Is there any chance to have lists of figures, tables and examples positioned at the end of printed output (PDF documents)?

 

By default, the listings appear at the beginning of the documents right after the actual TOC.

 

Is it possible to customize a sort of document appendix, that contains the lists of figures, tables and examples?

 

Regards

 
Kai Alexander Eisele
SAP CC

 

CENIT AG 
Industriestraße 52-54 
D-70565 Stuttgart 
Phone:  +49 (0) 711-78 25-3241
Fax:    +49 (0)711 7825 44-4145

 

k.eisele <at> cenit.de

www.cenit.com

 

 


CENIT AG, Industriestrasse 52-54, 70565 Stuttgart, Tel.: +49 711 7825-30, Fax: +49 711 7825-4000, Internet: www.cenit.de
Geschaeftsstellen: Berlin, Frankfurt, Hamburg, Hannover, Muenchen, Oelsnitz, Ratingen, Saarbruecken
Vorstandsmitglieder: Kurt Bengel, Matthias Schmidt
Aufsichtsratsmitglieder: Andreas Schmidt (Vorsitzender des Aufsichtsrats), Hubert Leypoldt, Andreas Karrer
Bankverbindungen:
Deutsche Bank (BLZ 600 700 70) Kto. 1661 040 IBAN : DE85 6007 0070 0166 1040 00 SWIFT-CODE : DEUTDESS,
Commerzbank (BLZ 600 400 71) Kto. 532 015 500 IBAN : DE83 6004 0071 0532 0155 00 SWIFT-Code : COBADEFF600,
Registergericht: Amtsgericht Stuttgart
Handelsregister: HRB Nr. 19117
Umsatzsteuer: ID-Nr. DE 147 862 777

David Clunie | 14 Apr 21:45 2015

Spurious (?) spaces after/before titles in chunked HTML prev/next navigation bar

Hi

Someone noticed that in the chunked html output, there are spaces
after the title that is the previous link and before the title
that is the next link in the navfooter.

This seems to be a consequence of the (deliberate) insertion
of a non-breaking space character in the stylesheets.

See <xsl:template name="footer.navigation"/> in html/chunk-common.xsl
in docbook-xsl-ns-1.78.1.

The block <xsl:if test="$row2"/> does this, before or after the
insertion of the titles (call to <xsl:apply-templates select="$prev"
mode="object.title.markup"/>.

Since the entire template is riddled with insertions of &#160;, there
is presumably a good reason, and I am reluctant to mess with this
(e.g., just remove the <xsl:text>&#160;</xsl:text> before/after
the object.title.markup (or indeed after/before the prev and next in
row 1), without knowing why.

David
Elias Gerber | 14 Apr 12:00 2015

Different settings for chunk.section.depth for different parts

Hello everyone.

Is it possible to define different values for the parameter
'chunk.section.depth' in one book?
In my case my book has two parts, in the first part I would prefer a
chunk.section.depth value of 1, while for the second part a value of 2 would
produce nicer output.

Thanks for any hints

Elias Gerber
Kallauch, Benjamin (EEIN | 10 Apr 14:52 2015
Picon

Using imageobject twice on title page fails (FO)

Hi group.
 
I want to display an image (mediaobject) twice on my book titlepages, first on the recto page and second on the following verso page.
 
I made a simple extension to the “titlepage.templates.xml” file as proposed by Bob. Here is an XML snippet:
 
<t:titlepage-content t:side="recto">
          <mediaobject
                  t:predicate="[position() = 1]"/>
 
<t:titlepage-content t:side="verso">
          <mediaobject
                  space-before="1.5in"
                  t:predicate="[position() = 1]" />
 
When I do this with other elements (i.e. <author>), everything is fine. But if I do this with an image, the FOP complains about a previously used ID:
 
“javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Property ID "N4000E" (found on "fo:block") previously used; ID values must be unique within a document!”
 
I checked the FO-Output and indeed found the image block twice with the same ID (“N4000E”). For the other elements there is no problem, because they don’t get an ID (i.e. author).
 
Question: How can I reuse my image more than once on the recto/verso title page.
 
I could insert a second imageobject (same file) and fetch it with t:predicate="[position() = 2]” as a work around. But somehow I want to keep my code easy and clean.
 
Can anyone help? Thanks.
 
Ben
 
 
Kallauch, Benjamin (EEIN | 9 Apr 13:44 2015
Picon

Solution: Page numbers not aligned in TOC

Dear group!
 
I noticed a fuzzy looking TOC some time ago with my FO-results from FOP 1.1 and DocBook-XSL 1.78.1. The page numbers seemed  to be “misaligned” slightly. They ought to be aligned on the right side, but they were not.
 
The reason for that lies in the “toc.line” named template in fo/autotoc.xsl. Between the dotted line there is a leading and trailing space: <xsl:text> </xsl:text>. At least this causes FOP (maybe in combination with only some font types and sizes) to render misaligned page numbers.
 
Now, as a solution, try to substitute the blank space with the Unicode character &#x2004; in both lines. This helped immediately, and now my page numbers are aligned again as they should.
 
You may want to use the subsequent template code in your customization layer:
 
        <xsl:template name="toc.line">
                <xsl:param name="toc-context" select="NOTANODE"/>
                <xsl:variable name="id">
                        <xsl:call-template name="object.id"/>
                </xsl:variable>
                <xsl:variable name="label">
                        <xsl:apply-templates select="." mode="label.markup"/>
                </xsl:variable>
                <fo:block xsl:use-attribute-sets="toc.line.properties">
                        <fo:inline keep-with-next.within-line="always">
                                <fo:basic-link internal-destination="{$id}">
                                        <xsl:if test="$label != ''">
                                                <xsl:copy-of select="$label"/>
                                                <xsl:value-of select="$autotoc.label.separator"/>
                                        </xsl:if>
                                        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
                                </fo:basic-link>
                        </fo:inline>
                        <fo:inline keep-together.within-line="always">
                                <xsl:text>&#x2004;</xsl:text>
                                <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/>
                                <xsl:text>&#x2004;</xsl:text>
                                <fo:basic-link internal-destination="{$id}">
                                        <fo:page-number-citation ref-id="{$id}"/>
                                </fo:basic-link>
                        </fo:inline>
                </fo:block>
        </xsl:template>
 
 
To be honest: I have not searched the list whether there is a (or another) existent solution for the matter. So, I hope I do not bother you, if someone else posted any hint here.
 
Best regards,
Ben
 
 
Niels Müller | 6 Apr 14:32 2015
Picon

Problems with bibliography

Hi there

I have for year created my course materials with docbook 5, with no or 
very few problems at all.

Recently I reinstalled my laptop with a new Linux, Arch Linux, and after 
that my generated html pages from the docbook xml documents
started displaying:

Error: no bibliography entry: Col11 found in 
file:////home/nml/.docbook/biblio.xml

and similar for all bibliography entries.
The bibliography is built according to 
http://docbook.sourceforge.net/release/xsl/current/doc/fo/bibliography.collection.html
and worked splendidly until the reinstallation.

I searched and the only thing I found was something that indicated I had 
a similar problem 4 years ago. But the threads do not give away the 
solution, and I have no recollection about the solution.

I have tried a verbose output from xsltproc but it reveals nothing more 
than the above. The biblio.xml file has the proper url, my browser 
displays it, and it does contain the xml:id's that I refer to.

I use make and the makefile:

html:
                 rm -rf site
                 mkdir site
                 xmllint --xinclude \
                                 module.xml > /tmp/docbresolved.xml \
                                 2>./errloglint
                 xsltproc \
                                 --output site/ \
                                 docbook.xsl \
                                 /tmp/docbresolved.xml \
                                 2>./errlogxslt && \
                 tar czf site.tgz site/*
                 echo "site.tgz ready for deployment"

Does anyone have a clue or intuition?

--

-- 
Niels Muller Larsen, MSc
Programmer, Assoc Professor

Most people can do without the essentials, but not without the luxuries.
Senthilsekaran Moharajan | 6 Apr 08:11 2015
Picon

DOCBOOK to PDF & ePUB

Hello there,

I tried converting the docbook xml to pdf, but getting the warning messages as,
Warning: at xsl:variable on line 65 column 38 of math.xsl:
  SXWN9001: A variable with no following sibling instructions has no effect
Note: namesp. cut : stripped namespace before processing           Atoms Under the Floorboards
Note: namesp. cut : processing stripped document                   Atoms Under the Floorboards
WARNING: cannot add <at> xml:base to node set root element.  Relative paths may not work.
Making portrait pages on USletter paper (8.5inx11in)
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.
Element caption in namespace '' encountered in informalfigure, but no template matches.

When tried converting the docbook xml to epub, we get the below error.
Error at xsl:template on line 1275 column 30 of docbook.xsl:
  XTSE0500: The priority attribute must be absent if the match attribute is absent
javax.xml.transform.TransformerConfigurationException: Failed to compile stylesheet. 1 error detected.
at net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
at net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
at net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
at les.DocBookTransform.simpleTransform(DocBookTransform.java:26)
at les.DocBookTransform.main(DocBookTransform.java:51)


Your advice on this would be highly helpful.  Thanks.


Regards,

Senthilsekaran Moharajan
 
VERNALIS
O +91 452 439 1004 | 3603 
M +91 96009 75500 
E  Sekar.M <at> vernal.is

Vikashni Building, 760 West 80 Feet Road, Anna Nagar, Madurai 625020  
www.vernal.is

VERNALIS EMAIL NOTICE

-----------------------------------------------
The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.

Janice Manwiller | 3 Apr 14:10 2015

Body text bleeding into PDF footer

Occasionally, I get body text bleeding into the PDF footer. See the attachment.

I haven't made any changes to the body or footer height (half inch to the bottom of the page to the bottom of the footer, half inch from the bottom of the footer to the bottom of the body text), and it's difficult to predict when it will happen, although it does seem to be within list items or table cells.

It's relatively rare, but looks terrible.

Has anyone else run into this, or have a way to prevent it?

Thanks,

Janice


--
Janice Manwiller
Principal Technical Writer
Sqrrl Data, Inc.
www.sqrrl.com | <at> SqrrlData

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org
Richard Hamilton | 1 Apr 21:47 2015
Picon

Edge case with dbfo-need

I just ran into an interesting edge case when building with dbfo-need when the following conditions are true:

1) You have a dbfo-need processing instruction above an admonition (warning, tip, etc.)
2) The admonition is the last element in a section (technically, the last block element; an indexterm
doesn't change anything).
3) The dbfo-need is not activated (that is, the admonition is small enough to fit on the current page).

When these three things are true, the vertical space between the preceding paragraph and the admonition
will be smaller if there is a dbfo-need than if the processing instruction is not present.

I was running the 1.78.1 stylesheets (as well as a more recent snapshot) with no customization, Saxon, and
XEP. I don't have a version of FOP active, so I don't know if this is a problem with XEP, the stylesheets, or
something else.

I've included a short example that illustrates the problem.

Does anyone have any idea what might be going on here?

Best regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton <at> xmlpress.net

================ Sample docbook =================

<?xml version="1.0" encoding="utf-8"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0">
  <title>dbfo-need and admonition example</title>
  <section xml:id="s.shorthistory">
    <title>First section</title>
    <para>This first admonition has a dbfo-need processing instruction in front of it.</para>
    <?dbfo-need height="1in"?>
    <warning>
      <para>This one has a dbfo-need in front of it.</para>
    </warning>
  </section>
  <section>
    <title>Second section</title>
    <para>This admonition does not have a dbfo-need processing instruction in front of it.</para>
    <warning>
      <para>This one has no dbfo-need in front of it.</para>
    </warning>
  </section>
</article>
Wood Nick | 31 Mar 16:46 2015
Picon

RE: WebHelp display issues - contents expand/collapse icons, intra-topic links

Janice, Barton,

As requested, add this fix to the linkend test in the inline.xsl, as follows:

	<xsl:when test="$linkend">
       	 <xsl:variable name="targets" select="key('id',$linkend)"/>
        	<xsl:variable name="target" select="$targets[1]"/>

        	<xsl:call-template name="check.id.unique">
         	 <xsl:with-param name="linkend" select="$linkend"/>
        	</xsl:call-template>

      	  <a>
          	<xsl:apply-templates select="." mode="common.html.attributes"/>
          	<xsl:call-template name="id.attribute"/>
         	 <xsl:attribute name="href">
            	<xsl:call-template name="href.target">
            	  <xsl:with-param name="object" select="$target"/>
           	 </xsl:call-template>
          	</xsl:attribute>

	<!--Add this fix to override JQuery-->
	<xsl:attribute name="onclick">
	<xsl:text>document.location='</xsl:text>
	<xsl:call-template name="href.target">
	<xsl:with-param name="object" select="$target"/>
	</xsl:call-template>
 	<xsl:text>';return false;</xsl:text>
	</xsl:attribute>


	<xsl:apply-templates select="$target" mode="html.title.attribute"/>
	<xsl:copy-of select="$content"/>
        
	</a>
      	</xsl:when>

Regards

Nick

Gmane