The AMSRefs package documentation says the following in Section 2.2 Using an .ltb
database file:
[S]uppose you have a file
nonsense.ltb
with the following contents:\documentclass{article} \usepackage{amsrefs} \begin{document} \begin{bibdiv} \begin{biblist} \bib{Bourbaki70}{book}{ title={Th\’eorie des ensembles}, author={Bourbaki, Nicolas}, date={1970}, publisher={Hermann}, address={Paris} } \bib{Sokal96}{article}{ title={Trangressing the boundaries}, subtitle={Toward a transformative hermeneutics of quantum gravity}, author={Sokal, Alan}, journal={Social Text}, volume={46/47}, date={1996}, pages={217--252} } \bib{SokalB1998}{book}{ title={Fashionable Nonsense}, subtitle={Postmodern Intellectuals’ Abuse of Science}, author={Sokal, Alan}, author={Bricmont, Jean}, publisher={Picador USA}, address={New York}, date={1998} } \end{biblist} \end{bibdiv} \end{document}
Before seeing how this affects our sample document, take note of a couple of aspects of the format of
nonsense.ltb
:
We have chosen to format
nonsense.ltb
as a complete LaTeX document. This is so we can produce a formatted listing of our whole database by runningnonsense.ltb
through LaTeX. However, this is not necessary; whenamsrefs
treatsnonsense.ltb
as a database file, it ignores everything except for the\bib
commands.…
What is meant by "running nonsense.ltb
through LaTeX"? Do I open the database file nonsense.ltb
in my LaTeX editor (I am using TeXShop) and then run pdftex
? But won't this require it to be a .tex
file, rather than an .ltb
file?
I actually tried creating a file nonsense.ltb
with the above content and opening it in TeXShop, but the options to typeset the document as either 'Plain TeX' or 'LaTeX', etc. under the Typeset menu bar item are grayed out, and I'm unable to typeset the .ltb
file. These are the options I see when I open in the menu bar in this case:
This is how the menu bar item looks for other (.tex
) documents that I am able to typeset using ⌘T.
\usepackage{amsrefs}
defines thebibdiv
andbiblist
environments.amsrefs
-package is, that you are supposed to call the .ltb-file of the same name from within the .tex-file (although it would then be weird to structure the .ltb-file as a complete .tex-file with its owndocumentclass{}
andbegin{document}
). The documentation ofamsrefs
should give you details on how it is supposed to be combined with the .tex-file to generate a bibliography integrated into the main document..ltb
file through LaTeX via the command line. I tried your next suggestion and renamed the file asnonsense.ltb.tex
, and also asnonsense.tex
. In both cases, TeXShop understands to compile it via LaTeX. Moreover, I am able to use\bibselect{nonsense}
in my sample document successfully regardless of how the database file is named:nonsense.ltb
,nonsense.ltb.tex
andnonsense.tex
all work fine. (My apologies in case all this is trivial.).pdf
file with all the bibliography entries typeset…