In a recent comment correspondence between Jack D'Aurizo, SimplyBeautifulArt, and myself, it was asked whether one can put links in a tag. A quick and naive test fails, as such: $$\text{Direct Link} \tag{http://www.google.com/}$$ $$\text{Replaced Text} \tag{[link](http://www.google.com/)}$$ $$\text{Number Link} \tag{[enter link description here][1]}$$
Where the third test is link notation where the link is stored at the bottom of the post in the format of "[1]: URL".
Jack proposed that by mashing together available $\LaTeX$ and Markdown libraries we might be able to make something work, and appears to have somewhat achieved this by using artificial spacing $\displaystyle\hspace{5cm} I(a)=\int_{0}^{+\infty}\frac{x^a}{e^x+1}\,dx\hspace{5cm}$ (Google)
Generated with the following code:
$\displaystyle\hspace{5cm} I(a)=\int_{0}^{+\infty}\frac{x^a}{e^x+1}\,dx\hspace{5cm}\$ \[$(\text{Google})$]($\text{http://www.google.com}$})
However, this is abuses in-line styles and isn't a true tag even if we can get it to work with individual-line equations (those wrapped in \$\$)
What are some known ways to get this to work?
Important Edit:
It appears that the intended way to do this is to use the command \href, but the SE devs disabled this to avoid malicious code being executed. However, MathJax has included a safe-mode for years to keep this from happening, which the SE devs seem to have completely neglected. See here for a documentation of this feature and here for an old feature request on this meta from 2014 asking for safe \href to be enabled
\href
macro to provide exactly this; however it is apparently disabled here, probably for security reasons. $\endgroup$\href
isn't allowed, and I do wish that I knew the reason. $\endgroup$\href
disabled, but I hesitate to give it because it allows unfiltered URL's and so would allow the type of security issues that the folks at SE have tried to avoid by disabling\href
. (If they used MathJax'sSafe
extension, it would prevent the problem even with the technique I have in mind.) I'm not sure whether it is right or wrong to expose the technique. It might encourage the powers that be to implementSafe
, but in the meantime, it would be a security concern. $\endgroup$Safe
extension was actually designed around the issues raised here, so I was disappointed that they didn't adopt it. $\endgroup$