texlive[73386] Master/texmf-dist: tikzquests (9jan25)

commits+karl at tug.org commits+karl at tug.org
Thu Jan 9 22:08:10 CET 2025


Revision: 73386
          https://tug.org/svn/texlive?view=revision&revision=73386
Author:   karl
Date:     2025-01-09 22:08:09 +0100 (Thu, 09 Jan 2025)
Log Message:
-----------
tikzquests (9jan25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/tikzquests/README.md
    trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.pdf
    trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.tex
    trunk/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty

Modified: trunk/Master/texmf-dist/doc/latex/tikzquests/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikzquests/README.md	2025-01-09 21:07:59 UTC (rev 73385)
+++ trunk/Master/texmf-dist/doc/latex/tikzquests/README.md	2025-01-09 21:08:09 UTC (rev 73386)
@@ -67,7 +67,10 @@
     - documentation in PDF format
 
 -------------
-* Version 1.1 (this)
+* Version 1.2 (this)
+    - Added the concept of 'sub-repositories' (relevant when listing the questions of a repository). see documentation.
+
+* Version 1.1
     - Documentation typos, and issue #1.
 
 * Version 1.0

Modified: trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.tex	2025-01-09 21:07:59 UTC (rev 73385)
+++ trunk/Master/texmf-dist/doc/latex/tikzquests/tikzquests.tex	2025-01-09 21:08:09 UTC (rev 73386)
@@ -15,7 +15,7 @@
 %%
 %% The Current Maintainer of this work is Alceu Frigeri
 %%
-%% This is version {1.1} {2024/01/11}
+%% This is version {1.2} {2025/01/09}
 %%
 %% The list of files that compose this work can be found in the README.md file at
 %% https://ctan.org/pkg/tikzquests
@@ -47,7 +47,7 @@
 \tableofcontents
 
 \section{Introduction}
-One recurring problem when typesetting exams, specially in Engineering fields, is the need to have parameterized questions, specially parameterized schematics used in exam's questions. The intent of this is to allow the creation of repositories (one or more) with 'easily' parameterized text and/or graphic (\tsobj[pkg]{tikz}) questions, but not enforcing any style/format whatsoever, leaving it to the end user.
+One recurring problem when typesetting exams, specially in Engineering fields, is the need to have parameterized questions, specially parameterized schematics used in exam's questions. The intent of this is to allow the creation of such repositories (one or more) with 'easily' parameterized text and/or graphic (\tsobj[pkg]{tikz}) questions, without enforcing any style/format whatsoever, leaving it to the end user.
 
 The package offers
 \begin{itemize}
@@ -76,6 +76,8 @@
 \end{codesyntax}
 \tsobj{\defNewRepository} creates a new Repository, \tsobj[marg]{new-repository}. The starred version also switches to it, making it the ``current default''.
 \tsobj{\SelectRepository} activates \tsobj[marg]{repository} as the ``current default'' one.
+
+It is possible to construct a tree of related repositories by using a slash, ``/'', like ``repoA'', ``repoA/subA'', ``repoA/subB'', ``repoA/subC'', which can be handy when listing the questions of a repository, see \ref{quest list}.
 \end{codedescribe}
 
 \begin{tsremark}
@@ -83,6 +85,11 @@
 \end{tsremark}
 
 \begin{tsremark}
+Do not create a repository with an ending slash, like ``repoName/''. Given the way sub-repositories are define, it will render impossible to list this repository questions, see \ref{quest list}
+\end{tsremark}
+
+
+\begin{tsremark}
 When creating a new repository, a warning is raised  in case \tsobj[marg]{new-repository} already exists. 
 When Selecting a repository, an error is raised if \tsobj[marg]{repository} doesn't exists.
 \end{tsremark}
@@ -149,7 +156,7 @@
 An error is raised if \tsobj[marg]{repository} or \tsobj[marg]{quest-name} doesn't exist.
 \end{tsremark}
 
-\begin{codedescribe}{\QuestionsList}
+\begin{codedescribe}{\QuestionsList}\label{quest list}
 \begin{codesyntax}%
 \tsmacro{\QuestionsList}[repositories list]{}
 \end{codesyntax}
@@ -157,10 +164,13 @@
 \end{codedescribe}
 
 \begin{tsremark}
+If a \tsobj[oarg]{repositories list}'s term finishes with a slash, ``/'', it will be treated as a family of repositories and all sub-repositories will be listed too.
+\end{tsremark}
+
+\begin{tsremark}
 An error is raised if a repository in \tsobj[marg]{repositories list} doesn't exist. To reduce the clutter (and number of questions listed) one should consider the use of the option \tsobj[option]{no alias}.
 \end{tsremark}
 
-
 \section{Parameters as pgfkeys and auxiliary macros.}\label{parameters}
 
 By default a set of \tsobj[pkg]{pgfkeys} and macros is defined as follow: \tsobj[marg]{ID}\tsobj[marg]{idx}. The predefined range of \tsobj[marg]{IDs} being \tsobj[key]{R,L,C,X,Y,Z,K,T,Q,EQ,V,I}. The predefined range of \tsobj[marg]{idx} spans from a, b, c up to z, aa, ab, ac up to az and, finally, ba, bb, bc up to bz. 

Modified: trunk/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty	2025-01-09 21:07:59 UTC (rev 73385)
+++ trunk/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty	2025-01-09 21:08:09 UTC (rev 73386)
@@ -12,7 +12,7 @@
 %%
 %% The Current Maintainer of this work is Alceu Frigeri
 %%
-%% This is version {1.1} {2024/01/11}
+%% This is version {1.2} {2025/01/09}
 %%
 %% The list of files that compose this work can be found in the README.md file at
 %% https://ctan.org/pkg/tikzquests
@@ -27,8 +27,8 @@
 
 \ProvidesExplPackage
     {tikzquests}
-    {2024/01/11}
-    {1.1}
+    {2025/01/09}
+    {1.2}
     {A Simple Framework for (tikz/text) Parametric Questions}
 
 \ExplSyntaxOn
@@ -42,8 +42,8 @@
   {
      name        .code:n = {tikzquests} ,
      prefix      .code:n = {tikzquests} ,
-     date        .code:n = {2024/01/11},
-     version     .code:n = {1.1} ,
+     date        .code:n = {2025/01/09},
+     version     .code:n = {1.2} ,
      description .code:n = {A Simple Framework for (tikz/text) Parametric Questions}
   }
 \cs_if_exist:NF \PkgInfo 
@@ -134,7 +134,8 @@
 
 \seq_new:N  \l__tikzquests_repositories_seq
 \tl_new:N   \l__tikzquests_active_repository_tl
-\seq_new:N  \l__tikzquests_tmp_seq
+\seq_new:N  \l__tikzquests_tmpa_seq
+\seq_new:N  \l__tikzquests_tmpb_seq
 \tl_new:N   \l__tikzquests_tmp_tl  
 
 \cs_new_protected:Npn \__tikzquests_select_repository:n #1
@@ -155,10 +156,10 @@
         \msg_warning:nnne {tikzquests}{repository already defined}{new~01}{#2}
       }
       { 
-        \prop_new:c {l__tikzquests_ #2 _tikzrepo_prop}
-        \prop_new:c {l__tikzquests_ #2 _tikzrepo_remarks_prop}
-        \prop_new:c {l__tikzquests_ #2 _textrepo_prop}
-        \prop_new:c {l__tikzquests_ #2 _textrepo_remarks_prop}
+        \prop_new_linked:c {l__tikzquests_ #2 _tikzrepo_prop}
+        \prop_new_linked:c {l__tikzquests_ #2 _tikzrepo_remarks_prop}
+        \prop_new_linked:c {l__tikzquests_ #2 _textrepo_prop}
+        \prop_new_linked:c {l__tikzquests_ #2 _textrepo_remarks_prop}
         \seq_put_right:Nn \l__tikzquests_repositories_seq {#2}
       }
     \bool_if:nT {#1}
@@ -365,19 +366,41 @@
   {
     \tl_if_blank:nTF {#1}
       { 
-        \seq_set_eq:NN \l__tikzquests_tmp_seq \l__tikzquests_repositories_seq
+        \seq_set_eq:NN \l__tikzquests_tmpb_seq \l__tikzquests_repositories_seq
       }
       {
-        \seq_set_from_clist:Nn \l__tikzquests_tmp_seq {#1}
+        \seq_set_from_clist:Nn \l__tikzquests_tmpb_seq {#1}
       }
-    \seq_remove_duplicates:N \l__tikzquests_tmp_seq
-    \seq_sort:Nn \l__tikzquests_tmp_seq
+      
+    \seq_map_inline:Nn \l__tikzquests_tmpb_seq
       {
+        \regex_match:nnTF {/$}{##1}
+          {
+            \tl_set:Nn \l_tmpa_tl {##1}
+            \regex_replace_once:nnN {/$}{} \l_tmpa_tl
+            \seq_put_right:Nn \l__tikzquests_tmpa_seq {\l_tmpa_tl}
+            \seq_map_inline:Nn \l__tikzquests_repositories_seq
+              {
+                \regex_match:nnTF {##1}{####1}
+                  {
+                    \seq_put_right:Nn \l__tikzquests_tmpa_seq {####1}
+                  }
+                  {}
+              }
+          }
+          {
+            \seq_put_right:Nn \l__tikzquests_tmpa_seq {##1}
+          }
+      }      
+      
+    \seq_remove_duplicates:N \l__tikzquests_tmpa_seq
+    \seq_sort:Nn \l__tikzquests_tmpa_seq
+      {
         \str_compare:eNeTF { ##1 } > { ##2 }
           { \sort_return_swapped: }
           { \sort_return_same: }
       }
-    \seq_map_inline:Nn \l__tikzquests_tmp_seq
+    \seq_map_inline:Nn \l__tikzquests_tmpa_seq
       {
         \prop_if_exist:cTF {l__tikzquests_ ##1 _tikzrepo_prop}
         {      



More information about the tex-live-commits mailing list.