On Thu, Mar 12, 2009 at 07:28:29PM +0100, Daniel Leidert wrote: > Am Donnerstag, den 12.03.2009, 18:22 +0100 schrieb Jakub Wilk: > > $ cat buggy.xml > > [snip] > > This is <ulink url='about:blank'> not</ulink>. > > The difference between the created manual pages with/without the space > is: > > -\m[blue]\fBnot\fR\m[]\&\s-2\u[1]\d\s+2\&. > +\m[blue]\fB not\fR\m[]\&\s-2\u[1]\d\s+2\&. > > Simply > > \m[blue]\fB not\fR\m[] > > at the beginning of a line renders with a newline in the output from > man. This could be a bug in man-db or GROFF, not docbook-xsl. CCing > Colin and attaching a minimal testcase.
In fact, you don't need the \m and \f requests. You can reproduce this with: Where is the newline coming from? This is documented in 'info groff', in the "Implicit Line Breaks" node. I've reproduced it here for your convenience (note the third paragraph; escapes such as \m and \f evidently don't count here, although I'm not sure where that's documented). Implicit Line Breaks -------------------- An important concept in `gtroff' is the "break". When a break occurs, `gtroff' outputs the partially filled line (unjustified), and resumes collecting and filling text on the next output line. There are several ways to cause a break in `gtroff'. A blank line not only causes a break, but it also outputs a one-line vertical space (effectively a blank line). Note that this behaviour can be modified with the blank line macro request `blm'. *Note Blank Line Traps::. A line that begins with a space causes a break and the space is output at the beginning of the next line. Note that this space isn't adjusted, even in fill mode. The end of file also causes a break - otherwise the last line of the document may vanish! Certain requests also cause breaks, implicitly or explicitly. This is discussed in *Note Manipulating Filling and Adjusting::. The simplest workaround in docbook-xsl would be to arrange that, whenever a space appears at the start of a line (disregarding formatting escapes), it is always prefixed with a zero-width space (\&). Here's a fixed version of your example: .TH "BUGGY" "1" "03/12/2009" "[FIXME: source]" "[FIXME: manual]" .SH "NAME" buggy .SH "TEST" .PP Where is the \m[blue]\fB\& newline\fR\m[] coming from? Regards, -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org