我想將人物列表名稱從“قצм ר״كת”更改為“قևצ ר֧”
當我嘗試將圖形(pdf、eps)包含到阿拉伯語文本中時,生成的 pdf 中的圖形始終隱藏在頁面的右側!
如何在不使用 Polyglossia 的情況下將章節數字從印地語更改為阿拉伯語?
如何將目錄中的所有頁碼向右對齊。
\documentclass[a4paper, oneside, 12pt]{book}
\usepackage[top=23mm,bottom=22mm,left=2cm,right=3cm]{geometry}
\usepackage{arabtex}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE]{fontenc}
\usepackage[arabic]{babel}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{\thepage}
\pagestyle{fancy}
\addto\captionsarabic{%
\renewcommand\chaptername{الفصل}
}
\addto{\captionsarabic}{\renewcommand*{\contentsname}{قائمة المحتويات}}
\begin{document}
\renewcommand{\baselinestretch}{1.5}
\thispagestyle{plain}
\pagenumbering{roman}
\tableofcontents
\listoffigures
\begin{otherlanguage}{arabic}
\chapter{الأول}
\section{الأول}
\subsection{الأول}
\subsection{الثاني}
\section{الثاني}
\subsection{الأول}
\subsection{الثاني}
\subsection{الثالث}
\section{الثالث}
\end{otherlanguage}
\end{document}
答案1
您的範例進行了一些更改(帶有一些註釋)。 WRT 至\includegraphics
,參見使用 Babel 的圖。混合方向pdftex
需要大量艱苦的工作,因此請考慮切換到xetex
或luatex
(請參閱阿拉伯語 - 巴別塔)。
\documentclass[a4paper, oneside, 12pt]{book}
\usepackage[top=23mm,bottom=22mm,left=2cm,right=3cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1,LFE,LAE]{fontenc}
\usepackage[arabic]{babel}
\usepackage{gensymb}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\cfoot{\thepage}
\pagestyle{fancy}
% Although there are a few alternatives, this is the
% canonical way to redefine captions:
\setlocalecaption{arabic}{chapter}{الفصل}
\setlocalecaption{arabic}{contents}{قائمة المحتويات}
\setlocalecaption{arabic}{listfigure}{قائمة الصور}
% The font encoding must be switched to get Latin characters:
\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}}
\renewcommand\thefigure
{{\fontencoding{T1}\selectfont\ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@figure}}
\makeatother
\begin{document}
\renewcommand{\baselinestretch}{1.5}
\thispagestyle{plain}
\pagenumbering{roman}
\tableofcontents
\listoffigures
\selectlanguage{arabic}
\chapter{الأول}
\begin{figure}
\caption{شكل}
\foreignlanguage{english}{\includegraphics[width=6cm]{example-image-a.png}}
\end{figure}
\section{الأول}
\subsection{الأول}
\subsection{الثاني}
\end{document}