1

I'm trying to use the multibib package and my MWE is pretty much identical to the one in the manual but I keep getting an error. It says ! Extra \fi

The weird thing is, even I don't do anything in the body it still shows up. Just having the line \usepackage{multibib} in the preamble with nothing else changed throws up this error. Is there a bug or am I missing something?

Here is the MWE anyway

\documentclass[aps,prl,twocolumn,balance,superscriptaddress,floats,showpacs,a4paper]{revtex4}
\usepackage{newfloat}
\usepackage{latexsym}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{float}
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue}
\usepackage[left=18mm,right=18mm,top=22mm,bottom=22mm]{geometry}
\usepackage{mhchem}
\usepackage{bm}
\usepackage{multibib}

\begin{document}
\title{Blah}

\author{ABC}
\email{ABC}
\altaffiliation{ABC}
\affiliation{ABC}


\maketitle


\bibliography{bib}
\end{document}

I also tried the full version

\documentclass[aps,prl,twocolumn,balance,superscriptaddress,floats,showpacs,a4paper]{revtex4}
\usepackage{newfloat}
\usepackage{latexsym}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{graphics}
\usepackage{amsmath}
\usepackage{epsf}
\usepackage{float}
\usepackage{hyperref}
\hypersetup{colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue}
\usepackage[left=18mm,right=18mm,top=22mm,bottom=22mm]{geometry}
\usepackage{mhchem}
\usepackage{bm}
\usepackage{multibib}
\newcites{ltex}{Secondary References}

\begin{document}

Main text with \cite{Primary Ref 1}
\bibliography{bib}

Secondary text with \citeltex{Secondary Ref 1}
\bibliographyltex{bib}

\end{document}
  • I get no error if I run pdftex on your MWE (by the way you don't need to load graphics if you have graphicx and probably don't want epsf either) – David Carlisle Jan 15 '14 at 11:26
  • Sorry about that, I forgot to add in the title. If I remove the title, it works fine. My MWE now doesn't work. Thank you for the advice on redundant packages. – user1936752 Jan 15 '14 at 12:14
  • You want \title not title then the error goes – David Carlisle Jan 15 '14 at 12:53
  • Note that revtex4-1 has a very peculiar way to set the references and making multibib run with the class seems quite difficult. – egreg Jan 15 '14 at 13:15

1 Answers1

4

You are missing a backslash: You want \title not title then the error goes.

The reason is that the default value stored for the revtex title does some tests (hence the \if..\fi code) and makes a warning that \title has not been used. Some code somewehre is not expecting the testing \if code to still be in the title value.

David Carlisle
  • 757,742
  • Thanks but there's still some trouble. Perhaps egreg is right, Revtex and multibib don't seem to work together well. I updated the MWE again with the author list and it shows the same error with \email{...} and \altaffiliation{...} – user1936752 Jan 16 '14 at 04:23