[Tex/LaTex] multibib package gving me an error “Extra \fi”

errorsmultibib

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}

Best Answer

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.

Related Question