summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-09 00:33:19 +0000
committerKarl Berry <karl@freefriends.org>2010-06-09 00:33:19 +0000
commitf595534d430a668aabd97236789552247427a959 (patch)
tree3067fddcc212eab361feedd6384f25324b278723 /Master/texmf-dist
parent2daec93327bd3cf382b3178e64759af1459e1d69 (diff)
bidi update (8jun10)
git-svn-id: svn://tug.org/texlive/trunk@18834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/bidi/README4
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.pdfbin176205 -> 184958 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.tex66
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi.tex2
-rw-r--r--Master/texmf-dist/tex/latex/bidi/bidi.sty10
-rw-r--r--Master/texmf-dist/tex/latex/bidi/extarticle-xetex-bidi.def108
-rw-r--r--Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def12
-rw-r--r--Master/texmf-dist/tex/latex/bidi/quotchap-xetex-bidi.def45
-rw-r--r--Master/texmf-dist/tex/latex/bidi/titlesec-xetex-bidi.def32
-rw-r--r--Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def69
-rw-r--r--Master/texmf-dist/tex/latex/bidi/xetex-bidi.def65
11 files changed, 321 insertions, 92 deletions
diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README
index 92d46716259..642fa43b666 100644
--- a/Master/texmf-dist/doc/latex/bidi/README
+++ b/Master/texmf-dist/doc/latex/bidi/README
@@ -1,11 +1,11 @@
_________________
The bidi package
-v1.1.1
+v1.1.2
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.1.0.
+This version fixes all the bugs that were present in v1.1.1.
______________
Vafa Khalighi
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf b/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
index dd81b49caab..f4f7932668e 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex b/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
index ff039be4b5b..92b326fec3b 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
@@ -19,9 +19,15 @@
\newcommand\XeLaTeX{Xe\LaTeX}
\newcommand\LuaTeX{Lua\TeX}
\newcommand\LuaLaTeX{Lua\LaTeX}
+\makeatletter
+\makeatletter
+\pdfstringdefDisableCommands{%
+\renewcommand\Lcs[1]{\textbackslash#1}
+}
+\makeatother\makeatother
\title{The \textsf{bidi} Package\\ \href{http://bitbucket.org/vafa/bidi}{\texttt{http://bitbucket.org/vafa/bidi}}}
\author{Vafa Khalighi\\ \href{mailto:vafakh84@gmail.com}{\texttt{vafakh84@gmail.com}}}
-\date{Version 1.1.1}
+\date{Version 1.1.2}
\begin{document}
\maketitle
\tableofcontents
@@ -38,7 +44,7 @@ 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-2010 Vafa Khalighi
-v1.1.1, <commit 54>, 2010/07/25
+v1.1.2, <commit 62>, 2010/07/25
License: LaTeX Project Public License, version 1.3c or higher (your choice)
Home: http://bitbucket.org/vafa/bidi
Location on CTAN: /macros/latex/contrib/bidi
@@ -285,6 +291,26 @@ x^2+y^2=z^2
\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}
+\documentclass{article}
+\usepackage{bidi}
+\setRTL
+\begin{document}
+\hbox{This is a Test}
+\end{document}
+\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}
+\documentclass{article}
+\usepackage{bidi}
+\setRTL
+\begin{document}
+\leavevmode\hbox{This is a Test}
+\end{document}
+\end{lstlisting}\subsection{\Lcs{bidillap} and \Lcs{bidirlap} Commands}
+In RTL mode, \Lcs{llap} and \Lcs{rlap} do oposite things. Since these two macros are used in a lot of classes and packages, instead modifying these two macros, we have created two new macros \Lcs{bidillap} and \Lcs{bidirlap} which give logical results.
\subsection{\textsf{LTRitems} and \textsf{RTLitems} Environments}
If you typeset an \textsf{itemize}, or an \textsf{enumerate}, or a \textsf{description} environment where all \Lcs{item}s are one directional, you have no problem at all as shown below:
\begin{lstlisting}
@@ -380,7 +406,7 @@ In RTL mode, tabular are typeset RTL and in LTR mode, tabular are typeset LTR.
\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{draftwatermark}, \textsf{fancyhdr}, \textsf{flowfram}, \textsf{graphicx}, \textsf{hyperref}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{ragged2e}, \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{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{draftwatermark}, \textsf{fancyhdr}, \textsf{flowfram}, \textsf{graphicx}, \textsf{hyperref}, \textsf{listings}, \textsf{minitoc}, \textsf{multicol}, \textsf{pdfpages}, \textsf{pstricks}, \textsf{quotchap}, \textsf{ragged2e}, \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{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}
@@ -574,4 +600,38 @@ When footnotes are typeset RTL, \Lcs{if@RTL@footnote} is true and when footnotes
\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{Implementation}
+In this section, we describe the implementation of bidi package in whole.
+\lstset{firstnumber=last}
+\lstset{language=[LaTeX]Tex,
+ keywordstyle=\color{mygreen},
+ basicstyle=\normalfont\ttfamily,
+ commentstyle=\color{blue}\ttfamily,
+ stringstyle=\rmfamily,
+ numbers=none,
+ numberstyle=\scriptsize,
+ stepnumber=5,
+ numbersep=8pt,
+ showstringspaces=false,
+ breaklines=true,
+ frameround=ftff,
+ frame=none,
+ backgroundcolor=\color{white}
+}
+\lstset{numbers=left,
+ numberstyle=\scriptsize,
+ stepnumber=1,
+ numbersep=8pt
+}
+\lstset{morekeywords={bididate,bidiversion,bidicommit}}
+\section{File \textsf{bidi.sty}}
+\begin{lstlisting}[firstnumber=1]
+\NeedsTeXFormat{LaTeX2e}
+\end{lstlisting}
+Here we define the date, version number and commit number of the package.
+\begin{lstlisting}
+\def\bididate{2010/07/25}
+\def\bidiversion{v1.1.0}
+\def\bidicommit{commit 44}
+\end{lstlisting}
\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.tex b/Master/texmf-dist/doc/latex/bidi/bidi.tex
index d964d1fa2fd..3e994d62e09 100644
--- a/Master/texmf-dist/doc/latex/bidi/bidi.tex
+++ b/Master/texmf-dist/doc/latex/bidi/bidi.tex
@@ -10,7 +10,7 @@
%%
\def\bididate{2010/07/25}
\def\bidiversion{v0.1}
-\def\bidicommit{commit 54}
+\def\bidicommit{commit 64}
\catcode`@=11
\edef\bidiinfo{%
bidi package (Support for bidirectional typesetting in plain TeX and LaTeX)^^J
diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty
index 6576c109be0..a59f83e7951 100644
--- a/Master/texmf-dist/tex/latex/bidi/bidi.sty
+++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty
@@ -10,8 +10,8 @@
%%
\NeedsTeXFormat{LaTeX2e}
\def\bididate{2010/07/25}
-\def\bidiversion{v1.1.1}
-\def\bidicommit{commit 54}
+\def\bidiversion{v1.1.2}
+\def\bidicommit{commit 64}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space <\bidicommit>
Bidirectional typesetting in plain TeX and LaTeX]
\edef\bidiinfo{%
@@ -43,6 +43,7 @@ Location on CTAN: /macros/latex/contrib/bidi}
\newif\if@RTLbibitems
\newif\if@sentdir
\newif\if@RTL@footnote
+\newif\if@developmentversion
\let\if@rlmain=\if@RTLmain
\let\@rlmaintrue=\@RTLmaintrue
\let\@rlmainfalse=\@RTLmainfalse
@@ -80,7 +81,10 @@ Location on CTAN: /macros/latex/contrib/bidi}
\PackageError{bidi}{TeX engines other than XeTeX and LuaTeX are not yet supported}
\fi
\fi
-
+%\@developmentversiontrue
+\if@developmentversion
+ \PackageWarningNoLine{bidi}{Thanks for testing the development version of bidi package. The development version may not work correctly or may not work at all. The development version is not recommended to be used for production purposes and should only be used for testing purposes. You are encouraged to use the stable version of bidi package available on CTAN for production purposes}
+\fi
\ProcessOptions
%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
diff --git a/Master/texmf-dist/tex/latex/bidi/extarticle-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/extarticle-xetex-bidi.def
index 32a38795d65..8ecaf0619f7 100644
--- a/Master/texmf-dist/tex/latex/bidi/extarticle-xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/extarticle-xetex-bidi.def
@@ -9,24 +9,10 @@
%%
%%
\ProvidesFile{extarticle-xetex-bidi.def}[2010/07/25 v0.2 bidi adaptations for extarticle class for XeTeX engine]
-\renewcommand*\l@part[2]{%
- \ifnum \c@tocdepth >-2\relax
- \addpenalty{-\@highpenalty}%
- \addvspace{2.25em \@plus\p@}%
- \begingroup
- \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
- \parfillskip -\@pnumwidth
- {\leavevmode
- \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
- \nobreak
- \global\@nobreaktrue
- \everypar{\global\@nobreakfalse\everypar{}}%
- \endgroup
- \fi}
-\renewcommand*\l@chapter[2]{%
- \ifnum \c@tocdepth >\m@ne
- \addpenalty{-\@highpenalty}%
- \vskip 1.0em \@plus\p@
+\renewcommand*\l@section[2]{%
+ \ifnum \c@tocdepth >\z@
+ \addpenalty\@secpenalty
+ \addvspace{1.0em \@plus\p@}%
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
@@ -35,36 +21,53 @@
\advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
\hskip -\if@RTL\rightskip\else\leftskip\fi
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
- \penalty\@highpenalty
\endgroup
\fi}
-\def\@makechapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi \normalfont
+ \renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty\@secpenalty
+ \addvspace{2.25em \@plus\p@}%
+ \begingroup
+ \setlength\@tempdima{3em}%
+ \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
+ \nobreak
+ \endgroup
+ \fi}
+ \def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \huge\bfseries \@chapapp\space \thechapter
- \par\nobreak
- \vskip 20\p@
- \fi
+ \refstepcounter{part}%
+ \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
+ \else
+ \addcontentsline{toc}{part}{#1}%
\fi
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
-\def\@makeschapterhead#1{%
- \vspace*{50\p@}%
- {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi
- \normalfont
- \interlinepenalty\@M
- \Huge \bfseries #1\par\nobreak
- \vskip 40\p@
- }}
+ {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi
+ \interlinepenalty \@M
+ \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \Large\bfseries \partname~\thepart
+ \par\nobreak
+ \fi
+ \huge \bfseries #2%
+ \markboth{}{}\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}
+ \def\@spart#1{%
+ {\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi
+ \interlinepenalty \@M
+ \normalfont
+ \huge \bfseries #1\par}%
+ \nobreak
+ \vskip 3ex
+ \@afterheading}
\renewenvironment{thebibliography}[1]
- {\chapter*{\bibname
- \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}%
- \if@RTL\if@LTRbibitems\@RTLfalse\else\fi\else\if@RTLbibitems\@RTLtrue\else\fi\fi
- \list{\@biblabel{\@arabic\c@enumiv}}%
+ {\section*{\refname
+ \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
+ \if@RTL\if@LTRbibitems\@RTLfalse\else\fi\else\if@RTLbibitems\@RTLtrue\else\fi\fi
+ \list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
@@ -72,14 +75,11 @@
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy
- \clubpenalty4000
- \@clubpenalty \clubpenalty
- \widowpenalty4000%
+ \sloppy\clubpenalty4000\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
- \endlist}
+ \endlist}
\renewcommand\left@footnote{%
\kern-3\p@
\hrule\@width.4\columnwidth
@@ -90,7 +90,7 @@
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}\hfil\endR}}
- \if@titlepage
+ \if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\right@footnote\relax
@@ -178,18 +178,10 @@
\par
\vskip 1.5em}
\fi
-\renewcommand \thesection {\thechapter\@SepMark\@arabic\c@section}
\renewcommand\thesubsection {\thesection\@SepMark\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection \@SepMark\@arabic\c@subsubsection}
\renewcommand\theparagraph {\thesubsubsection\@SepMark\@arabic\c@paragraph}
-\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}
-\renewcommand\theequation
- {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@equation}
-\renewcommand \thefigure
- {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@figure}
-\renewcommand \thetable
- {\ifnum \c@chapter>\z@ \thechapter\@SepMark\fi \@arabic\c@table}
-%%
+\renewcommand\thesubparagraph {\theparagraph\@SepMark\@arabic\c@subparagraph}%%
%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
%%
%% Distributable under the LaTeX Project Public License,
diff --git a/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def b/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def
index 6ca995492ca..266950c1ace 100644
--- a/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/loadingorder-bidi.def
@@ -35,7 +35,10 @@
\bidi@isloaded{listings}
\bidi@isloaded{pstricks}
\bidi@isloaded{pgf}
+\bidi@isloaded{quotchap}
\bidi@isloaded{tikz}
+\bidi@isloaded{titlesec}
+\bidi@isloaded{titletoc}
\bidi@isloaded{array}
\bidi@isloaded{stabular}
\bidi@isloaded{subfig}
@@ -113,9 +116,18 @@
\if@bidi@pgfloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pgf after bidi package. Please load package pgf before bidi package, and then try to run xelatex on your document again}{}]{pgf}
\fi%
+ \if@bidi@quotchaploaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package quotchap after bidi package. Please load package quotchap before bidi package, and then try to run xelatex on your document again}{}]{quotchap}
+ \fi%
\if@bidi@tikzloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package tikz after bidi package. Please load package tikz before bidi package, and then try to run xelatex on your document again}{}]{tikz}
\fi%
+ \if@bidi@titlesecloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titlesec after bidi package. Please load package titlesec before bidi package, and then try to run xelatex on your document again}{}]{titlesec}
+ \fi%
+ \if@bidi@titletocloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package titletoc after bidi package. Please load package titletoc before bidi package, and then try to run xelatex on your document again}{}]{titletoc}
+ \fi%
\if@bidi@arrayloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package array after bidi package. Please load package array before bidi package, and then try to run xelatex on your document again}{}]{array}
\fi%
diff --git a/Master/texmf-dist/tex/latex/bidi/quotchap-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/quotchap-xetex-bidi.def
new file mode 100644
index 00000000000..996ea28cb3c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bidi/quotchap-xetex-bidi.def
@@ -0,0 +1,45 @@
+%%
+%% This is file `quotchap-xetex-bidi.def',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\ProvidesFile{quotchap-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for quotchap package for XeTeX engine]
+\renewcommand{\qauthor}[1]{%
+ \par\smallskip
+ {\if@RTL\raggedright\else\raggedleft\fi\upshape #1\qquad\hbox{}\par}\bigskip}
+\renewcommand{\@makechapterhead}[1]{\chapterheadstartvskip%
+ {\size@chapter{\sectfont\if@RTL\raggedright\else\raggedleft\fi
+ {\chapnumfont
+ \ifnum \c@secnumdepth >\m@ne%
+ \if@mainmatter\thechapter%
+ \fi\fi
+ \par\nobreak}%
+ {\if@RTL\raggedright\else\raggedleft\fi\advance\if@RTL\rightmargin\else\leftmargin\fi10em\interlinepenalty\@M #1\par}}
+ \nobreak\chapterheadendvskip}}
+\renewcommand*{\@iprintcites}{%
+ \vbox to\z@{\leavevmode\copy\@quotebox\vss}
+ \global\let\@printcites\relax}
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `quotchap-xetex-bidi.def'.
+
+
+
+
diff --git a/Master/texmf-dist/tex/latex/bidi/titlesec-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/titlesec-xetex-bidi.def
new file mode 100644
index 00000000000..c0c1c588276
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bidi/titlesec-xetex-bidi.def
@@ -0,0 +1,32 @@
+%%
+%% This is file `titlesec-xetex-bidi.def',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\ProvidesFile{titlesec-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for titlesec package for XeTeX engine]
+\renewcommand\filright{%
+ \gdef\ttl@filleft##1{\hskip##1}%
+ \gdef\ttl@filright##1{\hfill}%
+ \let\\\@centercr
+ \advance\rightskip\z@ \@plus 1fil
+\parfillskip\z@}
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `titlesec-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def
new file mode 100644
index 00000000000..7fcbe440927
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/bidi/titletoc-xetex-bidi.def
@@ -0,0 +1,69 @@
+%%
+%% This is file `titletoc-xetex-bidi.def',
+
+%%
+%% __________________________________
+%% Copyright © 2009-2010 Vafa Khalighi
+%%
+%% License information appended.
+%%
+%%
+\ProvidesFile{titletoc-xetex-bidi.def}[2010/07/25 v0.1 bidi adaptations for titletoc package for XeTeX engine]
+\renewcommand\filright{%
+ \gdef\ttl@filleft##1{\hskip##1}%
+ \gdef\ttl@filright##1{\hfill}%
+ \let\\\@centercr
+ \advance\rightskip\z@ \@plus 1fil
+\parfillskip\z@}
+\renewcommand\contentspush[1]{%
+ \sbox\z@{#1}%
+ \xdef\ttl@b{\advance\if@RTL\rightskip\else\leftskip\fi\the\wd\z@}%
+ \aftergroup\ttl@b
+ \leavevmode\llap{\box\z@}}
+\def\ttl@outnoblock#1#2#3{%
+ \begingroup
+ \ifnum\ttl@b>\ttl@a
+ \nobreak
+ \else\ifnum\ttl@b<\ttl@a
+ \addpenalty{\@secpenalty}%
+ \else
+ \addpenalty{\z@}%
+ \fi\fi
+ \ttl@contentsstretch
+ \nobreak
+ \ifcase#1\relax\else\interlinepenalty\@M\fi
+ \parindent\z@
+ \ifx\@nil#2%
+ \PackageError{titletoc}{Unimplemented}%
+ {The optional argument is currently mandatory}%
+ \else
+ \if@RTL\setlength\rightskip{#2}\else
+ \setlength\leftskip{#2}\fi%
+ \fi
+ \if@RTL\setlength\leftskip{\@pnumwidth}\else\setlength\rightskip{\@pnumwidth}\fi%
+ \let\contentsmargin\ttl@margin
+ \def\ttl@makeline##1{##1}%
+ #3%
+ \addtolength{\parfillskip}{-\ttl@corr}%
+ \if@RTL\addtolength{\leftskip}{\ttl@corr}\else\addtolength{\rightskip}{\ttl@corr}\fi%
+ \let\ttl@leaders\leaders}
+\renewcommand\ttl@margin[2][\z@]{%
+ \def\ttl@corr{#1}%
+ \advance\if@RTL\leftskip\else\rightskip\fi-\@pnumwidth\relax
+ \advance\if@RTL\leftskip\else\rightskip\fi#2\relax
+ \def\@pnumwidth{#2}}
+%%
+%% Copyright © 2009-2010 by Vafa Khalighi <vafakh84@gmail.com>
+%%
+%% Distributable 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 "maintained" (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+%%
+%%
+%%
+%% End of file `titletoc-xetex-bidi.def'.
diff --git a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
index 049d676e4bd..3c92fecf805 100644
--- a/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
+++ b/Master/texmf-dist/tex/latex/bidi/xetex-bidi.def
@@ -8,7 +8,7 @@
%% License information appended.
%%
%%
-\ProvidesFile{xetex-bidi.def}[2010/07/25 v0.5 bidi adaptations for XeTeX engine]
+\ProvidesFile{xetex-bidi.def}[2010/07/25 v0.7 bidi adaptations for XeTeX engine]
\ifx\TeXXeTstate\undefined\else%
\TeXXeTstate=1
\fi
@@ -166,6 +166,10 @@
\def\rightline#1{%
\if@RTL\@@line{\hss\beginR#1\endR}
\else\@@line{\hss#1}\fi}
+\def\bidirlap#1{\hb@xt@\z@{\if@RTL\hss\fi#1\if@RTL\else\hss\fi}}
+\def\bidillap#1{\hb@xt@\z@{\if@RTL\else\hss\fi#1\if@RTL\hss\fi}}
+\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
+ \hangindent \if@RTL-\else\fi\wd\@tempboxa\noindent\box\@tempboxa}
\def\narrower{%
\advance\if@RTL\rightskip\else\leftskip\fi\parindent
\advance\if@RTL\leftskip\else\rightskip\fi\parindent}
@@ -284,6 +288,14 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\renewcommand{\@outputdblcol}{\if@RTLmain\RTL@outputdblcol\else\LTR@outputdblcol\fi}
\newcommand{\RTLdblcol}{\renewcommand{\@outputdblcol}{\RTL@outputdblcol}}
\newcommand{\LTRdblcol}{\renewcommand{\@outputdblcol}{\LTR@outputdblcol}}
+\long\def\@imakebox[#1][#2]#3{%
+ \leavevmode%
+ \@begin@tempboxa\hbox{#3}%
+ \setlength\@tempdima{#1}% support calc
+ \hb@xt@\@tempdima{\csname bm@#2\endcsname}%
+ \@end@tempboxa}
+\def\bm@l{\if@RTL\hss\else\fi\unhbox\@tempboxa\if@RTL\else\hss\fi}\let\bm@t\bm@l
+\def\bm@r{\if@RTL\else\hss\fi\unhbox\@tempboxa\if@RTL\hss\else\fi}\let\bm@b\bm@r
\def\endminipage{%
\par
\unskip
@@ -446,6 +458,30 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\everydisplay{\predisplaydirection=0 }
\def\@eqnnum{{\normalfont \normalcolor \if@RTL\beginR\fi(\theequation)\if@RTL\endR\fi}}
\input{footnote-xetex-bidi.def}
+\@ifclassloaded{article}{\input{article-xetex-bidi.def}}{}
+\@ifclassloaded{extarticle}{\input{extarticle-xetex-bidi.def}}{}
+\@ifclassloaded{artikel1}{\input{artikel1-xetex-bidi.def}}{}
+\@ifclassloaded{artikel2}{\input{artikel2-xetex-bidi.def}}{}
+\@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
+\@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
+\@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
+\@ifclassloaded{scrlettr}{\input{scrlettr-xetex-bidi.def}}{}
+\@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
+\@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
+\@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
+\@ifclassloaded{extreport}{\input{extreport-xetex-bidi.def}}{}
+\@ifclassloaded{report}{\@ifpackageloaded{flowfram}{}{\input{report-xetex-bidi.def}}}{}
+\@ifclassloaded{rapport1}{\input{rapport1-xetex-bidi.def}}{}
+\@ifclassloaded{rapport3}{\input{rapport3-xetex-bidi.def}}{}
+\@ifclassloaded{scrartcl}{\input{scrartcl-xetex-bidi.def}}{}
+\@ifclassloaded{scrbook}{\input{scrbook-xetex-bidi.def}}{}
+\@ifclassloaded{scrreprt}{\input{scrreprt-xetex-bidi.def}}{}
+\@ifclassloaded{amsbook}{\input{amsbook-xetex-bidi.def}}{}
+\@ifclassloaded{extbook}{\input{extbook-xetex-bidi.def}}{}
+\@ifclassloaded{boek}{\input{boek-xetex-bidi.def}}{}
+\@ifclassloaded{boek3}{\input{boek3-xetex-bidi.def}}{}
+\@ifclassloaded{book}{\@ifpackageloaded{flowfram}{}{\input{book-xetex-bidi.def}}}{}
+\@ifclassloaded{bookest}{\input{bookest-xetex-bidi.def}}{}
\@iftagsloaded{leqno}{\input{leqno-xetex-bidi.def}}{}
\@iftagsloaded{fleqn}{\input{fleqn-xetex-bidi.def}}{}
\@ifpackageloaded{amsmath}{\input{amsmath-xetex-bidi.def}}{}
@@ -467,6 +503,8 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{}
\@ifpackageloaded{pgf}{\input{pgf-xetex-bidi.def}}{}
\@ifpackageloaded{tikz}{\input{tikz-xetex-bidi.def}}{}
+\@ifpackageloaded{titlesec}{\input{titlesec-xetex-bidi.def}}{}
+\@ifpackageloaded{titletoc}{\input{titletoc-xetex-bidi.def}}{}
\@ifpackageloaded{array}{\input{array-xetex-bidi.def}}{}
\@ifpackageloaded{stabular}{\input{stabular-xetex-bidi.def}}{}
\@ifpackageloaded{subfigure}{\input{subfigure-xetex-bidi.def}}{}
@@ -474,34 +512,11 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{arydshln}{\input{arydshln-xetex-bidi.def}}{}
\@ifpackageloaded{multicol}{\input{multicol-xetex-bidi.def}}{}
\@ifpackageloaded{minitoc}{\input{minitoc-xetex-bidi.def}}{}
+\@ifpackageloaded{quotchap}{\input{quotchap-xetex-bidi.def}}{}
\@ifpackageloaded{ragged2e}{\input{ragged2e-xetex-bidi.def}}{}
\@ifpackageloaded{tabls}{\input{tabls-xetex-bidi.def}}{}
\@ifpackageloaded{tabulary}{\input{tabulary-xetex-bidi.def}}{}
\@ifpackageloaded{tocstyle}{\input{tocstyle-xetex-bidi.def}}{}
-\@ifclassloaded{article}{\input{article-xetex-bidi.def}}{}
-\@ifclassloaded{extarticle}{\input{extarticle-xetex-bidi.def}}{}
-\@ifclassloaded{artikel1}{\input{artikel1-xetex-bidi.def}}{}
-\@ifclassloaded{artikel2}{\input{artikel2-xetex-bidi.def}}{}
-\@ifclassloaded{artikel3}{\input{artikel3-xetex-bidi.def}}{}
-\@ifclassloaded{amsart}{\input{amsart-xetex-bidi.def}}{}
-\@ifclassloaded{letter}{\input{letter-xetex-bidi.def}}{}
-\@ifclassloaded{scrlettr}{\input{scrlettr-xetex-bidi.def}}{}
-\@ifclassloaded{extletter}{\input{extletter-xetex-bidi.def}}{}
-\@ifclassloaded{memoir}{\input{memoir-xetex-bidi.def}}{}
-\@ifclassloaded{refrep}{\input{refrep-xetex-bidi.def}}{}
-\@ifclassloaded{extreport}{\input{extreport-xetex-bidi.def}}{}
-\@ifclassloaded{report}{\@ifpackageloaded{flowfram}{}{\input{report-xetex-bidi.def}}}{}
-\@ifclassloaded{rapport1}{\input{rapport1-xetex-bidi.def}}{}
-\@ifclassloaded{rapport3}{\input{rapport3-xetex-bidi.def}}{}
-\@ifclassloaded{scrartcl}{\input{scrartcl-xetex-bidi.def}}{}
-\@ifclassloaded{scrbook}{\input{scrbook-xetex-bidi.def}}{}
-\@ifclassloaded{scrreprt}{\input{scrreprt-xetex-bidi.def}}{}
-\@ifclassloaded{amsbook}{\input{amsbook-xetex-bidi.def}}{}
-\@ifclassloaded{extbook}{\input{extbook-xetex-bidi.def}}{}
-\@ifclassloaded{boek}{\input{boek-xetex-bidi.def}}{}
-\@ifclassloaded{boek3}{\input{boek3-xetex-bidi.def}}{}
-\@ifclassloaded{book}{\@ifpackageloaded{flowfram}{}{\input{book-xetex-bidi.def}}}{}
-\@ifclassloaded{bookest}{\input{bookest-xetex-bidi.def}}{}
\@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
\@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}
%%