In Markdown, you can do

[google.][1]
...


In LaTeX, I've tried

\href{\ref{1}}{google?}
...


But that doesn't work, and I'm tired of having long URLs in my document. How do you label and reference a URL?

• FWIW, this is the default style in ConTeXt: see documentation for \useURL – Aditya Jun 12 '13 at 13:43
• Is there any package I can import to get this functionality in regular LaTeX? – Scott Jun 12 '13 at 13:49

Here a small suggestion:

\documentclass[a4paper]{article}

\usepackage{hyperref}

\makeatletter
\immediate\write\@auxout{%
}%
}

\newcommand*\makrdownref[2]{%
}
\makeatother
\begin{document}

\end{document}


The procedure can be simplified if you define your links in the preamble. Then you don't need to write something to the aux file.

A simple solution. In my document preamble, I wrote:

\newcommand{\sage}{http://www.sagemath.org}


Then, when I wanted to reference it, I used

\href{\sage}{This text will be linked to sagemath.org}


And I've since written a package called latex-markdown-linking to include similar formatting.

\usepackage{hyperref} % required by linking.sty