定理头后换行

定理头后换行

我希望在“Theorem Head”之后有一个换行符,如下所示:

在此处输入图片描述

我该如何对阿拉伯语和amsart文献类别做到这一点?

我尝试添加以下命令,但没有成功。

\theoremstyle{plain} % default

我得到的结果如下:

在此处输入图片描述


% !TEX TS-program = xelatex
\documentclass[12pt]{amsart}
\usepackage[a4paper,margin=0.5in]{geometry}

\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}
% definition 
\newtheorem*{definition}{\textarabic{تعريف}}
%Space after theorem head
\theoremstyle{plain} % default

% Method proposed in "The LaTeX Companion", 2nd ed.:
\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
    {\csname the#1\endcsname\space}%    default
    {\csname #1@cntformat\endcsname}}%  enable individual control
\newcommand\section@cntformat{\fbox{\thesection}\space}       % section
\newcommand\subsection@cntformat{\fbox{\thesubsection}\space} % subsection
\newcommand\subsubsection@cntformat{\fbox{\thesubsubsection}\space} % subsection
\makeatother

\begin{document}
    \section{اتصال}
    \subsection{اتصال في نقطة}
        \begin{definition}{}
        لتكن $f$ دالة معرفة على مجال مفتوح $I$. و$a$ عنصر من $I$.
        
\[\lim_{x\to a}f(x)=f(a)\iff \left(a \mbox{ \textarabic{متصلة في} } f\right) \]
    \end{definition}
    \subsection{اتصال في مجال}
    \subsubsection{مبرهنة القيم الوسيطية}
    \section{اشتقاق}
    \subsection{اشتقاق في نقطة}
    \subsubsection{اشتقاق في المجال}
\end{document}

答案1

amsthm包(由文档类自动加载amsart)允许您定义新的定理样式,例如我称之为的样式defn-break,它类似于预定义的definition定理样式,只是它在定理标题后插入换行符。

在此处输入图片描述

% !TEX TS-program = xelatex
\documentclass[12pt]{amsart}
\usepackage[a4paper,margin=0.5in]{geometry}

\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Amiri}

%% Create a new theorem style; see p. 9 of user guide of 'amsthm' package.
\newtheoremstyle{defn-break}%
{}{}%
{\upshape}{}%
{\mdseries}{.}% 
{\newline}{}
% Switch to the newly-defined theorem style
\theoremstyle{defn-break} 
% Define 'definition' as an unnumbered theorem-like environment:
\newtheorem*{definition}{\textarabic{تعريف}}


% Place frameboxes around numbers associated with sectioning headers,
% using the method proposed in "The LaTeX Companion", 2nd ed.:
\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
    {\csname the#1\endcsname\space}%    default
    {\csname #1@cntformat\endcsname}}%  enable individual control
\newcommand\section@cntformat{\fbox{\thesection}\space}       % section
\newcommand\subsection@cntformat{\fbox{\thesubsection}\space} % subsection
\newcommand\subsubsection@cntformat{\fbox{\thesubsubsection}\space} % subsubsection
\makeatother

\begin{document}

\section{اتصال}
\subsection{اتصال في نقطة}

\begin{definition}
        لتكن $f$ دالة معرفة على مجال مفتوح $I$. و$a$ عنصر من $I$.
\[
\lim_{x\to a}f(x)=f(a)\iff \bigl(a \mbox{ \textarabic{متصلة في} } f\bigr) 
\]
\end{definition}

\end{document}

相关内容