%%
%% This is file `ktv-test.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ktv-texdata.dtx  (with options: `example')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from ktv-test.tex.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file ktv-texdata.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\documentclass{article}
\usepackage{ktv-texdata}

\usepackage{amsthm}

\def\back:{$\backslash$}

\begin{document}

\begin{center}
\Large\bf TEST :: package == {\tt ktv-texdata.sty}
\end{center}

\section{Create a data file}
See file {\tt ktv-data.tex}.
There're three part in the data file.
In the first and the last part, all `\verb~bxx~'
specify their own environment. In the second part,
the data items omit the enrironment (use default).

There're some special data items:
the \verb~\bxx(yyy)2;..\exx~ is followed by a hint,
the \verb~\bxx(yyy)[TT]5;..\exx~ specifies
an optional argument for enrivonment \verb~yyy~.

\section{Define the envrinoment}
\begin{verbatim}
\theoremstyle{definition}
\newtheorem{xxx}{XX}
\newtheorem{zzz}{ZZ}
\newtheorem{yyy}{YY}
\end{verbatim}
\theoremstyle{definition}
\newtheorem{xxx}{XX}
\newtheorem{zzz}{ZZ}
\newtheorem{yyy}{YY}

\section{Specified default environment by \back:env(xxx)}

\xenv(xxx)

\begin{verbatim}
\xenv(xxx)
\end{verbatim}
You should specify the default enrironment
before any calling to \back:xget, \back:xkill, \back:xgetll,
\back:xkillall, etc.

Otherwise, if your data file contains some `\verb|bxx|'
that doesnot specify the environment, you will receive an error!
(In the source code of the test, remove the line \back:env(xxx)
to see what will be going.)

\section{Specified data file by \back:env(xxx)}
\xlib ktv-data;

\begin{verbatim}
\xlib ktv-data;
\end{verbatim}
You also specify the the library, or data file.
The above specification affects on any \back:xopenlib;
that's put after this line in the source code of the test.

\section{\back:xget\{2,4\}}
\begin{verbatim}
\xget{2,4}
\xopenlib;
\end{verbatim}
\xget{2,4}
\xopenlib;

\section{Uneffect \back:xenv(zzz) after \back:xget\{1,4\}}
\begin{verbatim}
\xget{1,4}
\xenv(zzz)
\xopenlib;
\end{verbatim}
This example illustrate that any \back:xenv(...)
that follows a \back:xget doesnot take any affect on that \back:xget.
Try to figure out this illustration.
\xget{1,4}
\xenv(zzz)
\xopenlib;

\section{Now use \back:xenv(yyy)}
...to change the default environment to zzz.
\begin{verbatim}
\xenv(yyy)
\end{verbatim}
\xenv(yyy)

\section{Use \back:xgetallbut(zzz)\{1,2\}}
\begin{verbatim}
\xgetallbut(zzz){1,2}
\xopenlib;
\end{verbatim}
\xgetallbut(zzz){1,2}
\xopenlib;

\section{Use \back:xkillallbut(zzz)\{1,2\}}
\begin{verbatim}
\xkillallbut(zzz){1,2}
\xopenlib;
\end{verbatim}
\xkillallbut(zzz){1,2}
\xopenlib;

\section{Use \back:xspec}
This macro reserves the order of the `bxx'
that you specify in the argument.

\subsection{This is \back:xspec\{1,5,2\}}
\begin{verbatim}
\xspec{1,5,2}
\end{verbatim}
This calling uses default environment  \verb~zzz~.
\xspec{1,5,2}

\subsection{This is \back:xspec(zzz)\{1,5,2\}}
\begin{verbatim}
\xspec(zzz){1,5,2}
\end{verbatim}
\xspec(zzz){1,5,2}

\section{Turn off the details by \back:xdetailoff}
\xdetailoff
\begin{verbatim}
\xdetailoff
\end{verbatim}
You now cannot see anything on the right margin.

\section{Hint}
\begin{verbatim}
\xopenhint
\end{verbatim}
Some exercise should have a hint.\\
Of course, only hints of the active `bxx' will be accepted.
\xopenhint

\section{Now the time you try the package yourself!}
Thank you for your enjoying.\\[3mm]
Please send any bug, report,... to the author at
\begin{verbatim}
                      kyanh@linuxmail.org
\end{verbatim}
\end{document}
\endinput
%%
%% End of file `ktv-test.tex'.