Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X man does not display links #13

Closed
sorin-ionescu opened this issue Aug 22, 2013 · 11 comments
Closed

Mac OS X man does not display links #13

sorin-ionescu opened this issue Aug 22, 2013 · 11 comments
Labels

Comments

@sorin-ionescu
Copy link

Link rendering doesn't work in Mac OS X (BSD) man, v1.6c. For cross platform man pages, we need a way to specify that the links should be rendered as plain text.

@sunaku
Copy link
Owner

sunaku commented Aug 22, 2013

Are links not rendered at all (appear as blank spaces) or are they not
decorated properly (underlined and surrounded by angled brackets)?

A screenshot would help.

@sorin-ionescu
Copy link
Author

Here you go. As you can see, the email address is missing. It's in the generated roff; it's just not being displayed.

Screenshot

We need a switch that tells md2man to adhere to different man/roff versions.

@sunaku
Copy link
Owner

sunaku commented Aug 28, 2013

Sorin, please try the fix in the issue-13 branch and tell me if it works for you.

@sunaku
Copy link
Owner

sunaku commented Sep 2, 2013

@sorin-ionescu I have tried several approaches to solving this bug, but none have yielded fruitful results:

  • Using if-else conditionals to wrap the .MT and .ME e-mail address macros causes the trailing text that comes directly after the email address to be lost (it should be passed to .ME but it isn't).
  • Defining .MT and .ME once (at the beginning of the output) as simple "print whatever is passed into this macro" did not work properly. I couldn't figure out how to make Roff do that. 😓

So in the end, I think our best bet is to have man(1) on Mac OSX somehow require the "an-ext.tmac" macro definition file, which is the thing that defines the .MT and ME e-mail address macros and also the .UR and .UE general URL link macros. :neckbeard:

@sunaku
Copy link
Owner

sunaku commented Jun 29, 2014

@sorin-ionescu please try adding the following line at the top of your generated EXAMPLE.1 file and see if that causes your man(1) executable to render links:

.mso an-ext.tmac

If that doesn't work, please try:

.do mso an-ext.tmac

Thanks. 🙏

@sunaku
Copy link
Owner

sunaku commented Jul 6, 2014

I was able to try this out myself (on a Mac at a public library) but it didn't solve the problem because:

$ groff --version
...
GNU grops (groff) version 1.19.2
GNU troff (groff) version 1.19.2

The version of groff on Mac OS X is too old: it doesn't have the an-ext.tmac macro package that defines styles for email addresses and general URLs. 😰

@sorin-ionescu
Copy link
Author

Yes, Mac OS X has always suffered from old BSD Core Utilities. Unfortunately, Macs are ubiquitous.

@sunaku
Copy link
Owner

sunaku commented Jul 6, 2014

I looked into my system's /usr/share/groff/1.22.2/tmac/an-ext.tmac file and found that the UR/UE/MT/ME macros are meant to facilitate roff to HTML conversion. Since our input format is Markdown, we can convert directly into HTML instead of going through roff, so I'm going to stop using these macros in md2man in the next major release (this would be a backwards-incompatible change).

sunaku added a commit that referenced this issue Jul 15, 2014
The version of groff on Mac OS X is too old: it lacks the an-ext.tmac
macro package that defines styles for email addresses and general URLs.

    $ groff --version
    ...
    GNU grops (groff) version 1.19.2
    GNU troff (groff) version 1.19.2

This patch drops those URL macros in favor of simple angle brackets.
@sunaku
Copy link
Owner

sunaku commented Jul 15, 2014

Fixed in 371952e. Will release soon. :shipit:

@sunaku sunaku closed this as completed Jul 15, 2014
sunaku added a commit that referenced this issue Jul 16, 2014
The version of groff on Mac OS X is too old: it lacks the an-ext.tmac
macro package that defines styles for email addresses and general URLs.

    $ groff --version
    ...
    GNU grops (groff) version 1.19.2
    GNU troff (groff) version 1.19.2

This patch drops those URL macros in favor of simple angle brackets.
@sunaku
Copy link
Owner

sunaku commented Jul 16, 2014

@sorin-ionescu this fix has been released in v3.0.1. Cheers! 😺

@sorin-ionescu
Copy link
Author

Awesome. I'll test it out when I can. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants