I want to know how I can display a url to a site as reference in LaTeX. I need to have them at the end so that I can cite them from the other pages.
[Tex/LaTex] Display urls in the reference section
bibliographiesurls
Related Solutions
If you want to change to biblatex, you can use biblatex-chicago; here's a little example:
\begin{filecontents*}{mybiblio.bib}
@article{S,
author = "Spivak, M.",
year = "1969",
title = "Unknown",
url = "http://www.spivak.org"
}
\end{filecontents*}
\documentclass{article}
\usepackage[authordate]{biblatex-chicago}
\addbibresource{mybiblio.bib}
\begin{document}
\autocite{S}
\printbibliography
\end{document}
EDIT: using the bib entry in the question's EDIT, I used the following code (note that I used the organization
field instead of the author
field and changed the urldate
format as required by biblatex
):
\begin{filecontents*}{mybiblio.bib}
@online{norges-bank-okning,
organization = {Norges Bank},
Date-Added = {2011-04-02 18:39:21 +0200},
Date-Modified = {2011-04-02 19:19:30 +0200},
Keywords = {web},
Lastchecked = {02.04.2011},
Month = {04},
Title = {Bruken av kort og nettbank {\o}ker fortsatt},
Url = {http://www.norges-bank.no/templates/article____16691.aspx},
Urldate = {2011-04-02},
Year = {2011}}
\end{filecontents*}
\documentclass{article}
\usepackage[authordate]{biblatex-chicago}
\usepackage{filecontents}
\addbibresource{mybiblio.bib}
\begin{document}
\autocite{norges-bank-okning}
\printbibliography
\end{document}
and obtained the following result:
I'm assuming that you've also loaded the hyperref
package. Then, instead of specifying
webpage={http://xxx.xxx.xxx...../}
you could state
webpage={\href{http://xxx.xxx.xxx...../}{URL}}
and correspondingly simplify the format.webpage
and bbl.availableat
BibTeX functions.
Alternatively, if you don't want to change the content of the webpage
field, you could rewrite one or both of these BibTeX functions to insert the URL provided by the webpage
field inside the first argument of the \href
function and specify URL
as the second argument of \href
. Looking at your code, I would guess that (i) you needn't invoke the bbl.availableat
function at all and (ii) you may want to replace the string
" \url{" * swap$ * "}"
in the format.webpage
function with
" \href{" * swap$ * "}{URL}"
Note that I haven't been able to try this out fully because you haven't provided sufficiently many details about your custom .bst
file.
Addendum to follow up on the OP's additional information: Please try the following form of the BibTeX function format.webpage
:
FUNCTION {format.webpage}
{ webpage empty$
{ "" }
{ new.block " \href{" webpage * "}{URL}" * }
if$
}
where the content of the webpage
field should be a URL, e.g., http://adsabs.harvard.edu/abs/2012ApJ...751L..34V
. Finally -- and you may already have done so, but I'll mention it for the sake of completeness -- be sure to include in your format.article
function a line such as
format.webpage output
Best Answer
By reference do you mean citations as in bibliography?
If that is so, you can do it this way.
In the .tex file
In the .bib file
HTH