diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-18 22:42:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-18 22:42:47 +0000 |
commit | 11934869cc8f4c169418a680ba83ae93991d1c1b (patch) | |
tree | c8fb303d1d72abee0e3c17c62cb7d33a487f51bf /Master/texmf-dist/source/latex | |
parent | c3ed4e03e9ea716aafea65c70f9db17984fcf3a9 (diff) |
bidi (18sep11)
git-svn-id: svn://tug.org/texlive/trunk@24007 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/bidi/bidi.dtx | 371 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/bidi/bidi.ins | 13 |
2 files changed, 334 insertions, 50 deletions
diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx index a7fd24b4042..4dc6f3ce302 100644 --- a/Master/texmf-dist/source/latex/bidi/bidi.dtx +++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx @@ -5,15 +5,15 @@ %<*readme> ___________________ The bidi package -v1.2.9 +v1.3.0 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. -This version fixes all the bugs that were present in v1.2.8. +This version fixes all the bugs that were present in v1.2.9. ___________________ -Vafa Khalighi +VAFA KHALIGHI vafaklg@gmail.com Copyright © 2007–2011 @@ -22,7 +22,7 @@ version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. %</readme> %<*internal> \fi @@ -34,7 +34,7 @@ by Vafa Khalighi. \preamble ______________________________________ - Copyright © 2009–2011 Vafa Khalighi + Copyright © 2009–2011 VAFA KHALIGHI License information appended. @@ -42,14 +42,14 @@ by Vafa Khalighi. \endpreamble \postamble -Copyright © 2009–2011 Vafa Khalighi <vafaklg@gmail.com> +Copyright © 2009–2011 VAFA KHALIGHI <vafaklg@gmail.com> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. @@ -111,6 +111,7 @@ by Vafa Khalighi. \generate{\file{hyperref-xetex-bidi.def}{\from{\jobname.dtx}{hyperref-xetex-bidi.def}}} \generate{\file{leqno-xetex-bidi.def}{\from{\jobname.dtx}{leqno-xetex-bidi.def}}} \generate{\file{letter-xetex-bidi.def}{\from{\jobname.dtx}{letter-xetex-bidi.def}}} +\generate{\file{lettrine-xetex-bidi.def}{\from{\jobname.dtx}{lettrine-xetex-bidi.def}}} \generate{\file{listings-xetex-bidi.def}{\from{\jobname.dtx}{listings-xetex-bidi.def}}} \generate{\file{loadingorder-bidi.def}{\from{\jobname.dtx}{loadingorder-bidi.def}}} \generate{\file{longtable-xetex-bidi.def}{\from{\jobname.dtx}{longtable-xetex-bidi.def}}} @@ -187,7 +188,7 @@ by Vafa Khalighi. \usepackage{bbding} \usepackage{bidicode} \usepackage[numbered]{hypdoc} -\hypersetup{pdftitle={The \textsf{bidi} Package (Support for bidirectional typesetting in plain \TeX{} and \LaTeXe)},pdfauthor={Vafa Khalighi <vafaklg@gmail.com>}} +\hypersetup{pdftitle={The \textsf{bidi} Package (Support for bidirectional typesetting in plain \TeX{} and \LaTeXe)},pdfauthor={VAFA KHALIGHI <vafaklg@gmail.com>}} \setlength\columnseprule{.4pt} \newcommand\XeTeX{Xe\TeX} \newcommand\XeLaTeX{Xe\LaTeX} @@ -208,6 +209,7 @@ by Vafa Khalighi. \renewcommand\labelitemii{\HandRightUp} \renewcommand\labelitemiii{\HandCuffRight} \renewcommand\labelitemiv{\HandPencilLeft} +\renewcommand\partname{Part} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -227,27 +229,28 @@ by Vafa Khalighi. % \makeatletter % \title{The \textsf{bidi} Package\\[5pt] % Support for bidirectional typesetting in plain \TeX{} and \LaTeXe} -% \author{Vafa Khalighi\\ +% \author{VAFA KHALIGHI\\ % \url{vafaklg@gmail.com}} -% \date{\today\qquad Version 1.2.9} +% \date{\today\qquad Version 1.3.0} % \maketitle % \tableofcontents -%\section{Introduction} +%\section*{Introduction} %\textsf{bidi} provides a convenient interface for typesetting bidirectional texts in plain \TeX\ and \LaTeX. % %The \textsf{bidi} package at the moment only works with \XeTeX\ engine, but we will support other \TeX\ engines as well in the future. -%\subsection{\textsf{bidi} Info On The Terminal and In The Log File} +%\subsection*{\textsf{bidi} Info On The Terminal and In The Log File} %If you use \textsf{bidi} package to write any input \TeX\ document, and then run \texttt{xelatex} on your document, \textsf{bidi} writes some information about itself to the terminal and to the log file. The information is something like: %\begin{lstlisting}[backgroundcolor=\color{blue!20},numbers=none,frame=none,framexleftmargin=1mm] %bidi package (Support for bidirectional typesetting in plain TeX and LaTeX) %Description: A convenient interface for typesetting bidirectional texts %in plain TeX and LaTeX. The package includes adaptations for use %with many other commonly-used packages. -%Copyright (c) 2009-2011 Vafa Khalighi -%v1.2.9, 2011/09/16 +%Copyright (c) 2009-2011 VAFA KHALIGHI +%v1.3.0, 2011/10/01 %License: LaTeX Project Public License, version 1.3c or higher (your choice) %Location on CTAN: /macros/latex/contrib/bidi %\end{lstlisting} +%\part{\LaTeX\ Manual} %\section{Basics} %\subsection{Loading The Package} %You can load the package in the ordinary way; @@ -648,7 +651,7 @@ by Vafa Khalighi. %\subsection{Equation Numbers} %For \texttt{reqno}, equation numbers are on the right hand side and for \texttt{leqno}, equation numbers are on the left hand side, independent on the current mode. %\section{Support For Various Packages and Classes} -%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{dblfnote} \textsf{draftwatermark}, \textsf{empheq}, \textsf{fancyhdr}, \textsf{float}, \textsf{flowfram}, \textsf{framed}, \textsf{graphicx}, \textsf{hvfloat}, \textsf{hyperref}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{multienum}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{ragged2e}, \textsf{sidecap}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{flashcards}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents. +%The \textsf{bidi} package supports \textsf{amsmath}, \textsf{amsthm}, \textsf{array}, \textsf{arydshln}, \textsf{breqn}, \textsf{caption}, \textsf{color}, \textsf{colortbl}, \textsf{dblfnote} \textsf{draftwatermark}, \textsf{empheq}, \textsf{fancyhdr}, \textsf{float}, \textsf{flowfram}, \textsf{framed}, \textsf{graphicx}, \textsf{hvfloat}, \textsf{hyperref}, \textsf{lettrine}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{multienum}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{ragged2e}, \textsf{sidecap}, \textsf{stabular}, \textsf{subfig}, \textsf{subfigure}, \textsf{supertabular}, \textsf{xtab}, \textsf{tabls}, \textsf{tabulary}, \textsf{PGF \&\ TIKZ}, \textsf{tocbibind}, \textsf{tocloft}, \textsf{tocstyle}, \textsf{wrapfig}, \textsf{xcolor}, \textsf{xltxtra} packages, \textsf{amsart}, \textsf{amsbook}, \textsf{artikel1}, \textsf{artikel2}, \textsf{artikel3}, \textsf{extarticle}, \textsf{flashcards}, \textsf{standrad article}, \textsf{boek}, \textsf{boek3}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{extletter}, \textsf{scrlettr},\textsf{standard letter}, \textsf{memoir}, \textsf{extreport}, \textsf{rapport1}, \textsf{rapport3}, \textsf{refrep}, \textsf{standard report}, \textsf{scartcl}, \textsf{scrbook}, \textsf{scrreprt} classes and any other packages and classes that relies on these packages and classes. This means, you can use all these packages and classes in addition to other packages and classes that rely on these packages and classes and use their functionality fully for your bidirectional documents. % %We now give some details that you should know about the supported packages or classes. %\subsection{Color} @@ -678,6 +681,9 @@ by Vafa Khalighi. %In the previous versions of \textsf{bidi} package, it was recommended that you need to use \textsf{fmultico} package instead the original \textsf{multicol} package for RTL multicolumn typesetting. This is not the case any more and you should not use buggy \textsf{fmultico} package any more. Simply load the original \textsf{multicol} package before loading \textsf{bidi}. \textsf{bidi} now supports \textsf{multicol} package and you can typeset bidirectional multi columns. % %In addition, you also can use \textsf{vwcol} package for variable width bidirectional column typesetting. +%\subsubsection{The \textsf{paracol} package} +%As of 17th September of 2011, there is \textsf{paracol} package by Hiroshi Nakashima, which is a multi-column package to typeset columns in ``parallel". The package provides yet another multi-column typesetting mechanism by which you produce multi-column e.g, bilingual document switching and sychronizing each +%corresponding part in "parallel". The \textsf{paracol} package works perfectly with the \textsf{bidi} package for producing bidirectional documents (both RTL and LTR). %\section{Extra \textsf{bidi} Packages and Classes} %\subsection{Typesetting \TeX{} and \LaTeX{} Codes} %The \LaTeX{} codes in this manual are typeset using the \textsf{bidicode} package. @@ -795,8 +801,17 @@ by Vafa Khalighi. % % % -%\section{Some Useful Internal Macros} -%There are some useful internal macros that might be helpful for you. This section, explains all these useful internals. +%\section{Some Useful Internal Macros and Programming Tips} +%There are some useful internal macros and programming tips that might be helpful for you. This section, explains all these useful internals and programming tips. +%\subsection{Equating Conditionals} +%\begin{BDef} +%\Lcs{eqnewif}\Largb{\Larga{\Lcs{newconditional1}}}\Largb{\Larga{\Lcs{newconditional2}}} +%\end{BDef} +%In standard \LaTeX, \Lcs{newif} command is provided that you can define a new conditional with it. \Lcs{eqnewif} command is similar to \Lcs{newif} command but: +%\begin{itemize} +%\item With \Lcs{eqnewif} command, you can define two new conditionals instead one, so clearly it has two mandatory arguments. +%\item \Lcs{newconditional1} will be identical to \Lcs{newconditional2}, so that whenever \Lcs{newconditional1} is true, then \Lcs{newconditional2} is also true and whenever \Lcs{newconditional1} is false, then \Lcs{newconditional2} is also false and vice versa. +%\end{itemize} %\subsection{RTL Conditional} %\begin{BDef} %\Lcs{if@RTL} @@ -854,7 +869,168 @@ by Vafa Khalighi. %\item \Lcs{save@dir}, if the direction of typesetting is RTL, defines \Lcs{saved@@dir} to be RTL and if the direction of typesetting is LTR, defines \Lcs{saved@@dir} to be LTR. %\item \Lcs{reset@dir}, if \Lcs{saved@@dir} is defined as RTL, inserts \Lcs{setRTL} otherwise, if \Lcs{saved@@dir} is defined as LTR, inserts \Lcs{setLTR}, otherwise does nothing. %\end{itemize} +%\part{Plain \TeX\ Manual} +%\section{Basics} +%\subsection{Loading The Package} +%You can load the package in the ordinary way; +%\begin{BDef} +%\Lcs{input} \Larg{bidi} +%\end{BDef} +% +%When loading the package, it is important to know that: +%\textsf{bidi} should be the last package that you load, because otherwise you are certainly going to overwrite \textsf{bidi}'s definitions and consequently, you will not get the expected output. +%\subsection{Commands for Version number, and Date of The Package} +%\begin{BDef} +%\Lcs{bidiversion}\quad\Lcs{bididate} +%\end{BDef} +%\begin{itemize} +%\item \Lcs{bidiversion} gives the current version of the package. +%\item \Lcs{bididate} gives the current date of the package. +%\end{itemize} +%\begin{lstlisting} +%\input bidi +%This is typeset by \textsf{bidi} package, \bidiversion, \bididate. +%\end +%\end{lstlisting} +%\subsection{Turning TeX-{-}XeT features on and off} +%The bidirectional typesetting in \XeTeX{} is based on TeX-{-}XeT algorithm and \textsf{bidi} package automatically turns the feature on for typesetting bidirectional texts. As the internal data structures built by TeX-{-}XeT differ from those built by \TeX, the typesetting of a document by TeX-{-}XeT may therefore differ from that performed by \TeX. So you may notice that some packages behave differently when TeX-{-}XeT feature is on and you may want to turn the feature off for a part of the text so that you get the default behaviour of original \TeX. Two commands are provided for this purpose: +%\begin{BDef} +%\Lcs{TeXXeTOn}\quad\Lcs{TeXXeTOff} +%\end{BDef} +%\begin{itemize} +%\item \Lcs{TeXXeTOn} turns TeX-{-}XeT feature on, which is active by default when \textsf{bidi} package is loaded. +%\item \Lcs{TeXXeTOff} turns TeX-{-}XeT feature off. +%\end{itemize} +%\subsection{Paragraph Switching Commands\label{PSC}} +%\begin{BDef} +%\Lcs{setLTR}\quad\Lcs{setLR}\quad\Lcs{unsetRL}\quad\Lcs{unsetRTL}\\ +%\Lcs{setRTL}\quad\Lcs{setRL}\quad\Lcs{unsetLTR} +%\end{BDef} +%\begin{itemize} +%\item With any of the commands in the first row, you can typeset LTR paragraphs. +%\item With any of the commands in the second row, you can typeset RTL paragraphs. +%\end{itemize} +%\begin{lstlisting}[morekeywords={newfontfamily,Parsifont}] +%\input bidi +%\setRTL% +%Anyone who reads Old and Middle English literary texts will be +% familiar with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. % +%\setLTR% Notice the blank line before \setLTR +%Anyone who reads Old and Middle English literary texts will be +% familiar with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. +%\end +%\end{lstlisting} +%\subsection{Pargraph Switching Environments} +%\begin{BDef} +%\Lcs{LTR}\quad\Larga{text}\quad\Lcs{endLTR}\\ +%\Lcs{RTL}\quad\Larga{text}\quad\Lcs{endRTL} +%\end{BDef} +%\begin{itemize} +%\item With \texttt{LTR} environment, you can typeset LTR paragraphs. +%\item With \texttt{RTL} environment, you can typeset RTL paragraphs. +%\end{itemize} +%\begin{lstlisting}[morekeywords={RTL,endRTL,LTR,endLTR}] +%\input bidi +%\RTL +%Anyone who reads Old and Middle English literary texts will be familiar +% with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. +%\LTR +%Anyone who reads Old and Middle English literary texts will be familiar +% with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. +%\endLTR +%And we are still typesetting right to left. +%\endRTL +%\end +%\end{lstlisting} +%\subsection{Typesetting Short LTR and RTL Texts} +%\begin{BDef} +%\Lcs{LRE}\Largb{\Larga{text}}\quad\Lcs{LR}\Largb{\Larga{text}}\\ +%\Lcs{RLE}\Largb{\Larga{text}}\quad\Lcs{RL}\Largb{\Larga{text}} +%\end{BDef} +%\begin{itemize} +%\item With any of the commands in the first row, you can typeset short LTR text inside RTL paragraphs. +%\item With any of the commands in the second row, you can typeset short RTL text inside LTR paragraphs. +%\end{itemize} +%\begin{lstlisting}[morekeywords={RTL,endRTL,LTR,endLTR}] +%\input bidi +%\RTL +%Anyone who reads Old and Middle English \LRE{Short left to right text} literary texts will be familiar +% with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. +%\LTR +%Anyone who reads Old and Middle English \RLE{Short right to left text} literary texts will be familiar +% with the mid-brown volumes of the EETS, with the symbol +% of Alfred's jewel embossed on the front cover. +%\endLTR +%\endRTL +%\end +%\end{lstlisting} +%\subsection{Primitive-like commands} +%\begin{BDef} +%\Lcs{hboxR}\quad\Lcs{hboxL}\quad\Lcs{vboxR}\quad\Lcs{vboxL} +%\end{BDef} +%\begin{itemize} +%\item The syntax of \Lcs{hboxR} is exatly the same as the syntax of \Lcs{hbox}, but its contents is always typeset RTL. +%\item The syntax of \Lcs{hboxL} is exatly the same as the syntax of \Lcs{hbox}, but its contents is always typeset LTR. +%\item The syntax of \Lcs{vboxR} is exatly the same as the syntax of \Lcs{vbox}, but its contents is always typeset RTL. +%\item The syntax of \Lcs{vboxL} is exatly the same as the syntax of \Lcs{vbox}, but its contents is always typeset LTR. +%\end{itemize} +%\subsection{Something To know about \Lcs{hbox}} +%If you enable RTL typesetting and typeset an horizontal box at the beginning of the document: +%\begin{lstlisting} +%\input bidi +%\setRTL +%\hbox{This is a Test} +%\end +%\end{lstlisting} +%You see that even you have used \Lcs{setRTL}, the horizontal box appears LTR (It appears on the left hand side and its content is typeset left to right). This is because when \TeX{} starts, it is in the vertical mode so if you need to have that \Lcs{hbox} appear RTL, then write \Lcs{leavevmode} before \Lcs{hbox}: +%\begin{lstlisting} +%\input bidi +%\setRTL +%\leavevmode\hbox{This is a Test} +%\end +%\end{lstlisting} +%\subsection{Typesetting Logos} +%\begin{BDef} +%\Lcs{XeTeX} +%\end{BDef} +%\textsf{bidi} defines \XeTeX\ logo and in addition, it makes sure that the logo, \TeX\ is typeset LTR. +%\section{Some Useful Internal Macros and Programming Tips} +%There are some useful internal macros and programming tips that might be helpful for you. This section, explains all these useful internals and programming tips. +%\subsection{RTL Conditional} +%\begin{BDef} +%\Lcs{if@RTL} +%\end{BDef} +%\Lcs{if@RTL} conditional is true inside RTL mode and it is false in LTR mode. +%\subsection{Main RTL Conditional} +%\begin{BDef} +%\Lcs{if@RTLmain} +%\end{BDef} +%If the main direction of the document is RTL, \Lcs{if@RTLmain} is true and if the main direction of the document is LTR, \Lcs{if@RTLmain} is false. +%\subsection{Direction Ensuring Macros} +%\begin{BDef} +%\Lcs{@ensure@RTL}\Largb{\Larga{text}}\quad\Lcs{@ensure@RL}\Largb{\Larga{text}}\quad\Lcs{@ensure@LTR}\Largb{\Larga{text}}\\ +%\Lcs{@ensure@LR}\Largb{\Larga{text}}\quad +%\Lcs{@ensure@dir}\Largb{\Larga{text}}\quad\Lcs{@ensure@maindir}\Largb{\Larga{text}} +%\end{BDef} +%\begin{itemize} +%\item \Lcs{@ensure@RTL} and \Lcs{@ensure@RL} internals make sure that \Larga{text} is always typeset RTL, independent on the current mode. +%\item \Lcs{@ensure@LTR} and \Lcs{@ensure@LR} internals make sure that \Larga{text} is always typeset LTR, independent on the current mode. +%\item \Lcs{@ensure@dir} and \Lcs{@ensure@maindir} if used in RTL mode, they put \Larga{text} inside \Lcs{RLE} and if used in LTR mode, they put the text as it is. +%\end{itemize} +%\subsection{Reset Direction Macro} +%\begin{BDef} +%\Lcs{save@dir}\quad\Lcs{saved@@dir}\quad\Lcs{reset@dir} +%\end{BDef} +%\begin{itemize} +%\item \Lcs{save@dir}, if the direction of typesetting is RTL, defines \Lcs{saved@@dir} to be RTL and if the direction of typesetting is LTR, defines \Lcs{saved@@dir} to be LTR. +%\item \Lcs{reset@dir}, if \Lcs{saved@@dir} is defined as RTL, inserts \Lcs{setRTL} otherwise, if \Lcs{saved@@dir} is defined as LTR, inserts \Lcs{setLTR}, otherwise does nothing. +%\end{itemize} % \StopEventually{} % % \section{\textsf{\jobname} implementation} @@ -2312,8 +2488,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2011/09/16} -\def\bidiversion{v1.2.9} +\def\bididate{2011/10/01} +\def\bidiversion{v1.3.0} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\bidiinfo{% @@ -2321,7 +2497,7 @@ bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)^^J Description: A convenient interface for typesetting bidirectional^^J texts in plain TeX and LaTeX. The package includes adaptations for use^^J with many other commonly-used packages.^^J -Copyright © 2009–2011 Vafa Khalighi^^J +Copyright © 2009–2011 VAFA KHALIGHI^^J \bidiversion, \bididate^^J License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J Location on CTAN: /macros/latex/contrib/bidi} @@ -2333,29 +2509,34 @@ Location on CTAN: /macros/latex/contrib/bidi} \def\@definitionfileextension{def} \def\@iftagsloaded{\@ifl@aded\@tagsextension} \def\@ifdefinitionfileloaded{\@ifl@aded\@definitionfileextension} -\newif\if@RTLmain -\newif\if@RTL +\def\eqnewif#1#2{% + \count@\escapechar \escapechar\m@ne + \let#1\iffalse + \let#2\iffalse + \eq@if#1#2\iftrue + \eq@if#1#2\iffalse + \escapechar\count@} +\def\eq@if#1#2#3{% + \expandafter\def\csname\expandafter\@gobbletwo\string#1% + \expandafter\@gobbletwo\string#3\endcsname + {\let#1#3 + \let#2#3} + \expandafter\def\csname\expandafter\@gobbletwo\string#2% + \expandafter\@gobbletwo\string#3\endcsname + {\let#2#3 + \let#1#3} +} +\eqnewif{\if@RTLmain}{\if@rlmain} +\eqnewif{\if@RTL}{\if@rl} \newif\if@RTLmaths \newif\if@Latin -\newif\if@RTLtab +\eqnewif{\if@RTLtab}{\if@tab@rl} \newif\if@RTLmarginpar \newif\if@LTRmarginpar \newif\if@LTRbibitems \newif\if@RTLbibitems \newif\if@sentdir -\newif\if@RTL@footnote -\let\if@rlmain=\if@RTLmain -\let\@rlmaintrue=\@RTLmaintrue -\let\@rlmainfalse=\@RTLmainfalse -\let\if@rl=\if@RTL -\let\@rltrue=\@RTLtrue -\let\@rlfalse=\@RTLfalse -\let\if@rl@footnote=\if@RTL@footnote -\let\@rl@footnotetrue=\@RTL@footnotetrue -\let\@rl@footnotefalse=\@RTL@footnotefalse -\let\if@tab@rl=\if@RTLtab -\let\@tab@rltrue=\@RTLtabtrue -\let\@tab@rlfalse=\@RTLtabfalse +\eqnewif{\if@RTL@footnote}{\if@rl@footnote} \@RTLmainfalse \AtBeginDocument{% \if@RTLmain\else @@ -2389,7 +2570,7 @@ Location on CTAN: /macros/latex/contrib/bidi} %\fi % \subsection{\textsf{bidi.tex}} % \begin{macrocode} -\def\bididate{2011/09/16} +\def\bididate{2011/10/01} \def\bidiversion{v0.1} \catcode`@=11 \newlinechar`\^^J @@ -2398,7 +2579,7 @@ bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)^^J Description: A convenient interface for typesetting bidirectional^^J texts in plain TeX and LaTeX. The package includes adaptations for use^^J with many other commonly-used packages.^^J -Copyright © 2009–2011 Vafa Khalighi^^J +Copyright © 2009–2011 VAFA KHALIGHI^^J \bidiversion, \bididate^^J License: LaTeX Project Public License, version 1.3c or higher (your choice)^^J Location on CTAN: /macros/latex/contrib/bidi} @@ -9992,6 +10173,103 @@ bidi implementation of tufte title] % \end{macrocode} % \iffalse %</letter-xetex-bidi.def> +%<*lettrine-xetex-bidi.def> +%\fi +% \subsection{\textsf{lettrine-xetex-bidi.def}} +% \begin{macrocode} +\ProvidesFile{lettrine-xetex-bidi.def}[2011/09/16 v0.1 bidi adaptations for lettrine package for XeTeX engine] +\def\@lettrine[#1]#2#3{% + \setcounter{L@lines}{\theDefaultLines}% + \renewcommand*{\L@hang}{\DefaultLhang}% + \renewcommand*{\L@oversize}{\DefaultLoversize}% + \renewcommand*{\L@raise}{\DefaultLraise}% + \renewcommand*{\L@ante}{}% + \setlength{\L@Findent}{\DefaultFindent}% + \setlength{\L@Nindent}{\DefaultNindent}% + \setlength{\L@slope}{\DefaultSlope}% + \ifLettrineImage\L@imagetrue\else\L@imagefalse\fi + \if\DefaultOptionsFile\relax + \else + \begingroup + \InputIfFileExists{\DefaultOptionsFile}% + {}% + {\PackageWarning{lettrine.sty}% + {File \DefaultOptionsFile\space not found}% + }% + \def\color##1##{\l@color{##1}}% + \let\l@color\@gobbletwo + \def\textcolor##1##{\l@textcolor{##1}}% + \def\l@textcolor##1##2##3{##3}% + \expandafter\ifx\csname l@#2-keys\endcsname\relax + \gdef\l@LOKeys{}% + \else + \xdef\l@LOKeys{\csname l@#2-keys\endcsname}% + \fi + \endgroup + \def\KV@prefix{KV@L@}% + \let\@tempc\relax + \expandafter\KV@do\l@LOKeys,\relax, + \sbox{\L@lbox}{\LettrineFont #2}% + \settowidth{\LettrineWidth}{\usebox{\L@lbox}}% + \def\KV@prefix{KV@L@}% + \let\@tempc\relax + \expandafter\KV@do\l@LOKeys,\relax, + \fi + \setkeys{L}{#1}% + \ifL@image + \sbox{\L@lbox}{\LettrineFontEPS{#2}}% + \else + \sbox{\L@lbox}{\LettrineFont #2}% + \fi + \sbox{\L@tbox}{\LettrineTextFont{#3}}% + \@tempdima=\baselineskip + \ifnum\theL@lines=1 + \setlength{\L@first}{\ht\L@lbox}% + \addtolength{\L@first}{-\ht\L@tbox}% + \setlength{\L@lraise}{\z@}% + \else + \setlength{\L@first}{-\theL@lines\@tempdima}% + \addtolength{\L@first}{\@tempdima}% + \sbox{\@tempboxa}{\LettrineTextFont x}% + \addtolength{\L@first}{-\ht\@tempboxa}% + \setlength{\L@lraise}{-\L@raise\L@first}% + \addtolength{\L@first}{\L@lraise}% + \addtolength{\L@first}{\ht\L@lbox}% + \addtolength{\L@lraise}{-\theL@lines\@tempdima}% + \addtolength{\L@lraise}{\@tempdima}% + \fi + \par + \ifdim\L@first>0.2\p@\vskip\L@first\fi + \setlength{\L@Pindent}{\wd\L@lbox}% + \addtolength{\L@Pindent}{-\L@hang\wd\L@lbox}% + \settowidth{\L@first}{\L@ante}% + \addtolength{\L@Pindent}{\L@first}% + \addtolength{\L@Pindent}{\L@Findent}% + \setlength{\L@first}{\linewidth}% + \addtolength{\L@first}{-\L@Pindent}% + \addtolength{\L@Nindent}{\L@Pindent}% + \setlength{\L@next}{\linewidth}% + \addtolength{\L@next}{-\L@Nindent}% + \addtolength{\L@Pindent}{\rightmargin}% + \addtolength{\L@Nindent}{\rightmargin}% + \addtocounter{L@lines}{1}% + \if@RTL\def\L@parshape{\c@L@lines 0pt \the\L@first}\else\def\L@parshape{\c@L@lines \the\L@Pindent \the\L@first}\fi + \@tempcnta=\tw@ + \@whilenum \@tempcnta<\c@L@lines\do{% + \if@RTL\edef\L@parshape{\L@parshape 0pt \the\L@next}\else\edef\L@parshape{\L@parshape \the\L@Nindent \the\L@next}\fi + \addtolength{\L@Nindent}{\L@slope}% + \addtolength{\L@next}{-\L@slope}% + \advance\@tempcnta\@ne}% + \if@RTL \edef\L@parshape{\L@parshape 0pt \the\linewidth}\else\edef\L@parshape{\L@parshape \rightmargin \the\linewidth}\fi + \noindent\leavevmode + \parshape=\L@parshape + $\smash{\if@RTL\rlap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}% + \hskip \the\L@Findent}\else\llap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}% + \hskip \the\L@Findent}\fi}$% + \usebox{\L@tbox}} +% \end{macrocode} +% \iffalse +%</lettrine-xetex-bidi.def> %<*listings-xetex-bidi.def> %\fi % \subsection{\textsf{listings-xetex-bidi.def}} @@ -10012,7 +10290,7 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{loadingorder-bidi.def}} % \begin{macrocode} -\ProvidesFile{loadingorder-bidi.def}[2011/04/16 v0.6 making sure that bidi is the last package loaded] +\ProvidesFile{loadingorder-bidi.def}[2011/09/16 v0.7 making sure that bidi is the last package loaded] \newcommand\bidi@isloaded[2][]{ \expandafter\ifx\csname if@bidi@#2loaded@\endcsname\relax \expandafter\newif\csname if@bidi@#2loaded@\endcsname @@ -10042,6 +10320,7 @@ bidi implementation of tufte title] \bidi@isloaded{empheq} \bidi@isloaded{pdfpages} \bidi@isloaded{listings} +\bidi@isloaded{lettrine} \bidi@isloaded{pstricks} \bidi@isloaded{pgf} \bidi@isloaded{quotchap} @@ -10133,6 +10412,9 @@ bidi implementation of tufte title] \if@bidi@pdfpagesloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pdfpages after bidi package. Please load package pdfpages before bidi package, and then try to run xelatex on your document again}{}]{pdfpages} \fi% + \if@bidi@lettrineloaded@\else + \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package lettrine after bidi package. Please load package lettrine before bidi package, and then try to run xelatex on your document again}{}]{lettrine} + \fi% \if@bidi@listingsloaded@\else \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package listings after bidi package. Please load package listings before bidi package, and then try to run xelatex on your document again}{}]{listings} \fi% @@ -14972,6 +15254,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@ifpackageloaded{empheq}{\input{empheq-xetex-bidi.def}}{} \@ifpackageloaded{framed}{\input{framed-xetex-bidi.def}}{} \@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{} +\@ifpackageloaded{lettrine}{\input{lettrine-xetex-bidi.def}}{} \@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{} \@ifpackageloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{} \@ifpackageloaded{pgf}{\input{pgf-xetex-bidi.def}}{} @@ -15583,7 +15866,7 @@ AAA&BBB&CCC\\\cdashline{1-2}[.4pt/1pt] \documentclass{article} \usepackage{bidi} \title{Testing Basic Bidi Direction Change} -\author{Vafa Khalighi} +\author{VAFA KHALIGHI} \begin{document} \maketitle In this document we test bidi direction change in \textsf{RTL} and \textsf{LTR}. These tests includes \texttt{flushleft}, \texttt{flushright} environments and \verb|\centerline{...}|, \verb|\leftline{...}|,\verb|\rightline{...}|,\verb|\raggedleft| and \verb|\raggedright| macros. @@ -16183,7 +16466,7 @@ dynamic frame when using one of the \cmdname{Ncolumntop} type of commands. \usepackage{supertabular} \usepackage{bidi} \title{Testing \textsf{supertabular} package in RTL and LTR} -\author{Vafa Khalighi} +\author{VAFA KHALIGHI} \begin{document} \maketitle \section{LTR} @@ -16300,7 +16583,7 @@ zeta & GREEK SMALL LETTER ZETA & 03B6\\ \documentclass{article} \usepackage{bidi} \title{Testing \LaTeX's Default Tabular in \textsf{RTL} and \textsf{LTR}} -\author{Vafa Khalighi} +\author{VAFA KHALIGHI} \newcommand{\rb}[1]{\raisebox{1.5ex}[0mm]{#1}} \begin{document} \maketitle @@ -16366,7 +16649,7 @@ In this document we test \LaTeX's default tabular in \textsf{RTL} and \textsf{LT \usepackage{tabularx} \usepackage{bidi} \title{Testing \textsf{tabularx} Package in RTL and LTR} -\author{Vafa Khalighi} +\author{VAFA KHALIGHI} \begin{document} \maketitle \section{LTR} @@ -16410,7 +16693,7 @@ Lion & Yellow & Elephants & Tartare \\\cline{4-4} \setlength\tymax{\maxdimen} \usepackage{bidi} \title{Testing \textsf{tabulary} package in RTL and LTR} -\author{Vafa Khalighi} +\author{VAFA KHALIGHI} \begin{document} \maketitle \section{LTR} diff --git a/Master/texmf-dist/source/latex/bidi/bidi.ins b/Master/texmf-dist/source/latex/bidi/bidi.ins index 3ec50af3dcd..ce06eac8197 100644 --- a/Master/texmf-dist/source/latex/bidi/bidi.ins +++ b/Master/texmf-dist/source/latex/bidi/bidi.ins @@ -7,7 +7,7 @@ %% bidi.dtx (with options: `batchfile') %% %% ______________________________________ -%% Copyright © 2009–2011 Vafa Khalighi +%% Copyright © 2009–2011 VAFA KHALIGHI %% %% License information appended. %% @@ -17,21 +17,21 @@ \preamble ______________________________________ - Copyright © 2009–2011 Vafa Khalighi + Copyright © 2009–2011 VAFA KHALIGHI License information appended. \endpreamble \postamble -Copyright © 2009–2011 Vafa Khalighi <vafaklg@gmail.com> +Copyright © 2009–2011 VAFA KHALIGHI <vafaklg@gmail.com> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt This work is “author-maintained” (as per LPPL maintenance status) -by Vafa Khalighi. +by VAFA KHALIGHI. \endpostamble \askforoverwritefalse @@ -91,6 +91,7 @@ by Vafa Khalighi. \generate{\file{hyperref-xetex-bidi.def}{\from{\jobname.dtx}{hyperref-xetex-bidi.def}}} \generate{\file{leqno-xetex-bidi.def}{\from{\jobname.dtx}{leqno-xetex-bidi.def}}} \generate{\file{letter-xetex-bidi.def}{\from{\jobname.dtx}{letter-xetex-bidi.def}}} +\generate{\file{lettrine-xetex-bidi.def}{\from{\jobname.dtx}{lettrine-xetex-bidi.def}}} \generate{\file{listings-xetex-bidi.def}{\from{\jobname.dtx}{listings-xetex-bidi.def}}} \generate{\file{loadingorder-bidi.def}{\from{\jobname.dtx}{loadingorder-bidi.def}}} \generate{\file{longtable-xetex-bidi.def}{\from{\jobname.dtx}{longtable-xetex-bidi.def}}} @@ -132,14 +133,14 @@ by Vafa Khalighi. \generate{\file{xltxtra-xetex-bidi.def}{\from{\jobname.dtx}{xltxtra-xetex-bidi.def}}} \endbatchfile %% -%% Copyright © 2009–2011 Vafa Khalighi <vafaklg@gmail.com> +%% Copyright © 2009–2011 VAFA KHALIGHI <vafaklg@gmail.com> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of %% this license is at: http://www.latex-project.org/lppl.txt %% %% This work is “author-maintained” (as per LPPL maintenance status) -%% by Vafa Khalighi. +%% by VAFA KHALIGHI. %% %% %% |