| 1 |
# aurl—Abbreviated URLs for LaTeX |
| 2 |
Extends the hyperref package with a mechanism for hyperlinked URLs abbreviated with prefixes. |
| 3 |
|
| 4 |
# Purpose |
| 5 |
The Semantic Web community heavily uses prefixes to abbreviate URLs (AURLs), such as `owl:class` or `rdf:type`. |
| 6 |
The LaTeX `hyperref` package defines the `url` command to print and hyperlink a URL but if used for AURLs, the hyperlink fails. |
| 7 |
But `href` from `hyperref` is tedious to use. |
| 8 |
The aurl package introduces `\aurl{prefix}{suffix}` and includes the 100 most popular prefixes from [prefix.cc](http://prefix.cc). |
| 9 |
If you want to include the 1000 most popular prefixes instead, use `\usepackage[1000]{aurl}`. |
| 10 |
|
| 11 |
# Usage |
| 12 |
1. copy [aurl.sty](https://raw.githubusercontent.com/KonradHoeffner/latex/master/aurl/aurl.sty) to your working directory |
| 13 |
2. add `\usepackage{aurl}` to your preamble |
| 14 |
4. (optional) define non-default prefixes using `\daurl{prefix}{prefix expansion}` |
| 15 |
3. add your AURLs with `\aurl{prefix}{suffix}` |
| 16 |
|
| 17 |
# Example |
| 18 |
\documentclass{article} |
| 19 |
\usepackage{aurl} |
| 20 |
\begin{document} |
| 21 |
\aurl{rdfs}{label} |
| 22 |
\aurl{owl}{class} |
| 23 |
\daurl{bbc}{http://bbc.com/} |
| 24 |
\aurl{bbc}{news} |
| 25 |
\end{document} |
| 26 |
|
| 27 |
# License |
| 28 |
This is completely free, do whatever you want ([CC0 license](http://creativecommons.org/publicdomain/zero/1.0/)). |