Help with parsing bracketed parameters (non WinEdt related question)
Subject: Help with parsing bracketed parameters (non WinEdt related question)
Newsgroups: gmane.editors.winedt
Date: 2008-04-16 16:50:34 GMT
Hi,
This is a non-WinEdt related question... but elsewhere I've found no help with it!
I'm writing a class style for LaTeX. But I want my commands to parse optional commands enclosed in [ ].
I know I must use something like \ <at> ifnextchar[ , but I haven't been able to understand the examples I've looked up in the net. I found out, though, that the syntax of such a command is:
\ <at> ifnextchar<char>{truecase}{falsecase}
My problem is how to incorporate it in the command.
Note that I don't want to parse optional parameters with the LaTeX 2e command-definition syntax (\newcommand{\name}[1][1]...), since this doesn't allow me to use bracketed optionals.
Any tips?
Thanks in advance.
Nicolas Vaughan
RSS Feed