tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv, "Andreas Vögele" <ports@andreasvoegele.com>
Subject: Fwd: Re: mandoc rendering of \*(--
Date: Sun, 26 Dec 2010 16:34:46 +0200	[thread overview]
Message-ID: <4D175286.40708@bsd.lv> (raw)

Forgot to forward this, sorry...

> Dear Kristaps,
>
> when rendering the following example with "pod2man example.pm | mandoc"
> the character sequence "--" is rendered as "O-".
>
> --------8<--------8<--------8<--------8<--------
> =head1 Principle of Least Surprise
>
> Perl does the parsing -- no surprises.
> --------8<--------8<--------8<--------8<--------
>
> Tested with mandoc 1.10.8 from OpenBSD's source tree.
>
> Kind regards,
> Andreas

Andreas,

Note that this is being CC'd to tech@mdocml, so that this issue is
documented.  I'm pretty sure it's been reported before.

So yeah... pod2man... this is a well-known "issue" wherein

  \*(--

is assigned by a `ds' to

  \(*W-

If you look in mandoc_char.7, you'll see that *W is the special
character capital Greek omega (O).  So mandoc outputs "O-".  Makes
sense, right?

However, pod2man runs `tr \(*W-', which makes all instances of \(*W be
turned into -.  mandoc doesn't (yet) support `tr'.  So basically,
pod2man overwrites the default character behaviour of the Greek omega.

Since pod2man masks special characters in its input (it re-writes "\*(W"
as "\e*(W"), apparently they think this is ok.  I think it's a dumb
hack, but whatever.

Anyway, I'll add a note to the TODO that `tr' should be implemented.  It
doesn't look too hard and will fix the problem.

Thanks,

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2010-12-26 14:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D175286.40708@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=ports@andreasvoegele.com \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).