Bug 550 - Problems with .Ql in mdoc
Summary: Problems with .Ql in mdoc
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Documentation (show other bugs)
Version: -current
Hardware: All All
: P2 minor
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-29 22:27 AEST by Colin Watson
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Fix punctuation in argument to .Ql (2.25 KB, patch)
2003-04-29 22:29 AEST, Colin Watson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Watson 2003-04-29 22:27:46 AEST
Punctuation characters need to be escaped in the argument to .Ql, or you end up
with the output containing things like ''! rather than '!'. Xavier Renaut
reported this in http://bugs.debian.org/191131.

I'll attach a patch in a moment.
Comment 1 Colin Watson 2003-04-29 22:29:51 AEST
Created attachment 277 [details]
Fix punctuation in argument to .Ql

There's a rationale for why \& is needed in the "Other Possible Pitfalls"
section of groff_mdoc(7).
Comment 2 Ben Lindstrom 2003-04-30 03:42:23 AEST
Have you considered this to be a bug in groff?  This is not producable under 
any of the BSDs.
Comment 3 Colin Watson 2003-04-30 04:02:26 AEST
It's documented as behaving this way for punctuation characters that end
sentences, and as far as I know groff's mdoc implementation is maintained to a
large extent by the FreeBSD team, so I rather doubt it. However, I've just asked
the groff mailing list for an opinion.

I also note that the OpenSSH man pages already use the \& construction in a
number of other places for exactly the same reason.
Comment 4 Colin Watson 2003-04-30 06:11:35 AEST
Werner Lemberg, the groff maintainer, says:

It's not a bug, it's a logical extension.  The old BSD mdoc macros are
not consequent here for reasons beyond my knowledge: Look at the `z.',
`z,', ... registers in old BSD's doc-common and you can see that `z!'
and `z?' are missing, while groff's mdoc has `doc-punct!' and
`doc-punct?'.

IMHO the OpenSSH team should apply your patch even if not necessary
for old BSD's mdoc macros.
Comment 5 Ben Lindstrom 2003-04-30 11:01:05 AEST
Applied upstream along with escaping * while we are here since it is proper, but does not 
affect us (suggested by jmc of OpenBSD). 
Comment 6 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED