local_cmmds.tex: Escape whitespace in \xref
authorW. Trevor King <wking@tremily.us>
Thu, 9 May 2013 01:50:49 +0000 (21:50 -0400)
committerW. Trevor King <wking@tremily.us>
Thu, 9 May 2013 01:50:49 +0000 (21:50 -0400)
Now

  (\xref{a}{equation}{c})

is rendered as

  (A Eqn. (c))

instead of

  ( A Eqn. (c) )

src/local_cmmds.tex

index bdbe9224d7c8d5701cbad6dd6bc00af4a83ede68..32d0e7e537d0a0f6c36209b04a043076b44305f7 100644 (file)
 % usage: \fref{environment}{value}
 % for example: \fref{figure}{75}
 \newcommand{\fref}[2]{%
-  \switch
-  \case{\isequal{#1}{equation}}
-    Eqn.~\iref{#2}
-  \case{\isequal{#1}{figure}}
-    Fig.~\iref{#2}
-  \otherwise
+  \switch%
+  \case{\isequal{#1}{equation}}%
+    Eqn.~\iref{#2}%
+  \case{\isequal{#1}{figure}}%
+    Fig.~\iref{#2}%
+  \otherwise%
     \PackageError{fref}{
       \MessageBreak
       environment value >#2< unknown \MessageBreak
-    }{possible values are: equation. \MessageBreak}
-  \endswitch
+    }{possible values are: equation. \MessageBreak}%
+  \endswitch%
 }
 
 % References to external figures, equations, etc.