3

While writing the reference in .bib file, I want to mention the address of publication of the book which contains "&" symbol. While executing the main.tex file I am getting error as "! Misplaced alignment tab character &." The code is like

\documentclass{Thesis} 
\usepackage{natbib} 
\usepackage{hyperref}
\begin{document}
\pagestyle{fancy} 
\label{Chapter1}
\section{description}
     This is my main text to be provided with reference\cite{Ref1}.
\label{Bibliography}
\lhead{\emph{Bibliography}}
\bibliographystyle{unsrtnat} 
\bibliography{Bibliography} 
\end{document} 

and the Bibliography.bib is in the form

@book{Ref1,
    author     = " Myself",
    title          = "it's my book",
    year         = "2015",
    publisher  = " Home publication",
    address    = "At home, Smith & Johns, abc ",
}
Alenanno
  • 37,338

1 Answers1

4

You need to escape your ampersand, just prepend it with a backslash like this:

@book{Ref1,
    author     = " Myself",
    title          = "it's my book",
    year         = "2015",
    publisher  = " Home publication",
    address    = "At home, Smith \& Johns, abc ",
}

To expand on this, the reserved characters in LaTeX are:

# $ % ^ & _ { } ~ \

And they should be escaped like this when you want them in text:

\# \$ \% \^{} \& \_ \{ \} \~{} \textbackslash{}
Ryan
  • 2,914
  • Yeah. It works properly. It's quite confusing for me to understand the variations between commanded symbols and regular symbols with backslash. But anyway thanks for your help. @Ryan. – vis54132 May 19 '15 at 20:36
  • @vis54132 See my edit – Ryan May 19 '15 at 21:18