# Is it possible to cite a webpage using amsrefs?

I'm (becoming) familiar with amsrefs' limited bibliography entry types and would like to know how one could add an entry type for citing a web page.

According to the documentation for the package (at the bottom of page 14) , I just need to use the \BibSpec command, but I'm not entirely certain of the details in doing so. For example, where would I include this command? And what does the interior formatting look like for a webpage entry?

A second question is whether I'm better off "creating" a webpage entry by abusing the article entry. If so, what would that look like?

It's definitely too bad that there's no support for the misc entry type in amsrefs. I'm refusing to switch to BibTeX at this point on a simple bet with a mate, which I may lose very soon.

Thanks for any help.

-
add comment

## 1 Answer

amsref offers the eprint field that you can use inside of, for example, the article entry type to introduce some web page. Another possibility is to define a fresh new bib entry type (which approach to use will depend on the specific intended ussage). In the following example code I illustrate both approaches.

I defined a new bib entry type (called webpage) using \BibSpec; this type recognizes the fields author, title, year, myurl and note. The new field myurl calls \myurl which was defined simply to typeset its argument using the \url command from the url package.

\documentclass{amsart}
\usepackage[lite]{amsrefs}
\usepackage{url}

\DefineSimpleKey{bib}{myurl}

\newcommand\myurl[1]{\url{#1}}

\BibSpec{webpage}{%
+{}{\PrintAuthors} {author}
+{,}{ \textit} {title}
+{}{ \parenthesize} {date}
+{,}{ \myurl} {myurl}
+{,}{ } {note}
+{.}{ } {transition}
}

\begin{document}

\title{The Title}
\author{The Author}

\maketitle

\begin{bibdiv}
\begin{biblist}
\bib{yellowmonster}{book}{
author={Bousfield, A.K.},
author={Kan, D.M.},
title={Homotopy Limits, Completions and Localizations},
date={1972},
series={Lecture Notes in Mathematics},
volume={304},
publisher={Springer-Verlag},
address={Berlin-New York},
eprint={dfgsdfgfs}
}

\bib{texsx}{webpage}{
author={The Author},
title={The Title},
date={2012},
myurl={http://www.stackexchange.com/},
note={Some additional information}
}

\bib{serre:shfs}{article}{
author={Serre, Jean-Pierre},
title={Homologie Singuli\ere des Espaces Fibr\'es.  Applications},
date={1951},
eprint={http://www.some.site.com/},
note={Some additional information}
}
\end{biblist}
\end{bibdiv}

\end{document}


-
Lo and behold, it works. :) Would it be possible for you to add the fields author, title, year, and note? I believe those are the usual fields if one uses the online` entry type in BibTeX (I'd attempt this myself, but I can't admit to understanding the correct markup for each of those fields). Thanks very much for this! –  tentaclenorm Aug 5 '12 at 19:34
@tentaclenorm Hmmm, now that you mention this additional fields, perhaps you could simply add an extra field to, for example, the article entry? Give me some minutes (lunch time around here) and I'll add both possibilities: the new entry with additional fields, and the modified article entry. –  Gonzalo Medina Aug 5 '12 at 19:44
Ah, indeed that would work as well. :) I'll attempt, and also await your revision. Cheers! –  tentaclenorm Aug 5 '12 at 19:50
@tentaclenorm I've updated my answer showing both possibilities. –  Gonzalo Medina Aug 5 '12 at 20:19
Works like a charm. You have taught me how to fish, Gonzalo. Best wishes your way! –  tentaclenorm Aug 5 '12 at 20:21
add comment