[OS X TeX] Scandinavian {\aa} ??
Bruno Voisin
bvoisin at mac.com
Tue Mar 25 17:51:43 EDT 2008
Le 25 mars 08 à 22:33, Maarten Sneep a écrit :
> But avoid \def unless you _really_ know what you're doing, and
> single letter macros are just too dangerous.
By the way, do you know a way to write a command defining another
command and not involving \def?
For example, in a custom fax class I once wrote:
\newcommand*{\subject}[1]{\def\thesubject{#1}}
\newcommand*{\noofpages}[1]{\def\thenoofpages{#1}}
\subject{}
\noofpages{}
which mimics code from letter.cls such as
\newcommand*{\name}[1]{\def\fromname{#1}}
\newcommand*{\signature}[1]{\def\fromsig{#1}}
\newcommand*{\address}[1]{\def\fromaddress{#1}}
\newcommand*{\location}[1]{\def\fromlocation{#1}}
\newcommand*{\telephone}[1]{\def\telephonenum{#1}}
\name{}
\signature{}
\address{}
\location{}
\telephone{}
and is used as in \subject{Scandinavian letter}.
I tried replacing \def by \newcommand, but that just didn't work.
Bruno
More information about the MacOSX-TeX
mailing list