1

I am using Latex for my annotated bibliography. In this document, I currently have a section* like this:

\section*{\bibentry{Li2010}}
blah blah blah

\section*{\bibentry{Andrews2012}}
blah blah blah

This generates a list of sections with the citation as the section heading. What I want to do is reference different section. So, I want to add a reference using \cite{sec:Li2012} to reference to that section. Since, I cannot label section* I converted to section instead.

So, something like this

\section{\bibentry{Li2010}}
\label{sec:Li2010}
blah blah blah

\section{\bibentry{Andrews2012}}
\label{sec:Andrews2012}
blah blah blah \ref{sec:Li2010}

This gives me an error undefined control sequence \section\bibentry{Li2010}. As I understand, it is caused by the bibentry code because, it works fine, if I actually type some normal string in the section heading.

What I want in the end is to have each bibentry labelled as a heading (using section or anything else) and then be able to reference them? How can I do this?

Here is the complete document template

\documentclass[10pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{natbib,bibentry}
\usepackage{titlesec}
\usepackage{refcheck}
\usepackage{color}

\bibliographystyle{plain}

\title{Annotated Bibliography}

\titleformat*{\section}{\normalsize\bfseries}


\date{}

\begin{document}
\maketitle
%\tableofcontents
\nobibliography{main}

\bibentry{\bibentry{Andrews2012}}
blah blah blah

\section*{\bibentry{Li2010}}
blah blah blah


\end{document}
3

You are missing \protect:

\begin{filecontents*}{\jobname.bib}
@article{uthor,
 author={A. Uthor},
 title={Title},
 journal={Journal},
 year=2015,
 pages={1-10},
}
\end{filecontents*}

\documentclass[10pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{natbib,bibentry}
\usepackage{titlesec}
%\usepackage{refcheck}
\usepackage{color}

\bibliographystyle{plain}

\author{Me}
\title{Annotated Bibliography}

\titleformat*{\section}{\normalsize\bfseries}


\date{}

\begin{document}
\maketitle

\nobibliography{\jobname}

\tableofcontents

\section{\protect\bibentry{uthor}}
blah blah blah

\end{document}

enter image description here

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.