我收到了错误
您不能使用带有“\begingroup”的前缀。 \begin{document}
当我包含hyperref
包裹时。
以下是我正在使用的包:
\RequirePackage[l2tabu, orthodox]{nag}
\documentclass
\DeclareRobustCommand\mbseries{\fontseries{mb}\selectfont}
\DeclareTextFontCommand{\textmb}{\mbseries}
% chosse the German or English package
\usepackage{graphicx,pdflscape}
\usepackage{hyperref}
\usepackage{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman, english]{babel}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{amsfonts}
\usepackage{tikz-qtree}
\usepackage[backend=bibtex,style=numeric]{biblatex}
\usepackage{adjustbox}
\usepackage{makecell}
\renewcommand\theadfont{\bfseries}
\usepackage{bera}% optional: just to have a nice mono-spaced font
\usepackage{floatflt}
\usepackage{float}
\usepackage{listings}
\usepackage{xcolor}
\colorlet{punct}{red!60!black}
\definecolor{delim}{RGB}{20,105,176}
\colorlet{numb}{magenta!60!black}
\lstdefinelanguage{json}{
basicstyle=\tiny\ttfamily,
%numbers=left,
%numberstyle=\scriptsize,
keywordstyle=\bfseries,
morekeywords={begin, end, if, else, while, for, then, do},
stepnumber=1,
numbersep=8pt,
showstringspaces=false,
breaklines=true,
frame=trbl, % draw a frame at the top, right, left and bottom of the listing
frameround=tttt, % make the frame round at all four corners
%backgroundcolor=\color{background},
literate=
*{0}{{{\color{numb}0}}}{1}
{1}{{{\color{numb}1}}}{1}
{2}{{{\color{numb}2}}}{1}
{3}{{{\color{numb}3}}}{1}
{4}{{{\color{numb}4}}}{1}
{5}{{{\color{numb}5}}}{1}
{6}{{{\color{numb}6}}}{1}
{7}{{{\color{numb}7}}}{1}
{8}{{{\color{numb}8}}}{1}
{9}{{{\color{numb}9}}}{1}
{:}{{{\color{punct}{:}}}}{1}
{,}{{{\color{punct}{,}}}}{1}
{\{}{{{\color{delim}{\{}}}}{1}
{\}}{{{\color{delim}{\}}}}}{1}
{[}{{{\color{delim}{[}}}}{1}
{]}{{{\color{delim}{]}}}}{1}
}
\newcommand{\getmydate}{
\ifcase\month%
\or Januar\or Februar\or M\"arz%
\or April\or Mai\or Juni\or Juli%
\or August\or September\or Oktober%
\or November\or Dezember%
\fi\ \number\year%
}
\usepackage{todonotes}
\addbibresource{Template.bib}
\begin{document} % I get error in this line
如果有人能告诉我为什么会出现这个错误,那将非常有帮助。我搜索了很多论坛,但还是不明白问题所在。
答案1
正如埃格尔,\documentclass
缺少一个参数。该行应采用以下格式:
\RequirePackage[l2tabu,正统]{nag} \documentclass{文章} .....
答案2
通过删除 amsfonts 包解决了该问题。