Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

robustifying \underline #28

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions bidi.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ by Vafa Khalighi.
%\fi
% \section{File \texttt{article-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{article-xetex-bidi.def}[2017/06/09 v0.6 bidi adaptations for standard article class for XeTeX engine]
\ProvidesFile{article-xetex-bidi.def}[2023/10/29 v0.7 bidi adaptations for standard article class for XeTeX engine]
\if@titlepage
\renewcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
Expand Down Expand Up @@ -986,6 +986,14 @@ by Vafa Khalighi.
\nobreak
\vskip 3ex
\@afterheading}
\def\@spart#1{%
{\parindent \z@ \if@RTL\raggedleft\else\raggedright\fi
\interlinepenalty \@M
\normalfont
\huge \bfseries #1\par}%
\nobreak
\vskip 3ex
\@afterheading}
\renewenvironment{thebibliography}[1]
{\section*{\refname}%
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
Expand Down Expand Up @@ -16533,21 +16541,15 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{fancyhdr-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{fancyhdr-xetex-bidi.def}[2018/02/15 v0.7 bidi adaptations for fancyhdr package for XeTeX engine]
\ProvidesFile{fancyhdr-xetex-bidi.def}[2023/10/29 v0.8 bidi adaptations for fancyhdr package for XeTeX engine]

\let\f@nch@everypar\everypar

\def\f@nch@head#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset
\f@nch@vbox\headheight{\hbox
{\rlap{\parbox[b]{\headwidth}{\bidi@raggedright#2}}\hfill
\parbox[b]{\headwidth}{\centering#3}\hfill
\llap{\parbox[b]{\headwidth}{\bidi@raggedleft#4}}}\headrule}}#5}
\bidi@patchcmd\f@nch@head\raggedright\bidi@raggedright{}{\bidi@warning{Patching '\string\f@nch@head' failed!}}
\bidi@patchcmd\f@nch@head\raggedleft\bidi@raggedleft{}{\bidi@warning{Patching '\string\f@nch@head' failed!}}

\def\f@nch@foot#1#2#3#4#5{#1\hbox to\headwidth{\f@nch@reset
\f@nch@vbox\footskip{\footrule
\hbox{\rlap{\parbox[t]{\headwidth}{\bidi@raggedright#2}}\hfill
\parbox[t]{\headwidth}{\centering#3}\hfill
\llap{\parbox[t]{\headwidth}{\bidi@raggedleft#4}}}}}#5}
\bidi@patchcmd\f@nch@foot\raggedright\bidi@raggedright{}{\bidi@warning{Patching '\string\f@nch@foot' failed!}}
\bidi@patchcmd\f@nch@foot\raggedleft\bidi@raggedleft{}{\bidi@warning{Patching '\string\f@nch@foot' failed!}}

% \end{macrocode}
% \iffalse
Expand Down Expand Up @@ -16640,8 +16642,8 @@ bidi implementation of tufte title]
%\fi
% \section{File \texttt{fleqn-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{fleqn-xetex-bidi.def}[2010/03/01 v0.1 bidi adaptations for fleqn tag for XeTeX engine]
\renewcommand\[{\relax
\ProvidesFile{fleqn-xetex-bidi.def}[2023/10/29 v0.2 bidi adaptations for fleqn tag for XeTeX engine]
\DeclareRobustCommand\[{\relax
\ifmmode\@badmath
\else
\begin{trivlist}%
Expand All @@ -16651,7 +16653,7 @@ bidi implementation of tufte title]
\hb@xt@\linewidth\bgroup \beginL$\m@th\displaystyle %$
\hskip\mathindent\bgroup
\fi}
\renewcommand\]{\relax
\DeclareRobustCommand\]{\relax
\ifmmode
\egroup $\hfil% $
\endL\egroup
Expand Down Expand Up @@ -27531,7 +27533,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \section{File \texttt{latex-xetex-bidi.def}}
% \begin{macrocode}
\ProvidesFile{latex-xetex-bidi.def}[2023/02/19 v1.5.0 bidi adaptations for `latex.ltx' for XeTeX engine]
\ProvidesFile{latex-xetex-bidi.def}[2023/10/29 v1.5.1 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate\@ne}
\newcommand{\TeXXeTOff}{\TeXXeTstate\z@}
\TeXXeTOn
Expand Down Expand Up @@ -27797,27 +27799,25 @@ to\rtside{\box\bslice\hfil}}
\renewcommand\raggedright{\if@bidi@list@minipage@parbox\bidi@orig@raggedleft\else\if@hboxRconstruct\bidi@orig@raggedleft\else\bidi@orig@raggedright\fi\fi}
\newcommand{\bidi@raggedright}{\if@RTL\raggedleft\else\raggedright\fi}
\newcommand{\bidi@raggedleft}{\if@RTL\raggedright\else\raggedleft\fi}
\def\centerline#1{%
\DeclareRobustCommand\centerline[1]{%
\if@RTL\@@line{\hss\beginR#1\endR\hss}
\else\@@line{\hss#1\hss}\fi}
\def\leftline#1{%
\def\bidi@orig@leftline#1{%
\if@RTL\@@line{\beginR#1\endR\hss}
\else\@@line{#1\hss}\fi}
\def\rightline#1{%
\def\bidi@orig@rightline#1{%
\if@RTL\@@line{\hss\beginR#1\endR}
\else\@@line{\hss#1}\fi}
\let\bidi@orig@leftline\leftline
\let\bidi@orig@rightline\rightline
\def\leftline#1{\ifhmode\if@RTL\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@rightline{#1}\else\if@hboxRconstruct\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\fi\fi}
\def\rightline#1{\ifhmode\if@RTL\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@leftline{#1}\else\if@hboxRconstruct\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\fi\fi}
\DeclareRobustCommand\leftline[1]{\ifhmode\if@RTL\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@rightline{#1}\else\if@hboxRconstruct\bidi@orig@rightline{#1}\else\bidi@orig@leftline{#1}\fi\fi\fi}
\DeclareRobustCommand\rightline[1]{\ifhmode\if@RTL\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\else\if@bidi@list@minipage@parbox\bidi@orig@leftline{#1}\else\if@hboxRconstruct\bidi@orig@leftline{#1}\else\bidi@orig@rightline{#1}\fi\fi\fi}
\def\bidirlap#1{\hb@xt@\z@{\if@RTL\hss\fi#1\if@RTL\else\hss\fi}}
\def\bidillap#1{\hb@xt@\z@{\if@RTL\else\hss\fi#1\if@RTL\hss\fi}}
\def\@hangfrom#1{\setbox\@tempboxa\hbox{{#1}}%
\hangindent \if@RTL-\else\fi\wd\@tempboxa\noindent\box\@tempboxa}
\def\narrower{%
\advance\if@RTL\rightskip\else\leftskip\fi\parindent
\advance\if@RTL\leftskip\else\rightskip\fi\parindent}
\def\underline#1{%
\DeclareRobustCommand\underline[1]{%
\relax
\ifmmode\@@underline{#1}%
\else
Expand Down