BibTeX, biblatex and biberInclusion of simple Bibliography Database fails

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
icdesigner
Posts: 1
Joined: Fri Oct 26, 2012 10:54 am

Inclusion of simple Bibliography Database fails

Post by icdesigner »

Hi all,

I am new to using LaTeX and am currently working on a document to include references.

I just created a basic bibliography database file and included it in my source file along with style as plain. Please find below the actual code.

Code: Select all

\documentclass[a4paper]{report}
\newcommand\pder[2][]{\ensuremath{\frac{\partial#1}{\partial#2}}} 
\usepackage{amsmath}
\usepackage{float}
\usepackage{graphicx}
\usepackage{setspace}
\doublespacing
%this is for section packages
\usepackage{sectsty}
\allsectionsfont{\Large \normalfont \bf}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont \bfseries\filcenter}
{\LARGE\thechapter}
{1ex}
{
\titlerule[2pt]
\vspace{2ex}%
\LARGE}
[\vspace{1ex}%
{\titlerule[2pt]}]

\usepackage{lastpage} % for the number of the last page in the document
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{\nouppercase{\rightmark}}
\rfoot{\thepage}


\usepackage[nokeyprefix]{refstyle}

\usepackage{amsmath,hyperref}
\makeatletter
\def\tagform@#1{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\let\orgtheequation\theequation
\def\theequation{(\orgtheequation)}
\makeatother 
\let\orgautoref\autoref
\providecommand{\Autoref}[1]{\def\equationautorefname{Equation}\orgautoref{#1}}
\renewcommand{\autoref}[1]{\def\equationautorefname{Eq.}\orgautoref{#1}}

\usepackage[none]{hyphenat}

\begin{document}

%nothing included just the bibliography testing as of now
\bibliographystyle{amsplain}
\bibliography{foo}
\end{document}
I get the following message when I run it using Latex:

Code: Select all

! Undefined control sequence.
<argument> \protect \citeauthoryear
{Golumbic}{Golumbic}{{\protect \APACyear...
l.10 Golumbic2004}
I do not know the reason but it points to the way I format my document. The error goes once I remove the bibliography sentences from the source file.

Thanks
Last edited by cgnieder on Fri Oct 26, 2012 11:16 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Inclusion of simple Bibliography Database fails

Post by meho_r »

You should add that "foo.bib" file of yours, with at least one entry in it with which, when .tex file is compiled, the error occurs. I didn't encounter any issues when using your code. An example (using pdflatex, TeXLive 2011):

Code: Select all

\begin{filecontents}{foo.bib}
@BOOK{mittelbach2006,
  author = {Mittelbach, Frank and Goosens, Michel},
  title = {The LaTeX Companion},
  year = {2006},
  publisher = {Addison-Wesley}
}
\end{filecontents}% Just a simple bibliography entry for testing

\documentclass[a4paper]{report}
\newcommand\pder[2][]{\ensuremath{\frac{\partial#1}{\partial#2}}} 
\usepackage{amsmath}
\usepackage{float}
\usepackage{graphicx}
\usepackage{setspace}
\doublespacing
%this is for section packages
\usepackage{sectsty}
\allsectionsfont{\Large \normalfont \bf}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont \bfseries\filcenter}
{\LARGE\thechapter}
{1ex}
{
\titlerule[2pt]
\vspace{2ex}%
\LARGE}
[\vspace{1ex}%
{\titlerule[2pt]}]

\usepackage{lastpage} % for the number of the last page in the document
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{\nouppercase{\rightmark}}
\rfoot{\thepage}


\usepackage[nokeyprefix]{refstyle}

\usepackage{amsmath,hyperref}
\makeatletter
\def\tagform@#1{\maketag@@@{\ignorespaces#1\unskip\@@italiccorr}}
\let\orgtheequation\theequation
\def\theequation{(\orgtheequation)}
\makeatother 
\let\orgautoref\autoref
\providecommand{\Autoref}[1]{\def\equationautorefname{Equation}\orgautoref{#1}}
\renewcommand{\autoref}[1]{\def\equationautorefname{Eq.}\orgautoref{#1}}

\usepackage[none]{hyphenat}

\begin{document}

Some text \cite{mittelbach2006}.% A citation for testing purposes

%nothing included just the bibliography testing as of now
\bibliographystyle{amsplain}
\bibliography{foo}
\end{document}
Attachments
example.pdf
(36.17 KiB) Downloaded 315 times
Post Reply