Debian Codegraph @

texmf-dist/doc/latex/ktv-texdata/ktv-test.tex

raw
1 %%
2 %% This is file `ktv-test.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ktv-texdata.dtx (with options: `example')
8 %%
9 %% IMPORTANT NOTICE:
10 %%
11 %% For the copyright see the source file.
12 %%
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from ktv-test.tex.
15 %%
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file ktv-texdata.dtx.
18 %%
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 \documentclass{article}
24 \usepackage{ktv-texdata}
25
26 \usepackage{amsthm}
27
28 \def\back:{$\backslash$}
29
30 \begin{document}
31
32 \begin{center}
33 \Large\bf TEST :: package == {\tt ktv-texdata.sty}
34 \end{center}
35
36 \section{Create a data file}
37 See file {\tt ktv-data.tex}.
38 There're three part in the data file.
39 In the first and the last part, all `\verb~bxx~'
40 specify their own environment. In the second part,
41 the data items omit the enrironment (use default).
42
43 There're some special data items:
44 the \verb~\bxx(yyy)2;..\exx~ is followed by a hint,
45 the \verb~\bxx(yyy)[TT]5;..\exx~ specifies
46 an optional argument for enrivonment \verb~yyy~.
47
48 \section{Define the envrinoment}
49 \begin{verbatim}
50 \theoremstyle{definition}
51 \newtheorem{xxx}{XX}
52 \newtheorem{zzz}{ZZ}
53 \newtheorem{yyy}{YY}
54 \end{verbatim}
55 \theoremstyle{definition}
56 \newtheorem{xxx}{XX}
57 \newtheorem{zzz}{ZZ}
58 \newtheorem{yyy}{YY}
59
60 \section{Specified default environment by \back:env(xxx)}
61
62 \xenv(xxx)
63
64 \begin{verbatim}
65 \xenv(xxx)
66 \end{verbatim}
67 You should specify the default enrironment
68 before any calling to \back:xget, \back:xkill, \back:xgetll,
69 \back:xkillall, etc.
70
71 Otherwise, if your data file contains some `\verb|bxx|'
72 that doesnot specify the environment, you will receive an error!
73 (In the source code of the test, remove the line \back:env(xxx)
74 to see what will be going.)
75
76 \section{Specified data file by \back:env(xxx)}
77 \xlib ktv-data;
78
79 \begin{verbatim}
80 \xlib ktv-data;
81 \end{verbatim}
82 You also specify the the library, or data file.
83 The above specification affects on any \back:xopenlib;
84 that's put after this line in the source code of the test.
85
86 \section{\back:xget\{2,4\}}
87 \begin{verbatim}
88 \xget{2,4}
89 \xopenlib;
90 \end{verbatim}
91 \xget{2,4}
92 \xopenlib;
93
94 \section{Uneffect \back:xenv(zzz) after \back:xget\{1,4\}}
95 \begin{verbatim}
96 \xget{1,4}
97 \xenv(zzz)
98 \xopenlib;
99 \end{verbatim}
100 This example illustrate that any \back:xenv(...)
101 that follows a \back:xget doesnot take any affect on that \back:xget.
102 Try to figure out this illustration.
103 \xget{1,4}
104 \xenv(zzz)
105 \xopenlib;
106
107 \section{Now use \back:xenv(yyy)}
108 ...to change the default environment to zzz.
109 \begin{verbatim}
110 \xenv(yyy)
111 \end{verbatim}
112 \xenv(yyy)
113
114 \section{Use \back:xgetallbut(zzz)\{1,2\}}
115 \begin{verbatim}
116 \xgetallbut(zzz){1,2}
117 \xopenlib;
118 \end{verbatim}
119 \xgetallbut(zzz){1,2}
120 \xopenlib;
121
122 \section{Use \back:xkillallbut(zzz)\{1,2\}}
123 \begin{verbatim}
124 \xkillallbut(zzz){1,2}
125 \xopenlib;
126 \end{verbatim}
127 \xkillallbut(zzz){1,2}
128 \xopenlib;
129
130 \section{Use \back:xspec}
131 This macro reserves the order of the `bxx'
132 that you specify in the argument.
133
134 \subsection{This is \back:xspec\{1,5,2\}}
135 \begin{verbatim}
136 \xspec{1,5,2}
137 \end{verbatim}
138 This calling uses default environment \verb~zzz~.
139 \xspec{1,5,2}
140
141 \subsection{This is \back:xspec(zzz)\{1,5,2\}}
142 \begin{verbatim}
143 \xspec(zzz){1,5,2}
144 \end{verbatim}
145 \xspec(zzz){1,5,2}
146
147 \section{Turn off the details by \back:xdetailoff}
148 \xdetailoff
149 \begin{verbatim}
150 \xdetailoff
151 \end{verbatim}
152 You now cannot see anything on the right margin.
153
154 \section{Hint}
155 \begin{verbatim}
156 \xopenhint
157 \end{verbatim}
158 Some exercise should have a hint.\\
159 Of course, only hints of the active `bxx' will be accepted.
160 \xopenhint
161
162 \section{Now the time you try the package yourself!}
163 Thank you for your enjoying.\\[3mm]
164 Please send any bug, report,... to the author at
165 \begin{verbatim}
166 [email protected]
167 \end{verbatim}
168 \end{document}
169 \endinput
170 %%
171 %% End of file `ktv-test.tex'.