From a31dc532904cd2de5848b0461eaabee03cd7b936 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 10 Jul 2022 19:56:46 +0000 Subject: bidi (10jul22) git-svn-id: svn://tug.org/texlive/trunk@63863 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/xelatex/bidi/bidi-doc-intro.ltx | 2 +- .../source/xelatex/bidi/bidi-doc-title.ltx | 4 +- Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx | 2 +- Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 290 +++++++++------------ 4 files changed, 123 insertions(+), 175 deletions(-) (limited to 'Master/texmf-dist/source/xelatex') diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx index 4dfd97184ca..684abe72f65 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx +++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-intro.ltx @@ -20,7 +20,7 @@ If you use \textsf{bidi} package to write any input \TeX\ document, and then run * Copyright (c) 2007--2022 Vafa Khalighi * Copyright (c) 2018--2020 bidi-tex GitHub Organization * -* v38.9, 2022/07/08 +* v39.0, 2022/07/10 * * License: LaTeX Project Public License, version * 1.3c or higher (your choice) diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx index b2f3bd6c684..175b239e1db 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx +++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc-title.ltx @@ -3,7 +3,7 @@ \begin{document} \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\ \LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt] -\large User documentation for \textcolor{blue!65!black}{version 38.9}} +\large User documentation for \textcolor{blue!65!black}{version 39.0}} \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}} \setcounter{page}{0} \thispagestyle{empty} @@ -13,7 +13,7 @@ \textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} \Large -User documentation for \textcolor{blue!65!black}{version 38.9}} +User documentation for \textcolor{blue!65!black}{version 39.0}} \vskip 0pt plus 3fill \textit{\large to my Master, \textbf{Ferdowsi The Great}} diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx b/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx index 3685e42d94b..da079217881 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx +++ b/Master/texmf-dist/source/xelatex/bidi/bidi-doc.ltx @@ -1,7 +1,7 @@ \documentclass{ltxdoc} \input{bidi-doc-preamble.ltx} \hypersetup{% - pdftitle={User documentation for version 38.9 of the bidi + pdftitle={User documentation for version 39.0 of the bidi package}% } \begin{document} diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 61139521fc7..d6863a47a89 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 -v38.9 +v39.0 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX, using XeTeX engine. @@ -30,7 +30,7 @@ The announcements for the new releases of the package will also appear in the Discussions space under the Announcements category. -Current version release date: 2022/07/08 +Current version release date: 2022/07/10 ___________________________________________ Vafa Khalighi @@ -267,7 +267,7 @@ by Vafa Khalighi. \documentclass{ltxdoc} \input{bidi-doc-preamble.ltx} \hypersetup{% - pdftitle={Source documentation for version 38.9 of the bidi + pdftitle={Source documentation for version 39.0 of the bidi package}% } \EnableCrossrefs @@ -286,7 +286,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 38.9}} +%\large Source documentation for \textcolor{blue!65!black}{version 39.0}} % \author{Vafa Khalighi\thanks{Thanks to the bidi-tex GitHub organization consisted of David Carlisle and other members of the {\LaTeX} team to maintain the package in the period 2018--2020.}} %\setcounter{page}{0} %\thispagestyle{empty} @@ -296,7 +296,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Source documentation for \textcolor{blue!65!black}{version 38.9}} +%Source documentation for \textcolor{blue!65!black}{version 39.0}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -345,7 +345,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{55452} +%% \CheckSum{55412} %% \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 @@ -4589,8 +4589,8 @@ by Vafa Khalighi. % \section{File \texttt{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2022/07/08} -\def\bidi@version{38.9} +\def\bididate{2022/07/10} +\def\bidi@version{39.0} \ProvidesPackage{bidi}[\bididate\space v\bidi@version\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -4677,7 +4677,7 @@ Bidirectional typesetting in plain TeX and LaTeX] } \newcommand*{\@bidi@pdfcustomproperties}{% This is the bidi package, Version \bidi@version, - Released July 8, 2022. + Released July 10, 2022. } \newcommand*{\bidi@beamer@ragged}{} \@RTLmainfalse @@ -4921,9 +4921,9 @@ Bidirectional typesetting in plain TeX and LaTeX] %\fi % \section{File \texttt{bidi.tex}} % \begin{macrocode} -\def\bididate{2022/07/08} +\def\bididate{2022/07/10} \catcode`@=11 -\def\bidi@version{38.9} +\def\bidi@version{39.0} \let \protect \relax \newlinechar`\^^J \edef\@bidi@info{****************************************************^^J% @@ -5025,7 +5025,7 @@ Bidirectional typesetting in plain TeX and LaTeX] } \def\@bidi@pdfcustomproperties{% This is the bidi package, Version \bidi@version, - Released July 8, 2022. + Released July 10, 2022. } \def\bidi@pdfm@mark{% \special{pdf:% @@ -12541,12 +12541,11 @@ bidi implementation of tufte title] %\fi % \section{File \texttt{extrafootnotefeatures-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2022/07/08 v2.1 bidi extra footnote features for XeTeX engine] +\ProvidesFile{extrafootnotefeatures-xetex-bidi.def}[2022/07/10 v2.2 bidi extra footnote features for XeTeX engine] \newdimen\bidi@columnwidth \def\bidi@floathook{% \bidi@columnwidth\columnwidth } -\newif\if@bidi@void@footins \newif\if@bidi@void@@mpfootins \newcommand*{\@bidi@before@Hy@hyperfootnotes}{% \if@bidi@csundef{ifHy@hyperfootnotes}{}{% @@ -12766,33 +12765,10 @@ bidi implementation of tufte title] \bidi@normal@footmarkwidth \bidi@ensure@newcommand{\m@mdoextrafeet}{\extrafeetins} \bidi@ensure@newcommand*{\extrafeetins}{% - \setbox\@outputbox \vbox{% - \boxmaxdepth \@maxdepth - \unvbox\@outputbox - \ifvoid\footinsv@r - \ifvoid\footinsv@l - \else - \@footstartv@l - \@LTRfootgroupv@l - \fi - \else - \@footstartv@r - \@footgroupv@r - \ifvoid\footinsv@l - \else - \@@footstart@@v@l - \@LTRfootgroupv@l - \fi - \fi - \ifvoid\@bidi@copyins@ - \else - \vskip \skip\@bidi@copyins@ - \color@begingroup - \normalcolor - \unvbox \@bidi@copyins@ - \color@endgroup - \fi - \extrafeetinshook}} + \bidi@joinfootnotes\footinsv@r\@footstartv@r\@footgroupv@r + \bidi@joinfootnotes\footinsv@l\@footstartv@l\@LTRfootgroupv@l + \bidi@joinfootnotes\@bidi@copyins@{}{\unvbox\@bidi@copyins@}% + \extrafeetinshook} \bidi@ensure@newcommand{\extrafeetinshook}{} \bidi@ensure@newcommand{\foottextfont}{\footnotesize} \bidi@ensure@newcommand{\LTRfoottextfont}{\footnotesize} @@ -12805,6 +12781,29 @@ bidi implementation of tufte title] \splittopskip=\footnotesep \splitmaxdepth=\dp\strutbox \@parboxrestore} +\def\bidi@ifmulticol#1#2{\@tempswafalse + \ifnum\col@number>\@ne + \ifnum\count\footins>1999 \@tempswatrue \fi + \fi + \if@tempswa #1\else #2\fi +} +\def\bidi@joinfootnotes#1#2#3{% + \ifvoid#1 + \else + \@tempskipa\skip#1% + \bidi@ifmulticol{\divide\@tempskipa\col@number}{}% + \edef\bidi@footskip{\vskip\the\@tempskipa\relax}% + \ifvoid\footins + \global\setbox\footins\vbox{#2#3}% + \else + \global\setbox\footins\vbox{% + \unvbox\footins + \bidi@footskip + #2#3% + }% + \fi + \fi +} \bidi@ensure@newcommand{\m@mdoextrafeetmini}{% \extrafeetminihook} \bidi@ensure@newcommand{\extrafeetendmini}{% @@ -12853,22 +12852,11 @@ bidi implementation of tufte title] \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}} \bidi@ensure@newcommand{\m@make@footstart}[1]{% \@namedef{@footstart#1}{% - \if@bidi@void@footins - \bidi@mopfn@bottom - \fi \leftskip=\z@ \rightskip=\z@ \parindent=\z@ - \vskip\skip\footins - \if@bidi@void@footins - \footnoterule - \fi}} -\newcommand{\bidi@make@footstart@@}[1]{% - \@namedef{@@footstart@@#1}{% - \leftskip=\z@ - \rightskip=\z@ - \parindent=\z@ - \vskip\skip\footins}} + }% +} \newinsert\footinsv@r \skip\footinsv@r\bigskipamount \count\footinsv@r=1000 % no magnifcation @@ -12879,18 +12867,15 @@ bidi implementation of tufte title] \count\footinsv@l=1000 % no magnifcation \dimen\footinsv@l=\footinsdim \m@make@footstart{v@l} -\bidi@make@footstart@@{v@l} \bidi@ensure@newcommand{\@footgroupv@r}{} \newinsert\@mpfootinsv@r \newinsert\@mpfootinsv@l \bidi@ensure@newcommand{\mp@footgroupv@r}{} \newcount\m@m@k \newdimen\m@m@h \bidi@ensure@newcommand*{\m@mrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3 - \hsize\bidi@columnwidth \@@line{\beginR\splittopskip=\m@m@h \vbadness=\@M \hfilneg \valign{##\vfill\cr\m@mdosplits}\endR}} \newcommand*{\bidi@LTRrigidbalance}[3]{\setbox0=\box#1 \m@m@k=#2 \m@m@h=#3 - \hsize\bidi@columnwidth \@@line{\splittopskip=\m@m@h \vbadness=\@M \hfilneg \valign{##\vfill\cr\m@mdosplits}}} \bidi@ensure@newcommand*{\m@mdosplits}{\ifnum\m@m@k>0 \noalign{\hfil}\m@msplitoff @@ -13024,11 +13009,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@twocol@footgroup}[1]{% \@namedef{@twocol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{\tw@}{\splittopskip}}}} \newcommand{\bidi@make@twocol@LTRfootgroup}[1]{% \@namedef{@twocol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{\tw@}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mptwocol@footgroup}[1]{% @@ -13160,11 +13147,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@threecol@footgroup}[1]{% \@namedef{@threecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{\thr@@}{\splittopskip}}}} \newcommand{\bidi@make@threecol@LTRfootgroup}[1]{% \@namedef{@threecol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{\thr@@}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpthreecol@footgroup}[1]{% @@ -13302,11 +13291,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@fourcol@footgroup}[1]{% \@namedef{@fourcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{4}{\splittopskip}}}} \newcommand{\bidi@make@fourcol@LTRfootgroup}[1]{% \@namedef{@fourcol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{4}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpfourcol@footgroup}[1]{% @@ -13444,11 +13435,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@fivecol@footgroup}[1]{% \@namedef{@fivecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{5}{\splittopskip}}}} \newcommand{\bidi@make@fivecol@LTRfootgroup}[1]{% \@namedef{@fivecol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{5}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpfivecol@footgroup}[1]{% @@ -13586,11 +13579,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@sixcol@footgroup}[1]{% \@namedef{@sixcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{6}{\splittopskip}}}} \newcommand{\bidi@make@sixcol@LTRfootgroup}[1]{% \@namedef{@sixcol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{6}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpsixcol@footgroup}[1]{% @@ -13728,11 +13723,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@sevencol@footgroup}[1]{% \@namedef{@sevencol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{7}{\splittopskip}}}} \newcommand{\bidi@make@sevencol@LTRfootgroup}[1]{% \@namedef{@sevencol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{7}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpsevencol@footgroup}[1]{% @@ -13870,11 +13867,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@eightcol@footgroup}[1]{% \@namedef{@eightcol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{8}{\splittopskip}}}} \newcommand{\bidi@make@eightcol@LTRfootgroup}[1]{% \@namedef{@eightcol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{8}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpeightcol@footgroup}[1]{% @@ -14012,11 +14011,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@ninecol@footgroup}[1]{% \@namedef{@ninecol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{9}{\splittopskip}}}} \newcommand{\bidi@make@ninecol@LTRfootgroup}[1]{% \@namedef{@ninecol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{9}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mpninecol@footgroup}[1]{% @@ -14154,11 +14155,13 @@ bidi implementation of tufte title] \bidi@ensure@newcommand{\m@make@tencol@footgroup}[1]{% \@namedef{@tencol@footgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \m@mrigidbalance{\@nameuse{footins#1}}{10}{\splittopskip}}}} \newcommand{\bidi@make@tencol@LTRfootgroup}[1]{% \@namedef{@tencol@LTRfootgroup#1}{{% \def\baselinestretch{\m@m@footnote@spacing}% + \hsize\bidi@columnwidth \@nameuse{foottextfont#1} \splittopskip=\ht\strutbox \bidi@LTRrigidbalance{\@nameuse{footins#1}}{10}{\splittopskip}}}} \bidi@ensure@newcommand{\m@make@mptencol@footgroup}[1]{% @@ -14222,10 +14225,8 @@ bidi implementation of tufte title] \count\footinsv@l=1000\relax \bidi@make@para@LTRfootgroup{v@l}% \m@make@para@footstart{v@l}% - \bidi@make@para@footstart@@{v@l}% \let\@LTRfootgroupv@l\@para@LTRfootgroupv@l \let\@footstartv@l\@para@footstartv@l - \let\@@footstart@@v@l\@@para@footstart@@v@l \let\@mpfootnotetext\@mpparafootnotetext \let\@mpLTRfootnotetext\@mpparaLTRfootnotetext \let\@mpRTLfootnotetext\@mpparaRTLfootnotetext @@ -14277,10 +14278,8 @@ bidi implementation of tufte title] \count\footinsv@l=1000\relax \bidi@make@para@LTRfootgroup{v@l}% \m@make@para@footstart{v@l}% - \bidi@make@para@footstart@@{v@l}% \let\@LTRfootgroupv@l\@para@LTRfootgroupv@l \let\@footstartv@l\@para@footstartv@l - \let\@@footstart@@v@l\@@para@footstart@@v@l \if@RTL@footnote \let\@mpfootnotetext\m@mold@mpfootnotetext \else @@ -14425,6 +14424,8 @@ bidi implementation of tufte title] \m@mungebox}\m@mmf@prepare} \bidi@ensure@newcommand{\m@make@para@footgroup}[1]{% \@namedef{@para@footgroup#1}{% + \advance\@tempskipa -\bidi@paraskip + \edef\bidi@footskip{\vskip\the\@tempskipa\relax}% \unvbox\@nameuse{footins#1} \@RTLtrue \m@mmakehboxofhboxes @@ -14436,6 +14437,8 @@ bidi implementation of tufte title] \noindent\unhbox0\par}} \bidi@ensure@newcommand{\bidi@make@para@LTRfootgroup}[1]{% \@namedef{@para@LTRfootgroup#1}{% + \advance\@tempskipa -\bidi@paraskip + \edef\bidi@footskip{\vskip\the\@tempskipa\relax}% \unvbox\@nameuse{footins#1} \@RTLfalse \m@mmakehboxofhboxes @@ -14465,22 +14468,12 @@ bidi implementation of tufte title] \noindent\unhbox0\par}} \bidi@ensure@newcommand{\m@make@para@footstart}[1]{% \@namedef{@para@footstart#1}{% - \if@bidi@void@footins - \bidi@mopfn@bottom - \fi + \global\advance\skip\@nameuse{footins#1}\bidi@paraskip \leftskip=\z@ \rightskip=\z@ \parindent=\z@ - \vskip\skip\footins - \if@bidi@void@footins - \footnoterule - \fi}} -\bidi@ensure@newcommand{\bidi@make@para@footstart@@}[1]{% -\@namedef{@@para@footstart@@#1}{% - \leftskip=\z@ - \rightskip=\z@ - \parindent=\z@ - \vskip\skip\footins}} + }% +} \bidi@ensure@newcommand*{\m@m@makecolfloats}{% \xdef\@freelist{\@freelist\@midlist}% \global\let\@midlist\@empty @@ -14526,28 +14519,24 @@ bidi implementation of tufte title] } \gdef\mem@makecol{% \m@m@makecolintro + \m@mdoextrafeet \ifvoid\footins - \global\@bidi@void@footinstrue \setbox\@outputbox \box\@cclv \else - \global\@bidi@void@footinsfalse \m@mopfootnote \fi - \m@mdoextrafeet \m@m@makecolfloats \m@m@makecoltext \global \maxdepth \@maxdepth} \gdef\bidi@makecolbf{% \m@m@makecolintro + \m@mdoextrafeet \setbox\@outputbox \box\@cclv \m@m@makecolfloats \ifvoid\footins - \global\@bidi@void@footinstrue \else - \global\@bidi@void@footinsfalse \bidi@mopfootnotebf \fi - \m@mdoextrafeet \m@m@makecoltext \global \maxdepth \@maxdepth} \newcommand{\FeetAboveFloat}{\gdef\@makecol{\mem@makecol}} @@ -14556,8 +14545,45 @@ bidi implementation of tufte title] \newcommand\FeetBelowRagged{\let\bidi@mopfn@bottom\relax} \FeetAboveFloat \FeetBelowRagged +\def\bidi@reinserts#1{\ifvoid#1\else + \ifnum\count\@currbox>\z@ + \advance\@pageht \ht#1% + \advance\@pageht \skip#1% + \advance\@pageht \dp#1% + \fi + \insert#1{\unvbox#1}% + \fi +} +\def\bidi@init@multi@footins#1{% + \multiply\count#1\col@number + \multiply\skip#1\col@number +} +\def\bidi@reinsert@footnotes#1{\ifvoid#1\else + \insert#1{}\fi} \AtBeginDocument{% + \bidi@preto\@doclearpage\m@mdoextrafeet + \g@addto@macro\@reinserts{% + \bidi@reinserts\footinsv@r + \bidi@reinserts\footinsv@l + } \bidi@floathook + \g@addto@macro\@floatplacement{% + \bidi@ifmulticol{}{\bidi@floathook}% + }% + \if@bidi@csundef{multi@column@out}{% + \@onlypreamble\bidi@init@multi@footins + \let\bidi@ifmulticol\@secondoftwo + }{% + \bidi@preto\multi@column@out\m@mdoextrafeet + \g@addto@macro\init@mult@footins{% + \bidi@init@multi@footins\footinsv@r + \bidi@init@multi@footins\footinsv@l + }% + \g@addto@macro\reinsert@footnotes{% + \bidi@reinsert@footnotes\footinsv@r + \bidi@reinsert@footnotes\footinsv@l + }% + }% } % \end{macrocode} % \iffalse @@ -19152,7 +19178,7 @@ bidi implementation of tufte title] %\fi % \section{File \texttt{multicol-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{multicol-xetex-bidi.def}[2022/02/01 v1.3 bidi adaptations for multicol package for XeTeX engine] +\ProvidesFile{multicol-xetex-bidi.def}[2022/07/10 v1.4 bidi adaptations for multicol package for XeTeX engine] \def\page@sofar{% \process@cols\mult@rightbox {\ifvoid\count@ @@ -19291,100 +19317,22 @@ bidi implementation of tufte title] \def\bidi@leave@mult@copyins{% \advance\dimen@-\skip\@bidi@copyins@ \advance\dimen@-\ht\@bidi@copyins@ -} -\bidi@AtEndPreamble{% - \if@bidi@csdef{footinsv@l}{% - \def\bidi@leave@mult@footins@vr{% - \advance\dimen@-\skip\footinsv@r - \advance\dimen@-\ht\footinsv@r - }% - \def\bidi@leave@mult@footins@vl{% - \advance\dimen@-\skip\footinsv@l - \advance\dimen@-\ht\footinsv@l - }% - \def\bidi@init@mult@footinsv@r{% - \multiply\count\footinsv@r\col@number - \multiply\skip \footinsv@r\col@number - }% - \def\bidi@init@mult@footinsv@l{% - \multiply\count\footinsv@l\col@number - \multiply\skip \footinsv@l\col@number - }% - \def\bidi@reinsert@footnotesv@r{\ifvoid\footinsv@r\else - \insert\footinsv@r{}\fi}% - \def\bidi@reinsert@footnotesv@l{\ifvoid\footinsv@l\else - \insert\footinsv@l{}\fi}% - \bidi@patchcmd{\prepare@multicols}{% - \reinsert@footnotes - }{% - \reinsert@footnotes - \bidi@init@mult@footinsv@r - \bidi@reinsert@footnotesv@r - \bidi@init@mult@footinsv@l - \bidi@reinsert@footnotesv@l - }{}{}% +} + +\bidi@AtEndPreamble{% + \if@bidi@csundef{footinsv@l}{% \bidi@patchcmd{\multi@column@out}{% - \ifnum \c@tracingmulticols>\thr@@ + \ifvbox \@kludgeins }{% - \ifvoid\footinsv@r - \ifvoid\footinsv@l - \else - \PackageWarning{multicol}% - {I moved some lines to - the next page.\MessageBreak - Footnotes on page - \thepage\space might be wrong}% - \fi - \else - \PackageWarning{multicol}% - {I moved some lines to - the next page.\MessageBreak - Footnotes on page - \thepage\space might be wrong}% - \fi - \ifnum \c@tracingmulticols>\thr@@ -}{}{}% -\bidi@patchcmd{\endmulticols}{% - \reinsert@footnotes -}{% - \reinsert@footnotes - \bidi@reinsert@footnotesv@r - \bidi@reinsert@footnotesv@l -}{}{}% -\bidi@patchcmd{\speci@ls}{% - \reinsert@footnotes -}{% - \reinsert@footnotes - \bidi@reinsert@footnotesv@r - \bidi@reinsert@footnotesv@l -}{}{}% -\bidi@patchcmd{\speci@ls}{% - \reinsert@footnotes -}{% - \reinsert@footnotes - \bidi@reinsert@footnotesv@r - \bidi@reinsert@footnotesv@l -}{}{}% - }{}% - \bidi@patchcmd{\multi@column@out}{% - \ifvbox \@kludgeins - }{% - \if@bidi@csdef{footinsv@l}{% - \divide\skip\footinsv@r\col@number - \ifvoid\footinsv@r \else - \bidi@leave@mult@footins@vr - \fi - \divide\skip\footinsv@l\col@number - \ifvoid\footinsv@l \else - \bidi@leave@mult@footins@vl - \fi - }{}% - \ifvoid\@bidi@copyins@ \else + \ifvoid\@bidi@copyins@ \else \bidi@leave@mult@copyins - \fi - \ifvbox \@kludgeins - }{}{}% + \fi + \ifvbox \@kludgeins + }{}{}% + }{}% } + + % \end{macrocode} % \iffalse % -- cgit v1.2.3