diff options
author | Karl Berry <karl@freefriends.org> | 2018-01-21 00:45:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-01-21 00:45:04 +0000 |
commit | 8ba9e668ca694aacae8643834362d77694eab959 (patch) | |
tree | 3a0c14b1ef8fc90b2dbbe5fb25f5a363355fe369 /Master/texmf-dist/source/xelatex/bidi/bidi.dtx | |
parent | 5e0fb3573b2538b136d1b71b724482f55ebe44e9 (diff) |
bidi (20jan18)
git-svn-id: svn://tug.org/texlive/trunk@46395 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 | 92 |
1 files changed, 79 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 0e9cf1503fe..285f7678bd7 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 -v32.2 +v32.3 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: 2018/01/17 +Current version release date: 2018/01/21 ___________________ Vafa Khalighi @@ -221,7 +221,7 @@ by Vafa Khalighi. \documentclass{ltxdoc} \input{bidi-doc-preamble.ltx} \hypersetup{% - pdftitle={Source documentation for version 32.2 of the bidi + pdftitle={Source documentation for version 32.3 of the bidi package}% } \EnableCrossrefs @@ -240,7 +240,7 @@ by Vafa Khalighi. % \GetFileInfo{\jobname.dtx} % \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\ %\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt] -%\large Source documentation for \textcolor{blue!65!black}{version 32.2}} +%\large Source documentation for \textcolor{blue!65!black}{version 32.3}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -251,7 +251,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Source documentation for \textcolor{blue!65!black}{version 32.2}} +%Source documentation for \textcolor{blue!65!black}{version 32.3}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -289,7 +289,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{49370} +%% \CheckSum{49514} %% \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 @@ -1912,8 +1912,8 @@ by Vafa Khalighi. % \section{File \texttt{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2018/01/17} -\def\bidi@version{32.2} +\def\bididate{2018/01/21} +\def\bidi@version{32.3} \ProvidesPackage{bidi}[\bididate\space v\bidi@version\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -1943,7 +1943,7 @@ Bidirectional typesetting in plain TeX and LaTeX] \typeout{\@bidi@info} \edef\bidi@everyjob{\the\everyjob} \everyjob{\bidi@everyjob\typeout{\@bidi@info}} -\newcommand*{\bidiversion}{$\bidi@version$} +\newcommand*{\bidiversion}{\ensuremath\bidi@version} \newcommand*{\IfbidiPackageVersionLater}[1]{% \ifdim\bidi@version pt > #1 pt % \expandafter\@firstoftwo @@ -2003,6 +2003,19 @@ Bidirectional typesetting in plain TeX and LaTeX] \def\pRLE{\protect\afterassignment\moreRLE \let\n@xt= } \def\bracetext{\ifcat\n@xt{\else\ifcat\n@xt}\fi \errmessage{Missing left brace has been substituted}\fi \bgroup} +\newinsert\@bidi@copyins@ +\skip\@bidi@copyins@=12\p@ +\dimen\@bidi@copyins@=40pc +\count\@bidi@copyins@=1000 +\newcommand*{\@bidi@inslogo@}{\insert\@bidi@copyins@{\@bidi@logo@}} +\newcommand*{\@bidi@logo@hb@xt@}{% + \if@RTLmain + \hboxR to + \else + \hboxL to + \fi +} +\newcommand*{\@bidi@logo@}{\@bidi@logo@hb@xt@\textwidth{\hss\LRE{\bfseries Typeset by the \textsf{bidi} package}}} \input{latex-xetex-bidi.def} \input{loadingorder-xetex-bidi.def} \define@choicekey{bidi.sty}{RTLdocument}[\bidi@tempa\bidi@tempb]{on,off}[on]{% @@ -2080,8 +2093,16 @@ Bidirectional typesetting in plain TeX and LaTeX] \let\bidi@lastcolumn@status@write\relax \fi} +\define@choicekey{bidi.sty}{logo}[\bidi@tempa\bidi@tempb]{on,off}[on]{% + \ifcase\bidi@tempb\relax + \AtBeginDocument{\@bidi@inslogo@}% + \or + \let\@bidi@logo@\@empty \let\@bidi@inslogo@\@empty + \fi} + \ExecuteOptionsX{% - DetectColumn=off + DetectColumn=off,% + logo=on% } \ProcessOptionsX @@ -2106,9 +2127,9 @@ Bidirectional typesetting in plain TeX and LaTeX] %\fi % \section{File \texttt{bidi.tex}} % \begin{macrocode} -\def\bididate{2018/01/17} -\def\bidi@version{0.3} +\def\bididate{2018/01/21} \catcode`@=11 +\def\bidi@version{0.4} \let \protect \relax \newlinechar`\^^J \edef\@bidi@info{****************************************************^^J% @@ -2138,7 +2159,14 @@ Bidirectional typesetting in plain TeX and LaTeX] \message{\@bidi@info} \edef\bidi@everyjob{\the\everyjob} \everyjob{\bidi@everyjob\message{\@bidi@info}} -\def\bidiversion{$\bidi@version$} +\def\bidiversion{% + \relax + \ifmmode + \bidi@version + \else + $\bidi@version$ + \fi +} \input iftex.sty \RequireXeTeX \newif\if@RTLmain @@ -2161,7 +2189,22 @@ Bidirectional typesetting in plain TeX and LaTeX] \def\pRLE{\protect\afterassignment\moreRLE \let\n@xt= } \def\bracetext{\ifcat\n@xt{\else\ifcat\n@xt}\fi \errmessage{Missing left brace has been substituted}\fi \bgroup} +\newinsert\@bidi@copyins@ +\skip\@bidi@copyins@=12\p@ +\dimen\@bidi@copyins@=40pc +\count\@bidi@copyins@=1000 +\def\@bidi@inslogo@{\insert\@bidi@copyins@{\@bidi@logo@}} +\def\@bidi@logo@hb@xt@{% + \if@RTLmain + \hboxR to + \else + \hboxL to + \fi +} +\def\@bidi@logo@{\@bidi@logo@hb@xt@\hsize{\hss\LRE{\bf Typeset by the bidi package}}} +\def\nobidilogo{\let\@bidi@logo@\@empty \let\@bidi@inslogo@\@empty} \input plain-xetex-bidi.def +\@bidi@inslogo@ \catcode`@=12 % \end{macrocode} % \iffalse @@ -11585,6 +11628,11 @@ bidi implementation of tufte title] \vskip\headheight \vskip\headsep \box\@outputbox + \ifvoid\@bidi@copyins@ + \else + \vskip\skip\@bidi@copyins@ + \unvbox\@bidi@copyins@ + \fi }}% \global\let\if@newlist\@@if@newlist \stepcounter{page}% @@ -16072,6 +16120,19 @@ to\rtside{\box\bslice\hfil}} \def\reset@dir{\ifx\saved@@dir\@@RTL\setRTL\else\ifx\saved@@dir\@@LTR\setLTR\else\relax\fi\fi} \let\@@TeX\TeX \def\TeX{\@ensure@LTR{\@@TeX}} +\def\pagecontents{\ifvoid\topins\else\unvbox\topins\fi + \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255 + \ifvoid\footins\else % footnote info is present + \vskip\skip\footins + \footnoterule + \unvbox\footins\fi + \ifr@ggedbottom \kern-\dimen@ \vfil \fi + \ifvoid\@bidi@copyins@ + \else + \vskip\skip\@bidi@copyins@ + \unvbox\@bidi@copyins@ + \fi +} \long\def\bidi@reflect@box#1{% \leavevmode \setbox\z@\hbox{{#1}}% @@ -21955,6 +22016,11 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi} \box\@tempboxa \vskip \headsep \box\@outputbox + \ifvoid\@bidi@copyins@ + \else + \vskip\skip\@bidi@copyins@ + \unvbox\@bidi@copyins@ + \fi \baselineskip \footskip \color@hbox \normalcolor |