[texhax] Braces

Mark Bonnici comanche008 at yahoo.co.uk
Sun Mar 2 12:55:44 CET 2008


I need to put text in a parbox using an environment. I have defined the environment mybox to do this and tried to use it in my document as shown below:

 

\newenvironment{mybox}{%

  \parbox{5cm}{% \parbox text opening brace

}%

{ }% \parbox text closing brace

}

 

\begin{document}

 

\begin{mybox}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{mybox}

 

\end{document}

 

 

However, the text is not placed in a parbox. The output which I need is that given by the following code:

 

\begin{document}

 

\parbox{5cm}{

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

}

 

\end{document} 

 

 

Thanks

 

Mark

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20080302/a0b6a9fa/attachment.html 


More information about the texhax mailing list