[docutils:bugs] Re: #497 manpage writer renders links incorrectly

engelbert gruber via Docutils-develop <[email protected]> Fri, 11 Apr 2025 21:12:42 -0000
Newsgroups gmane.text.docutils.devel
Message-ID </p/docutils/bugs/497/CAHnbgBPOP8f+tmT4CvnGptKekPa7n9HLJ57K-Si3XouqXGgjNg@mail.gmail.com>
hei

it will be in the next release.
there will be a pre release ... we are at it, but not yet there.

if you want to test before.

there are two options

--macro-references      Use man macros .UR/.UE and .MT/.ME for references
--text-references       Put references in plain text form.

macro references might turn into clickable references in the console
but the reference is invisible until you hover
if your terminal does not support OSC8 the reference is lost.
if the OSC8 support is disabled also.

text references activates references rendering in the writer.
terminals might recognize emails and URLs anyway and make them clickable
without OSC8
links should look similar to mandoc rendering.

TOD/INWORK
long references might be hyphenated/broken at inconvenient places
this can/should be influenced by the writer ... needs some testing on my
side.

cheers


On Thu, 10 Apr 2025 at 17:26, Ulya Trofimovich <
[email protected]> wrote:

> @grubert <https://sourceforge.net/u/grubert/profile/> Thanks for the fix.
> Will it be in the next release? And what options, if any, do I need to pass
> to rst2man to get the behavior as in
> https://sourceforge.net/p/docutils/bugs/discuss/thread/48dad27f08/9f79/09c4/2fe9/attachment/authors.man
> above?
> ------------------------------
>
> *[bugs:#497] <https://sourceforge.net/p/docutils/bugs/497/> manpage writer
> renders links incorrectly*
>
> *Status:* open-fixed
> *Labels:* manpage writer
> *Created:* Tue Feb 11, 2025 11:03 PM UTC by Ulya Trofimovich
> *Last Updated:* Thu Apr 10, 2025 11:43 AM UTC
> *Owner:* engelbert gruber
>
> Hi! Here's an example bug.rst file (trimmed from a real-world manpage
> AUTHORS section and changed to hide real names):
>
> $ cat bug.rst
> Aaaaa ([email protected]),`Bbb <https://github.com/cc>`_ ([email protected]),`mm <https://github.com/m>`_`nn <https://github.com/nn>`_
> and `OooOoooo <https://github.com/OooOoooo>`_.
>
> With rst2man (Docutils 0.21.2, Python 3.12.8, on linux) it is rendered as
> follows (I cut first and last output lines in the output as they obscure
> the view and are irrelevant):
>
> $ rst2man bug.rst > bug.1 && man ./bug.1
> NAME        - Aaaaa ( <[email protected]> ), Bbb <https://github.com/cc>        ( <[email protected]> ), mm <https://github.com/m>
>         <nn> and  <OooOoooo> .
>
> What I think is wrong:
>
>    1. In <nn> and <oooooooo> URI had been removed completely (note that
>    they are different from other addresses in that the substitution text is
>    the same as the last URI path component)</oooooooo></nn>
>    2. spaces surrounding email in parentheses look weird
>    3. newlines seem to be inserted at random
>
> I would like it to be rendered like this:
>
> NAME        - Aaaaa ([email protected]), Bbb <https://github.com/cc> ([email protected]), mm <https://github.com/m> nn <https://github.com/nn> and OooOoooo <https://github.com/OooOoooo>.
>
> I suspect this is the change in
> https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09,
> as I saw other changes listed in this release in the same diff with the
> breaking changes described above.
> ------------------------------
>
> Sent from sourceforge.net because you indicated interest in
> https://sourceforge.net/p/docutils/bugs/497/
>
> To unsubscribe from further messages, please visit
> https://sourceforge.net/auth/subscriptions/
>



---

**[bugs:#497] manpage writer renders links incorrectly**

**Status:** open-fixed
**Labels:** manpage writer 
**Created:** Tue Feb 11, 2025 11:03 PM UTC by Ulya Trofimovich
**Last Updated:** Thu Apr 10, 2025 03:26 PM UTC
**Owner:** engelbert gruber


Hi! Here's an example bug.rst file (trimmed from a real-world manpage AUTHORS section and changed to hide real names):
~~~
$ cat bug.rst
Aaaaa ([email protected]),
`Bbb <https://github.com/cc>`_ ([email protected]),
`mm <https://github.com/m>`_
`nn <https://github.com/nn>`_
and `OooOoooo <https://github.com/OooOoooo>`_.
~~~
With rst2man (Docutils 0.21.2, Python 3.12.8, on linux) it is rendered as follows (I cut first and last output lines in the output as they obscure the view and are irrelevant):
~~~
$ rst2man bug.rst > bug.1 && man ./bug.1
NAME
        - Aaaaa ( <[email protected]> ), Bbb <https://github.com/cc>
        ( <[email protected]> ), mm <https://github.com/m>

        <nn> and  <OooOoooo> .
~~~
What I think is wrong:

1. In <nn> and <OooOoooo> URI had been removed completely (note that they are different from other addresses in that the substitution text is the same as the last URI path component)
2. spaces surrounding email in parentheses look weird
3. newlines seem to be inserted at random

I would like it to be rendered like this:
~~~
NAME
        - Aaaaa ([email protected]), Bbb <https://github.com/cc> ([email protected]), mm <https://github.com/m> nn <https://github.com/nn> and OooOoooo <https://github.com/OooOoooo>.
~~~
    
I suspect this is the change in https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09, as I saw other changes listed in this release in the same diff with the breaking changes described above.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/docutils/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.