summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/clicks/DEPENDS.txt1
-rw-r--r--macros/latex/contrib/clicks/README.md31
-rw-r--r--macros/latex/contrib/clicks/clicks.pdfbin0 -> 255137 bytes
-rw-r--r--macros/latex/contrib/clicks/clicks.sty73
-rw-r--r--macros/latex/contrib/clicks/clicks.tex84
-rw-r--r--macros/latex/contrib/crumbs/crumbs.pdfbin332452 -> 345356 bytes
-rw-r--r--macros/latex/contrib/crumbs/crumbs.sty83
-rw-r--r--macros/latex/contrib/crumbs/crumbs.tex23
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin577938 -> 577947 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex8
-rw-r--r--macros/latex/contrib/mcexam/README.md4
-rw-r--r--macros/latex/contrib/mcexam/mcexam.pdfbin229715 -> 222389 bytes
-rw-r--r--macros/latex/contrib/mcexam/mcexam.sty8
-rw-r--r--macros/latex/contrib/mcexam/mcexam.tex13
-rw-r--r--macros/latex/contrib/mcexam/mcexam_example.r118
-rw-r--r--macros/latex/contrib/mcexam/mcexam_example.tex20
-rw-r--r--macros/latex/contrib/mcexam/mcexam_example_dataset.r42
-rw-r--r--macros/latex/contrib/media9/ChangeLog5
-rw-r--r--macros/latex/contrib/media9/doc/media9.pdfbin3747836 -> 3748216 bytes
-rw-r--r--macros/latex/contrib/media9/media9.sty8
-rw-r--r--macros/latex/contrib/media9/pdfbase.sty12
-rw-r--r--macros/latex/contrib/mindflow/mindflow.dtx5
-rw-r--r--macros/latex/contrib/mindflow/mindflow.pdfbin207664 -> 207665 bytes
24 files changed, 359 insertions, 185 deletions
diff --git a/macros/latex/contrib/clicks/DEPENDS.txt b/macros/latex/contrib/clicks/DEPENDS.txt
new file mode 100644
index 0000000000..cb2dfa6fbf
--- /dev/null
+++ b/macros/latex/contrib/clicks/DEPENDS.txt
@@ -0,0 +1 @@
+hard etoolbox
diff --git a/macros/latex/contrib/clicks/README.md b/macros/latex/contrib/clicks/README.md
new file mode 100644
index 0000000000..22817f6ebe
--- /dev/null
+++ b/macros/latex/contrib/clicks/README.md
@@ -0,0 +1,31 @@
+[![make](https://github.com/yegor256/clicks/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/clicks/actions/workflows/latexmk.yml)
+[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/clicks/blob/master/LICENSE.txt)
+
+This LaTeX package adds nagivation clicks to your document, which
+may be very useful for presentation and slide decks.
+
+First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+from [CTAN](https://ctan.org/pkg/clicks)
+and then use in the preamble:
+
+```tex
+\documentclass{article}
+\usepackage{clicks}
+\usepackage{fancyhdr}
+\fancyhead[L]{\clicks}
+\begin{document}
+\section{Introduction}
+Some text here.
+\section{Related Works}
+Some other text here.
+\end{document}
+```
+
+The full example and all commands are available in the
+[`clicks.tex`](https://github.com/yegor256/clicks/blob/master/clicks.tex) file.
+
+If you want to contribute yourself, make a fork, then create a branch,
+then run `make` in the root directory.
+It should compile everything without errors. If not, submit an issue and wait.
+Otherwise, make your changes and then run `make` again. If the build is
+still clean, submit a pull request.
diff --git a/macros/latex/contrib/clicks/clicks.pdf b/macros/latex/contrib/clicks/clicks.pdf
new file mode 100644
index 0000000000..b599ec50d2
--- /dev/null
+++ b/macros/latex/contrib/clicks/clicks.pdf
Binary files differ
diff --git a/macros/latex/contrib/clicks/clicks.sty b/macros/latex/contrib/clicks/clicks.sty
new file mode 100644
index 0000000000..9862e10a54
--- /dev/null
+++ b/macros/latex/contrib/clicks/clicks.sty
@@ -0,0 +1,73 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{clicks}[2021/09/12 0.1.0 Clicks]
+
+\RequirePackage{etoolbox}
+
+\makeatletter\newif\ifclicks@static\makeatother
+\makeatletter\DeclareOption{static}{\clicks@statictrue}\makeatother
+\ProcessOptions\relax
+
+\makeatletter\newcommand*\clicks@body{}\makeatother
+\makeatletter\newcommand\clicks@flush{%
+ \clicks@body\vspace*{0pt}\newpage%
+}\makeatother
+
+\newcounter{minutes}
+
+% Print the content as is
+\newcommand\print[1]{%
+ \makeatletter\gappto\clicks@body\makeatother{{#1\par}}%
+}
+
+\makeatletter\newcommand\flush[1][1]{%
+ \clicks@flush%
+ \renewcommand*\clicks@body{}%
+ \ifclicks@static\else%
+ \addtocounter{minutes}{#1}%
+ \fi%
+}
+
+\makeatletter\newcommand\click{%
+ \ifclicks@static\else%
+ \clicks@flush%
+ \fi%
+}\makeatother
+
+% Print and flush
+% [1]: How many minutes to stay here
+% {1}: The content to print
+\newcommand\plush[2][1]{%
+ \print{#2}%
+ \flush[#1]%
+}
+
+% Print and click
+% {1}: The content to print
+\newcommand\plick[1]{%
+ \print{#1}%
+ \click%
+}
+
+\endinput
diff --git a/macros/latex/contrib/clicks/clicks.tex b/macros/latex/contrib/clicks/clicks.tex
new file mode 100644
index 0000000000..1be2b8077e
--- /dev/null
+++ b/macros/latex/contrib/clicks/clicks.tex
@@ -0,0 +1,84 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 Yegor Bugayenko
+%
+% Permission is hereby granted, free of charge, to any person obtaining a copy
+% of this software and associated documentation files (the 'Software'), to deal
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+
+\documentclass[12pt]{article}
+\usepackage[T1]{fontenc}
+\usepackage[tt=false,type1=true]{libertine}
+\usepackage{clicks}
+\usepackage{ffcode}
+
+\title{\ff{clicks}: \LaTeX{} Package \\ for Slide Deck Animation}
+\author{Yegor Bugayenko}
+\date{0.1.0 2021/09/12}
+
+\begin{document}
+\pagenumbering{gobble}
+\raggedbottom
+\setlength{\parindent}{0pt}
+\setlength{\columnsep}{32pt}
+\setlength{\parskip}{6pt}
+
+\maketitle
+
+\section[Intro]{Introduction}
+
+This package helps simulate animation in PDF documents. You put
+some content on the page, then you ``click'' and the pages ends,
+while the content gets copied to the next page. There, you add new
+content. In the full-screen presentation mode this will look
+like animation, similar to what you can get with MS PowerPoint.
+
+\begin{ffcode}
+\documentclass{article}
+\usepackage{clicks}
+\begin{document}
+\print{Here is your wedding plan:}\click
+\print{1. Buy a ring}\click
+\print{2. Propose}\click
+\print{3. Get married}\flush
+\end{document}
+\end{ffcode}
+
+You can make it shorter, with the help of
+\ff{\char`\\plick\{\}} and \ff{\char`\\plush\{\}} commands:
+
+\begin{ffcode}
+\documentclass{article}
+\usepackage{clicks}
+\begin{document}
+\plick{Here is your wedding plan:}
+\plick{1. Buy a ring}
+\plick{2. Propose}
+\plush{3. Get married}
+\end{document}
+\end{ffcode}
+
+If you need to render the document without animation, just
+use the \ff{static} package option.
+
+More details about this package you can find
+in the \ff{yegor256/clicks} GitHub repository.
+
+If you want to add a feature or fix a bug, you are welcome
+to submit an issue or make a pull request.
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/crumbs/crumbs.pdf b/macros/latex/contrib/crumbs/crumbs.pdf
index f9e2892b64..4d7bd0169f 100644
--- a/macros/latex/contrib/crumbs/crumbs.pdf
+++ b/macros/latex/contrib/crumbs/crumbs.pdf
Binary files differ
diff --git a/macros/latex/contrib/crumbs/crumbs.sty b/macros/latex/contrib/crumbs/crumbs.sty
index 2b497078da..17194892c0 100644
--- a/macros/latex/contrib/crumbs/crumbs.sty
+++ b/macros/latex/contrib/crumbs/crumbs.sty
@@ -21,13 +21,19 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{crumbs}[2021/09/09 0.2.2 Navigation Crumbs]
+\ProvidesPackage{crumbs}[2021/09/12 0.3.0 Navigation Crumbs]
+
+\makeatletter\newif\ifcrumbs@dry\makeatother
+\makeatletter\DeclareOption{dry}{\crumbs@drytrue}\makeatother
+\makeatletter\newif\ifcrumbs@increment\makeatother
+\makeatletter\DeclareOption{increment}{\crumbs@incrementtrue}\makeatother
+\ProcessOptions\relax
\RequirePackage{etoolbox}
% see https://tex.stackexchange.com/a/12414/1449
-\makeatletter\newcommand\back{\@backslashchar}\makeatother
-\makeatletter\newcommand\percent{\@percentchar}\makeatother
+\makeatletter\newcommand\crumbs@back{\@backslashchar}\makeatother
+% \makeatletter\newcommand\crumbs@percent{\@percentchar}\makeatother
\RequirePackage{catchfile}
\newwrite\appendwrite
\newcommand*\appendtofile[2]{%
@@ -49,46 +55,59 @@
\fi
}
-\NewCommandCopy\crumbsoldsection\section
-\renewcommand\section[2][]{
- \def\temp{#1}
- \ifx\crumbs\empty
+\makeatletter\newcommand\crumbection[2][]{%
+ \def\temp{#1}%
+ \ifx\crumbs\empty%
\appendtofile{\jobname.crumbs}{
- \back ifx \back crumbs \back empty
- \back gappto \back crumbs{\back setcounter{crumbi}{0}}
- \back fi
- \back gappto\back crumbs{\back stepcounter{crumbi}\back crumb{\ifx\temp\empty #2\else #1\fi}{#2}}
- }
- \fi
- \crumbsoldsection{#2}
-}
+ \crumbs@back ifx \crumbs@back crumbs \crumbs@back empty
+ \crumbs@back gappto \crumbs@back crumbs{\crumbs@back setcounter{crumbi}{0}}
+ \crumbs@back fi
+ \crumbs@back gappto\crumbs@back crumbs{\crumbs@back stepcounter{crumbi}\crumbs@back crumb{\ifx\temp\empty #2\else #1\fi}{#2}}
+ }%
+ \fi%
+ \ifcrumbs@increment\stepcounter{section}\fi%
+}\makeatother
-\NewCommandCopy\crumbsoldsubsection\subsection
-\renewcommand\subsection[2][]{
- \def\temp{#1}
- \ifx\crumbs\empty
+\makeatletter\newcommand\subcrumbection[2][]{%
+ \def\temp{#1}%
+ \ifx\crumbs\empty%
\appendtofile{\jobname.crumbs}{
- \back ifcsname crumbs\romannumeral\the\value{section}\back endcsname\back else
- \back expandafter\back newcommand\back csname crumbs\romannumeral\the\value{section}\back endcsname{%
- \back setcounter{subcrumbi}{0}
+ \crumbs@back ifcsname crumbs\romannumeral\the\value{section}\crumbs@back endcsname\crumbs@back else
+ \crumbs@back expandafter\crumbs@back newcommand\crumbs@back csname crumbs\romannumeral\the\value{section}\crumbs@back endcsname{%
+ \crumbs@back setcounter{subcrumbi}{0}
}
- \back fi
- \back expandafter\back gappto\back csname crumbs\romannumeral\the\value{section}\back endcsname{%
- \back stepcounter{subcrumbi}
- \back subcrumb{\ifx\temp\empty #2\else #1\fi}{#2}
+ \crumbs@back fi
+ \crumbs@back expandafter\crumbs@back gappto\crumbs@back csname crumbs\romannumeral\the\value{section}\crumbs@back endcsname{%
+ \crumbs@back stepcounter{subcrumbi}
+ \crumbs@back subcrumb{\ifx\temp\empty #2\else #1\fi}{#2}
}
- }
- \fi
- \crumbsoldsubsection{#2}
-}
+ }%
+ \fi%
+ \ifcrumbs@increment\stepcounter{subsection}\fi%
+}\makeatother
+
+\makeatletter\ifcrumbs@dry
+ \message{Since "dry" mode is ON we don't renew "section" and "subsection" commands}
+\else
+ \NewCommandCopy\crumbs@oldsection\section
+ \renewcommand\section[2][]{%
+ \crumbection[#1]{#2}%
+ \crumbs@oldsection{#2}%
+ }
+ \NewCommandCopy\crumbs@oldsubsection\subsection
+ \renewcommand\subsection[2][]{%
+ \subcrumbection[#1]{#2}%
+ \crumbs@oldsubsection{#2}%
+ }
+\fi\makeatletter
\ifcsname crumb\endcsname
- \message{The command "crumb" already defined}
+ \message{The command "crumb" is already defined}
\else
\newcommand\crumb[2]{#1}
\fi
\ifcsname subcrumb\endcsname
- \message{The command "crumb" already defined}
+ \message{The command "subcrumb" is already defined}
\else
\newcommand\subcrumb[2]{#1}
\fi
diff --git a/macros/latex/contrib/crumbs/crumbs.tex b/macros/latex/contrib/crumbs/crumbs.tex
index ce34e8c650..dbed6fc408 100644
--- a/macros/latex/contrib/crumbs/crumbs.tex
+++ b/macros/latex/contrib/crumbs/crumbs.tex
@@ -42,7 +42,7 @@
\title{\ff{crumbs}: \LaTeX{} Package \\ for Navigation Crumbs}
\author{Yegor Bugayenko}
-\date{0.2.2 2021/09/09}
+\date{0.3.0 2021/09/12}
\begin{document}
\pagenumbering{gobble}
@@ -114,6 +114,27 @@ an optional argument, which will be used in the crumbs, e.g.:
\subsection{How to Contribute}
+You may turn on the ``dry'' mode, which will prohibit the package to
+renew \ff{\char`\\section\{\}} and \ff{\char`\\subsection\{\}} commands.
+You will still be able to use the crumbs mechanism through
+\ff{\char`\\crumbection\{\}} and \ff{\char`\\subcrumbection\{\}}
+commands, for example:
+
+\begin{ffcode}
+\documentclass{article}
+\usepackage[dry]{crumbs}
+\begin{document}
+\crumbection[Intro]{Introduction} % Add it to \crumbs
+\section{Introduction} % Print it to the page
+Hello, world!
+\end{document}
+\end{ffcode}
+
+You can also instruct it to increment
+\ff{\char`\\section\{\}} and \ff{\char`\\subsection\{\}}
+on each call to \ff{\char`\\crumbection\{\}} and \ff{\char`\\subcrumbection\{\}}
+respectively. Just use the \ff{increment} package option.
+
More details about this package you can find
in the \ff{yegor256/crumbs} GitHub repository.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index cd64c2986e..2081f55551 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/09/10}{1.3c}
+\ProvidesExplClass{easybook}{2021/09/12}{1.3d}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/10}{1.3c}
+\ProvidesExplPackage{easybase}{2021/09/12}{1.3d}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2389,7 +2389,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/10}{1.3c}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/12}{1.3d}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 35245ad648..2549d682b3 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 98670293c1..a979be5a54 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -12,8 +12,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.3c,
- date = 2021/09/10,
+ version = v1.3d,
+ date = 2021/09/12,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = quee123@foxmail.com,
@@ -978,8 +978,8 @@
boxrule = 5pt,boxsep = 5pt,
borderline = {2pt}{2pt}{white}
}
- \newtcolorbox{mytcbox}[1][]{enhanced,tc-mytcb,title = #1}
- \begin{tcolorbox}[tc-mytcb,enhanced]
+ \newtcolorbox{mytcbox}[1][]{enhanced,mytcb,title = #1}
+ \begin{tcolorbox}[mytcb,enhanced]
盒子内容1
\end{tcolorbox}
\begin{mytcbox}[盒子标题]
diff --git a/macros/latex/contrib/mcexam/README.md b/macros/latex/contrib/mcexam/README.md
index 1170e6f689..369ed48707 100644
--- a/macros/latex/contrib/mcexam/README.md
+++ b/macros/latex/contrib/mcexam/README.md
@@ -1,9 +1,9 @@
-mcexam package v0.4
+mcexam package v0.5
The mcexam package is a LaTeX package that automatically randomly permutes the order of questions and answer options in different versions of a multiple choice exam/test. Next to the exam versions themselves, the package also allows printing a concept version of the exam, a key table with the correct answers or points, and a document with solutions and explanation per exam version. The package also allows writing an R code which processes the results of the exam and calculates the grades.
---------------
-Jorre Vannieuwenhuyze 2017
+Jorre Vannieuwenhuyze 2021
jorre_v[ad]zoho.com
Permission is granted to copy, distribute and/or modify this software under the terms of the LaTeX Project Public License, version 1.3c or later.
diff --git a/macros/latex/contrib/mcexam/mcexam.pdf b/macros/latex/contrib/mcexam/mcexam.pdf
index c5ec177536..3e32e95cae 100644
--- a/macros/latex/contrib/mcexam/mcexam.pdf
+++ b/macros/latex/contrib/mcexam/mcexam.pdf
Binary files differ
diff --git a/macros/latex/contrib/mcexam/mcexam.sty b/macros/latex/contrib/mcexam/mcexam.sty
index f28c975ced..c2359ac17a 100644
--- a/macros/latex/contrib/mcexam/mcexam.sty
+++ b/macros/latex/contrib/mcexam/mcexam.sty
@@ -46,7 +46,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mcexam}[2017/12/26 v0.4 LaTeX package for creating randomized Multiple Choice questions]
+\ProvidesPackage{mcexam}[2021/09/12 v0.5 LaTeX package for creating randomized Multiple Choice questions]
% package option: output
\newbool{mc@concept}
@@ -1057,10 +1057,11 @@
\foreach \a in {1,...,\csuse{mc@totalNumberOfAnswersQ\q}}{
\csxdef{mc@answerTempnum\a}{\a}
}
+ \numdef\@numberofpermuteanswers{\csuse{mc@totalNumberOfAnswersQ\q}}
\numdef\@numberofswaps{\csuse{mc@totalNumberOfAnswersQ\q}-1}
\foreach \v in {1,...,\mc@totalNumberOfVersions}{
\foreach \x in {1,...,\@numberofswaps}{
- \pgfmathrandominteger{\r}{\x}{\csuse{mc@totalNumberOfAnswersQ\q}}
+ \pgfmathrandominteger{\r}{\x}{\@numberofpermuteanswers}
\letcs\@temp{mc@answerTempnum\x}
\global\csletcs{mc@answerTempnum\x}{mc@answerTempnum\r}
\global\cslet{mc@answerTempnum\r}{\@temp}
@@ -1137,6 +1138,7 @@
\def\mc@randomizeAnswers@userdefined{
+ \numdef\@numberofpermuteanswers{\csuse{mc@totalNumberOfUserPermutationsQ\q}}
\numdef\@numberofswaps{\csuse{mc@totalNumberOfUserPermutationsQ\q}-1}
\gdef\mc@cntr{0}
\renewcommand*{\do}[1]{
@@ -1147,7 +1149,7 @@
\foreach \v in {1,...,\mc@totalNumberOfVersions}{
\ifnumequal{\mc@cntr}{0}{
\foreach \p in {1,...,\@numberofswaps}{
- \pgfmathrandominteger{\r}{\p}{\csuse{mc@totalNumberOfUserPermutationsQ\q}}
+ \pgfmathrandominteger{\r}{\p}{\@numberofpermuteanswers}
\letcs\@temp{mc@userPermutationQ\q P\p}
\global\csletcs{mc@userPermutationQ\q P\p}{mc@userPermutationQ\q P\r}
\global\cslet{mc@userPermutationQ\q P\r}{\@temp}
diff --git a/macros/latex/contrib/mcexam/mcexam.tex b/macros/latex/contrib/mcexam/mcexam.tex
index c97e86f3a8..bd450a0668 100644
--- a/macros/latex/contrib/mcexam/mcexam.tex
+++ b/macros/latex/contrib/mcexam/mcexam.tex
@@ -218,7 +218,7 @@ The package also defines the \verb$\mcexamoptions{key=value,...}$ command which
\subsection{The questions}
-The most important parts of the exam are, of course, the questions. Within the body of your script file, you place the questions within the \verb$mcquestions$-environment which works similar to list-environments. Each question is preceded by a \verb$\question$ command similar to the \verb$\item$ command :
+The most important parts of the exam are, of course, the questions. Within the body of your script file, you place the questions within the \verb$mcquestions$-environment which works similar to list-environments. Each question is preceded by a \verb$\question$ command similar to the \verb$\item$ command:
\begin{code}
\begin{mcquestions}
\question This is the first question.
@@ -314,7 +314,7 @@ By default, all answers are randomly shuffled within the \verb$mcanswerslist$ an
\item \verb$permutenone$:
This option doesn't permute the answers and sorts the answers in each version in the same order as they are given in the script file.
\item \emph{User specific}:
- If none of the above options satisfies your needs, you can still enter the possible permutations manually. You achieve this by making a comma separated list of all allowed permutations where each permutation itself is a comma separated list of all answer numbers within two curly braces. For example, if your question contains three answers you can give the option \verb$[{1,2,3},{2,3,1}]$. With this option, the package will either put the answers in the order `answer 1, answer 2, answer 3' or in the order `answer 2, answer 3, answer 1'. The package will throw errors if only one permutation is given, if a permutation does not contain all answer numbers, if a permutations contains answer numbers more than once, or if a permutation contains invalid answer numbers. The package will not throw errors if a permutation is given more than once. For example, \verb$[{1,2,3},{1,2,3},{2,3,1}]$ will not give errors, it just means that the order `1,~2,~3' is twice more likely to appear than the order `2,~3,~1'.
+ If none of the above options satisfies your needs, you can still enter the possible permutations manually. You achieve this by making a comma separated list of all allowed permutations where each permutation itself is a comma separated list of all answer numbers within two curly braces. For example, if your question contains three answers you can give the option \verb$[{1,2,3},{2,3,1}]$. With this option, the package will either put the answers in the order `answer 1, answer 2, answer 3' or in the order `answer 2, answer 3, answer 1'. The package will throw errors if only one permutation is given, if a permutation does not contain all answer numbers, if a permutation contains answer numbers more than once, or if a permutation contains invalid answer numbers. The package will not throw errors if a permutation is given more than once. For example, \verb$[{1,2,3},{1,2,3},{2,3,1}]$ will not give errors, it just means that the order `1,~2,~3' is twice more likely to appear than the order `2,~3,~1'.
\end{itemize}
Putting all together, in your script file you can write something like this:
@@ -684,18 +684,13 @@ in the preamble of your script file.
\item[2017/12/26 v0.4:] Added \texttt{pgffor} package to fix bug.
+\item[2021/09/12 v0.5:] Fixed bugs with randomization of answers.
+
\end{description}
-\subsection{Planned modifications}
-\begin{itemize}
- \item Add an error message when you only have one question and the option randomizequestions=true. Now, you should change this option explicitly to randomizequestions=false for one question.
- \item Find an alternative for longtable which is now the default for tables in the package. Longtable doesn't work with twocolumn.
- \item Add a function to reproduce the questions in another permutation/version within the same document.
- \item Add the option to continue the question counter over several mcquestions environments.
-\end{itemize}
diff --git a/macros/latex/contrib/mcexam/mcexam_example.r b/macros/latex/contrib/mcexam/mcexam_example.r
deleted file mode 100644
index 736cd50161..0000000000
--- a/macros/latex/contrib/mcexam/mcexam_example.r
+++ /dev/null
@@ -1,118 +0,0 @@
-mcprocessanswers <- function(ID,versions,answers,path=getwd()) {
-
-tol <- .Machine$double.eps^0.5
-if(! is.numeric(answers)) stop("non-numeric value(s) in answers, mcprocessanswers stopped")
-if(min(answers > tol)==0) stop("non-positive value(s) in answers, mcprocessanswers stopped")
-if(min(abs(answers - round(answers)) < tol)==0) stop("non-integer value(s) in answers, mcprocessanswers stopped")
-if(! is.numeric(versions)) stop("non-numeric value(s) in versions, mcprocessanswers stopped")
-if(min(versions > tol)==0) stop("non-positive value(s) in versions, mcprocessanswers stopped")
-if(min(abs(versions - round(versions)) < tol)==0) stop("non-integer value(s) in versions, mcprocessanswers stopped")
-if(min(versions-4< tol)==0) stop("value(s) in versions too large, maximum possible value is 4, mcprocessanswers stopped")
-
-questiondictionary=list(c(11,3,14,15,16,17,12,2,6,4,7,8,5,9,10,13,1),c(8,10,3,4,5,15,11,16,2,12,7,6,17,9,1,13,14),c(7,11,8,9,10,3,1,15,4,2,12,17,16,13,14,5,6),c(13,12,3,4,5,9,2,11,16,17,14,15,1,6,7,8,10))
-
-randomizedanswersdictionary=list(
- list(c(3,1,2,4,5),c(3,4,1,2),c(4,1,2,3),c(1,2,3,4,5),c(2,1,3,4),c(2,1,4,3),c(4,1,3,2),c(4,3,2,1),c(3,4,1,2),c(4,3,2,1),c(4,2,1,3),c(4,3,1,2),c(4,3,2,1),c(4,3,2,1),c(2,4,1,3),c(1,2,3,4),c(1,2))
- ,list(c(4,3,1,2,5),c(3,4,2,1),c(1,2,3,4),c(5,4,3,2,1),c(1,2,3,4),c(3,4,1,2),c(2,1,3,4),c(4,3,2,1),c(2,1,3,4),c(4,3,2,1),c(3,1,2,4),c(4,2,3,1),c(4,2,3,1),c(1,2,3,4),c(3,4,2,1),c(2,1,3,4),c(1,2))
- ,list(c(3,2,1,4,5),c(3,1,2,4),c(3,4,1,2),c(5,4,3,2,1),c(2,1,3,4),c(1,2,3,4),c(4,1,2,3),c(1,2,3,4),c(3,4,1,2),c(2,1,3,4),c(1,4,3,2),c(3,2,4,1),c(1,3,2,4),c(4,3,2,1),c(1,4,3,2),c(2,1,3,4),c(1,2))
- ,list(c(2,4,1,3,5),c(2,3,1,4),c(4,1,2,3),c(1,2,3,4,5),c(2,1,3,4),c(4,3,2,1),c(2,4,3,1),c(1,2,3,4),c(3,2,4,1),c(4,1,2,3),c(1,4,2,3),c(3,2,4,1),c(1,2,3,4),c(1,2,3,4),c(1,4,3,2),c(1,2,3,4),c(1,2))
- )
-
-correctiondictionary=list(c(1,0,0,0,0),c(0,0,1,0),c(1,0,0,0),c(0,1,0,0,0),c(0,1,0,0),c(0,0,0,1),c(1,0,0,0),c(0,0,1,0),c(1,0,0,0),c(0,1,0,0),c(0,0,1,0),c(1,0,0,0),c(0,0,1,0),c(0,0,0,1),c(0,1,0,0),c(0,1,0,0),c(1,0))
-
-Nversions=4;
-Nquestions=17;
-Nanswers=c(5,4,4,5,4,4,4,4,4,4,4,4,4,4,4,4,2);
-Nstudents=nrow(answers);
-
-Q <- matrix(NA,nrow=Nstudents,ncol=Nquestions);
-P <- matrix(NA,nrow=Nstudents,ncol=Nquestions);
-for ( student in 1:Nstudents ){
- for (question in 1:Nquestions){
- R <- randomizedanswersdictionary[[versions[student]]][[question]];
- Q[student,question] <- R[answers[student,questiondictionary[[versions[student]]][question]]];
- P[student,question] <- correctiondictionary[[question]][Q[student,question]];
- P[student,question] <- ifelse(is.na(P[student,question]),0,P[student,question]);
- }}
-Points=apply(P,1,sum);
-outputdata <- data.frame(ID=ID,versions=versions,originalQuestion=Q,pointsQuestion=P,total=Points);
-
-p <- apply(P,2,mean);
-p.cor <- apply(P,2,mean) - (1-apply(P,2,mean))/(Nanswers-unlist(lapply(correctiondictionary,sum)));
-r.cor <- NULL;
-for (i in 1:Nquestions){
- r.cor[i] <- ifelse(var(P[,i])==0,0,cor(P[,i],apply(P[,-i],1,sum)));
- }
-
-Nquestions.cor <- sum(apply(P,2,var)>0);
-alpha <- (Nquestions.cor/(Nquestions.cor-1))*(1-(sum(apply(P,2,var))/var(Points)));
-
-outputfilename=file.path(path,"mcexam_example.ana");
-write("\\makeatletter",outputfilename) ;
-
-formatnumber <- function(x) {
- y <- gsub("(?<![0-9.])0+","", sprintf("%.3f",x),perl = TRUE)
- n <- nchar(y)
- y <- gsub(" ","\\\\phantom{-}",y)
- y <- paste0(strrep("\\phantom{0}",max(n)-n),y)
- y
- };
-write(c(
- "\\gdef\\mc@questionAnalysisTable{",
- " \\begin{setmcquestionanalysistable}",
- " \\begin{longtable}{cccc}",
- " & \\mc@babel@Proportion & \\mc@babel@Corrected & \\mc@babel@Item@rest \\\\",
- " & \\mc@babel@correct & \\mc@babel@proportion & \\mc@babel@correlation \\\\",
- " \\hline",
- " \\mc@babel@Question \\\\",
- " \\endhead",
- " \\hline",
- " \\endfoot",
- " \\hline",
- paste0(" \\multicolumn{4}{l}{\\mc@babel@Number@of@students\\ = ",Nstudents,"}\\\\"),
- paste0(" \\multicolumn{4}{l}{Cronbach's alpha = ",sprintf("%.3f",alpha),"}\\\\"),
- " \\endlastfoot ",
- paste0(" \\setcounter{mc@counter}{",1:ncol(answers),"}\\mcquestionlabelfmt{mc@counter}& "
- ,formatnumber(p)," & ",formatnumber(p.cor)," & ",formatnumber(r.cor)," \\\\"),
- " \\end{longtable}",
- " \\end{setmcquestionanalysistable}",
- " }"
- ),outputfilename,append=TRUE) ;
-
-versions.factor <- factor(versions);
-levels(versions.factor) <- 1:Nversions;
-for (i in 1:Nquestions) {
- X <- factor(Q[,i],1:Nanswers[i]);
- props <- cbind(prop.table(table(X,versions.factor,useNA="ifany"),2),prop.table(table(X,useNA="ifany")));
- dims <- dim(props);
- props <- lapply(props,function(x) ifelse(is.na(x),"N.A.",gsub(" ","\\\\phantom{0}",paste0(sprintf("%5.1f",x*100),"\\%"))));
- dim(props) <- dims;
- props <- apply(props, 1, paste, collapse=" & ");
- labels <- paste0(" \\setcounter{mc@counter}{",1:Nanswers[i],"}\\mcanswerlabelfmt{mc@counter}");
- labels <- ifelse(is.na(labels[1:dims[1]])," invalid",labels[1:dims[1]])
-write(c(
- paste0("\\csgdef{mc@answerAnalysisTable",i,"}{"),
- paste0(" \\begin{tabular}{c",strrep("c",Nversions),"c}"),
- paste0(" \\multicolumn{1}{r}{\\mc@babel@Version}&"
- ,paste(paste0("\\setcounter{mc@counter}{",1:Nversions,
- "}\\mcversionlabelfmt{mc@counter}"),collapse="&")
- ," & \\mc@babel@total \\\\"),
- " \\hline",
- " \\mc@babel@Answer \\\\",
- paste0(labels," & ",props,"\\\\"),
- " \\hline",
- paste0(" \\multicolumn{",Nversions+2,"}{l}{\\mc@babel@Proportion@correct\\ = ",
- sprintf("%.3f",p[i]),"}\\\\"),
- paste0(" \\multicolumn{",Nversions+2,"}{l}{\\mc@babel@Corrected@proportion\\ = ",
- sprintf("%.3f",p.cor[i]),"}\\\\"),
- paste0(" \\multicolumn{",Nversions+2,"}{l}{\\mc@babel@Item@rest@correlation\\ = ",
- sprintf("%.3f",r.cor[i]),"}\\\\"),
- " \\end{tabular}",
- " }"
- ),outputfilename,append=TRUE) ;
- }
-
-write("\\makeatother",outputfilename,append=TRUE) ;
-
-outputdata ;
- }
diff --git a/macros/latex/contrib/mcexam/mcexam_example.tex b/macros/latex/contrib/mcexam/mcexam_example.tex
index dbd3e4866c..700d59520f 100644
--- a/macros/latex/contrib/mcexam/mcexam_example.tex
+++ b/macros/latex/contrib/mcexam/mcexam_example.tex
@@ -39,7 +39,24 @@
-
+
+
+% solution counter starting at 3
+%\newcounter{temp}
+%\setlist[setmcquestions]{
+%label=\protect\setcounter{temp}{\arabic{*}}
+% \protect\addtocounter{temp}{2}
+% \arabic{temp}.
+%,ref=\protect\setcounter{temp}{\arabic{*}}
+% \protect\addtocounter{temp}{2}
+% \arabic{temp}.
+%,itemsep=2\baselineskip
+%,topsep=2\baselineskip }
+
+
+
+
+
\begin{document}
@@ -77,6 +94,7 @@
+
\begin{mcquestions}
diff --git a/macros/latex/contrib/mcexam/mcexam_example_dataset.r b/macros/latex/contrib/mcexam/mcexam_example_dataset.r
new file mode 100644
index 0000000000..9fa54e062d
--- /dev/null
+++ b/macros/latex/contrib/mcexam/mcexam_example_dataset.r
@@ -0,0 +1,42 @@
+### mcexam_example_dataset.r
+### This code contains some test data for the example of mcexam. First run
+### mcexam_example.tex through LaTeX, then process this file with R. Next,
+### you can make an analysis version of the exam in LaTeX. Make sure the
+### working directory is the folder where mcexam_example.tex resorts.
+###
+### Copyright (c) 2017 Jorre Vannieuwenhuyze.
+###
+### Permission is granted to copy, distribute and/or modify this
+### software under the terms of the LaTeX Project Public License
+### (LPPL), version 1.3c or any later version.
+###
+### This software is provided 'as is', without warranty of any kind,
+### either expressed or implied, including, but not limited to, the
+### implied warranties of merchantability and fitness for a
+### particular purpose.
+
+rm(list = ls())
+
+ID <- c(1,2,3,4,5,6,7,8,9,10)
+versions <- c(1,1,1,2,2,2,2,3,3,3)
+answers <- rbind(c(1,2,1,4,2, 3,4,3,1,1, 2,2,2,5,2, 1,3) #17
+ ,c(1,1,2,4,3, 2,2,3,1,2, 2,3,2,5,2, 2,3) #9
+ ,c(1,2,1,3,2, 3,4,2,1,1, 2,2,3,5,1, 1,3) #8
+ ,c(3,2,5,4,2, 4,1,3,4,1, 2,3,1,1,2, 2,3) #11
+ ,c(2,2,5,3,2, 3,1,2,4,2, 2,3,1,1,1, 2,3) #0
+ ,c(3,2,5,4,2, 4,1,3,3,1, 2,2,1,1,2, 1,4) #7
+ ,c(3,2,5,4,2, 3,1,3,4,2, 2,3,2,1,1, 2,1) #2
+ ,c(2,1,4,2,1, 1,3,5,4,1, 1,3,1,4,3, 2,4) #6
+ ,c(2,1,3,3,1, 1,3,5,4,1, 1,2,1,4,3, 2,4) #11
+ ,c(1,1,3,3,2, 1,2,5,4,3, 2,3,4,3,3, 1,3) #4
+ )
+
+source("mcexam_example.r")
+data <- mcprocessanswers(ID,versions,answers)
+
+
+
+
+
+
+ \ No newline at end of file
diff --git a/macros/latex/contrib/media9/ChangeLog b/macros/latex/contrib/media9/ChangeLog
index 852c8a5254..50af543880 100644
--- a/macros/latex/contrib/media9/ChangeLog
+++ b/macros/latex/contrib/media9/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-12
+ * v1.22 : media9.sty
+ * v0.53 : pdfbase.sty
+ * fix : https://gitlab.com/agrahn/animate/-/issues/15
+
2021-09-02
* v1.21 : media9.sty
* v0.52 : pdfbase.sty
diff --git a/macros/latex/contrib/media9/doc/media9.pdf b/macros/latex/contrib/media9/doc/media9.pdf
index 8b71b7776d..cf0ef43243 100644
--- a/macros/latex/contrib/media9/doc/media9.pdf
+++ b/macros/latex/contrib/media9/doc/media9.pdf
Binary files differ
diff --git a/macros/latex/contrib/media9/media9.sty b/macros/latex/contrib/media9/media9.sty
index fccb3a3c87..07bb391c01 100644
--- a/macros/latex/contrib/media9/media9.sty
+++ b/macros/latex/contrib/media9/media9.sty
@@ -41,8 +41,8 @@
\RequirePackage{l3keys2e}
-\def\g@mix@date@tl{2021/09/02}
-\def\g@mix@version@tl{1.21}
+\def\g@mix@date@tl{2021/09/12}
+\def\g@mix@version@tl{1.22}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
@@ -2409,8 +2409,8 @@
\RequirePackage{l3keys2e}
-\def\g@mix@date@tl{2021/09/02}
-\def\g@mix@version@tl{1.21}
+\def\g@mix@date@tl{2021/09/12}
+\def\g@mix@version@tl{1.22}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{media9}{\g@mix@date@tl}{\g@mix@version@tl}
diff --git a/macros/latex/contrib/media9/pdfbase.sty b/macros/latex/contrib/media9/pdfbase.sty
index f753441cbd..e0783c2c17 100644
--- a/macros/latex/contrib/media9/pdfbase.sty
+++ b/macros/latex/contrib/media9/pdfbase.sty
@@ -158,8 +158,8 @@
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2021/09/02}
-\def\g@pbs@version@tl{0.52}
+\def\g@pbs@date@tl{2021/09/12}
+\def\g@pbs@version@tl{0.53}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -1295,8 +1295,8 @@
\pbs_outputpage_orig:
}
+\bool_new:N\g_pbs_ocgbase_loaded_bool
\AtBeginDocument{
- \bool_new:N\g_pbs_ocgbase_loaded_bool
\@ifpackageloaded{ocgbase}{\bool_gset_true:N\g_pbs_ocgbase_loaded_bool}{}
}
\AddToHook{shipout/foreground}{
@@ -1515,8 +1515,8 @@
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2021/09/02}
-\def\g@pbs@version@tl{0.52}
+\def\g@pbs@date@tl{2021/09/12}
+\def\g@pbs@version@tl{0.53}
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
@@ -2579,8 +2579,8 @@
\pbs_outputpage_orig:
}
+\bool_new:N\g_pbs_ocgbase_loaded_bool
\AtBeginDocument{
- \bool_new:N\g_pbs_ocgbase_loaded_bool
\@ifpackageloaded{ocgbase}{\bool_gset_true:N\g_pbs_ocgbase_loaded_bool}{}
}
\AddToHook{shipout/background}{
diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx
index 0296e79a3a..55c6e674a3 100644
--- a/macros/latex/contrib/mindflow/mindflow.dtx
+++ b/macros/latex/contrib/mindflow/mindflow.dtx
@@ -18,7 +18,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mindflow}
%<*package>
- [2021/07/24 mindflow environment]
+ [2021/09/12 mindflow environment]
%</package>
%
%<*driver>
@@ -79,7 +79,7 @@
\lstnewenvironment{code*}%
{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=252}}{}
+{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=253}}{}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -431,6 +431,7 @@
\par%\nobreak%
\LocallyStopLineNumbers%
\vspace*{-.5\baselineskip}%
+ \noindent%
\if@mindflow@incolumn%
\makebox[\linewidth]{\color{mindflowLine}\rule{\linewidth}{\mindflowLineHeight}}%
\else%
diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf
index 14a26dd0ae..925f1bf7bf 100644
--- a/macros/latex/contrib/mindflow/mindflow.pdf
+++ b/macros/latex/contrib/mindflow/mindflow.pdf
Binary files differ