From: Michael Smith Date: Tue, 4 Mar 2008 04:20:37 +0000 (+0000) Subject: Deal with case of verbatim environments that have a linebreak X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=189e4f3447dd65cb3155df103f2ee2d0b1dcf678;p=docbook-dsssl Deal with case of verbatim environments that have a linebreak after the opening tag. Assumption is that users generally don't want that linebreak to appear in output, so we do some groff hackery to mess with vertical spacing and close the space. --- diff --git a/xsl/manpages/block.xsl b/xsl/manpages/block.xsl index 4d4b32a49..0dd46f206 100644 --- a/xsl/manpages/block.xsl +++ b/xsl/manpages/block.xsl @@ -121,6 +121,17 @@ + + + + + + + + + Yes + + @@ -185,10 +196,48 @@ - .BB lightgray + + + + + + t + + .sp -1 + + .BB lightgray + + adjust-for-leading-newline + + + + .sp -1 + + + .BB lightgray + + - .EB lightgray + + + .EB lightgray + + adjust-for-leading-newline + + t + + + + + + .sp 1 + + + + .EB lightgray + + diff --git a/xsl/manpages/other.xsl b/xsl/manpages/other.xsl index 7c9ce2f37..9572df3df 100644 --- a/xsl/manpages/other.xsl +++ b/xsl/manpages/other.xsl @@ -802,6 +802,9 @@ db:manvolnum .. .de EB .if t \{\ +.if "\\$2"adjust-for-leading-newline" \{\ +.sp -1 +.\} .br .di .in @@ -810,7 +813,12 @@ db:manvolnum .nr BW \\n(.lu-\\n(.i .nr BH \\n(dn+.5v .ne \\n(BHu+.5v +.ie "\\$2"adjust-for-leading-newline" \{\ +\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] +.\} +.el \{\ \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[] +.\} .in 0 .sp -.5v .nf