我想将图形列表名称从“قائمة الأشكال”更改为“قائمة الصور”
当我尝试将图形(pdf,eps)包含到阿拉伯语文本中时,生成的 pdf 中的图形总是隐藏在页面的右侧!!
如何在不使用多语言的情况下将章节数字从印地语改为阿拉伯语?
如何将目录中的所有页码右对齐。
\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
以下是您的示例,经过了一些更改(带有一些注释)。关于\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}