Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
The amsrefs documentation also describes a "webpage" entry type (top of page 11 at ftp.ams.org/ams/amsrefs/amsrdoc.pdf), although it doesn't seem to work. –  Kevin O'Bryant Jan 2 at 15:50

1 Answer 1

up vote 5 down vote accepted

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}

enter image description here

share|improve this answer
    
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
1  
@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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.