I am defining an environment for which the texts should be red.
I thought the bgroup and egroup will ensures that only the box is red, but the text following the box also becomes colored.
Doesn't a group keep it local and how can I change it in this case?
\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\newenvironment{comment}
{\par\medskip
\bgroup\color{red}%
\textbf{Hello: }
}
{
\egroup\medskip
}
\begin{document}
Test text begin below:
\comment{ Inside environment }
1234 (should be black) % but it is appearing red
\end{document}

\begin....\end` Also never ignore errors, if you get any error ask about the error message not about any PDF that is generated (which is never intended to be usable after an error) – David Carlisle Aug 14 '21 at 08:19