CTAN Comprehensive TeX Archive Network

namedef – definitions with named parameters

This package provides a prefix \named to be used in definitions so that parameters can be identified by their name rather than by number, giving parameters a semantic rather than syntactic meaning, making it easy to understand long definitions.

A usual definition reads:

      \def\SayHello#1{Hello, #1!}
    

but with namedef you can replace #1 by, say, #[person]:

      \named\def\SayHello#[person]{Hello, #[person]!}
    

and \named will figure out the numbering of the parameters for you.

Sources/macros/generic/namedef
Documentation
Bug trackerhttps://github.com/PhelypeOleinik/namedef/issues
Repositoryhttps://github.com/PhelypeOleinik/namedef
Version1.0 2020-06-20
LicensesThe Project Public License 1.3c
Copyright2019–2020 Phelype Oleinik
MaintainerPhelype Oleinik
Contained inTeX Live as namedef
MiKTeX as namedef
TopicsDefining Macro
Generic Macros
Experimental 3

Download the contents of this package in one zip archive (630.2k).

Community Comments

Loading...

Announcements

Here you can see a respective diagram in newer browsers.

more

Package Links

Guest Book Sitemap Contact Contact Author