| 1 |
% Documentation of tkz-euclide |
| 2 |
% Copyright 2022 Alain Matthes |
| 3 |
% This work may be distributed and/or modified under the |
| 4 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 5 |
% of this license or (at your option) any later version. |
| 6 |
% The latest version of this license is in |
| 7 |
% http://www.latex-project.org/lppl.txt |
| 8 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 9 |
% version 2005/12/01 or later. |
| 10 |
% |
| 11 |
% This work has the LPPL maintenance status “maintained”. |
| 12 |
% |
| 13 |
% The Current Maintainer of this work is Alain Matthes. |
| 14 |
|
| 15 |
% |
| 16 |
% The author of the original code |
| 17 |
% of the environment 'codeexample' is Till Tantau |
| 18 |
% from the file pgfmanual-en-macros.tex |
| 19 |
% (Copyright 2006 by Till Tantau) |
| 20 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 21 |
% H I G H L Y E X P E R I M E N T A L |
| 22 |
%<---------------------------------------------------------------------------> |
| 23 |
\NeedsTeXFormat{LaTeX2e} |
| 24 |
\ProvidesPackage{tkzexample}[2022/07/14 v1.45c (code and graphic)] |
| 25 |
\RequirePackage{calc,mdframed,fancyvrb} |
| 26 |
\newif\iftkzcodesaved |
| 27 |
\DeclareOption{saved}{\tkzcodesavedtrue} |
| 28 |
\ProcessOptions\relax |
| 29 |
%<---------------------------------------------------------------------------> |
| 30 |
\colorlet{graphicbackground}{white} |
| 31 |
\colorlet{codebackground}{white} |
| 32 |
\colorlet{codeonlybackground}{white} |
| 33 |
\colorlet{numbackground}{white} |
| 34 |
\colorlet{textcodecolor}{black} |
| 35 |
\colorlet{numcolor}{gray} |
| 36 |
%<---------------------------------------------------------------------------> |
| 37 |
\def\code@style{\small\ttfamily} |
| 38 |
\makeatletter |
| 39 |
\newcounter{code@cnt}% |
| 40 |
|
| 41 |
\ifx\scantokens\@undefined |
| 42 |
\PackageError{tkzexample}{You need to use extended latex |
| 43 |
(elatex) or (pdfelatex) to use this package}{} |
| 44 |
\fi |
| 45 |
|
| 46 |
% Define \find@tkzexample such that it doesn't destroy catcodes: |
| 47 |
\begingroup |
| 48 |
\catcode`|=0 |
| 49 |
\catcode`[= 1 |
| 50 |
\catcode`]=2 |
| 51 |
\catcode`\{=12 |
| 52 |
\catcode `\}=12 |
| 53 |
\catcode`\\=12 |gdef|find@tkzexample#1\end{tkzexample}[|endoftkzexample[#1]] |
| 54 |
|endgroup |
| 55 |
|
| 56 |
\begingroup |
| 57 |
\catcode`|=0 |
| 58 |
\catcode`[= 1 |
| 59 |
\catcode`]=2 |
| 60 |
\catcode`\{=12 |
| 61 |
\catcode `\}=12 |
| 62 |
\catcode`\\=12 |gdef|find@tkzltxexample#1\end{tkzltxexample}[|endoftkzltxexample[#1]] |
| 63 |
|endgroup |
| 64 |
|
| 65 |
% define \returntospace. |
| 66 |
% |
| 67 |
% It should define NEWLINE as {}, spaces and tabs as \space. |
| 68 |
\begingroup |
| 69 |
\catcode`\^=7 |
| 70 |
\catcode`\^^M=13 |
| 71 |
\catcode`\^^I=13 |
| 72 |
\catcode`\ =13% |
| 73 |
\gdef\returntospace{\catcode`\ =13\def {\space}\catcode`\^^I=13\def^^I{\space}\catcode`\^^M=13\def^^M{}}% |
| 74 |
\endgroup |
| 75 |
|
| 76 |
\begingroup |
| 77 |
\catcode`\%=13 |
| 78 |
\catcode`\^^M=13 |
| 79 |
\gdef\commenthandler{\catcode`\%=13\def%{\@gobble@till@return}} |
| 80 |
\gdef\@gobble@till@return#1^^M{} |
| 81 |
\gdef\@gobble@till@return@ignore#1^^M{\ignorespaces} |
| 82 |
\gdef\typesetcomment{\catcode`\%=13\def%{\@typeset@till@return}} |
| 83 |
\gdef\@typeset@till@return#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}}\par} |
| 84 |
\gdef\typesetcommentnum{\catcode`\%=13\def%{\@typeset@till@return@num}} |
| 85 |
\gdef\@typeset@till@return@num#1^^M{{\def%{\char`\%}\textsl{\char`\%#1}} \@@par} |
| 86 |
\endgroup |
| 87 |
|
| 88 |
\let\tkz@frameset\colorbox |
| 89 |
\let\tkz@frameltxset\colorbox |
| 90 |
\newwrite\fileexample |
| 91 |
\newdimen\tkzexamplewidth |
| 92 |
\newdimen\tkz@hsep |
| 93 |
\tkz@hsep=0pt |
| 94 |
\newif\ifcode@execute |
| 95 |
\newif\ifcode@saved\code@savedfalse |
| 96 |
\newif\ifnum@show \num@showfalse |
| 97 |
\newif\ifcode@overhang |
| 98 |
\newbox\tkzexamplebox |
| 99 |
\newif\ifcode@vbox \code@vboxfalse |
| 100 |
% |
| 101 |
\pgfqkeys{/tkzexample}{% |
| 102 |
execute code/.is if = code@execute, |
| 103 |
show num/.is if = num@show, |
| 104 |
overhang/.is if = code@overhang, |
| 105 |
code only/.code = {\code@executefalse}, |
| 106 |
width/.code = {\setlength\tkzexamplewidth{#1}}, |
| 107 |
code/.code = {\colorlet{codebackground}{#1}}, |
| 108 |
graphic/.code = {\colorlet{graphicbackground}{#1}}, |
| 109 |
overhang/.code = {\code@overhangtrue}, |
| 110 |
num/.code = {\num@showtrue\setcounter{code@cnt}{1}}, |
| 111 |
numcolor/.code = {\colorlet{numcolor}{#1}}, |
| 112 |
numbkgcolor/.code = {\colorlet{numbackground}{#1}}, |
| 113 |
global num/.code = {\num@showtrue}, |
| 114 |
code style/.code = {\def\code@style{#1}}, |
| 115 |
normal/.code = {\def\code@size{\normalsize}}, |
| 116 |
small/.code = {\def\code@size{\small}}, |
| 117 |
very small/.code = {\def\code@size{\footnotesize}}, |
| 118 |
right margin/.code = {\def\tkz@rightmargin{#1}}, |
| 119 |
left margin/.code = {\def\tkz@leftmargin{#1}}, |
| 120 |
inner left margin/.code = {\def\tkz@innerleftmargin{#1}}, |
| 121 |
inner right margin/.code = {\def\tkz@innerrightmargin{#1}}, |
| 122 |
inner top margin/.code = {\def\tkz@innertopmargin{#1}}, |
| 123 |
inner bottom margin/.code = {\def\tkz@innerbottommargin{#1}}, |
| 124 |
line frame width/.code = {\def\tkz@linewidth{#1}}, |
| 125 |
frame code/.code = {\def\tkz@frameset{\fcolorbox{#1}}}, |
| 126 |
frame tex/.code = {\def\tkz@frameltxset{\fcolorbox{#1}}}, |
| 127 |
above skip/.code = {\def\tkz@above{#1}}, |
| 128 |
below skip/.code = {\def\tkz@below{#1}}, |
| 129 |
hsep/.code = {\setlength\tkz@hsep{#1}}, |
| 130 |
pre/.code = {\def\code@pre{#1}}, |
| 131 |
post/.code = {\def\code@post{#1}}, |
| 132 |
latex/.code = {\setlength\tkzexamplewidth{#1}% |
| 133 |
\def\code@preadd{\begin{minipage}{#1}}% |
| 134 |
\def\code@postadd{\end{minipage}}}, |
| 135 |
vbox/.code = {\code@vboxtrue |
| 136 |
\def\code@preadd{\noindent |
| 137 |
\vbox\bgroup |
| 138 |
\setlength{\hsize}{\linewidth-6pt}% |
| 139 |
}% |
| 140 |
\def\code@postadd{\egroup}}, |
| 141 |
every tkzexample/.style={width=6cm}, |
| 142 |
}% |
| 143 |
\def\code@size{}% |
| 144 |
\def\code@pre{}% |
| 145 |
\def\code@post{}% |
| 146 |
\def\code@preadd{}% |
| 147 |
\def\code@postadd{}% |
| 148 |
\def\tkz@above{\par}% |
| 149 |
\def\tkz@below{\par}% |
| 150 |
|
| 151 |
% execution du code |
| 152 |
\def\tkz@result{% |
| 153 |
\begin{minipage}[t]{\wd\tkzexamplebox}% |
| 154 |
\hrule width0pt |
| 155 |
\code@size |
| 156 |
\box\tkzexamplebox |
| 157 |
\leavevmode |
| 158 |
\end{minipage}% |
| 159 |
}% |
| 160 |
|
| 161 |
\newcommand\tkz@code[1]{% |
| 162 |
\begin{minipage}[t]{\code@width}{% |
| 163 |
\color{textcodecolor}% |
| 164 |
\parskip=\z@ |
| 165 |
\hrule width\z@ |
| 166 |
\vskip-.25em |
| 167 |
\let\do\@makeother |
| 168 |
\dospecials |
| 169 |
\frenchspacing |
| 170 |
\code@style\code@size |
| 171 |
\obeylines |
| 172 |
\@vobeyspaces |
| 173 |
\@tempswafalse |
| 174 |
\ifnum@show |
| 175 |
\typesetcommentnum |
| 176 |
\def\par{% |
| 177 |
\if@tempswa |
| 178 |
\leavevmode\null\@@par\penalty\interlinepenalty |
| 179 |
\everypar{\setlength\fboxsep{1pt}% |
| 180 |
\noindent\parskip=0pt% |
| 181 |
\llap{\colorbox{numbackground}{\textcolor{numcolor}{% |
| 182 |
\footnotesize\number\value{code@cnt}}}\enspace}% |
| 183 |
\stepcounter{code@cnt}}% |
| 184 |
\else |
| 185 |
\@tempswatrue |
| 186 |
\ifhmode\@@par\penalty\interlinepenalty\fi% |
| 187 |
\fi |
| 188 |
}% |
| 189 |
\everypar{\setlength\fboxsep{1pt}% |
| 190 |
\noindent\parskip=0pt% |
| 191 |
\llap{\colorbox{numbackground}{\textcolor{numcolor}{% |
| 192 |
\footnotesize\number\value{code@cnt}}}\enspace}% |
| 193 |
\stepcounter{code@cnt}% |
| 194 |
}% |
| 195 |
\else |
| 196 |
\typesetcomment |
| 197 |
\def\par{% |
| 198 |
\if@tempswa |
| 199 |
\leavevmode\null\@@par\penalty\interlinepenalty% |
| 200 |
\else |
| 201 |
\@tempswatrue |
| 202 |
\ifhmode\@@par\penalty\interlinepenalty\fi% |
| 203 |
\fi |
| 204 |
}% |
| 205 |
\fi |
| 206 |
\obeylines |
| 207 |
\ifcode@saved\input{#1}\else#1\fi% |
| 208 |
}% end of content for the minipage |
| 209 |
\end{minipage}% |
| 210 |
}% |
| 211 |
|
| 212 |
\newcommand\tkz@codesplit[1]{% |
| 213 |
\begin{mdframed}[linewidth = \tkz@linewidth, |
| 214 |
leftmargin = \tkz@leftmargin, |
| 215 |
rightmargin = \tkz@rightmargin, |
| 216 |
backgroundcolor = codeonlybackground, |
| 217 |
innerleftmargin = \tkz@innerleftmargin, |
| 218 |
innertopmargin = \tkz@innertopmargin] |
| 219 |
\begingroup |
| 220 |
\color{textcodecolor}% |
| 221 |
\parskip=\z@ |
| 222 |
\hrule width0pt |
| 223 |
\let\do\@makeother |
| 224 |
\dospecials |
| 225 |
\frenchspacing |
| 226 |
\code@style\code@size |
| 227 |
\obeylines |
| 228 |
\@vobeyspaces |
| 229 |
\@tempswafalse |
| 230 |
\ifnum@show |
| 231 |
\typesetcommentnum |
| 232 |
\def\par{% |
| 233 |
\if@tempswa |
| 234 |
\leavevmode\null\@@par\penalty\interlinepenalty |
| 235 |
\everypar{\setlength\fboxsep{1pt}% |
| 236 |
\noindent\parskip=0pt% |
| 237 |
\llap{\colorbox{numbackground}{\textcolor{numcolor}{% |
| 238 |
\footnotesize\number\value{code@cnt}}}\enspace}% |
| 239 |
\stepcounter{code@cnt}}% |
| 240 |
\else |
| 241 |
\@tempswatrue |
| 242 |
\ifhmode\@@par\penalty\interlinepenalty\fi |
| 243 |
\fi |
| 244 |
}% |
| 245 |
\everypar{\setlength\fboxsep{1pt}% |
| 246 |
\noindent\parskip=0pt% |
| 247 |
\llap{\colorbox{numbackground}{\textcolor{numcolor}{% |
| 248 |
\footnotesize\number\value{code@cnt}}}\enspace}% |
| 249 |
\stepcounter{code@cnt}% |
| 250 |
}% |
| 251 |
\else |
| 252 |
\typesetcomment% |
| 253 |
\def\par{% |
| 254 |
\if@tempswa |
| 255 |
\leavevmode\null\@@par\penalty\interlinepenalty% |
| 256 |
\else |
| 257 |
\@tempswatrue |
| 258 |
\ifhmode\@@par\penalty\interlinepenalty\fi% |
| 259 |
\fi |
| 260 |
}% |
| 261 |
\fi |
| 262 |
\obeylines |
| 263 |
\ifcode@saved\input{#1}\else #1\fi |
| 264 |
\endgroup |
| 265 |
\end{mdframed}% |
| 266 |
}% |
| 267 |
|
| 268 |
|
| 269 |
\def\tkzref{\arabic{section}-\arabic{subsection}-\arabic{subsubsection}}% |
| 270 |
\def\tkzFileSavedPrefix{tkzFile}% |
| 271 |
\def\tkz@File@Saved@Name{\tkzFileSavedPrefix-\tkzref}% |
| 272 |
|
| 273 |
\iftkzcodesaved |
| 274 |
\def\tkzexample[#1]{% |
| 275 |
\code@executetrue |
| 276 |
\normalsize |
| 277 |
\pgfkeys{/tkzexample/.cd, |
| 278 |
right margin = 0pt, |
| 279 |
left margin = 0pt, |
| 280 |
line frame width = 0, |
| 281 |
inner left margin = 0 pt, |
| 282 |
inner right margin = 0 pt, |
| 283 |
inner top margin = 6 pt, |
| 284 |
inner bottom margin = 0 pt} |
| 285 |
\pgfqkeys{/tkzexample}{every tkzexample,#1}% |
| 286 |
\parindent0pt |
| 287 |
\bgroup |
| 288 |
\VerbatimEnvironment |
| 289 |
\killienc\begin{VerbatimOut}{\tkz@File@[email protected]}}% |
| 290 |
\def\endtkzexample{\end{VerbatimOut}% |
| 291 |
\egroup |
| 292 |
\ifcode@execute |
| 293 |
\setbox\tkzexamplebox=\hbox{\input{\tkz@File@[email protected]}}% |
| 294 |
\ifdim\wd\tkzexamplebox>\tkzexamplewidth% |
| 295 |
\gdef\code@mid{\parskip2pt\par}% |
| 296 |
% \hrule |
| 297 |
%\def\code@mid{\hfill}% |
| 298 |
\gdef\code@width{\linewidth}% |
| 299 |
\else |
| 300 |
\ifdim\tkz@hsep=0pt |
| 301 |
\gdef\code@mid{\hfill}% |
| 302 |
\else |
| 303 |
\gdef\code@mid{\hskip\tkz@hsep}% |
| 304 |
\fi |
| 305 |
\gdef\code@width{\linewidth-1.5em-\tkz@hsep-\tkzexamplewidth}% |
| 306 |
\fi |
| 307 |
\par\noindent |
| 308 |
\code@savedtrue |
| 309 |
\ifcode@overhang |
| 310 |
\tkz@frameset{codebackground}{\tkz@code{\tkz@File@[email protected]}}% |
| 311 |
\else |
| 312 |
\tkz@frameltxset{graphicbackground}{\tkz@result}% |
| 313 |
\fi |
| 314 |
\else% pas de code pas clair |
| 315 |
\gdef\code@mid{\hfill}% |
| 316 |
\gdef\code@width{\linewidth}% |
| 317 |
\gdef\code@end{}% |
| 318 |
\fi% fin pas de code |
| 319 |
\code@mid |
| 320 |
\ifcode@overhang\tkz@frameltxset{graphicbackground}{\tkz@result}% |
| 321 |
\else |
| 322 |
\tkz@frameset{codebackground}{\tkz@code{\tkz@File@[email protected]}}% |
| 323 |
\fi |
| 324 |
\tkz@below |
| 325 |
}% |
| 326 |
\else% end of code saved code et result ? |
| 327 |
\def\tkzexample[#1]{% |
| 328 |
\begingroup |
| 329 |
\code@executetrue |
| 330 |
\pgfkeys{/tkzexample/.cd, |
| 331 |
right margin = 0pt, |
| 332 |
left margin = 0pt, |
| 333 |
line frame width = 0, |
| 334 |
inner left margin = 0 pt, |
| 335 |
inner right margin = 0 pt, |
| 336 |
inner top margin = 6 pt, |
| 337 |
inner bottom margin = 0 pt,} |
| 338 |
\pgfqkeys{/tkzexample}{every tkzexample,#1}% |
| 339 |
\parindent0pt |
| 340 |
\begingroup |
| 341 |
%\tkz@above |
| 342 |
\let\do\@makeother |
| 343 |
\dospecials |
| 344 |
\obeylines |
| 345 |
\@vobeyspaces |
| 346 |
\catcode`\%=13 % |
| 347 |
\catcode`\^^M=13 % |
| 348 |
\find@tkzexample}% #1 est tout ce qui se trouve dans l'environnement |
| 349 |
\def\endoftkzexample#1{% |
| 350 |
\endgroup |
| 351 |
\ifcode@execute % et \fcode@save ?? |
| 352 |
\setbox\tkzexamplebox=\hbox{% |
| 353 |
{\commenthandler |
| 354 |
\protected@xdef\code@temp{#1}}% |
| 355 |
\catcode`\^^M=9 % |
| 356 |
{\ignorespaces\code@preadd\code@pre |
| 357 |
\expandafter\scantokens\expandafter{\code@temp\ignorespaces}% |
| 358 |
\code@post\code@postadd\ignorespaces}% |
| 359 |
}% |
| 360 |
\ifdim\wd\tkzexamplebox>\tkzexamplewidth |
| 361 |
\def\code@mid{\par}% |
| 362 |
\def\code@width{\linewidth-6pt}% |
| 363 |
\else |
| 364 |
\ifdim\tkz@hsep=0pt |
| 365 |
\def\code@mid{\hfill}% |
| 366 |
\else |
| 367 |
\def\code@mid{\hskip\tkz@hsep}% |
| 368 |
\fi% |
| 369 |
\def\code@width{\linewidth-1.5em-\tkz@hsep-\tkzexamplewidth}% |
| 370 |
\fi% |
| 371 |
\par\noindent |
| 372 |
\ifcode@overhang |
| 373 |
\tkz@frameset{codebackground}{\tkz@code{#1}}% |
| 374 |
\else |
| 375 |
\tkz@frameltxset{graphicbackground}{\tkz@result}% |
| 376 |
\fi |
| 377 |
\else% pas de code execute |
| 378 |
\def\code@mid{}% |
| 379 |
\def\code@width{\linewidth-6pt}% |
| 380 |
\def\code@end{}% |
| 381 |
\fi% fin pas de code |
| 382 |
\code@mid% |
| 383 |
\ifcode@overhang% |
| 384 |
\ifcode@execute\tkz@frameltxset{graphicbackground}{\tkz@result}\fi |
| 385 |
\else% |
| 386 |
\ifcode@execute\tkz@frameset{codebackground}{\tkz@code{#1}}\else |
| 387 |
\par\vskip1em |
| 388 |
\tkz@codesplit{#1} |
| 389 |
%\tkz@frameset{codebackground}{\tkz@code{#1}}% |
| 390 |
\fi |
| 391 |
\fi |
| 392 |
\tkz@below |
| 393 |
\end{tkzexample}% |
| 394 |
}% |
| 395 |
\def\endtkzexample{\endgroup}% |
| 396 |
\fi |
| 397 |
%<---------------------------------------------------------------------------> |
| 398 |
\pgfqkeys{/tkzltxexample}{% |
| 399 |
width/.code = {\setlength\tkzltxexamplewidth{#1}}, |
| 400 |
code/.code = {\colorlet{codeonlybackground}{#1}}, |
| 401 |
show num/.is if = num@show, |
| 402 |
num/.code = {\num@showtrue\setcounter{code@cnt}{1}}, |
| 403 |
global num/.code = {\num@showtrue}, |
| 404 |
numcolor/.code = {\colorlet{numcolor}{#1}}, |
| 405 |
numbkgcolor/.code = {\colorlet{numbackground}{#1}}, |
| 406 |
normal/.code = {\def\code@size{\normalsize}}, |
| 407 |
small/.code = {\def\code@size{\small}}, |
| 408 |
very small/.code = {\def\code@size{\footnotesize}}, |
| 409 |
right margin/.code = {\def\tkz@rightmargin{#1}}, |
| 410 |
left margin/.code = {\def\tkz@leftmargin{#1}}, |
| 411 |
inner left margin/.code = {\def\tkz@innerleftmargin{#1}}, |
| 412 |
inner right margin/.code = {\def\tkz@innerrightmargin{#1}}, |
| 413 |
inner top margin/.code = {\def\tkz@innertopmargin{#1}}, |
| 414 |
inner bottom margin/.code = {\def\tkz@innerbottommargin{#1}}, |
| 415 |
line frame width/.code = {\def\tkz@linewidth{#1}}, |
| 416 |
hsep/.code = {\def\tkz@hsep{#1}}, |
| 417 |
typeset listing/.code = {#1}, |
| 418 |
frame code/.code = {\def\tkz@frameset{\fcolorbox{#1}}}, |
| 419 |
ignorespaces/.code = {\let\@gobble@till@return =% |
| 420 |
\@gobble@till@return@ignore}, |
| 421 |
leave comments/.code = {\def\code@catcode@hook{\catcode`\%=12}% |
| 422 |
\let\commenthandler=\relax% |
| 423 |
\let\typesetcomment=\relax}, |
| 424 |
every tkzltxexample/.style = {width=8cm}, |
| 425 |
vbox/.code = {\def\code@preadd{\noindent |
| 426 |
\vbox\bgroup\setlength{\hsize}{\linewidth}}% |
| 427 |
\def\code@postadd{\egroup}}% |
| 428 |
} |
| 429 |
\def\code@size{}% |
| 430 |
% \def\code@pre{} |
| 431 |
\def\code@post{}% |
| 432 |
\def\code@pre{}% |
| 433 |
\def\code@post{}% |
| 434 |
\def\code@catcode@hook{}% |
| 435 |
|
| 436 |
\newdimen\tkzltxexamplewidth |
| 437 |
\newbox\tkzltxexamplebox |
| 438 |
|
| 439 |
\def\tkzltxexample[#1]{% |
| 440 |
\begingroup |
| 441 |
\pgfkeys{/tkzltxexample/.cd, |
| 442 |
right margin = 0pt, |
| 443 |
left margin = 0pt, |
| 444 |
line frame width = 0, |
| 445 |
inner left margin = 0 pt, |
| 446 |
inner right margin = 0 pt, |
| 447 |
inner top margin = 6 pt, |
| 448 |
inner bottom margin = 0 pt,} |
| 449 |
\pgfqkeys{/tkzltxexample}{every tkzltxexample,#1}% |
| 450 |
\parindent0pt |
| 451 |
\begingroup% |
| 452 |
\let\do\@makeother |
| 453 |
\dospecials |
| 454 |
\obeylines |
| 455 |
\@vobeyspaces |
| 456 |
\catcode`\%=13 % |
| 457 |
\catcode`\^^M=13 % |
| 458 |
\code@catcode@hook% |
| 459 |
\relax% |
| 460 |
\find@tkzltxexample} |
| 461 |
\def\endoftkzltxexample#1{% |
| 462 |
\endgroup% |
| 463 |
\def\code@end{}% |
| 464 |
\par\vskip1em |
| 465 |
\tkz@codesplit{#1}% |
| 466 |
\par |
| 467 |
\code@post |
| 468 |
\end{tkzltxexample}% |
| 469 |
}% |
| 470 |
|
| 471 |
\def\endtkzltxexample{\endgroup} |
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
\newcommand\killienc{} |
| 476 |
\@tempcnta128 |
| 477 |
\@whilenum\@tempcnta<\@cclvi\do{% |
| 478 |
\edef\killienc{\killienc\catcode\the\@tempcnta=12}% |
| 479 |
\advance\@tempcnta\@ne} |
| 480 |
|
| 481 |
\def\tkz@ref{\arabic{section}-\arabic{subsection}-\arabic{subsubsection}} |
| 482 |
\def\tkz@File@Saved@Name{\tkzFileSavedPrefix-\tkz@ref} |
| 483 |
\pgfkeys{ |
| 484 |
/tkzsavedcode/.cd, |
| 485 |
prefix/.code = {\def\tkzFileSavedPrefix{#1}}} |
| 486 |
|
| 487 |
\newcommand{\tkzSavedCode}[1][]{% |
| 488 |
\pgfkeys{% |
| 489 |
tkzsavedcode/.cd, |
| 490 |
prefix = tkzFile} |
| 491 |
\pgfqkeys{/tkzsavedcode}{#1} |
| 492 |
\renewenvironment{tkzexample}[1][]{% |
| 493 |
\killienc\VerbatimOut{\tkz@File@[email protected]}}{% |
| 494 |
\endVerbatimOut}} |
| 495 |
|
| 496 |
% \renewenvironment{tkzexample}[1][]{% |
| 497 |
% \killienc \VerbatimOut{tkzeuc-\tkzref.tex}% |
| 498 |
% }{% |
| 499 |
% \endVerbatimOut |
| 500 |
% } |
| 501 |
% \fi |
| 502 |
\endinput |