\begin{proof} 之后紧接着 \paragraph{...}

\begin{proof} 之后紧接着 \paragraph{...}

我喜欢 \paragraph{...} 命令,但如果我在 \begin{proof} 之后立即使用它,它不起作用。

有没有办法定义我自己的段落命令,以便我可以在 \begin{proof} 之后立即使用它。


\documentclass[a4paper,fontsize=12pt,egregdoesnotlikesansseriftitles]{scrartcl}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\usepackage[a4paper,left=3cm,right=3cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[inline]{enumitem}

\setlength{\parindent}{0ex}
\setlength{\parskip}{1ex}
\setlength{\jot}{12pt}
\usepackage[onehalfspacing]{setspace}

\newtheoremstyle{my_theorem_style}
  {20pt}{20pt}%
  {\itshape}{}%
  {\bfseries}{.}%
  {\newline}{}%

\theoremstyle{my_theorem_style}
\newtheorem{theorem}{Theorem}[section]


\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum.

\begin{theorem}
Aliquam ultrices sagittis orci a scelerisque purus semper eget. Eget sit amet tellus cras adipiscing enim eu turpis egestas:
%
\begin{enumerate}
\item Nunc vel risus commodo.
\item Libero nunc consequat.
\item Diam maecenas sed enim ut. 
\end{enumerate}
%
\end{theorem}


\begin{proof}...
%
\paragraph{ad 1.} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum. 

\paragraph{ad 2.} Amet nulla facilisi morbi tempus iaculis urna id volutpat. Adipiscing elit duis tristique sollicitudin nibh sit. Aliquam ultrices sagittis orci a scelerisque purus semper eget. 

\paragraph{ad 3.} Habitasse platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper. Libero nunc consequat interdum varius sit amet mattis. Fermentum leo vel orci porta non. 
%
\end{proof}

\end{document} 

在此处输入图片描述

如果我在 \begin{proof} 之后立即使用 \paragraph{...},它甚至不会编译。

所以我总是要在 \begin{proof} 之后写一些东西(有时是 bs)。

答案1

我认为下面定义的宏mypara可以满足您的要求。它提供了\paragraph输出,但没有编号或目录条目。

% paraprob.tex  SE 620506

\documentclass[a4paper,fontsize=12pt,egregdoesnotlikesansseriftitles]{scrartcl}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{fix-cm}
\usepackage[a4paper,left=3cm,right=3cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[inline]{enumitem}

\setlength{\parindent}{0ex}
\setlength{\parskip}{1ex}
\setlength{\jot}{12pt}
\usepackage[onehalfspacing]{setspace}

\newtheoremstyle{my_theorem_style}
  {20pt}{20pt}%
  {\itshape}{}%
  {\bfseries}{.}%
  {\newline}{}%

\theoremstyle{my_theorem_style}
\newtheorem{theorem}{Theorem}[section]

\newcommand{\mypara}[1]{%
\vspace{\parskip}
\vspace{\baselineskip}
\textbf{#1 }%
}


\begin{document}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum.

\begin{theorem}
Aliquam ultrices sagittis orci a scelerisque purus semper eget. Eget sit amet tellus cras adipiscing enim eu turpis egestas:
%
\begin{enumerate}
\item Nunc vel risus commodo.
\item Libero nunc consequat.
\item Diam maecenas sed enim ut. 
\end{enumerate}
%
\end{theorem}


\begin{proof}...
%
\paragraph{ad 1.} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum. 

\paragraph{ad 2.} Amet nulla facilisi morbi tempus iaculis urna id volutpat. Adipiscing elit duis tristique sollicitudin nibh sit. Aliquam ultrices sagittis orci a scelerisque purus semper eget. 

\paragraph{ad 3.} Habitasse platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper. Libero nunc consequat interdum varius sit amet mattis. Fermentum leo vel orci porta non. 
%
\end{proof}

\begin{proof}...

\mypara{ad 1.} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum. 

\mypara{ad 2.} Amet nulla facilisi morbi tempus iaculis urna id volutpat. Adipiscing elit duis tristique sollicitudin nibh sit. Aliquam ultrices sagittis orci a scelerisque purus semper eget. 

\mypara{ad 3.} Habitasse platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper. Libero nunc consequat interdum varius sit amet mattis. Fermentum leo vel orci porta non. 
%
\end{proof}

\end{document} 

在此处输入图片描述

答案2

有点菜鸟的回答:但我发现放入一个
$\;$\\ 通常会有所帮助。
这会给你一个数学环境,并在后面有一个换行符的空间中显示广告。
基本上是一个空行,没有使用不能立即工作的命令。

相关内容