[OS X TeX] help with \newcommand
Ramón Figueroa-Centeno
ramonf at hawaii.edu
Sat Jun 5 10:10:39 EDT 2010
Aloha,
I want to define a new command that will make my life a lot easier. Here is
what I would like:
\newcommand{\foo}[1]{#1 $\#1$}
So that I could invoke it as "\foo{aleph}" I get the same as if I typed
"aleph $\aleph$" (no backslash on the first character).
Also, much harder (I think):
a command that would do URL encoding right from within LaTeX to pass
arguments to the hyperref package:
\newcommand{\foo2}[1]{\href{<#1 url encoded>}{#1}}
so that "\foo2{Hello you}" would yield the same as typing
"\href{http://Hello%20you}{Hello you}"
Thanks,
Ramón
--
View this message in context: http://macosx-tex.576846.n2.nabble.com/help-with-newcommand-tp5142889p5142889.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.
More information about the MacOSX-TeX
mailing list