\begin{ignore}
...
\end{ignore}
The alternative of painstakingly prepending every line with '%' (and
later deleting them) seems inefficient and error prone.
Thought this might be a FAQ, but can't find any reference to such a
thing.
thanks,
Grant
ftp://ftp.dante.de/tex-archive/macros/latex/contrib/other/comment.tar.gz
Sergio.
PS If you use a reasonable good editor: vi (clones: vim or elvis) or
emacs, it should be a piece of cake to insert as many %'s at the
beginning of as many lines as you want...
| [...] whether there is a LaTeX command or environment that allows
| one to easily exclude a large block of text from being processed
The comment environment in the verbatim package.
Another possibility, which I frequently use, is
\iffalse
...
\fi
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Yes it works in practice - but does it work in theory?
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=conditional
--
Robin Fairbairns, Cambridge -- rf10 at cam dot ac dot uk
\newenvironment{ignore}{}{}
> Oops, sorry -- my previous post should have said:
>
> \newenvironment{ignore}{}{}
Well, if you were longing for public embarrassment, perhaps it should
have said that.
Think about it. Or try it out.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David....@t-online.de
don't try this at home, folks ;-)
the faq answer does mention gobble commands, but dismisses them
because they're inappropriate for large chunks of comment, and prone
to being confused by perfectly reasonable comment text.
: Well, if you were longing for public embarrassment, perhaps it should
: have said that.
Well. He defines an environment "ignore". The definition body is empty,
so nothing happens. The four lines
%
\begin{ignore}
\end{ignore}
%
should produce no text, or do they ?-)
Oliver.
--
Dr. Oliver Corff e-mail: co...@zedat.fu-berlin.de
Consider placing the large block of text in a separate file. Then use
the \input command to include the large block of text in the main
file. If you don't want to process the large block of text, simply
place a '%' in front of the \input line.
I hope this helps.
Jonathan Dentch
Grant <gpe...@aos.wisc.edu> wrote in message news:<3C51B8A2...@aos.wisc.edu>...
> Hi - I'd like to find out whether there is a LaTeX command or
> environment that allows one to easily exclude a large block of text from
> being processed, kind of like the /* and */ delimiters in C. E.g.,
>
> \begin{ignore}
> ...
> \end{ignore}
>
> The alternative of painstakingly prepending every line with '%' (and
> later deleting them) seems inefficient and error prone.
Do it with your editor? If your editor does not support block
commenting, use a different editor.
--
Peter Boettcher
MIT Lincoln Laboratory
boet...@ll.mit.edu
(781) 981-5275
\usepackage{verbatim}
\begin{comment}
....
\end{comment}
Looks like something your looking for. Hope it helps.
Chris
I got this from someone and I have used it without difficulty:
\def\comment{\begingroup
\let\do=\makeother \dospecials
\endlinechar`\^^M \catcode`\^^M=12 \xcomment }
{\escapechar=-1 \xdef\endcomment{\string\\endcomment}
}
You start it with \comment and end with \endcomment. I believe that
the \endcomment must appear on a line by itself.
and \xcomment comes from which package? it looks intriguing stuff,
whatever it is.
Very sorry; I included only half the code. Here is the full shot:
\def\makeother#1{\catcode`#1=12}
{\catcode`\^^M=12 \endlinechar=-1 %
\gdef\xcomment#1^^M{\def\test{#1}
\ifx\test\endcomment \let\next=\endgroup
\else \let\next=\xcomment \fi
\next}
}
\def\comment{\begingroup
\let\do=\makeother \dospecials
\endlinechar`\^^M \catcode`\^^M=12 \xcomment }
{\escapechar=-1 \xdef\endcomment{\string\\endcomment}
}
I still don't recall who gave me this code. Maybe Donald Arsenau.
There was a wide variety of responses to my question. One of them was
exactly what I was looking for, and that was the suggestion to use the
'comment' environment provided by the 'verbatim' package.
Some of the other suggestions, like using an EMACS macro to
"efficiently" insert or delete '%' at the beginning of a series of lines
is what I had already been doing. My main objection to this method is
that if, by chance, a block of text gets reformatted (e.g., Esc-Q in
EMACS), then suddenly you have all your '%' characters embedded at
random locations within the text, rather than at the beginning of the
line where they belong.
Another suggestion, \newenvironment{ignore}{}{}, doesn't look to me
like it should work. Wouldn't
\begin{ignore}
text to ignore
\end{ignore}
just expand to
{}
text to ignore
{}
?
- Grant
> Grant wrote:
>>
[snip]
> Another suggestion, \newenvironment{ignore}{}{}, doesn't look to me
> like it should work. Wouldn't
>
> \begin{ignore}
>
> text to ignore
>
> \end{ignore}
>
> just expand to
>
> {}
>
> text to ignore
>
> {}
>
> ?
>
>
> - Grant
>
Yes.
--
Y.Henel, TeXnicien de surface. (sorry but I cannot translate that (bad) pun)
> Grant <gpe...@aos.wisc.edu> wrote:
> >Hi - I'd like to find out whether there is a LaTeX command or
> >environment that allows one to easily exclude a large block of text from
> >being processed, kind of like the /* and */ delimiters in C.
> >
> >[...]
> >
> >Thought this might be a FAQ, but can't find any reference to such a
> >thing.
>
> http://www.tex.ac.uk/cgi-bin/texfaq2html?label=conditional
Hmm. I whizzed through the FAQ TOC looking for this answer (and note
that I knew the answer was there), and I didn't pick it out. I think a
different title for that section might help, but I can't think of an
greatly improved version of the top of my head.
The best I can come up with is `Conditional inclusion of text' - not
great, is it?
Rowland.
--
Remove the animal for email address: rowland....@dog.physics.org
PGP pub key 0x62DCCA78 Sorry - the spam got to me
http://www.mag-uk.org
UK biker? Join MAG and help keep bureaucracy at bay
> > Another suggestion, \newenvironment{ignore}{}{}, doesn't look to me
> > like it should work. Wouldn't
> >
> > \begin{ignore}
> > text to ignore
> > \end{ignore}
> >
> > just expand to
> >
> > {}
> > text to ignore
> > {}
> Yes.
No. More like
{
text to ignore
}
(with \begingroup and \endgroup for the braces, plus some
assignments and error checking for proper environment nesting.)
Donald Arseneau as...@triumf.ca