Skip to content

关于定理环境创建编号问题,手册讲解不够清晰 #168

Answered by dreistein543
dreistein543 asked this question in Q&A
Discussion options

You must be logged in to vote

参考 Marco Daniel 的回答,我找到比较满意的方式。该方案基于 ntheorem 包(也是目前模板使用的),具体解决方案如下

% 在导言区做如下设定
% 定义假设样式
\usepackage{ntheorem}
\theorembodyfont{\normalfont}
\theoremseparator{:}
% 定义假设
\newtheorem{hypo}{假设}
% 定义次级假设
\newtheorem{subhypo}{假设}[hypo]
\renewcommand\thesubhypo{\thehypo\alph{subhypo}}

在正文中做如下输入

% 建立假设1
\begin{hypo}\label{hypo:}
    假设1
\end{hypo}

	\stepcounter{hypo}
	\setcounter{subhypo}{0} % 这两行每开启一组新的子假设需要重复一次
	\begin{subhypo}\label{hypo:假设2a}
	假设2a
	\end{subhypo}

	\begin{subhypo}\label{hypo:2b}
	2b
	\end{subhypo}

	\begin{subhypo}\label{hypo:2c}
	2c
	\end{subhypo}

编译结果如下

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@atxy-blip
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dreistein543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation trick precious experience math Symbols and theorems
2 participants