CTAN Comprehensive TeX Archive Network

CTAN update: newcommand

Date: June 2, 2010 8:52:09 AM CEST
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 desired. 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 http://tug.ctan.org/tex-archive/support/newcommand . More information is at http://tug.ctan.org/pkg/newcommand (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 .

newcommand – Generate new command definitions

Generating any other than the simple \newcommand-style commands, in , is tedious (in the least). This script allows the specification of commands in a ‘natural’ style; the script then generates macros to define the command.

Copyright2008 Scott Pakin
MaintainerScott Pakin



Guest Book Sitemap Contact Contact Author