CTAN update: newcommand

CTAN Announcements ctan-ann at dante.de
Wed Jun 2 14:52:09 CEST 2010

This should reach your local mirror within a day.

Jim Hef{}feron
Saint Michael's College


The following information was provided by our fellow contributor:

Name of contribution: newcommand
Version number: 2.0
Author's name: Scott Pakin
Location on CTAN: /support/newcommand
Summary description: Easily create macros utilizing sophisticated argument processing
License type: lppl

Announcement text: 
LaTeX's \newcommand is fairly limited in the way it processes optional
arguments, but the TeX alternative, a batch of \defs and \futurelets,
can be overwhelming to the casual LaTeX user.  newcommand.py is a
Python program that automatically generates LaTeX macro definitions
for macros that require more powerful argument processing than
\newcommand can handle.  newcommand.py is intended for LaTeX advanced
beginners (i.e., those who know how to use \newcommand but not
internal LaTeX2e commands such as \@ifnextchar) and for more advanced
users who want to save some typing when defining complex macros.

With newcommand.py, the user specifies a template for a macro's
arguments.  newcommand.py then custom-generates a macro definition
according to the user's specifications and includes a user-friendly
"Put code here" comment to indicate where the macro's main code should
appear.  newcommand.py supports arbitrary interleavings of required
and optional arguments, starred macros, mandatory literal text, macros
with more than nine arguments, optional arguments delimited by
parentheses instead of square brackets, and optional arguments whose
value defaults to the value given for a prior argument.  The generated
macros can easily be pasted into a LaTeX document and edited as

This version (2.0) represents a major rewrite of newcommand.py.  New
features include improved code generation, support for starred macros,
and support for more than nine macro arguments.


This package is located at 
.  More information is at
(if the package is new it may take a day for that information to 
appear).  We are supported by the TeX Users Group http://www.tug.org .  
Please join a users group; see http://www.tug.org/usergroups.html .

More information about the Ctan-ann mailing list