You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into why some of my Arxiv abstracts' URL links to Github (using LaTeX \url{}) looked weird when I expected them to be rendered in inline code markup (because a URL is code, and not natural language), and was surprised to see that it looks like the intended use is for you to set CSS on the uri class that a regular autolink generates:
$ echo 'Code is available at <https://github.com/ibm/sau-explore>' | xclip -in
$ xclip -o | pandoc -f markdown -w html
<p>Code is available at <a href="https://github.com/ibm/sau-explore" class="uri">https://github.com/ibm/sau-explore</a></p>
I didn't see any documentation about the purpose of this class, and am guessing from the changelog & the discussion in #4913 but OK, fair enough. I think it would be good to style the contents of an autolink using inline code formatting since it is a literal formal computer language, and often completely opaque to a human reader, however, I can work with uri class. But then, why isn't uri anywhere in my abstracts...?
Turns out, Pandoc is inconsistent in its treatment of autolinks: the LaTeX reader does not set the class like the Markdown reader does:
$ xclip -o | pandoc -f latex -w html
<p>Code is available at <a href="https://github.com/ibm/sau-explore">https://github.com/ibm/sau-explore</a></p>
$ xclip -o | pandoc -f latex -w markdown | pandoc -f markdown -w html
<p>Code is available at <a href="https://github.com/ibm/sau-explore" class="uri">https://github.com/ibm/sau-explore</a></p>
A check of the AST verifies that the problem is that the LaTeX reader doesn't set the uri class when it reads in & converts the \url{} to an autolink, but the Markdown reader does set it on autolinks:
So it seems that not all readers which support autolinks remember to set the class. (I haven't checked if this applies to autolinked email addresses as well, but seems likely.)
The text was updated successfully, but these errors were encountered:
I was looking into why some of my Arxiv abstracts' URL links to Github (using LaTeX
\url{}
) looked weird when I expected them to be rendered in inline code markup (because a URL is code, and not natural language), and was surprised to see that it looks like the intended use is for you to set CSS on theuri
class that a regular autolink generates:I didn't see any documentation about the purpose of this class, and am guessing from the changelog & the discussion in #4913 but OK, fair enough. I think it would be good to style the contents of an autolink using inline code formatting since it is a literal formal computer language, and often completely opaque to a human reader, however, I can work with
uri
class. But then, why isn'turi
anywhere in my abstracts...?Turns out, Pandoc is inconsistent in its treatment of autolinks: the LaTeX reader does not set the class like the Markdown reader does:
A check of the AST verifies that the problem is that the LaTeX reader doesn't set the
uri
class when it reads in & converts the\url{}
to an autolink, but the Markdown reader does set it on autolinks:So it seems that not all readers which support autolinks remember to set the class. (I haven't checked if this applies to autolinked email addresses as well, but seems likely.)
The text was updated successfully, but these errors were encountered: