1

I get this error "Illegal unit of measure (pt inserted)\begin{thebibliography}" during building. When I delete the hyperref package, this error disappears. My packages are as follows:

\usepackage{amssymb,amsmath,amsfonts,eqnarray,breqn}
\usepackage{fancyhdr}
\usepackage{cite}
%\usepackage{hyperref}
\usepackage{ragged2e}
\usepackage[algo2e]{algorithm2e} 
\usepackage{algorithm2e}
\usepackage{algorithmicx}
\usepackage{enumitem}   
\usepackage{refcount}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{chngcntr}
\usepackage{float}

What to do to have boath hyperref and references?

closed as unclear what you're asking by user36296, Phelype Oleinik, Bobyandbob, Mensch, Troy Apr 11 '18 at 17:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    The hyperref package normally has to be loaded last: does moving the position help? – Joseph Wright Jan 4 '17 at 17:22
  • ...and don't load algorithm2e twice... – Werner Jan 4 '17 at 17:29
  • I get no error when adding the minimum to make it a complete document. If the error remains after loading the hyperref package last, please provide the code of a complete document (starting with \documentclass and ending with \end{document}) that illustrates the error. Btw, welcome to TeX.SX! – gernot Jan 4 '17 at 17:33
  • Thanks for your comments. I move the hyperef package to the last but error has remained – Amir Jan 5 '17 at 14:22
  • My code is here:\documentclass{elsart5p} \usepackage{amsthm} \usepackage{amssymb,amsmath,amsfonts,eqnarray,breqn} \usepackage{fancyhdr} \usepackage{cite} \usepackage{ragged2e} \usepackage[algo2e]{algorithm2e} \usepackage{algorithmicx} \usepackage{enumitem} \usepackage{refcount} \usepackage[protrusion=true,expansion=true]{microtype} \usepackage{chngcntr} \usepackage{float} \usepackage[hypertexnames=false]{hyperref} \begin{document} \section{Introduction} Hi, \cite{aa}. \bibliographystyle{unsrt} \bibliography{References} \end{document} – Amir Jan 5 '17 at 14:26