summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/xnewcommand/xnewcommand.sty
blob: 69c70e12aa50896d0194867f1e9326e4ec95dd9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
% $Date: 2007-04-23 17:32:09 +0200 (Mon, 23 Apr 2007) $
% $Revision: 42 $
\def \filedate {2007/04/21}
\def \fileversion {v1.2}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{xnewcommand}%
  [\filedate \space \fileversion \space Improved newcommand (JN)]

\def \@star@or@long #1{%
  \@ifstar {\let \l@ngrel@x = \relax #1}%
           {\@testopt {\@@star@or@long {#1}}{\long}}%
}
\@ifdefinable \@@star@or@long
  {\def \@@star@or@long #1[#2]{\def \l@ngrel@x {#2}#1}}

\endinput