我有以下使用模板memoir
:
\documentclass[a4paper, 10pt, onecolumn, openany]{memoir}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[final]{microtype}
\usepackage{amsmath,amssymb,mathtools} % Math
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage{textcomp}
\usepackage[svgnames]{xcolor}
\usepackage{amsthm}
\usepackage{thmtools}
\setlrmarginsandblock{0.15\paperwidth}{*}{1} % Left and right margin
\setulmarginsandblock{0.2\paperwidth}{*}{1} % Upper and lower margin
\checkandfixthelayout
\maxsecnumdepth{subsection} % Subsections (and higher) are numbered
\setsecnumdepth{subsection}
\makeatletter
\makechapterstyle{standard}
{
\setlength{\beforechapskip}{0\baselineskip}
\setlength{\midchapskip}{1\baselineskip}
\setlength{\afterchapskip}{3\baselineskip}
\renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}}
\renewcommand{\chapnamefont}{\centering\normalfont\Large}
\renewcommand{\printchaptername}{\chapnamefont \@chapapp}
\renewcommand{\chapternamenum}{\space}
\renewcommand{\chapnumfont}{\normalfont\Large}
\renewcommand{\printchapternum}{\chapnumfont \thechapter}
\renewcommand{\afterchapternum}{\par\nobreak\vskip \midchapskip}
\renewcommand{\printchapternonum}{\vspace*{\midchapskip}\vspace*{5mm}}
\renewcommand{\chaptitlefont}{\centering\bfseries\LARGE}
\renewcommand{\printchaptertitle}[1]{\chaptitlefont ##1}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip \afterchapskip}
}
\makeatother
\chapterstyle{standard}
\setsecheadstyle{\normalfont\large\bfseries}
\setsubsecheadstyle{\normalfont\normalsize\bfseries}
\setparaheadstyle{\normalfont\normalsize\bfseries}
\setparaindent{0pt}\setafterparaskip{0pt}
\makeatletter
\renewcommand\fps@figure{htbp}
\renewcommand\fps@table{htbp}
\makeatother
\captiondelim{\space }
\captionnamefont{\small\bfseries}
\captiontitlefont{\small\normalfont}
\changecaptionwidth
\captionwidth{1\textwidth}
\renewcommand{\abstractnamefont}{\normalfont\small\bfseries}
\setlength{\absleftindent}{0.1\textwidth}
\setlength{\absrightindent}{\absleftindent}
\makepagestyle{standard}
\makeatletter
\makeevenfoot{standard}{}{}{}
\makeoddfoot{standard}{}{}{}
\makeevenhead{standard}{\bfseries\thepage\normalfont\qquad\small\leftmark}{}{}
\makeoddhead{standard}{}{}{\small\rightmark\qquad\bfseries\thepage}
\makeatother
\makeatletter
\makepsmarks{standard}{
\createmark{chapter}{both}{shownumber}{\@chapapp\ }{ \quad }
\createmark{section}{right}{shownumber}{}{ \quad }
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}
\makeatother
\makepagestyle{chap}
\makeatletter
\makeevenfoot{chap}{}{\small\bfseries\thepage}{}
\makeoddfoot{chap}{}{\small\bfseries\thepage}{}
\makeevenhead{chap}{}{}{}
\makeoddhead{chap}{}{}{}
\makeatother
\nouppercaseheads
\pagestyle{standard}
\aliaspagestyle{chapter}{chap}
\maxtocdepth{subsection} % Only parts, chapters and sections in the table of contents
\settocdepth{subsection}
\AtEndDocument{\addtocontents{toc}{\par}} % Add a \par to the end of the TOC
\author{author name}
\title{Title}
\date{June}%delete date
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\renewcommand{\thedefinition}{\thesection$\text{.}$\arabic{definition}}
\theoremstyle{theorem}
\newtheorem{theorem}[definition]{Theorem}
\begin{document}
\frontmatter
\maketitle
\newpage
\pagenumbering{arabic}
\begin{abstract}
test
\end{abstract}
\clearpage
\tableofcontents*
\clearpage
\setsecnumdepth{subsection}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Title of chapter}
This is a text
\begin{theorem}
this is a theorem.
\end{theorem}
\appendix
\backmatter
\end{document}
我的问题是定理编号。定理编号应该分为三部分:章节号、节号和定理号。但是,章节号和节号似乎都是零。
我该如何修复它?