3

I would like to figure out how to get amsrefs/bibtex to typeset URLs in bibliography entries.

Here is the system I use for managing my references. I start with a document called references.ltb:

\begin{bibdiv}
\begin{biblist}

\bib{buskin16}{article}{
    author={Buskin, Nikolay},
    title={Every rational Hodge isometry between two K3 surfaces is
  algebraic},
    date={2016},
    url={arXiv:1510.02852v3 [math.AG]},
}

\end{biblist}
\end{bibdiv}

Then this LaTeX file

\documentclass{article}

\usepackage{amsrefs}
\usepackage{url}

\begin{document}

\cite{buskin16}

\begin{bibdiv}
\begin{biblist}

\bibselect{references}

\end{biblist}
\end{bibdiv}

\end{document}

generates this output:

enter image description here

As you can see, the URL is missing.

2
3

The url field is only available for the webpage style. However, it's not difficult to add it to the article type.

However, the eprint field is already provided. The second example has eprint instead of url (it doesn't need the redefinition of the article type).

\begin{filecontents*}{\jobname.ltb}
\begin{bibdiv}
\begin{biblist}

\bib{buskin16}{article}{
    author={Buskin, Nikolay},
    title={Every rational Hodge isometry between two K3 surfaces is
  algebraic},
    date={2016},
    url={arXiv:1510.02852v3 [math.AG]},
}

\bib{buskin17}{article}{
    author={Buskin, Nikolay},
    title={Every rational Hodge isometry between two K3 surfaces is
  algebraic},
    date={2016},
    eprint={arXiv:1510.02852v3 [math.AG]},
}

\end{biblist}
\end{bibdiv}
\end{filecontents*}

\documentclass{article}

\usepackage{amsrefs}
\usepackage{url}

\BibSpec{article}{%
    +{}  {\PrintAuthors}                {author}
    +{,} { \textit}                     {title}
    +{.} { }                            {part}
    +{:} { \textit}                     {subtitle}
    +{,} { \PrintContributions}         {contribution}
    +{.} { \PrintPartials}              {partial}
    +{,} { }                            {journal}
    +{}  { \textbf}                     {volume}
    +{}  { \PrintDatePV}                {date}
    +{,} { \issuetext}                  {number}
    +{,} { \eprintpages}                {pages}
    +{,} { }                            {status}
    +{,} { \url}                        {url}    % <---- ADDED
    +{,} { \PrintDOI}                   {doi}
    +{,} { available at \eprint}        {eprint}
    +{}  { \parenthesize}               {language}
    +{}  { \PrintTranslation}           {translation}
    +{;} { \PrintReprint}               {reprint}
    +{.} { }                            {note}
    +{.} {}                             {transition}
    +{}  {\SentenceSpace \PrintReviews} {review}
}

\begin{document}

\cite{buskin16} \cite{buskin17}

\begin{bibdiv}
\begin{biblist}

\bibselect{\jobname}

\end{biblist}
\end{bibdiv}

\end{document}

enter image description here

2
  • Perfect answer, thanks. How do I prevent the space from being removed, between ...852v3 and [math.AG]? – Zach Blumenstein May 24 '17 at 23:07
  • @ZachBlumenstein Load url before amsrefs with the obeyspaces option. – egreg May 24 '17 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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