How do I add a link to an external published article in a comment? I don't see the edit frame with the link button. What is the syntax I can use? (I did search Meta but did not see ...!)
1$\begingroup$ I swore I used to be able to use standard HTML <a href=" "> to do this, but testing it a couple times I can now not get it to work... $\endgroup$– Sam HopkinsJul 21, 2022 at 23:27
1$\begingroup$ @SamHopkins HTML can be used in posts - not everything, but links in the form you specified do work: What HTML tags are allowed on Stack Exchange sites? (Although I recall warnings that mixing HTML and MarkDown might lead to some problems.) Personally, I don't remember a possibility of using HTML in comments - I found some related feature requests, for example, this one: Why can't we have simple HTML in comments? It is from 2009 - so at the time, HTML in comments was not supported. $\endgroup$– Martin SleziakJul 22, 2022 at 5:59
3$\begingroup$ May I suggest at minimum a title and preferably a doi link if available. The publisher urls can rot more easily, and a title helps the reader (and any further maintenance in the future) $\endgroup$– David Roberts ModJul 22, 2022 at 13:55
3$\begingroup$ Very much seconding @DavidRoberts's request. A huge chunk of my editing activity is hunting down posts with links to "here" or "this paper" … especially if such links go to non-Wayback'd personal pages, they are likely to rot and subsequently to be useless without some indication where they once pointed. $\endgroup$– LSpiceJul 26, 2022 at 20:06
To make a link in a comment you can use the
[text](url) syntax. (And, of course, you can use simply a bare URL - but I assume you want something nicer. Having some description of a link is useful for the users reading the comment, too.) The same syntax is possible in posts. (Although in posts there are other possibilities how to use links. Moreover, when composing or editing a post, you can insert a link using the built-in editor.)
For example, the following syntax works both in a post and in comments:
Link to a question on meta: [Hyperlink in a comment?](https://meta.mathoverflow.net/q/5410) This looks probably slightly better than a bare URL: https://meta.mathoverflow.net/q/5410
In the first comment under this post you can see how this looks in a comment - it looks approximately like this:
Link to a question on meta: Hyperlink in a comment? This looks probably slightly better than a bare URL: https://meta.mathoverflow.net/q/5410
(As pointed out by LSpice, MO links are usually expanded in a post to full title - so putting just
https://meta.mathoverflow.net/q/5410 in a post renders like this: Hyperlink in a comment?. However, this is not true for external links - and in the comments the link to MO posts are not changed in this way either. Comments have some special links called magic links; such as
[so], etc - they are expanded to a link with the full title of the site.)
- Help center: How do I format my posts using Markdown or HTML? - specifically the section "Comment formatting"
- Inline links in comments (Meta Stack Exchange)
- How do you cite a reference in a comment? and other posts linked there (Mathematics Meta)
- How do comments work? (Meta Stack Exchange) - the section "How can I format and link in comments?"
A basic information about formatting in comments is displayed after you click on "help" when you're in the window for posting a comment. (Similar screenshot can be found in this post.)
The above concerns using (inline) links in comments. Since you have explicitly mentioned a "published article" I will add that using the citation helper (in the editor) and then copy-pasting the result in a comment will not work the same way as in a post.
For example, this works in a post, but not in a comment:
<cite authors="Dashiell, F. K. jun.">_Dashiell, F. K. jun._, [**Isomorphism problems for the Baire classes**](http://dx.doi.org/10.2140/pjm.1974.52.29), Pac. J. Math. 52, 29-43 (1974). [ZBL0291.46021](https://zbmath.org/?q=an:0291.46021).</cite>
However, simply removing the parts with
</cite> yields a result which IMO looks acceptable in a comment.
_Dashiell, F. K. jun._, [**Isomorphism problems for the Baire classes**](http://dx.doi.org/10.2140/pjm.1974.52.29), Pac. J. Math. 52, 29-43 (1974). [ZBL0291.46021](https://zbmath.org/?q=an:0291.46021).
(I have used the format exactly the same as generated by the citation helper - of course, depending on personal preferences, I can imagine that some users might change it slightly.)
1$\begingroup$ Link to a question on meta: Hyperlink in a comment? This looks probably slightly better than a bare URL: meta.mathoverflow.net/q/5410 $\endgroup$ Jul 21, 2022 at 17:32
1$\begingroup$ This version is not suitable in a comment: <cite authors="Dashiell, F. K. jun.">_Dashiell, F. K. jun._, Isomorphism problems for the Baire classes, Pac. J. Math. 52, 29-43 (1974). ZBL0291.46021.</cite> $\endgroup$ Jul 23, 2022 at 12:38
1$\begingroup$ But it looks fine after a very minor modification: Dashiell, F. K. jun., Isomorphism problems for the Baire classes, Pac. J. Math. 52, 29-43 (1974). ZBL0291.46021. $\endgroup$ Jul 23, 2022 at 12:38
1$\begingroup$ Although one can observe the phenomenon in action here, it may be worth noting explicitly that, unlike in post bodies where the MO question text is automatically expanded—so that a bare MO or MMO link becomes a nice self-descriptive link (making the demonstration in the post a little confusing!)—in comment bodies no such expansion happens. $\endgroup$– LSpiceJul 26, 2022 at 20:03