如何在多语中定义证明和推论

如何在多语中定义证明和推论
\documentclass[12pt]{book}

\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{etoolbox}
\usepackage{multicol}
\usepackage{titleps}

\usepackage{amsmath,amssymb}


%\usepackage{framed}
%\usepackage[framed]{ntheorem}

%\newframedtheorem{theorem}{مبرهنة}[section]

%\renewcommand{\thetheorem}{\arabic{theorem}.\arabic{section}.\arabic{chapter}}

\newtheorem{theorem}{مبرهنة}[chapter]

\usepackage{geometry}
%\geometry{paperwidth=150mm, paperheight=200mm, top=5mm, bottom=5mm}
%\pagestyle{empty}

\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2,AutoFakeSlant=-0.02]{Traditional Arabic}
\setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}

\makeatletter
\pretocmd{\@chapter}{\begingroup \renewcommand{\thechapter}{{\words{chapter}}}}{}{}
\apptocmd{\@chapter}{\endgroup}{}{}
\makeatother
\titlecontents{lsection}
  [2.3em]{\small}{\contentslabel{2.3em}}
  {\hspace*{-2.3em}}
  {}
\titlecontents{lsubsection}
  [4.6em]{\small}{\contentslabel{2.3em}}
  {\hspace*{-2.3em}}
  {}

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptertitlename\ \words{chapter}}{20pt}{\Huge}
\titlespacing{\chapter}
  {0pt}{40pt}{-10pt}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  MACRO FOR LITERAL NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
الأول\or
الثاني\or
الثالث\or
الرابع\or
الخامس\or
السادس\or
السابع\or
الثامن\or
التاسع\or
العاشر\or
الحادي عشر\or
الثاني عشر\or
الثالث عشر\or
الرابع عشر\or
الخامس عشر\or
السادس عشر\or
السابع عشر\or
الثامن عشر\or
التاسع عشر\or
العشرون\or
\else
I need more words\fi}

% \usepackage{etoolbox} %% uncomment if 'etoolbox' isn't already being loaded
\makeatletter
\patchcmd{\@makechapterhead}{\thechapter}{\words{chapter}}{}{}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  END MACRO FOR LITERAL NUMBERING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     REDEFINING NAMES IN ARABIC      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\gappto\captionsarabic{\renewcommand{\contentsname}{المحتويات}}
\gappto\captionsarabic{\renewcommand{\chaptername}{الفصل}}
\gappto\captionsarabic{\def\figurename{رسم}}
\gappto\captionsarabic{\renewcommand{\tablename}{جدول}}
\gappto\captionsarabic{\renewcommand{\indexname}{\textbf{الثبت}}}
\gappto\captionsarabic{\renewcommand{\appendixname}{\textbf{الملحق}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   MACRO FOR PARTIAL CONTENTS     %%%%%%%%%%%%%%%%%%%%%%%
% start of Werner's code
% http://tex.stackexchange.com/a/37732/3954
\setlength{\columnseprule}{0.1pt}
\makeatletter
\patchcmd{\endmulticols}{\par}{\par\xdef\@@tpd{\the\prevdepth}}{}{}
\newenvironment{multicolumns}[1]
  {% \begin{multicolumns}{<cols>}
   \par\nobreak % don't break a page here
   \kern\dimexpr\the\prevdepth+\multicolsep\relax % don't take into account the depth of the preceding line + #2
   {\columnseprulecolor\hrule height 0.4pt} % the rule, same width as \columnseprule
   \kern-\multicolsep % space after the rule
   \nointerlineskip % no additional space after the rule
   \begin{multicols}{#1}
  }
  {% \end{multicolumns}
   \end{multicols}%
   \par\nobreak % don't break a page here
   \kern\dimexpr\@@tpd-\multicolsep\relax % don't take into account the depth of the preceding line + #2
   {\columnseprulecolor\hrule height 0.4pt} % the rule, same width as \columnseprule
   \kern\multicolsep % space after the rule
   \nointerlineskip % no additional space after the rule
  }
\makeatother
% end of Werner's code

%%%     Commands for generateing the ptc
\newcommand\buildptc{%
\vspace*{-40pt}
  \startcontents[chapter]
{\large\noindent\bf
المحتوى}
\vspace*{-5pt}
  \begin{multicolumns}{2}
  \printcontents[chapter]{l}{0}{\setcounter{secnumdepth}{3}}
  \end{multicolumns}%
%%%\vspace*{-40pt}
\vspace*{5pt}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   END MACRO FOR PARTIAL CONTENTS     %%%%%%%%%%%%%%%%%%%%%%%





%%%%%%%%%%%%%%%%%% REDEFINES \THECHAPTER IN CONTENTS
\makeatletter
\pretocmd{\@chapter}{\begingroup \renewcommand{\thechapter}{{\words{chapter}}}}{}{}
\apptocmd{\@chapter}{\endgroup}{}{}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{titletoc}%
\titlecontents{chapter}% <section-type>
  [0pt]% <left>
  {\bfseries\vspace*{10pt}}% <above-code>
  {\normalsize\chaptername\ \thecontentslabel.\;}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\normalsize\hfill\contentspage}% <filler-page-format>

\usepackage[Glenn]{fncychap}
\ChNumVar{\Large}% Dimension of the number of the chapter in the first page... instead of the default...\ChNumVar{\Huge}

\renewcommand{\thesection}{\arabic{section}}
\begin{document}

\end{document}

我找到了这个模板,但我不知道如何定义证明->推论->结论

答案1

该模板使用包amsthm来定义定理等。您可以定义类似于定理的证明和推论环境\newtheorem{proof}{برهان}[chapter]。可选参数将编号设置为章节编号。您可能还想使用\theoremstyle{}andplaindefinitionorremark作为参数更改定理样式。有关更多详细信息,请查看文档尤其第 7 页对于风格。

相关内容