[pdftex] pdflatex or color.sty bug in environments

ivo welch ivo.welch at yale.edu
Sun May 30 20:42:23 CEST 2004


Hi chaps:  I have found a very strange behavior, that I believe to be 
either a bug in pdflatex (web2c 7.4.5) 3.14159-1.10b or in color.sty.  I 
am enclosing an example below.  when I use plain latex, the paragraphs 
end up black, the questions (EV) end up red---which is correct. when I 
use pdflatex, and if the questions wrap around the page below the 
paragraphs, the entire page ends up red, including the paragraphs, which 
is incorrect.

I hope this helps.   regards,  /ivo

--------------------------------------------------



\documentclass[11pt]{article}

\usepackage{color}
\usepackage{doublespace}
\setstretch{1.0}

\begin{document}

\newcommand{\onepara}{This is a paragraph, typeset in black. This is a
  paragraph, typeset in black. This is a paragraph, typeset in black. This
  is a paragraph, typeset in black. This is a paragraph, typeset in black.
  This is a paragraph, typeset in black. This is a paragraph, typeset in
  black. This is a paragraph, typeset in black. This is a paragraph, typeset
  in black. This is a paragraph, typeset in black. This is a paragraph,
  typeset in black. This is a paragraph, typeset in black. This is a
  paragraph, typeset in black. This is a paragraph, typeset in black. This
  is a paragraph, typeset in black. This is a paragraph, typeset in black.
  This is a paragraph, typeset in black. This is a paragraph, typeset in
  black. This is a paragraph, typeset in black. This is a paragraph, typeset
  in black. \par}

\onepara
\onepara
\onepara

\newcommand{\txt}{This is a question, typeset in red. This is a question,
  typeset in red. This is a question, typeset in red. This is a question,
  typeset in red.}

\newcommand{\onelater}{\begin{queryenv}{\color{red}\txt}\end{queryenv}}  
% this works.

% this screws up.  the entire page ends up being typeset in red, 
including \onepara
\newtheorem{queryenv}{EV}
\newcommand{\query}[1]{{\begin{queryenv}\color{red}#1\end{queryenv}\color{black}}}
\renewcommand{\onelater}[1]{\query{\txt}}

\onelater

\onelater

\onelater

\onelater

we are done.


\end{document}



More information about the pdftex mailing list