我正在完成一本书,我希望每一章的第一页都以文字数字开始:
第一章
...
第二章
...
第三章
ETC。
我在几本书中看到过它,所以我认为这是可能的,但是如何做到呢?
阿拉伯语文件示例
\documentclass[14pt,a4paper]{extbook}%{article}%
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{etoolbox}
\usepackage{multicol}
\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}
\usepackage{boxedminipage}
\usepackage{slashbox}
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{minitoc}
\usepackage{rotating}
\usepackage{fmultico}
\setlength{\columnseprule}{0.1pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{pdflscape}
\usepackage{array}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Amiri}
\setsansfont[Script=Arabic,Scale=1.5]{Amiri}
\gappto\captionsarabic{\renewcommand{\chaptername}{الباب}}
\begin{document}
\chapter{المحاكاة}
كيف يمكننا إيجاد احتمال الفوز في لعبة
\end{document}
答案1
使用\words{chapter}
而不是定义的\arabic{chapter}
地方words
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
one\or
two\or
three\else
I need more words\fi}
我切换了字体,因为我没有你使用的字体,并保留了英文文字:-)
\documentclass[14pt,a4paper]{extbook}%{article}%
\usepackage{titlesec}
\usepackage{titletoc}
\usepackage{etoolbox}
\usepackage{multicol}
\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}
\usepackage{boxedminipage}
\usepackage{slashbox}
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{minitoc}
\usepackage{rotating}
\usepackage{fmultico}
\setlength{\columnseprule}{0.1pt}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{pdflscape}
\usepackage{array}
\usepackage{polyglossia}
\setmainlanguage[numerals=maghrib]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Arial}
\setsansfont[Script=Arabic,Scale=1.5]{Arial}
\gappto\captionsarabic{\renewcommand{\chaptername}{الباب}}
% probably can use titlesec's \titleformat but I don't know that package:-}
\makeatletter
\let\old@makechapterhead\@makechapterhead
\def\@makechapterhead{\def\thechapter{\words{chapter}}\old@makechapterhead}
\makeatother
\newcommand\words[1]{\expandafter\xwords\csname c@#1\endcsname}
\def\xwords#1{\ifcase#1\or
one\or
two\or
three\or
four\or
five\else
I need more words\fi}
\begin{document}
\chapter{المحاكاة}
كيف يمكننا إيجاد احتمال الفوز في لعبة
\end{document}