\newtheorem{ex}[thm]{Example}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentEnvironment{exam} { o }
{\IfNoValueTF{#1}
{\begin{ex}\begin{oframed}}{\begin{ex}[#1]\begin{oframed}}
\ignorespaces
}
{\end{oframed}\end{ex}}
\ExplSyntaxOff
No comments:
Post a Comment