summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ktv-texdata/ktv-test.tex
blob: 0c2f1bbc28f0c93a0798424c4006ef6a47ed9b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
%%
%% 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'.