%%
%% This is file `cnx.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cnx.dtx  (with options: `cls')
%% 
\RequirePackage{keyval}
\RequirePackage{graphicx}
\DeclareOption{letterpaper}
   {\setlength\paperheight {11in}%
    \setlength\paperwidth  {8.5in}}
\DeclareOption{a4paper}
   {\setlength\paperheight {297mm}%
    \setlength\paperwidth  {210mm}}
\ExecuteOptions{letterpaper}
\ProcessOptions
\input{size10.clo}
\pagenumbering{roman}
\define@key{cnxmodule}{name}{\def\cnx@title{#1}}
\define@key{cnxmodule}{id}{}
\newenvironment{cnxmodule}[1][]{\setkeys{cnxmodule}{#1}}{}
\newenvironment{ccontent}{}{}
\newcounter{section}
\define@key{sectioning}{id}{}
\newenvironment{csection}[2][]%
{\stepcounter{section}\strut\\[1.5ex]\noindent%
{\Large\bfseries\arabic{section}.~{#2}}\\[1.5ex]
\setkeys{sectioning}{#1}}
{}
\newcounter{subsection}[section]
\newenvironment{csubsection}[2][]
{\refstepcounter{subsection}\strut\\[1ex]\noindent%
{\large\bfseries{\arabic{section}.\arabic{subsection}.~#2\\[1ex]}}%
\setkeys{sectioning}{#1}}%
{}
\newcounter{subsubsection}[subsection]
\newenvironment{csubsubsection}[2][]
{\refstepcounter{subsubsection}\strut\\[.5ex]\noindent
{\bfseries\arabic{section}.\arabic{subsection}.\arabic{subsubsecction}~#2\\[.5ex]}%
\setkeys{sectioning}{#1}}{}
\define@key{para}{id}{}
\newenvironment{cpara}[1][]{\setkeys{para}{#1}}{\par}
\define@key{note}{id}{}
\define@key{note}{type}{\def\note@type{#1}}
\newenvironment{cnote}[1][]%
{\setkeys{note}{#1}\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries\note@type}:~}%
{\end{minipage}\hfill\strut\par}
\define@key{equation}{id}{}
\newenvironment{cequation}[1][]%
{\setkeys{equation}{#1}\begin{displaymath}}
{\end{displaymath}}
\define@key{cquote}{id}{}
\define@key{cquote}{type}{}
\define@key{cquote}{src}{}
\newenvironment{cquote}[1][]{%
\setkeys{cquote}{#1}\begin{center}\begin{minipage}{.8\textwidth}}{\end{minipage}\end{center}}
\newcommand{\litem}[2][]{\item[#1]\label{#2}}
\define@key{example}{id}{}
\define@key{example}{name}{\def\example@name{#1}}
\newenvironment{cexample}[1][]{\setkeys{example}{#1}
{\@ifundefined{example@name}{}{\noindent\bfseries{\example@name}}}}
{}
\newcounter{cexercise}
\define@key{cexercise}{id}{}
\define@key{cexercise}{name}{\def\cexercise@name{#1}}
\newenvironment{cexercise}[1][]{\setkeys{cexercise}{#1}
{\@ifundefined{cexercise@name}{}{\stepcounter{cexercise}\noindent\bfseries{\cexercise@name~\arabic{cexercise}}}}}
{}
\define@key{cproblem}{id}{}
\newenvironment{cproblem}[1][]{\setkeys{cproblem}{#1}}{}{}
\define@key{csolution}{id}{}
\newenvironment{csolution}[1][]{\setkeys{csolution}{#1}}{\par\noindent\bfseries{Solution}}{}
\define@key{rule}{id}{}
\define@key{rule}{name}{\def\rule@name{#1}}
\define@key{rule}{type}{\def\rule@type{#1}}
\newenvironment{crule}[1][]{\setkeys{rule}{#1}%
{\noindent\bfseries{\rule@type:}\@ifundefined{rule@name}{}{~(\rule@name)}}}%
{}
\define@key{statement}{id}{}
\newenvironment{statement}[1][]{\setkeys{statement}{#1}}{}
\define@key{proof}{id}{}
\newenvironment{proof}[1][]{\setkeys{proof}{#1}}{}
\define@key{definition}{term}{}
\define@key{definition}{id}{}
\define@key{definition}{seealso}{}
\newenvironment{definition}[1][]{\setkeys{definition}{#1}{\noindent\bfseries{Definition:}}}{}
\define@key{meaning}{id}{}
\newenvironment{cmeaning}[1][]{\setkeys{meaning}{#1}}{}
\define@key{cnxn}{document}{\def\cnxn@doc{#1}}
\define@key{cnxn}{target}{\def\cnxn@target{#1}}
\define@key{cnxn}{strength}{}
\newcommand{\cnxn}[2][]% keys, link text
{\setkeys{cnxn}{#1}{\underline{#2}}\footnote{{\ttfamily\@ifundefined{cnxn@doc}{\cnxn@doc}{}\#\cnxn@target}}}
\newcommand\@makefntext[1]{\parindent 1em\noindent\hb@xt@1.8em{\hss\@makefnmark}#1}
\define@key{link}{src}{}
\newcommand{\link}[2][]{\setkeys{link}{#1}\underline{#2}}
\define@key{cfigure}{id}{\def\cf@id{#1}}
\define@key{cfigure}{type}{}
\define@key{cfigure}{caption}{\def\cf@caption{#1}}
\newcounter{figure}
\newcommand{\cfigure}[3][]{% cnx_keys, graphicx_keys, path
\begin{center}%
\includegraphics[#2]{#3}%
\setkeys{cfigure}{#1}%
\@ifundefined{cfigure@caption}{}{{\par\noindent Figure\refstepcounter{figure}} {\arabic{figure}}: \cf@caption%
\protected@edef\@currentlabel{\arabic{figure}}%
\@ifundefined{cf@id}{}{\label{\cf@id}}}%
\end{center}}
\define@key{ccite}{src}{}
\newcommand{\ccite}[2][]{\setkeys{ccite}{#1}\emph{#2}}
\newcommand{\term}[1]{{\bfseries\underline{#1}}}
\define@key{metadata}{version}{}
\define@key{metadata}{created}{}
\define@key{metadata}{revised}{}
\newsavebox{\metadatabox}
\newenvironment{metadata}[1][]%
{\noindent\hfill\begin{lrbox}{\metadatabox}
\begin{minipage}{.8\textwidth}%
{\Large\bfseries CNX Module: \cnx@title\hfill\strut}\\[2ex]}%
{\end{minipage}\end{lrbox}\fbox{\usebox\metadatabox}\hfill}
\newenvironment{authorlist}{{\bfseries{Authors}:~}}{\\[1ex]}
\newenvironment{maintainerlist}{{\bfseries{Maintainers}:~}}{\\[1ex]}
\define@key{auth}{id}{}
\define@key{auth}{honorific}{\def\auth@honorific{#1}}
\define@key{auth}{firstname}{\def\auth@first{#1}}
\define@key{auth}{other}{\def\auth@other{#1}}
\define@key{auth}{surname}{\def\auth@sur{#1}}
\define@key{auth}{lineage}{\def\auth@line{#1}}
\define@key{auth}{email}{}
\newcommand{\cnxauthor}[1][]{\setkeys{auth}{#1}\auth@first~\auth@sur,}
\newcommand{\maintainer}[1][]{\setkeys{auth}{#1}\auth@first~\auth@sur,}
\newenvironment{keywordlist}{\bfseries{Keywords}:~}{\\[1ex]}
\newcommand{\keyword}[1]{#1,}
\newenvironment{cnxabstract}%
{\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries{Abstract}:~}}%
{\end{minipage}\hfill}
\endinput
%%
%% End of file `cnx.cls'.
