0

I am transfering a text from texstudio to overleaf. I receive the following error:

/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty:462:
LaTeX Error:

 Command \bibhang already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.462 \newlength{\bibhang}

I have tried to delete some of them but the error remains.
Here are my commands:

\documentclass[14pt]{extarticle}
%\documentclass[12pt]{article}
\renewcommand{\baselinestretch}{2}
\usepackage{natbib}
%\bibliographystyle{OUPnum}
\usepackage{tabularx}
 \usepackage{booktabs}
 \usepackage[
    backend=biber,
    style=authoryear-icomp,
  ]{biblatex}

 \addbibresource{bibfile}
%\bibliographystyle{apalike}
%\bibliographystyle{plain}
% \citet{Smith:2005}    ==> Smith (2005)
% \citep{Smith:2005}    ==> (Smith, 2005)
% \citep[see][ ]{Smith:2005} ==> (see Smith, 1990)
% \citeyearpar{Smith:2005}  ==> (2005)
\bibpunct{(}{)}{,}{a}{}{,}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes,arrows,fit,calc}
\tikzstyle{box} = [draw, rectangle, rounded corners, thick, node distance=7em, text width=6em, text centered, minimum height=3.5em]
\tikzstyle{container} = [draw, rectangle, dashed, inner sep=2em]
\tikzstyle{line} = [draw, thick, -latex']

\usepackage[defblank]{paralist}
\usepackage[english]{babel}
\usepackage{fullpage}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}

\usepackage{tikz,fullpage}
\usepackage{textcomp}
\usetikzlibrary{arrows,%
    petri,%
    topaths}%
\usepackage{tkz-berge}
\usepackage[position=top]{subfig}

\usepackage{tikz-cd}

\usepackage{graphicx}


\makeatletter
%\def\com
%{{\ooalign{c\cr
%   \hidewidth\raisebox{.2ex}{$\m@th\scriptscriptstyle\circ$}\kern.0em \hidewidth\cr}}}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\makeatother
\usetikzlibrary{arrows.meta}
\DeclareMathOperator*{\intcl}{intcl}

\newcommand{\powerset}[1]{\mathbb{P}(#1)}
\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}

%\swapnumbers
\newtheorem{my theorem}[subsection]{Definition}

%\newtheorem{my theorem1}{Theorem \textasteriskcentered}
\newtheorem{my theorem2}[subsection]{Theorem}
\newtheorem{my example}[subsection]{Example}
\newtheorem{my figure}{Figure}
\newtheorem{my proposition}[subsection]{Proposition}
\newtheorem{my cor}[subsection]{Corollary}
\newtheorem{my counterexample}[subsection]{Counterexample}
\newtheorem{my remark}[subsection]{Remark}
\newtheorem{my lemma}[subsection]{Lemma}
\def\com{\mathcal C}
%\def\aps{\textquotesingle}
\def\simi{\thicksim }
\def\boundellipse {(3,-3) ellipse (7cm,2cm)}
\def\quo{\textacutedbl}
\def\bsq#1{%both single quotes
    \lq{#1}\rq}

Thanks for your help

  • Please don't load packages multiple times. For example, you load tikz at least 3 times, \usetikzlibrary{arrows} is loaded 5 times. – user36296 Oct 15 '17 at 22:30
2

You gave no compilable code for us so I can not test the following for you, but I'm sure your main error is to call package natbib together with biblatex:

\usepackage{natbib} % <=============================================
\usepackage[
   backend=biber,
   style=authoryear-icomp,
]{biblatex}
\addbibresource{bibfile}

Change this code to:

\usepackage[
   backend=biber,
   natbib=true, % <=================================================
   style=authoryear-icomp,
]{biblatex}
\addbibresource{bibfile}

If there are more errors please build a compilable MWE and add it to your question ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.