2

Naively I would expect that amsrefs xref entries to work correctly even if they are in an .ltb file that is external to the main .tex file. But that doesn't seem to be true.

test3.tex

\documentclass{amsart}

\usepackage{hyperref}
\usepackage[lite]{amsrefs}
\usepackage{amsmath,amssymb,latexsym}

\begin{document}

\title{Xyz}
\author{Dale R. Worley}
\email{[email protected]}
\date{\today}

\maketitle

Reference to \cite{Fom1999}.

\section{References}

\begin{biblist}[\normalsize]*{labels={alphabetic}}

\bibselect{test4}

\end{biblist}

\end{document}

test4.ltb

\documentclass{amsart}

\usepackage{hyperref}
\usepackage[lite]{amsrefs}
\usepackage{amssymb}

\newcommand{\foobar}{foobar}

\begin{document}

\title{Abc}
\author{Dale R. Worley}
\email{[email protected]}
\date{\today}
\maketitle

\section{Annotated bibliography}

\begin{biblist}[\normalsize]*{labels={alphabetic}}

\bib*{xref-Stan1999}{book}{
    title = {Enumerative Combinatorics, Volume 2},
    author = {Stanley, Richard P.},
    date = {1999},
    publisher = {Cambridge University Press},
    address = {Cambridge},
    series = {Cambridge Studies in Advanced Mathematics},
    volume = {62},
}

\bib{Fom1999}{article}{
    label = {Fom1999},
    author = {Fomin, Sergey},
    title = {Knuth Equivalence, Jeu de Taquin, and the Littlewood--Richardson Rule},
    book = {
        xref = {xref-Stan1999},
    },
    pages = {413--439},
}

\end{biblist}

\end{document}

This produces the message "Package amsrefs Warning: Xref 'xref-Stan1999' undefined on input line 7." regardless of how many times I re-run the processing.

test3.bbl contains only:

\bib{Fom1999}{article}{
  label={Fom1999},
  author={Fomin, Sergey},
  title={Knuth Equivalence, Jeu de Taquin, and the Littlewood--Richardson Rule},
  book={ xref = {xref-Stan1999}, },
  pages={413--439},
}

It seems to me that this could be solved if all \bib* entries were copied into the .bbl file even if the bibliography is included with \bibselect.

1 Answer 1

1

It appears the problem can be fixed by adding the following patch to the .tex document just before \begin{document}. It changes the one commented-out line in the definition of \ReadBibData@a with the line following it. The result is that all \bib* entries are copied into the .bbl file. Also, adding this patch to the .ltb file does not seem to affect the (full) bibliography it generates.

\makeatletter

\def\ReadBibData@a{%
\ProvidesFile{\@filef@und}\relax
\begingroup
%        \let\star@bibdef\defer@bibdef
    \let\star@bibdef\copy@bibdef@a
    \ReadBibLoop
\endgroup
\closein\bib@dbfile
}

\makeatother

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .