From 20e119e2759443f3504f8d052fec7065e1921187 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 4 Jun 2012 17:43:23 +0000 Subject: bidi (4jun12) git-svn-id: svn://tug.org/texlive/trunk@26822 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bidi/README | 2 +- Master/texmf-dist/doc/latex/bidi/bidi.pdf | Bin 168750 -> 168815 bytes Master/texmf-dist/source/latex/bidi/bidi.dtx | 65 +++++++++++++++------ Master/texmf-dist/tex/latex/bidi/bidi.sty | 4 +- Master/texmf-dist/tex/latex/bidi/bidi.tex | 2 +- .../tex/latex/bidi/framed-xetex-bidi.def | 51 ++++++++++++---- 6 files changed, 92 insertions(+), 32 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/bidi/README b/Master/texmf-dist/doc/latex/bidi/README index d4c16eacd3d..d9de7167e74 100644 --- a/Master/texmf-dist/doc/latex/bidi/README +++ b/Master/texmf-dist/doc/latex/bidi/README @@ -1,6 +1,6 @@ ___________________ The bidi package -v11.155 +v11.157 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. diff --git a/Master/texmf-dist/doc/latex/bidi/bidi.pdf b/Master/texmf-dist/doc/latex/bidi/bidi.pdf index 9de9c6c432a..2b2b0ad6855 100644 Binary files a/Master/texmf-dist/doc/latex/bidi/bidi.pdf and b/Master/texmf-dist/doc/latex/bidi/bidi.pdf differ diff --git a/Master/texmf-dist/source/latex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx index 3989b10e1c3..e6ee667595f 100644 --- a/Master/texmf-dist/source/latex/bidi/bidi.dtx +++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx @@ -5,7 +5,7 @@ %<*readme> ___________________ The bidi package -v11.155 +v11.157 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX. @@ -239,7 +239,7 @@ by Vafa Khalighi. % Support for bidirectional typesetting in plain \TeX{} and \LaTeXe} % \author{Vafa Khalighi\\ % \url{vkhalighi@me.com}} -% \date{\today\qquad Version 11.155} +% \date{\today\qquad Version 11.157} %\maketitle % \tableofcontents %\section*{Introduction} @@ -254,7 +254,7 @@ by Vafa Khalighi. %in plain TeX and LaTeX. The package includes adaptations for use %with many other commonly-used packages. %Copyright (c) 2009-2012 Vafa Khalighi -%v11.155, 2012/06/01 +%v11.157, 2012/06/05 %License: LaTeX Project Public License, version 1.3c or higher (your choice) %Location on CTAN: /macros/latex/contrib/bidi %\end{lstlisting} @@ -2530,8 +2530,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2012/06/01} -\def\bidiversion{v11.155} +\def\bididate{2012/06/05} +\def\bidiversion{v11.157} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\bidiinfo{% @@ -2596,7 +2596,7 @@ Location on CTAN: /macros/latex/contrib/bidi} %\fi % \subsection{\textsf{bidi.tex}} % \begin{macrocode} -\def\bididate{2012/06/01} +\def\bididate{2012/06/05} \def\bidiversion{v0.1} \catcode`@=11 \let \protect \relax @@ -10199,7 +10199,37 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{framed-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{framed-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for framed package for XeTeX engine] +\ProvidesFile{framed-xetex-bidi.def}[2012/06/05 v0.3 bidi adaptations for framed package for XeTeX engine] +\renewcommand\TitleBarFrame[3][]{\begingroup + \ifx\delimiter#1\delimiter + \let\TF@conlab\@empty + \else + \def\TF@conlab{% continuation label + \nointerlineskip + \smash{\rlap{\kern\wd\@tempboxa\kern\fboxrule\kern\fboxsep #1}}}% + \fi + %\let\TF@savecolor\current@color + \textcolor{TFFrameColor}{% + \CustomFBox + {\TF@Title{#2}}{\TF@conlab}% + \fboxrule\fboxrule\fboxrule\fboxrule + %{\let\current@color\TF@savecolor\set@color #3}% + {\normalcolor #3}% + }\endgroup +} +\renewenvironment{titled-frame}[1]{% + \def\FrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame{\textbf{#1}}}% + \def\FirstFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame[$\if@RTL\blacktriangleleft\else\blacktriangleright\fi$]{\textbf{#1}}}% + \def\MidFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame[$\if@RTL\blacktriangleleft\else\blacktriangleright\fi$]{\textbf{#1\ (cont)}}}% + \def\LastFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame{\textbf{#1\ (cont)}}}% + \MakeFramed{\advance\hsize-20pt \FrameRestore}}% +% note: 8 + 2 + 8 + 2 = 20. Don't use \width because the frame title +% could interfere with the width measurement. + {\endMakeFramed} \chardef\FrameRestore=\catcode`\| % for debug \catcode`\|=\catcode`\% % (debug: insert space after backslash) \def\fb@put@frame#1#2{\relax @@ -10220,17 +10250,18 @@ bidi implementation of tufte title] | \string\pagegoal=\the\pagegoal, | \string\pagestretch=\the\pagestretch, | \string\pageshrink=\the\pageshrink, -| \string\fb@frh=\fb@frh. \space} -| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}% +| \string\fb@frh=\the\fb@frh. \space} +| \message{^^JBox of size \the\ht\@tempboxa\space}% \begingroup % temporarily set \dimen@ to be... \advance\dimen@.8\pageshrink % maximum space available on page - \advance\dimen@-\fb@frh\relax % space available for frame's contents + \advance\dimen@-\fb@frh\relax % max space available for frame's contents +%%% LOOKS SUBTRACTED AND ADDED, SO DOUBLE ACCOUNTING! \expandafter\endgroup % expand \ifdim, then restore \dimen@ to real room left on page \ifdim\dimen@>\ht\@tempboxa % whole box does fit | \message{fits in \the\dimen@. }% - % Use vsplit anyway to capture the marks - % !!!???!!! MERGE THIS WITH THE else CLAUSE!!! + % ToDo: Change this to use vsplit anyway to capture the marks + % MERGE THIS WITH THE else CLAUSE!!! \fb@putboxa#1% \fb@afterframe \else % box must be split @@ -10244,7 +10275,7 @@ bidi implementation of tufte title] \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth \splittopskip\the\splittopskip}% \boxmaxdepth\z@ \splittopskip\z@ -| \message{Padded box of size \the\ht\@tempboxa\space split to \the\dimen@}% +| \message{^^JPadded box of size \the\ht\@tempboxa\space split to \the\dimen@}% % Split box here \setbox\tw@\vsplit\@tempboxa to\dimen@ | \toks99\expandafter{\splitfirstmark}% @@ -10253,7 +10284,7 @@ bidi implementation of tufte title] \setbox\tw@\vbox{\unvbox\tw@}% natural-sized | \message{Natural height of split box is \the\ht\tw@, leaving | \the\ht\@tempboxa\space remainder. }% - % If the split-to size > (\vsize-\topskip), then set box to full size + % If the split-to size > (\vsize-\topskip), then set box to full size. \begingroup \advance\dimen@\topskip \expandafter\endgroup @@ -10262,7 +10293,7 @@ bidi implementation of tufte title] \dimen@ii\pagegoal \advance\dimen@ii -\topskip \advance\dimen@ii \FrameHeightAdjust\relax - \else % suspect this is wrong: + \else % suspect this is implemented incorrectly: % If the split-to size > feasible room_on_page, rebox it smaller. \advance\dimen@.8\pageshrink \ifdim\ht\tw@>\dimen@ @@ -10308,7 +10339,7 @@ bidi implementation of tufte title] } \def\fb@putboxa#1{% \ifvoid\@tempboxa - PackageWarning{framed}{Boxa is void -- discard it. }% + \PackageWarning{framed}{Boxa is void -- discard it. }% \else | \message{Frame and place boxa. }% | %{\showoutput\showbox\@tempboxa}% @@ -10328,7 +10359,7 @@ bidi implementation of tufte title] % Test if we are in a list (or list-like paragraph) \ifnum \ifdim\@totalleftmargin>\z@ 1\fi \ifdim\rightmargin>\z@ 1\fi - \ifnum\@listdepth>0 1\fi 0>\z@ + \ifnum\@listdepth>\z@ 1\fi 0>\z@ % \message{In a list: \linewidth=\the\linewidth, \@totalleftmargin=\the\@totalleftmargin, % \parshape=\the\parshape, \columnwidth=\the\columnwidth, \hsize=\the\hsize, % \labelwidth=\the\labelwidth. }% diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.sty b/Master/texmf-dist/tex/latex/bidi/bidi.sty index 974c357cd86..69c1cf1621d 100644 --- a/Master/texmf-dist/tex/latex/bidi/bidi.sty +++ b/Master/texmf-dist/tex/latex/bidi/bidi.sty @@ -13,8 +13,8 @@ %% %% \NeedsTeXFormat{LaTeX2e} -\def\bididate{2012/06/01} -\def\bidiversion{v11.155} +\def\bididate{2012/06/05} +\def\bidiversion{v11.157} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\bidiinfo{% diff --git a/Master/texmf-dist/tex/latex/bidi/bidi.tex b/Master/texmf-dist/tex/latex/bidi/bidi.tex index f5e6b8d1f72..962c1b0edbf 100644 --- a/Master/texmf-dist/tex/latex/bidi/bidi.tex +++ b/Master/texmf-dist/tex/latex/bidi/bidi.tex @@ -12,7 +12,7 @@ %% License information appended. %% %% -\def\bididate{2012/06/01} +\def\bididate{2012/06/05} \def\bidiversion{v0.1} \catcode`@=11 \let \protect \relax diff --git a/Master/texmf-dist/tex/latex/bidi/framed-xetex-bidi.def b/Master/texmf-dist/tex/latex/bidi/framed-xetex-bidi.def index 94c66e00363..0ce975de0e9 100644 --- a/Master/texmf-dist/tex/latex/bidi/framed-xetex-bidi.def +++ b/Master/texmf-dist/tex/latex/bidi/framed-xetex-bidi.def @@ -12,7 +12,35 @@ %% License information appended. %% %% -\ProvidesFile{framed-xetex-bidi.def}[2011/03/01 v0.1 bidi adaptations for framed package for XeTeX engine] +\ProvidesFile{framed-xetex-bidi.def}[2012/06/05 v0.3 bidi adaptations for framed package for XeTeX engine] +\renewcommand\TitleBarFrame[3][]{\begingroup + \ifx\delimiter#1\delimiter + \let\TF@conlab\@empty + \else + \def\TF@conlab{% continuation label + \nointerlineskip + \smash{\rlap{\kern\wd\@tempboxa\kern\fboxrule\kern\fboxsep #1}}}% + \fi + %\let\TF@savecolor\current@color + \textcolor{TFFrameColor}{% + \CustomFBox + {\TF@Title{#2}}{\TF@conlab}% + \fboxrule\fboxrule\fboxrule\fboxrule + %{\let\current@color\TF@savecolor\set@color #3}% + {\normalcolor #3}% + }\endgroup +} +\renewenvironment{titled-frame}[1]{% + \def\FrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame{\textbf{#1}}}% + \def\FirstFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame[$\if@RTL\blacktriangleleft\else\blacktriangleright\fi$]{\textbf{#1}}}% + \def\MidFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame[$\if@RTL\blacktriangleleft\else\blacktriangleright\fi$]{\textbf{#1\ (cont)}}}% + \def\LastFrameCommand{\fboxsep8pt\fboxrule2pt + \TitleBarFrame{\textbf{#1\ (cont)}}}% + \MakeFramed{\advance\hsize-20pt \FrameRestore}}% + {\endMakeFramed} \chardef\FrameRestore=\catcode`\| % for debug \catcode`\|=\catcode`\% % (debug: insert space after backslash) \def\fb@put@frame#1#2{\relax @@ -33,17 +61,18 @@ | \string\pagegoal=\the\pagegoal, | \string\pagestretch=\the\pagestretch, | \string\pageshrink=\the\pageshrink, -| \string\fb@frh=\fb@frh. \space} -| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}% +| \string\fb@frh=\the\fb@frh. \space} +| \message{^^JBox of size \the\ht\@tempboxa\space}% \begingroup % temporarily set \dimen@ to be... \advance\dimen@.8\pageshrink % maximum space available on page - \advance\dimen@-\fb@frh\relax % space available for frame's contents + \advance\dimen@-\fb@frh\relax % max space available for frame's contents +%%% LOOKS SUBTRACTED AND ADDED, SO DOUBLE ACCOUNTING! \expandafter\endgroup % expand \ifdim, then restore \dimen@ to real room left on page \ifdim\dimen@>\ht\@tempboxa % whole box does fit | \message{fits in \the\dimen@. }% - % Use vsplit anyway to capture the marks - % !!!???!!! MERGE THIS WITH THE else CLAUSE!!! + % ToDo: Change this to use vsplit anyway to capture the marks + % MERGE THIS WITH THE else CLAUSE!!! \fb@putboxa#1% \fb@afterframe \else % box must be split @@ -57,7 +86,7 @@ \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth \splittopskip\the\splittopskip}% \boxmaxdepth\z@ \splittopskip\z@ -| \message{Padded box of size \the\ht\@tempboxa\space split to \the\dimen@}% +| \message{^^JPadded box of size \the\ht\@tempboxa\space split to \the\dimen@}% % Split box here \setbox\tw@\vsplit\@tempboxa to\dimen@ | \toks99\expandafter{\splitfirstmark}% @@ -66,7 +95,7 @@ \setbox\tw@\vbox{\unvbox\tw@}% natural-sized | \message{Natural height of split box is \the\ht\tw@, leaving | \the\ht\@tempboxa\space remainder. }% - % If the split-to size > (\vsize-\topskip), then set box to full size + % If the split-to size > (\vsize-\topskip), then set box to full size. \begingroup \advance\dimen@\topskip \expandafter\endgroup @@ -75,7 +104,7 @@ \dimen@ii\pagegoal \advance\dimen@ii -\topskip \advance\dimen@ii \FrameHeightAdjust\relax - \else % suspect this is wrong: + \else % suspect this is implemented incorrectly: % If the split-to size > feasible room_on_page, rebox it smaller. \advance\dimen@.8\pageshrink \ifdim\ht\tw@>\dimen@ @@ -121,7 +150,7 @@ } \def\fb@putboxa#1{% \ifvoid\@tempboxa - PackageWarning{framed}{Boxa is void -- discard it. }% + \PackageWarning{framed}{Boxa is void -- discard it. }% \else | \message{Frame and place boxa. }% | %{\showoutput\showbox\@tempboxa}% @@ -141,7 +170,7 @@ % Test if we are in a list (or list-like paragraph) \ifnum \ifdim\@totalleftmargin>\z@ 1\fi \ifdim\rightmargin>\z@ 1\fi - \ifnum\@listdepth>0 1\fi 0>\z@ + \ifnum\@listdepth>\z@ 1\fi 0>\z@ % \message{In a list: \linewidth=\the\linewidth, \@totalleftmargin=\the\@totalleftmargin, % \parshape=\the\parshape, \columnwidth=\the\columnwidth, \hsize=\the\hsize, % \labelwidth=\the\labelwidth. }% -- cgit v1.2.3