mdwtab.dtx: Cope when \if@leqno is frobbed dynamically.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 Oct 2015 22:36:30 +0000 (23:36 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 6 Oct 2015 23:24:16 +0000 (00:24 +0100)
Thanks to Christian Cornelssen for this change.

I considered adding user commands for twiddling \if@leqno (and
\if@fleqn), but I decided against it because the `leqno' and `fleqn'
options do a notionally document-class-specific thing which (in common
cases) involves a complicated rewrite of the `equation' environment and
the \[...\] commands, which I really don't want to get into right now.

mdwtab.dtx

index 3c4b419..a5786e5 100644 (file)
@@ -44,7 +44,7 @@
 %<+color>                [2003/08/24 1.10 Fix for people who can't spell]
 % \end{meta-comment}
 %
-% \CheckSum{3404}
+% \CheckSum{3402}
 %% \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
 % The macro |\eqa@eqpos| will put its argument in the right place.
 %
 %    \begin{macrocode}
-\if@leqno
-  \def\eqa@eqpos#1{%
+\def\eqa@eqpos#1{%
+  \if@leqno%
     \hb@xt@.01\p@{}\rlap{\normalfont\normalcolor\hskip-\displaywidth#1}%
-  }
-\else
-  \def\eqa@eqpos#1{\normalfont\normalcolor#1}
-\fi
+  \else%
+    \normalfont\normalcolor#1%
+  \fi%
+}
 %    \end{macrocode}
 %
 % \end{macro}