
我有两个问题:
我想更改部分中的编号,现在我有:
但我想要:
10 性格开朗
- 定义
- 定理
意思是删除表示章节编号的第一个数字。
- 第二个问题也与编号有关。现在我知道整个文档中所有方程的编号从 1 到 ...。我希望它在每个新部分都从 1 开始。
编辑:在我的文档中我有:
\newtheorem{tw}{Theorem}[section]
\renewcommand{\theorem}{\arabic{tw}}
\newtheorem{stw}[tw]{Stwierdzenie}
\newtheorem{fakt}[tw]{Fakt}
\newtheorem{lemat}[tw]{Lemat}
\theoremstyle{definition}
\newtheorem{df}[tw]{Definicja}
\newtheorem{ex}[tw]{Przykład}
\newtheorem{uw}[tw]{Uwaga}
\newtheorem{at}[tw]{Wniosek}
并且它不能以正确的方式工作,下面是我使用的类:
\documentclass[12pt, a4paper]{article}
\usepackage{marginnote}
\usepackage[top=2.5cm, bottom=3.5cm, outer=2cm, inner=2cm, heightrounded, marginparwidth=2.5cm, marginparsep=2cm]{geometry}
\usepackage[polish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[pdftex,linkbordercolor={0 0.9 1}]{hyperref}
\usepackage{amsthm,amsmath,amsfonts,amssymb,mathtools}
\usepackage{url}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{bbm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{\textbf{\thepage}}
\fancyhead[L]{\small\sffamily \nouppercase{\leftmark}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\usepackage{chngcntr}
\counterwithin*{equation}{section}
\newtheorem{tw}{Theorem}[section]
\renewcommand{\theorem}{\arabic{tw}}
\newtheorem{stw}[tw]{Stwierdzenie}
\newtheorem{fakt}[tw]{Fakt}
\newtheorem{lemat}[tw]{Lemat}
\theoremstyle{definition}
\newtheorem{df}[tw]{Definicja}
\newtheorem{ex}[tw]{Przykład}
\newtheorem{uw}[tw]{Uwaga}
\newtheorem{at}[tw]{Wniosek}
\begin{document}
\end{document}
答案1
对于方程式的编号,该chngcntr
包提供了一个用户级界面。写作
\counterwithin*{equation}{section}
将在每节开头重置方程计数器,但不改变其打印格式。[该包还具有\counterwithin
给出“(section.equation)”形式的编号,这不是您要求的。]
对于定理编号,kalkoeller 评论中的建议最为合适。
以下是一份最基本的文档:
\documentclass{article}
\usepackage{chngcntr}
\counterwithin*{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\arabic{theorem}}
\begin{document}
\section{First section}
\begin{theorem}
A theorem.
\end{theorem}
\begin{equation}
x = ay
\end{equation}
\begin{theorem}
New theorem.
\end{theorem}
\section{Second section}
\begin{equation}
t = x^2
\end{equation}
\begin{theorem}
Last theorem.
\end{theorem}
\begin{equation}
s = t^3
\end{equation}
\end{document}