On Sun, Nov 16, 2003 at 04:45:02PM -0600, William L. Jarrold wrote:
> Hi,
> 
> I want to write a little latex macro command that basically
> works like a comment.  Does anyone know how to do this?
> 
> E.g. In my foo.tex file I might have this...
> 
> Now is the time \comment{Yeah, right buddy!} for all good men to
> come to the aid of their country.
> 
> ...but the final document has merely this...
> 
> Now is the time for all good men to come to the aid of their country.
> 
> ...The way I know how to make my own little macros is with something
> called \newcommand...Yes, of course I know there is the latex comment
> chraracter, %.  I do not want to use that.  Rather, I want to embed
> comments directly in the text...If I have a little function like \comment,
> then I gain a simple toggle-like functionality.  In particular, by making
> a teency edit to the definition of \comment at the top of foo.tex I can
> easily toggle the hiding/revealing of all the scads of buried comments
> that might lurk in foo.tex.
> 
> So, does anyone know how to achieve this w/o much fuss?
> 
> Bill

You should be able to simply use \newcommand to make a command that
takes your comment as an argument and doesn't give anything back.
Something like:

    \newcommand\comment[1]{}

The [1] declares it to take 1 argument, and the {} is just \comment not
doing anything. To toggle hiding/revealing, you should be able to just
change it to:

    \newcommand\comment[1]{#1}

#1 is the argument passed in, so

    \comment{Yeah, right buddy!}

should be replaced with

    Yeah, right buddy!

hth

 danb

-- 
Daniel Brown
www.cs.utexas.edu   www.utacm.org
_______________________________________________
Siglinux mailing list
[EMAIL PROTECTED]
http://machito.utacm.org/mailman/listinfo/siglinux

Reply via email to