How Can I Autolink Bare URLs without HTTPS

I have the autolink_bare_uris markdown extension enabled. The following URL will be linked: https://forum.posit.co. But this one will not be autolinked: community.rstudio.com. The second one is autolinked here in this website, but not with LaTeX output. How can I make it autolink URLS without https?

You should be able to use <community.rstudio.com> but I think if you do not add https, a http:// will added for you in the conversion. May not be an issue if redirection from http to https exists on the website.

If you want text and url to be different then you need [community.rstudio.com](https://forum.posit.co)

More about Links with R Markdown (and Pandoc) : Pandoc - Pandoc User’s Guide

By the way, the extensions you used did not work because Pandoc can't know that without https the string is an URL. It is working on absolute URI only : Pandoc - Pandoc User’s Guide

<community.rstudio.com> doesn't work but https://forum.posit.co does.

This is a problem if I have set links-as-notes: true.

For now I will just type the full URL: https://forum.posit.co.

My bad. <url> also need to be a valid URL otherwise it is left as is by the parser and do no get picked up as a link. <https://forum.posit.co> is needed.

link as notes is broken and not working with latest Pandoc version, but this should be fixed in next Pandoc version still to be release

I mean, links as notes works for me. My problem is that I do not want community.rstudio.com to reference a footnote because nobody needs to know that it has https:// infront of it. If I try to do [community.rstudio.com](https://forum.posit.co) with links-as-notes set to true, it will create a footnote for that URL even though it is self explanatory. Is it possible to prevent that link from being a footnote even with links-as-notes: true?

I don't think so out of the box. link-as-notes is here so that Links can be read and accessed even if you print your PDF to paper, where interactive links would not shown.

It works by replacing the url latex command to create footnote. I don't think it can be selective.

Unless you do it yourself using LaTeX directly with another custom command ?

1 Like

Okay thanks for the explanation, I'll just stick with writing the full URL: https://forum.posit.co.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.