Text FormattingEnvironment? To print text in draft mode only?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
jamesqf
Posts: 2
Joined: Sun Sep 12, 2010 6:28 am

Environment? To print text in draft mode only?

Post by jamesqf »

Is there an environment (or can I easily write one?) which will output a section of text (possibly many paragraphs) in draft mode, but omit it entirely in final?

I'm writing a document, and each chapter (and some sections, etc) begins with an outline of the chapter and some notes about e,g, what I need to add. I'd like to keep this for reference, and have it appear in drafts, but not in the final document.

So what I would have would look something like this:

Code: Select all

\begin {ChaptOutline}
  \begin {framed}
     \begin {outline}
       ... the outline text...
     \end {outline}
     ... and maybe some comments...
  \end {framed}
\end {ChapOutline}
\chapter {the title}
Is there an easy way to do this?

Thanks,
James

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Environment? To print text in draft mode only?

Post by frabjous »

Take a look at the comment package.
jamesqf
Posts: 2
Joined: Sun Sep 12, 2010 6:28 am

Environment? To print text in draft mode only?

Post by jamesqf »

Thanks - the comment package does just about what I want.

Unfortunately, it seems to have an annoying bug. If I write the commands as I normally would

Code: Select all

\begin {comment}
  This is a comment
\end {comment}
Latex comes to a screeching halt with a message about "Runaway argument...". But if I mangle the formatting by taking out the space

Code: Select all

\begin{comment}
  This is a comment
\end{comment}
it works. Anyone know how to fix this? I looked at the code in the package, but I don't know enough about Tex programming to even make a guess at what it's doing.
Post Reply