Summarised (and expanded) from comments above:
BibTeX uses the aux file written by LaTeX (showing where you want to cite what) together with a bst file (containing stylistic information - such as plain.bst) and a bib file (containing bibliographic information about any document you might want to reference). So a workflow from the command line might look like
latex
- to generate the aux file
bibtex
- to generate a bbl file which contains information about the specific references mentioned in the aux file, formatted correctly
latex
- to incorporate the information in the bbl file into your typeset document
- possibly
latex
again, to fix any cross-referencing problems introduced when all the citations were included
Looking at the aux and bbl files along the way - and, as @Joseph pointed out, the blg file which is BibTeX's log - can help to troubleshoot problems.
For completeness as an answer: on this occasion it apparently turned out that the bibtex
step wasn't working due to a typo in the name of the bst file.
The problem is the supplementary pair of braces, which is however necessary for correct sorting. You should try biblatex
, really, because it provides different fields for sorting dates.
A possible patch is to write, after loading natbib
,
\makeatletter
\let\NAT@bare@aux\NAT@bare
\def\NAT@bare#1(#2){%
\begingroup\edef\x{\endgroup
\unexpanded{\NAT@bare@aux#1}(\@firstofone#2)}\x}
\makeatother
This will swallow the offending part, while keeping the correct sorting order.
The problem is in what's presented to LaTeX and natbib
to interpret. If you look at the .bbl
file, you'll see that the entry starts with
\bibitem[Knuth({\noopsort{1973c}}1981)]{book-full}
Now natbib
uses this to produce the results from \citep{book-full}
(or \citet
), by applying various commands. The relevant one (that I found with some grep
search) is \NAT@bare
that requires its arguments in the form
\def\NAT@bare#1(#2)#3(@)#4\@nil#5{%
The relevant part is #1(#2)
, which is derived from the argument to \bibitem
in brackets; natbib
wants to perform a numeric check, assuming that what's in parentheses is the year. But it finds {\noopsort{1973c}}1981
and this breaks off. So I make an alias to the original \NAT@bare
command, calling it \NAT@bare@aux
and do
\def\NAT@bare#1(#2){%
\begingroup\edef\x{\endgroup
\unexpanded{\NAT@bare@aux#1}(\@firstofone#2)}\x}
So, when natbib
wants to execute \NAT@bare
(it's so instructed by other macros), it will take the argument Knuth({\noopsort{1973c}1981}) and perform an
\edef; thus
\x` will be defined as the result of completely expanding
\endgroup\unexpanded{\NAT@bare@aux Knuth}(\@firstofone{\noopsort{1973c}}1981)
The job of \@firstofone
is just to strip the braces, and the expansion of \noopsort{1973c}
is just empty. So at the end LaTeX will see
\NAT@bare@aux Knuth(1981)
which is in the right format. The \endgroup
balances the \begingroup
and vanishes together with the definition of \x
which has already done its job.
If the entry is normal, say \bibitem[Author(2012)]
(by the way, Happy New Year), \x
will be defined as the full expansion of
\endgroup\unexpanded{\NAT@bare@aux Author}(\@firstofone 2012)
and \@firstofone 2
will simply return 2
, so in the end LaTeX will see
\NAT@bare@aux Author(2012)
as it should.
Best Answer
You haven't provided a compilable MWE, so it's not possible to be sure what's going on. In an earlier version of your posting, you had the line
in the code. However, the file
splncs.bst
does not appear to be a part of either the TeXlive2011 or the MikTeX2.9 distribution, and it's not on the CTAN either. Assuming that no such file is present in your TeX distribution, this would explain why no bibliography is being generated. (Have you checked your log file for any complaints about a nonexistent style file?) Conversely, if I add the line\documentclass{memoir}
to the top of your code as well as something like\bibliographystyle{plain}
and a couple of dummy citation commands, your code (minus the three\input
statements, of course) has no difficulty in creating a bibliography.In short, I suggest you either locate the file
splncs.bst
somewhere on the 'net and install it on your system or use a different bibliography style file altogether.