I am using the function hl from package soul to highlight text. I would like to create a specific environment, that would be used for the highlighting. I tried with newenvironment, but did not figure how to get it right (see also this post). I tried also using the package environ to define a new environment, but am now facing an error message from soul: Package soul Error: Reconstruction failed. I came across hyphenatable material enclosed in group braces,
which I can't handle. Either drop the braces or make the material
unbreakable using an \mbox (\hbox).
Any idea how I can embed hl into an evnironment?
Thanks!
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{environ}
\usepackage{color,soul}
\NewEnviron{newtext}{\hl{\BODY}}
%\NewEnviron{newtext}{\BODY}
\begin{document}
\hl{I work well when called as a function }
\begin{newtext} I don't seem to work when called as an enviornment. \end{newtext}
\end{document}


