The below tex file shows error while using "amsmath" along with
"hyperref".
If i remove the "amsmath" then my article works fine.
Please advise how to control this error.
I also listed the error information below.
--------------------------------------------------------------- - TeX
- file ------
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{natbib}
\usepackage{hypernat}
\begin{document}
\section{Introduction \protect\cite{ref1}}
\label{se:intro}
.............
\clearpage
\begin{thebibliography}{88}
\bibitem[\protect\citeauthoryear{Manton and Speight}{Manton and
Speight}{2004}]{ref1}
....................
\end{thebibliography}
\end{document}
--------------------------------------------------------------- - log
- file ------
\@outlinefile=\write3
\AtBeginShipoutBox=\box29
Package natbib Warning: Citation `ref1' on page 1 undefined on input
line 10.
! Argument of \@sect has an extra }.
<inserted text>
\par
l.10 \section{Introduction \protect\cite{ref1}}
? r
OK, entering \nonstopmode...
Runaway argument?
{\normalfont \Large \bfseries }{\write \@auxout {\string \@writefile
\ETC.
! Paragraph ended before \@sect was complete.
<to be read again>
\par
l.10 \section{Introduction \protect\cite{ref1}}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
Runaway argument?
\protect \protect \begingroup \<def>-command \NAT@ctype \<>-\let \<>-
\let \ETC.
! Paragraph ended before \HyPsd@@ProtectSpacesFi was complete.
<to be read again>
\par
l.10 \section{Introduction \protect\cite{ref1}}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
! Use of \HyPsd@RemoveMask doesn't match its definition.
\Hy@tempa ->\par
|
l.10 \section{Introduction \protect\cite{ref1}}
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
! Undefined control sequence.
\HyPsd@ProtectSpaces ...d@RemoveMask #1\HyPsd@End
#1
l.10 \section{Introduction \protect\cite{ref1}}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Runaway argument?
{
! Paragraph ended before \HyPsd@RemoveBraces was complete.
<to be read again>
\par
l.10 \section{Introduction \protect\cite{ref1}}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
! Extra }, or forgotten \endgroup.
\pdfstringdef ...d@RemoveBraces \expandafter {#1|}
\global \let
#1\HyPsd@Stri...
l.10 \section{Introduction \protect\cite{ref1}}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Argument of \HyPsd@CheckCatcodes has an extra }.
<inserted text>
\par
l.10 \section{Introduction \protect\cite{ref1}}
I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.
Runaway argument?
\global \let \Hy@tempa \HyPsd@String
! Paragraph ended before \HyPsd@CheckCatcodes was complete.
<to be read again>
\par
l.10 \section{Introduction \protect\cite{ref1}}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
Runaway argument?
\@empty \HyPsd@End \Hy@tempa \expandafter \HyPsd@Subst \expandafter
{\ETC.
! Paragraph ended before \HyPsd@RemoveMask was complete.
<to be read again>
\par
-----------------------------------------------------
thanks in advance,
-vp-
> \usepackage{amsmath}
> \usepackage{hyperref}
> \usepackage{natbib}
Use natbib *before* hyperref.
> \section{Introduction \protect\cite{ref1}}
\section{Introduction\texorpdfstring{ \protect\cite{ref1}}{}}
Yours sincerely
Heiko <ober...@uni-freiburg.de>
thank you very much. It works fine now.
regards
-vp-