[publican-list] How to write <example>

Erich Steinböck erich.steinboeck at gmail.com
Sun Nov 15 14:02:50 UTC 2015


I'm working on existing documentation, where hundreds of examples are
defined like this:

~~~~
<example>
<title>Xxxx class</title>
<programlisting>
<![CDATA[
instance = .Xxxx~new
instance~method
]]>
</programlisting>
</example>
~~~~

When building as PDF, this show up with two blank lines at the top, and
another one at the bottom.

~~~~
+---------------
|
|
| instance = .Xxxx~new
| instance~method
|
+---------------
~~~~

By changing the markup to below, I can get rid of one blank line at the the
top, and the one at the bottom.

~~~~
<programlisting><![CDATA[
instance = .Xxxx~new
instance~method
]]></programlisting>
</example>
~~~~

But to get rid of the remaining blank line at the top, I'd have to code as
below, which I really don't like, as it makes the example XML difficult to
read and maintain (code doesn't line up nicely any more)

~~~~
<programlisting><![CDATA[instance = .Xxxx~new
instance~method
]]></programlisting>
</example>
~~~~

So I'm wondering whether Publican could be instructed to accept the initial
markup, but without any surplus blank lines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/publican-list/attachments/20151115/fe35efca/attachment.htm>


More information about the publican-list mailing list