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

Option to show the link in the generated PDF #463

Closed
vogella opened this issue May 30, 2016 · 15 comments
Closed

Option to show the link in the generated PDF #463

vogella opened this issue May 30, 2016 · 15 comments
Assignees

Comments

@vogella
Copy link
Contributor

vogella commented May 30, 2016

For printouts I would like to show the URL.

http://www.vogella.com[vogella] should be become something readable.

Maybe
vogella [http://www.vogella.com]

Is this option already available? If not, could you add it?

@mojavelinux
Copy link
Member

I agree. I think we can link this to the already proposed "print" mode. We should mimic what we do in the print styles in the HTML output.

print-link

@mojavelinux
Copy link
Member

I propose the following attribute:

-a media=print

@mojavelinux mojavelinux added this to the v1.5.0.beta.1 milestone May 30, 2016
@vogella
Copy link
Contributor Author

vogella commented May 30, 2016

-a media=print

+1 assuming that the Asciidoctor Gradle task can use that.

@mojavelinux
Copy link
Member

Absolutely.

Note that this is similar to the option the DocBook toolchain named ulink.show. There's also an option ulink.footnotes which shows the link in a footnote. I'd like to start with just showing it inline. Then we can go from there.

In addition to media=print, we could also honor the individual attribute reveal-uri (or something).

@vogella
Copy link
Contributor Author

vogella commented May 30, 2016

For reference, DocBook does it already nicely:

<ulink url="https://jenkins-ci.org">Homepage of the Jenkins project</ulink> results in:
Homepage of the Jenkins project [https://jenkins-ci.org]

@mojavelinux
Copy link
Member

I prefer the round brackets to the square brackets. I think the square brackets don't kern well against the text and look too abrupt.

@vogella
Copy link
Contributor Author

vogella commented May 30, 2016

Round brackets look also fine.

As long as the link is visible in the printout. Without this option I have to decide if the HTML output will look "unusual" or if the PDF printout is harder to use, as the links are missing.

@vogella vogella changed the title Open to show the link in the generated PDF Option to show the link in the generated PDF Jun 1, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 3, 2016
- show URI for link if show-link-uri or media=print is set
- surround URI with square brackets instead of round brackets
- don't italicize URI
@mojavelinux
Copy link
Member

It turns out that this was already implemented, enabled by the showlinks attribute. However, I have updated the functionality so it works as described in this issue. Setting either of these two attributes will reveal the URI for any non-bare link:

  • show-link-uri
  • media=print

I have also surrounded the link in square brackets in normal font with a slightly reduced font size (0.9em).

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 3, 2016
- show URI for link if show-link-uri or media=print is set
- surround URI with square brackets instead of round brackets
- don't italicize URI
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Aug 4, 2016
- show URI for link if show-link-uri or media=print is set
- surround URI with square brackets instead of round brackets
- don't italicize URI
@vogella
Copy link
Contributor Author

vogella commented Aug 15, 2016

Awesome, that will remove a lot of painful editing work for me. Can a new version of the plug-in be published? I do not see v1.5.0.alpha.12 yet in bintray: https://jcenter.bintray.com/org/asciidoctor/asciidoctorj-pdf/

@mojavelinux
Copy link
Member

The new version is available only as a RubyGem at the moment. (https://rubygems.org/gems/asciidoctor-pdf/versions/1.5.0.alpha.12). We have plans to set up an automated release pipeline so that AsciidoctorJ PDF releases get triggered automatically by Asciidoctor PDF (Ruby) releases. But we're not there yet.

Btw, I'm going to be making another release in the next couple of days which bring a few more features you were looking for. Depending on Robert's availability, we might have AsciidoctorJ PDF skip the alpha.12 release and go right to alpha.13.

@vogella
Copy link
Contributor Author

vogella commented Aug 15, 2016

Btw, I'm going to be making another release in the next couple of days

Thanks for that. I'm already excited about the solution for #455, this will help me also a lot.
After these two issues, solved I will only have to fight with #464. :-)

@vogella
Copy link
Contributor Author

vogella commented Aug 23, 2016

Create a separate issue for the asciidoctorj release asciidoctor/asciidoctorj#505

@mojavelinux
Copy link
Member

👍

@vogella
Copy link
Contributor Author

vogella commented Sep 26, 2016

FYI - the old setting with :showlinks: does not work anymore. Totally fine for me, switching to :show-link-uri: is easy but I justed wanted to ensure that this is intentional and your are not breaking existing clients.

@mojavelinux
Copy link
Member

That is correct. I renamed the attribute. Since we're still in alpha, there's no guarantee for backwards compatibility (though I've been careful not to cause too much disruption).

fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this issue Dec 13, 2016
- show URI for link if show-link-uri or media=print is set
- surround URI with square brackets instead of round brackets
- don't italicize URI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants