定理罗马数字

定理罗马数字

我想根据附图将定理编号为定理 I、定理 II、定理 III 等,但我无法在代码中修复它。这是我的乳胶代码:

‎\documentclass[journal]{journal}‎

‎\usepackage[cmex10]{amsmath}‎

\newtheorem{theorem}{Theorem}‎‎‎‎[section]

‎\newtheorem{lemma}[theorem]{Lemma}‎

‎\newtheorem{example}[theorem]{Example}‎

‎\newtheorem{definition}[theorem]{Definition}‎

这是pdf文件的图片:

在此处输入图片描述

有一个类似的问题这里但我不知道如何在我的问题中使用它。期刊 Latex 文件的模板是这里

答案1

尝试一下这个模板。

当你创建一个新的环境定理时

\newtheorem{<environment name>}{<heading>}

将创建一个与环境同名的计数器。例如

\newtheorem{definition}{Definition}将创建计数器definition并使用以下命令:

\renewcommand{\thedefinition}{\Roman{definition}}

示例将用罗马数字编号。

每个环境将在整个文档中连续编号(I,II,III,IV......),而不管其他环境如何。

b

% !TeX TS-program = pdflatex

\documentclass[journal]{journal}

%% \newtheorem{<environment name>}{<heading>} a counter with the same name of the enviroment  will be created
\newtheorem{theorem}{Theorem}
\renewcommand{\thetheorem}{\Roman{theorem}} % Use Roman numbering

\newtheorem{definition}{Definition}
\renewcommand{\thedefinition}{\Roman{definition}}

\newtheorem{example}{Example}
\renewcommand{\theexample}{\Roman{example}}


\begin{document}
    
    \section{Definitions}
    
    \begin{definition}
        Given two line segments whose lengths are \(a\) and \(b\) respectively there is a 
        real number \(r\) such that \(b=ra\).
    \end{definition}
    
    
    \begin{definition}
        Given two line segments whose lengths are \(a\) and \(b\) respectively there is a 
        real number \(r\) such that \(b=ra\).
    \end{definition}

    \section{Theorems}
        
    \begin{theorem}
    This is a theorem about right triangles and can be summarised in the next 
    equation 
    \[ x^2 + y^2 = z^2 \]
    \end{theorem}
    
    \begin{theorem}
        This is a theorem about right triangles and can be summarised in the next 
        equation 
        \[ x^2 + y^2 = z^2 \]
    \end{theorem}
        
    \begin{theorem}
        This is a theorem about right triangles and can be summarised in the next 
        equation 
        \[ x^2 + y^2 = z^2 \]
    \end{theorem}

\section{Examples}

    \begin{example}
        There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
    \end{example}
    
    \begin{example}
        There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
    \end{example}       


    \section{Final}

    \begin{theorem}
        This is a theorem about right triangles and can be summarised in the next 
        equation 
        \[ x^2 + y^2 = z^2 \]
    \end{theorem}

    \begin{example}
        There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
    \end{example}

    \end{document}

相关内容