我正在文章类中编写 LaTeX 文档,最近我意识到这个类没有 /chapter 命令。但是,当我使用章节和子章节时,它们被写成 1.1、1.1.1、1.1.2 等。我不知道如何继续使用 2.1、2.2 等。我注定要永远坚持使用 1.n 吗?谢谢!
这是我的文件:
%
% This is the LaTeX template file for lecture notes for CS267,
% Applications of Parallel Computing. When preparing
% LaTeX notes for this class, please use this template.
%
% To familiarize yourself with this template, the body contains
% some examples of its use. Look them over. Then you can
% run LaTeX on this file. After you have LaTeXed this file then
% you can look over the result either by printing it out with
% dvips or using xdvi.
%
\documentclass[twoside]{article}
\setlength{\oddsidemargin}{0.25 in}
\setlength{\evensidemargin}{-0.25 in}
\setlength{\topmargin}{-0.6 in}
\setlength{\textwidth}{6.5 in}
\setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.75 in}
\setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}
%
% ADD PACKAGES here:
%
\usepackage{amsmath,amsfonts,graphicx}
%
% The following commands set up the lecnum (lecture number)
% counter and make various numbering schemes work relative
% to the lecture number.
%
\newcounter{lecnum}
\renewcommand{\thepage}{\thelecnum-\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}
%
% The following macro is used to generate the header.
%
\newcommand{\lecture}[4]{
\pagestyle{myheadings}
\thispagestyle{plain}
\newpage
\setcounter{lecnum}{#1}
\setcounter{page}{1}
\noindent
\begin{center}
\framebox{
\vbox{\vspace{2mm}
\hbox to 6.28in { {\bf Topics in Topology
\hfill Fall 2015} }
\vspace{4mm}
\hbox to 6.28in { {\Large \hfill Notes on Topological Quantum Field Theories \hfill} }
\vspace{2mm}
\hbox to 6.28in { {\it #3 \hfill} }
\vspace{2mm}}
}
\end{center}
\markboth{Lecture #1: #2}{Lecture #1: #2}
\vspace*{4mm}
}
%
% Convention for citations is authors' initials followed by the year.
% For example, to cite a paper by Leighton and Maggs you would type
% \cite{LM89}, and to cite a paper by Strassen you would type \cite{S69}.
% (To avoid bibliography problems, for now we redefine the \cite command.)
% Also commands that create a suitable format for the reference list.
\renewcommand{\cite}[1]{[#1]}
\def\beginrefs{\begin{list}%
{[\arabic{equation}]}{\usecounter{equation}
\setlength{\leftmargin}{2.0truecm}\setlength{\labelsep}{0.4truecm}%
\setlength{\labelwidth}{1.6truecm}}}
\def\endrefs{\end{list}}
\def\bibentry#1{\item[\hbox{[#1]}]}
%Use this command for a figure; it puts a figure in wherever you want it.
%usage: \fig{NUMBER}{SPACE-IN-INCHES}{CAPTION}
\newcommand{\fig}[3]{
\vspace{#2}
\begin{center}
Figure \thelecnum.#1:~#3
\end{center}
}
% Use these for theorems, lemmas, proofs, etc.
\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{proof}{{\bf Proof:}}{\hfill\rule{2mm}{2mm}}
% **** IF YOU WANT TO DEFINE ADDITIONAL MACROS FOR YOURSELF, PUT THEM HERE:
\newcommand\E{\mathbb{E}}
\begin{document}
%FILL IN THE RIGHT INFO.
%\lecture{**LECTURE-NUMBER**}{**DATE**}{**LECTURER**}{**SCRIBE**}
\lecture{1}{February 3, 2015}{Alexander Grounds}
%\footnotetext{These notes are partially based on those of Nigel Mansell.}
% **** YOUR NOTES GO HERE:
% Some general latex examples and examples making use of the
% macros follow.
%**** IN GENERAL, BE BRIEF. LONG SCRIBE NOTES, NO MATTER HOW WELL WRITTEN,
%**** ARE NEVER READ BY ANYBODY.
These notes are based in large part on~\cite{K03}. I assume some differential topology, including the definitions of smooth manifolds, smooth maps, tangent spaces, and orientations. The unfamiliar reader should reference~\cite{L03} or a similar introduction to differential topology.
\part{Defining TQFTs}
\section{Cobordisms}
\subsection{Oriented Manifolds}
Let $M^n$ be a compact oriented manifold with boundary. Suppose we can write $\partial M = \Sigma_0 \coprod \Sigma_1$ for some connected manifolds $\Sigma_0$, $\Sigma_1$.For each point $x \in \Sigma_0$, we have a natural inclusion $$T_x \Sigma_0 \hookrightarrow T_x M.$$ If $\Sigma_0$ is oriented, we can choose an ordered positive basis $\mathcal{B}$ for $T_x \Sigma_0$. By appending one more vector $v$ to the end of $\mathcal{B}$, we can complete it to a positive basis for $T_x M$. If $v$ points into $M$, we
%Here is a citation, just for fun~\cite{CW87}.
\section*{References}
\beginrefs
\bibentry{K03}{\sc Kock, Joachim},
``Frobenius Algebras and 2D Topological Quantum Field Theories''
{\it London Mathematical Society Student Texts 59},
2003, pp.~1--55.
\bibentry{L03}{\sc Lee, John M.},
``Introduction to Smooth Manifolds"
{\it Springer Graduate Texts in Mathematics 218},
2003, pp.~1--76, 377--399.
\endrefs
% **** THIS ENDS THE EXAMPLES. DON'T DELETE THE FOLLOWING LINE:
\end{document}
答案1
您的文件有
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
因此,章节计数器将以计数器 lecnum 为前缀,该计数器使用 \lecture 命令进行递增。如果您希望章节增加,则有两个选择:
使用新
\lecture
命令(部分计数器将增加,但仍将以讲座编号作为前缀)。注释掉该行
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
考虑到由于其他一些计数器也有讲座编号前缀,您可能还需要注释掉以下几行:
\renewcommand{\thepage}{\thelecnum-\arabic{page}} \renewcommand{\thesection}{\thelecnum.\arabic{section}} \renewcommand{\theequation}{\thelecnum.\arabic{equation}} \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} \renewcommand{\thetable}{\thelecnum.\arabic{table}}