How to prevent asciidoctorpdf from inserting mailto link in PDF

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to prevent asciidoctorpdf from inserting mailto link in PDF

siddjain
I am writing an asciidoc document and converting it to PDF using asciidoctorpdf. I am using the prepress option. When my document has an email address in it e.g., myname@example.com it appears as following in the PDF



I don't want the mailto portion to be displayed in the PDF. Thus I would like following output:



How can I do this?
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

mojavelinux
Administrator
In the case the email address is bare, I agree it shouldn't present the extra annotation. It's only necessary when the linked text does not match (meaning the email is not visible).

Please file an issue.

Best Regards,

-Dan

On Mon, Oct 26, 2020 at 2:59 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I am writing an asciidoc document and converting it to PDF using asciidoctorpdf. I am using the prepress option. When my document has an email address in it e.g., [hidden email] it appears as following in the PDF



I don't want the mailto portion to be displayed in the PDF. Thus I would like following output:



How can I do this?


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-prevent-asciidoctorpdf-from-inserting-mailto-link-in-PDF-tp8289.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

siddjain
is there anything i can do in the meantime to work around this?
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

mojavelinux
Administrator
No, there is not.

-Dan

On Mon, Oct 26, 2020 at 4:10 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
is there anything i can do in the meantime to work around this?


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-prevent-asciidoctorpdf-from-inserting-mailto-link-in-PDF-tp8289p8291.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

mojavelinux
Administrator
I was wrong about the lack of a workaround. After studying the code, I found that the annotation will not be shown if you set the hide-uri-scheme attribute:

:hide-uri-scheme:
:media: prepress


It should work regardless of whether hide-uri-scheme is set, which is what I will fix.

Best Regards,

-Dan

On Mon, Oct 26, 2020 at 4:12 PM mojavelinux [via Asciidoctor :: Discussion] <[hidden email]> wrote:
No, there is not.

-Dan

On Mon, Oct 26, 2020 at 4:10 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
is there anything i can do in the meantime to work around this?


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-prevent-asciidoctorpdf-from-inserting-mailto-link-in-PDF-tp8289p8291.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-prevent-asciidoctorpdf-from-inserting-mailto-link-in-PDF-tp8289p8292.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

TonK
I run into this problem as well, although I don't specify an e-mail address.
I have: `ssh root@master.example.com` (in backtics, so it is literal text) and that gets
the `mailto` added to it as well. If I switch on `:hide-uri-scheme:` I loose all the `http[s]://` schemes
infront of all the URLs, which is even worse. I do get around by changing the inline to a code block, but that just doesn't look good.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

mojavelinux
Administrator
You seem to be looking for something else, which is to escape what appears to be an email address from processing. If you want literal monospace, you need to use the `+...+` enclosure.

I have: `+ssh [hidden email]+`

The backticks only give you monospace. It's just formatting at that point.


Best Regards,

-Dan

On Tue, Oct 27, 2020 at 2:52 AM TonK [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I run into this problem as well, although I don't specify an e-mail address.
I have: `ssh [hidden email]` (in backtics, so it is literal text) and that gets
the `mailto` added to it as well. If I switch on `:hide-uri-scheme:` I loose all the `http[s]://` schemes
infront of all the URLs, which is even worse. I do get around by changing the inline to a code block, but that just doesn't look good.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/How-to-prevent-asciidoctorpdf-from-inserting-mailto-link-in-PDF-tp8289p8294.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent asciidoctorpdf from inserting mailto link in PDF

TonK
Yes, that works.

Thank you.