我有这个:
\documentclass[12pt]{arabbook}
%%%%%%%%%%% packages
\usepackage{fancyhdr}
\usepackage{arabtex}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}% R ensemble des nombres reels
\usepackage{graphicx}% ajouter des photos
\usepackage{pstricks}% pour dessiner
%%%%%%%%%%%% ab3ad AlsfhA
\textwidth= 15truecm %
\textheight= 22.27truecm %
\hoffset= -1.5 cm%truecm %
\voffset= -1.5 cm%truecm %
%%%%%%%%%%
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1.5pt}
\renewcommand{\footrulewidth}{1.5pt}
\renewcommand{\baselinestretch}{1.5}
% `dm Alt^skyl
\novocalize
% bdAyt Alw_tyqT
\rhead{\RL{Alf.sl Al'awl}}
\lhead{\RL{`nwAn Alf.sl}}
\begin{document}
\begin{arabtext}
\end{arabtext}
\end{document}
我想定义定理环境,得到“nzryT 1:...”
请问该怎么做?
谢谢
答案1
这是使用 xelatex 和包 arabxetex 的解决方案。
\documentclass{book}
%---------------------------------------------
\usepackage{fontspec}
\setmainfont{Times New Roman}
\setsansfont{Arial}
\setmonofont{Courier New}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Amiri}
%---------------------------------------------
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{amssymb}
%---------------------------------------------
\usepackage{polyglossia}
\makeatletter
\AtBeginDocument{\bidi@isloaded{arabxetex}}
\makeatother
\setdefaultlanguage{arabic}
\setotherlanguage{english}
%---------------------------------------------
\usepackage[novoc]{arabxetex}
%---------------------------------------------
\pagestyle{fancy}
\renewcommand{\headrulewidth}{1.5pt}
\renewcommand{\footrulewidth}{1.5pt}
\renewcommand{\baselinestretch}{1.5}
% bdAyt Alw_tyqT
\rhead{\textarab{Alf.sl Al'awl}}
\lhead{\textarab{`nwAn Alf.sl}}
%---------------------------------------------
\newtheorem{theorem}{n.zryT}
\renewcommand{\thetheorem}{\textLR{\arabic{theorem}}}
%---------------------------------------------
\begin{document}
\chapter{\textarab{alqsmT}}
\begin{arab}
\begin{theorem}
kl `dad yqbl alqsmT `l 1.
\end{theorem}
\begin{theorem}
kl `dad yqbl alqsmT `l nfsh.
\end{theorem}
\end{arab}
\end{document}