%% $ parenactive.sty $
%%
%% �ѱ�(hangul-k) �������� ��ȣ �ȿ� �ؽ�Ʈ�� ��ִ� ���
%% ��ȣ���� ��ٲ��� �Ͼ�� �ʾƼ� Overfull�� ����� ������
%% ó���ϱ� ���Ͽ� �ۼ��� ��Ÿ��. �� �۵��ϱ⸸�� �ٶ�. ^^;
%%
%% Written by Karnes. 2004/07/28
%% provides \makeparenactive, \makeparenother commands.
%% user interface: \sparen{#1}
%%

\def\tmpleftparenchar{%
	(%
}
\def\tmprightparenchar{%
	)%
}

\catcode`\(=\active
\catcode`\)=\active
\def ({\ifvmode\leavevmode\fi\space\hskip -.3em\tmpleftparenchar\nolinebreak}
\def ){\ifvmode\leavevmode\fi\nolinebreak\tmprightparenchar\space\hskip -.3em}

\def\defineparencharactivecode{%
	\def ({\ifvmode\leavevmode\fi\space\hskip -.3em\tmpleftparenchar\nolinebreak}%
	\def ){\ifvmode\leavevmode\fi\nolinebreak\tmprightparenchar\space\hskip -.3em}%
}
\def\makeparenother{%
	\catcode`\(=12
	\catcode`\)=12
}

\providecommand\makeparenactive{%
	\catcode`\(=\active
	\catcode`\)=\active
	\defineparencharactivecode
}

\newcommand\sparen[1]{%
	\makeparenactive ({#1})\makeparenother
}

\AtEndOfPackage{\makeparenother}
\AtBeginDocument{\makeparenother} 

%\makeparenother

\endinput

%% end of `parenactive.sty'.
