From: engelbert g. <gr...@us...> - 2021-04-25 10:50:41
|
using .UR .UE properly requires knowing of the newline before and the character following ... maybe doing it in the writer is less cumbersome ... but then is it man ? ~~~ def visit_reference(self, node): """E.g. link or email address.""" # external reference (URL) if 'refuri' in node: # first the description in alternate font if node['refuri'] != node.astext(): self.body.append(self.defs['reference'][0]) self.body.append(node.astext()) self.body.append(self.defs['reference'][1]) # then the URI using .UR macros # TODO how to know previous text ended with new line self.body.append("\n.UR %s" % node['refuri']) # .UE to end # OR if not followed by punctuation mark add a blank self.body.append("\n.UE \\ ") # TODO if followed by punctuation mark do not add a blank # self.body.append("\n.UE ") raise nodes.SkipNode self.body.append(self.defs['reference'][0]) ~~~ --- ** [feature-requests:#72] rst2man: Show reference targets** **Status:** open **Group:** Default **Created:** Wed Aug 26, 2020 03:47 PM UTC by Petr Viktorin **Last Updated:** Sun Apr 04, 2021 06:58 PM UTC **Owner:** engelbert gruber Currently, the manpage writer writes a reference like `ALT TEXT <URL>` as just `ALT TEXT`, with alternate font. Would it be better to render it as, for example, `ALT TEXT [URL]`, so the information is not lost? --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |