
我無法在此來源中看到部分*:
\documentclass[oneside]{book}
\usepackage[margin=1cm,top=1.5cm,right=1.5cm,bottom=2cm]{geometry}
\usepackage[explicit]{titlesec}
\usepackage{polyglossia}
%select languages & fonts ==================================
\setdefaultlanguage[calendar=gregorian,locale=algeria]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\titleformat{\section}
{\Large\bfseries\color{green}}
{\thesection #1}{-1em}{}
\begin{document}
\section{مجموعة الأعداد الطبيعية}
\section*{مجموعة الأعداد}
مجموعة
\end{document}
答案1
不要使用explicit
並#1
從中刪除\titleformat
:
\documentclass[oneside]{book}
\usepackage[margin=1cm,top=1.5cm,right=1.5cm,bottom=2cm]{geometry}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{polyglossia}
%select languages & fonts ==================================
\setdefaultlanguage[calendar=gregorian,locale=algeria]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.3]{Amiri}
\titleformat{\section}
{\Large\bfseries\color{green}}
{\thesection}
{1em}
{}
\begin{document}
\section{مجموعة الأعداد الطبيعية}
\section*{مجموعة الأعداد}
مجموعة
\end{document}
抱歉,我不知道如何以正確的順序取得節號。