アラビア語での目次番号とキャプション番号の左揃え

アラビア語での目次番号とキャプション番号の左揃え

TOC 番号を左揃えにし、キャプションの番号を画像のようにヒンディー語ではなくアラビア語に変更するための支援が必要です。

ありがとう。

\documentclass[a4paper, oneside, 11pt]{book}
\usepackage[top=23mm,bottom=22mm,left=2cm,right=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[LAE,LFE,T1]{fontenc}
\usepackage[english,main= arabic]{babel}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[flushleft]{threeparttable}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{float} 
\pagestyle{fancy}                    
\fancyfoot{}                     
\fancyhead[L]{}   
\fancyfoot[L]{}
\cfoot{\thepage}
\pagestyle{fancy} 
\addto\captionsarabic{%
\renewcommand\chaptername{الفصل}
}
\addto\captionsarabic{\renewcommand{\figurename}{الصورة}}
\addto{\captionsarabic}{\renewcommand*{\contentsname}{قائمة المحتويات}}
\addto\captionsarabic{%
  \renewcommand{\listfigurename}{قائمة الصور}%
  }
\makeatletter
\renewcommand\thepart
  {{\fontencoding{T1}\selectfont\@Roman\c@part}}
\renewcommand\thechapter
  {{\fontencoding{T1}\selectfont\@arabic\c@chapter}}
\renewcommand\thesection
  {{\fontencoding{T1}\selectfont\thechapter.\@arabic\c@section}}
\renewcommand\thesubsection
  {{\fontencoding{T1}\selectfont\thesection.\@arabic\c@subsection}}
\renewcommand\thesubsubsection
  {{\fontencoding{T1}\selectfont\thesubsection.\@arabic\c@subsubsection}}
\renewcommand\theparagraph
  {{\fontencoding{T1}\selectfont\thesubsubsection.\@arabic\c@paragraph}}
\renewcommand\thesubparagraph
  {{\fontencoding{T1}\selectfont\theparagraph.\@arabic\c@subparagraph}}
\makeatother
\newcommand{\arabincludegraphics}[2][]{%
  \foreignlanguage{english}{\includegraphics[#1]{#2}}%
}
\captionsetup[figure]{labelfont=bf,textfont={}}
    
\begin{document}

\tableofcontents
\listoffigures


\chapter{الأول}
\begin{figure}
\centering

\arabincludegraphics[width=1\textwidth]{example-image.jpg}

\caption{شرح}\label{image}

\end{figure}
\section{الأول}

\subsection{الأول}

\subsection{الثاني}

\section{الثاني}

\subsection{الأول}

\subsection{الثاني}

\subsection{الثالث}

\section{الثالث}

\end{document}

ここに画像の説明を入力してください ここに画像の説明を入力してください ここに画像の説明を入力してください

答え1

lualatex代わりにを使用するとpdflatex、このような問題が発生しなくなります。

\documentclass[a4paper, oneside, 11pt]{book}
\usepackage[top=23mm,bottom=22mm,left=2cm,right=3cm]{geometry}
\usepackage[bidi=basic,english]{babel}
\babelprovide[import,main]{arabic}
\babelfont{rm}{Amiri}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[flushleft]{threeparttable}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{float} 
    
\fancyfoot{}                     
\fancyhead[L]{}   

\cfoot{\thepage}
\pagestyle{fancy} 
\addto\captionsarabic{%
\renewcommand\chaptername{الفصل}}
\addto\captionsarabic{\renewcommand{\figurename}{الصورة}}
\addto{\captionsarabic}{\renewcommand*{\contentsname}{قائمة المحتويات}}
\addto\captionsarabic{%
  \renewcommand{\listfigurename}{قائمة الصور}%
  }
\captionsetup[figure]{labelfont=bf,textfont={}}
    
\begin{document}

\tableofcontents
\listoffigures

\chapter{الأول}
\begin{figure}
\centering

\includegraphics[width=1\textwidth]{example-image.jpg}

\caption{شرح}\label{image}

\end{figure}
\section{الأول}

\subsection{الأول}

\subsection{الثاني}

\section{الثاني}

\subsection{الأول}

\subsection{الثاني}

\subsection{الثالث}

\section{الثالث}

\end{document}

関連情報