diff options
author | Karl Berry <karl@freefriends.org> | 2014-01-29 22:39:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-01-29 22:39:57 +0000 |
commit | 165fe25f93e0efdd87ed408f2bbfce3d09b1b683 (patch) | |
tree | 0cb18dfaaf01bf09cb4952304954491085852657 /Master/texmf-dist/source/xelatex/bidi/bidi.dtx | |
parent | 4e4505c50983a9ff5f1b1f4269326cf97f121a90 (diff) |
bidi (29jan14)
git-svn-id: svn://tug.org/texlive/trunk@32819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')
-rw-r--r-- | Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 54 |
1 files changed, 38 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 55ca25c921b..984ef502c9c 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 -v14.4 +v14.5 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX, using XeTeX engine. @@ -24,7 +24,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: 2013/11/16 +Current version release date: 2014/02/01 ___________________ Vafa Khalighi @@ -256,7 +256,7 @@ by Vafa Khalighi. % Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} -% \date{\today\qquad Version 14.4} +% \date{\today\qquad Version 14.5} %\maketitle %\vskip 0pt plus 3fill %\fbox{% @@ -296,7 +296,7 @@ by Vafa Khalighi. %* %* Copyright © 2009–2013 Vafa Khalighi %* -%* 2013/11/16, v14.4 +%* 2014/02/01, v14.5 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1116,7 +1116,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{42007} +%% \CheckSum{42075} %% \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 @@ -2647,8 +2647,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2013/11/16} -\def\bidiversion{v14.4} +\def\bididate{2014/02/01} +\def\bidiversion{v14.5} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -2729,7 +2729,7 @@ Bidirectional typesetting in plain TeX and LaTeX] %\fi % \subsection{\textsf{bidi.tex}} % \begin{macrocode} -\def\bididate{2013/11/16} +\def\bididate{2014/02/01} \def\bidiversion{v0.2} \catcode`@=11 \let \protect \relax @@ -5717,7 +5717,13 @@ bidi implementation of tufte title] % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bidipoem}% -[2013/11/12 v0.5 Environments for typesetting Persian traditional and modern poems] +[2014/02/01 v0.6 Environments for typesetting Persian traditional and modern poems] +{\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 +{\catcode`\^^M=\active % these lines must end with % + \gdef\modernpoem@obeylines{\catcode`\^^M\active \let^^M\modernpoem@par}% + \global\let^^M\modernpoem@par} % this is in case ^^M appears in a \write \def\poemcolsepskip{.1\versewidth plus .1\versewidth minus .05\versewidth} \def\poemmarginskip{1em plus 1fil minus 1em} \def\poemextrabaselineskip{0\baselineskip} @@ -5783,7 +5789,7 @@ bidi implementation of tufte title] \crcr\egroup \vskip-\baselineskip } -\def\oldpoem@cr{% +\def\traditionalpoem@cr{% \cr\poem@line } \newbox\verse@i @@ -5807,7 +5813,7 @@ bidi implementation of tufte title] \fi \poem@lineend \nopagebreak - \endgraf + \par \vskip\poemextrabaselineskip \fi \poem@lineparsebegin @@ -5835,8 +5841,8 @@ bidi implementation of tufte title] \widowpenalty=10000% No break between verses of the same line. \clubpenalty=10000% Same as above. Not really needed. \def\newblock{\hfil\poemblocksep\hfil\null}% -\def\par{\oldpoem@cr}% Redefine \par for possible \obeylines -\def\\{\global\poem@startedtrue\oldpoem@cr}% +\def\traditionalpoem@par{\traditionalpoem@cr}% Redefine \par for possible \obeylines +\def\\{\global\poem@startedtrue\traditionalpoem@cr}% \global\poem@startedfalse \csname poem@obeylines\endcsname \let\poem@obeylines\relax @@ -5856,6 +5862,14 @@ bidi implementation of tufte title] \par \vskip\baselineskip \poemskip + \if@noparlist \else + \ifdim\lastskip >\z@ + \@tempskipa\lastskip \vskip -\lastskip + \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip + \vskip\@tempskipa + \fi + \@endparenv + \fi \ifdim\new@poem@width<\poem@width \global\let\poem@needrun\relax \fi @@ -5907,7 +5921,7 @@ bidi implementation of tufte title] \newenvironment{traditionalpoem}{\@traditionalpoem}{\@endtraditionalpoem} -\expandafter\def\csname traditionalpoem*\endcsname{\let\poem@obeylines=\obeylines\traditionalpoem} +\expandafter\def\csname traditionalpoem*\endcsname{\let\poem@obeylines=\traditionalpoem@obeylines\traditionalpoem} \expandafter\def\csname endtraditionalpoem*\endcsname{\endtraditionalpoem} \def\poem@finish{% \poem@write@aux{max@poem@no}{\number\c@poem@no}% @@ -5935,7 +5949,7 @@ bidi implementation of tufte title] \def\]{\@tabminus\ignorespaces}% \def\newblock{\poemblocksep}% \let\newpoem@tabcr\@tabcr -\def\par{% Redefine \par for possible \obeylines +\def\modernpoem@par{% Redefine \par for possible \obeylines \ifpoem@started\else \ifdim\wd\@curline>\z@\global\poem@startedtrue\else \@stopfield @@ -5961,9 +5975,17 @@ bidi implementation of tufte title] \end{tabbing}% \endgroup \par + \if@noparlist \else + \ifdim\lastskip >\z@ + \@tempskipa\lastskip \vskip -\lastskip + \advance\@tempskipa\parskip \advance\@tempskipa -\@outerparskip + \vskip\@tempskipa + \fi + \@endparenv + \fi } \newenvironment{modernpoem}{\@modernpoem}{\@endmodernpoem} -\expandafter\def\csname modernpoem*\endcsname{\let\poem@obeylines=\obeylines\modernpoem} +\expandafter\def\csname modernpoem*\endcsname{\let\poem@obeylines=\modernpoem@obeylines\modernpoem} \expandafter\def\csname endmodernpoem*\endcsname{\endmodernpoem} \gdef\@startfield{% \global\setbox\@curfield\hbox\bgroup% |