我有以下文档,其中我在“主要”部分中指定了假设 1,2。
\documentclass[12 pt,a4paper, oneside, openany, notitlepage]{article}
\input epsf
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{amsmath, amssymb, graphics}
\usepackage{mathtools}
\newcounter{mathematicapage}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage[inner=1.25in,outer=1.25in,bottom=1.25in,top=1.25in]{geometry}
\usepackage{setspace}
\onehalfspacing
\newtheoremstyle{mystyle}% name
{\topsep}% Space above
{\topsep}% Space below
{\normalfont}% Body font
{}% Indent amount
{ \color{red}}% Theorem head font
{.}%Punctuation after theorem head
{.5em}%Space after theorem head
{}% theorem head spec
\theoremstyle{mystyle}
\newtheorem{assumptionex}{Assumption}
\newenvironment{assumption}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\bullet$}\assumptionex}
{\popQED\endassumptionex}
\begin{document}
\section{Main}
\begin{assumption}
Blah
\end{assumption}
\begin{assumption}
Blah2
\end{assumption}
\section{Extensions}
\end{document}
在“扩展”部分中,我想使用相同的样式引入另外两个假设,但我想将它们标记为假设 1' 和假设 2'。我该怎么做?
答案1
您可以按照与假设构造类似的方式定义一个新环境,但通过更新命令来重新定义标签的打印,\the...
其中...
是相应的计数器名称:
\documentclass[12 pt,a4paper, oneside, openany, notitlepage]{article}
\usepackage{amssymb,xcolor}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\newtheoremstyle{mystyle}% name
{\topsep}% Space above
{\topsep}% Space below
{\normalfont}% Body font
{}% Indent amount
{ \color{red}}% Theorem head font
{.}%Punctuation after theorem head
{.5em}%Space after theorem head
{}% theorem head spec
\theoremstyle{mystyle}
\newtheorem{assumptionex}{Assumption}
\newenvironment{assumption}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\bullet$}\assumptionex}
{\popQED\endassumptionex}
\newtheorem{assumptionexp}{Assumption}
\newenvironment{assumptionp}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\bullet$}\assumptionexp}
{\popQED\endassumptionexp}
\renewcommand{\theassumptionexp}{\arabic{assumptionexp}$'$}
\begin{document}
\section{Main}
\begin{assumption}
Blah
\end{assumption}
\begin{assumption}
Blah2
\end{assumption}
\section{Extensions}
\begin{assumptionp}
Blahh
\end{assumptionp}
\begin{assumptionp}
Blah22
\end{assumptionp}
\end{document}
具体来说,我定义了一个新定理assumptionexp
和一个新环境assumptionp
,然后重新定义了\theassumptionexp
在数字上放置一个素数。