连续分段

连续分段

请在乳胶中

hello I need the sections and subsections to look like this:

I. first section
   1. first subsection
   2. second subsection

II. second section
   3. third subsection


also I need that all theorems and lemma are counted as follows:

1. first subsection
   lemma 1.1 
   theorem 1.2 
2. second subsection
   theorem 2.1 

梅威瑟:

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{amsthm, amsmath, amssymb}
\usepackage{mathtools}

\newtheorem{satz}{Satz}[subsection]
\newtheorem{lem}{Lemma}[subsection]
\newtheorem{kor}{Korollar}[subsection]

\renewcommand{\thesection}{\Roman{section}}
\section{Poisson-Equation}
\subsection{Harmonic functions}
...
\subsection{Poisson formula}
...

答案1

由于缩进和自定义编号,我应用了自定义样式。此外,我还找到了一种删除最后一个标点符号的技巧,默认情况下,最后一个标点符号位于定理编号之后。以下是结果

在此处输入图片描述

\documentclass{article}
\usepackage{amsthm}
\usepackage{etoolbox}
\usepackage{kantlipsum}

%%% Sections
\renewcommand{\thesection}{\Roman{section}.}
\counterwithout*{subsection}{section}
\renewcommand*{\thesubsection}{\hspace{15pt}\arabic{subsection}.}

%%% Lemma and theorem
% Custom styles
\newtheoremstyle{indplain}{3pt}{3pt}{\itshape}{\parindent}{\bfseries}{}{.5em}{}
\newtheoremstyle{inddef}{3pt}{3pt}{}{\parindent}{\bfseries}{}{.5em}{}
% Apply custom styles
\theoremstyle{indplain}
\newtheorem{theorem}{Theorem}[subsection]
\theoremstyle{inddef}
\newtheorem{lemma}[theorem]{Lemma}
% Format counters
\renewcommand*{\thelemma}{\arabic{subsection}.\arabic{lemma}}
\renewcommand*{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
\makeatletter
  % Remove the the full stop after the theorem number
  \patchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{}
\makeatother


\begin{document}
\section{First section}
\subsection{First subsection}
\kant[1][1]\kant[2][1]
\begin{theorem}\kant[4][1]\end{theorem}
\begin{lemma}\kant[3][1]\end{lemma}
\begin{theorem}\kant[4][1]\end{theorem}
\begin{lemma}\kant[3][1]\end{lemma}

\subsection{Second subsection}
\begin{lemma}\kant[3][1]\end{lemma}

\section{Second section}
\subsection{Third subsection}
\kant[1][1]
\begin{theorem}\kant[4][1]\end{theorem}
\begin{lemma}\kant[3][1]\end{lemma}
\end{document}

相关内容