diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-25 22:54:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-25 22:54:38 +0000 |
commit | 2a92a6832a61207bb75fc1c5d17cd692137a11be (patch) | |
tree | 3ec6dd7382a05e7532970577f6f92607d14e3ec6 /Master/texmf-dist/source/xelatex | |
parent | 4689c7acddfa64375a78e6703a6c2671131e3628 (diff) |
bidi (25apr15)
git-svn-id: svn://tug.org/texlive/trunk@37050 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r-- | Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 108 | ||||
-rw-r--r-- | Master/texmf-dist/source/xelatex/bidi/bidi.ins | 1 |
2 files changed, 91 insertions, 18 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index d9a9a0dc120..3ec5e48861e 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx +++ b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx @@ -5,7 +5,7 @@ %<*readme> ___________________ The bidi package -v16.9 +v17 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX, using XeTeX engine. @@ -25,7 +25,7 @@ a minimal working example showing the issue, and always choose the appropriate label for your query (i.e. if you are reporting any bugs, choose `Bug' label). -Current version release date: 2015/02/17 +Current version release date: 2015/04/25 ___________________ Vafa Khalighi @@ -61,6 +61,7 @@ by Vafa Khalighi. \endpreamble \askforoverwritefalse +\generate{\file{adjmulticol-xetex-bidi.def}{\from{\jobname.dtx}{table,adjmulticol-xetex-bidi.def}}} \generate{\file{algorithm2e-xetex-bidi.def}{\from{\jobname.dtx}{table,algorithm2e-xetex-bidi.def}}} \generate{\file{amsart-xetex-bidi.def}{\from{\jobname.dtx}{table,amsart-xetex-bidi.def}}} \generate{\file{amsbook-xetex-bidi.def}{\from{\jobname.dtx}{table,amsbook-xetex-bidi.def}}} @@ -318,7 +319,7 @@ by Vafa Khalighi. %\changes{v13.9}{2013/09/23}{Added implementaion of the package.} % \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\ %\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt] -%\large Documentation for \textcolor{blue!65!black}{version 16.9}} +%\large Documentation for \textcolor{blue!65!black}{version 17}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -329,7 +330,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 16.9}} +%Documentation for \textcolor{blue!65!black}{version 17}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -380,7 +381,7 @@ by Vafa Khalighi. %* %* Copyright (c) 2009--2015 Vafa Khalighi %* -%* 2015/02/17, v16.9 +%* 2015/04/25, v17 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1137,7 +1138,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{44160} +%% \CheckSum{44308} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -1292,6 +1293,48 @@ by Vafa Khalighi. % %\iffalse %</amsart-xetex-bidi.def> +%<*adjmulticol-xetex-bidi.def> +%\fi +% \subsection{\textsf{adjmulticol-xetex-bidi.def}} +% \begin{macrocode} +\ProvidesFile{adjmulticol-xetex-bidi.def}[2015/04/25 v0.1 bidi adaptations for adjmulticol package for XeTeX engine] +\def\adjmulticols#1#2#3{\col@number#1\relax + \def\@tempa{#2}% + \ifx\@tempa\@empty\adjmc@inner\z@\else\adjmc@inner#2\fi + \def\@tempa{#3}% + \ifx\@tempa\@empty\adjmc@outer\z@\else\adjmc@outer#3\fi + \ifnum\col@number<\@ne + \PackageWarning{adjmulticol}% + {Using `\number\col@number' + columns doesn't seem a good idea.^^J + I therefore use one columns instead}% + \col@number\@ne\fi + \ifnum\col@number>10 + \PackageError{adjmulticol}% + {Too many columns}% + {Current implementation doesn't + support more than 10 columns.% + \MessageBreak + I therefore use 10 columns instead}% + \col@number10 \fi + \ifx\@footnotetext\mult@footnotetext\else + \let\orig@footnotetext\@footnotetext + \let\@footnotetext\mult@footnotetext + \fi + \ifx\@LTRfootnotetext\mult@LTRfootnotetext\else + \let\orig@LTRfootnotetext\@LTRfootnotetext + \let\@LTRfootnotetext\mult@LTRfootnotetext + \fi + \ifx\@RTLfootnotetext\mult@RTLfootnotetext\else + \let\orig@RTLfootnotetext\@RTLfootnotetext + \let\@RTLfootnotetext\mult@RTLfootnotetext + \fi + \@ifnextchar[\adjmult@cols{\adjmult@cols[]}} +\let\adjmc@page@sofar@orig=\page@sofar +% \end{macrocode} +% +%\iffalse +%</adjmulticol-xetex-bidi.def> %<*algorithm2e-xetex-bidi.def> %\fi % \subsection{\textsf{algorithm2e-xetex-bidi.def}} @@ -2717,8 +2760,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2015/02/17} -\def\bidiversion{v16.9} +\def\bididate{2015/04/25} +\def\bidiversion{v17} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -2840,7 +2883,7 @@ Bidirectional typesetting in plain TeX and LaTeX] %\fi % \subsection{\textsf{bidi.tex}} % \begin{macrocode} -\def\bididate{2015/02/17} +\def\bididate{2015/04/25} \def\bidiversion{v0.2} \catcode`@=11 \let \protect \relax @@ -6404,7 +6447,41 @@ bidi implementation of tufte title] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bidipoem}% -[2014/02/05 v0.7 Environments for typesetting Persian traditional and modern poems] +[2014/04/25 v0.8 Environments for typesetting Persian traditional and modern poems] +\newcommand*{\bidipoem@spreadbox}[2]{\hbox to #1{#2}} + +% define the layout, verses will be centered + +\newdimen \bidipoem@hvlen \newdimen \bidipoem@hvsep +\newdimen \bidipoem@hvind \newdimen \bidipoem@@hvlen + +\newcommand*{\Setversedim}[2]{% set lengths of half-verse, [separation] +\bidipoem@hvind \textwidth +\bidipoem@hvlen #1\relax \advance \bidipoem@hvind -\bidipoem@hvlen +\ifx [#2\def \bidipoem@next {\bidipoem@set@verseI [}\else +\bidipoem@@hvlen \bidipoem@hvlen \def \bidipoem@next {\bidipoem@set@@verse {#2}}\fi \bidipoem@next } + +\def \bidipoem@set@verseI [#1]{% optional parameter +\bidipoem@@hvlen #1\relax \bidipoem@set@@verse } + +\newcommand*{\bidipoem@set@@verse}[1]{% separation +\advance \bidipoem@hvind -\bidipoem@@hvlen \bidipoem@hvsep #1\relax +\advance \bidipoem@hvind -\bidipoem@hvsep \divide \bidipoem@hvind 2 } + +\newcommand*{\traditionalconnverses}[3]{% first half-verse, connection, second half-verse +\ifdim 0pt > \bidipoem@hvind % +\bidipoem@spreadbox \bidipoem@hvlen {#1}\\ \hfill % first block +\else +\noindent \hskip \bidipoem@hvind \relax \bidipoem@spreadbox \bidipoem@hvlen {#1}\fi +\bidipoem@spreadbox \bidipoem@hvsep {#2}% separator +\bidipoem@spreadbox \bidipoem@@hvlen {#3}% second block +\par } + +% macro for two half verses +\newcommand*{\traditionalhalfverses}[2]{% normal case +\traditionalconnverses {#1}{\hfill}{#2}} + + {\catcode`\^^M=\active % these lines must end with % \gdef\traditionalpoem@obeylines{\catcode`\^^M\active \let^^M\traditionalpoem@par}% \global\let^^M\traditionalpoem@par} % this is in case ^^M appears in a \write @@ -13125,7 +13202,7 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{listings-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{listings-xetex-bidi.def}[2015/02/01 v0.7 bidi adaptations for listings package for XeTeX engine] +\ProvidesFile{listings-xetex-bidi.def}[2015/04/25 v0.8 bidi adaptations for listings package for XeTeX engine] \lst@Key{captiondirection}{textdirection}{% \lstKV@SwitchCases{#1}% {textdirection&\\% @@ -13164,13 +13241,7 @@ bidi implementation of tufte title] {\protect\numberline{\thelstlisting}\lst@@caption}% }{% \begingroup% -\ifnum\bidi@lst@caption@direction=\z@% - \@RTLfalse% -\else% - \ifnum\bidi@lst@caption@direction=\@ne% - \@RTLtrue% - \fi% -\fi% + \bidi@lst@ensure@caption@direction{\@RTLfalse}{\@RTLtrue}% \addcontentsline{lol}{lstlisting}% {\protect\numberline{\thelstlisting}\lst@@caption}% \endgroup% @@ -19625,6 +19696,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \@ifpackageloaded{arydshln}{\input{arydshln-xetex-bidi.def}}{} \@ifpackageloaded{mdframed}{\input{mdframed-xetex-bidi.def}}{} \@ifpackageloaded{multicol}{\input{multicol-xetex-bidi.def}}{} +\@ifpackageloaded{adjmulticol}{\input{adjmulticol-xetex-bidi.def}}{} \@ifpackageloaded{multienum}{\input{multienum-xetex-bidi.def}}{} \@ifpackageloaded{natbib}{\input{natbib-xetex-bidi.def}}{} \@ifpackageloaded{newfloat}{\input{newfloat-xetex-bidi.def}}{} diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.ins b/Master/texmf-dist/source/xelatex/bidi/bidi.ins index c4693217630..eb110f8269d 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi.ins +++ b/Master/texmf-dist/source/xelatex/bidi/bidi.ins @@ -33,6 +33,7 @@ \endpreamble \askforoverwritefalse +\generate{\file{adjmulticol-xetex-bidi.def}{\from{\jobname.dtx}{table,adjmulticol-xetex-bidi.def}}} \generate{\file{algorithm2e-xetex-bidi.def}{\from{\jobname.dtx}{table,algorithm2e-xetex-bidi.def}}} \generate{\file{amsart-xetex-bidi.def}{\from{\jobname.dtx}{table,amsart-xetex-bidi.def}}} \generate{\file{amsbook-xetex-bidi.def}{\from{\jobname.dtx}{table,amsbook-xetex-bidi.def}}} |