[Tex/LaTex] rounded corners using the framed package

framedrounded-corners

Is it possible to create a frame, using the framed package, with rounded corners? I know for a fact that there are other packages such as the mdframed package but what I am looking for is an application only using the framed package.

EDIT


After looking at the answer below, I created the following environment:

\documentclass{article}
\usepackage{fancybox,framed}
\usepackage{lipsum}
\newenvironment{test}{%
\def\FrameCommand{\fboxsep=\FrameSep\ovalbox}
\MakeFramed{\advance\hsize-\width\FrameRestore}}
{\endMakeFramed}
\begin{document}
\begin{test}
\lipsum[1-2]
\end{test}
\end{document}

The only problem is that it shouts out a warning:

\oval, \circle, or \line size unavailable

Why?

PS. I did not want to post another question so just edited this one.

Best Answer

I am afraid that framed package cannot do that alone. But you can redefine \fbox or \FrameCommand to obtain this results with the usual command \fbox or the framed environment.

This need some complex TeX definitions that are already included in fancybox.sty. So, the most simple solution in to load also fancybox package and then make a very simple definitions including \ovalbox or \Ovalbox. Example:

\documentclass{article}
\usepackage{fancybox,framed}
\renewcommand\fbox[1]{\Ovalbox{#1}}
\renewcommand*\FrameCommand{\ovalbox}
\begin{document}
Some text 
\begin{framed}
A framed environment example ...
\end{framed}
Some text
\vspace{2cm}
Some text 
\fbox{Simple framed box} 
Some text 
\end{document}

But I think that is more clear, more intuitive and less problematic use \Ovalbox or \ovalbox directly and left \fbox for rentangular boxes.


About colors asked in azetina comment, as far I now fancybox do not have color options, but is not difficult to obtain a colored border. See Enumerate over two columns in tabular environment for a example. A colored background seem more complicated (for me), so my advise is left definitively \fbox and fancybox and use the tcolorbox or mdframed packages, both excellent alternatives with many interesting options. There are a lot examples here, just some are in: