0

I cannot see section* in this source:

\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
  • Remove the explicit option from \usepackage{titlesec} and #1 from \titleformat. Also -1em should be 1em
    – egreg
    Feb 8, 2016 at 13:44

1 Answer 1

1

Don't use explicit and remove #1 from \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}

I don't know how to get the section number in the correct order, sorry.

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .