\documentclass[12pt,reqno,a4paper]{amsart}
%\usepackage[utf8]{inputenc} % not needed with up-to-date TeX systems
\usepackage[english]{babel}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\usepackage[normalem]{ulem} % do you *really* need it?
\usepackage{datetime}
\usepackage{hyperref}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{construction}{Construction}
[section]
\newtheorem{observation}{Observation}
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{proposition}{Proposition}[subsection]
\renewcommand{\qedsymbol}{$\blacksquare$}
\newtheorem{example}{Example}
\newtheorem*{question}{Question}
\newtheorem*{solution}{Solution}
\newtheorem{exercise}{Exercise}
\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}
\pagestyle{myheadings}
\textheight 9.3in
\textwidth 6.5in
\calclayout
% metadata
%\date{\today}
\title{something}
\author{someone}
\address{somewhere}
\begin{document}
%\today
\begin{abstract}
\end{abstract}
\maketitle
\end{document}
我想在上述文档类中使用 \chapter。它显示错误“未定义的控制序列”。
我尝试使用报告文档类。\usepackage[english]{babel} 上显示“超出 TeX 容量,抱歉 [参数堆栈大小=10000]。\usepackage[english]”。我该如何更改上述文档类,以便使用 \chapter、\section 等?我是否添加了在某些文档类中不起作用的 \usepakage?
答案1
amsart
是支持日记风格的模板之一,请使用amsbook
代替它,您可以获得输出:
\documentclass[12pt,reqno,a4paper]{amsbook}
%\usepackage[utf8]{inputenc} % not needed with up-to-date TeX systems
\usepackage[english]{babel}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{mathtools}
\usepackage{color}
\usepackage{mathrsfs}
\usepackage[all]{xy}
\usepackage{tikz-cd}
\usepackage[normalem]{ulem} % do you *really* need it?
\usepackage{datetime}
\usepackage{hyperref}
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{construction}{Construction}
[section]
\newtheorem{observation}{Observation}
\newtheorem{corollary}{Corollary}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{remark}{Remark}[section]
\newtheorem{proposition}{Proposition}[subsection]
\renewcommand{\qedsymbol}{$\blacksquare$}
\newtheorem{example}{Example}
\newtheorem*{question}{Question}
\newtheorem*{solution}{Solution}
\newtheorem{exercise}{Exercise}
\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}
\pagestyle{myheadings}
\textheight 9.3in
\textwidth 6.5in
\calclayout
% metadata
%\date{\today}
\title{something}
\author{someone}
\address{somewhere}
\begin{document}
%\today
\begin{abstract}
\end{abstract}
\maketitle
\chapter{Test}
\end{document}