From: W. Trevor King Date: Sun, 24 Jun 2012 08:21:34 +0000 (-0400) Subject: Rename \U to \unit in wtk_cmmds.sty. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=HEAD;p=problempack.git Rename \U to \unit in wtk_cmmds.sty. I ran into a collision while working on my thesis: ! LaTeX Error: Command \U already defined. Or name \end... illegal, see p.192 of the manual. ... ! LaTeX Error: Command \U unavailable in encoding OT1. Debugging with `\show\U`, I got: > \U=macro: ->\PU-cmd \U \PU\U . which seems to be something relating to fonts. The new implementation still defines \U, but only if nobody else has beaten us to the punch. If they have, but you want \U to mean "unit", you can add \renewcommand{\U}[1]{\unit{#1}} after both the colliding package and wtk_cmmds.sty have been imported. This might break the other package, but hopefully they won't be relying on such a collidable name for critical internal functionality. --- diff --git a/wtk_cmmds.sty b/wtk_cmmds.sty index b249634..70d8f4a 100644 --- a/wtk_cmmds.sty +++ b/wtk_cmmds.sty @@ -36,7 +36,8 @@ \newtheorem{lem}{Lemma} % define a few physics shortcuts -\newcommand{\U}[1]{\textnormal{\ \bareU{#1}}} % units shortcut +\newcommand{\unit}[1]{\textnormal{\ \bareU{#1}}} % units shortcut +\providecommand{\U}[1]{\unit{#1}} \newcommand{\bareU}[1]{\textnormal{#1}} % units without preceding value \newcommand{\E}[1]{\ensuremath{\cdot 10 ^{#1}}} % exponent shortcut \newcommand{\dg}{\ensuremath{^{\circ}}} % degree symbol ^o