0
$\begingroup$

I have read this question How do I reference another question and is it OK to post a question as a comment/answer on another question that relates to that question. but I do not think it addresses my problem correctly.

My question is How can I insert a link to a question I previously did or someobody else's when writting a new question or in the comments section?. What I'm doing now is just copying it straight from the URL bar in my navigator but it looks that only displays correctly when I create a new question but not in the comments where it is shown as an url page.

I'm looking a more easier to do tag which I can customize with words my own words such as how it is done in bbCode or in html code. Can this be done?

$\endgroup$
17
  • 1
    $\begingroup$ Does this help? $\endgroup$ Apr 13, 2018 at 2:26
  • $\begingroup$ Do you want to ask that how to insert hyperlink in comments, for example like this : This is Doraemon $\endgroup$ Apr 13, 2018 at 2:30
  • $\begingroup$ @TheoreticalEconomist It is a nice article, but I'm looking at suggestions on how to avoid errors when trying to display links. So far looks that I maybe can try URL syntax as I'm more familiar with it. But does it works on comments section?. It looks to take up much space from characters allowed in there. $\endgroup$ Apr 13, 2018 at 2:31
  • $\begingroup$ @JaideepKhare Yes how to insert hyperlinks and some tips on how to save space when inserting them in comments section as the characters are limited. $\endgroup$ Apr 13, 2018 at 2:32
  • $\begingroup$ The page I linked to in my previous comment should explain how to insert hyperlinks. As for saving space, you could use a URL shortener such as goo.gl or bit.ly. $\endgroup$ Apr 13, 2018 at 2:43
  • $\begingroup$ @TheoreticalEconomist In terms of making self understood to others would it be okay to use a URL shortener?. I do not think I can change the name of the url tag when using those services. $\endgroup$ Apr 13, 2018 at 2:49
  • $\begingroup$ Bitly allows you to change the URL tag. You can also just embed the link in text, like I have in my previous comments. No one needs to see the URL. $\endgroup$ Apr 13, 2018 at 2:51
  • $\begingroup$ @TheoreticalEconomist I don't know how to change the URL tag with Bitly, but on visiting its website I found how to make a link but to customize it seems to be a pay service. $\endgroup$ Apr 13, 2018 at 3:00
  • 2
    $\begingroup$ Since people are bringing it up: the use of link shorteners is heavily discouraged. $\endgroup$ Apr 13, 2018 at 3:11
  • $\begingroup$ Bitly URLs appear as bit.ly/randomtext. The randomtext part is randomly generated, but can be customised for free if you register. In any case, why are you interested in editing the URL? Just change the text to make the link informative. $\endgroup$ Apr 13, 2018 at 3:11
  • $\begingroup$ @J.M.isnotamathematician Whoops, that I didn't know. Thanks for pointing this out! $\endgroup$ Apr 13, 2018 at 3:11
  • 2
    $\begingroup$ It seems to me a bit unclear what is actually asked here, but this seems related: How do you cite a reference in a comment? $\endgroup$ Apr 13, 2018 at 4:31
  • $\begingroup$ @TheoreticalEconomist I didn't know how to edit the text. Although I've found that using parenthesis does the trick which I was trying to do. $\endgroup$ Apr 13, 2018 at 18:47
  • $\begingroup$ @MartinSleziak Actually pretty much of what my question was is covered in your answer. But it was basically how to write links as tags in html code. $\endgroup$ Apr 13, 2018 at 18:48
  • $\begingroup$ The link in my very first comment explains how to edit the text. Did you even read it? $\endgroup$ Apr 14, 2018 at 2:09

1 Answer 1

3
$\begingroup$

It seems that you are asking two different things:

How to format links to a comment?

...that only displays correctly when I create a new question but not in the comments where it is shown as an url page.

You do not want to be link displayed like this: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section but you want some specific text.

To achieve this you imply use text format, for example, [How do I link to a question in another question or in comments section?](https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section) - this renders as How do I link to a question in another question or in comments section?

This format can be also used in the posts. (In my opinion, it's preferable to just posting a link and rely on Stack Exchange software that it is going expand the link to the title. If you use your own caption, you have better control over the displayed text.)

For more details see: How do you cite a reference in a comment?

You can also find section on formatting comments in editing help. And also in some posts on Meta Stack Exchange, such as: How do I use formatting in comments?

How to get link to a post?

What I'm doing now is just copying it straight from the URL bar in my navigator but ...

Copying link from the address bar of your browser is fine. Make sure that you are copying the link you want. By which I mean - in your browser you can have a link to an answer, a question, a comment - depending on how you got to the post. Sometimes this is not the link you want (for example, you might want link to the question, but in the address bar you have link to an answer).

In the case of this question you get: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section link and this is a link to this answer: https://math.meta.stackexchange.com/questions/28234/how-do-i-link-to-a-question-in-another-question-or-in-comments-section/28235#28235 link. (After each link I will also add "clickable" version so that you can try it.)

Under every posts you get a link called share. You get a shorter link from there. The last part of the link is your user id - which you can omit if for some reason you don't want the link to identify who shared the link. (Or you might keep it, if you hope to get some of the badges related to sharing questions.) In this case you get https://math.meta.stackexchange.com/q/28234 link for the question and https://math.meta.stackexchange.com/a/28235 link is the link to the answer. (Both with userid omitted.) I will add that this link also links to the answer: https://math.meta.stackexchange.com/q/28234#28235 link.

$\endgroup$
1
  • $\begingroup$ Thanks! This answer was very instructive. $\endgroup$ Apr 13, 2018 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .