| 1 |
% exerquiz.4ht (2021-05-30-10:14), generated from tex4ht-4ht.tex |
| 2 |
% Copyright 1999-2009 Eitan M. Gurari |
| 3 |
% Copyright 2009-2021 TeX Users Group |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either |
| 7 |
% version 1.3c of this license or (at your option) any |
| 8 |
% later version. The latest version of this license is in |
| 9 |
% http://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3c or later is part of all distributions |
| 11 |
% of LaTeX version 2005/12/01 or later. |
| 12 |
% |
| 13 |
% This work has the LPPL maintenance status "maintained". |
| 14 |
% |
| 15 |
% The Current Maintainer of this work |
| 16 |
% is the TeX4ht Project <http://tug.org/tex4ht>. |
| 17 |
% |
| 18 |
% If you modify this program, changing the |
| 19 |
% version identification would be appreciated. |
| 20 |
\immediate\write-1{version 2021-05-30-10:14} |
| 21 |
|
| 22 |
|
| 23 |
\def\Rect#1{#1} |
| 24 |
\ifx \pdf@rect\:UnDef |
| 25 |
\newsavebox{\pdf@box} |
| 26 |
\def\pdf@rect#1{\leavevmode #1} |
| 27 |
\fi |
| 28 |
\NewConfigure{javascript}{1} |
| 29 |
|
| 30 |
\let\sv:tocsection\tocsection |
| 31 |
\def\tocsection{\let\toclikesection\:gobbleIII \sv:tocsection} |
| 32 |
\def\hypertarget#1#2{\Link{}{#1}\EndLink#2} |
| 33 |
\def\hyperlink#1#2{\Link{#1}{}#2\EndLink} |
| 34 |
|
| 35 |
\append:def\exercise{\Link{}{page.ex\the@exno}\EndLink } |
| 36 |
\pend:def\endsolution@sq{\def\thepage{ex\the@exno}} |
| 37 |
|
| 38 |
\let\:shortquiz\shortquiz |
| 39 |
\def\shortquiz{\gHAdvance\:onClick by 1 |
| 40 |
\Link{}{page.qz\:onClick}\EndLink \:shortquiz |
| 41 |
\pend:def\endsolution@sq{\def\thepage{qz\:onClick}}} |
| 42 |
|
| 43 |
\pend:def\include@quizsolutions{% |
| 44 |
\let\sv:newpage\newpage |
| 45 |
\append:def\newpage{\ht:everypar{\HtmlPar}}} |
| 46 |
\append:def\include@solutions{% |
| 47 |
\let\noindent\sv:noindent} |
| 48 |
|
| 49 |
\HAssign\:onClick = 0 |
| 50 |
\HAssign\Prob:N = 0 |
| 51 |
\HAssign\Quiz:N = 0 |
| 52 |
|
| 53 |
\append:def\shortquiz{\pend:def\answers{\gHAdvance\Prob:N by 1 |
| 54 |
\let\:NAME\empty}} |
| 55 |
\let\:@quiz\@quiz |
| 56 |
\def\@quiz*#1#2{% |
| 57 |
\if #1f \let\c:quiz\C:quiz\fi |
| 58 |
\:@quiz*{#1}{#2}% |
| 59 |
\pend:defI\answers{\gHAdvance\Prob:N by 1 |
| 60 |
\let\:NAME\empty}} |
| 61 |
|
| 62 |
\pend:def\quiz{% |
| 63 |
\let\:bqlabel\bqlabel |
| 64 |
\def\bqlabel{\IgnorePar\EndP |
| 65 |
\Tg<form action="." class="quiz" |
| 66 |
id="thisform\Quiz:N">% |
| 67 |
\Tg<input value="\:bqlabel" type="reset" |
| 68 |
onClick='\c:quiz' />}% |
| 69 |
\let\:eqlabel\eq@eqlabel |
| 70 |
\def\eq@eqlabel{\IgnorePar\EndP |
| 71 |
\Tg<input type="button" value="\:eqlabel" |
| 72 |
onClick='\a:javascript \d:quiz' />% |
| 73 |
\ifeq@nocorrections\else |
| 74 |
\Tg<input type="button" value="\eq@CA" |
| 75 |
name="correct\Quiz:N" |
| 76 |
onClick='\a:javascript \e:quiz' />% |
| 77 |
\fi |
| 78 |
}% |
| 79 |
\gHAdvance\Quiz:N by 1 \gHAssign\Prob:N=0 \ShowPar |
| 80 |
} |
| 81 |
\append:def\endquiz{\let\eq@eqlabel=\:eqlabel |
| 82 |
\Tg</form>\Tag{ans-\Quiz:N}{\Prob:N}} |
| 83 |
\pend:def\shortquiz{\leavevmode |
| 84 |
\Tg<form action="." class="shortquiz">\IgnorePar} |
| 85 |
\append:def\endshortquiz{\Tg</form>}{}{} |
| 86 |
\def\Ans@i#1{\stepcounter{quizno}{ |
| 87 |
\ifx#11 |
| 88 |
\js:click{\b:shortquiz}{\a:shortquiz}{\ifx |
| 89 |
\@qzsolndest\empty 0\else 1\fi}% |
| 90 |
\else \js:click{\c:shortquiz}{\a:shortquiz}{0}% |
| 91 |
\fi |
| 92 |
}}% |
| 93 |
\NewConfigure{shortquiz}{3} |
| 94 |
\pend:defII\ReturnTo{\noindent\a:ReturnTo} |
| 95 |
\append:defII\ReturnTo{\b:ReturnTo} |
| 96 |
\NewConfigure{ReturnTo}{2} |
| 97 |
|
| 98 |
\def\Ans@l#1{\stepcounter{quizno}% |
| 99 |
\ifnum #1=1 \def\:NAME{ id="ans\Quiz:N x\Prob:N" }\fi |
| 100 |
\def\ANS{#1}% |
| 101 |
\js:click{\b:quiz}{\a:quiz}{0}} |
| 102 |
\NewConfigure{quiz}{5} |
| 103 |
|
| 104 |
\def\Ans@f#1{\stepcounter{quizno}% |
| 105 |
\ifnum #1=1 \def\:NAME{ id="ans\Quiz:N x\Prob:N" }\fi |
| 106 |
\def\ANS{#1}% |
| 107 |
\js:click{\B:quiz}{\A:quiz}{0}} |
| 108 |
\NewConfigure{quiz*}[3]{\def\A:quiz{#1}\def\B:quiz{#2}\def\C:quiz{#3}} |
| 109 |
\Configure{quiz*}{}{}{} |
| 110 |
|
| 111 |
\LinkCommand\js:link{input,,,, /} |
| 112 |
\LinkCommand\js:Link{input,onClick='\a:javascript \noexpand\:tempa |
| 113 |
href(\noexpand\:gobble,,, /} |
| 114 |
\def\js:click#1#2#3{\ifnum #3=0 |
| 115 |
\js:link[ type="button" value="#2"\Hnewline |
| 116 |
class="onClickClass" onClick='\a:javascript #1' |
| 117 |
name="ans\Quiz:N y\Prob:N" |
| 118 |
\:NAME]{}{}% |
| 119 |
\else |
| 120 |
\def\:tempa{#1}% |
| 121 |
\js:Link[ );' type="button" value="#2"\Hnewline |
| 122 |
name="ans\Quiz:N y\Prob:N" |
| 123 |
class="onClickClass" \:NAME]{\@qzsolndest}{}% |
| 124 |
\fi |
| 125 |
} |
| 126 |
|
| 127 |
\Hinput{exerquiz} |
| 128 |
\endinput |
| 129 |
|