summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/bidi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-10 00:04:40 +0000
committerKarl Berry <karl@freefriends.org>2010-04-10 00:04:40 +0000
commit5fd15d101add3e08ff14e00c8a38998602e87959 (patch)
tree0ec09aea3b1a0bac1b45bd6635145cd5d2ab267c /Master/texmf-dist/doc/latex/bidi
parent1a415339f97d6e886e15efee8e7be4c3ba4e38ec (diff)
bidi now lualatex, too (9apr10)
git-svn-id: svn://tug.org/texlive/trunk@17780 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/bidi')
-rw-r--r--Master/texmf-dist/doc/latex/bidi/README15
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bibitem.pdfbin0 -> 2936 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.pdfbin0 -> 177010 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidi-doc.tex566
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidisample2e.pdfbin0 -> 39027 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidisample2e.tex199
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidismall2e.pdfbin0 -> 16532 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/bidismall2e.tex33
-rw-r--r--Master/texmf-dist/doc/latex/bidi/gull.jpgbin0 -> 761651 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/picture.jpgbin0 -> 1693 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/presentation-sample.pdfbin0 -> 39748 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/presentation-sample.tex48
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-arydshln.pdfbin0 -> 11023 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-arydshln.tex27
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-bidi.pdfbin0 -> 16009 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-bidi.tex43
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-brochure.pdfbin0 -> 52113 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-brochure.tex360
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-casualcv.pdfbin0 -> 59545 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-casualcv.tex71
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-classiccv.pdfbin0 -> 57591 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-classiccv.tex71
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-color.pdfbin0 -> 23982 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-color.tex44
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-supertabular.pdfbin0 -> 24818 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-supertabular.tex116
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabular.pdfbin0 -> 24715 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabular.tex63
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabularx.pdfbin0 -> 18883 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabularx.tex40
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabulary.pdfbin0 -> 11034 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test-tabulary.tex30
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdfbin0 -> 18966 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-colortbl.tex47
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdfbin0 -> 10310 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test1-wrapfig.tex40
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdfbin0 -> 27868 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-colortbl.tex28
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdfbin0 -> 7437 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test2-wrapfig.tex28
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdfbin0 -> 773628 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bidi/test3-wrapfig.tex77
42 files changed, 1946 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README
new file mode 100644
index 00000000000..490e19532b9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/README
@@ -0,0 +1,15 @@
+_________________
+The bidi package
+v1.0.6
+
+This package provides a convenient interface for typesetting
+bidirectional texts with XeLaTeX and LuaLaTeX.
+
+This version fixes all the bugs that were present in v1.0.5.
+
+______________
+Vafa Khalighi
+vafakh84@gmail.com
+
+Copyright 2007-2010
+Distributed under the LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/latex/bidi/bibitem.pdf b/Master/texmf-dist/doc/latex/bidi/bibitem.pdf
new file mode 100644
index 00000000000..49191743021
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bibitem.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf b/Master/texmf-dist/doc/latex/bidi/bidi-doc.pdf
new file mode 100644
index 00000000000..fd15ffc5dc6
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..e6b00b2871e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidi-doc.tex
@@ -0,0 +1,566 @@
+\documentclass{artikel3}
+\usepackage{calc}
+\usepackage{pifont}
+\usepackage{bbding}
+\usepackage[colorlinks=true,linkcolor=mybrown,urlcolor=mygreen]{hyperref}
+\usepackage{bidicode}
+\newcounter{local}
+\renewcommand\theenumi{\protect\setcounter{local}%
+ {201+\the\value{enumi}}\protect\ding{\value{local}}}
+\renewcommand\labelenumi{\theenumi}
+\renewcommand\labelitemi{\HandRight}
+\renewcommand\labelitemii{\HandRightUp}
+\renewcommand\labelitemiii{\HandCuffRight}
+\renewcommand\labelitemiv{\HandPencilLeft}
+\definecolor{mybrown}{rgb}{.6,0,0}
+\definecolor{mygreen}{rgb}{0,.43,0}
+\definecolor{Orange}{rgb}{1,.4,.2}
+\newcommand\XeTeX{Xe\TeX}
+\newcommand\XeLaTeX{Xe\LaTeX}
+\newcommand\LuaTeX{Lua\TeX}
+\newcommand\LuaLaTeX{Lua\LaTeX}
+\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.0.6}
+\begin{document}
+\maketitle
+\tableofcontents
+\section{Introduction}
+\textsf{bidi} provides a convenient interface for typesetting bidirectional texts with \XeLaTeX\ and \LuaLaTeX\footnote{At present support for \LuaTeX\ is not present but it will be added when \LuaTeX\ 0.70 is released. This is because that direction support of \LuaTeX\ in 0.70 will be backward incompatible with 0.60.}. The package includes adaptations for use with many other commonly-used packages.
+
+The \textsf{bidi} package at the moment only works with both \XeTeX\ and \LuaTeX\ engines, but we will support other \TeX\ engines as well in the future.
+\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}[numbers=none,backgroundcolor=\color{skugga}]
+bidi package (Support for bidirectional typesetting with XeLaTeX and LuaLaTeX)
+Description: A convenient interface for typesetting bidirectional
+texts with XeLaTeX and LuaLaTeX. The package includes adaptations for use
+with many other commonly-used packages.
+Copyright (c) 2009-2010 Vafa Khalighi
+v1.0.6, <commit 6>, 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
+\end{lstlisting}
+\section{Basics}
+\subsection{Loading The Package}
+You can load the package in the ordinary way;
+\begin{BDef}
+\Lcs{usepackage}\OptArgs\Largb{bidi}
+\end{BDef}
+Where \texttt{options} of the package are explained later in \autoref{options}.
+
+When loading the package, it is important to know that:
+\begin{enumerate}
+\item \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.
+\item In fact, \textsf{bidi} makes sure that some specific packages are loaded before \textsf{bidi}; these are those packages that \textsf{bidi} modifies them for bidirectional typesetting.
+
+If you load \textsf{bidi} before any of these packages, then you will get an error saying that you should load \textsf{bidi} as your last package.
+
+For instance, consider the following minimal example:
+\begin{lstlisting}
+\documentclass{minimal}
+\usepackage{bidi}
+\usepackage{graphicx}
+\begin{document}
+This is just a test.
+\end{document}
+\end{lstlisting}
+Where \textsf{graphicx} is loaded after \textsf{bidi}. If you run \texttt{xelatex} on this document, you will get an error which looks like this:
+\begin{lstlisting}[numbers=none,backgroundcolor=\color{skugga}]
+! Package bidi Error: Oops! you have loaded package graphicx after bidi package
+. Please load package graphicx before bidi package, and then try to run xelatex
+ on your document again.
+
+See the bidi package documentation for explanation.
+Type H <return> for immediate help.
+ ...
+
+l.4 \begin{document}
+
+?
+
+\end{lstlisting}
+\end{enumerate}
+\subsection{Commands for Version number, Mercurial commit number and Date of The Package}
+\begin{BDef}
+\Lcs{bidiversion}\quad\Lcs{bidicommit}\quad\Lcs{bididate}
+\end{BDef}
+\begin{itemize}
+\item \Lcs{bidiversion} gives the current version of the package.
+\item \Lcs{bidicommit} gives the current Mercurial commit number of the package.
+\item \Lcs{bididate} gives the current date of the package.
+\end{itemize}
+\begin{lstlisting}[morekeywords={bidiversion,bidicommit,bididate}]
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+This is typeset by \textsf{bidi} package, \bidiversion, \bidicommit, \bididate.
+\end{document}
+\end{lstlisting}
+\subsection{Options of The Package\label{options}}
+There are two options, namely \texttt{RTLdocument} and \texttt{rldocument}, which are essentialy equivalent. If you pass any of these options to the package, you will be typesetting a document containing mainly RTL texts with some LTR texts. These options activate \Lcs{setRTL} (explained in \autoref{PSC}), \Lcs{RTLdblcol} (explained in \autoref{twocolumn}) and \Lcs{autofootnoterule} (explained in \autoref{footnoterule}).
+
+It is clear that if you do not pass any of these options to the package, you will be typesetting a document containing mainly LTR texts with some RTL texts.
+\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}
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+\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{document}
+\end{lstlisting}
+\subsection{Pargraph Switching Environments}
+\begin{BDef}
+\LBEG{LTR}\quad\Larga{text}\quad\LEND{LTR}\\
+\LBEG{RTL}\quad\Larga{text}\quad\LEND{RTL}
+\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}
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+\begin{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.
+\begin{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.
+\end{LTR}
+And we are still typesetting RTL.
+\end{RTL}
+\end{document}
+\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}
+\begin{document}
+\begin{RTL}
+Anyone who reads Old and Middle English \LRE{Short LTR 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.
+\begin{LTR}
+Anyone who reads Old and Middle English \RLE{Short RTL 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.
+\end{LTR}
+\end{RTL}
+\end{document}
+\end{lstlisting}
+\subsection{Footnotes}
+\begin{BDef}
+\Lcs{footnote}\OptArg{num}\Largb{\Larga{text}}\quad\Lcs{LTRfootnote}\OptArg{num}\Largb{\Larga{text}}\quad\Lcs{RTLfootnote}\OptArg{num}\Largb{\Larga{text}}\\
+\Lcs{setfootnoteRL}\quad\Lcs{setfootnoteLR}\quad\Lcs{unsetfootnoteRL}\\
+\Lcs{thanks}\Largb{\Larga{text}}\quad\Lcs{LTRthanks}\Largb{\Larga{text}}\quad\Lcs{RTLthanks}\Largb{\Larga{text}}
+\end{BDef}
+\begin{itemize}
+\item \Lcs{footnote} in RTL mode produces an RTL footnote while in LTR mode it produces an LTR footnote.
+\item \Lcs{LTRfootnote} will always produce an LTR footnote, independent on the current mode.
+\item \Lcs{RTLfootnote} will always produce an RTL footnote, independent on the current mode.
+\item Specifying a \Lcs{setfootnoteRL} command anywhere will make \Lcs{footnote} produce an RTL footnote.
+\item Specifying either a \Lcs{setfootnoteLR} or an \Lcs{unsetfootnoteRL} command anywhere will make \Lcs{footnote} produce an LTR footnote.
+\item \Lcs{thanks} (to be used only inside \Lcs{author} or \Lcs{title} argument) in RTL mode produces an RTL footnote while in LTR mode it produces an LTR footnote.
+\item \Lcs{LTRthanks} (to be used only inside \Lcs{author} or \Lcs{title} argument) will always produce an LTR footnote, independent on the current mode.
+\item \Lcs{RTLthanks} (to be used only inside \Lcs{author} or \Lcs{title} argument) will always produce an RTL footnote, independent on the current mode.
+\end{itemize}
+\begin{BDef}
+\Lcs{footnotetext}\OptArg{num}\Largb{\Larga{text}}\quad\Lcs{LTRfootnotetext}\OptArg{num}\Largb{\Larga{text}}\\
+\Lcs{RTLfootnotetext}\OptArg{num}\Largb{\Larga{text}}
+\end{BDef}
+\begin{itemize}
+\item \Lcs{footnotetext} used in conjunction with \Lcs{footnotemark}, in RTL mode produces an RTL footnote while in LTR mode it produces an LTR footnote.
+\item \Lcs{LTRfootnotetext} used in conjunction with \Lcs{footnotemark}, will always produce an LTR footnote, independent on the current mode.
+\item \Lcs{RTLfootnotetext} used in conjunction with \Lcs{footnotemark}, will always produce an RTL footnote, independent on the current mode.
+\end{itemize}
+\subsubsection{Footnote Rule\label{footnoterule}}
+The behavior of footnote rules can also be controlled.
+\begin{BDef}
+\Lcs{autofootnoterule}\quad\Lcs{rightfootnoterule}\quad\Lcs{leftfootnoterule}\\
+\Lcs{LRfootnoterule}\quad\Lcs{textwidthfootnoterule}
+\end{BDef}
+\begin{itemize}
+\item \Lcs{autofootnoterule} will draw the footnote rule right or left aligned based on the direction of the first footnote following the rule (i.e., put in the current page).
+\item \Lcs{rightfootnoterule} will put footnote rule on the right-hand side.
+\item \Lcs{leftfootnoterule} or \Lcs{LRfootnoterule} will put footnote rule on the left-hand side.
+\item \Lcs{textwidthfootnoterule} will draw the footnote rule with a width equal to \Lcs{textwidth}.
+\end{itemize}
+\subsection{Two Column Typesetting\label{twocolumn}}
+\begin{BDef}
+\Lcs{RTLdblcol}\quad\Lcs{LTRdblcol}
+\end{BDef}
+If you pass the \texttt{twocolumn} option to the class file and if the main direction of the document is RTL, then you get RTL two column and if the main direction of the document is LTR, then you get LTR two column. In addition, \Lcs{RTLdblcol} allows you to have RTL two column typesetting and \Lcs{LTRdblcol} allows you to have LTR two column typesetting as the options of the class file.
+\subsection{RTL cases}
+\begin{BDef}
+\Lcs{rcases}\Largb{\Lcs{text}\Largb{\Larga{brach1}}\Lcs{cr}\Lcs{text}\Largb{\Larga{brach2}}\Lcs{cr}%
+\Lcs{text}\Largb{\Larga{brach3}}\ldots}\\
+\Lcs{text}\Largb{\Larga{main}}
+\end{BDef}
+\Lcs{rcases} is defined in bidi for typesetting RTL cases. \Lcs{text} is defined in \textsf{amsmath} package, so this means that you need to load \textsf{amsmath} package too.
+\begin{lstlisting}[morekeywords={rcases,text}]
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage{bidi}
+\begin{document}
+\setRTL
+\[\rcases{\text{men}\cr\text{women}}
+\text{Humans Beings}
+\]
+\end{document}
+\end{lstlisting}
+\subsection{Typesetting Logos}
+\begin{BDef}
+\Lcs{XeTeX}\quad\Lcs{XeLaTeX}
+\end{BDef}
+\textsf{bidi} defines \XeTeX\ and \XeLaTeX\ logos and in addition, it makes sure that logos, \TeX, \LaTeX, \LaTeXe\ are typeset LTR.
+\subsection{Separation Mark}
+\begin{BDef}
+\Lcs{SepMark}\Largb{\Larga{mark}}\quad\Lcs{@SepMark}
+\end{BDef}
+Generally in Standard \LaTeX, dot is used for separation between section numbers, equation numbers any anything else which needs to be seperated. You can use \Lcs{SepMark} to use any other mark as the seperation mark instead a dot.
+\begin{lstlisting}[morekeywords={SepMark,subsection,subsubsection}]
+\documentclass{article}
+\usepackage{bidi}
+\SepMark{-}
+\begin{document}
+\section{First}
+\subsection{Second}
+\subsubsection{Third}
+\end{document}
+\end{lstlisting}
+
+If you decide to change the numbering of chapters, sections, subsections, equations, figures and \ldots, you should either load \textsf{amsmath} package and use \Lcs{numberwithin} macro to do this or do the ordinary way, but instead dot write \Lcs{@SepMark}. Using dot instead \Lcs{@SepMark} will certainly make trouble.
+
+\begin{lstlisting}[morekeywords={theequation,thesection,SepMark}]
+\documentclass{article}
+\usepackage{bidi}
+\SepMark{-}
+\makeatletter
+\renewcommand\theequation{\thesection\@SepMark\@arabic\c@equation}
+\makeatother
+\begin{document}
+\section{First}
+\begin{equation}
+x^2+y^2=z^2
+\end{equation}
+\end{document}
+\end{lstlisting}
+\subsection{\Lcs{raggedright}, \Lcs{raggedleft} commands, \texttt{flushleft} and \texttt{flushright} Environments}
+\Lcs{raggedright} command and \texttt{flushleft} environment put the text on the left hand side and \Lcs{raggedleft} command and \texttt{flushright} environment put the text on the right hand side, independent on the current mode.
+\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}
+\documentclass{article}
+\begin{document}
+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
+\begin{enumerate}
+\item 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
+\item 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
+\end{enumerate}
+\end{document}
+\end{lstlisting}
+However if the above example becomes bidirectional, as shown below:
+\begin{lstlisting}
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+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
+\begin{enumerate}
+\item 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
+\setRTL
+\item 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
+\end{enumerate}
+\end{document}
+\end{lstlisting}
+Then some people may argue that this typographically does not look promising. For this purpose, \textsf{RTLitems} environment is provided which has the following syntax:
+\begin{BDef}
+\LBEG{RTLitems}\OptArg{length}\\
+\quad\Lcs{item} \Larga{text}\\
+\quad\ldots\\
+\LEND{RTLitems}
+\end{BDef}
+Where \OptArg{length} is optional and if you do not give it, the value of \Lcs{rightskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{rightskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Larg{given length}. Thus by using the \textsf{RTLitems} environment, the previous example will look like the following:
+\begin{lstlisting}
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+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
+\begin{enumerate}
+\item 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
+\begin{RTLitems}
+\item 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
+\end{RTLitems}
+\end{enumerate}
+\end{document}
+\end{lstlisting}
+Similarly, \textsf{LTRitems} environment is defined which has the following syntax:
+\begin{BDef}
+\LBEG{LTRitems}\OptArg{length}\\
+\quad\Lcs{item} \Larga{text}\\
+\quad\ldots\\
+\LEND{LTRitems}
+\end{BDef}
+Where \OptArg{length} is optional and if you do not give it, the value of \Lcs{leftskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Lcs{labelsep} by default and if you give this optional length, then the value of \Lcs{leftskip} will be equal to the value of \Lcs{labelwidth}\(+\)\Larg{given length}.
+\subsection{\Lcs{setLTRbibitems}, \Lcs{setRTLbibitems}, and \Lcs{setdefaultbibitems} commands}
+\begin{BDef}
+\Lcs{setLTRbibitems}\quad\Lcs{setRTLbibitems}\quad\Lcs{setdefaultbibitems}
+\end{BDef}
+\begin{itemize}
+\item If your whole \textsf{thebibliography} environment is inside RTL mode, but all your \Lcs{bibitem}s are LTR and you actually want to have \Lcs{bibname} to appear on the RHS, you can use \Lcs{setLTRbibitems} command before \textsf{thebibliography} environment.
+\item If your whole \textsf{thebibliography} environment is inside LTR mode, but all your \Lcs{bibitem}s are RTL and you actually want to have \Lcs{bibname} to appear on the LHS, you can use \Lcs{setRTLbibitems} command before \textsf{thebibliography} environment.
+\item \Lcs{setdefaultbibitems} is the default, when your \Lcs{bibitems} are a mixture of LTR and RTL and it does not matter what mode (LTR or RTL) your \textsf{thebibliography} environment is in. Please note that you do not have to use \Lcs{setdefaultbibitems} command in this case at all.
+
+Consider an example that your \textsf{thebibliography} environment is inside LTR mode and you have, say two \Lcs{bibitem}s. The first \Lcs{bibitem} is LTR and the second \Lcs{bibitem} is RTL. One could typeset this senario as shown below:
+\begin{lstlisting}
+\documentclass{article}
+\usepackage{bidi}
+\begin{document}
+\begin{thebibliography}{99}
+\bibitem This is the first bibitem which is LTR.
+\begin{RTLitems}
+\bibitem This is the second bibitem which is RTL.
+\end{RTLitems}
+\end{thebibliography}
+\end{document}
+\end{lstlisting}
+\end{itemize}
+
+\subsection{Typesetting margin par}
+By default, in RTL mode, \Lcs{marginpar} appears on LHS and its content is typeset RTL and in LTR mode, \Lcs{marginpar} appears on RHS and its content is typeset LTR. In addition, the three following commands are provided:
+\begin{BDef}
+\Lcs{setRTLmarginpar}\quad\Lcs{setLTRmarginpar}\quad\Lcs{setdefaultmarginpar}
+\end{BDef}
+\begin{itemize}
+\item \Lcs{setRTLmarginpar} always makes \Lcs{marginpar} to appear on LHS and the content of \Lcs{marginpar} is typeset RTL (this is independent of the current mode).
+\item \Lcs{setLTRmarginpar} always makes \Lcs{marginpar} to appear on RHS and the content of \Lcs{marginpar} is typeset LTR (this is independent of the current mode).
+\item \Lcs{setdefaultmarginpar} gives the default behaviour of \Lcs{marginpar} as described above.
+\end{itemize}
+\subsection{Typesetting of Headers and Footers}
+If the main direction of the document is RTL, then headers and footers are typeset RTL and if the main direction of the document is LTR, then headers and footers are typeset LTR.
+\subsection{Tabular Typesetting}
+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{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{standrad article}, \textsf{standard book}, \textsf{bookest}, \textsf{extbook}, \textsf{standard letter}, \textsf{memoir}, \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}
+You can use \textsf{color} and \textsf{xcolor} packages to typeset texts in colours and colour boxes produced by \Lcs{colorbox} and \Lcs{fcolorbox} commands. Please note that your Coloured text should not span more than a line, if your text spans more than a line, you will be in trouble which means your whole document, page or paragraph may be coloured. If your texts spans more than a line, then you should use \textsf{xecolour} package.
+
+Also if you are going to use \Lcs{color} command to colour the text at the beginning of a paragraph, then you should have \Lcs{leavevmode} before \Lcs{color} command.
+
+For having coloured tabular, you can use \textsf{colortbl} package.
+\subsection{Hyperref}
+The \textsf{hyperref} package works fine with bidirectional documents if and only if, your link will not span more than a line. If your link spans more than a line, then your whole document, or page or paragraph may be linked.
+
+
+\subsection{\textsf{flowfram} Package}
+You can use \textsf{flowfram} package for your bidirectional documents. Please note that \textsf{flowfram} package provides support for bidirectional column typesetting, for details, see its manual.
+\subsection{Multicolumn Typesetting}
+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.
+\section{Extra \textsf{bidi} Packages and Classes}
+\subsection{The Issue of Footnote}
+In standard \LaTeX\, you can not use footnotes inside \Lcs{chapter}, \Lcs{part}, \Lcs{section}, \Lcs{subsection}, \Lcs{subsection} and any other section-like commands, \Lcs{caption} and tabular environment.
+
+\textsf{bidi} package provides \textsf{bidiftnxtra} package that solves the issue of footnote in standard \LaTeX. \textsf{bidiftnxtra} package should be loaded after \textsf{bidi} package.
+\subsection{Typesetting Poems}
+The \textsf{bidi} package provides \textsf{bidipoem} package for typesetting Persian poems. It provides four environments, \texttt{traditionalpoem}, \texttt{modernpoem} and starred version of these. In the starred version of these environments you do not need to type {\ttfamily\symbol{92}\symbol{92}} and that is the only difference with the normal version of the environments. The \texttt{traditionalpoem} environment and its starred version are also useful for typesetting Classic Arabic poetry, in fact this package may also be useful for other RTL languages.
+
+When using \textsf{bidipoem} package, at least you need to run \texttt{xelatex} twice on your document. In fact, if you run \texttt{xelatex} just once on your document, you get a message saying ``Unjustified poem. Rerun \texttt{XeLaTeX} to get poem right''.
+
+When you typeset your poems, you might get underfull \Lcs{hbox} messages. This is absolutely normal and if you want to get rid of these underfull \Lcs{hbox} messages, then you would need to use Kashida.
+
+If you need to change the default distance between two verses, you can do just that by:
+\begin{BDef}
+\Lcs{renewcommand}\Lcs{poemcolsepskip}\Largb{\Larga{length}}
+\end{BDef}
+\begin{BDef}
+\LBEG{traditionalpoem}\\
+\Larga{verse1}\texttt{\&}\Larga{verse2}{\ttfamily\symbol{92}\symbol{92}}\\
+\Larga{verse3}\texttt{\&}\Larga{verse4}{\ttfamily\symbol{92}\symbol{92}}\\
+\ldots\\
+\LEND{traditionalpoem}
+\end{BDef}
+\begin{BDef}
+\LBEG{traditionalpoem*}\\
+\Larga{verse1}\texttt{\&}\Larga{verse2}\\
+\Larga{verse3}\texttt{\&}\Larga{verse4}\\
+\ldots\\
+\LEND{traditionalpoem*}
+\end{BDef}
+\subsection{Typesetting Resum\'e}
+The \textsf{bidi} package provides \textsf{bidimoderncv}\footnote{This class is the modified version of \textsf{moderncv} class.} class for typesetting resum\'es. There are two examples, namely \texttt{test-casualcv.tex} and \texttt{test-classiccv.tex}, in the \textsf{doc} folder than you can look and learn how you can use it.
+\subsection{Print Two Pages On A Single Page}
+\textsf{bidi} package provides \textsf{bidi2in1} package for printing two pages on a single (landscape) A4 page. Page numbers appear on the included pages, and not on the landscape 'container' page.
+
+\subsection{Producing Presentations}
+At the moment, there is only one class that you can prepare your presentations
+with.
+
+\subsubsection{\textsf{bidipresentation} Class}
+\textsf{bidipresentation} is a simple class for presentations to be shown on
+screen or beamer. It is derived from \LaTeX's article class. The “virtual paper
+size” of documents produced by this class: width=128mm, height=96mm.
+\textsf{bidipresentation} requires that the \textsf{fancyhdr} and \textsf{geometry} packages
+are available on the system. Enhancements to the \textsf{bidipresentation}
+class are easily made available by other packages, these include slides with
+a background from a bitmap (\textsf{eso-pic} package).
+
+\paragraph{Usage:}
+The class is used with
+\begin{BDef}
+\Lcs{documentclass}\OptArgs\Largb{bidipresentation}
+\end{BDef}
+ Options of the article class are also available to \textsf{bidipresentation}, e. g.
+ 10pt, 11pt, 12pt for selection of font size. However, not all options of the
+ article class will be appropriate for a presentation class, e. g. twocolumn.
+
+A simple example document:
+\begin{lstlisting}[morekeywords={AddToShipoutPicture,includegraphics,distance}]
+ \documentclass[12pt]{bidipresentation}
+ \usepackage{eso-pic}
+ \usepackage[RTLdocument]{bidi}
+ \pagestyle{pres}
+ \AddToShipoutPicture{
+ \includegraphics{gradient2.png}
+}
+ \begin{document}
+ \begin{titlepage}
+\centering
+ \distance{1}
+ {
+\Huge \bfseries Title of the presentation \par
+}
+ \vspace{1.3ex} \large
+ Author\\[2ex]Institution
+ \distance{2}
+ \end{titlepage}
+ \begin{plainslide}[Title of Page]
+The first page
+\end{plainslide}
+\begin{rawslide}
+The second page
+ \end{rawslide}
+\end{document}
+\end{lstlisting}
+The title page can be created within the \texttt{titlepage} environment, the \Lcs{maketitle}
+command is not available. Slides may be created with the \texttt{plainslide} environment, you may add the title of the slide with the optional parameter. The
+contents of the slide are centered vertically. Another environment generating a slide is \texttt{rawslide}: slides are written without title, contents are not
+vertically centered.
+
+The \Lcs{distance}\Largb{\Larga{number}} command allows to introduce vertical space into
+slides constructed with the \texttt{rawslide} and \texttt{titlepage} environments. You should
+use pairs of \Lcs{distance}\Largb{} commands with numbers indicating the relative
+height of empty space, see the titlepage in the example above.
+
+Pictures can be included with the \Lcs{includegraphics} command of the \textsf{graphicx} package. Please be aware that the dimensions of the pages are 128mm $\times$
+96mm and therefore included graphics are scaled appropriately.
+
+\paragraph{Enhancements to \textsf{bidipresentation}:}
+
+\subparagraph{Fill background of a presentation with bitmaps:}
+\textsf{eso-pic} package allows you to paint the background with a picture:
+\begin{lstlisting}[morekeywords={AddToShipoutPicture,includegraphics}]
+\usepackage{eso-pic}
+...
+\AddToShipoutPicture{
+\includegraphics{gradient2.png}
+}
+\end{lstlisting}
+\Lcs{AddToShipoutPicture}\Largb{} puts the picture on every page, \Lcs{AddToShipoutPicture*}\Largb{}
+puts it on to the current page, \Lcs{ClearShipoutPicture} clears the background
+beginning with the current page. Details of \textsf{eso-pic}’s commands can be
+found in its own documentation.
+
+
+
+\section{Some Useful Internal Macros}
+There are some useful internal macros that might be helpful for you. This section, explains all these useful internals.
+\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{Latin Conditional}
+\begin{BDef}
+\Lcs{if@Latin}
+\end{BDef}
+\Lcs{if@Latin} inside any environment that uses Latin font is true and inside any environment that uses RTL font is false.
+\subsection{Tags Internal Macro}
+\begin{BDef}
+\Lcs{@iftagsloaded}\Largb{\Larga{tags name}}\Largb{\Larga{do thing(s) if the tag is loaded}}\\
+\Largb{\Larga{do thing(s) if the tag is not loaded}}
+\end{BDef}
+As you can see, the syntax of \Lcs{@iftagsloaded} is exactly the same as the syntax of \Lcs{@ifpackageloaded} and \Lcs{@ifclassloaded}. By tags, we mean things like \texttt{leqno} or \texttt{reqno}. Please note that in the argument \Larga{tags name}, the extension \texttt{clo} should not be given.
+\subsection{Definition File Loaded Internal Macro}
+\begin{BDef}
+\Lcs{@ifdefinitionfileloaded}\Largb{\Larga{definition file name}}\\
+\Largb{\Larga{do thing(s) if the definition file is loaded}}\\
+\Largb{\Larga{do thing(s) if the definition file is not loaded}}
+\end{BDef}
+As you can see, the syntax of \Lcs{@ifdefinitionfileloaded} is exactly the same as the syntax of \Lcs{@ifpackageloaded} and \Lcs{@ifclassloaded}. By definition file, we mean things like \texttt{hyperref-bidi.def} or \texttt{wrapfig-bidi.def}. Please note that in the argument \Larga{definition file name}, the extension \texttt{def} should not be given.
+\subsection{Tabular Conditional}
+\begin{BDef}
+\Lcs{if@RTLtab}
+\end{BDef}
+If the tabular is typeset RTL, \Lcs{if@RTLtab} is true and if the tabular is typeset LTR, \Lcs{if@RTLtab} is false.
+\subsection{Footnote Conditional}
+\begin{BDef}
+\Lcs{if@RTL@footnote}
+\end{BDef}
+When footnotes are typeset RTL, \Lcs{if@RTL@footnote} is true and when footnotes are typeset LTR, \Lcs{if@RTL@footnote} 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}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf b/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf
new file mode 100644
index 00000000000..a4bb1e0d994
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidisample2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidisample2e.tex b/Master/texmf-dist/doc/latex/bidi/bidisample2e.tex
new file mode 100644
index 00000000000..4f791ead282
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidisample2e.tex
@@ -0,0 +1,199 @@
+
+\documentclass{article} % Specifies the document class
+\usepackage[RTLdocument]{bidi}
+ % The preamble begins here.
+\title{An Example Document} % Declares the document's title.
+\author{Leslie Lamport} % Declares the author's name.
+\date{January 21, 1994} % Deleting this command produces today's date.
+
+\newcommand{\ip}[2]{(#1, #2)}
+ % Defines \ip{arg1}{arg2} to mean
+ % (arg1, arg2).
+
+ % This is an alternative definition of
+ % \ip that is commented out.
+
+\begin{document} % End of preamble and beginning of text.
+
+\maketitle % Produces the title.
+
+This is an example input file. Comparing it with
+the output it generates can show you how to
+produce a simple document of your own.
+
+\section{Ordinary Text} % Produces section heading. Lower-level
+ % sections are begun with similar
+ % \subsection and \subsubsection commands.
+
+The ends of words and sentences are marked
+ by spaces. It doesn't matter how many
+spaces you type; one is as good as 100. The
+end of a line counts as a space.
+
+One or more blank lines denote the end
+of a paragraph.
+
+Since any number of consecutive spaces are treated
+like a single one, the formatting of the input
+file makes no difference to
+ \LaTeX, % The \LaTeX command generates the LaTeX logo.
+but it makes a difference to you. When you use
+\LaTeX, making your input file as easy to read
+as possible will be a great help as you write
+your document and when you change it. This sample
+file shows how you can add comments to your own input
+file.
+
+Because printing is different from typewriting,
+there are a number of things that you have to do
+differently when preparing an input file than if
+you were just typing the document directly.
+Quotation marks like
+ ``this''
+have to be handled specially, as do quotes within
+quotes:
+ ``\,`this' % \, separates the double and single quote.
+ is what I just
+ wrote, not `that'\,''.
+
+Dashes come in three sizes: an
+ intra-word
+dash, a medium dash for number ranges like
+ 1--2,
+and a punctuation
+ dash---like
+this.
+
+A sentence-ending space should be larger than the
+space between words within a sentence. You
+sometimes have to type special commands in
+conjunction with punctuation characters to get
+this right, as in the following sentence.
+ Gnats, gnus, etc.\ all % `\ ' makes an inter-word space.
+ begin with G\@. % \@ marks end-of-sentence punctuation.
+You should check the spaces after periods when
+reading your output to make sure you haven't
+forgotten any special cases. Generating an
+ellipsis
+ \ldots\ % `\ ' is needed after `\ldots' because TeX
+ % ignores spaces after command names like \ldots
+ % made from \ + letters.
+ %
+ % Note how a `%' character causes TeX to ignore
+ % the end of the input line, so these blank lines
+ % do not start a new paragraph.
+ %
+with the right spacing around the periods requires
+a special command.
+
+\LaTeX\ interprets some common characters as
+commands, so you must type special commands to
+generate them. These characters include the
+following:
+ \$ \& \% \# \{ and \}.
+
+In printing, text is usually emphasized with an
+ \emph{italic}
+type style.
+
+\begin{em}
+ A long segment of text can also be emphasized
+ in this way. Text within such a segment can be
+ given \emph{additional} emphasis.
+\end{em}
+
+It is sometimes necessary to prevent \LaTeX\ from
+breaking a line where it might otherwise do so.
+This may be at a space, as between the ``Mr.''\ and
+``Jones'' in
+ ``Mr.~Jones'', % ~ produces an unbreakable interword space.
+or within a word---especially when the word is a
+symbol like
+ \mbox{\emph{itemnum}}
+that makes little sense when hyphenated across
+lines.
+
+Footnotes\footnote{This is an example of a footnote.}
+pose no problem.
+
+\LaTeX\ is good at typesetting mathematical formulas
+like
+ \( x-3y + z = 7 \)
+or
+ \( a_{1} > x^{2n} + y^{2n} > x' \)
+or
+ \( \ip{A}{B} = \sum_{i} a_{i} b_{i} \).
+The spaces you type in a formula are
+ignored. Remember that a letter like
+ $x$ % $ ... $ and \( ... \) are equivalent
+is a formula when it denotes a mathematical
+symbol, and it should be typed as one.
+
+\section{Displayed Text}
+
+Text is displayed by indenting it from the left
+margin. Quotations are commonly displayed. There
+are short quotations
+\begin{quote}
+ This is a short quotation. It consists of a
+ single paragraph of text. See how it is formatted.
+\end{quote}
+and longer ones.
+\begin{quotation}
+ This is a longer quotation. It consists of two
+ paragraphs of text, neither of which are
+ particularly interesting.
+
+ This is the second paragraph of the quotation. It
+ is just as dull as the first paragraph.
+\end{quotation}
+Another frequently-displayed structure is a list.
+The following is an example of an \emph{itemized}
+list.
+\begin{itemize}
+ \item This is the first item of an itemized list.
+ Each item in the list is marked with a ``tick''.
+ You don't have to worry about what kind of tick
+ mark is used.
+
+ \item This is the second item of the list. It
+ contains another list nested inside it. The inner
+ list is an \emph{enumerated} list.
+ \begin{enumerate}
+ \item This is the first item of an enumerated
+ list that is nested within the itemized list.
+
+ \item This is the second item of the inner list.
+ \LaTeX\ allows you to nest lists deeper than
+ you really should.
+ \end{enumerate}
+ This is the rest of the second item of the outer
+ list. It is no more interesting than any other
+ part of the item.
+ \item This is the third item of the list.
+\end{itemize}
+You can even display poetry.
+\begin{verse}
+ There is an environment
+ for verse \\ % The \\ command separates lines
+ Whose features some poets % within a stanza.
+ will curse.
+
+ % One or more blank lines separate stanzas.
+
+ For instead of making\\
+ Them do \emph{all} line breaking, \\
+ It allows them to put too many words on a line when they'd rather be
+ forced to be terse.
+\end{verse}
+
+Mathematical formulas may also be displayed. A
+displayed formula
+is
+one-line long; multiline
+formulas require special formatting instructions.
+ \[ \ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\]
+Don't start a paragraph with a displayed equation,
+nor make one a paragraph by itself.
+
+\end{document} % End of document.
diff --git a/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf b/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf
new file mode 100644
index 00000000000..4961db4e01a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidismall2e.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/bidismall2e.tex b/Master/texmf-dist/doc/latex/bidi/bidismall2e.tex
new file mode 100644
index 00000000000..16a02e49240
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/bidismall2e.tex
@@ -0,0 +1,33 @@
+
+
+
+\documentclass{article} % Your input file must contain these two lines
+\usepackage[RTLdocument]{bidi}
+\begin{document} % plus the \end{document} command at the end.
+
+\section{Simple Text} % This command makes a section title.
+
+Words are separated by one or more spaces. Paragraphs are separated by
+one or more blank lines. The output is not affected by adding extra
+spaces or extra blank lines to the input file.
+
+Double quotes are typed like this: ``quoted text''.
+Single quotes are typed like this: `single-quoted text'.
+
+Long dashes are typed as three dash characters---like this.
+
+Emphasized text is typed like this: \emph{this is emphasized}.
+Bold text is typed like this: \textbf{this is bold}.
+
+\subsection{A Warning or Two} % This command makes a subsection title.
+
+If you get too much space after a mid-sentence period---abbreviations
+like etc.\ are the common culprits)---then type a backslash followed by
+a space after the period, as in this sentence.
+
+Remember, don't type the 10 special characters (such as dollar sign and
+backslash) except as directed! The following seven are printed by
+typing a backslash in front of them: \$ \& \# \% \_ \{ and \}.
+The manual tells how to make other symbols.
+
+\end{document} % The input file ends with this command.
diff --git a/Master/texmf-dist/doc/latex/bidi/gull.jpg b/Master/texmf-dist/doc/latex/bidi/gull.jpg
new file mode 100644
index 00000000000..a77d1bd3421
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/gull.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/picture.jpg b/Master/texmf-dist/doc/latex/bidi/picture.jpg
new file mode 100644
index 00000000000..ef48e69ce85
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/picture.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf b/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf
new file mode 100644
index 00000000000..a8dd715930a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/presentation-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/presentation-sample.tex b/Master/texmf-dist/doc/latex/bidi/presentation-sample.tex
new file mode 100644
index 00000000000..e562e9d83e9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/presentation-sample.tex
@@ -0,0 +1,48 @@
+\documentclass[12pt,twoside]{bidipresentation}
+\usepackage{fontspec}
+\setmainfont[Script=Arabic,Mapping=farsidigits]{XB Niloofar}
+\usepackage[RTLdocument]{bidi}
+\pagestyle{pres}
+
+
+\begin{document}
+\begin{titlepage}
+\distance{1}
+\centering \LARGE
+ \bfseries عنوان اسلاید
+
+\distance{1}
+\large
+وفا خلیقی\\[1ex]نام دانشگاه
+\distance{2}
+\end{titlepage}
+
+\begin{plainslide}[این عنوان یک صفحه است.]
+این اولین صفحه اسلاید ما است که من در حال نوشتن آن هستم و کمی بیشتر می‌نویسم تا به خط بعدی بروم
+\footnote{این یک زیرنویس فارسی است.}\LTRfootnote{This is an English footnote.}
+\begin{equation}
+(a+b)^2=a^2+2ab+b^2
+\end{equation}
+\begin{itemize}
+ \item یک
+ \item دو
+\end{itemize}
+
+\begin{enumerate}
+ \item یک
+ \item دو
+\end{enumerate}
+
+\begin{description}
+ \item [یک:] اولین عدد
+ \item [دو:] دومین عدد
+\end{description}
+
+\end{plainslide}
+\begin{rawslide}
+دومین صفحه
+
+\end{rawslide}
+
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf b/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf
new file mode 100644
index 00000000000..5a250e1d019
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-arydshln.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-arydshln.tex b/Master/texmf-dist/doc/latex/bidi/test-arydshln.tex
new file mode 100644
index 00000000000..a19c6994bd1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-arydshln.tex
@@ -0,0 +1,27 @@
+\documentclass{article}
+\usepackage{arydshln}
+\usepackage{bidi}
+\title{Testing \textsf{arydshln} Package in LTR and RTL modes}
+\author{}
+\date{}
+\begin{document}
+\maketitle
+\section{LTR Mode}
+\begin{center}
+\begin{tabular}{|l::c;{2pt/2pt}r|}\hline
+A&B&C\\\hdashline[1pt/1pt]
+AAA&BBB&CCC\\\cdashline{1-2}[.4pt/1pt]
+\multicolumn{2}{|l;{2pt/2pt}}{AB}&C\\\hdashline\hdashline
+\end{tabular}
+\end{center}
+\section{RTL Mode}
+\begin{RTL}
+\begin{center}
+\begin{tabular}{|r::c;{2pt/2pt}l|}\hline
+A&B&C\\\hdashline[1pt/1pt]
+AAA&BBB&CCC\\\cdashline{1-2}[.4pt/1pt]
+\multicolumn{2}{|r;{2pt/2pt}}{AB}&C\\\hdashline\hdashline
+\end{tabular}
+\end{center}
+\end{RTL}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf b/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf
new file mode 100644
index 00000000000..7f2a8336f4f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-bidi.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-bidi.tex b/Master/texmf-dist/doc/latex/bidi/test-bidi.tex
new file mode 100644
index 00000000000..e81a1dc599b
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-bidi.tex
@@ -0,0 +1,43 @@
+\documentclass{article}
+\usepackage{bidi}
+\title{Testing Basic Bidi Direction Change}
+\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.
+\section{RTL Test}
+\setRTL
+\begin{flushleft}
+This is left in RTL
+\end{flushleft}
+\begin{flushright}
+This is right in RTL
+\end{flushright}
+\centerline{This is center in RTL}
+
+\leftline{This is left in RTL}
+
+\rightline{This is right in RTL}
+
+\raggedleft This is raggedleft in RTL
+
+\raggedright This is raggedright in RTL
+
+\setLTR
+\section{LTR Test}
+\begin{flushleft}
+This is left in LTR
+\end{flushleft}
+\begin{flushright}
+This is right in LTR
+\end{flushright}
+\centerline{This is center in LTR}
+
+\leftline{This is left in LTR}
+
+\rightline{This is right in LTR}
+
+\raggedleft This is raggedleft in LTR
+
+\raggedright This is raggedright in LTR
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf b/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf
new file mode 100644
index 00000000000..42956be42c8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-brochure.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-brochure.tex b/Master/texmf-dist/doc/latex/bidi/test-brochure.tex
new file mode 100644
index 00000000000..3066e0e4b41
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-brochure.tex
@@ -0,0 +1,360 @@
+\documentclass[a4paper]{report}
+
+\usepackage[landscape,margin=1in]{geometry}
+\usepackage{color}
+\usepackage[RL]{flowfram}% we enable `RL' option for RTL multicolumn typesetting (see flowfram package documentation)
+\usepackage[colorlinks,setpagesize=false]{hyperref}
+
+\usepackage[RTLdocument]{bidi}
+% adjust \textheight so that it is an integer multiple of
+% \baselineskip
+\adjustheight{\textheight}
+
+% set up pagelayout. One column for title page
+% two columns for the rest.
+\onecolumninarea[1,2]{0.6\textwidth}{\textheight}{0.4\textwidth}{0pt}
+\twocolumninarea[>2]{0.6\textwidth}{\textheight}{0.4\textwidth}{0pt}
+
+% Set up dynamic frame on the left. This is where
+% the headings will go.
+
+\newdynamicframe{0.4\textwidth}{\textheight}{0pt}{0pt}[left]
+
+% put the chapter headings in this frame
+\dfchaphead*{left}
+% Modify the default style
+\renewcommand{\DFchapterstyle}[1]{%
+\raggedright\Huge\slshape\MakeUppercase{#1}\par}
+
+% Make static frames for background (only for page 1)
+\vtwotone[1]{0.6\paperwidth}{[cmyk]{0.65,0.13,0,0}}{backleft}%
+{0.4\paperwidth}{[cmyk]{0.94,0.54,0,0}}{backright}
+
+% Make a border along the top of each page
+\vtwotonetop{1cm}{0.6\paperwidth}{[cmyk]{0.65,0.13,0,0}}{topleft}%
+{0.4\paperwidth}{[cmyk]{0.94,0.54,0,0}}{topright}
+
+% make a static frame for the logo
+\newstaticframe{0.2\textwidth}{0.25\textheight}{0pt}{0pt}[logo]
+
+% empty page style, because I am going to make my own
+\pagestyle{empty}
+
+% Each new chapter sets \thispagestyle{\chapterfirstpagestyle}, change this empty as well
+\renewcommand{\chapterfirstpagestyle}{empty}
+
+% Now make a frame in which to put my own customized footer
+\newdynamicframe[>1]{\textwidth}{\headheight}{0pt}{-\footskip}[footer]
+
+% set the contents of the frame:
+\setdynamiccontents*{footer}{%
+School of Computing Sciences, University of East Anglia\hfill
+http://www.cmp.uea.ac.uk/\hfill
+page \thepage\ of \pageref*{lastpage}}
+
+
+\newcommand{\env}[1]{\texttt{#1}}
+\newcommand{\cmdname}[1]{\texttt{\symbol{92}#1}}
+\newcommand{\meta}[1]{\textnormal{\textless\textit{#1}\textgreater}}
+
+\begin{document}
+
+% not a very interesting logo
+\setstaticcontents*{logo}{\sffamily{\Huge\slshape FLF} Flowfram}
+
+{\noindent
+\slshape\Huge\MakeUppercase{A Sample Brochure}\par
+\vskip0.5in
+\noindent\large\MakeUppercase{Nicola Talbot}\\
+}
+
+
+\chapter{Introduction}
+
+The \textsl{flowfram} package is designed to enable you to create
+frames in a document such that the
+contents of the \env{document} environment flow from one
+frame to the next in the order that they were defined.
+This is useful for creating posters
+or magazines or any other form of document that does not
+conform to the standard one or two column layout.
+
+This is a modified version of the manual for the \textsl{flowfram} package.
+It is intended to illustrated what can be done. See the full
+manual (ffuserguide.pdf) for
+a comprehensive description, as some parts of this document
+may now be out of date.
+If the columns are very narrow, it may be better to
+use \cmdname{raggedright}, otherwise \TeX\ may have a
+problem working out the line breaks.
+
+This is column~\thedisplayedframe.
+
+The main type of frame is the flow frame. This is described on
+column~\ref{flow:flowframe} on page~\pageref{flow:flowframe}.
+The order used to draw the contents of each frame on the page
+is described in column~\ref{flow:stacking} on
+page~\pageref{flow:stacking}. Floats are describe in
+column~\ref{flow:floats} on page~\pageref{flow:floats}.
+
+\chapter{Setting up Frames}
+
+This is column~\thedisplayedframe.
+
+The \textsl{flowfram} package provides three types of frame:
+{flow frames}, {static
+frames} and {dynamic frames}.
+
+\section*{Flow Frames}
+
+\labelflow{flow:flowframe}
+The flow frame is the principle type of frame.
+The text of the \env{document} environment will flow from
+one frame to the next in order of definition. Each
+flow frame has an associated width, height,
+position on the page, and optionally a border.
+
+It is recommended that all the flow frames in a document
+have the same width, otherwise problems may occur
+when a paragraph spans to flow frames of unequal
+widths. This is because \TeX's output routine does not
+register the change in \cmdname{hsize} until it reaches
+a paragraph break. If it is absolutely necessary for
+flow frames to have unequal widths, judicious use of
+\cmdname{framebreak} is required.
+
+\section*{Static Frames}
+
+A static frame is a rectangular area in which text neither
+flows into, nor flows out of. The contents must be set
+explicitly, and once set, the contents of the static frame will
+remain the same on each page until it is explicitly
+changed. Thus, a static frame can be used, for example, to make
+a company logo appear in the same place on every page.
+
+\section*{Dynamic Frames}
+
+A dynamic frame is similar to a static frame, but its contents
+are re-typeset on each page. (A static frame stores its
+contents in a savebox, whereas a dynamic frame stores its
+contents in a macro).
+
+This is column~\thedisplayedframe.
+
+\chapter{Frame Attributes}
+\label{sec:modattr}
+
+Once you have defined the {flow frames}, {static frames} and
+{dynamic frames}, their attributes can be changed.
+The three types of frame mostly have the
+same set of attributes, but some are specific to a certain type.
+The available attributes are as follows
+(\textsuperscript{\textbf{F}} indicates the key is
+only available for {flow frames},
+\textsuperscript{\textbf{S}} indicates the key is only available
+for {static frames}
+and \textsuperscript{\textbf{D}} indicates the key
+is only available for {dynamic frames}):
+
+\begin{description}
+\item[width=\meta{length}]\mbox{}\par The width of the frame.
+
+\item[height=\meta{length}]\mbox{}\par The height of the frame.
+
+\item[x=\meta{length}]\mbox{}\par The x-coordinate of the frame.
+
+\item[y=\meta{length}]\mbox{}\par The y-coordinate of the frame.
+
+\item[border=\meta{style}]\mbox{}\par The style of the border around the
+frame, this can take the values: \texttt{none} (no border),
+\texttt{plain} (plain border) or the name of a \LaTeX\
+frame making command without the preceding backslash.
+The value \texttt{fbox} is equivalent to \texttt{plain}.
+
+\item[offset=\meta{offset}]\mbox{}\par The border offset, if it is a
+user-defined border. This is the distance from the outer
+edge of the left hand border to the left edge of the
+bounding box of the text inside the border. The \textsl{flowfram}
+package is able to compute the border for
+known frame making commands.
+If you define your own frame making command, you may need to
+specify the offset explicitly, or the frames
+may end up shifted to the right or left.
+
+\item[bordercolor=\meta{colour}]\mbox{}\par The colour of the border
+if you are using a standard frame making command.
+The colour can either be specified as, e.g.\ \texttt{green},
+or including the colour model, for example
+\verb/[rgb]{0,1,0}/.
+
+\item[textcolor=\meta{colour}]\mbox{}\par The text colour for that
+frame. Again, the colour can either be specified as,
+e.g.\ \texttt{green}, or including the colour model,
+for example \verb/[rgb]{0,1,0}/.
+
+\item[pages=\meta{page list}]\mbox{}\par The {list of
+pages} for which the frame
+should appear. This can either have the values: \texttt{all},
+\texttt{even}, \texttt{odd} or \texttt{none} (the latter
+removes the frame from that point on---useful if you
+have multiple pages with the same number), or it can be a
+comma-separated list of single pages, or
+{page ranges}.
+
+\item[margin=\meta{side}\textsuperscript{F}]\mbox{}\par The side of
+the flow frame that its corresponding margin should go on. This
+can take the values \texttt{left} or \texttt{right}.
+
+\item[clear=\meta{boolean}\textsuperscript{S}] If this value
+is set, the static frame will be cleared at the start of the
+next page.
+
+\item[style=\meta{cmd}\textsuperscript{D}]\mbox{}\par This should be
+the name of a command \emph{without} the preceding backslash,
+to be applied to the contents of the specified dynamic frame.
+The command may either be a declaration, for example \verb/style=large/
+which will set the contents of all the dynamic frames in a
+large font, or it can be a command that takes a single argument,
+for example \verb/style=textbf/
+which will make the text for all the dynamic frames come out in
+bold. To unset a style, do \verb/style=none/.
+
+\end{description}
+
+\chapter{Miscellaneous}
+
+\section*{Page Layout}
+
+The \textsl{flowfram} package has the package option \texttt{draft}
+which will draw the {bounding boxes} for
+each frame defined. At the bottom right of each
+bounding box (except for the bounding box denoting the
+typeblock), a marker will be shown to indictate the type
+of frame, its IDN and its IDL.
+
+You can see the layout for the current page (irrespective of
+whether or not the \texttt{draft} option has been set) using
+the command:\newline
+\cmdname{flowframeshowlayout}
+
+The headers and footers will appear as usual (but will not
+be shown in draft mode), according to the format given by
+\cmdname{pagestyle}.
+
+\section*{Frame Stacking Order}
+
+\labelflow{flow:stacking}
+The material on each page is placed in the following order:
+\begin{enumerate}
+\item Each static frame defined for that page in ascending
+order of IDN.
+
+\item Each flow frame defined for that page in ascending
+order of IDN.
+
+\item Each dynamic frame defined for that page in ascending
+order of IDN.
+
+\item {Bounding boxes} if the \texttt{draft}
+package option has been used.
+\end{enumerate}
+
+This ordering can be used to determine if you want something
+to overlay or underlay everything else on the page.
+
+\section*{Prematurely Ending a Flow Frame}
+
+You can force text to move immediately to the next defined
+flow frame using one of the standard \LaTeX\ page breaking commands
+which work in an analogous way to the way they
+work in standard two column mode.
+
+The command \cmdname{framebreak} is provided for situations
+where a paragraph spans two flow frames
+of different widths, as \TeX's output routine does not
+adjust to the new value of \cmdname{hsize} until the last
+paragraph of the previous frame has ended. As a
+result, the end of the paragraph at the beginning of the new
+flow frame retains the width of the previous flow frame.
+
+If you want to start a new page, rather than simply move to the
+next frame, use the command\newline
+\cmdname{finishthispage}.
+
+\section*{Floats}
+
+\labelflow{flow:floats}
+Since floats (such as figures and tables) can only go in
+{flow frames}, this package provides
+the additional environments:
+\env{staticfigure} and
+\env{statictable} which can be used in static frames
+and dynamic frames. Unlike their \env{figure} and
+\env{table} counterparts, they are fixed in place, and
+so do not take an optional placement specifier. The
+\cmdname{caption} and \cmdname{label} commands can
+be used within \env{staticfigure} and \env{statictable} as
+usual.
+
+The standard \env{figure} and \env{table} commands will
+behave as usual in the flow frames, but their starred versions,
+\env{figure*} and \env{table*} behave no differently
+from \env{figure} and \env{table}.
+
+\section*{Global Values}
+
+The following macros can be changed using\linebreak \cmdname{renewcommand}:
+
+\begin{itemize}
+\item \cmdname{setffdraftcolor}
+
+This sets the colour of the bounding box
+when it is displayed in draft mode.
+
+\item
+\cmdname{setffdrafttypeblockcolor}
+
+This sets the colour of
+the bounding box of the typeblock when it is displayed
+in draft mode.
+
+\item \cmdname{fflabelfont}
+
+This sets the font size for the bounding box markers in
+draft mode.
+
+\end{itemize}
+
+The following are lengths, which can be changed using
+\cmdname{setlength}:
+
+\begin{itemize}
+\item \cmdname{fflabelsep}
+
+This is the distance from the right hand side of the
+bounding box at which to place the bounding box marker.
+
+\item \cmdname{flowframesep}
+
+This is the gap between the text of the frame and
+its border, for the standard border types.
+
+\item \cmdname{flowframerule}
+
+This is the width of the frame's border, if using
+a border given by a frame making command that uses \cmdname{fboxsep}
+to set its border width.
+
+\item \cmdname{columnsep}
+
+This is the horizontal distance between flow frames when using one of the
+\cmdname{Ncolumn} type of commands
+
+\item \cmdname{vcolumnsep}
+
+This is the vertical distance between the flow frames and the static or
+dynamic frame when using one of the \cmdname{Ncolumntop} type of commands.
+\end{itemize}
+
+\label{lastpage}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf b/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf
new file mode 100644
index 00000000000..6578ceb310d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-casualcv.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-casualcv.tex b/Master/texmf-dist/doc/latex/bidi/test-casualcv.tex
new file mode 100644
index 00000000000..b708d0f209f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-casualcv.tex
@@ -0,0 +1,71 @@
+\documentclass[11pt,a4paper]{bidimoderncv}
+\cvtheme[orange]{bidicasual} % you can use orange, red, green and blue as options
+\usepackage[scale=0.8]{geometry}
+\usepackage{fontspec}
+\usepackage[RTLdocument]{bidi}
+\def\refname{تألیفات}
+\setmainfont[Script=Arabic,Mapping=parsidigits]{XB Niloofar}
+\newfontfamily\rmfamily[Mapping=tex-text]{Linux Libertine}
+\AtBeginDocument{\recomputelengths}
+\resumename{رزومه}
+\firstname{سید محمد}
+\familyname{یزدی اصفهانی}
+\title{رزومهٔ من}
+\address{تهران، خیابان آزادی پلاک ۹}
+\mobile{۰۹۱۸۹۶۹۴۹۶}
+\phone{۹۸۹۰۸۳۴۱}
+\fax{۹۸۹۰۸۳۴۲}
+\email{vafakh84@gmail.com}
+\extrainfo{اطلاعات اضافی}
+\photo[64pt]{picture}
+\quote{نقل قول}
+\begin{document}
+\maketitle
+\section{تحصیلات}
+\cventry{سال--سال}{درجه}{دانشگاه}{شهر}{\textit{نمره}}{توضیح} % arguments 3 to 6 are optional
+\cventry{سال--سال}{درجه}{دانشگاه}{شهر}{\textit{نمره}}{توضیح} % arguments 3 to 6 are optional
+
+\section{پایان‌نامهٔ کارشناسی ارشد}
+\cvline{عنوان}{\emph{عنوان}}
+\cvline{استاد راهنما}{استاد راهنما}
+\cvline{توضیح}{\small چکیده کوچک پایان‌نامه}
+
+\section{تجربیات}
+\subsection{عنوان}
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح} % arguments 3 to 6 are optional
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح} % arguments 3 to 6 are optional
+\subsection{متفرقه}
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح خط ۱\newline{}توضیح خط ۲}% arguments 3 to 6 are optional
+
+\section{زبانها}
+\cvlanguage{زبان ۱}{درجه مهارت}{نظر}
+\cvlanguage{زبان ۲}{درجه مهارت}{نظر}
+\cvlanguage{زبان ۳}{درجه مهارت}{نظر}
+
+\section{مهارتهای رایانه‌ای}
+\cvcomputer{طبقه ۱}{یک، دو، سه}{طبقه ۴}{یک، دو، سه}
+\cvcomputer{طبقه ۲}{یک، دو، سه}{طبقه ۵}{یک، دو، سه}
+\cvcomputer{طبقه ۳}{یک، دو، سه}{طبقه ۶}{یک، دو، سه}
+
+\section{علاقه‌ها}
+\cvline{علاقه ۱}{\small توضیح}
+\cvline{علاقه ۲}{\small توضیح}
+\cvline{علاقه ۳}{\small توضیح}
+
+\renewcommand{\listitemsymbol}{-} % change the symbol for lists
+
+\section{بعدی ۱}
+\cvlistitem{شماره ۱}
+\cvlistitem{شماره ۲}
+\cvlistitem[+]{شماره ۳} % optional other symbol
+
+\section{بعدی ۲}
+\cvlistdoubleitem[\Neutral]{شماره ۱}{شماره ۴}
+\cvlistdoubleitem[\Neutral]{شماره ۲}{شماره ۵}
+\cvlistdoubleitem[\Neutral]{شماره ۳}{}
+
+\nocite{*}
+\bibliographystyle{plain}
+\bibliography{publications} % 'publications' is the name of a BibTeX file
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf b/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf
new file mode 100644
index 00000000000..1764e6a5a11
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-classiccv.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-classiccv.tex b/Master/texmf-dist/doc/latex/bidi/test-classiccv.tex
new file mode 100644
index 00000000000..16acfc76e69
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-classiccv.tex
@@ -0,0 +1,71 @@
+\documentclass[11pt,a4paper]{bidimoderncv}
+\cvtheme[green]{bidiclassic} % you can use orange, red, green, grey and blue as options
+\usepackage[scale=0.8]{geometry}
+\usepackage{fontspec}
+\setmainfont[Script=Arabic,Mapping=parsidigits]{XB Zar}
+\newfontfamily\rmfamily[Mapping=tex-text]{Linux Libertine}
+\def\refname{تألیفات}
+\usepackage[RTLdocument]{bidi}
+\AtBeginDocument{\recomputelengths}
+\resumename{رزومه}
+\firstname{وفا}
+\familyname{خلیقی}
+\title{رزومهٔ من}
+\address{تهران، خیابان آزادی پلاک ۹}
+\mobile{۰۹۱۸۹۶۹۴۹۶}
+\phone{۹۸۹۰۸۳۴۱}
+\fax{۹۸۹۰۸۳۴۲}
+\email{vafakh84@gmail.com}
+\extrainfo{اطلاعات اضافی}
+\photo[64pt]{picture}
+\quote{نقل قول}
+\begin{document}
+\maketitle
+\section{تحصیلات}
+\cventry{سال--سال}{درجه}{دانشگاه}{شهر}{\textit{نمره}}{توضیح} % arguments 3 to 6 are optional
+\cventry{سال--سال}{درجه}{دانشگاه}{شهر}{\textit{نمره}}{توضیح} % arguments 3 to 6 are optional
+
+\section{پایان‌نامهٔ کارشناسی ارشد}
+\cvline{عنوان}{\emph{عنوان}}
+\cvline{استاد راهنما}{استاد راهنما}
+\cvline{توضیح}{\small چکیده کوچک پایان‌نامه}
+
+\section{تجربیات}
+\subsection{عنوان}
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح} % arguments 3 to 6 are optional
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح} % arguments 3 to 6 are optional
+\subsection{متفرقه}
+\cventry{سال--سال}{نام شغل}{صاحب کار}{شهر}{}{توضیح خط ۱\newline{}توضیح خط ۲}% arguments 3 to 6 are optional
+
+\section{زبانها}
+\cvlanguage{زبان ۱}{درجه مهارت}{نظر}
+\cvlanguage{زبان ۲}{درجه مهارت}{نظر}
+\cvlanguage{زبان ۳}{درجه مهارت}{نظر}
+
+\section{مهارتهای رایانه‌ای}
+\cvcomputer{طبقه ۱}{یک، دو، سه}{طبقه ۴}{یک، دو، سه}
+\cvcomputer{طبقه ۲}{یک، دو، سه}{طبقه ۵}{یک، دو، سه}
+\cvcomputer{طبقه ۳}{یک، دو، سه}{طبقه ۶}{یک، دو، سه}
+
+\section{علاقه‌ها}
+\cvline{علاقه ۱}{\small توضیح}
+\cvline{علاقه ۲}{\small توضیح}
+\cvline{علاقه ۳}{\small توضیح}
+
+\renewcommand{\listitemsymbol}{-} % change the symbol for lists
+
+\section{بعدی ۱}
+\cvlistitem{شماره ۱}
+\cvlistitem{شماره ۲}
+\cvlistitem[+]{شماره ۳} % optional other symbol
+
+\section{بعدی ۲}
+\cvlistdoubleitem[\Neutral]{شماره ۱}{شماره ۴}
+\cvlistdoubleitem[\Neutral]{شماره ۲}{شماره ۵}
+\cvlistdoubleitem[\Neutral]{شماره ۳}{}
+
+\nocite{*}
+\bibliographystyle{plain}
+\bibliography{publications} % 'publications' is the name of a BibTeX file
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-color.pdf b/Master/texmf-dist/doc/latex/bidi/test-color.pdf
new file mode 100644
index 00000000000..22232053af4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-color.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-color.tex b/Master/texmf-dist/doc/latex/bidi/test-color.tex
new file mode 100644
index 00000000000..f2a9dcd7395
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-color.tex
@@ -0,0 +1,44 @@
+\documentclass{article}
+\usepackage{fontspec}
+\usepackage{xecolour} % for RTL coloured texts that spans more than a line
+\usepackage{fullpage}
+\usepackage{colortbl}
+\setmainfont[Scale=1,Script=Arabic,Mapping=farsidigits]{XB Kayhan}
+\usepackage{xcolor}
+\usepackage[RTLdocument]{bidi}
+\begin{document}
+این یک آزمایش است.
+
+\bigskip
+\fcolorbox{red}{yellow}{\begin{minipage}{0.8\textwidth}
+این یک متن است که من آن را داخل یک جعبهٔ زردرنگ قرار می‌دهم. این یک متن است که من آن را داخل یک جعبهٔ زردرنگ قرار می‌دهم
+\end{minipage}}
+
+این {\color{red} رنگ قرمز} است و این هم \textcolor{blue}{رنگ آبی} است همانطور که می‌بینید.
+
+\bigskip
+من اسم خودم {\color{red} وفا خلیقی} را با رنگ قرمز می‌نویسم.
+
+\bigskip
+من اسم خودم \textcolor{blue}{وفا خلیقی} را با رنگ آبی می‌نویسم.
+
+\bigskip
+\colorbox{yellow}{\begin{minipage}{0.8\textwidth}
+این یک متن است که من آن را داخل یک جعبهٔ زردرنگ قرار می‌دهم. این یک متن است که من آن را داخل یک جعبهٔ زردرنگ قرار می‌دهم
+\end{minipage}}
+
+\bigskip
+این یک پاراگراف با \blue{رنگ آبی اول است و همینطور و همینطور ما می‌توانیم از رنگاهی مختلف استفاده کنیم} و حالا
+\red{این روزها حجم اخبار و مطالب مرتبط با ایران و مسایل مربوط به آن بسیار زیاد شده وابزارهایی مانند گوگل ریدر برای مرور لیست بلند بالایی از سایتها و وبلاگ های به روز شده ، بیشتر مورد استفاده قرار میگیرد.} و حالا هم
+\darkred{یکی از مشکلاتی که در استفاده از گوگل ریدر داشتم، نامناسب بودن فونت فارسی آن بود. اگر چه عمده وبلاگها و سایتها از فونت تاهوما (مانند فونتی که این مطالب با آن نوشته شده است) استفاده می کنند اما تعدادی از وبلاگها از فونتهای دیگری که بعضی وقتها خیلی ریز هم هستند }استفاده می کنند که خواندن آن در گوگل ریدر بسیار دشوار است. متاسفانه در گوگل ریدر بخشی برای تغییر فونت وجود ندارد و نمیتوان نوع فونت یا اندازه مطالب آن را تغییر داد. بعد از کمی جستجو بر روی اینترنت راه حل جالبی را پیدا کردم که با کمی تغییر برای مطالب فارسی هم قابل استفاده است.
+اگر از فایرفاکس برای مرور مطالب جدید در گوگل ریدر استفاده می کنید، این راه حل را باری حل این مشکل به شما پیشنهاد میکنم
+
+\bigskip
+حالا نوبت جعبه‌های رنگی است یعنی مثلاً \colorbox{red}{{\color{white}سلام}} و \fcolorbox{yellow}{red}{{\color{white}این یک متن داخل جعبه رنگی است که کمی طولانی است}}
+
+
+
+
+
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf b/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf
new file mode 100644
index 00000000000..d6c4539b883
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-supertabular.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-supertabular.tex b/Master/texmf-dist/doc/latex/bidi/test-supertabular.tex
new file mode 100644
index 00000000000..af040d23c2c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-supertabular.tex
@@ -0,0 +1,116 @@
+\documentclass{article}
+\usepackage{supertabular}
+\usepackage{bidi}
+\title{Testing \textsf{supertabular} package in RTL and LTR}
+\author{Vafa Khalighi}
+\begin{document}
+\maketitle
+\section{LTR}
+\tablecaption{The ISOGRK3 entity set}
+\tablehead
+ {\bfseries Entity&\bfseries Unicode Name&\bfseries Unicode\\ \hline}
+\tabletail
+ {\hline \multicolumn{3}{r}{\emph{Continued on next page}}\\}
+\tablelasttail{\hline}
+\begin{supertabular}{lll}
+alpha & GREEK SMALL LETTER ALPHA & 03B1\\
+beta & GREEK SMALL LETTER BETA & 03B2\\
+chi & GREEK SMALL LETTER CHI & 03C7\\
+Delta & GREEK CAPITAL LETTER DELTA & 0394\\
+delta & GREEK SMALL LETTER DELTA & 03B4\\
+epsi & GREEK SMALL LETTER EPSILON & 03B5\\
+epsis & GREEK LUNATE EPSILON SYMBOL & 03F5\\
+\empty
+epsiv & GREEK SMALL LETTER EPSILON & 03B5\\
+eta & GREEK SMALL LETTER ETA & 03B7\\
+Gamma & GREEK CAPITAL LETTER GAMMA & 0393\\
+gamma & GREEK SMALL LETTER GAMMA & 03B3\\
+gammad & GREEK SMALL LETTER DIGAMMA & 03DD\\
+iota & GREEK SMALL LETTER IOTA & 03B9\\
+kappa & GREEK SMALL LETTER KAPPA & 03BA\\
+kappav & GREEK KAPPA SYMBOL & 03F0\\
+Lambda & GREEK CAPITAL LETTER LAMDA & 039B\\
+lambda & GREEK SMALL LETTER LAMDA & 03BB\\
+mu & GREEK SMALL LETTER MU & 03BC\\
+nu & GREEK SMALL LETTER NU & 03BD\\
+Omega & GREEK CAPITAL LETTER OMEGA & 03A9\\
+omega & GREEK SMALL LETTER OMEGA & 03C9\\
+Phi & GREEK CAPITAL LETTER PHI & 03A6\\
+phis & GREEK PHI SYMBOL & 03D5\\
+phiv & GREEK SMALL LETTER PHI & 03C6\\
+Pi & GREEK CAPITAL LETTER PI & 03A0\\
+pi & GREEK SMALL LETTER PI & 03C0\\
+piv & GREEK PI SYMBOL & 03D6\\
+Psi & GREEK CAPITAL LETTER PSI & 03A8\\
+psi & GREEK SMALL LETTER PSI & 03C8\\
+rho & GREEK SMALL LETTER RHO & 03C1\\
+rhov & GREEK RHO SYMBOL & 03F1\\
+Sigma & GREEK CAPITAL LETTER SIGMA & 03A3\\
+sigma & GREEK SMALL LETTER SIGMA & 03C3\\
+sigmav & GREEK SMALL LETTER FINAL SIGMA & 03C2\\
+tau & GREEK SMALL LETTER TAU & 03C4\\
+Theta & GREEK CAPITAL LETTER THETA & 0398\\
+thetas & GREEK SMALL LETTER THETA & 03B8\\
+thetav & GREEK THETA SYMBOL & 03D1\\
+Upsi & GREEK UPSILON WITH HOOK SYMBOL & 03D2\\
+upsi & GREEK SMALL LETTER UPSILON & 03C5\\
+Xi & GREEK CAPITAL LETTER XI & 039E\\
+xi & GREEK SMALL LETTER XI & 03BE\\
+zeta & GREEK SMALL LETTER ZETA & 03B6\\
+\end{supertabular}
+\section{RTL}
+
+\setRTL
+\tablecaption{The ISOGRK3 entity set}
+\tablehead
+ {\bfseries Entity&\bfseries Unicode Name&\bfseries Unicode\\ \hline}
+\tabletail
+ {\hline \multicolumn{3}{l}{\emph{Continued on next page}}\\}
+\tablelasttail{\hline}
+\begin{supertabular}{rrr}
+alpha & GREEK SMALL LETTER ALPHA & 03B1\\
+beta & GREEK SMALL LETTER BETA & 03B2\\
+chi & GREEK SMALL LETTER CHI & 03C7\\
+Delta & GREEK CAPITAL LETTER DELTA & 0394\\
+delta & GREEK SMALL LETTER DELTA & 03B4\\
+epsi & GREEK SMALL LETTER EPSILON & 03B5\\
+epsis & GREEK LUNATE EPSILON SYMBOL & 03F5\\
+\empty
+epsiv & GREEK SMALL LETTER EPSILON & 03B5\\
+eta & GREEK SMALL LETTER ETA & 03B7\\
+Gamma & GREEK CAPITAL LETTER GAMMA & 0393\\
+gamma & GREEK SMALL LETTER GAMMA & 03B3\\
+gammad & GREEK SMALL LETTER DIGAMMA & 03DD\\
+iota & GREEK SMALL LETTER IOTA & 03B9\\
+kappa & GREEK SMALL LETTER KAPPA & 03BA\\
+kappav & GREEK KAPPA SYMBOL & 03F0\\
+Lambda & GREEK CAPITAL LETTER LAMDA & 039B\\
+lambda & GREEK SMALL LETTER LAMDA & 03BB\\
+mu & GREEK SMALL LETTER MU & 03BC\\
+nu & GREEK SMALL LETTER NU & 03BD\\
+Omega & GREEK CAPITAL LETTER OMEGA & 03A9\\
+omega & GREEK SMALL LETTER OMEGA & 03C9\\
+Phi & GREEK CAPITAL LETTER PHI & 03A6\\
+phis & GREEK PHI SYMBOL & 03D5\\
+phiv & GREEK SMALL LETTER PHI & 03C6\\
+Pi & GREEK CAPITAL LETTER PI & 03A0\\
+pi & GREEK SMALL LETTER PI & 03C0\\
+piv & GREEK PI SYMBOL & 03D6\\
+Psi & GREEK CAPITAL LETTER PSI & 03A8\\
+psi & GREEK SMALL LETTER PSI & 03C8\\
+rho & GREEK SMALL LETTER RHO & 03C1\\
+rhov & GREEK RHO SYMBOL & 03F1\\
+Sigma & GREEK CAPITAL LETTER SIGMA & 03A3\\
+sigma & GREEK SMALL LETTER SIGMA & 03C3\\
+sigmav & GREEK SMALL LETTER FINAL SIGMA & 03C2\\
+tau & GREEK SMALL LETTER TAU & 03C4\\
+Theta & GREEK CAPITAL LETTER THETA & 0398\\
+thetas & GREEK SMALL LETTER THETA & 03B8\\
+thetav & GREEK THETA SYMBOL & 03D1\\
+Upsi & GREEK UPSILON WITH HOOK SYMBOL & 03D2\\
+upsi & GREEK SMALL LETTER UPSILON & 03C5\\
+Xi & GREEK CAPITAL LETTER XI & 039E\\
+xi & GREEK SMALL LETTER XI & 03BE\\
+zeta & GREEK SMALL LETTER ZETA & 03B6\\
+\end{supertabular}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf
new file mode 100644
index 00000000000..6da31ff5b8d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabular.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabular.tex b/Master/texmf-dist/doc/latex/bidi/test-tabular.tex
new file mode 100644
index 00000000000..826f38c3515
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabular.tex
@@ -0,0 +1,63 @@
+\documentclass{article}
+\usepackage{bidi}
+\title{Testing \LaTeX's Default Tabular in \textsf{RTL} and \textsf{LTR}}
+\author{Vafa Khalighi}
+\newcommand{\rb}[1]{\raisebox{1.5ex}[0mm]{#1}}
+\begin{document}
+\maketitle
+In this document we test \LaTeX's default tabular in \textsf{RTL} and \textsf{LTR}.
+\section{LTR}
+\begin{center}\small
+\begin{tabular}{|l||c|l|c|l|c|l|}
+\hline
+& \multicolumn{2}{c|}{6.15--7.15 pm} & \multicolumn{2}{c|}{7.20--8.20 pm}
+& \multicolumn{2}{c|}{8.30--9.30 pm} \\ \cline{2-7}
+&& Teacher && Teacher && Teacher \\ \cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Day} & \rb{Subj.} & Room & \rb{Subj.} & Room & \rb{Subj.} & Room\\
+ \hline\hline
+&& Dr.~Smith && Ms.~Clark && Mr.~Mills\\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Mon.} & \rb{UNIX} & Comp. Ctr & \rb{Fortran} & Hall A
+ & \rb{Math.} & Hall A \\ \hline
+&& Miss Baker && Ms.~Clark && Mr.~Mill\\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Tues.} & \rb{\LaTeX} & Conf.~Room & \rb{Fortran} & Conf~Room
+ & \rb{Math.} & Hall A \\ \hline
+&& Dr.~Smith && Dr.~Jones && Dr.~Jones \\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Wed.} & \rb{UNIX} & Comp. Ctr & \rb{C} & Hall A
+ & \rb{ComSci.} & Hall A \\ \hline
+&& Miss Baker && Ms. Clark & \multicolumn{2}{c|}{} \\
+\cline{3-3}\cline{5-5}
+\rb{Fri.} & \rb{\LaTeX} & Conf.~Room & \rb{C++} & Conf.~Room
+& \multicolumn{2}{c|}{\rb{canceled}}\\ \hline
+\end{tabular}\end{center}
+\section{RTL}
+
+\setRTL
+\begin{center}\small
+\begin{tabular}{|r||c|r|c|r|c|r|}
+\hline
+& \multicolumn{2}{c|}{6.15--7.15 pm} & \multicolumn{2}{c|}{7.20--8.20 pm}
+& \multicolumn{2}{c|}{8.30--9.30 pm} \\ \cline{2-7}
+&& Teacher && Teacher && Teacher \\ \cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Day} & \rb{Subj.} & Room & \rb{Subj.} & Room & \rb{Subj.} & Room\\
+ \hline\hline
+&& Dr.~Smith && Ms.~Clark && Mr.~Mills\\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Mon.} & \rb{UNIX} & Comp. Ctr & \rb{Fortran} & Hall A
+ & \rb{Math.} & Hall A \\ \hline
+&& Miss Baker && Ms.~Clark && Mr.~Mill\\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Tues.} & \rb{\LaTeX} & Conf.~Room & \rb{Fortran} & Conf~Room
+ & \rb{Math.} & Hall A \\ \hline
+&& Dr.~Smith && Dr.~Jones && Dr.~Jones \\
+\cline{3-3}\cline{5-5}\cline{7-7}
+\rb{Wed.} & \rb{UNIX} & Comp. Ctr & \rb{C} & Hall A
+ & \rb{ComSci.} & Hall A \\ \hline
+&& Miss Baker && Ms. Clark & \multicolumn{2}{c|}{} \\
+\cline{3-3}\cline{5-5}
+\rb{Fri.} & \rb{\LaTeX} & Conf.~Room & \rb{C++} & Conf.~Room
+& \multicolumn{2}{c|}{\rb{canceled}}\\ \hline
+\end{tabular}\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf
new file mode 100644
index 00000000000..0e95eaa1d03
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabularx.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabularx.tex b/Master/texmf-dist/doc/latex/bidi/test-tabularx.tex
new file mode 100644
index 00000000000..719c266896f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabularx.tex
@@ -0,0 +1,40 @@
+\documentclass{article}
+\usepackage{tabularx}
+\usepackage{bidi}
+\title{Testing \textsf{tabularx} Package in RTL and LTR}
+\author{Vafa Khalighi}
+\begin{document}
+\maketitle
+\section{LTR}
+\begin{tabularx}{\linewidth}{|l|p{1.25cm}|p{1.5cm}|X|}\hline
+\multicolumn{1}{|c|}{\textbf{Animal}}
+ & \textbf{Hair Colour}
+ & \multicolumn{2}{c|}{\textbf{Favourite foods}} \\\hline\hline
+Elephant & Gray & Peanuts
+ & Unshelled, prepared in Sea Salt, and warmed over hot stone grill \\\cline{3-4}
+ & & Cabbage and Greens
+ & Sun dried until lightly browned (2-3 days minimum);
+ seasoned with Hyperchem super feed \\\cline{4-4}
+ & & & Boiled to British standard \\\hline\hline
+Lion & Yellow & Elephants & Tartare \\\cline{4-4}
+& & & Must be served warm, with no trace of
+ buckshot. Gaiminess considered desireable. \\\hline
+\end{tabularx}
+\section{RTL}
+
+\setRTL
+\begin{tabularx}{\linewidth}{|r|p{1.25cm}|p{1.5cm}|X|}\hline
+\multicolumn{1}{|c|}{\textbf{Animal}}
+ & \textbf{Hair Colour}
+ & \multicolumn{2}{c|}{\textbf{Favourite foods}} \\\hline\hline
+Elephant & Gray & Peanuts
+ & Unshelled, prepared in Sea Salt, and warmed over hot stone grill \\\cline{3-4}
+ & & Cabbage and Greens
+ & Sun dried until lightly browned (2-3 days minimum);
+ seasoned with Hyperchem super feed \\\cline{4-4}
+ & & & Boiled to British standard \\\hline\hline
+Lion & Yellow & Elephants & Tartare \\\cline{4-4}
+& & & Must be served warm, with no trace of
+ buckshot. Gaiminess considered desireable. \\\hline
+\end{tabularx}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf b/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf
new file mode 100644
index 00000000000..425eb03bfc7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabulary.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test-tabulary.tex b/Master/texmf-dist/doc/latex/bidi/test-tabulary.tex
new file mode 100644
index 00000000000..81067943c49
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test-tabulary.tex
@@ -0,0 +1,30 @@
+\documentclass{article}
+\usepackage{tabulary}
+\setlength\tymin{10pt}
+\setlength\tymax{\maxdimen}
+\usepackage{bidi}
+\title{Testing \textsf{tabulary} package in RTL and LTR}
+\author{Vafa Khalighi}
+\begin{document}
+\maketitle
+\section{LTR}
+\begin{tabulary}{200pt}{|C|C|C|C|}
+ a & b b b b &
+ c c c c c c c c c c c c c c c c c c &
+ d d d d d d d d d d d d d d d d d d
+\empty
+ d d d d d d d d d d d d d d
+ d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d
+ \end{tabulary}
+\section{RTL}
+
+\setRTL
+\begin{tabulary}{200pt}{|C|C|C|C|}
+ a & b b b b &
+ c c c c c c c c c c c c c c c c c c &
+ d d d d d d d d d d d d d d d d d d
+\empty
+ d d d d d d d d d d d d d d
+ d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d
+ \end{tabulary}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf b/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf
new file mode 100644
index 00000000000..ddb4b770f07
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test1-colortbl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-colortbl.tex b/Master/texmf-dist/doc/latex/bidi/test1-colortbl.tex
new file mode 100644
index 00000000000..97f20871db1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test1-colortbl.tex
@@ -0,0 +1,47 @@
+\documentclass{article}
+\usepackage{fontspec}
+\setmainfont[Mapping=farsidigits,Script=Arabic]{XB Kayhan}
+\usepackage{hhline}
+\usepackage{colortbl}
+\usepackage[RTLdocument]{bidi}
+\begin{document}
+این فقط یک آزمایش است
+\begin{center}
+\setlength\arrayrulewidth{5pt}
+\setlength\doublerulesep{5pt}
+ \renewcommand{\arraystretch}{2}
+ \definecolor{orange}{cmyk}{0,0.61,0.87,0}
+ \definecolor{indigo}{cmyk}{0.8,0.9,0,0}
+ \definecolor{violet}{cmyk}{0.6,0.9,0,0}
+ \newcommand\rainbowline[1]{%
+ \hhline{%
+ >{\arrayrulecolor {red}\doublerulesepcolor[rgb]{.3,.3,1}}%
+ |#1:=%
+ >{\arrayrulecolor{orange}\doublerulesepcolor[rgb]{.4,.4,1}}%
+ =%
+ >{\arrayrulecolor{yellow}\doublerulesepcolor[rgb]{.5,.5,1}}%
+ =%
+ >{\arrayrulecolor {green}\doublerulesepcolor[rgb]{.6,.6,1}}%
+ =%
+ >{\arrayrulecolor {blue}\doublerulesepcolor[rgb]{.7,.7,1}}%
+ =%
+ >{\arrayrulecolor{indigo}\doublerulesepcolor[rgb]{.8,.8,1}}%
+ =%
+ >{\arrayrulecolor{violet}\doublerulesepcolor[rgb]{.9,.9,1}}%
+ =:#1|%
+ }}
+ \arrayrulecolor{red}
+ \doublerulesepcolor[rgb]{.3,.3,1}
+ \begin{tabular}{||*7{>{\columncolor[gray]{.9}}c}||}
+ \rainbowline{t}%
+ \arrayrulecolor{violet}\doublerulesepcolor[rgb]{.9,.9,1}
+ وفا&خلیقی&یک&دانشجوی&ریاضی&است&
+ \multicolumn{1}{>{\columncolor[gray]{.9}}c||}{حرف آخر}\\
+ \rainbowline{}%
+ 1&2&3&4&5&6&
+ \multicolumn{1}{>{\columncolor[gray]{.9}}c||}{7}\\
+ \rainbowline{b}%
+ \end{tabular}
+ \end{center}
+این صرفاً یک آزمایش است
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf
new file mode 100644
index 00000000000..2e2047a40aa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.tex b/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.tex
new file mode 100644
index 00000000000..a0fd4b7f8e5
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test1-wrapfig.tex
@@ -0,0 +1,40 @@
+\documentclass{article}
+\usepackage{wrapfig}
+\usepackage{bidi}
+\newcommand\sample{Some text for our page
+ that might get reused over and over again. }
+\begin{document}
+\section{LTR}
+The starting place for the wrapfigure
+environment was manually determined in
+the current ex-
+
+\begin{wrapfigure}[7]{r}[0.2\width]{0pt}
+ \centering
+ \fbox{This is ``wrapfigure''.}
+ \caption{An example of the
+ \texttt{wrapfigure} environment}
+\end{wrapfigure}
+sample by first setting the text without
+the figure to find the linebreaks.
+
+\sample \sample \sample\sample \sample \sample\sample
+
+\section{RTL}
+
+\setRTL
+The starting place for the wrapfigure
+environment was manually determined in
+the current ex-
+
+\begin{wrapfigure}[7]{l}[0.2\width]{0pt}
+ \centering
+ \fbox{This is ``wrapfigure''.}
+ \caption{An example of the
+ \texttt{wrapfigure} environment}
+\end{wrapfigure}
+sample by first setting the text without
+the figure to find the linebreaks.
+
+\sample \sample \sample\sample \sample \sample\sample
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf b/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf
new file mode 100644
index 00000000000..d682c51ce15
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test2-colortbl.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-colortbl.tex b/Master/texmf-dist/doc/latex/bidi/test2-colortbl.tex
new file mode 100644
index 00000000000..63b50618837
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test2-colortbl.tex
@@ -0,0 +1,28 @@
+\documentclass{article}
+\usepackage{fullpage}
+\usepackage{fontspec}
+\usepackage{colortbl}
+\setmainfont[Scale=1,Script=Arabic,Mapping=farsidigits]{XB Kayhan}
+\usepackage[RTLdocument]{bidi}
+\begin{document}
+این فقط یک آزمایش است
+
+\setlength{\extrarowheight}{2mm}
+\setlength{\tabcolsep}{2mm}
+\begin{center}
+\begin{tabular}{|l|%
+>{\columncolor{yellow}}c|c|>{\columncolor{yellow}}c|c|%
+>{\columncolor{red}\bfseries}c<{\textsc{GBP}}|}
+\hline
+\multicolumn{3}{>{\columncolor{red}}r}{\color{white}\textbf{لَنْدَنْ}}
+&\multicolumn{3}{>{\columncolor{red}}l}{\color{white}\textbf{قیمت}}
+\\[1pt]
+\hline
+سیدنی & OG4G &سشنبه ۱۰ اکتبر &دوشنبه ۲۱ اکتبر یا ۲۸‌ام &11 یا ۱۸ روز &999\\
+& &سشنبه ۱۷ اکتبر &دوشنبه ۲۱ اکتبر یا ۲۸‌ام & 4 یا ۱۱ روز &999\\
+& OG7A &یکشنبه ۱۱ اکتبر &دوشنبه ۲۱ اکتبر یا ۲۸‌ام & 8 یا ۱۵ روز &999\\
+& &یکشنبه ۲۰ اکتبر &دوشنبه ۲۸ اکتبر & 8 روز &999\\
+\hline
+\end{tabular}
+\end{center}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf
new file mode 100644
index 00000000000..e915bd611be
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.tex b/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.tex
new file mode 100644
index 00000000000..ab655dac412
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test2-wrapfig.tex
@@ -0,0 +1,28 @@
+\documentclass{article}
+\usepackage{wrapfig}
+\usepackage{bidi}
+\newcommand\sample{Some text for our page
+ that might get reused over and over again. }
+\begin{document}
+\section{LTR}
+\begin{wraptable}[4]{l}{4cm}
+ \centering
+\fbox{This is ``wraptable''.}
+ \caption{The Caption}\label{T1}
+\end{wraptable}
+
+\sample \sample Reference to Table~\ref{T1}.
+\sample
+
+\section{RTL}
+\setRTL
+
+\begin{wraptable}[4]{r}{4cm}
+ \centering
+\fbox{This is ``wraptable''.}
+ \caption{The Caption}\label{T2}
+\end{wraptable}
+
+\sample \sample Reference to Table~\ref{T2}.
+\sample
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf b/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf
new file mode 100644
index 00000000000..cf73f50ea25
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.tex b/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.tex
new file mode 100644
index 00000000000..4a61ff65f76
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bidi/test3-wrapfig.tex
@@ -0,0 +1,77 @@
+\documentclass[a4paper,12pt]{article}
+
+\usepackage{graphicx}
+\usepackage{wrapfig}
+\usepackage{bidi}
+\begin{document}
+\section{LTR}
+\subsection*{Wrapfig test}
+
+
+Gulls are birds in the family Laridae. They are most closely
+ related to the terns (family Sternidae), auks and skimmers,
+and more distantly to the waders. Most gulls belong to the
+large genus Larus.
+
+\begin{wrapfigure}{r}{0.5\textwidth}
+ \begin{center}
+ \includegraphics[width=0.48\textwidth]{gull}
+ \end{center}
+ \caption{A gull}
+\end{wrapfigure}
+
+They are in general medium to large birds, typically grey or white,
+often with black markings on the head or wings. They have stout,
+longish bills and webbed feet.
+
+Most gulls, particularly Larus species, are ground nesting carnivores,
+which will take live food or scavenge opportunistically. The live food
+often includes crabs and small fish. Apart from the kittiwakes, gulls
+are typically coastal or inland species, rarely venturing far out to sea.
+The large species take up to four years to attain full adult plumage,
+but two years is typical for small gulls.
+
+Gulls---the larger species in particular---are resourceful and
+highly intelligent birds, demonstrating complex methods of communication
+and a highly developed social structure. Certain species (e.g. the
+Herring Gull) have exhibited tool use behaviour. Many species of gull have
+learned to co-exist successfully with man and have thrived in human habitats.
+Others rely on kleptoparasitism to get their food.
+
+\newpage
+\section{RTL}
+
+\setRTL
+\subsection*{Wrapfig test}
+
+
+Gulls are birds in the family Laridae. They are most closely
+ related to the terns (family Sternidae), auks and skimmers,
+and more distantly to the waders. Most gulls belong to the
+large genus Larus.
+
+\begin{wrapfigure}{l}{0.5\textwidth}
+ \begin{center}
+ \includegraphics[width=0.48\textwidth]{gull}
+ \end{center}
+ \caption{A gull}
+\end{wrapfigure}
+
+They are in general medium to large birds, typically grey or white,
+often with black markings on the head or wings. They have stout,
+longish bills and webbed feet.
+
+Most gulls, particularly Larus species, are ground nesting carnivores,
+which will take live food or scavenge opportunistically. The live food
+often includes crabs and small fish. Apart from the kittiwakes, gulls
+are typically coastal or inland species, rarely venturing far out to sea.
+The large species take up to four years to attain full adult plumage,
+but two years is typical for small gulls.
+
+Gulls---the larger species in particular---are resourceful and
+highly intelligent birds, demonstrating complex methods of communication
+and a highly developed social structure. Certain species (e.g. the
+Herring Gull) have exhibited tool use behaviour. Many species of gull have
+learned to co-exist successfully with man and have thrived in human habitats.
+Others rely on kleptoparasitism to get their food.
+\end{document}