diff options
author | Karl Berry <karl@freefriends.org> | 2011-11-07 23:29:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-11-07 23:29:47 +0000 |
commit | b8e34142e16a40e227b48dff7ad2f8c2d4b8c958 (patch) | |
tree | a70b7e1a654a569685bf51f4f18de6997da54820 /Master/texmf-dist/source/xelatex | |
parent | 420c94dbde219df3a7055fb922a6dbe04ca875ad (diff) |
xepersian (7nov11)
git-svn-id: svn://tug.org/texlive/trunk@24537 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r-- | Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx | 259 |
1 files changed, 254 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx index 00e4e0034bb..804796f694f 100644 --- a/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx +++ b/Master/texmf-dist/source/xelatex/xepersian/xepersian.dtx @@ -5,10 +5,10 @@ %<*readme> _________________ The XePersian package -v1.3.3 +v1.3.4 XePersian is a package written for XeLaTeX that allows users to typeset -Persian easily. The current version is 1.3.3 and it will be developed to +Persian easily. The current version is 1.3.4 and it will be developed to meet the needs of Persian typesetting properly. The XePersian package is independent of any operating system, meaning it @@ -168,6 +168,8 @@ by Vafa Khalighi. \def\XeLaTeX{Xe\LaTeX} \def\XePersian{XePersian} \newcommand*{\bicsintabular}[2]{\Lcs{#2}&\Pcs{#1}\\} +\newcommand*{\biffintabular}[2]{\texttt{#1}&\Penv{#2}\\} +\newcommand*{\biffointabular}[3]{\texttt{#1}&\texttt{#2}&\Penv{#3}\\} \newcommand*{\bienvintabular}[2]{\Lenv{#2}&\Penv{#1}\\} \makeatletter \renewcommand\tableofcontents{\relax @@ -207,7 +209,7 @@ by Vafa Khalighi. % Persian for \LaTeXe{} over \XeTeX} % \author{Vafa Khalighi\\ % \url{vafaklg@gmail.com}} -% \date{\today\qquad Version 1.3.3} +% \date{\today\qquad Version 1.3.4} %\maketitle %\tableofcontents %\section{Introduction} @@ -227,7 +229,7 @@ by Vafa Khalighi. %Description: The package supports Persian %typesetting, using fonts provided in the distribution. %Copyright © 2008-2012 Vafa Khalighi -%v1.3.3, 2012/01/01 +%v1.3.4, 2012/01/01 %License: LaTeX Project Public License, version 1.3c or higher (your choice) %Location on CTAN: /macros/xetex/latex/xepersian %\end{lstlisting} @@ -482,6 +484,7 @@ by Vafa Khalighi. %\bicsintabular{اعلانقلمعلائم}{DeclareSymbolFont} %\bicsintabular{دوربسته}{deadcycles} %\bicsintabular{تر}{def} +%\bicsintabular{تعریف@کلید}{define@key} %\bicsintabular{تعریفرنگ}{definecolor} %\bicsintabular{درجه}{deg} %\bicsintabular{کدجداساز}{delcode} @@ -1046,6 +1049,7 @@ by Vafa Khalighi. %\bicsintabular{تنظیمبولی}{setboolean} %\bicsintabular{درکادر}{setbox} %\bicsintabular{مقدارشمارنده}{setcounter} +%\bicsintabular{مقدارکلیدها}{setkeys} %\bicsintabular{مقداربعد}{setlength} %\bicsintabular{تنظیممنها}{setminus} %\bicsintabular{تعریفقلمعلائم}{SetSymbolFont} @@ -1300,6 +1304,7 @@ by Vafa Khalighi. %\bicsintabular{تعریفقلمپارسی}{defpersianfont} %\bicsintabular{کادراچپ}{hboxL} %\bicsintabular{کادراست}{hboxR} +%\bicsintabular{معادل@کلید}{keyval@eq@alias@key} %\bicsintabular{مرجعلاتین}{Latincite} %\bicsintabular{قلملاتین}{latinfont} %\bicsintabular{امروزلاتین}{latintoday} @@ -1455,6 +1460,137 @@ by Vafa Khalighi. %\begin{itemize} %\item There are two \texttt{p}s in \autoref{table-pos}, first \texttt{p} and its Persian equivalent \Penv{پ} stand for paragraph (used in \texttt{tabular} and similar environments) and the second \texttt{p} and its Persian equivalent \Penv{ص} stand for page (used in \texttt{float}-like environments). %\end{itemize} +%\subsubsection{Localizations of the keys and key values of \textsf{graphicx} package} +%The equivalent Persian keys and key values of \textsf{graphicx} package is shown in \autoref{table:key} and \autoref{table:keyvalue} respectively. +%\begin{center} +%\tablecaption{Persian Equivalent keys of \textsf{graphicx} package\label{table:key}} +%\tablehead +% {\bfseries Original Key &\bfseries Equivalent Persian Key\\ \hline} +%\tabletail +% {\hline \multicolumn{2}{r}{\emph{Continued on next page}}\\} +%\tablelasttail{\hline} +%\begin{supertabular}{lr} +%\texttt{draft}&\Penv{پیشنویس}\\ +%\texttt{origin}&\Penv{مبدا}\\ +%\texttt{clip}&\Penv{بیاضافه}\\ +%\texttt{keepaspectratio}&\Penv{حفظتناسب}\\ +%\texttt{natwidth}&\Penv{پهنایطبیعی}\\ +%\texttt{natheight}&\Penv{بلندایطبیعی}\\ +%\texttt{bb}&\Penv{مختصات}\\ +%\texttt{viewport}&\Penv{محدودهنمایش}\\ +%\texttt{trim}&\Penv{حذفاطراف}\\ +%\texttt{angle}&\Penv{زاویه}\\ +%\texttt{width}&\Penv{پهنا}\\ +%\texttt{height}&\Penv{بلندا}\\ +%\texttt{totalheight}&\Penv{بلندایکل}\\ +%\texttt{scale}&\Penv{ضریب}\\ +%\texttt{type}&\Penv{نوع}\\ +%\texttt{ext}&\Penv{پسوند}\\ +%\texttt{read}&\Penv{خواندنی}\\ +%\texttt{command}&\Penv{فرمان}\\ +%\texttt{x}&\Penv{طول}\\ +%\texttt{y}&\Penv{عرض}\\ +%\texttt{units}&\Penv{واحد}\\ +%\end{supertabular} +%\end{center} +%\begin{center} +%\tablecaption{Persian Equivalent key values of \textsf{graphicx} package\label{table:keyvalue}} +%\tablehead +% {\bfseries Original Key value&\bfseries Equivalent Persian Key value\\ \hline} +%\tabletail +% {\hline \multicolumn{2}{r}{\emph{Continued on next page}}\\} +%\tablelasttail{\hline} +%\begin{supertabular}{cc} +%\texttt{b}&\Penv{ز}\\ +%\texttt{B}&\Penv{ک}\\ +%\texttt{false}&\Penv{نادرست}\\ +%\texttt{l}&\Penv{چ}\\ +%\texttt{r}&\Penv{ر}\\ +%\texttt{t}&\Penv{ب}\\ +%\texttt{true}&\Penv{درست}\\ +%\end{supertabular} +%\end{center} +%\subsubsection{Localizations of font features and font feature options} +%The equivalent Persian font features and font feature options is shown in \autoref{table:ff} and \autoref{table:ffo} respectively. +%\begin{center} +%\tablecaption{Persian Equivalent font features\label{table:ff}} +%\tablehead +% {\bfseries Original font feature &\bfseries Equivalent Persian font feature\\ \hline} +%\tabletail +% {\hline \multicolumn{2}{r}{\emph{Continued on next page}}\\} +%\tablelasttail{\hline} +%\begin{supertabular}{lr} +%\biffintabular{ExternalLocation}{مکانخارجی} +%\biffintabular{ExternalLocation}{مسیر} +%\biffintabular{Renderer}{تحویلدهنده} +%\biffintabular{BoldFont}{قلمسیاه} +%\biffintabular{Language}{زبان} +%\biffintabular{Script}{خط} +%\biffintabular{UprightFont}{قلمعمودی} +%\biffintabular{ItalicFont}{قلمایتالیک} +%\biffintabular{BoldItalicFont}{قلمایتالیکسیاه} +%\biffintabular{SlantedFont}{قلمخوابیده} +%\biffintabular{BoldSlantedFont}{قلمخوابیدهسیاه} +%\biffintabular{SmallCapsFont}{قلمکلاهکوچک} +%\biffintabular{UprightFeatures}{ویژگیهایقلمعمودی} +%\biffintabular{BoldFeatures}{ویژگیهایقلمسیاه} +%\biffintabular{ItalicFeatures}{ویژگیهایقلمایتالیک} +%\biffintabular{BoldItalicFeatures}{ویژگیهایقلمایتالیکسیاه} +%\biffintabular{SlantedFeatures}{ویژگیهایقلمخوابیده} +%\biffintabular{BoldSlantedFeatures}{ویژگیهایقلمخوابیدهسیاه} +%\biffintabular{SmallCapsFeatures}{ویژگیهایقلمکلاهکوچک} +%\biffintabular{SizeFeatures}{ویژگیهایاندازه} +%\biffintabular{Scale}{ضریب} +%\biffintabular{WordSpace}{فضایکلمه} +%\biffintabular{PunctuationSpace}{فضاینقطهگذاری} +%\biffintabular{FontAdjustment}{تنظیمقلم} +%\biffintabular{LetterSpace}{فضایحرف} +%\biffintabular{HyphenChar}{نویسهتیره} +%\biffintabular{Color}{رنگ} +%\biffintabular{Opacity}{کدری} +%\biffintabular{Mapping}{نگاشت} +%\biffintabular{Weight}{سنگینی} +%\biffintabular{Width}{پهنا} +%\biffintabular{OpticalSize}{اندازهچشمی} +%\biffintabular{FakeSlant}{خوابیدهتقلبی} +%\biffintabular{FakeStretch}{کششتقلبی} +%\biffintabular{FakeBold}{سیاهتقلبی} +%\biffintabular{AutoFakeSlant}{خوابیدهتقلبیخودکار} +%\biffintabular{AutoFakeBold}{سیاهتقلبیخودکار} +%\biffintabular{Ligatures}{دویاچندحرفمتصلبههم} +%\biffintabular{Alternate}{متناوب} +%\biffintabular{Variant}{گوناگون} +%\biffintabular{Variant}{مجموعهسبکی} +%\biffintabular{CharacterVariant}{گوناگونینویسه} +%\biffintabular{ScriptStyle}{سبکاسکریپت} +%\biffintabular{ScriptScriptStyle}{سبکاسکریپتاسکریپت} +%\biffintabular{Style}{سبک} +%\biffintabular{Annotation}{یادداشت} +%\biffintabular{RawFeature}{ویژگیهایکال} +%\biffintabular{CharacterWidth}{پهناینویسه} +%\biffintabular{Numbers}{ارقام} +%\biffintabular{Contextuals}{متنی} +%\biffintabular{Diacritics}{تفکیککنندهها} +%\biffintabular{Letters}{حروف} +%\biffintabular{Kerning}{دوری} +%\biffintabular{VerticalPosition}{موقعیتعمودی} +%\biffintabular{Fractions}{کسر} +%\end{supertabular} +%\end{center} +%\begin{center} +%\tablecaption{Persian Equivalent font feature options\label{table:ffo}} +%\tablehead +% {\bfseries font feature&\bfseries font feature option &\bfseries Persian font feature option\\ \hline} +%\tabletail +% {\hline \multicolumn{3}{r}{\emph{Continued on next page}}\\} +%\tablelasttail{\hline} +%\begin{supertabular}{llr} +%\biffointabular{Language}{Default}{پیشفرض} +%\biffointabular{Language}{Parsi}{پارسی} +%\biffointabular{Script}{Parsi}{پارسی} +%\biffointabular{Script}{Latin}{لاتین} +%\end{supertabular} +%\end{center} %\subsection{A Sample Input \TeX\ File} %\begin{lstlisting}[morekeywords={settextfont,maketitle,tableofcontents,subsection,subsubsection,part}] %\documentclass{article} @@ -2644,6 +2780,7 @@ by Vafa Khalighi. \eqcommand{اعلانقلمعلائم}{DeclareSymbolFont} \eqcommand{دوربسته}{deadcycles} \eqcommand{تر}{def} +\eqcommand{تعریف@کلید}{define@key} \eqcommand{تعریفرنگ}{definecolor} \eqcommand{درجه}{deg} \eqcommand{کدجداساز}{delcode} @@ -3190,6 +3327,7 @@ by Vafa Khalighi. \eqcommand{کادراندازه}{scalebox} \eqcommand{پیشفرضتمامبزرگ}{scdefault} \eqcommand{شکلتمامبزرگ}{scshape} +\eqcommand{مقدارکلیدها}{setkeys} \eqcommand{قلمتوان}{scriptfont} \eqcommand{قلمتوانتوان}{scriptscriptfont} \eqcommand{سبکتهنوشتتهنوشت}{scriptscriptstyle} @@ -3466,6 +3604,7 @@ by Vafa Khalighi. \eqcommand{خطزیرنویسخودکار}{autofootnoterule} \eqcommand{اعدادفرمولهاخودکار}{AutoMathsDigits} \eqcommand{اعدادفرمولهالاتین}{DefaultMathsDigits} +\eqcommand{معادل@کلید}{keyval@eq@alias@key} \eqcommand{تعریفقلملاتین}{deflatinfont} \eqcommand{تعریفقلمپارسی}{defpersianfont} \eqcommand{کادراچپ}{hboxL} @@ -3946,6 +4085,15 @@ by Vafa Khalighi. \makezwnjletter \newcommand*{\eqcommand}[2]{\if@bidi@csprimitive{#2}{\bidi@csletcs{#1}{#2}}{\bidi@csdefcs{#1}{#2}}} \newcommand*{\eqenvironment}[2]{\newenvironment{#1}{\csname#2\endcsname}{\csname end#2\endcsname}} +\@ifpackageloaded{keyval}{% +\newcommand*\keyval@eq@alias@key[4][KV]{% + \bidi@csletcs{#1@#2@#3}{#1@#2@#4}% + \bidi@csletcs{#1@#2@#3@default}{#1@#2@#4@default}}% +}{\@ifpackageloaded{xkeyval}{% +\newcommand*\keyval@eq@alias@key[4][KV]{% + \bidi@csletcs{#1@#2@#3}{#1@#2@#4}% + \bidi@csletcs{#1@#2@#3@default}{#1@#2@#4@default}}% +}{}} \input{commands-ltx.def} \input{commands-xepersian.def} \input{environments-ltx.def} @@ -3953,6 +4101,65 @@ by Vafa Khalighi. \input{messages-localise.def} \input{misc-localise-xepersian.def} \input{packages-localise-xepersian.def} +\aliasfontfeature{ExternalLocation}{مکانخارجی} +\aliasfontfeature{ExternalLocation}{مسیر} +\aliasfontfeature{Renderer}{تحویلدهنده} +\aliasfontfeature{BoldFont}{قلمسیاه} +\aliasfontfeature{Language}{زبان} +\aliasfontfeature{Script}{خط} +\aliasfontfeature{UprightFont}{قلمعمودی} +\aliasfontfeature{ItalicFont}{قلمایتالیک} +\aliasfontfeature{BoldItalicFont}{قلمایتالیکسیاه} +\aliasfontfeature{SlantedFont}{قلمخوابیده} +\aliasfontfeature{BoldSlantedFont}{قلمخوابیدهسیاه} +\aliasfontfeature{SmallCapsFont}{قلمکلاهکوچک} +\aliasfontfeature{UprightFeatures}{ویژگیهایقلمعمودی} +\aliasfontfeature{BoldFeatures}{ویژگیهایقلمسیاه} +\aliasfontfeature{ItalicFeatures}{ویژگیهایقلمایتالیک} +\aliasfontfeature{BoldItalicFeatures}{ویژگیهایقلمایتالیکسیاه} +\aliasfontfeature{SlantedFeatures}{ویژگیهایقلمخوابیده} +\aliasfontfeature{BoldSlantedFeatures}{ویژگیهایقلمخوابیدهسیاه} +\aliasfontfeature{SmallCapsFeatures}{ویژگیهایقلمکلاهکوچک} +\aliasfontfeature{SizeFeatures}{ویژگیهایاندازه} +\aliasfontfeature{Scale}{ضریب} +\aliasfontfeature{WordSpace}{فضایکلمه} +\aliasfontfeature{PunctuationSpace}{فضاینقطهگذاری} +\aliasfontfeature{FontAdjustment}{تنظیمقلم} +\aliasfontfeature{LetterSpace}{فضایحرف} +\aliasfontfeature{HyphenChar}{نویسهتیره} +\aliasfontfeature{Color}{رنگ} +\aliasfontfeature{Opacity}{کدری} +\aliasfontfeature{Mapping}{نگاشت} +\aliasfontfeature{Weight}{سنگینی} +\aliasfontfeature{Width}{پهنا} +\aliasfontfeature{OpticalSize}{اندازهچشمی} +\aliasfontfeature{FakeSlant}{خوابیدهتقلبی} +\aliasfontfeature{FakeStretch}{کششتقلبی} +\aliasfontfeature{FakeBold}{سیاهتقلبی} +\aliasfontfeature{AutoFakeSlant}{خوابیدهتقلبیخودکار} +\aliasfontfeature{AutoFakeBold}{سیاهتقلبیخودکار} +\aliasfontfeature{Ligatures}{دویاچندحرفمتصلبههم} +\aliasfontfeature{Alternate}{متناوب} +\aliasfontfeature{Variant}{گوناگون} +\aliasfontfeature{Variant}{مجموعهسبکی} +\aliasfontfeature{CharacterVariant}{گوناگونینویسه} +\aliasfontfeature{ScriptStyle}{سبکاسکریپت} +\aliasfontfeature{ScriptScriptStyle}{سبکاسکریپتاسکریپت} +\aliasfontfeature{Style}{سبک} +\aliasfontfeature{Annotation}{یادداشت} +\aliasfontfeature{RawFeature}{ویژگیهایکال} +\aliasfontfeature{CharacterWidth}{پهناینویسه} +\aliasfontfeature{Numbers}{ارقام} +\aliasfontfeature{Contextuals}{متنی} +\aliasfontfeature{Diacritics}{تفکیککنندهها} +\aliasfontfeature{Letters}{حروف} +\aliasfontfeature{Kerning}{دوری} +\aliasfontfeature{VerticalPosition}{موقعیتعمودی} +\aliasfontfeature{Fractions}{کسر} +\aliasfontfeatureoption{Language}{Default}{پیشفرض} +\aliasfontfeatureoption{Language}{Parsi}{پارسی} +\aliasfontfeatureoption{Script}{Parsi}{پارسی} +\aliasfontfeatureoption{Script}{Latin}{لاتین} % \end{macrocode} % \iffalse %</localise-xepersian.def> @@ -4801,6 +5008,48 @@ by Vafa Khalighi. } } \ExplSyntaxOff +\@ifpackageloaded{graphicx}{% +\def\Gin@boolkey#1#2{% +\expandafter\@ifdefinable \csname Gin@#2درست\endcsname{% +\expandafter\let\csname Gin@#2درست\expandafter\endcsname\csname Gin@#2true\endcsname}% +\expandafter\@ifdefinable \csname Gin@#2نادرست\endcsname{% +\expandafter\let\csname Gin@#2نادرست\expandafter\endcsname\csname Gin@#2false\endcsname}% + \csname Gin@#2\ifx\relax#1\relax true\else#1\fi\endcsname} +\define@key{Grot}{origin}[c]{% + \@tfor\@tempa:=#1\do{% + \if l\@tempa \Grot@x\z@\else + \if چ\@tempa \Grot@x\z@\else + \if r\@tempa \Grot@x\width\else + \if ر\@tempa \Grot@x\width\else + \if t\@tempa \Grot@y\height\else + \if ب\@tempa \Grot@y\height\else + \if b\@tempa \Grot@y-\depth\else + \if ز\@tempa \Grot@y-\depth\else + \if B\@tempa \Grot@y\z@\else + \if ک\@tempa \Grot@y\z@\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}} +\معادل@کلید{Gin}{پیشنویس}{draft} +\معادل@کلید{Gin}{مبدا}{origin} +\معادل@کلید{Grot}{مبدا}{origin} +\معادل@کلید{Gin}{بیاضافه}{clip} +\معادل@کلید{Gin}{حفظتناسب}{keepaspectratio} +\معادل@کلید{Gin}{پهنایطبیعی}{natwidth} +\معادل@کلید{Gin}{بلندایطبیعی}{natheight} +\معادل@کلید{Gin}{مختصات}{bb} +\معادل@کلید{Gin}{محدودهنمایش}{viewport} +\معادل@کلید{Gin}{حذفاطراف}{trim} +\معادل@کلید{Gin}{زاویه}{angle} +\معادل@کلید{Gin}{پهنا}{width} +\معادل@کلید{Gin}{بلندا}{height} +\معادل@کلید{Gin}{بلندایکل}{totalheight} +\معادل@کلید{Gin}{ضریب}{scale} +\معادل@کلید{Gin}{نوع}{type} +\معادل@کلید{Gin}{پسوند}{ext} +\معادل@کلید{Gin}{خواندنی}{read} +\معادل@کلید{Gin}{فرمان}{command} +\معادل@کلید{Grot}{طول}{x} +\معادل@کلید{Grot}{عرض}{y} +\معادل@کلید{Grot}{واحد}{units} +}{} % \end{macrocode} % \iffalse %</packages-localise-xepersian.def> @@ -5051,7 +5300,7 @@ U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET % \subsection{\textsf{xepersian.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\xepersianversion{v1.3.3} +\def\xepersianversion{v1.3.4} \def\xepersiandate{2012/01/01} \ProvidesPackage{xepersian}[\xepersiandate\space \xepersianversion\space Persian typesetting in XeLaTeX] |