0

I am using Texworks for a paper, and I am having issues with some specific commands, which throw some errors when loading the packages.

First Error:

! Package xkeyval Error: `Optionen' undefined in families `Gm

And then:

! Package biblatex Error: Incompatible package 'natbib'

My code is:

% !TeX spellcheck = en_US
% !TEX encoding = UTF-8 Unicode
\documentclass{elsarticle}
%\documentclass[preprint,authoryear,12pt]{elsarticle}
%\documentclass[]{interact}
\usepackage{graphicx}
\usepackage[english]{babel}
\usepackage{verbatim}
\usepackage[capposition=top]{floatrow}
\usepackage[colorlinks=true]{hyperref}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{bm}
\usepackage{adjustbox}
\usepackage{etoolbox}
\usepackage{subcaption}
\usepackage{hyperref}
\usepackage{footnotebackref}
\usepackage{lineno}
\usepackage{tikz}
\usepackage{float}
\usepackage{threeparttable}
\usepackage{lscape}
\usepackage{hyphenat}
\usepackage{adjustbox}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{longtable,tabu}
\usepackage{pdflscape}
\usepackage[Optionen]{geometry}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{eurosym}
\usepackage[section]{placeins}
\usepackage{ntheorem}
\usepackage{enumitem}

%\theoremseparator{:} %\newtheorem{hyp}{Hypothesis} %\let\citefullauthor\relax %\let\citetext\relax %\let\defcitealias\relax %\let\Citealt\relax %\let\Citealp\relax \newcommand{\rowgroup}[1]{\hspace{-1em}#1} \setlength{\parindent}{0pt} %\theoremseparator{:} %\newtheorem{hyp}{Hypothesis} %\let\citefullauthor\relax %\let\citetext\relax %\let\defcitealias\relax %\let\Citealt\relax %\let\Citealp\relax \newcommand{\rowgroup}[1]{\hspace{-1em}#1} \setlength{\parindent}{0pt}

%%\usepackage{commenting} only in draft mode %%\declareauthor{hb}{Hendrik}{blue} %%\declareauthor{gp}{XXX}{green!30!black} %\usepackage{setspace}% http://ctan.org/pkg/setspace %\AtBeginEnvironment{table}{\singlespacing}% Single spacing in tabular environment

%\usepackage[natbibapa,nodoi]{apacite}% Citation support using apacite.sty. Commands using natbib.sty MUST be deactivated first! %\setlength\bibhang{12pt}% To set the indentation in the list of references using apacite.sty. Commands using natbib.sty MUST be deactivated first! %\renewcommand\bibliographytypesize{\fontsize{10}{12}\selectfont}% To set the list of references in 10 point font using apacite.sty. Commands using natbib.sty MUST be deactivated first

From my understanding, the first error arises from including (option) given that some other previous package probably uploaded the geometry package. The second error seems to be incompatibility - but I am a bit at loss as to how to proceed, since I can't download the packages and actually start my work.

Thanks in advance,

M

chsk
  • 3,667
M.T
  • 1
  • 4
    Welcome! It seems like you received a preamble from a friend and it's full of packages you're likely not to need. Start by commenting out those you don't know about. In particular, Optionen is not a valid option for geometry, nor you can load both natbib and biblatex. – egreg Mar 24 '21 at 17:31
  • Indeed, thats what happened, now, and yes, I did change it to (Option) but it still did not go thru. I mean, As you say I am not particularly sure why I need geometry so I did remove it, but then natbib/biblatex was an issue, and I was particularly sure if I needed both for my bibliography, – M.T Mar 24 '21 at 17:34
  • 4
    No, you don't need both as they're incompatible. I believe it's better if you start from a fresh preamble and add only what you really need. – egreg Mar 24 '21 at 17:35
  • 8
    Start by deleting every package from that list and only add packages if you actually need them. – David Carlisle Mar 24 '21 at 17:47
  • Also, don't load packages more than once, and load hyperref last (with certain exceptions). – Ian Thompson Mar 24 '21 at 21:14

0 Answers0