[texhax] Braces
Mark Bonnici
comanche008 at yahoo.co.uk
Sun Mar 2 14:53:37 CET 2008
Thanks for your reply but what if I need something like this
\newenvironment{mybox}{%
\textbf {% \textbf opening brace
}%
{ }% \textbf closing brace
}
\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.
\end{mybox}
The text will not be in bold. Now, I know that I can use \bfseries instead of \textbf but I need a solution for any command which does not have a corresponding environment.
Thanks.
-----Original Message-----
From: Lars Madsen [mailto:daleif at imf.au.dk]
Sent: 02 March 2008 13:38
To: Mark Bonnici
Subject: Re: [texhax] Braces
Mark Bonnici wrote:
> 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
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
your question has already been answered on comp.text.tex, the
environment equivalent to \parbox is the minipage environment
/daleif
___________________________________________________________
"My Verdict: The new Yahoo! Mail is far superior..." The Wall Street Journal.
http://uk.docs.yahoo.com/nowyoucan.html
More information about the texhax
mailing list