diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-02 06:04:52 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-02 06:04:52 +0900 |
commit | 6b7ef024ba8f7c1560c7347a072db848c3555541 (patch) | |
tree | fdf9e504c58aa85cce5d1037fe60c4f659ca1be7 /texmf-dist/doc/latex | |
parent | e60a667576875015b84818bb0e50ca43bb1f6e61 (diff) |
thorshammer update
Diffstat (limited to 'texmf-dist/doc/latex')
19 files changed, 437 insertions, 573 deletions
diff --git a/texmf-dist/doc/latex/thorshammer/README.md b/texmf-dist/doc/latex/thorshammer/README.md index f4c622a1..fefee6b2 100644 --- a/texmf-dist/doc/latex/thorshammer/README.md +++ b/texmf-dist/doc/latex/thorshammer/README.md @@ -1,6 +1,6 @@ The thorshammer Package Author: D. P. Story -Dated: 2020-01-13 +Dated: 2021-06-24 WARNING: Adobe Acrobat DC or Adobe Acrobat XI is required for post PDF-creation. Any PDF-creator application is supported. @@ -20,6 +20,12 @@ Note: Unzip action-sequences.zip to obtain the action-sequences folder. If intriguing, install thorshammer and try this workflow. +What's New (2021-06-24) Moved aeb_pro.js to the acrotex.js package, which is + now required. Other minor changes and fixes. + +What's New (2020-01-21) Published password of action sequences. + + Enjoy! Now, I must get back to my retirement. diff --git a/texmf-dist/doc/latex/thorshammer/container.tex b/texmf-dist/doc/latex/thorshammer/container.tex index 4bfb64d7..9002d64d 100644 --- a/texmf-dist/doc/latex/thorshammer/container.tex +++ b/texmf-dist/doc/latex/thorshammer/container.tex @@ -8,7 +8,7 @@ %% \documentclass{article} \usepackage[designi]{web} -\usepackage{eforms} +\usepackage{eforms}[2020/12/14] \hypersetup{pdfpagemode=UseAttachments} %% \previewOn\pmpvOn \parindent0pt \parskip6pt diff --git a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex index 7852cdc1..f94d5187 100644 --- a/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex +++ b/texmf-dist/doc/latex/thorshammer/examples/nosolns/thexrt.tex @@ -1,7 +1,7 @@ \documentclass{article} \usepackage{amstext} \usepackage{web} -\usepackage[usesumrytbls,allowrandomize]{exerquiz} +\usepackage[usesumrytbls,allowrandomize]{exerquiz} \usepackage{ran_toks} \usepackage[usebatch]{thorshammer} @@ -10,7 +10,7 @@ % It is important to freeze the seed so that (1) you can reproduce the exact % same quiz at a later time; (2) allow content written to the AUX file to % come up to date. This is important when using summary tables. -\useRandomSeed{1344524586} +\useRandomSeed{1344524586} \setInitMag{fitwidth} \hypersetup{pdfpagemode=UseNone} % don't need to see bookmarks diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex deleted file mode 100644 index b20c438a..00000000 --- a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex +++ /dev/null @@ -1,35 +0,0 @@ -\documentclass{article} -\usepackage[designi]{web} -\usepackage{eforms} - -%\previewOn\pmpvOn - -\parindent0pt \parskip6pt - -\begin{document} - -\begin{defineJS}{\btnAct} -var resp=app.response({ - cQuestion: "Enter a PIN number", - cTitle: "Get Hash String" -}); -var f=this.getField("txt"); -if (resp!=null) f.value=Collab.hashString(resp); -\end{defineJS} - -Create a four digit (PIN) number and copy that number into the body of the -definition of the \verb|\PIN| command, which is defined in the source file -\texttt{quiz-pwd-to-correct-AR.tex}. This is to record and save the number. - -Push the button and enter the four digit number you just created into the -response box. When you press the \textsf{OK} button, the hash string of the -number you entered appears in the text field. Copy and paste this value into -the \texttt{quiz-pwd-to-correct-AR.tex} as the value of the -\texttt{\_PinCode} JavaScript variable. Now you're ready to compile the file -\texttt{quiz-pwd-to-correct-AR.tex}. - -\pushButton[\CA{Push}\AAmouseup{\btnAct}]{btn}{}{11bp}\olBdry -\textField[\textSize{8}]{txt}{2in}{11bp}\olBdry -\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp} - -\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex deleted file mode 100644 index e84d9781..00000000 --- a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AA.tex +++ /dev/null @@ -1,190 +0,0 @@ -\documentclass{article} -\usepackage{amstext} -\usepackage[designi]{web} -\usepackage{exerquiz}[2019/10/14] - -%\previewOn\pmpvOn - -% save the original defn of \eq@@EndQuizButtonActions as \eq@@EndQuizButtonActionsSave -\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsDefSave - -\usepackage[ordinary]{thorshammer} - -\thQzHeaderL{PWD Quizzes} -\thQzHeaderCQ{Quiz 1} - -% save the revised defn of \eq@@EndQuizButtonActions as \eq@@EndQuizButtonActionsThorSave -\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsThorSave - -\renewcommand\eqQuizPointsMsg{% -"\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal} - -\let\app\textsf -\let\pkg\textsf -\let\uif\textsf -\let\env\texttt -\let\opt\texttt -\def\cs#1{\texttt{\char`\\#1}} - - -\execJSOn -\useBeginQuizButton[\CA{Begin}] -\useEndQuizButton[\CA{End}] - -% If the students have Acrobat, they can see the pin number -% if they know how; however, if we use a hash string, the actual -% PIN is not retained within document. -\def\PIN{5243} % PIN number, change as desired - -% save \CorrBtnActionsJS as \CorrBtnActionsJSSave -\efsave\CorrBtnActionsJS\as\CorrBtnActionsJSSave -\begin{defineJS*}[\makeesc\@]{\CorrBtnActionsPwdJS} -var resp=app.response({ - cQuestion: "Enter the PIN number", - cTitle: "View Answers", - bPassword: true -}); -var _resp=Collab.hashString(resp); -if (_resp==_PinCode) { - correctQuiz("@eqBaseName",@thequestionno); - if (typeof correctSumryTbl == "function") - correctSumryTbl("@eqBaseName",@thequestionno); -} -\end{defineJS*} - -\DeclareQuiz{qz1} - -\begin{execJS}{execjs} -this.addScript("Pin Code","var _PinCode = \"" + Collab.hashString("\PIN")+"\""); -\end{execJS} - -\begin{document} - -\section{Introduction} - -\noindent\textbf{Goal:} Make the \uif{Correct} button password -protected.\medskip - -\noindent\textbf{Discussion:} This file illustrates the methods -of protecting the \uif{Correct} button with a password. This -file requires \app{Acrobat} to create; while the companion file -(\texttt{quiz-pwd-to-correct-AR.tex}) does not. - -If only MC and MS questions are posed, the \pkg{thorshammer} -package is not needed; otherwise, it is needed to support the -other types of questions. - -Within \pkg{exerquiz} the command that holds the JavaScript -action of the \uif{Correct} button is \cs{CorrBtnActionsJS}. We -save this macro, and change over to \cs{CorrBtnActionsPwdJS}, -defined in the preamble. We use the commands \cs{efsave} and -\cs{efrestore}, defined in \pkg{eforms}, to change the default -action to the password action, and back again. We do the same -thing for the \uif{End Quiz} action. (\pkg{thorshammer} -redefines \cs{eq@@EndQuizButtonActions}, the JavaScript actio of -the \uif{End Quiz} button.) - - -\newpage - -\section{Quiz with PIN to correct} - -% require students to answer all questions -\renewcommand\minQuizResp{highThreshold} % 1 - -For the quiz below, the \uif{Correct} button has an encrypted -password. The password appears in parentheses for the convenience of the casual reader. - -% use password version of \CorrButton action -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS -\begin{quiz*}{\currQuiz} -Solve each -\begin{questions} - \item The sum of 1 and 1 is\dots -\begin{answers}{5} -\bChoices - \Ans0 0\eAns - \Ans0 1\eAns - \Ans1 2\eAns - \Ans0 3\eAns - \Ans0 4\eAns -\eChoices -\end{answers} -\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ -\end{questions} -\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry - -\AnswerField{\currQuiz} - -\newpage - -\section{Quiz without PIN to correct} - -Now we try to create an ordinary \pkg{exerquiz} quiz without password protection. - -% restore \eq@@EndQuizButtonActions from its default defn -\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsDefSave -% restore \CorrBtnActionsJS from \CorrBtnActionsJSSave -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsJSSave - -\renewcommand\minQuizResp{lowThreshold} - -\begin{quiz*}{qz2} -Solve each -\begin{questions} - \item The sum of 1 and 1 is\dots -\begin{answers}{5} -\bChoices - \Ans0 0\eAns - \Ans0 1\eAns - \Ans1 2\eAns - \Ans0 3\eAns - \Ans0 4\eAns -\eChoices -\end{answers} -\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ -\end{questions} -\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz}\vcgBdry - -\AnswerField{\currQuiz} - - -\newpage - -\section{Another quiz with PIN to correct} - -It is possible to have a different PIN number for this quiz (multiple PINs in one document), but -I see no need for this. - -\DeclareQuiz{qz3} - - -% restore \eq@@EndQuizButtonActions from \eq@@EndQuizButtonActionsThorSave -\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsThorSave -% restore password protection for Correct button -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS - -% require students to answer all questions -\renewcommand\minQuizResp{highThreshold} - -\begin{quiz*}{qz3} -Solve each -\begin{questions} - \item The sum of 1 and 1 is\dots -\begin{answers}{5} -\bChoices - \Ans0 0\eAns - \Ans0 1\eAns - \Ans1 2\eAns - \Ans0 3\eAns - \Ans0 4\eAns -\eChoices -\end{answers} -\item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ -\end{questions} -\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry - -\AnswerField{\currQuiz} - - -\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/thqz-p2c.pdf b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/thqz-p2c.pdf Binary files differnew file mode 100644 index 00000000..3c37ab22 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/thqz-p2c.pdf diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AR.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/thqz-p2c.tex index 9123ce34..f9484694 100644 --- a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/quiz-pwd-to-correct-AR.tex +++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/thqz-p2c.tex @@ -1,74 +1,70 @@ -% Requires Acrobat \documentclass{article} \usepackage{amstext} \usepackage[designi]{web} -\usepackage{exerquiz}[2019/10/11] +\usepackage{exerquiz}[2021/06/24] +\usepackage[!showscore]{eq-pin2corr}[2021/06/24] -\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsDefSave +%\previewOn\pmpvOn \usepackage[ordinary]{thorshammer} -\thQzHeaderL{PWD Quiz} +\thQzHeaderL{Secured Quiz} \thQzHeaderCQ{Quiz 1} -\efsave\eq@@EndQuizButtonActions\as\eq@@EndQuizButtonActionsThorSave - -%\previewOn\pmpvOn - +% Thor's hammer modifies this definition, we restore it to its +% 'ordinary' definition. \renewcommand\eqQuizPointsMsg{% "\eqptScore\space"+ptScore+" \eqOutOf\space"+nPointTotal} \let\app\textsf \let\pkg\textsf +\let\uif\textsf \let\env\texttt \let\opt\texttt -\let\uif\textsf +\def\cs#1{\texttt{\char`\\#1}} + \execJSOn \useBeginQuizButton[\CA{Begin}] \useEndQuizButton[\CA{End}] -% If the students have Acrobat, they can see the pin number -% if they know how. - -\efsave\CorrBtnActionsJS\as\CorrBtnActionsJSSave -\begin{defineJS*}[\makeesc\@]{\CorrBtnActionsPwdJS} -var resp=app.response({ - cQuestion: "Enter the PIN number", - cTitle: "View Answers", - bPassword: true -}); -var _resp=Collab.hashString(resp); -if (_resp==_PinCode) { - correctQuiz("@eqBaseName",@thequestionno); - if (typeof correctSumryTbl == "function") - correctSumryTbl("@eqBaseName",@thequestionno); -} -\end{defineJS*} - -\DeclareQuiz{qz} - -\def\PIN{5243} % PIN number, change as desired -\begin{insDLJS}{pin}{Pin Code} -var _PinCode = "02JRVZdRgYgCA-Rtje8VkD"; -\end{insDLJS} - -\parindent0pt -\parskip6pt +% the default PIN number for eq-pin2corr is 5243 +% +% When building your own quiz document, decide on a PIN number +% then use the utility document get-hash-string.pdf to acquire +% the corresponding hash string. Place your own PIN and hash string +% in the two arguments of \declPINId. +\declPINId{5243}{02JRVZdRgYgCA-Rtje8VkD} % PIN number, hash string +% So instructor can bypass entering the PIN. +\classPINVar{_PinCode1} + +\DeclareQuiz{qz1} \begin{document} -\noindent\textbf{Goal:} Make the \uif{Correct} button password protected.\medskip +\section{Introduction} + +\noindent\textbf{Goal:} Make the \uif{Correct} button password protected. +This revised file now uses the +\pkg{\href{https://ctan.org/pkg/eq-pin2corr}{eq-pin2corr}} package to make +things simpler. Additional commands are introduced here to manage the smooth +transition from password PIN protection, to an ordinary quiz, and back to a +PIN protected quiz.\medskip + +\noindent\textbf{Discussion:} This file illustrates the methods for +protecting the \uif{Correct} button with a password. To create a PIN +protected \uif{Correct} button, expand \cs{usePINCorrBtn} (\pkg{eq-pin2corr}) +prior to the quiz. Following the quiz, use the commands \cs{restoreNormalEndQuiz} +(\pkg{exerquiz}) and \cs{restoreCorrBtn} (\pkg{eq-pin2corr}). The latter +restores the default action of the \uif{End Quiz} control, this is needed +because \pkg{thorshammer} changes this action to a custom action; +\cs{restoreCorrBtn} removes the PIN security of the \uif{Correct} control. -\noindent\textbf{Discussion:} -This demo file uses a \emph{hash string} to encode the password for the instructor to correct -the quiz, it avoids the use of \app{Adobe Acrobat} by getting the hash string from the -PDF \texttt{get-hash-string}. Copy the hash string generated from \texttt{get-hash-string} -as the value of the JavaScript variable \texttt{\_PinCode} in the \textsf{insDLJS} environment -seen in this source file for this document. Then, compile this document and distribute. +There is another command \cs{useEndQuizThor} (\pkg{thorshammer}) is used to +modify the \uif{End Quiz} control to the action as defined by the +\pkg{thorshammer} package. Read additional comments found in the body and +source of this file. -%Delay the correction of this next quiz by expanding the new command -%\verb|\pwdCorrBtnJS|. \newpage @@ -81,7 +77,8 @@ For the quiz below, the \uif{Correct} button has an encrypted password. The password appears in parentheses for the convenience of the casual reader. % use password version of \CorrButton action -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS +\usePINCorrBtn + \begin{quiz*}{\currQuiz} Solve each \begin{questions} @@ -97,20 +94,24 @@ Solve each \end{answers} \item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ \end{questions} -\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \numPINId)\vcgBdry \AnswerField{\currQuiz} \newpage +\thQzHeaderL{Ordinary Quiz} +\thQzHeaderCQ{Quiz 2} + + \section{Quiz without PIN to correct} Now we try to create an ordinary \pkg{exerquiz} quiz without password protection. -% restore \eq@@EndQuizButtonActions from its default defn -\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsDefSave -% restore \CorrBtnActionsJS from \CorrBtnActionsJSSave -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsJSSave + +% Now do an ordinary quiz +\restoreNormalEndQuiz +\restoreCorrBtn \renewcommand\minQuizResp{lowThreshold} @@ -136,18 +137,23 @@ Solve each \newpage +\thQzHeaderL{Secured Quiz} +\thQzHeaderCQ{Quiz 3} + + \section{Another quiz with PIN to correct} It is possible to have a different PIN number for this quiz (multiple PINs in one document), but I see no need for this. -\DeclareQuiz{qz3} +The previous quiz was a normal \pkg{exerquiz} quiz. We now want another PIN protected quiz, so +prior to this next quiz we expand \cs{usePINBtn} and \cs{useEndQuizThor}. The latter is a new +command that restores the default action of the \pkg{thorshammer} package to the \uif{End Quiz} event. +\DeclareQuiz{qz3} -% restore \eq@@EndQuizButtonActions from \eq@@EndQuizButtonActionsThorSave -\efrestore\eq@@EndQuizButtonActions\from\eq@@EndQuizButtonActionsThorSave -% restore password protection for Correct button -\efrestore\CorrBtnActionsJS\from\CorrBtnActionsPwdJS +\usePINCorrBtn +\useEndQuizThor % require students to answer all questions \renewcommand\minQuizResp{highThreshold} @@ -167,8 +173,9 @@ Solve each \end{answers} \item $9+8=\RespBoxMath{17}{1}{.0001}{[0,1]}\cgBdry\CorrAnsButton{17}$ \end{questions} -\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \PIN)\vcgBdry +\end{quiz*}\quad\PointsField{\currQuiz}\olBdry\CorrButton{\currQuiz} (PIN: \numPINId)\vcgBdry \AnswerField{\currQuiz} -\end{document}
\ No newline at end of file + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/folder-js/aeb-reader.js b/texmf-dist/doc/latex/thorshammer/folder-js/aeb-reader.js deleted file mode 100644 index 87783f86..00000000 --- a/texmf-dist/doc/latex/thorshammer/folder-js/aeb-reader.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - AEB Adobe Acrobat Reader JavaScript Methods - - Copyright (C) 2019 AcroTeX.Net - D. P. Story - http://www.acrotex.net - - Version 1.0 -*/ -// console.println("Version 1.0 (Reader DC)"); -if ( typeof aebTrustedFunctions == "undefined") { - aebTrustedFunctions = app.trustedFunction( function ( doc, oFunction, oArgs ) - { - app.beginPriv(); - var retn = oFunction( oArgs, doc ); - app.endPriv(); - return retn; - }); -} -aebSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - app.execMenuItem("Save"); - app.endPriv(); -}); -aebDocSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebDocSaveAs.msg==undefined)?("Doc SaveAs Error: " + e.toString()):aebDocSaveAs.msg;} - var Action=function(){return ((aebDocSaveAs.action==undefined)?null:eval(aebDocSaveAs.action));} - app.beginPriv(); - try { - return retn = doc.saveAs(oArgs); - } catch(e){console.println(Msg(e));Action();} - app.endPriv(); - aebDocSaveAs.msg=undefined; - aebDocSaveAs.action=undefined; -}); -aebBrowseForDoc = app.trustPropagatorFunction( function ( oArgs ) -{ - app.beginPriv(); - return retn = app.browseForDoc(oArgs); - app.endPriv(); -}); -aebLaunchURL=app.trustPropagatorFunction ( function ( oArgs ) -{ - app.beginPriv(); - var retn = app.launchURL(oArgs); - app.endPriv(); -}); - diff --git a/texmf-dist/doc/latex/thorshammer/folder-js/aeb_pro.js b/texmf-dist/doc/latex/thorshammer/folder-js/aeb_pro.js deleted file mode 100644 index 31c6c2fd..00000000 --- a/texmf-dist/doc/latex/thorshammer/folder-js/aeb_pro.js +++ /dev/null @@ -1,158 +0,0 @@ -/* - AEB Pro Document Assembly Methods - - Copyright (C) 2012 -- 2019 AcroTeX.Net - D. P. Story - http://www.acrotex.net - - Version 1.7.2 -*/ -// console.println("Version 1.7.2"); -if ( typeof aebTrustedFunctions == "undefined") { - aebTrustedFunctions = app.trustedFunction( function ( doc, oFunction, oArgs ) - { - app.beginPriv(); - var retn = oFunction( oArgs, doc ); - app.endPriv(); - return retn; - }); -} -aebAddWatermarkFromFile = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.addWatermarkFromFile(oArgs); - app.endPriv(); -}); -aebImportIcon = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.importIcon(oArgs); - app.endPriv(); -}); -aebInsertPages = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebInsertPages.msg==undefined)?("Insert Pages Error: " + e.toString()):aebInsertPages.msg;} - app.beginPriv(); - try { doc.insertPages(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebInsertPages.msg=undefined; -}) -aebAppOpenDoc = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebAppOpenDoc.msg==undefined)?("App Open Doc Error: " + e.toString()):aebAppOpenDoc.msg;} - app.beginPriv(); - try { var retn = app.openDoc(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebAppOpenDoc.msg=undefined; - return retn; -}) -aebImportTextData = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.importTextData(oArgs); - app.endPriv(); -}); -aebImportSound = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.importSound(oArgs); - app.endPriv(); -}); -aebSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - app.execMenuItem("Save"); - app.endPriv(); -}); -// Version 1.7.2 -aebDocSaveAs = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebDocSaveAs.msg==undefined)?("Doc SaveAs Error: " + e.toString()):aebDocSaveAs.msg;} - var Action=function(){return ((aebDocSaveAs.action==undefined)?null:eval(aebDocSaveAs.action));} - app.beginPriv(); - try { - return retn = doc.saveAs(oArgs); - } catch(e){console.println(Msg(e));Action();} - app.endPriv(); - aebDocSaveAs.msg=undefined; - aebDocSaveAs.action=undefined; -}); -aebExtractPages = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.extractPages(oArgs); - app.endPriv(); -}); -aebMailDoc = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.mailDoc(oArgs); - app.endPriv(); -}); -aebImportDataObject = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - return retn = doc.importDataObject(oArgs); - app.endPriv(); -}); -aebSignatureSign = app.trustPropagatorFunction( function ( oArgs, field ) -{ - app.beginPriv(); - return retn = field.signatureSign(oArgs); - app.endPriv(); -}); -aebSecurityHandlerLogin = app.trustPropagatorFunction( function ( oArgs, securityHandler ) -{ - app.beginPriv(); - return retn = securityHandler.login(oArgs); - app.endPriv(); -}); -aebSecurityGetHandler = app.trustPropagatorFunction( function ( oArgs, security ) -{ - app.beginPriv(); - return retn = security.getHandler(oArgs); - app.endPriv(); -}); -aebAppGetPath = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - var retn = app.getPath(oArgs); - app.endPriv(); - return retn; -}); -aebSignatureSetSeedValue = app.trustPropagatorFunction( function ( oArgs, field ) -{ - app.beginPriv(); - return retn = field.signatureSetSeedValue(oArgs); - app.endPriv(); -}); -aebAddIcon=app.trustPropagatorFunction( function ( oArgs, doc ) -{ - app.beginPriv(); - doc.addIcon(oArgs); - app.endPriv(); -}); -aebCreateTemplate = app.trustPropagatorFunction( function ( oArgs, doc ) -{ - var Msg=function(e){return (aebCreateTemplate.msg==undefined)?("Create Template Error: " + e.toString()):aebCreateTemplate.msg;} - app.beginPriv(); - try { doc.createTemplate(oArgs); } catch(e) {console.println(Msg(e));} - app.endPriv(); - aebCreateTemplate.msg=undefined; - -}) -// Version 1.7.1 removed doc from arg in browse and launch -aebBrowseForDoc=app.trustPropagatorFunction( function ( oArgs ) -{ - app.beginPriv(); - var retn = app.browseForDoc(oArgs); - app.endPriv(); -}); -// added aebLaunchURL Version 1.7 -aebLaunchURL=app.trustPropagatorFunction ( function ( oArgs ) -{ - app.beginPriv(); - var retn = app.launchURL(oArgs); - app.endPriv(); -}); - diff --git a/texmf-dist/doc/latex/thorshammer/install-action-seq.pdf b/texmf-dist/doc/latex/thorshammer/install-action-seq.pdf Binary files differindex e7a68382..ea8bae8e 100644 --- a/texmf-dist/doc/latex/thorshammer/install-action-seq.pdf +++ b/texmf-dist/doc/latex/thorshammer/install-action-seq.pdf diff --git a/texmf-dist/doc/latex/thorshammer/install-action-seq.tex b/texmf-dist/doc/latex/thorshammer/install-action-seq.tex new file mode 100644 index 00000000..98acf739 --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/install-action-seq.tex @@ -0,0 +1,81 @@ +\documentclass{article} +\usepackage[fleqn]{amsmath} +% +% the driver line is not necessary if you +% have aebpro.cfg configured to your driver. +% +\usepackage[web]{aeb_pro} +\usepackage{eforms} +\usepackage[altbullet]{lucidbry} +\usepackage{pifont} +\usepackage{graphicx} + +\usepackage{fancyvrb} + +\usepackage{xbmks} +\xbmksetup{colors={int=red},styles={intbf}} +%\DeclareInitView{layoutmag={navitab:UseOutlines}} +\hypersetup{pdfpagemode=UseOutlines} + +\makeatletter +\renewcommand{\paragraph} + {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} + {\normalfont\normalsize\bfseries}} +\renewcommand{\subparagraph} + {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% + {\normalfont\normalsize\bfseries}} +\makeatother + +\mathindent\parindent + +\def\AEBP{\app{AeB Pro}} +\def\AEB{\app{AeB}} +\def\APB{\app{APB}} +\def\app#1{\textsf{#1}} +\def\amtIndent{\parindent} +\def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} +\def\SC#1{{\small#1}} +\def\PDF{\SC{PDF}} +\let\uif\textsf +\let\opt\texttt + +%\reversemarginpar +\def\acInstr{How to install Action sequences in \textsf{Acrobat}} +\title{\acInstr} +\author{D. P. Story} +\email{dpstory@acrotex.net} +\version{1.0} +\revisionLabel{Published:} + +\begin{document} + +\maketitle + +\pdfbookmarkx[1]{The thorshammer package}[action={\GoToR/F(thors-the-man.pdf)/D[0 /Fit]},color=blue,style={bf}]{thorhammer} +\pdfbookmarkx[1]{Documentation of the system scripts}[action={\GoToR/F(thmclass.pdf)/D[0 /Fit]},color=blue,style={bf}]{sysscripts} + +\thispagestyle{empty} + +\begin{center}\large\bfseries + How to install action sequences +\end{center} + +\noindent \app{Acrobat XI} or later is required. Open \app{Acrobat} and +select \uif{Tools > Action Wizard}. Now select \uif{Manage Actions} to view +the \uif{Manage Actions} dialog box, refer to +\hyperref[fig:MA]{Figure~\ref*{fig:MA}} below. + +\begin{figure}[htb]\centering +\includegraphics[width=.67\linewidth]{graphics/manage-actions} +\caption{Manage Actions dialog box}\label{fig:MA} +\end{figure} + +\noindent \textbf{To import an Action sequence,} press the \uif{Import} +control and browse for the action sequence to be imported. Once you've +located the targeted action sequence, press the \uif{Open} control. This +imports the targeted sequence into the list the action sequences back in the +\uif{Manage Actions} dialog box. Press \uif{Close} to close this dialog box. +Before closing the \uif{Manage Actions} dialog box, you can, of course, +import additional action sequences. + +\end{document} diff --git a/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/00-class.cfg b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/00-class.cfg new file mode 100644 index 00000000..fda6a2ef --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/00-class.cfg @@ -0,0 +1,4 @@ +\classMember{Muehle}{Waeter}{MW634B/_Thor} +\classMember{Anton}{Mueller}{AM256M/_Thor} +\classMember{Laura}{Voegt}{LM356B/_Thor} + diff --git a/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/csvTOcfg.ps1 b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/csvTOcfg.ps1 new file mode 100644 index 00000000..87cda66f --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/csvTOcfg.ps1 @@ -0,0 +1,67 @@ +# Make a complete cfg for thorshammer package from a csv list +# accepted list delimiters: , or ;. Spaces ar not allowed! Replace all german umlauts +# with ue, oe, ae, ss to avoid problems with thorshammer package +# +# Example list: +# First Name|Last Name|Folder +# Anton;Müller;AM29914M +#\classMember{Anton}{Mueller}{AM299/instructor-name} +# Anton;Müller;*C:/.../AM299 +#\classMember{Anton}{Mueller}*{C:/.../AM299/instructor-name} +# +If ( $args.Length -eq 0 ) { + Write-Host "A CSV file of the class members is required," ` + "see documentation" + exit +} else { + $listName=$args[0] + if(Test-Path -Path ./$listName.csv) { + } else { + Write-Host "Cannot find the file `"$listName.csv`" in the current folder," ` + "check the spelling, do not include the extension." + exit + } +} +get-content "$listName.csv" | foreach { +"\classMember{" + $_ ` ++ "/_Thor}" ` +-Replace ";", "}{" ` +-Replace ",","}{" ` +-Replace "{\*", "*{" } | Set-Content "convertedList.cfg" + +# Store convertedList.cfg in a variable +$convertedListCfg = get-content .\convertedList.cfg -Raw + +# function to replace umlauts +# https://www.datenteiler.de/powershell-umlaute-ersetzen/ +function Replace-Umlaute ([string]$s) { + $UmlautObject = New-Object PSObject | Add-Member -MemberType NoteProperty -Name Name -Value $s -PassThru + + # hash tables are by default case insensitive + # we have to create a new hash table object for case sensitivity + + $characterMap = New-Object system.collections.hashtable + $characterMap.ä = "ae" + $characterMap.ö = "oe" + $characterMap.ü = "ue" + $characterMap.ß = "ss" + $characterMap.Ä = "Ae" + $characterMap.Ü = "Ue" + $characterMap.Ö = "Oe" + + foreach ($property in "Name") { + foreach ($key in $characterMap.Keys) { + $UmlautObject.$property = $UmlautObject.$property -creplace $key,$characterMap[$key] + } + } + $UmlautObject +} + +# replace umlauts in .cfg and make a correctedListCfg +$correctedListCfg = Replace-Umlaute "$convertedListCfg" +$correctedListCfg.Name + +# Finally append correctedListCfg to desired +# cfg file, usually class.cfg +add-content "00-class.cfg" $correctedListCfg.Name +Remove-Item convertedList.cfg diff --git a/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/mkclassFolders.ps1 b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/mkclassFolders.ps1 new file mode 100644 index 00000000..7f7fcc3e --- /dev/null +++ b/texmf-dist/doc/latex/thorshammer/system-scripts/standalone/mkclassFolders.ps1 @@ -0,0 +1,60 @@ +$classPath="C:\Users\dpstory\Desktop\Test Folder\target\myClass" +# Create class folders +If ( $args.Length -eq 0 ) { + Write-Host "A CVS file of the class members is required," ` + "see documentation" + exit +} else { + $listName=$args[0] + if(Test-Path -Path ./$listName.csv) { + } else { + Write-Host "Cannot find the file `"$listName.csv`" in the current folder," ` + "check the spelling, do not include the extension." + exit + } +} +get-content "$listName.csv" | foreach { +$_ +">_Thor" -Replace ";","," } | Set-Content "commaList.csv" + +$argList=@() +get-content "commaList.csv" | %{ +# Write-Host "$_" + $split=$_.split(",") +# Write-Host $split[2] + $argList+=$split[2] +} +$currentPath=Convert-Path . +cd $classPath +Write-Host "Creating folder structure at `$classPath`"," ` + "with some exceptions" +for ($i=0; $i -lt $argList.length; $i++) { + $arg=$argList[$i] + $splitTwo=$argList[$i].split(">") + $firstName=$splitTwo[0] + $secondName=$splitTwo[1] + if ($firstName[0] -eq "*") { + $arg=$arg.substring(1) + $msg="Parsing the full path $arg" -Replace ">","/" + Write-Host $msg + Write-Host "Creating exceptional folders" + $firstName=$firstName.substring(1) +#Write-Host "$firstName" + Write-Host " Creating folder: $firstName" + New-Item $firstName -ErrorAction:Ignore -ItemType directory + $secondName=$firstName+"/$secondName" +#Write-Host "$secondName" + Write-Host " Creating folder: $secondName" + New-Item $secondName -ErrorAction:Ignore -ItemType directory + } else { + $msg="Parsing the relative path $arg" -Replace ">","/" + Write-Host $msg + Write-Host " Creating folder: $firstName" + New-Item $firstName -ErrorAction:Ignore -ItemType directory + cd $firstName + Write-Host " Creating subfolder of $firstName named: $secondName" + New-Item $secondName -ErrorAction:Ignore -ItemType directory + cd .. + } +} +cd $currentPath +Remove-Item commaList.csv diff --git a/texmf-dist/doc/latex/thorshammer/system-scripts/thors-structure/thmclass.ps1 b/texmf-dist/doc/latex/thorshammer/system-scripts/thors-structure/thmclass.ps1 index 2dcbc65c..7f1f72bf 100644 --- a/texmf-dist/doc/latex/thorshammer/system-scripts/thors-structure/thmclass.ps1 +++ b/texmf-dist/doc/latex/thorshammer/system-scripts/thors-structure/thmclass.ps1 @@ -1,3 +1,11 @@ +# Version 1.4 changes +# ===================================================================================================== +# small modifications of tex template +# remove some comments +# added partial support for cntdwn package, not fully working here to keep tex template small +# interested users should refer to Acrotex blog for further explanations +# anyway the template compiles without errors +# ===================================================================================================== # Version 1.3 changes # ===================================================================================================== # copyka.ps1 allows a comment character (#) @@ -415,7 +423,7 @@ New-Item "tex-template.tex" -ItemType file If ($locale -like "*$myLocale*") { # German ###################################### Set-Content "tex-template.tex" '%% Customize template ! %% -\documentclass[fontsize=11pt]{scrartcl} +\documentclass[fontsize=12pt]{scrartcl} \usepackage[% german, pro, @@ -424,17 +432,19 @@ navibar, forcolorpaper %forpaper ]{web} +% Page layout \usepackage[top=20mm,left=20mm,right=20mm,bottom=25mm]{geometry} +%\useFullWidthForPaper \usepackage[usesumrytbls,allowrandomize]{exerquiz} \usepackage{ran_toks} \usepackage[% % usebatch % copy to class folder -batchdistr % only copy to instructors folder -% testmode % testing quizzes +% batchdistr % only copy to instructors folder +testmode % testing quizzes ]{thorshammer} \hypersetup{pdfencoding=auto} % include or remove hyperref options %\usepackage{thorshammerConf} % place your own sty file here -\usepackage[autostyle=true]{csquotes} % change quotes globally +%\usepackage[autostyle=true]{csquotes} % change quotes globally \DeclareQuiz{q#number} \setInitMag{fitwidth} @@ -454,8 +464,8 @@ batchdistr % only copy to instructors folder %\DeclareCoverPage{0} % Header settings -\thQzName{#theme} % Thema -\thQzHeaderL{#class} % Klasse +\thQzName{#theme} +\thQzHeaderL{#class} \thQzHeaderCQ{#subject: \thqzname} \thQzHeaderCS{Lösungen: \thqzname} @@ -464,7 +474,7 @@ batchdistr % only copy to instructors folder \subject{#subject} \author{#instrName} \keywords{#time} -\university{Freiherr-vom-Stein-Berufskolleg} % change to your institution +\university{Freiherr-vom-Stein-Berufskolleg} \version{#number} \copyrightyears{#date} @@ -475,9 +485,26 @@ batchdistr % only copy to instructors folder \sadMultQuizzes \end{makeClassFiles} +% Timer settings, this are personal settings for a timer in the quiz, if you want that, refer to +% http://www.acrotex.net/blog/?p=450 +% with \usepackage[shortcount]{cntdwn} + +% \newcommand{\thorTimer}[2]{% +% \setShortCntDwn{CntDwnTimer1} +% {% +% length=#1*\minutes, +% notify1=#2*\minutes, +% event1=AllowEndQuiz1, +% event2=NoAction, +% event3=NoAction, +% endEvent=EndTheQuiz1 +% } +% } +%\thorTimer{#time}{10} % original command \setShortCntDwn + \begin{document} + \makeinlinetitle -% Instructions % Declare Quiz bodys \declareQuizBody{qzbody1} @@ -487,11 +514,22 @@ batchdistr % only copy to instructors folder \begin{qzbody1} \bRTVToks{\currQuiz} -% Change margin settings for summary tables, and set it back after -% \thQuizHeader execution -\newgeometry{top=20mm,left=30mm,right=20mm,bottom=25mm} \thQuizHeader -\newgeometry{top=20mm,left=20mm,right=20mm,bottom=25mm} + +% priorInitQuiz for the timer, see Timer settings +\begin{defineJS}[\makeesc\!]{\priorInitQuiz} +this.getField("endQuiz.!thisQuiz").display=display.hidden; +qtypesReadOnly("!thisQuiz",false); +\end{defineJS} + +% postInitQuiz for timer, see Timer settings +\begin{defineJS}[\makeesc\!]{\postInitQuiz} +AllowEndQuiz1.arg="!currQuiz"; +EndTheQuiz1.arg="!currQuiz"; +sStartTimer(_oCntDwnTimer1); +\end{defineJS} + +% Instructions here \begin{quiz*}{\currQuiz} % Bearbeiten Sie folgende Aufgaben. @@ -526,7 +564,11 @@ Set-Content "tex-template.tex" '%% Customize template ! %% \usepackage{web} \usepackage[usesumrytbls,allowrandomize]{exerquiz} \usepackage{ran_toks} -\usepackage[usebatch]{thorshammer} +\usepackage[% +% usebatch % copy to class folder +% batchdistr % only copy to instructors folder +testmode % testing quizzes +]{thorshammer} \DeclareQuiz{q#number} @@ -560,8 +602,8 @@ Set-Content "tex-template.tex" '%% Customize template ! %% %\DeclareCoverPage{0} % Header settings -\thQzName{#theme} % topic -\thQzHeaderL{#class} % class +\thQzName{#theme} +\thQzHeaderL{#class} \thQzHeaderCQ{#subject: \thqzname} \thQzHeaderCS{Solutions: \thqzname} @@ -581,14 +623,51 @@ Set-Content "tex-template.tex" '%% Customize template ! %% \sadMultQuizzes \end{makeClassFiles} +% Timer settings, this are personal settings +% for a timer in the quiz, if you want that, refer to % +% http://www.acrotex.net/blog/?p=450 + +% \newcommand{\thorTimer}[2]{% +% \setShortCntDwn{CntDwnTimer1} +% {% +% length=#1*\minutes, +% notify1=#2*\minutes, +% event1=AllowEndQuiz1, +% event2=NoAction, +% event3=NoAction, +% endEvent=EndTheQuiz1 +% } +% } +%\thorTimer{#time}{10} % original command \setShortCntDwn + + \begin{document} + +% Declare quiz bodies \declareQuizBody{qzbody1} +%\declareQuizBody{qzbody2} +%\declareQuizBody{qzbody3} +%\declareQuizBody{qzbody4} + \begin{qzbody1} \bRTVToks{\currQuiz} \thQuizHeader +% priorInitQuiz for the timer, see Timer settings +\begin{defineJS}[\makeesc\!]{\priorInitQuiz} +this.getField("endQuiz.!thisQuiz").display=display.hidden; +qtypesReadOnly("!thisQuiz",false); +\end{defineJS} + +% postInitQuiz for timer, see Timer settings +\begin{defineJS}[\makeesc\!]{\postInitQuiz} +AllowEndQuiz1.arg="!currQuiz"; +EndTheQuiz1.arg="!currQuiz"; +sStartTimer(_oCntDwnTimer1); +\end{defineJS} + % Instructions \begin{quiz*}{\currQuiz} Solve each of these problems, passing is 100\%. diff --git a/texmf-dist/doc/latex/thorshammer/thmclass.pdf b/texmf-dist/doc/latex/thorshammer/thmclass.pdf Binary files differindex 50e2da72..642cd178 100644 --- a/texmf-dist/doc/latex/thorshammer/thmclass.pdf +++ b/texmf-dist/doc/latex/thorshammer/thmclass.pdf diff --git a/texmf-dist/doc/latex/thorshammer/thors-the-man.pdf b/texmf-dist/doc/latex/thorshammer/thors-the-man.pdf Binary files differindex d67db59e..6e4416d3 100644 --- a/texmf-dist/doc/latex/thorshammer/thors-the-man.pdf +++ b/texmf-dist/doc/latex/thorshammer/thors-the-man.pdf diff --git a/texmf-dist/doc/latex/thorshammer/thors-the-man.tex b/texmf-dist/doc/latex/thorshammer/thors-the-man.tex index be267d67..82b71cb5 100644 --- a/texmf-dist/doc/latex/thorshammer/thors-the-man.tex +++ b/texmf-dist/doc/latex/thorshammer/thors-the-man.tex @@ -78,7 +78,7 @@ email={dpstory@acrotex.net}, subject=Documentation for the thorshammer package, talksite={\url{www.acrotex.net}}, - version={1.5.7, 2020/01/13}, + version={1.5.11, 2021/06/24}, Keywords={assessment workflow, LaTeX, AcroTeX}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, @@ -209,46 +209,49 @@ Thor's way. \section{Preliminaries} Most important is the correct installation of \pkg{thorshammer} along with -its required packages and folder JavaScript files. +its required packages and folder JavaScript files. These are discussed in +this section. \subsection{Package requirements} -The most recent version of the packages \pkg{insdljs} (2019/10/23), -\pkg{exerquiz} (2019/10/13), \pkg{eq-save} (2019/08/07) are required. These three packages -were modified slightly to obtain features needed by \pkg{thorshammer}. +The most recent version of the packages \pkg{insdljs} (2021/06/19), +\pkg{exerquiz} (2021/05/29), \pkg{eq-save} (2021/04/27) are required. These +three packages were modified slightly to obtain features needed by +\pkg{thorshammer}. -The \pkg{thorshammer} package ships with two folder JavaScript files -\texttt{aeb\_pro.js}\FmtMP{\textsf{aeb\_pro.js}} (Version 1.7.2 or later, +The \pkg{thorshammer} package requires the folder JavaScript files +\texttt{aeb\_pro.js}\FmtMP{\textsf{aeb\_pro.js}} (Version 1.6.2 or later, required) and \texttt{aeb-reader.js}\FmtMP{\textsf{aeb-reader.js}} (Version -1.0 or later); these two are found in \texttt{folder-js} -folder\FmtMP{\texttt{folder-js} folder}. The latter is a new JavaScript file, -the former ships with the \pkg{aeb\_pro} package. These files give access to +1.0 or later); these two are distributed by the +\pkg{acrotex-js}\FmtMP{\pkg{acrotex-js} pkg} package, dated 2021/06/24 or +later, and are found in \texttt{js-files} folder +of the distribution of \pkg{acrotex-js}. These files give access to security restricted JavaScript methods. If you already have \pkg{aeb\_pro} -installed, be sure you have Version 1.7.2 of \texttt{aeb\_pro.js}, if not, -install Version 1.7.2 provided by this distribution. +installed, be sure you have Version 1.6.2 of \texttt{aeb\_pro.js}, if not, +install Version 1.6.2 provided by the \pkg{acrotex-js} distribution. The \texttt{aeb\_pro.js} is used on the instructor's system, along with -\app{Acrobat} (\app{AA}), to author quizzes. \app{Distiller} is not used unless the -author prefers a TEX $\rightarrow$ DVI $\rightarrow$ PS $\rightarrow$ PDF -workflow, using \app{Distiller} as the PDF creator. For this workflow, -\app{pdflatex}, \app{lualatex}, and \app{xelatex} will work as PDF creators; -however, \app{Acrobat} ia needed to execute the JavaScript code generated by -the command \cs{sadQuizzes} and to execute the action sequences provided by -this package. +\app{Acrobat} (\app{AA}), to author quizzes. \app{Distiller} is not used +unless the author prefers a TEX $\rightarrow$ DVI $\rightarrow$ PS +$\rightarrow$ PDF workflow, using \app{Distiller} as the PDF creator. For +this workflow, \app{pdflatex}, \app{lualatex}, and \app{xelatex} will work as +PDF creators; however, \app{Acrobat} is needed to execute the JavaScript code +generated by the command \cs{sadQuizzes} and to execute the action sequences +provided by this package. Once the quizzes are created, the author can take the quizzes in \app{Adobe Reader} (\app{AR}) to get the same experience as his students. Additionally, -\texttt{aeb-reader.js} can be installed on the instructor's system and on the -student's work environment, if possible/permitted. \texttt{aeb-reader.js} +\texttt{aeb-reader.js}\FmtMP{\textsf{aeb-reader.js}} can be installed on the +student's work environment, if possible/permitted; \texttt{aeb-reader.js} contains a subset of JavaScript methods taken from \texttt{aeb\_pro.js} that \emph{will enhance student experience}. The author can install this file on his system to take the quizzes in the same environment, again using \app{Adobe Reader}. \textbf{Warning:}\FmtMP{\textbf{Warning}} Do not install -\texttt{aeb\_pro.js} in any folder where an \app{Adobe Reader} used by -students would read it. +\texttt{aeb\_pro.js} in any folder where an \app{Adobe Reader} is used by +students. \paragraph*{Other enhancements to user experience.} \app{Adobe Reader} is by default in \uif{Protected Mode}. -Then \uif{Protected Mode} is enabled, one or more security dialog boxes popup +When \uif{Protected Mode} is enabled, one or more security dialog boxes popup as the student saves his/her document. To eliminate this annoyance, clear the \uif{Enable Protected Mode at startup} checkbox, as shown in the \hyperref[fig:PM]{Figure~\ref*{fig:PM}}. On your personal system, open @@ -272,10 +275,10 @@ the sysadmin\FmtMP{sysadmin permission} to make those changes. %\pkg{aeb\_pro} package, though the package itself is not required. As a convenience, %\texttt{aeb\_pro.js} is also include in the \texttt{folder-js} folder. -\paragraph*{Installation of JS files for \app{Acrobat}.} The JavaScript file \texttt{aeb-reader.js} -is provided in the \texttt{folder-js} folder. Discussion of how and where to -install folder JavaScript files is found in the file -\texttt{docs/install\_jsfiles.pdf}. Read and follow the directions carefully. +\paragraph*{Installation of JS files for \app{Acrobat}.} The description of the installation of +the JavaScript file \texttt{aeb\_pro.js} is provided by the \pkg{acrotex-js} +package; read the \texttt{install\_jsfiles.pdf} file found in the +\texttt{docs} folder of the \pkg{acrotex-js} package. \paragraph*{Installation of JS files for \app{Adobe Reader}.} The folder JavaScript file \texttt{aeb-reader.js} may be installed for use by \app{Adobe Reader} as @@ -283,11 +286,12 @@ well. Installing \texttt{aeb-reader.js} enhances the experience of the students as they save their quiz document after completing the quiz. Normally, it is not possible to install such a JavaScript file for use by students; however, if the students take the quiz in a Computer Lab, the -sysadmin can install \texttt{aeb-reader.js} on all the computers used in the +sysadmin\FmtMP{sysadmin} can install \texttt{aeb-reader.js} on all the computers used in the Computer Lab. Discussion of how and where to install folder JavaScript files -is found in the file \texttt{docs/install\_jsfiles.pdf}. Read and follow the -directions carefully. (\app{Reader} looks for its folder JavaScript files in -the same location where \app{Acrobat} would look for them.) +is found in the file \texttt{docs/install\_jsfiles.pdf} of the +\pkg{acrotex-js} package. Read and follow the directions carefully. +(\app{Reader} looks for its folder JavaScript files in the same location +where \app{Acrobat} would look for them.) \subsection{Package options} @@ -1938,7 +1942,7 @@ distribution. to see if there are any errors. The attachment to this file contains the quiz results, save and do with them what you will, perhaps merging them into a larger spreadsheet. - \item \textbf{\textsf{Thor protects} action.} Applies to a collection of + \item \textbf{\textsf{Thor protects} action.}\FmtMP{Secret password is \texttt{"acrotex"}} Applies to a collection of newly created quizzes that specify the \opt{batchdistr} option. Running this action places security on the quizzes so the student's cannot view the answers even if they are using \app{Acrobat}. @@ -1958,7 +1962,7 @@ distribution. quizzes to the students folders, you can use \textsf{Thor distributes} to accomplish that task. \end{itemize} - \item \textbf{\textsf{Thor protects and distributes} action.} Applies to + \item \textbf{\textsf{Thor protects and distributes} action.}\FmtMP{Secret password is \texttt{"acrotex"}} Applies to a collection of newly created quizzes that specify the \opt{batchdistr} option. Refer to \hyperref[ss:bd]{Section~\ref{ss:bd}} for more details. The action is @@ -1987,6 +1991,10 @@ distribution. see \hyperref[item:RS]{item~\ref*{item:RS}} titled \textbf{Remove Security}. After removing security, we continue with the \textsf{Thor's way} action. \end{itemize} +\textbf{A Note on Password Protection.} The default password for the two +action sequences is \texttt{"acrotex"}. This can be changed for your system +by editing the two sequences from within the \app{Acrobat} user interface and +changing the password there. \section{Further discussion of Basic Methods} @@ -2118,40 +2126,25 @@ system drive that students have access to, designated as SD (system drive). \section{The \tops{\protect\opt{ordinary}}{ordinary} option}\label{ordinary} This option was prompted by an \pkg{exerquiz} user who had a unique problem: -He wanted to put password protection on the \uif{Correct} button of an -\pkg{exerquiz} quiz. He wanted to distribute quizzes to his students. The -students would take the quiz, and, on pressing the \uif{End Quiz} button, -would get their score, but the \uif{Correct} button would be denied to them -through a password mechanism. +He wanted to put password protection (PIN security) on the \uif{Correct} +button of an \pkg{exerquiz} quiz. He wanted to distribute quizzes to his +students. The students would take the quiz, and, on pressing the \uif{End +Quiz} button, would get their score, but the \uif{Correct} button would be +denied to them through a password mechanism. Solving this problem necessitated some of the special features of -\pkg{thorshammer}, without the use of \cs{sadQuizzes}. +\pkg{thorshammer}, without the use of \cs{sadQuizzes}, as well as the creation +of a few new commands. To see the solution to this problem, go to the -\texttt{examples/orginary-option} folder. There are three files in that -folder: -\begin{itemize} - \item {\ttfamily quiz-pwd-to-correct-AA.tex}: This file requires the use - of \app{Acrobat} to create the quizzes. The password is dynamically - encoded as the PDF is loaded into \app{Acrobat} for the first time. - \item {\ttfamily quiz-pwd-to-correct-AR.tex}: Again, the \uif{Correct} - button is password protected, only \app{Adobe Reader} is required - to build this file; however, the encrypted password cannot be built - dynamically. It must be first computed and hard-wired placed in the - source document. - \item {\ttfamily get-hash-string.tex}: This is a companion file to the - `AR' version described above. Build this file using any method. - Open it in \app{Adobe Reader} and press the \uif{Push} button. A - response dialog box opens, enter your chosen password (PIN number) - and press \uif{OK}. The hash string of your password appears on the - text field. Copy the password (or PIN) and the hash string to - {\ttfamily quiz-pwd-to-correct\allowbreak-AR.tex}. Comment out the human readable - password in your file and paste the hash string into the value of - the \texttt{\_PinCode} JavaScript variable, then build the file - {\ttfamily quiz-pwd-to\allowbreak-correct-AR.tex}. Now, the \uif{Correct} - button is password (PIN) protected. +\texttt{examples/orginary-option} folder to find the demo file +\texttt{thqz-p2c.tex}. This file uses the +\pkg{\href{https://ctan.org/pkg/eq-pin2corr}{eq-pin2corr}} package.\footnote{\pkg{eq-pin2corr} is +a package capable of placing PIN security (and other security) on an \pkg{exerquiz} quiz, apart from the +use of the \pkg{thorshammer} package.} +Additional discussion of the techniques and special ``transition'' commands +is found in the demo document. -\end{itemize} \section{My retirement} diff --git a/texmf-dist/doc/latex/thorshammer/thorshammer.pdf b/texmf-dist/doc/latex/thorshammer/thorshammer.pdf Binary files differindex 6e6c6fba..2ca79e94 100644 --- a/texmf-dist/doc/latex/thorshammer/thorshammer.pdf +++ b/texmf-dist/doc/latex/thorshammer/thorshammer.pdf |