From: Aditya Mahajan <adityam@umich.edu>
Subject: Re: multiple line comments
Date: Tue, 28 Mar 2006 10:05:51 -0500 (EST) [thread overview]
Message-ID: <Pine.WNT.4.63.0603281003420.3288@nqvgln> (raw)
In-Reply-To: <44290EEF.2010608@elvenkind.com>
<--- On Mar 28, Taco Hoekwater wrote --->
>
>
> andrea valle wrote:
>> Dear all,
>> It's a bit tiring to start many lines always with %.
>> Is it possibile to have multiple line comments like in C
>>
>> \*
>> comments here
>> *\
>
> \iffalse
> comments here
> \fi
Be careful with this. From the UK tex FAQ
The simple \newcommand{\gobble}[1]{} and \iffalse ... \fi aren't
really satisfactory (as a general solution) for comments, since the
matter being skipped is nevertheless scanned by TeX, not always as you
would expect. The scanning imposes restrictions on what you're allowed
to skip; this may not be a problem in today's job, but could return to
bite you tomorrow. For an example of surprises that may come to bite
you, consider the following example (derived from real user
experience):
\iffalse % ignoring this bit
consider what happens if we
use \verb|\iftrue| -- a surprise
\fi
The \iftrue is spotted by TeX as it scans, ignoring the \verb command;
so the \iffalse isn't terminated by the following \fi. Also, \gobble
is pretty inefficient at consuming anything non-trivial, since all the
matter to be skipped is copied to the argument stack before being
ignored.
Aditya
next prev parent reply other threads:[~2006-03-28 15:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 10:04 andrea valle
2006-03-28 10:24 ` Taco Hoekwater
2006-03-28 11:09 ` Hans Hagen
2006-03-28 11:47 ` andrea valle
2006-03-28 12:32 ` Hans Hagen
2006-03-28 13:03 ` andrea valle
2006-03-28 15:05 ` Aditya Mahajan [this message]
2006-03-28 16:13 ` Hans Hagen
2006-03-28 16:37 ` Hans Hagen
2006-03-29 7:16 ` r.ermers
2006-03-28 21:30 ` John R. Culleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.WNT.4.63.0603281003420.3288@nqvgln \
--to=adityam@umich.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).