我想在英文文献的开头,在英文摘要之前添加阿拉伯文摘要。
我还希望摘要的标题以阿拉伯语(ملخص)出现在目录中。这里有一个例子:
\documentclass[a4paper,12pt,oneside]{book} % ociamthesis
\bibliographystyle{unsrt}
\usepackage[a4paper,inner=30mm,outer=20mm,top=30mm,bottom=30mm]{geometry}
\begin{document}
\clearpage \pagenumbering{roman}
\setcounter{page}{5}
\selectlanguage{arabic}
\chapter*{ملخص}
\addcontentsline{toc}{chapter}{\foreignlanguage{arabic}{\arabicabstractname}}
اء المعلومات هي تقنية متقدمة لإخفاء الييااات حيث تم اليحث فيها على اطاق واسع في السنوات الأخيرة اظر
\selectlanguage{english}
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
Data masking is an advanced data hiding technique where it has been extensively researched in recent years
\tableofcontents
\addcontentsline{toc}{chapter}{Table of contents}
\end{document}
附言:我希望代码不会改变我原来的字体,即 Charter BT。另外,如果可能的话,我希望使用 pdftex 而不是 xetec 来构建文件
答案1
如果您提供了一个最小工作示例,我会更好地了解您在寻找什么,但您可以尝试调整这一点:
\documentclass{article}
\usepackage[bidi=default]{babel}
\usepackage{fontspec}
% Solely to make the output narrow enough for TeX.SX:
\usepackage[paperwidth=10cm]{geometry}
\babelprovide[import=ar]{arabic}
\babelprovide[main, import=en, language=Default]{english}
\babelfont{rm}
[Scale=1.0, Ligatures={Common, TeX}, Numbers=OldStyle]{Libertinus Serif}
\babelfont[arabic]{rm}
[Scale=MatchLowercase]{Amiri}
% You might also want to define \babelfont{sf} and \babelfont{tt}.
\renewcommand{\arabicabstractname}{ملخص}
\begin{document}
\addcontentsline{toc}{section}{\foreignlanguage{arabic}{\arabicabstractname}}
\selectlanguage{arabic}
\begin{abstract}
الخط الأميري خط نسخي موجه لطباعة الكتب و النصوص الطويلة.
\selectlanguage{english}
Amiri is a classical Arabic typeface in Naskh style for typesetting
books and other running text.
\end{abstract}
\selectlanguage{english}
% From here on out, use \begin{otherlanguage}{arabic} for paragraphs, or
% \foreignlanguage{arabic} for short phrases.
\tableofcontents
\section{Example}
\end{document}