From 7ef5ba2c0461a5ba964a46fd8e70ba9b6ba355a4 Mon Sep 17 00:00:00 2001
From: Mark Wooding <mdw@distorted.org.uk>
Date: Sun, 4 Oct 2015 23:36:30 +0100
Subject: [PATCH] mdwtab.dtx: Cope when \if@leqno is frobbed dynamically.

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 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mdwtab.dtx b/mdwtab.dtx
index 3c4b419..a5786e5 100644
--- a/mdwtab.dtx
+++ b/mdwtab.dtx
@@ -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
@@ -5232,13 +5232,13 @@
 % 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}
-- 
2.11.0

