将文本从 texstudio 传输到 overleaf

将文本从 texstudio 传输到 overleaf

我正在将文本从 texstudio 传输到 overleaf。我收到以下错误:

/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}

我尝试删除其中一些,但错误仍然存​​在。
以下是我的命令:

\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}

感谢您的帮助

答案1

您没有提供可编译的代码给我们,所以我无法为您测试以下内容,但我确信您的主要错误是natbib同时调用包biblatex

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

将此代码更改为:

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

如果还有更多错误,请构建一个可编译的 MWE 并将其添加到您的问题中...

相关内容