Page 1 of 1

How to insert a space after a formalpara title in DocBook FO?

Posted: Thu Dec 19, 2019 10:00 pm
by rmcilvride
Dear friends,

I'm having difficulty with FO output for DocBok <formalpara> markup. I want the FO processor to insert a space between the <title> of a <formalpara> and the <para> it contains, with no other punctuation.

Please refer to the attached image.
FormalparaOutput.png
FormalparaOutput.png (6.63 KiB) Viewed 1941 times
Here is the source code:

Code: Select all

<formalpara>
    <title>This is the output</title>
    <para>that I actually get.</para>
</formalpara>
<formalpara>
    <title>The output I need </title>
    <para>should look like this.</para>
</formalpara>
I have tried entering a space in the runinhead.default.title.end.punct paramenter, both through the Oxygen Transformation Scenario interface as well as in my FO.css customization layer, but it gets removed.

I've tried entering just a single space ( ), which gets removed. I've also tried a space in quotes (" ") and (' '), but that inserts the whole string of " " or ' ', including quotation marks. I've also tried defining a custom editor variable, such as ${space} whose value is a single space, but no results.

If I put in a colon followed by a space (: ), both the colon and the space are displayed. But simply entering a space ( ) does not display a space.

How can I insert a space between the title and the rest of the paragraph without adding it to the title in my source?

Thank you for any assistance.

Best regards,

Bob McIlvride

Re: How to insert a space after a formalpara title in DocBook FO?

Posted: Mon Jan 06, 2020 3:33 pm
by Radu
Hi Bob,

We (the Oxygen team) do not use DocBook in our internal documentation so our experience customizing it is quite limited. Maybe you can register and also ask around on the DocBook users List:

https://docbook.org/help

Coming back to your problem, this XSLT stylesheet OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/block.xsl has a template which matches the formalpara title:

Code: Select all

<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
and always seems to insert a nbsp character &#160; after it. So I'm not sure why you do not get that extra space there, I tested on my side and I have at least a space between the title and the paragraph in the generated PDF output.
Do you have some kind of XSLT customization which overrides the default behavior?
You also mention a "FO.css", the PDF publishing from DocBook uses XSL-FO processing so it has no relationship with CSS.

Regards,
Radu

Re: How to insert a space after a formalpara title in DocBook FO?

Posted: Tue Jan 07, 2020 11:48 pm
by rmcilvride
Hi Radu,

Thank you for the suggestion. We do indeed have an XSLT customization layer, and somehow when <formalpara> got redefined, the line <xsl:text>&#160;</xsl:text> was changed to <xsl:text></xsl:text>. Now it is working properly.

Appreciatively yours,

Bob