我希望有各种假设(如果你愿意,也可以叫它子假设)的变体,并将它们标记为 1a、2b 等。没有使用amsthm
已知与出版商内部风格相冲突的软件包(通知管理科学样式文件)。 分子量:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author template for Management Science (mnsc) for articles with no e-companion (EC)
%% Mirko Janc, Ph.D., INFORMS, [email protected]
%% ver. 0.95, December 2010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[mnsc,blindrev]{informs3}
%\documentclass[mnsc,nonblindrev]{informs3} % current default for manuscript submission
\OneAndAHalfSpacedXI
%%\OneAndAHalfSpacedXII % Current default line spacing
%%\DoubleSpacedXII
%%\DoubleSpacedXI
% If hyperref is used, dvi-to-ps driver of choice must be declared as
% an additional option to the \documentclass. For example
%\documentclass[dvips,mnsc]{informs3} % if dvips is used
%\documentclass[dvipsone,mnsc]{informs3} % if dvipsone is used, etc.
% Private macros here (check that there is no clash with the style)
%% Setup of theorem styles. Outcomment only one.
%% Preferred default is the first option.
\TheoremsNumberedThrough % Preferred (Theorem 1, Lemma 1, Theorem 2)
%\TheoremsNumberedByChapter % (Theorem 1.1, Lema 1.1, Theorem 1.2)
\ECRepeatTheorems
%% Setup of the equation numbering system. Outcomment only one.
%% Preferred default is the first option.
\EquationsNumberedThrough % Default: (1), (2), ...
%\EquationsNumberedBySection % (1.1), (1.2), ...
% For new submissions, leave this number blank.
% For revisions, input the manuscript number assigned by the on-line
% system along with a suffix ".Rx" where x is the revision number.
\MANUSCRIPTNO{MS-0001-1922.65}
%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%
\begin{assumption}
The first assumption.
\end{assumption}
Some text\ldots
\begin{assumption}
I want this to be displayed and referenced as ``Assumption~2a''.
\end{assumption}
Some text\ldots (If the text here interferes with the solution, it can be omitted.)
\begin{assumption}
I want this to be displayed and referenced as ``Assumption~2b''.
\end{assumption}
Some text\ldots
\begin{assumption}
I want this to be displayed and referenced as ``Assumption~3''.
\end{assumption}
%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%
相关问题的答案使用amsthm
包。我也试过答案在这里但它也不起作用。
*可能与解决方案无关:最终,我还想在某些假设变体(例如,假设~2b')中添加 prime(')此方法;所以我希望该解决方案也与它兼容。
答案1
有些针对小型股,但对于其余股来说相当简单。
如果您需要不同的连续子假设组,您只需\stepcounter{assumption}
在组之间发出即可。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author template for Management Science (mnsc) for articles with no e-companion (EC)
%% Mirko Janc, Ph.D., INFORMS, [email protected]
%% ver. 0.95, December 2010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[mnsc,blindrev]{informs3}
%\documentclass[mnsc,nonblindrev]{informs3} % current default for manuscript submission
\OneAndAHalfSpacedXI
%%\OneAndAHalfSpacedXII % Current default line spacing
%%\DoubleSpacedXII
%%\DoubleSpacedXI
% If hyperref is used, dvi-to-ps driver of choice must be declared as
% an additional option to the \documentclass. For example
%\documentclass[dvips,mnsc]{informs3} % if dvips is used
%\documentclass[dvipsone,mnsc]{informs3} % if dvipsone is used, etc.
% Private macros here (check that there is no clash with the style)
%% Setup of theorem styles. Outcomment only one.
%% Preferred default is the first option.
\TheoremsNumberedThrough % Preferred (Theorem 1, Lemma 1, Theorem 2)
%\TheoremsNumberedByChapter % (Theorem 1.1, Lema 1.1, Theorem 1.2)
\ECRepeatTheorems
%% Setup of the equation numbering system. Outcomment only one.
%% Preferred default is the first option.
\EquationsNumberedThrough % Default: (1), (2), ...
%\EquationsNumberedBySection % (1.1), (1.2), ...
% For new submissions, leave this number blank.
% For revisions, input the manuscript number assigned by the on-line
% system along with a suffix ".Rx" where x is the revision number.
\MANUSCRIPTNO{MS-0001-1922.65}
\newtheorem{subassumption}{Assumption\normalfont}[assumption]
\renewcommand{\thesubassumption}{\theassumption\alph{subassumption}}}
\newenvironment{assumption*}
{\ifnum\value{subassumption}=0 \stepcounter{assumption}\fi\subassumption}
{\endsubassumption}
\newenvironment{assumption+}[1]
{\renewcommand{\thesubassumption}{#1}\subassumption}
{\endsubassumption}
%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%
\begin{assumption}\label{a1}
The first assumption.
\end{assumption}
Some text\ldots
\begin{assumption*}\label{a2a}
I want this to be displayed and referenced as ``Assumption~2a''.
\end{assumption*}
Some text\ldots (If the text here interferes with the solution, it can be omitted.)
\begin{assumption*}\label{a2b}
I want this to be displayed and referenced as ``Assumption~2b''.
\end{assumption*}
Some text\ldots
\begin{assumption+}{\ref{a2b}$'$}\label{a2b'}
I want this to be displayed and referenced as ``Assumption~2b''.
\end{assumption+}
Some text\ldots
\begin{assumption}\label{a3}
I want this to be displayed and referenced as ``Assumption~3''.
\end{assumption}
References: \ref{a1}, \ref{a2a}, \ref{a2b}, \ref{a2b'}, \ref{a3}.
%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%
不同的版本,引入一个subassumptions
环境,以...为模型subequations
。
我定义辅助环境是fixedassumption
为了避免用小写字母打印标签 2a。
请注意,此版本assumption*
用来代替assumption+
以前的版本。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author template for Management Science (mnsc) for articles with no e-companion (EC)
%% Mirko Janc, Ph.D., INFORMS, [email protected]
%% ver. 0.95, December 2010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[mnsc,blindrev]{informs3}
%\documentclass[mnsc,nonblindrev]{informs3} % current default for manuscript submission
\OneAndAHalfSpacedXI
%%\OneAndAHalfSpacedXII % Current default line spacing
%%\DoubleSpacedXII
%%\DoubleSpacedXI
% If hyperref is used, dvi-to-ps driver of choice must be declared as
% an additional option to the \documentclass. For example
%\documentclass[dvips,mnsc]{informs3} % if dvips is used
%\documentclass[dvipsone,mnsc]{informs3} % if dvipsone is used, etc.
% Private macros here (check that there is no clash with the style)
%% Setup of theorem styles. Outcomment only one.
%% Preferred default is the first option.
\TheoremsNumberedThrough % Preferred (Theorem 1, Lemma 1, Theorem 2)
%\TheoremsNumberedByChapter % (Theorem 1.1, Lema 1.1, Theorem 1.2)
\ECRepeatTheorems
%% Setup of the equation numbering system. Outcomment only one.
%% Preferred default is the first option.
\EquationsNumberedThrough % Default: (1), (2), ...
%\EquationsNumberedBySection % (1.1), (1.2), ...
% For new submissions, leave this number blank.
% For revisions, input the manuscript number assigned by the on-line
% system along with a suffix ".Rx" where x is the revision number.
\MANUSCRIPTNO{MS-0001-1922.65}
% not to be used directly
\newcounter{subassumption}
\theoremstyle{TH}
\newtheorem{fixedassumption}[assumption]{Assumption\normalfont}
\newenvironment{subassumptions}
{%
\refstepcounter{assumption}%
\edef\theassumption{\theassumption\noexpand\alph{assumption}}%
\setcounter{subassumption}{\value{assumption}}%
\setcounter{assumption}{0}%
\let\assumption\fixedassumption
\let\endassumption\endfixedassumption
\ignorespaces
}
{\setcounter{assumption}{\value{subassumption}}\ignorespacesafterend}
\newenvironment{assumption*}[1]
{\renewcommand{\theassumption}{#1}\fixedassumption}
{\endfixedassumption}
%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%
\begin{assumption}\label{a1}
The first assumption.
\end{assumption}
Some text\ldots
\begin{subassumptions}
\begin{assumption}\label{a2a}
I want this to be displayed and referenced as ``Assumption~2a''.
\end{assumption}
Some text\ldots (If the text here interferes with the solution, it can be omitted.)
\begin{assumption}\label{a2b}
I want this to be displayed and referenced as ``Assumption~2b''.
\end{assumption}
\end{subassumptions}
Some text\ldots
\begin{assumption*}{\ref{a2b}$'$}\label{a2b'}
I want this to be displayed and referenced as ``Assumption~2b''.
\end{assumption*}
Some text\ldots
\begin{assumption}\label{a3}
I want this to be displayed and referenced as ``Assumption~3''.
\end{assumption}
References: \ref{a1}, \ref{a2a}, \ref{a2b}, \ref{a2b'}, \ref{a3}.
%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%
答案2
也许我误解了这个问题,似乎这需要两个不同的环境:一个用于assumptions
,一个用于subassumptions
。在底层,所有类似定理的环境都使用,\trivlist
所以这里自然要做的就是定义使用相同机制的新环境。
下面的代码定义了两个环境,assumption
和assumption*
,用于假设和子假设。与标准定理类环境一样,这两个环境都接受可选参数。调整上面的 MWE,输出为:
以下是代码:
\documentclass{article}
\newcounter{assumption}
\newcounter{subassumption}
\renewcommand\theassumption{Assumption~\arabic{assumption}}
\renewcommand\thesubassumption{\theassumption\alph{subassumption}}
\makeatletter
\@addtoreset{subassumption}{assumption}
\newenvironment{assumption}[1][]{%
\refstepcounter{assumption}%
\def\@currentlabel{Assumption~\arabic{assumption}}%
\if\relax\detokenize{#1}\relax\let\@assumptionextra\relax%
\else\def\@assumptionextra{\space(#1)}%
\fi%
\trivlist\item[\textsc{Assumption}~\arabic{assumption}\@assumptionextra\space]%
\ignorespaces\itshape%
}{\endtrivlist}%
\newenvironment{assumption*}[1][]{%
% change the assumption counter if this is the first subassumption
\ifnum\value{subassumption}=0\refstepcounter{assumption}\fi%
\refstepcounter{subassumption}%
\def\@currentlabel{Assumption~\arabic{assumption}\alph{subassumption}}%
\if\relax\detokenize{#1}\relax\let\@assumptionextra\relax%
\else\def\@assumptionextra{\space(#1)}%
\fi%
\trivlist\item[\textsc{Assumption}~\arabic{assumption}\alph{subassumption}%
\@assumptionextra\space]\ignorespaces\itshape%
}{\endtrivlist}%
\makeatother
\begin{document}
\begin{assumption}
The first assumption.
\label{Assumption1}
\end{assumption}
Some text\ldots
\begin{assumption*}
I want this to be displayed and referenced as ``Assumption~2a''.
\label{Assumption2a}
\end{assumption*}
Some text\ldots (If the text here interferes with the solution, it can be omitted.)
\begin{assumption*}
I want this to be displayed and referenced as ``Assumption~2b''.
\label{Assumption2b}
\end{assumption*}
\begin{assumption*}[$c>a$]
I want this to be displayed and referenced as ``Assumption~2b''.
\label{Assumption2c}
\end{assumption*}
Some text\ldots
\begin{assumption}
I want this to be displayed and referenced as ``Assumption~3''.
\label{Assumption3}
\end{assumption}
Labels: \ref{Assumption1}, \ref{Assumption2a}, \ref{Assumption2b}
and \ref{Assumption3}
\end{document}