Re: [docbook-apps] How to remove extra newline in programlisting

2010-10-13 Thread John W. Shipman

On Wed, 13 Oct 2010, Jason Gilmore wrote:

+--
| I am however running into a strange issue involving programlisting
| elements in which the enclosed text is delimited by ![CDATA[...]].
| When I convert from Docbook to PDF using oXygen (using the Saxon 6.5
| transformer), my program listing's include two extra newlines at the
| top and one at the bottom when the programlisting's look like this:
+--

Here's how I format code snippets (with a little context to show the
indentation):

para
  This code destroys Western Snivelization:
/para
programlisting role='outFile:hardloop.bas'

 10 PRINT BASIC IS OLDER THAN DIRT

  20 GOTO 10
  30 END
/programlisting
para
  And now...
/para

We're especially sensitive to how programlisting works because we
use this element for literate programming: the code snippets are
the ones that get executed.  Remarks on the above example:

 a. Whitespace, including newlines, is always allowed before the
closing '' of a tag.

 b. We use the 'role' attribute, which is reserved for application
use, to mark the source file to which each fragment is written.
The lines written to file hardloop.bas look like this:


  10 PRINT BASIC IS OLDER THAN DIRT
  20 GOTO 10
  30 END


 c. Note that the first code line is misaligned relative to the
following line because of the ''.  This is annoying only while
you're editing the source; it looks correct in HTML and PDF
output.

With CDATA it'd look like this:

programlisting

![CDATA[   10 PRINT BASIC IS OLDER THAN DIRT

  20 GOTO 10
  30 END
]]/programlisting

Here's a boatload of literate programming examples and some pointers
to the why and how in our local practice:

http://www.nmt.edu/~shipman/soft/litprog/

Happy happy joy joy,
John Shipman (j...@nmt.edu), Applications Specialist, NM Tech Computer Center,
Speare 119, Socorro, NM 87801, (575) 835-5735, http://www.nmt.edu/~john
  ``Let's go outside and commiserate with nature.''  --Dave Farber

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] DocBook-XSL 1.76.1-RC2 for preliminary testing

2010-10-13 Thread Keith Fahlgren
Hi,

The second release candidate for DocBook-XSL 1.76.1 is ready for your
testing at: https://sourceforge.net/projects/docbook/files/

This is an unstable release and MUST NOT be used in production
environments. If no bugs are reported, the stable 1.76.1 release
should follow this one soon.

If you're reported a bug against 1.76.0 or the RC-1: thank you. If
we've said that
it's been fixed, please verify that it has been in the Release
Candidate and let us know in the original bug ticket.

If you spot a new bug, please report it here:
https://sourceforge.net/tracker/?group_id=21935atid=373747


Keith

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org