texlive[68569] Master/texmf-dist: stex (16oct23)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 16 21:59:04 CEST 2023


Revision: 68569
          https://tug.org/svn/texlive?view=revision&revision=68569
Author:   karl
Date:     2023-10-16 21:59:04 +0200 (Mon, 16 Oct 2023)
Log Message:
-----------
stex (16oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/stex/Makefile.top
    trunk/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex
    trunk/Master/texmf-dist/doc/latex/stex/stex-doc.pdf
    trunk/Master/texmf-dist/doc/latex/stex/stex-doc.tex
    trunk/Master/texmf-dist/doc/latex/stex/stex-docheader.tex
    trunk/Master/texmf-dist/doc/latex/stex/stex-manual.pdf
    trunk/Master/texmf-dist/doc/latex/stex/stex-tutorial.pdf
    trunk/Master/texmf-dist/source/latex/stex/hwexam.dtx
    trunk/Master/texmf-dist/source/latex/stex/notesslides.dtx
    trunk/Master/texmf-dist/source/latex/stex/problem.dtx
    trunk/Master/texmf-dist/source/latex/stex/stex.dtx
    trunk/Master/texmf-dist/source/latex/stex/tikzinput.dtx
    trunk/Master/texmf-dist/tex/latex/stex/etc/hwexam-default.header
    trunk/Master/texmf-dist/tex/latex/stex/etc/lststex.sty
    trunk/Master/texmf-dist/tex/latex/stex/etc/stex-highlighting.sty
    trunk/Master/texmf-dist/tex/latex/stex/etc/stex-logo.sty
    trunk/Master/texmf-dist/tex/latex/stex/etc/stexthm.sty
    trunk/Master/texmf-dist/tex/latex/stex/hwexam.sty
    trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-english.ldf
    trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-finnish.ldf
    trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-french.ldf
    trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-ngerman.ldf
    trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-russian.ldf
    trunk/Master/texmf-dist/tex/latex/stex/ldf/stex-en.ldf
    trunk/Master/texmf-dist/tex/latex/stex/notesslides.cls
    trunk/Master/texmf-dist/tex/latex/stex/notesslides.sty
    trunk/Master/texmf-dist/tex/latex/stex/problem.sty
    trunk/Master/texmf-dist/tex/latex/stex/stex.cls
    trunk/Master/texmf-dist/tex/latex/stex/stex.sty
    trunk/Master/texmf-dist/tex/latex/stex/tikzinput.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/tex/latex/stex/etc/stex.cls.ltxml
    trunk/Master/texmf-dist/tex/latex/stex/etc/stex.sty.ltxml

Modified: trunk/Master/texmf-dist/doc/latex/stex/Makefile.top
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stex/Makefile.top	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/doc/latex/stex/Makefile.top	2023-10-16 19:59:04 UTC (rev 68569)
@@ -4,5 +4,3 @@
 
 all package doc: 
 	@for d in $(MAKEDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@) || exit $$?; done
-	ls
-	pdflatex test.en.tex

Modified: trunk/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,10 +1,8 @@
 \begin{sfragment}{Introduction}
-  The \pkg{problem} package supplies an infrastructure that allows specify problem.  Problems
-are text fragments that come with auxiliary functions: hints, notes, and
-solutions\footnote{for the moment multiple choice problems are not supported, but may
-  well be in a future version}. Furthermore, we can specify how long the solution to a
-given problem is estimated to take and how many points will be awarded for a perfect
-solution.
+  The \pkg{problem} package supplies an infrastructure that allows specify problem.
+  Problems are text fragments that come with auxiliary functions: hints, notes, and
+  solutions. Furthermore, we can specify how long the solution to a given problem is
+  estimated to take and how many points will be awarded for a perfect solution.
 
 Finally, the \pkg{problem} package facilitates the management of problems in small files,
 so that problems can be re-used in multiple environment. 
@@ -48,7 +46,7 @@
     \begin{exnote}
       Justify your answer
     \end{exnote}
-\begin{solution}[for=elefants]
+\begin{solution}
   Four, two in the front seats, and two in the back.
   \begin{gnote}
     if they do not give the justification deduct 5 pts

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

Modified: trunk/Master/texmf-dist/doc/latex/stex/stex-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stex/stex-doc.tex	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/doc/latex/stex/stex-doc.tex	2023-10-16 19:59:04 UTC (rev 68569)
@@ -40,6 +40,7 @@
 \end{sfragment}
 
 \begin{sfragment}{User Manual}
+  \let\RequirePackage\documentclass
   \inputref[sTeX/Documentation]{manual}
 
   \begin{sfragment}{Additional Packages}

Modified: trunk/Master/texmf-dist/doc/latex/stex/stex-docheader.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/stex/stex-docheader.tex	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/doc/latex/stex/stex-docheader.tex	2023-10-16 19:59:04 UTC (rev 68569)
@@ -5,7 +5,7 @@
 \usepackage[hyperref=auto,style=alphabetic]{biblatex}
 %\usepackage[mathhub=\stexdocpath/mh,usedeps]{stex}
 \usepackage[lang={en,de}]{stex}
-
+\usepackage[show]{ed}
 \usepackage{rustex}
 \usepackage{stex-highlighting,stexthm}
 
@@ -36,7 +36,7 @@
 
 \newif\ifhadtitle\hadtitlefalse
 
-\def\stexversion{3.3.0}
+\def\stexversion{3.4.0}
 \def\changedate{\today}
 \def\stextoptitle#1#2{\title{#1\thanks{Version {\stexversion} (last revised {\changedate})} }\def\thispkg{#2}}
 
@@ -402,4 +402,5 @@
 }
 
 
-\AtBeginDocument{\catcode`_=8}
\ No newline at end of file
+\AtBeginDocument{\catcode`_=8}
+

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

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

Modified: trunk/Master/texmf-dist/source/latex/stex/hwexam.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/stex/hwexam.dtx	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/source/latex/stex/hwexam.dtx	2023-10-16 19:59:04 UTC (rev 68569)
@@ -41,7 +41,7 @@
 %
 %    \begin{macrocode}
 %<*package>
-\ProvidesExplPackage{hwexam}{2023/03/19}{3.3.0}{homework assignments and exams}
+\ProvidesExplPackage{hwexam}{2023/10/13}{3.4.0}{homework assignments and exams}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn {hwexam / pkg}{
@@ -63,7 +63,7 @@
 	\ExplSyntaxOn\makeatletter
 	\input{hwexam-english.ldf}
 	\ltx at ifpackageloaded{babel}{
-			\clist_set:Nx \l_tmpa_clist {\bbl at loaded}
+			\clist_set:Nx \l_tmpa_clist {\exp_args:No \tl_to_str:n \bbl at loaded}
 			\exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{ngerman}}{
 				\input{hwexam-ngerman.ldf}
 			}
@@ -130,10 +130,10 @@
 	}\par\smallskip
 	\textbf{
 		\tl_if_empty:NF \l_stex_key_given_tl {
-			\hwexam at kw@given:~\l_stex_key_given_tl\quad
+			\hwexam at kw@given :~\l_stex_key_given_tl\quad
 		}
 		\tl_if_empty:NF \l_stex_key_due_tl {
-			\hwexam at kw@due:~\l_stex_key_due_tl\quad
+			\hwexam at kw@due :~\l_stex_key_due_tl\quad
 		}
 	}
 	\end{center}
@@ -246,28 +246,8 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\testemptypage}
-%    \begin{macrocode}
-\newcommand\testemptypage[1][]{%
-	\bool_if:NT \c__problems_test_bool {\ \vfill\begin{center}\hwexam at kw@testemptypage\end{center}\eject}
-}
-%    \end{macrocode}
-% \end{macro}
 %
-% \begin{macro}{\testspace}
 %    \begin{macrocode}
-\newcommand\testspace[1]{\bool_if:NT \c__problems_test_bool {\vspace*{#1}}}
-%    \end{macrocode}
-% \end{macro}
-% 
-% \begin{macro}{\testnewpage}
-%    \begin{macrocode}
-\newcommand\testnewpage{\bool_if:NT \c__problems_test_bool {\newpage}}
-%    \end{macrocode}
-% \end{macro}
-%
-%
-%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 % 

Modified: trunk/Master/texmf-dist/source/latex/stex/notesslides.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/stex/notesslides.dtx	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/source/latex/stex/notesslides.dtx	2023-10-16 19:59:04 UTC (rev 68569)
@@ -46,7 +46,7 @@
 %    \begin{macrocode}
 %<*cls>
 %<@@=notesslides>
-\ProvidesExplClass{notesslides}{2023/03/19}{3.3.0}{notesslides Class}
+\ProvidesExplClass{notesslides}{2023/10/13}{3.4.0}{notesslides Class}
 \RequirePackage{l3keys2e}
 
 \str_const:Nn \c_@@_class_str {article}
@@ -93,7 +93,7 @@
 % now we do the same for the |notesslides| package. 
 %    \begin{macrocode}
 %<*package>
-\ProvidesExplPackage{notesslides}{2023/03/19}{3.3.0}{notesslides Package}
+\ProvidesExplPackage{notesslides}{2023/10/13}{3.4.0}{notesslides Package}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn{notesslides / pkg}{

Modified: trunk/Master/texmf-dist/source/latex/stex/problem.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/stex/problem.dtx	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/source/latex/stex/problem.dtx	2023-10-16 19:59:04 UTC (rev 68569)
@@ -19,7 +19,7 @@
 % 
 % \begin{stexmanual}
 %    \begin{sfragment}{Problem Manual}
-	%      \input{\stexdocpath/packages/stex-problem}
+%      \input{\stexdocpath/packages/stex-problem}
 %    \end{sfragment}
 % \end{stexmanual}
 %
@@ -42,7 +42,7 @@
 %    \begin{macrocode}
 %<*package>
 %<@@=problems>
-\ProvidesExplPackage{problem}{2023/03/19}{3.3.0}{Semantic Markup for Problems}
+\ProvidesExplPackage{problem}{2023/10/13}{3.4.0}{Semantic Markup for Problems}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn { problem / pkg }{
@@ -74,6 +74,13 @@
 }{
   \solutionsfalse
 }
+\newif\ifintest
+\bool_if:NTF \c_@@_test_bool {
+  \intesttrue
+}{
+  \intestfalse
+}
+
 \RequirePackage{stex}
 %    \end{macrocode}
 %
@@ -85,7 +92,7 @@
   \ExplSyntaxOn\makeatletter
   \input{problem-english.ldf}
   \ltx at ifpackageloaded{babel}{
-      \clist_set:Nx \l_tmpa_clist {\bbl at loaded}
+			\clist_set:Nx \l_tmpa_clist {\exp_args:No \tl_to_str:n \bbl at loaded}
       \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{ngerman}}{
         \input{problem-ngerman.ldf}
       }
@@ -110,16 +117,20 @@
 % internal macros.
 %
 %    \begin{macrocode}
+\bool_new:N \l_stex_key_autogradable_bool
 \stex_keys_define:nnnn{ problem }{
   \tl_set:Nn \l_stex_key_pts_tl 0
   \tl_set:Nn \l_stex_key_min_tl 0
   \str_clear:N \l_stex_key_name_str
   \str_clear:N \l_stex_key_mhrepos_str
+  \bool_set_false:N \l_stex_key_autogradable_bool
 }{
   pts     .tl_set:N     = \l_stex_key_pts_tl,
   min     .tl_set:N     = \l_stex_key_min_tl,
   name    .str_set:N    = \l_stex_key_name_str,
-  archive .str_set:N    = \l_stex_key_mhrepos_str,
+  autogradable .bool_set:N = \l_stex_key_autogradable_bool,
+  archive  .code:n = {},
+  %archive .str_set:N    = \l_stex_key_mhrepos_str,
   creators .code:n = {}
   %imports .tl_set:N     = \l_@@_prob_imports_tl,
   %refnum  .int_set:N    = \l_@@_prob_refnum_int,
@@ -142,9 +153,26 @@
 %
 % \begin{environment}{sproblem}
 %    \begin{macrocode}
+\cs_new:Nn \_@@_activate_macros: {
+  \stex_reactivate_macro:N \solution
+  \stex_reactivate_macro:N \mcb
+  \stex_reactivate_macro:N \scb
+  \stex_reactivate_macro:N \fillinsol
+  \stex_reactivate_macro:N \hint
+  \stex_reactivate_macro:N \exnote
+  \stex_reactivate_macro:N \gnote
+}
+
 \newcounter{pts}
 \newcounter{min}
+\bool_new:N \l_@@_in_problem_bool
+\bool_new:N \l_@@_has_pts_bool
+\bool_new:N \l_@@_has_min_bool
+\bool_set_false:N \l_@@_in_problem_bool
 \stex_new_stylable_env:nnnnnnn {problem} {O{}}{
+  \bool_if:NT \l_@@_in_problem_bool {
+    \msg_error:nn{stex}{error/nestedproblem}
+  }
   \cs_if_exist:NTF \l_problem_inputproblem_keys_tl {
     \tl_put_left:Nn \l_problem_inputproblem_keys_tl {#1,}
     \exp_args:Nno \stex_keys_set:nn{problem}{
@@ -154,60 +182,65 @@
     \stex_keys_set:nn{problem}{#1}
   }
   \refstepcounter{sproblem}
-  \str_if_empty:NT \l_stex_key_name_str {
-    \stex_file_split_off_lang:NN \l_@@_path_seq \g_stex_current_file
-    \seq_get_right:NN \l_@@_path_seq \l_stex_key_name_str
-  }
 
-  \exp_args:No \stex_module_setup:n \l_stex_key_name_str
-
   \stex_if_do_html:T {
+    \str_if_empty:NT \l_stex_key_name_str {
+      \stex_file_split_off_lang:NN \l_@@_path_seq \g_stex_current_file
+      \seq_get_right:NN \l_@@_path_seq \l_stex_key_name_str
+    }
     \exp_args:Nne \begin{stex_annotate_env} {
-      shtml:problem={\l_stex_current_module_str},
+      shtml:problem={\l_stex_key_name_str},
       shtml:language={ \l_stex_current_language_str},
-      shtml:signature={\l_stex_key_sig_str}
-      \tl_if_empty:NF \l_stex_metatheory_uri {,
-        shtml:metatheory={\stex_uri_use:N \l_stex_metatheory_uri}
-      }
+      shtml:autogradable={\bool_if:NTF \l_stex_key_autogradable_bool {true}{false}}
     }
-    \stex_annotate_invisible:n{}
     \tl_if_empty:NF \l_stex_key_title_tl {
       \exp_args:No \stexdoctitle \l_stex_key_title_tl
     }
+    \stex_annotate_invisible:nn{
+      shtml:problempoints={\l_stex_key_pts_tl}
+    }{ \l_stex_key_pts_tl }
   }
-  \stex_if_smsmode:F {
-    \str_set_eq:NN \thismoduleuri \l_stex_current_module_str
-    \tl_set_eq:NN \thismodulename \l_stex_key_name_str
-    \tl_set_eq:NN \thistitle \l_stex_key_title_tl
-    \stex_style_apply:
-    \addtocounter{pts}{\l_stex_key_pts_tl}
-    \addtocounter{min}{\l_stex_key_min_tl}
-    \_stex_do_id:
-    \_@@_record_problem:
-  }
-  \stex_reactivate_macro:N \solution
-  \stex_reactivate_macro:N \mcb
-  \stex_reactivate_macro:N \fillinsol
-  \stex_smsmode_do:
+  
+  \tl_set_eq:NN \thistitle \l_stex_key_title_tl
+
+  \bool_set_true:N \l_@@_in_problem_bool
+  \tl_set_eq:NN \l_@@_pts_tl \l_stex_key_pts_tl
+  \tl_set_eq:NN \l_@@_min_tl \l_stex_key_min_tl
+  \tl_if_eq:NnTF \l_@@_pts_tl {0}
+    {\bool_set_false:N \l_@@_has_pts_bool}
+    {\bool_set_true:N \l_@@_has_pts_bool}
+  \tl_if_eq:NnTF \l_@@_min_tl {0}
+    {\bool_set_false:N \l_@@_has_min_bool}
+    {\bool_set_true:N \l_@@_has_min_bool}
+  \int_gzero:N \g_@@_subproblem_int
+
+  \stex_style_apply:
+  \_stex_do_id:
+  \_@@_activate_macros:
 }{
-  \stex_close_module:
-  \stex_if_smsmode:F \stex_style_apply:
+  \addtocounter{pts}{\l_@@_pts_tl}
+  \addtocounter{min}{\l_@@_min_tl}
+  \_@@_record_problem:
+  \stex_style_apply:
   \stex_if_do_html:T{ \end{stex_annotate_env} }
 }{
   \par\noindent\problemheader
   \bool_if:NT \c_@@_pts_bool {
-    \marginpar{\l_stex_key_pts_tl{}~\problem at kw@points\smallskip}
+    \tl_if_eq:NnF \l_@@_pts_tl {0}{
+      \marginpar{\l_@@_pts_tl{}~\problem at kw@pts\smallskip}
+    }
   }
   \bool_if:NT \c_@@_min_bool {
-    \marginpar{\l_stex_key_min_tl{}~\problem at kw@minutes\smallskip}
+    \tl_if_eq:NnF \l_@@_min_tl {0} {
+      \marginpar{\l_@@_min_tl{}~\problem at kw@minutes\smallskip}
+    }
   }
-  \\
+  \par
   \stex_ignore_spaces_and_pars:
 }{
   \par\bigskip
 %  \bool_if:NT \c_@@_test_bool \pagebreak
 }{s}
-\stex_sms_allow_env:n{sproblem}
 
 \tl_set:Nn \problemheader {
   \textbf{\sproblemautorefname{~}\thesproblem
@@ -219,7 +252,7 @@
 
 \cs_new_protected:Nn \_@@_record_problem: {
   \exp_args:NNe \iow_now:Nn \@auxout {
-    \problem at restore {\thesproblem}{\l_stex_key_pts_tl}{\l_stex_key_min_tl}
+    \problem at restore {\thesproblem}{\l_@@_pts_tl}{\l_@@_min_tl}
   }
 }
 
@@ -227,6 +260,73 @@
 %    \end{macrocode}
 % \end{environment}
 %
+% \begin{environment}{subproblem}
+%    \begin{macrocode}
+\int_new:N \g_@@_subproblem_int
+
+\stex_new_stylable_env:nnnnnnn {subproblem} {O{}}{
+  \stex_keys_set:nn{problem}{#1}
+  \bool_if:NF \l_@@_in_problem_bool{
+    \ifstexhtml\else
+      \par{\bfseries WARNING~subproblem~to~be~used~in~some~problem}\par
+    \fi
+    \_@@_activate_macros:
+    \bool_set_true:N \l_@@_in_problem_bool
+    \tl_set:Nn \l_@@_pts_tl{0}
+    \tl_set:Nn \l_@@_min_tl{0}
+  }
+  \str_if_empty:NT \l_stex_key_name_str {
+    \stex_file_split_off_lang:NN \l_@@_path_seq \g_stex_current_file
+    \seq_get_right:NN \l_@@_path_seq \l_stex_key_name_str
+  }
+  \stex_if_do_html:T {
+    \str_if_empty:NT \l_stex_key_name_str {
+      \stex_file_split_off_lang:NN \l_@@_path_seq \g_stex_current_file
+      \seq_get_right:NN \l_@@_path_seq \l_stex_key_name_str
+    }
+    \exp_args:Nne \begin{stex_annotate_env} {
+      shtml:subproblem={\l_stex_key_name_str},
+      shtml:language={ \l_stex_current_language_str},
+      shtml:autogradable={\bool_if:NTF \l_stex_key_autogradable_bool {true}{false}}
+    }
+    \stex_annotate_invisible:n{}
+    \tl_if_empty:NF \l_stex_key_title_tl {
+      \exp_args:No \stexdoctitle \l_stex_key_title_tl
+    }
+  }
+  \int_gincr:N \g_@@_subproblem_int
+  \bool_if:NF \l_@@_has_pts_bool {
+    \tl_gset:Nx \l_@@_pts_tl {\int_eval:n {\l_@@_pts_tl + \l_stex_key_pts_tl}}
+  }
+  \bool_if:NF \l_@@_has_min_bool {
+    \tl_gset:Nx \l_@@_min_tl {\int_eval:n {\l_@@_min_tl + \l_stex_key_min_tl}}
+  }
+  \stex_if_smsmode:F \stex_style_apply:
+}{
+  \stex_if_smsmode:F \stex_style_apply:
+  \stex_if_do_html:T{ \end{stex_annotate_env} }
+}{
+  \begin{list}{}{
+    \setlength\topsep{0pt}
+    \setlength\parsep{0pt}
+    \setlength\rightmargin{0pt}
+  }\item[\int_use:N \g_@@_subproblem_int .]
+  \bool_if:NT \c_@@_pts_bool {
+    \bool_if:NF \l_@@_has_pts_bool {
+      \marginpar{\smallskip\l_stex_key_pts_tl{}~\problem at kw@pts}
+    }
+  }
+  \bool_if:NT \c_@@_min_bool {
+    \bool_if:NF \l_@@_has_min_bool{
+      \marginpar{\smallskip\l_stex_key_min_tl{}~\problem at kw@minutes}
+    }
+  }
+}{
+  \end{list}
+}{}
+%    \end{macrocode}
+% \end{environment}
+%
 % \begin{macro}{\includeproblem}
 %    \begin{macrocode}
 \stex_keys_define:nnnn{ includeproblem }{
@@ -250,10 +350,17 @@
 % \begin{environment}{solution}
 %    \begin{macrocode}
 \int_new:N \g_problem_id_counter
+\dim_new:N \l_stex_key_testspace_dim
+\stex_keys_define:nnnn{ solution }{
+  \str_clear:N \l_stex_key_answerclass_str
+  \dim_zero:N \l_stex_key_testspace_dim
+}{
+  testspace   .dim_set:N = \l_stex_key_testspace_dim,
+  answerclass .str_set:N = \l_stex_key_answerclass_str
+}{id,title,style}
 
 \cs_new_protected:Nn \_@@_solution_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ solution }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -262,7 +369,8 @@
   }
   \stex_if_do_html:T{
     \begin{stex_annotate_env}{
-      shtml:solution=\l_stex_key_id_str
+      shtml:solution=\l_stex_key_id_str,
+      shtml:answerclass={\l_stex_key_answerclass_str}
     }
   }
   \stex_style_apply:
@@ -275,6 +383,8 @@
     \ifsolutions
       \_@@_solution_start:n{#1}
     \else
+      \stex_keys_set:nn{ solution }{#1}
+      \testspace{\l_stex_key_testspace_dim}
       \setbox\l_tmpa_box\vbox\bgroup
     \fi
   }
@@ -293,12 +403,14 @@
     \fi
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Solution\str_if_empty:NF \l_stex_key_title_tl{
-    {~}\l_stex_key_title_tl
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@solution\tl_if_empty:NF \l_stex_key_title_tl{
+    {~}\l_stex_key_title_tl \str_if_empty:NF \l_stex_key_answerclass_str {
+      (Answer Class: \l_stex_key_answerclass_str)
+    }
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
 
 \stex_deactivate_macro:Nn \solution {sproblem~environments}
@@ -318,9 +430,11 @@
 %
 % \begin{environment}{hint}
 %    \begin{macrocode}
+
+\stex_keys_define:nnnn{ problemenv }{}{}{id,title,style}
+
 \cs_new_protected:Nn \_@@_hint_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -360,13 +474,14 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Hint\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@hint\tl_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \hint {sproblem~environments}
 %    \end{macrocode}
 % \end{environment}
 %
@@ -373,8 +488,7 @@
 % \begin{environment}{exnote}
 %    \begin{macrocode}
 \cs_new_protected:Nn \_@@_exnote_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -414,20 +528,22 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Note\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@note\tl_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \exnote {sproblem~environments}
 %    \end{macrocode}
 % \end{environment}
 %% \begin{environment}{gnote}
 %    \begin{macrocode}
+\int_new:N \l_@@_anscls_int
+
 \cs_new_protected:Nn \_@@_gnote_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -434,6 +550,7 @@
       GNOTE_\int_use:N \g_problem_id_counter
     }
   }
+
   \stex_if_do_html:T{
     \begin{stex_annotate_env}{
       shtml:problemgnote=\l_stex_key_id_str
@@ -452,6 +569,7 @@
       \setbox\l_tmpa_box\vbox\bgroup
     }
   }
+  \stex_reactivate_macro:N \anscls
 }{
   \stex_if_do_html:TF{
     \stex_style_apply:
@@ -467,13 +585,59 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Grading\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@grading\str_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \gnote {sproblem~environments}
+
+
+\stex_keys_define:nnnn{ anscls }{
+  \str_clear:N \l_stex_key_pts_str
+  \tl_clear:N \l_stex_key_feedback_tl
+}{
+  pts     .str_set:N = \l_stex_key_pts_str,
+  feedback .tl_set:N = \l_stex_key_feedback_str,
+  update  .code:n    = {}
+}{id}
+\newcommand \anscls [2][] {
+  \stex_keys_set:nn{ anscls }{#1}
+  \str_if_empty:NT \l_stex_key_id_str {
+    \int_incr:N \l_@@_anscls_int
+    \str_set:Nx \l_stex_key_id_str {
+      AC\int_use:N \l_@@_anscls_int
+    }
+  }
+  \begin{list}{}{
+    \setlength\topsep{0pt}
+    \setlength\parsep{0pt}
+    \setlength\rightmargin{0pt}
+  }\item[\l_stex_key_id_str] 
+    \stex_if_do_html:TF{
+      \stex_annotate:nn{
+        shtml:answerclass={\l_stex_key_id_str}
+        \str_if_empty:NF \l_stex_key_pts_str{
+          ,shtml:answerclass-pts={\l_stex_key_pts_str}
+        }
+        \str_if_empty:NF \l_stex_key_feedback_str{
+          ,shtml:answerclass-feedback={\l_stex_key_feedback_str}
+        }
+      }{
+        #2
+      }
+    }{#2}
+    \str_if_empty:NF \l_stex_key_pts_str {\par
+      ~ \problem at kw@points:~\l_stex_key_pts_str
+    }
+    \str_if_empty:NF \l_stex_key_feedback_str {\par
+      ~ \problem at kw@feedback :~\l_stex_key_feedback_str
+    }
+  \end{list}
+}
+\stex_deactivate_macro:Nn \anscls {gnote~environments}
 %    \end{macrocode}
 % \end{environment}
 %
@@ -482,13 +646,13 @@
 %    \begin{macrocode}
 \def\pts#1{
   \bool_if:NT \c_@@_pts_bool {
-    \marginpar{#1~\problem at kw@points}
-  }
+    \stex_annotate:nn{shtml:problempoints={#1}}{\marginpar{#1~\problem at kw@pts}}
+  }\hbox_unpack:N\c_empty_box
 }
 \def\min#1{
   \bool_if:NT \c_@@_min_bool {
-    \marginpar{#1~\problem at kw@minutes}
-  }
+    \stex_annotate:nn{shtml:problemminutes={}}{\marginpar{#1~\problem at kw@minutes}}
+  }\hbox_unpack:N\c_empty_box
 }
 %    \end{macrocode}
 %
@@ -495,20 +659,42 @@
 % \begin{environment}{mcb}
 %
 %    \begin{macrocode}
-\newenvironment{mcb}{\par
+\stex_new_stylable_env:nnnnnnn{mcb}{O{}}{
+  \stex_keys_set:nn{style}{#1}
   \stex_if_do_html:T{
-    \begin{stex_annotate_env}{shtml:multiple-choice-block={}}
+    \tl_set:Nn\problem_mcc_box_tl{}
+    \exp_args:Nne \begin{stex_annotate_env}{
+      shtml:multiple-choice-block={}
+      \clist_if_empty:NF \l_stex_key_style_clist {,
+        shtml:styles={\l_stex_key_style_clist}
+      }
+    }
   }
   \stex_deactivate_macro:Nn \mcb {sproblem~environments}
+  \stex_deactivate_macro:Nn \scb {sproblem~environments}
   \stex_deactivate_macro:Nn \solution {sproblem~environments}
+  \stex_deactivate_macro:Nn \hint {sproblem~environments}
+  \stex_deactivate_macro:Nn \exnote {sproblem~environments}
+  \stex_deactivate_macro:Nn \gnote {sproblem~environments}
   \stex_reactivate_macro:N \mcc
-  \begin{enumerate}
+  \cs_set:Nn \_@@_mccline:n{
+    \begin{list}{}{
+      \setlength\topsep{0pt}
+      \setlength\parsep{0pt}
+      \setlength\rightmargin{0pt}
+    }\item[\problem_mcc_box_tl] ##1 \end{list}
+  }
+  \stex_style_apply:
 }{
-  \end{enumerate}
+  \stex_style_apply:
   \stex_if_do_html:T{
     \end{stex_annotate_env}
   }
-}
+}{\par}{}{}
+\stexstylemcb[inline]{
+  \cs_set:Nn \_@@_mccline:n{\problem_mcc_box_tl{~} #1}
+}{}
+
 \stex_deactivate_macro:Nn \mcb {sproblem~environments}
 %    \end{macrocode}
 %
@@ -529,9 +715,7 @@
   \tl_clear:N \l_stex_key_Ftext_tl
 }{
   feedback  .tl_set:N     = \l_stex_key_feedback_tl ,
-  T         .default:n    = { false } ,
-  T         .bool_set:N   = \l_stex_key_T_bool ,
-  F         .default:n    = { false } ,
+  T         .code:n    = {\bool_set_true:N \l_stex_key_T_bool} ,
   F         .code:n       = {\bool_set_false:N \l_stex_key_T_bool} ,
   Ttext     .tl_set:N     = \l_stex_key_Ttext_tl ,
   Ftext     .tl_set:N     = \l_stex_key_Ftext_tl ,
@@ -547,8 +731,8 @@
   }
 }
 \newcommand\mcc[2][]{
-  \stex_keys_set:nn{mcc}{#1}\par
-  \tl_set:Nn \l_tmpb_tl {~--~
+  \stex_keys_set:nn{mcc}{#1}
+  \tl_set:Nn \l_tmpa_tl{
     \bool_if:NTF \l_stex_key_T_bool {
       \tl_if_empty:NTF \l_stex_key_Ttext_tl \problem at kw@correct \l_stex_key_Ttext_tl
     }{
@@ -558,54 +742,220 @@
       \\\emph{\l_stex_key_feedback_tl}
     }
   }
-  \tl_set:Nn \l_tmpa_tl {
-     #2
-    \stex_if_do_html:TF{ 
-      \stex_annotate:nn{shtml:mcc-solution={}}{\l_tmpb_tl} 
+
+  \_@@_mccline:n{
+    \stex_if_do_html:TF{
+      \stex_annotate:nn{shtml:mcc={
+        \bool_if:NTF \l_stex_key_T_bool {true}{false}
+      }}{
+        #2\stex_annotate:nn{shtml:mcc-solution={}}{\l_tmpa_tl}
+      }
     }{
-      \ifsolutions\l_tmpb_tl\fi
+        #2\ifsolutions\footnote{\l_tmpa_tl}\fi
     }
   }
-  \item[\problem_mcc_box_tl]{}~
-  \stex_if_do_html:TF{
-    \stex_annotate:nn{shtml:mcc={
-      \bool_if:NTF \l_stex_key_T_bool {true}{false}
-    }}{\l_tmpa_tl}
-  }{\l_tmpa_tl}
 } 
 \stex_deactivate_macro:Nn \mcc {mcb~environments}
 %    \end{macrocode}
 % \end{macro}
+% \end{environment}
 %
+% \begin{environment}{scb}
+%
+%    \begin{macrocode}
+
+\tl_set:Nn\problem_scc_box_tl{$\bigcirc$}
+
+\stex_new_stylable_env:nnnnnnn{scb}{O{}}{
+  \stex_keys_set:nn{style}{#1}
+  \stex_if_do_html:T{
+    \exp_args:Nne\begin{stex_annotate_env}{
+      shtml:single-choice-block={}
+      \clist_if_empty:NF \l_stex_key_style_clist {,
+        shtml:styles={\l_stex_key_style_clist}
+      }
+    }
+    \tl_set:Nn\problem_scc_box_tl{}
+  }
+  \stex_deactivate_macro:Nn \mcb {sproblem~environments}
+  \stex_deactivate_macro:Nn \scb {sproblem~environments}
+  \stex_deactivate_macro:Nn \solution {sproblem~environments}
+  \stex_deactivate_macro:Nn \hint {sproblem~environments}
+  \stex_deactivate_macro:Nn \exnote {sproblem~environments}
+  \stex_deactivate_macro:Nn \gnote {sproblem~environments}
+  \stex_reactivate_macro:N \scc
+  \cs_set:Nn \_@@_sccline:n{
+    \begin{list}{}{
+      \setlength\topsep{0pt}
+      \setlength\parsep{0pt}
+      \setlength\rightmargin{0pt}
+    }\item[\problem_scc_box_tl] ##1 \end{list}
+  }
+  \stex_style_apply:
+}{
+  \stex_style_apply:
+  \stex_if_do_html:T{
+    \end{stex_annotate_env}
+  }
+}{\par}{}{}
+\stexstylescb[inline]{
+  \cs_set:Nn \_@@_sccline:n{\problem_scc_box_tl{~} #1}
+}{}
+
+\stex_deactivate_macro:Nn \scb {sproblem~environments}
+%    \end{macrocode}
+%
+% \begin{macro}{\scc}
+%    \begin{macrocode}
+
+\newcommand\scc[2][]{
+  \stex_keys_set:nn{mcc}{#1}
+  \tl_set:Nn \l_tmpa_tl{
+    \bool_if:NTF \l_stex_key_T_bool {
+      \tl_if_empty:NTF \l_stex_key_Ttext_tl \problem at kw@correct \l_stex_key_Ttext_tl
+    }{
+      \tl_if_empty:NTF \l_stex_key_Ftext_tl \problem at kw@wrong \l_stex_key_Ftext_tl
+    }
+    \tl_if_empty:NF \l_stex_key_feedback_tl {
+      \\\emph{\l_stex_key_feedback_tl}
+    }
+  }
+
+  \_@@_sccline:n{
+    \stex_if_do_html:TF{
+      \stex_annotate:nn{shtml:scc={
+        \bool_if:NTF \l_stex_key_T_bool {true}{false}
+      }}{
+        #2\stex_annotate:nn{shtml:scc-solution={}}{\l_tmpa_tl}
+      }
+    }{
+        #2\ifsolutions\footnote{\l_tmpa_tl}\fi
+    }
+  }
+} 
+\stex_deactivate_macro:Nn \scc {scb~environments}
+
+
+\newcommand\yesTnoF{
+  \begin{scb}[style=inline]
+    \scc[T]{yes}~\scc[F]{no}
+  \end{scb}
+}
+\newcommand\yesFnoT{
+  \begin{scb}[style=inline]
+    \scc[F]{yes}~\scc[T]{no}
+  \end{scb}
+}
+\newcommand\trueTfalseF{
+  \begin{scb}[style=inline]
+    \scc[T]{true}~\scc[F]{false}
+  \end{scb}
+}
+\newcommand\trueFfalseT{
+  \begin{scb}[style=inline]
+    \scc[F]{true}~\scc[T]{false}
+  \end{scb}
+}
+%    \end{macrocode}
+% \end{macro}
+% \end{environment}
+%
 % \begin{macro}{\fillinsol}
 %    \begin{macrocode}
+\stex_keys_define:nnnn{fillinsol}{
+  \tl_clear:N \l_@@_fillin_solution_tl
+  \dim_zero:N \l_stex_key_testspace_dim
+}{
+  testspace   .dim_set:N = \l_stex_key_testspace_dim,
+  exact    .code:n = {\_@@_parse_fillin_arg:nnnn{exact}#1 },
+  numrange .code:n = {\_@@_parse_fillin_arg:nnnn{numrange}#1 },
+  regex    .code:n = {\_@@_parse_fillin_arg:nnnn{regex}#1 }
+}{}
+
+\cs_new:Nn \_@@_parse_fillin_arg:nnnn {
+  \stex_if_do_html:TF{
+    \tl_set:Nn \l_tmpa_tl{#3}
+    \tl_set:Nn \l_tmpb_tl{T}
+    \stex_annotate_invisible:nn{
+      shtml:fillin-case={#1},
+      shtml:fillin-case-value={#2},
+      shtml:fillin-case-verdict={
+        \tl_if_eq:NNTF\l_tmpa_tl\l_tmpb_tl{true}{false}
+      },
+    }{#4}
+  }{
+    \tl_put_right:Nn \l_@@_fillin_solution_tl {
+      #1{~} & #2{~} & #3{~} & #4{~} \\
+    }
+  }
+}
+
 \newcommand\fillinsol[2][]{
   \quad
+  \mode_if_math:TF{
+    \hbox{\_@@_fillinsol:nn{#1}{$#2$}}
+  }{
+    \_@@_fillinsol:nn{#1}{#2}
+  }
+  \quad
+}
+\cs_new_protected:Nn \_@@_fillinsol:nn {
+  \stex_keys_set:nn{fillinsol}{#1}
   \stex_if_do_html:TF{
-    \stex_annotate:nn{shtml:fillinsol={}}{ \_stex_annotate_force_break:n{#2} }
+    \stex_annotate:nn{shtml:fillinsol={}}{ \_stex_annotate_force_break:n{
+      #2
+      \l_@@_fillin_solution_tl
+    } }
   }{
     \ifsolutions
       \textcolor{red}{\fbox{#2}}
-    \else
-      \fbox{
-        \tl_if_empty:nTF{#1}{
-          \phantom{\huge{#2}}
-        }{
-          \hspace{#1}
+      \tl_if_empty:NF \l_@@_fillin_solution_tl {
+        \footnote{
+          \halign{ ##\hfil & ##\hfil &##\hfil&##\hfil \cr
+            \textbf{type }&\textbf{case }&\textbf{verdict }&\textbf{feedback }\cr
+            \l_@@_fillin_solution_tl
+          }
         }
       }
+    \else
+      \fbox{\dim_compare:nNnTF\l_stex_key_testspace_dim={0pt}{
+        \phantom{\huge{#2}}
+      }{
+        \hspace{\l_stex_key_testspace_dim}
+      }}
     \fi
   }
-  \quad
 }
 \stex_deactivate_macro:Nn \fillinsol {sproblem~environments}
 %    \end{macrocode}
 % \end{macro}
 %
-% \end{environment}
 %
+% \begin{macro}{\testemptypage}
+%    \begin{macrocode}
+\newcommand\testemptypage[1][]{%
+	\bool_if:NT \c_@@_test_bool {\ \vfill\begin{center}\hwexam at kw@testemptypage\end{center}\eject}
+}
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{\testspace}
 %    \begin{macrocode}
+\newcommand\testspace[1]{\bool_if:NT \c_@@_test_bool {\vspace*{#1}}}
+\newcommand\testsmallspace{\testspace{1cm}}
+\newcommand\testmedspace{\testspace{2cm}}
+\newcommand\testbigspace{\testspace{3cm}}
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\testnewpage}
+%    \begin{macrocode}
+\newcommand\testnewpage{\bool_if:NT \c_@@_test_bool {\newpage}}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 % 

Modified: trunk/Master/texmf-dist/source/latex/stex/stex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/stex/stex.dtx	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/source/latex/stex/stex.dtx	2023-10-16 19:59:04 UTC (rev 68569)
@@ -36,7 +36,10 @@
 %%%%%%%%%%%%%   stex.dtx   %%%%%%%%%%%%%
 
 \RequirePackage{expl3,l3keys2e}
-\ProvidesExplClass{stex}{2023/03/19}{3.3.0}{sTeX document class}
+\ProvidesExplClass{stex}{2023/10/13}{3.4.0}{sTeX document class}
+\IfFileExists{stex-expl-compat.sty}{
+  \usepackage{stex-expl-compat}
+}{}
 
 \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{stex}}
 \ProcessOptions
@@ -52,11 +55,14 @@
 %    \begin{macrocode}
 %<*package>
 \RequirePackage{expl3,l3keys2e,ltxcmds}
-\ProvidesExplPackage{stex}{2023/03/19}{3.3.0}{sTeX package}
+\ProvidesExplPackage{stex}{2023/10/13}{3.4.0}{sTeX package}
+\IfFileExists{stex-expl-compat.sty}{
+  \usepackage{stex-expl-compat}
+}{}
 \RequirePackage{stex-logo} % externalized for backwards-compatibility reasons
 \RequirePackage{standalone}
 
-\message{^^J*~This~is~sTeX~version~3.3.0~*^^J}
+\message{^^J*~This~is~sTeX~version~3.4.0~*^^J}
 %    \end{macrocode}
 %
 % Package options:
@@ -70,6 +76,7 @@
   writesms   .bool_set:N   = \c_stex_persist_write_mode_bool ,
   checkterms .bool_set:N   = \c_stex_check_terms_bool ,
   image      .bool_set:N   = \c_tikzinput_image_bool,
+  nofrontmatter .bool_set:N = \c_stex_no_frontmatter_bool,
   unknown    .code:n       = {}
 }
 \exp_args:NNo \clist_set:Nn \c_stex_debug_clist \c_stex_debug_clist
@@ -185,11 +192,11 @@
 }
 
 \exp_args:NNo \clist_if_in:NnTF \c_stex_debug_clist {\tl_to_str:n{all}} {
-    \msg_redirect_module:nnn{ stex }{ none }{ term }
+    \msg_redirect_module:nnn{ stex }{ none }{ warning }
     \stex_debug:nn{all}{Logging~everything!}
 }{
   \clist_map_inline:Nn \c_stex_debug_clist {
-    \msg_redirect_name:nnn{ stex }{ debug / #1 }{ term }
+    \msg_redirect_name:nnn{ stex }{ debug / #1 }{ warning }
     \stex_debug:nn{#1}{Logging~#1}
   }
 }
@@ -547,8 +554,8 @@
 %    \begin{macrocode}
 \cs_new_protected:Nn \stex_deactivate_macro:Nn {
   \tl_set_eq:cN{\tl_to_str:n{#1}~-~orig}#1
-  \tl_set:Nn#1{
-    \msg_error:nnnn{stex}{error/deactivated-macro}{\detokenize{#1}}{#2}
+  \cs_set_protected:Npn#1{
+    \exp_args:Nnno\msg_error:nnnn{stex}{error/deactivated-macro}{#1}{#2}
   }
 }
 \cs_new_protected:Nn \stex_reactivate_macro:N {
@@ -1915,46 +1922,48 @@
 }
 
 \AtBeginDocument{
-  \cs_if_exist:NTF\frontmatter{
-    \let\_@@_orig_frontmatter\frontmatter
-    \let\frontmatter\relax
-  }{
-    \tl_set:Nn\_@@_orig_frontmatter{
-      \clearpage
-      %\@mainmatterfalse
-      \pagenumbering{roman}
+  \bool_if:NF \c_stex_no_frontmatter_bool {
+    \cs_if_exist:NTF\frontmatter{
+      \let\_@@_orig_frontmatter\frontmatter
+      \let\frontmatter\relax
+    }{
+      \tl_set:Nn\_@@_orig_frontmatter{
+        \clearpage
+        %\@mainmatterfalse
+        \pagenumbering{roman}
+      }
     }
-  }
-  \cs_if_exist:NTF\backmatter{
-    \let\_@@_orig_backmatter\backmatter
-    \let\backmatter\relax
-  }{
-    \tl_set:Nn\_@@_orig_backmatter{
-      \clearpage
-      %\@mainmatterfalse
-      \pagenumbering{roman}
+    \cs_if_exist:NTF\backmatter{
+      \let\_@@_orig_backmatter\backmatter
+      \let\backmatter\relax
+    }{
+      \tl_set:Nn\_@@_orig_backmatter{
+        \clearpage
+        %\@mainmatterfalse
+        \pagenumbering{roman}
+      }
     }
-  }
-  \newenvironment{frontmatter}{
-    \_@@_orig_frontmatter
-  }{
-    \cs_if_exist:NTF\mainmatter{
-      \mainmatter
+    \newenvironment{frontmatter}{
+      \_@@_orig_frontmatter
     }{
-      \clearpage
-      %\@mainmattertrue
-      \pagenumbering{arabic}
+      \cs_if_exist:NTF\mainmatter{
+        \mainmatter
+      }{
+        \clearpage
+        %\@mainmattertrue
+        \pagenumbering{arabic}
+      }
     }
-  }
-  \newenvironment{backmatter}{
-    \_@@_orig_backmatter
-  }{
-    \cs_if_exist:NTF\mainmatter{
-      \mainmatter
+    \newenvironment{backmatter}{
+      \_@@_orig_backmatter
     }{
-      \clearpage
-      %\@mainmattertrue
-      \pagenumbering{arabic}
+      \cs_if_exist:NTF\mainmatter{
+        \mainmatter
+      }{
+        \clearpage
+        %\@mainmattertrue
+        \pagenumbering{arabic}
+      }
     }
   }
 }
@@ -2320,7 +2329,10 @@
 }
 
 \cs_new_protected:Nn \stex_ref_new_sym_target:n {
-  \exp_args:Ne \label{\tl_to_str:n{sref at sym@ #1}}
+  \cs_if_exist:NT \hypertarget{
+    \exp_args:Ne \hypertarget{\tl_to_str:n{sref at sym@ #1}}{}
+    \str_gset:cx{\tl_to_str:n{r at sref@sym@ #1}}{\tl_to_str:n{sref at sym@ #1}}
+  }
 }
 
 \cs_new_protected:Nn \stex_ref_new_sym_target:nn {
@@ -2342,8 +2354,8 @@
 }
 
 \cs_new_protected:Npn \_@@_do_internal_link:nn #1 {
-  \cs_if_exist:NTF \hyperref {
-    \hyperref[{#1}]
+  \cs_if_exist:NTF \hyperlink {
+    \hyperlink{#1}
   }\use:n
 }
 
@@ -2352,7 +2364,7 @@
 }
 
 \cs_new_protected:Npn \_@@_sym_aux:nn #1 {
-  \cs_if_exist:cTF{r at sref@sym@\tl_to_str:n{#1}}{
+  \cs_if_exist:cTF{\tl_to_str:n{r at sref@sym@#1}}{
     \exp_args:Ne \_@@_do_internal_link:nn{\tl_to_str:n{sref at sym@#1}}
   }{
     \str_if_exist:cTF{g_stex_sref_sym_#1_label}{
@@ -2448,9 +2460,9 @@
     }
   }{
     \IfFileExists{ \stex_file_use:N \c_stex_mathhub_file / #1 / source / #2 }{
-      \par\stex_annotate_invisible:nn{shtml:inputref={
+      \ifvmode\noindent\fi\stex_annotate_invisible:nn{shtml:inputref={
         \l_tmpa_str / #2
-      }}{~}
+      }}{}
     }{
       \input{ \stex_file_use:N \c_stex_mathhub_file / #1 / source / #2 }
     }
@@ -2536,7 +2548,9 @@
   \bool_while_do:nn { ! \seq_if_empty_p:N \l_@@_id_seq }{
     \str_set:Nx \l_@@_path_str {\stex_file_use:N \l_@@_path_seq / meta-inf / lib / #1.#2}
     \IfFileExists{ \l_@@_path_str }{
-      \seq_put_right:No \l_@@_libinput_files_seq \l_@@_path_str
+      \exp_args:NNo \seq_if_in:NnF \l_@@_libinput_files_seq \l_@@_path_str {
+        \seq_put_right:No \l_@@_libinput_files_seq \l_@@_path_str
+      }
     }{}
     \seq_pop_left:NN \l_@@_id_seq \l_@@_path_str
     \seq_put_right:No \l_@@_path_seq \l_@@_path_str
@@ -2544,7 +2558,9 @@
 
   \str_set:Nx \l_@@_path_str {\stex_file_use:N \l_@@_path_seq / lib / #1.#2}
   \IfFileExists{ \l_@@_path_str }{
-    \seq_put_right:No \l_@@_libinput_files_seq \l_@@_path_str
+    \exp_args:NNo \seq_if_in:NnF \l_@@_libinput_files_seq \l_@@_path_str {
+      \seq_put_right:No \l_@@_libinput_files_seq \l_@@_path_str
+    }
   }{}
 }
 
@@ -2637,7 +2653,7 @@
 %
 % \begin{macro}{\libusetikzlibrary}
 %    \begin{macrocode}
-\cs_new_protected:Nn \_@@_usetikzlibrary:nn {
+\cs_new_protected:Nn \_@@_usetikzlibrary_i:nn {
   \pgfkeys at spdef\pgf at temp{#1}
   \expandafter\ifx\csname tikz at library@\pgf at temp @loaded\endcsname\relax%
   \expandafter\global\expandafter\let\csname tikz at library@\pgf at temp @loaded\endcsname=\pgfutil at empty%
@@ -2653,17 +2669,25 @@
   \catcode`\$=\csname tikz at library@#1 at dollarcode\endcsname
 }
 
-\cs_new_protected:Npn \libusetikzlibrary #1 {
-  \cs_if_exist:NF \usetikzlibrary {
-    \msg_error:nnx{stex}{error/notikz}{\tl_to_str:n{\libusetikzlibrary}}
-  }
+\cs_new_protected:Nn \_@@_usetikzlibrary:n{
   \_@@_up_archive:nn{tikzlibrary#1}{code.tex}
   \int_compare:nNnTF {\seq_count:N \l_@@_libinput_files_seq} = 1 {
-    \exp_args:Nne \_@@_usetikzlibrary:nn{#1}{ \seq_item:Nn \l_@@_libinput_files_seq 1 }
+    \exp_args:Nne \_@@_usetikzlibrary_i:nn{#1}{ \seq_item:Nn \l_@@_libinput_files_seq 1 }
   }{
     \stex_fatal_error:nnn{error/nofile}{\libusetikzlibrary}{tikzlibrary#1.code.tex}
   }
 }
+
+\newcommand \libusetikzlibrary [2][] {
+  \cs_if_exist:NF \usetikzlibrary {
+    \msg_error:nnx{stex}{error/notikz}{\tl_to_str:n{\libusetikzlibrary}}
+  }
+  \tl_if_empty:nTF{#1}{
+    \_@@_usetikzlibrary:n{#2}
+  }{
+    \stex_in_archive:nn{#1}{\_@@_usetikzlibrary:n{#2}}
+  }
+}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4370,11 +4394,14 @@
   \str_clear:N \l_@@_name_str
   \str_clear:N \l_@@_newname_str
   \tl_clear:N \l_@@_ass_tl
+  \stex_debug:nn{morphisms}{Parsing~#1}
   \exp_args:NNe \seq_set_split:Nnn \l_@@_seq {\tl_to_str:n{@}} {#1}
   \int_compare:nNnTF {\seq_count:N \l_@@_seq} = 1 {
+    \stex_debug:nn{morphisms}{No~@}
     \seq_pop_left:NN \l_@@_seq \l_@@_next_tl
   }{
     \seq_pop_left:NN \l_@@_seq \l_@@_name_str
+    \stex_debug:nn{morphisms}{Name:~\l_@@_name_str}
     \exp_args:NNo \str_set:Nn \l_@@_name_str \l_@@_name_str
     \tl_set:Nx \l_@@_next_tl {\seq_use:Nn \l_@@_seq @}
   }
@@ -4449,7 +4476,7 @@
 }{}
 \stex_deactivate_macro:Nn \interpretmod {module~environments}
 \stex_every_module:n {
-  \stex_reactivate_macro:N \iterpretmod
+  \stex_reactivate_macro:N \interpretmod
 }
 \stex_sms_allow_escape:N\interpretmod
 
@@ -4553,6 +4580,7 @@
   \tl_clear:N \l_stex_key_type_tl
   \tl_clear:N \l_stex_key_def_tl
   \tl_clear:N \l_stex_key_return_tl
+  \str_clear:N \l_stex_key_wikidata_str
   \clist_clear:N \l_stex_key_argtypes_clist
 }{
   name      .str_set:N  = \l_stex_key_name_str ,
@@ -4559,6 +4587,7 @@
 
   return    .tl_set:N     = \l_stex_key_return_tl ,
   argtypes  .clist_set:N  = \l_stex_key_argtypes_clist ,
+  wikidata  .str_set:N    = \l_stex_key_wikidata_str ,
 
   type      .tl_set:N     = \l_stex_key_type_tl  ,
   def       .tl_set:N     = \l_stex_key_def_tl   ,
@@ -4640,6 +4669,9 @@
     \str_if_empty:NF \l_stex_macroname_str {,
       shtml:macroname={\l_stex_macroname_str}
     }
+    \str_if_empty:NF \l_stex_key_wikidata_str {,
+      shtml:wikidata={\l_stex_key_wikidata_str}
+    }
     \str_if_empty:NF \l_stex_key_assoc_str {,
       shtml:assoctype={\l_stex_key_assoc_str}
     }
@@ -5036,7 +5068,11 @@
   intent     .str_set:N    = \l_stex_key_intent_str ,
   argnames   .clist_set:N  = \l_stex_key_intent_args_clist , 
   unknown    .code:n       = {
-    \str_set_eq:NN \l_stex_key_variant_str \l_keys_key_str
+    \str_if_empty:NTF \l_keys_key_str {
+        \str_set:Nx \l_stex_key_variant_str {\l_keys_key_tl}
+    }{
+        \str_set_eq:NN \l_stex_key_variant_str \l_keys_key_str
+    }
   }
 }{style}
 %    \end{macrocode}
@@ -5368,10 +5404,21 @@
 }
 
 \cs_new_protected:Nn \_stex_notation_set_default:n{
-  \stex_module_add_notation:eoeoo{#1}{}
-    {\int_use:N \l_stex_get_symbol_arity_int}
-    \l_stex_notation_macrocode_cs
-    \l_stex_key_op_tl
+  \stex_if_in_module:TF{
+    \stex_module_add_notation:eoeoo{#1}{}
+      {\int_use:N \l_stex_get_symbol_arity_int}
+      \l_stex_notation_macrocode_cs
+      \l_stex_key_op_tl
+  }{
+    \cs_set_eq:cN {l_stex_notation_ 
+      \l_stex_get_symbol_mod_str?\l_stex_get_symbol_name_str 
+      __cs}\l_stex_notation_macrocode_cs
+    \tl_if_empty:NF \l_stex_key_op_tl {
+      \cs_set_eq:cN{l_stex_notation_ 
+      \l_stex_get_symbol_mod_str?\l_stex_get_symbol_name_str 
+      _op__cs}\l_stex_key_op_tl
+    }
+  }
 }
 %    \end{macrocode}
 % \end{macro}
@@ -7278,7 +7325,11 @@
 }{
   this    .tl_set:N = \l_stex_current_this_tl ,
   unknown .code:n   = {
-    \str_set_eq:NN \l_@@_name_str \l_keys_key_str
+    \str_if_empty:NTF \l_keys_key_str {
+      \str_set:Nx \l_@@_name_str {\l_keys_key_tl}
+    }{
+      \str_set_eq:NN \l_@@_name_str \l_keys_key_str
+    }
   }
 }{}
 
@@ -8304,7 +8355,7 @@
 \NewDocumentCommand \premise {O{} m} {
   \tl_if_empty:nF {#1} {
     \stex_debug:nn{Here:}{Variable~#1}
-    \exp_args:NNx\exp_args:Nnx\vardef{v#1}{#1}
+    \exp_args:Nne\use:nn{\vardef}{{v#1}[name=#1]{#1}}
   }
   \stex_annotate:nn{shtml:premise={#1}}{#2}
 }
@@ -8684,7 +8735,7 @@
     \stex_keys_set:nn{spfsteps}{##2}
     \str_if_empty:NF \l_stex_key_name_str {
       \stex_debug:nn{Here:}{Variable~\l_stex_key_name_str}
-      \exp_args:NNx\exp_args:Nnx\vardef{v\l_stex_key_name_str}{\l_stex_key_name_str}
+      \exp_args:Nne\use:nn{\vardef}{{v\l_stex_key_name_str}[name=\l_stex_key_name_str]{\l_stex_key_name_str}}
     }
 
     \begin{spfstepenv}
@@ -8983,6 +9034,51 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% VoLL-KI Annotations
+%    \begin{macrocode}
+\newcommand\precondition[2]{
+    \str_clear:N \l_stex_get_symbol_name_str
+    \stex_get_symbol:n{#2}
+    \str_if_empty:NTF \l_stex_get_symbol_name_str{
+        \errmessage{Unknown~symbol~#2}
+    }{
+		  \str_case:nnTF {#1}{
+		      {remember}{}
+		      {understand}{}
+		      {analyze}{}
+		      {evaluate}{}
+		      {apply}{}
+		      {create}{}
+		  }{
+		  	\stex_annotate_invisible:nn{
+		  		shtml:preconditionsymbol={\l_stex_get_symbol_mod_str ? \l_stex_get_symbol_name_str},
+		  		shtml:preconditiondimension={#1}
+		  	}{}
+		  }{\errmessage{Unknown~cognitive~dimension~#1}}
+    }
+}
+\newcommand\objective[2]{
+    \str_clear:N \l_stex_get_symbol_name_str
+    \stex_get_symbol:n{#2}
+    \str_if_empty:NTF \l_stex_get_symbol_name_str{
+        \errmessage{Unknown~symbol~#2}
+    }{
+		  \str_case:nnTF {#1}{
+				{remember}{}
+				{understand}{}
+				{analyze}{}
+				{evaluate}{}
+				{apply}{}
+				{create}{}
+		  }{
+		  	\stex_annotate_invisible:nn{
+		  		shtml:objectivesymbol={\l_stex_get_symbol_mod_str ? \l_stex_get_symbol_name_str},
+		  		shtml:objectivedimension={#1}
+		  	}{}
+		  }{\errmessage{Unknown~cognitive~dimension~#1}}
+    }
+}
+%    \end{macrocode}
 %
 %    \begin{macrocode}
 \seq_if_empty:NT \g_stex_current_file {

Modified: trunk/Master/texmf-dist/source/latex/stex/tikzinput.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/stex/tikzinput.dtx	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/source/latex/stex/tikzinput.dtx	2023-10-16 19:59:04 UTC (rev 68569)
@@ -42,7 +42,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\ProvidesExplPackage{tikzinput}{2023/03/19}{3.3.0}{tikzinput package}
+\ProvidesExplPackage{tikzinput}{2023/10/13}{3.4.0}{tikzinput package}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn { tikzinput } {

Modified: trunk/Master/texmf-dist/tex/latex/stex/etc/hwexam-default.header
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/hwexam-default.header	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/hwexam-default.header	2023-10-16 19:59:04 UTC (rev 68569)
@@ -3,7 +3,7 @@
 
 \begin{center}
     \Large\textbf{\@title}\\[1ex]
-    \large\@date\\[3ex]
+    \large\@date\strut\\[3ex]
 \end{center}
 
 \textbf{You have {\hwexamminutes} (sharp) for the test};\\
@@ -22,11 +22,9 @@
 \vfill
 \begin{center}
 { 
-    \Large\em You have ample time, so take it slow and avoid rushing
-    to mistakes!\\[2ex]
     Different problems test different skills and knowledge, so do not
     get stuck on one problem.
 }\vfill
 
 \correction at table\\[3ex]
-\end{center}
\ No newline at end of file
+\end{center}

Modified: trunk/Master/texmf-dist/tex/latex/stex/etc/lststex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/lststex.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/lststex.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -15,6 +15,7 @@
       symdef,symdecl,notation,sref},
    morekeywords={smodule,sdefinition,sassertion,sparagraph,
      inputref,
+     sproblem,hint,exnote,solution,gnote,
      sproof,spfstep,spfcases,spfcase,justification,premise}}
 
 \definecolor{backcolor}{gray}{.96}
@@ -71,8 +72,10 @@
   classoffset=5,keywordstyle=\color{magenta},morekeywords={
     smodule,sdefinition,sassertion,sparagraph,sexample,
     sproof,subproof,spfcases,spfcase,spfstep,spfcomment,spfblock,
+    sproblem,subproblem,solution,hint,exnote,mcb,scb,
     \\spfidea,\\spfsketch,\\spfcasesketch,\\sproofend,
     \\spfjust,\\premise,\\justarg,\\inlinedef,\\inlineex,\\inlineass,
+    \\scc,\\mcc,\\objective,
     \\varbind,
     copymodule,interpretmodule,mathstructure,sexample,extstructure,
     extstructure*,realization
@@ -125,11 +128,21 @@
     }
   },
   unknown   .code:n = {
-    \tl_if_empty:nTF{#1}{
-      \exp_args:NNo \clist_put_right:Nn \l_lststex_pass_on_args_clist \l_keys_key_str
+    \str_if_empty:NTF \l_keys_key_str {
+      \tl_if_empty:nTF{#1}{
+        \exp_args:NNo \clist_put_right:Nn \l_lststex_pass_on_args_clist \l_keys_key_tl
+      }{
+        \exp_args:NNx \clist_put_right:Nn \l_lststex_pass_on_args_clist {
+          \l_keys_key_tl = \exp_not:n{{#1}}
+        }
+      }
     }{
-      \exp_args:NNx \clist_put_right:Nn \l_lststex_pass_on_args_clist {
-        \l_keys_key_str = \exp_not:n{{#1}}
+      \tl_if_empty:nTF{#1}{
+        \exp_args:NNo \clist_put_right:Nn \l_lststex_pass_on_args_clist \l_keys_key_str
+      }{
+        \exp_args:NNx \clist_put_right:Nn \l_lststex_pass_on_args_clist {
+          \l_keys_key_str = \exp_not:n{{#1}}
+        }
       }
     }
   }

Modified: trunk/Master/texmf-dist/tex/latex/stex/etc/stex-highlighting.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/stex-highlighting.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/stex-highlighting.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,6 +1,17 @@
 %\RequirePackage{xcolor}
 \RequirePackage{pdfcomment}
+\RequirePackage{l3keys2e}
+\ExplSyntaxOn
 
+\keys_define:nn { stexhighlighting / pkg}{
+  boxes   .default:n = {true},
+  boxes   .bool_set:N = \c_stexhighlighting_boxes_bool,
+}
+
+\ProcessKeysOptions{ stexhighlighting / pkg}
+
+\ExplSyntaxOff
+
 \def\compemph#1{%
   \ifcsname textcolor\endcsname
     \textcolor{blue}{#1}%
@@ -28,20 +39,40 @@
 }
 \def\varemph#1{\ifcsname textcolor\endcsname\textcolor{gray}{#1}\else#1\fi}
 
-\protected\def\compemph at uri#1#2{%
-   \pdftooltip{%
-      \srefsymuri{#2}{\compemph{#1}}%
-   }{%
-     URI:~\detokenize{#2}%
-   }%
+\ExplSyntaxOn
+
+\bool_if:NTF\c_stexhighlighting_boxes_bool{
+  \protected\def\compemph at uri#1#2{
+    \pdftooltip{
+      \srefsymuri{#2}{\compemph{#1}}
+    }{
+      URI:~\detokenize{#2}
+    }
+  }
+  \protected\def\symrefemph at uri#1#2{
+    \pdftooltip{
+      \srefsymuri{#2}{\symrefemph{#1}}
+    }{
+      URI:~\detokenize{#2}
+    }
+  }
+}{
+  \protected\def\compemph at uri#1#2{
+    \pdftooltip{{\hypersetup{pdfborder={0~0~0}}
+      \srefsymuri{#2}{\compemph{#1}}
+    }}{
+      URI:~\detokenize{#2}
+    }
+  }
+  \protected\def\symrefemph at uri#1#2{
+    \pdftooltip{{\hypersetup{pdfborder={0~0~0}}
+      \srefsymuri{#2}{\symrefemph{#1}}
+    }}{
+      URI:~\detokenize{#2}
+    }
+  }
 }
-\protected\def\symrefemph at uri#1#2{%
-  \pdftooltip{%
-    \srefsymuri{#2}{\symrefemph{#1}}%
-   }{%
-     URI:~\detokenize{#2}%
-   }%
- }
+
 \protected\def\defemph at uri#1#2{%
    \pdftooltip{%
      \defemph{#1}%
@@ -56,3 +87,5 @@
      Variable~\detokenize{#2}%
    }%
 }
+
+\ExplSyntaxOff
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/stex/etc/stex-logo.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/stex-logo.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/stex-logo.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,7 +1,7 @@
 \RequirePackage{xspace}
 \protected\def\stex{%
   \@ifundefined{texorpdfstring}{\raisebox{-.5ex}S\kern-.5ex\TeX}{%
-    \texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}\xspace%
-  }%
+    \texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}%
+  }\xspace%
 }
-\let\sTeX\stex
\ No newline at end of file
+\let\sTeX\stex

Deleted: trunk/Master/texmf-dist/tex/latex/stex/etc/stex.cls.ltxml
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/stex.cls.ltxml	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/stex.cls.ltxml	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,10 +0,0 @@
-package LaTeXML::Package::Pool;
-use strict;
-use warnings;
-use LaTeXML::Package;
-
-RequirePackage('xparse');
-
-InputDefinitions('stex', type => 'cls', noltxml => 1);
-
-1;
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/tex/latex/stex/etc/stex.sty.ltxml
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/stex.sty.ltxml	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/stex.sty.ltxml	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,23 +0,0 @@
-package LaTeXML::Package::Pool;
-use strict;
-use warnings;
-use LaTeXML::Package;
-
-RequirePackage('xparse');
-
-DefPrimitive('\csname stex_kpsewhich:Nn\endcsname Token {}',sub {
-    my ($stomach, $target, $value) = @_;
-    $value = ToString(Expand($value));
-    my $out = ToString(`kpsewhich $value`);
-    $out =~ s/^\s+//;
-    $out =~ s/\s+$//;
-    Note("Here: $value => $out");
-    my @ret = Explode($out);
-    DefMacroI($target, undef, Tokens(@ret));
-},locked=>1);
-
-\DefMacroI('\stex at backend',undef,Explode("latexml"));
-
-InputDefinitions('stex', type => 'sty', noltxml => 1);
-
-1;
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/stex/etc/stexthm.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/etc/stexthm.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/etc/stexthm.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -1,4 +1,4 @@
-\ProvidesExplPackage{stexthm}{2023/03/19}{3.3.0}{Default Typesetting for sTeX Statements}
+\ProvidesExplPackage{stexthm}{2023/10/13}{3.4.0}{Default Typesetting for sTeX Statements}
 
 \RequirePackage{stex}
 \RequirePackage{amsthm}

Modified: trunk/Master/texmf-dist/tex/latex/stex/hwexam.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/hwexam.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/hwexam.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -6,7 +6,7 @@
 %%
 %% hwexam.dtx  (with options: `package')
 %% 
-\ProvidesExplPackage{hwexam}{2023/03/19}{3.3.0}{homework assignments and exams}
+\ProvidesExplPackage{hwexam}{2023/10/13}{3.4.0}{homework assignments and exams}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn {hwexam / pkg}{
@@ -22,7 +22,7 @@
 \ExplSyntaxOn\makeatletter
 \input{hwexam-english.ldf}
 \ltx at ifpackageloaded{babel}{
-\clist_set:Nx \l_tmpa_clist {\bbl at loaded}
+\clist_set:Nx \l_tmpa_clist {\exp_args:No \tl_to_str:n \bbl at loaded}
 \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{ngerman}}{
 \input{hwexam-ngerman.ldf}
 }
@@ -78,10 +78,10 @@
 }\par\smallskip
 \textbf{
 \tl_if_empty:NF \l_stex_key_given_tl {
-\hwexam at kw@given:~\l_stex_key_given_tl\quad
+\hwexam at kw@given :~\l_stex_key_given_tl\quad
 }
 \tl_if_empty:NF \l_stex_key_due_tl {
-\hwexam at kw@due:~\l_stex_key_due_tl\quad
+\hwexam at kw@due :~\l_stex_key_due_tl\quad
 }
 }
 \end{center}
@@ -170,11 +170,6 @@
 }{
 \newpage
 }
-\newcommand\testemptypage[1][]{%
-\bool_if:NT \c__problems_test_bool {\ \vfill\begin{center}\hwexam at kw@testemptypage\end{center}\eject}
-}
-\newcommand\testspace[1]{\bool_if:NT \c__problems_test_bool {\vspace*{#1}}}
-\newcommand\testnewpage{\bool_if:NT \c__problems_test_bool {\newpage}}
 \endinput
 %%
 %% End of file `hwexam.sty'.

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-english.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-english.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-english.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -3,7 +3,9 @@
 \tl_set:Nn \problem at kw@hint{Hint}
 \tl_set:Nn \problem at kw@note{Note}
 \tl_set:Nn \problem at kw@grading{Grading}
-\tl_set:Nn \problem at kw@points{pt}
+\tl_set:Nn \problem at kw@pts{pt}
 \tl_set:Nn \problem at kw@minutes{min}
 \tl_set:Nn \problem at kw@correct{Correct}
-\tl_set:Nn \problem at kw@wrong{Wrong}
\ No newline at end of file
+\tl_set:Nn \problem at kw@wrong{Wrong}
+\tl_set:Nn \problem at kw@feedback{Feedback}
+\tl_set:Nn \problem at kw@points{Points}

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-finnish.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-finnish.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-finnish.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -12,7 +12,9 @@
 \tl_set:Nn \problem at kw@hint{Hint}
 \tl_set:Nn \problem at kw@note{Note}
 \tl_set:Nn \problem at kw@grading{Grading}
-\tl_set:Nn \problem at kw@points{pt}
+\tl_set:Nn \problem at kw@pts{pt}
 \tl_set:Nn \problem at kw@minutes{min}
 \tl_set:Nn \problem at kw@correct{Correct}
 \tl_set:Nn \problem at kw@wrong{Wrong}
+\tl_set:Nn \problem at kw@schema{Schema}
+\tl_set:Nn \problem at kw@points{Points}

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-french.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-french.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-french.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -12,7 +12,9 @@
 \tl_set:Nn \problem at kw@hint{Hint}
 \tl_set:Nn \problem at kw@note{Note}
 \tl_set:Nn \problem at kw@grading{Grading}
-\tl_set:Nn \problem at kw@points{pt}
+\tl_set:Nn \problem at kw@pts{pt}
 \tl_set:Nn \problem at kw@minutes{min}
 \tl_set:Nn \problem at kw@correct{Correct}
 \tl_set:Nn \problem at kw@wrong{Wrong}
+\tl_set:Nn \problem at kw@schema{Schema}
+\tl_set:Nn \problem at kw@points{Points}

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-ngerman.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-ngerman.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-ngerman.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -11,8 +11,9 @@
 \tl_set:Nn \problem at kw@hint{Hinweis}
 \tl_set:Nn \problem at kw@note{Bemerkung}
 \tl_set:Nn \problem at kw@grading{Bewertung}
-\tl_set:Nn \problem at kw@points{Pkt}
+\tl_set:Nn \problem at kw@pts{Pkt}
 \tl_set:Nn \problem at kw@minutes{Min}
 \tl_set:Nn \problem at kw@correct{Korrekt}
 \tl_set:Nn \problem at kw@wrong{Falsch}
-
+\tl_set:Nn \problem at kw@feedback{Rückmeldung}
+\tl_set:Nn \problem at kw@points{Punkte}

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-russian.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-russian.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/problem-russian.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -11,7 +11,9 @@
 \tl_set:Nn \problem at kw@hint{Подсказка}
 \tl_set:Nn \problem at kw@note{Примечание}
 \tl_set:Nn \problem at kw@grading{Grading}
-\tl_set:Nn \problem at kw@points{бл}
+\tl_set:Nn \problem at kw@pts{бл}
 \tl_set:Nn \problem at kw@minutes{мин}
 \tl_set:Nn \problem at kw@correct{Correct}
-\tl_set:Nn \problem at kw@wrong{Wrong}
\ No newline at end of file
+\tl_set:Nn \problem at kw@wrong{Wrong}
+\tl_set:Nn \problem at kw@schema{Schema}
+\tl_set:Nn \problem at kw@points{Points}

Modified: trunk/Master/texmf-dist/tex/latex/stex/ldf/stex-en.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/ldf/stex-en.ldf	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/ldf/stex-en.ldf	2023-10-16 19:59:04 UTC (rev 68569)
@@ -3,7 +3,7 @@
 }
 \msg_set:nnn{stex}{warning/nomathhub}{
   MATHHUB~system~variable~not~found~and~no~
-  \tl_to_str:n{\mathhub}-value~set!
+  \tl_to_str:n{\mathhub}-value~set!^^JUsing~HOME/MathHub.
 }
 \msg_set:nnn{stex}{error/deactivated-macro}{
   The~\tl_to_str:n{#1}~command~is~only~allowed~in~#2!
@@ -129,6 +129,9 @@
 \msg_set:nnn{stex}{error/nomorphism}{
   No~morphism~#1~found~in~domain~of~morphism
 }
+\msg_set:nnn{stex}{error/nestedproblem}{
+  Nested~problem;~sproblem~not~allowed~in~another~sproblem
+}
 \str_set:Nn \spfsketchenvautorefname {Proof~sketch}
 \str_set:Nn \sproofautorefname {Proof}
 \str_set:Nn \spfstepautorefname {Proof~step}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/stex/notesslides.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/notesslides.cls	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/notesslides.cls	2023-10-16 19:59:04 UTC (rev 68569)
@@ -6,7 +6,7 @@
 %%
 %% notesslides.dtx  (with options: `cls')
 %% 
-\ProvidesExplClass{notesslides}{2023/03/19}{3.3.0}{notesslides Class}
+\ProvidesExplClass{notesslides}{2023/10/13}{3.4.0}{notesslides Class}
 \RequirePackage{l3keys2e}
 
 \str_const:Nn \c__notesslides_class_str {article}

Modified: trunk/Master/texmf-dist/tex/latex/stex/notesslides.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/notesslides.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/notesslides.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -6,7 +6,7 @@
 %%
 %% notesslides.dtx  (with options: `package')
 %% 
-\ProvidesExplPackage{notesslides}{2023/03/19}{3.3.0}{notesslides Package}
+\ProvidesExplPackage{notesslides}{2023/10/13}{3.4.0}{notesslides Package}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn{notesslides / pkg}{

Modified: trunk/Master/texmf-dist/tex/latex/stex/problem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/problem.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/problem.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -6,7 +6,7 @@
 %%
 %% problem.dtx  (with options: `package')
 %% 
-\ProvidesExplPackage{problem}{2023/03/19}{3.3.0}{Semantic Markup for Problems}
+\ProvidesExplPackage{problem}{2023/10/13}{3.4.0}{Semantic Markup for Problems}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn { problem / pkg }{
@@ -38,12 +38,19 @@
 }{
   \solutionsfalse
 }
+\newif\ifintest
+\bool_if:NTF \c__problems_test_bool {
+  \intesttrue
+}{
+  \intestfalse
+}
+
 \RequirePackage{stex}
 \AddToHook{begindocument}{
   \ExplSyntaxOn\makeatletter
   \input{problem-english.ldf}
   \ltx at ifpackageloaded{babel}{
-      \clist_set:Nx \l_tmpa_clist {\bbl at loaded}
+\clist_set:Nx \l_tmpa_clist {\exp_args:No \tl_to_str:n \bbl at loaded}
       \exp_args:NNx \clist_if_in:NnT \l_tmpa_clist {\detokenize{ngerman}}{
         \input{problem-ngerman.ldf}
       }
@@ -59,16 +66,20 @@
   }{}
   \makeatother\ExplSyntaxOff
 }
+\bool_new:N \l_stex_key_autogradable_bool
 \stex_keys_define:nnnn{ problem }{
   \tl_set:Nn \l_stex_key_pts_tl 0
   \tl_set:Nn \l_stex_key_min_tl 0
   \str_clear:N \l_stex_key_name_str
   \str_clear:N \l_stex_key_mhrepos_str
+  \bool_set_false:N \l_stex_key_autogradable_bool
 }{
   pts     .tl_set:N     = \l_stex_key_pts_tl,
   min     .tl_set:N     = \l_stex_key_min_tl,
   name    .str_set:N    = \l_stex_key_name_str,
-  archive .str_set:N    = \l_stex_key_mhrepos_str,
+  autogradable .bool_set:N = \l_stex_key_autogradable_bool,
+  archive  .code:n = {},
+  %archive .str_set:N    = \l_stex_key_mhrepos_str,
   creators .code:n = {}
   %imports .tl_set:N     = \l__problems_prob_imports_tl,
   %refnum  .int_set:N    = \l__problems_prob_refnum_int,
@@ -79,9 +90,26 @@
   \def\thesproblem{\arabic{#1}.\arabic{sproblem}}
 }
 \numberproblemsin{section}
+\cs_new:Nn \__problems_activate_macros: {
+  \stex_reactivate_macro:N \solution
+  \stex_reactivate_macro:N \mcb
+  \stex_reactivate_macro:N \scb
+  \stex_reactivate_macro:N \fillinsol
+  \stex_reactivate_macro:N \hint
+  \stex_reactivate_macro:N \exnote
+  \stex_reactivate_macro:N \gnote
+}
+
 \newcounter{pts}
 \newcounter{min}
+\bool_new:N \l__problems_in_problem_bool
+\bool_new:N \l__problems_has_pts_bool
+\bool_new:N \l__problems_has_min_bool
+\bool_set_false:N \l__problems_in_problem_bool
 \stex_new_stylable_env:nnnnnnn {problem} {O{}}{
+  \bool_if:NT \l__problems_in_problem_bool {
+    \msg_error:nn{stex}{error/nestedproblem}
+  }
   \cs_if_exist:NTF \l_problem_inputproblem_keys_tl {
     \tl_put_left:Nn \l_problem_inputproblem_keys_tl {#1,}
     \exp_args:Nno \stex_keys_set:nn{problem}{
@@ -91,59 +119,64 @@
     \stex_keys_set:nn{problem}{#1}
   }
   \refstepcounter{sproblem}
-  \str_if_empty:NT \l_stex_key_name_str {
-    \stex_file_split_off_lang:NN \l__problems_path_seq \g_stex_current_file
-    \seq_get_right:NN \l__problems_path_seq \l_stex_key_name_str
-  }
 
-  \exp_args:No \stex_module_setup:n \l_stex_key_name_str
-
   \stex_if_do_html:T {
+    \str_if_empty:NT \l_stex_key_name_str {
+      \stex_file_split_off_lang:NN \l__problems_path_seq \g_stex_current_file
+      \seq_get_right:NN \l__problems_path_seq \l_stex_key_name_str
+    }
     \exp_args:Nne \begin{stex_annotate_env} {
-      shtml:problem={\l_stex_current_module_str},
+      shtml:problem={\l_stex_key_name_str},
       shtml:language={ \l_stex_current_language_str},
-      shtml:signature={\l_stex_key_sig_str}
-      \tl_if_empty:NF \l_stex_metatheory_uri {,
-        shtml:metatheory={\stex_uri_use:N \l_stex_metatheory_uri}
-      }
+      shtml:autogradable={\bool_if:NTF \l_stex_key_autogradable_bool {true}{false}}
     }
-    \stex_annotate_invisible:n{}
     \tl_if_empty:NF \l_stex_key_title_tl {
       \exp_args:No \stexdoctitle \l_stex_key_title_tl
     }
+    \stex_annotate_invisible:nn{
+      shtml:problempoints={\l_stex_key_pts_tl}
+    }{ \l_stex_key_pts_tl }
   }
-  \stex_if_smsmode:F {
-    \str_set_eq:NN \thismoduleuri \l_stex_current_module_str
-    \tl_set_eq:NN \thismodulename \l_stex_key_name_str
-    \tl_set_eq:NN \thistitle \l_stex_key_title_tl
-    \stex_style_apply:
-    \addtocounter{pts}{\l_stex_key_pts_tl}
-    \addtocounter{min}{\l_stex_key_min_tl}
-    \_stex_do_id:
-    \__problems_record_problem:
-  }
-  \stex_reactivate_macro:N \solution
-  \stex_reactivate_macro:N \mcb
-  \stex_reactivate_macro:N \fillinsol
-  \stex_smsmode_do:
+
+  \tl_set_eq:NN \thistitle \l_stex_key_title_tl
+
+  \bool_set_true:N \l__problems_in_problem_bool
+  \tl_set_eq:NN \l__problems_pts_tl \l_stex_key_pts_tl
+  \tl_set_eq:NN \l__problems_min_tl \l_stex_key_min_tl
+  \tl_if_eq:NnTF \l__problems_pts_tl {0}
+    {\bool_set_false:N \l__problems_has_pts_bool}
+    {\bool_set_true:N \l__problems_has_pts_bool}
+  \tl_if_eq:NnTF \l__problems_min_tl {0}
+    {\bool_set_false:N \l__problems_has_min_bool}
+    {\bool_set_true:N \l__problems_has_min_bool}
+  \int_gzero:N \g__problems_subproblem_int
+
+  \stex_style_apply:
+  \_stex_do_id:
+  \__problems_activate_macros:
 }{
-  \stex_close_module:
-  \stex_if_smsmode:F \stex_style_apply:
+  \addtocounter{pts}{\l__problems_pts_tl}
+  \addtocounter{min}{\l__problems_min_tl}
+  \__problems_record_problem:
+  \stex_style_apply:
   \stex_if_do_html:T{ \end{stex_annotate_env} }
 }{
   \par\noindent\problemheader
   \bool_if:NT \c__problems_pts_bool {
-    \marginpar{\l_stex_key_pts_tl{}~\problem at kw@points\smallskip}
+    \tl_if_eq:NnF \l__problems_pts_tl {0}{
+      \marginpar{\l__problems_pts_tl{}~\problem at kw@pts\smallskip}
+    }
   }
   \bool_if:NT \c__problems_min_bool {
-    \marginpar{\l_stex_key_min_tl{}~\problem at kw@minutes\smallskip}
+    \tl_if_eq:NnF \l__problems_min_tl {0} {
+      \marginpar{\l__problems_min_tl{}~\problem at kw@minutes\smallskip}
+    }
   }
-  \\
+  \par
   \stex_ignore_spaces_and_pars:
 }{
   \par\bigskip
 }{s}
-\stex_sms_allow_env:n{sproblem}
 
 \tl_set:Nn \problemheader {
   \textbf{\sproblemautorefname{~}\thesproblem
@@ -155,11 +188,73 @@
 
 \cs_new_protected:Nn \__problems_record_problem: {
   \exp_args:NNe \iow_now:Nn \@auxout {
-    \problem at restore {\thesproblem}{\l_stex_key_pts_tl}{\l_stex_key_min_tl}
+    \problem at restore {\thesproblem}{\l__problems_pts_tl}{\l__problems_min_tl}
   }
 }
 
 \cs_new_protected:Npn \problem at restore #1 #2 #3 {}
+\int_new:N \g__problems_subproblem_int
+
+\stex_new_stylable_env:nnnnnnn {subproblem} {O{}}{
+  \stex_keys_set:nn{problem}{#1}
+  \bool_if:NF \l__problems_in_problem_bool{
+    \ifstexhtml\else
+      \par{\bfseries WARNING~subproblem~to~be~used~in~some~problem}\par
+    \fi
+    \__problems_activate_macros:
+    \bool_set_true:N \l__problems_in_problem_bool
+    \tl_set:Nn \l__problems_pts_tl{0}
+    \tl_set:Nn \l__problems_min_tl{0}
+  }
+  \str_if_empty:NT \l_stex_key_name_str {
+    \stex_file_split_off_lang:NN \l__problems_path_seq \g_stex_current_file
+    \seq_get_right:NN \l__problems_path_seq \l_stex_key_name_str
+  }
+  \stex_if_do_html:T {
+    \str_if_empty:NT \l_stex_key_name_str {
+      \stex_file_split_off_lang:NN \l__problems_path_seq \g_stex_current_file
+      \seq_get_right:NN \l__problems_path_seq \l_stex_key_name_str
+    }
+    \exp_args:Nne \begin{stex_annotate_env} {
+      shtml:subproblem={\l_stex_key_name_str},
+      shtml:language={ \l_stex_current_language_str},
+      shtml:autogradable={\bool_if:NTF \l_stex_key_autogradable_bool {true}{false}}
+    }
+    \stex_annotate_invisible:n{}
+    \tl_if_empty:NF \l_stex_key_title_tl {
+      \exp_args:No \stexdoctitle \l_stex_key_title_tl
+    }
+  }
+  \int_gincr:N \g__problems_subproblem_int
+  \bool_if:NF \l__problems_has_pts_bool {
+    \tl_gset:Nx \l__problems_pts_tl {\int_eval:n {\l__problems_pts_tl + \l_stex_key_pts_tl}}
+  }
+  \bool_if:NF \l__problems_has_min_bool {
+    \tl_gset:Nx \l__problems_min_tl {\int_eval:n {\l__problems_min_tl + \l_stex_key_min_tl}}
+  }
+  \stex_if_smsmode:F \stex_style_apply:
+}{
+  \stex_if_smsmode:F \stex_style_apply:
+  \stex_if_do_html:T{ \end{stex_annotate_env} }
+}{
+  \begin{list}{}{
+    \setlength\topsep{0pt}
+    \setlength\parsep{0pt}
+    \setlength\rightmargin{0pt}
+  }\item[\int_use:N \g__problems_subproblem_int .]
+  \bool_if:NT \c__problems_pts_bool {
+    \bool_if:NF \l__problems_has_pts_bool {
+      \marginpar{\smallskip\l_stex_key_pts_tl{}~\problem at kw@pts}
+    }
+  }
+  \bool_if:NT \c__problems_min_bool {
+    \bool_if:NF \l__problems_has_min_bool{
+      \marginpar{\smallskip\l_stex_key_min_tl{}~\problem at kw@minutes}
+    }
+  }
+}{
+  \end{list}
+}{}
 \stex_keys_define:nnnn{ includeproblem }{
   \str_clear:N \l_stex_key_mhrepos_str
 }{
@@ -176,10 +271,17 @@
 }
 
 \int_new:N \g_problem_id_counter
+\dim_new:N \l_stex_key_testspace_dim
+\stex_keys_define:nnnn{ solution }{
+  \str_clear:N \l_stex_key_answerclass_str
+  \dim_zero:N \l_stex_key_testspace_dim
+}{
+  testspace   .dim_set:N = \l_stex_key_testspace_dim,
+  answerclass .str_set:N = \l_stex_key_answerclass_str
+}{id,title,style}
 
 \cs_new_protected:Nn \__problems_solution_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ solution }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -188,7 +290,8 @@
   }
   \stex_if_do_html:T{
     \begin{stex_annotate_env}{
-      shtml:solution=\l_stex_key_id_str
+      shtml:solution=\l_stex_key_id_str,
+      shtml:answerclass={\l_stex_key_answerclass_str}
     }
   }
   \stex_style_apply:
@@ -201,6 +304,8 @@
     \ifsolutions
       \__problems_solution_start:n{#1}
     \else
+      \stex_keys_set:nn{ solution }{#1}
+      \testspace{\l_stex_key_testspace_dim}
       \setbox\l_tmpa_box\vbox\bgroup
     \fi
   }
@@ -219,12 +324,14 @@
     \fi
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Solution\str_if_empty:NF \l_stex_key_title_tl{
-    {~}\l_stex_key_title_tl
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@solution\tl_if_empty:NF \l_stex_key_title_tl{
+    {~}\l_stex_key_title_tl \str_if_empty:NF \l_stex_key_answerclass_str {
+      (Answer Class: \l_stex_key_answerclass_str)
+    }
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
 
 \stex_deactivate_macro:Nn \solution {sproblem~environments}
@@ -234,9 +341,11 @@
 \cs_new_protected:Npn \stopsolutions{
   \global\solutionsfalse
 }
+
+\stex_keys_define:nnnn{ problemenv }{}{}{id,title,style}
+
 \cs_new_protected:Nn \__problems_hint_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -276,16 +385,16 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Hint\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@hint\tl_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \hint {sproblem~environments}
 \cs_new_protected:Nn \__problems_exnote_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -325,17 +434,19 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Note\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@note\tl_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \exnote {sproblem~environments}
 %% \begin{environment}{gnote}
+\int_new:N \l__problems_anscls_int
+
 \cs_new_protected:Nn \__problems_gnote_start:n {
-  \str_set:Nn \l_stex_key_title_tl {#1}
-  \str_set:Nn \l_stex_key_id_str {#1}
+  \stex_keys_set:nn{ problemenv }{#1}
   \str_if_empty:NT \l_stex_key_id_str {
     \int_gincr:N \g_problem_id_counter
     \str_set:Nx \l_stex_key_id_str {
@@ -342,6 +453,7 @@
       GNOTE_\int_use:N \g_problem_id_counter
     }
   }
+
   \stex_if_do_html:T{
     \begin{stex_annotate_env}{
       shtml:problemgnote=\l_stex_key_id_str
@@ -360,6 +472,7 @@
       \setbox\l_tmpa_box\vbox\bgroup
     }
   }
+  \stex_reactivate_macro:N \anscls
 }{
   \stex_if_do_html:TF{
     \stex_style_apply:
@@ -375,37 +488,104 @@
     }
   }
 }{
-  \par\smallskip\hrule\smallskip
-  \noindent\emph{Grading\str_if_empty:NF \l_stex_key_title_tl{
+  \par\smallskip\rule[.3em]{\linewidth}{0.4pt}\newline\smallskip
+  \noindent\emph{\problem at kw@grading\str_if_empty:NF \l_stex_key_title_tl{
     {~}\l_stex_key_title_tl
   } :~}
 }{
-  \par\smallskip\hrule
+  \par\rule[.3em]{\linewidth}{0.4pt}\newline
 }{}
+\stex_deactivate_macro:Nn \gnote {sproblem~environments}
+
+\stex_keys_define:nnnn{ anscls }{
+  \str_clear:N \l_stex_key_pts_str
+  \tl_clear:N \l_stex_key_feedback_tl
+}{
+  pts     .str_set:N = \l_stex_key_pts_str,
+  feedback .tl_set:N = \l_stex_key_feedback_str,
+  update  .code:n    = {}
+}{id}
+\newcommand \anscls [2][] {
+  \stex_keys_set:nn{ anscls }{#1}
+  \str_if_empty:NT \l_stex_key_id_str {
+    \int_incr:N \l__problems_anscls_int
+    \str_set:Nx \l_stex_key_id_str {
+      AC\int_use:N \l__problems_anscls_int
+    }
+  }
+  \begin{list}{}{
+    \setlength\topsep{0pt}
+    \setlength\parsep{0pt}
+    \setlength\rightmargin{0pt}
+  }\item[\l_stex_key_id_str]
+    \stex_if_do_html:TF{
+      \stex_annotate:nn{
+        shtml:answerclass={\l_stex_key_id_str}
+        \str_if_empty:NF \l_stex_key_pts_str{
+          ,shtml:answerclass-pts={\l_stex_key_pts_str}
+        }
+        \str_if_empty:NF \l_stex_key_feedback_str{
+          ,shtml:answerclass-feedback={\l_stex_key_feedback_str}
+        }
+      }{
+        #2
+      }
+    }{#2}
+    \str_if_empty:NF \l_stex_key_pts_str {\par
+      ~ \problem at kw@points:~\l_stex_key_pts_str
+    }
+    \str_if_empty:NF \l_stex_key_feedback_str {\par
+      ~ \problem at kw@feedback :~\l_stex_key_feedback_str
+    }
+  \end{list}
+}
+\stex_deactivate_macro:Nn \anscls {gnote~environments}
 \def\pts#1{
   \bool_if:NT \c__problems_pts_bool {
-    \marginpar{#1~\problem at kw@points}
-  }
+    \stex_annotate:nn{shtml:problempoints={#1}}{\marginpar{#1~\problem at kw@pts}}
+  }\hbox_unpack:N\c_empty_box
 }
 \def\min#1{
   \bool_if:NT \c__problems_min_bool {
-    \marginpar{#1~\problem at kw@minutes}
-  }
+    \stex_annotate:nn{shtml:problemminutes={}}{\marginpar{#1~\problem at kw@minutes}}
+  }\hbox_unpack:N\c_empty_box
 }
-\newenvironment{mcb}{\par
+\stex_new_stylable_env:nnnnnnn{mcb}{O{}}{
+  \stex_keys_set:nn{style}{#1}
   \stex_if_do_html:T{
-    \begin{stex_annotate_env}{shtml:multiple-choice-block={}}
+    \tl_set:Nn\problem_mcc_box_tl{}
+    \exp_args:Nne \begin{stex_annotate_env}{
+      shtml:multiple-choice-block={}
+      \clist_if_empty:NF \l_stex_key_style_clist {,
+        shtml:styles={\l_stex_key_style_clist}
+      }
+    }
   }
   \stex_deactivate_macro:Nn \mcb {sproblem~environments}
+  \stex_deactivate_macro:Nn \scb {sproblem~environments}
   \stex_deactivate_macro:Nn \solution {sproblem~environments}
+  \stex_deactivate_macro:Nn \hint {sproblem~environments}
+  \stex_deactivate_macro:Nn \exnote {sproblem~environments}
+  \stex_deactivate_macro:Nn \gnote {sproblem~environments}
   \stex_reactivate_macro:N \mcc
-  \begin{enumerate}
+  \cs_set:Nn \__problems_mccline:n{
+    \begin{list}{}{
+      \setlength\topsep{0pt}
+      \setlength\parsep{0pt}
+      \setlength\rightmargin{0pt}
+    }\item[\problem_mcc_box_tl] ##1 \end{list}
+  }
+  \stex_style_apply:
 }{
-  \end{enumerate}
+  \stex_style_apply:
   \stex_if_do_html:T{
     \end{stex_annotate_env}
   }
-}
+}{\par}{}{}
+\stexstylemcb[inline]{
+  \cs_set:Nn \__problems_mccline:n{\problem_mcc_box_tl{~} #1}
+}{}
+
 \stex_deactivate_macro:Nn \mcb {sproblem~environments}
 \cs_new_protected:Nn \__problems_do_yes_param:Nn {
   \exp_args:Nx \str_if_eq:nnTF { \str_lowercase:n{ #2 } }{ yes }{
@@ -421,9 +601,7 @@
   \tl_clear:N \l_stex_key_Ftext_tl
 }{
   feedback  .tl_set:N     = \l_stex_key_feedback_tl ,
-  T         .default:n    = { false } ,
-  T         .bool_set:N   = \l_stex_key_T_bool ,
-  F         .default:n    = { false } ,
+  T         .code:n    = {\bool_set_true:N \l_stex_key_T_bool} ,
   F         .code:n       = {\bool_set_false:N \l_stex_key_T_bool} ,
   Ttext     .tl_set:N     = \l_stex_key_Ttext_tl ,
   Ftext     .tl_set:N     = \l_stex_key_Ftext_tl ,
@@ -435,8 +613,8 @@
   }
 }
 \newcommand\mcc[2][]{
-  \stex_keys_set:nn{mcc}{#1}\par
-  \tl_set:Nn \l_tmpb_tl {~--~
+  \stex_keys_set:nn{mcc}{#1}
+  \tl_set:Nn \l_tmpa_tl{
     \bool_if:NTF \l_stex_key_T_bool {
       \tl_if_empty:NTF \l_stex_key_Ttext_tl \problem at kw@correct \l_stex_key_Ttext_tl
     }{
@@ -446,42 +624,181 @@
       \\\emph{\l_stex_key_feedback_tl}
     }
   }
-  \tl_set:Nn \l_tmpa_tl {
-     #2
+
+  \__problems_mccline:n{
     \stex_if_do_html:TF{
-      \stex_annotate:nn{shtml:mcc-solution={}}{\l_tmpb_tl}
+      \stex_annotate:nn{shtml:mcc={
+        \bool_if:NTF \l_stex_key_T_bool {true}{false}
+      }}{
+        #2\stex_annotate:nn{shtml:mcc-solution={}}{\l_tmpa_tl}
+      }
     }{
-      \ifsolutions\l_tmpb_tl\fi
+        #2\ifsolutions\footnote{\l_tmpa_tl}\fi
     }
   }
-  \item[\problem_mcc_box_tl]{}~
+}
+\stex_deactivate_macro:Nn \mcc {mcb~environments}
+
+\tl_set:Nn\problem_scc_box_tl{$\bigcirc$}
+
+\stex_new_stylable_env:nnnnnnn{scb}{O{}}{
+  \stex_keys_set:nn{style}{#1}
+  \stex_if_do_html:T{
+    \exp_args:Nne\begin{stex_annotate_env}{
+      shtml:single-choice-block={}
+      \clist_if_empty:NF \l_stex_key_style_clist {,
+        shtml:styles={\l_stex_key_style_clist}
+      }
+    }
+    \tl_set:Nn\problem_scc_box_tl{}
+  }
+  \stex_deactivate_macro:Nn \mcb {sproblem~environments}
+  \stex_deactivate_macro:Nn \scb {sproblem~environments}
+  \stex_deactivate_macro:Nn \solution {sproblem~environments}
+  \stex_deactivate_macro:Nn \hint {sproblem~environments}
+  \stex_deactivate_macro:Nn \exnote {sproblem~environments}
+  \stex_deactivate_macro:Nn \gnote {sproblem~environments}
+  \stex_reactivate_macro:N \scc
+  \cs_set:Nn \__problems_sccline:n{
+    \begin{list}{}{
+      \setlength\topsep{0pt}
+      \setlength\parsep{0pt}
+      \setlength\rightmargin{0pt}
+    }\item[\problem_scc_box_tl] ##1 \end{list}
+  }
+  \stex_style_apply:
+}{
+  \stex_style_apply:
+  \stex_if_do_html:T{
+    \end{stex_annotate_env}
+  }
+}{\par}{}{}
+\stexstylescb[inline]{
+  \cs_set:Nn \__problems_sccline:n{\problem_scc_box_tl{~} #1}
+}{}
+
+\stex_deactivate_macro:Nn \scb {sproblem~environments}
+
+\newcommand\scc[2][]{
+  \stex_keys_set:nn{mcc}{#1}
+  \tl_set:Nn \l_tmpa_tl{
+    \bool_if:NTF \l_stex_key_T_bool {
+      \tl_if_empty:NTF \l_stex_key_Ttext_tl \problem at kw@correct \l_stex_key_Ttext_tl
+    }{
+      \tl_if_empty:NTF \l_stex_key_Ftext_tl \problem at kw@wrong \l_stex_key_Ftext_tl
+    }
+    \tl_if_empty:NF \l_stex_key_feedback_tl {
+      \\\emph{\l_stex_key_feedback_tl}
+    }
+  }
+
+  \__problems_sccline:n{
+    \stex_if_do_html:TF{
+      \stex_annotate:nn{shtml:scc={
+        \bool_if:NTF \l_stex_key_T_bool {true}{false}
+      }}{
+        #2\stex_annotate:nn{shtml:scc-solution={}}{\l_tmpa_tl}
+      }
+    }{
+        #2\ifsolutions\footnote{\l_tmpa_tl}\fi
+    }
+  }
+}
+\stex_deactivate_macro:Nn \scc {scb~environments}
+
+\newcommand\yesTnoF{
+  \begin{scb}[style=inline]
+    \scc[T]{yes}~\scc[F]{no}
+  \end{scb}
+}
+\newcommand\yesFnoT{
+  \begin{scb}[style=inline]
+    \scc[F]{yes}~\scc[T]{no}
+  \end{scb}
+}
+\newcommand\trueTfalseF{
+  \begin{scb}[style=inline]
+    \scc[T]{true}~\scc[F]{false}
+  \end{scb}
+}
+\newcommand\trueFfalseT{
+  \begin{scb}[style=inline]
+    \scc[F]{true}~\scc[T]{false}
+  \end{scb}
+}
+\stex_keys_define:nnnn{fillinsol}{
+  \tl_clear:N \l__problems_fillin_solution_tl
+  \dim_zero:N \l_stex_key_testspace_dim
+}{
+  testspace   .dim_set:N = \l_stex_key_testspace_dim,
+  exact    .code:n = {\__problems_parse_fillin_arg:nnnn{exact}#1 },
+  numrange .code:n = {\__problems_parse_fillin_arg:nnnn{numrange}#1 },
+  regex    .code:n = {\__problems_parse_fillin_arg:nnnn{regex}#1 }
+}{}
+
+\cs_new:Nn \__problems_parse_fillin_arg:nnnn {
   \stex_if_do_html:TF{
-    \stex_annotate:nn{shtml:mcc={
-      \bool_if:NTF \l_stex_key_T_bool {true}{false}
-    }}{\l_tmpa_tl}
-  }{\l_tmpa_tl}
+    \tl_set:Nn \l_tmpa_tl{#3}
+    \tl_set:Nn \l_tmpb_tl{T}
+    \stex_annotate_invisible:nn{
+      shtml:fillin-case={#1},
+      shtml:fillin-case-value={#2},
+      shtml:fillin-case-verdict={
+        \tl_if_eq:NNTF\l_tmpa_tl\l_tmpb_tl{true}{false}
+      },
+    }{#4}
+  }{
+    \tl_put_right:Nn \l__problems_fillin_solution_tl {
+      #1{~} & #2{~} & #3{~} & #4{~} \\
+    }
+  }
 }
-\stex_deactivate_macro:Nn \mcc {mcb~environments}
+
 \newcommand\fillinsol[2][]{
   \quad
+  \mode_if_math:TF{
+    \hbox{\__problems_fillinsol:nn{#1}{$#2$}}
+  }{
+    \__problems_fillinsol:nn{#1}{#2}
+  }
+  \quad
+}
+\cs_new_protected:Nn \__problems_fillinsol:nn {
+  \stex_keys_set:nn{fillinsol}{#1}
   \stex_if_do_html:TF{
-    \stex_annotate:nn{shtml:fillinsol={}}{ \_stex_annotate_force_break:n{#2} }
+    \stex_annotate:nn{shtml:fillinsol={}}{ \_stex_annotate_force_break:n{
+      #2
+      \l__problems_fillin_solution_tl
+    } }
   }{
     \ifsolutions
       \textcolor{red}{\fbox{#2}}
-    \else
-      \fbox{
-        \tl_if_empty:nTF{#1}{
-          \phantom{\huge{#2}}
-        }{
-          \hspace{#1}
+      \tl_if_empty:NF \l__problems_fillin_solution_tl {
+        \footnote{
+          \halign{ ##\hfil & ##\hfil &##\hfil&##\hfil \cr
+            \textbf{type }&\textbf{case }&\textbf{verdict }&\textbf{feedback }\cr
+            \l__problems_fillin_solution_tl
+          }
         }
       }
+    \else
+      \fbox{\dim_compare:nNnTF\l_stex_key_testspace_dim={0pt}{
+        \phantom{\huge{#2}}
+      }{
+        \hspace{\l_stex_key_testspace_dim}
+      }}
     \fi
   }
-  \quad
 }
 \stex_deactivate_macro:Nn \fillinsol {sproblem~environments}
+\newcommand\testemptypage[1][]{%
+\bool_if:NT \c__problems_test_bool {\ \vfill\begin{center}\hwexam at kw@testemptypage\end{center}\eject}
+}
+\newcommand\testspace[1]{\bool_if:NT \c__problems_test_bool {\vspace*{#1}}}
+\newcommand\testsmallspace{\testspace{1cm}}
+\newcommand\testmedspace{\testspace{2cm}}
+\newcommand\testbigspace{\testspace{3cm}}
+\newcommand\testnewpage{\bool_if:NT \c__problems_test_bool {\newpage}}
 \endinput
 %%
 %% End of file `problem.sty'.

Modified: trunk/Master/texmf-dist/tex/latex/stex/stex.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/stex.cls	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/stex.cls	2023-10-16 19:59:04 UTC (rev 68569)
@@ -9,7 +9,10 @@
 %%%%%%%%%%%%%   stex.dtx   %%%%%%%%%%%%%
 
 \RequirePackage{expl3,l3keys2e}
-\ProvidesExplClass{stex}{2023/03/19}{3.3.0}{sTeX document class}
+\ProvidesExplClass{stex}{2023/10/13}{3.4.0}{sTeX document class}
+\IfFileExists{stex-expl-compat.sty}{
+  \usepackage{stex-expl-compat}
+}{}
 
 \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{stex}}
 \ProcessOptions

Modified: trunk/Master/texmf-dist/tex/latex/stex/stex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/stex.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/stex.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -7,11 +7,14 @@
 %% stex.dtx  (with options: `package')
 %% 
 \RequirePackage{expl3,l3keys2e,ltxcmds}
-\ProvidesExplPackage{stex}{2023/03/19}{3.3.0}{sTeX package}
+\ProvidesExplPackage{stex}{2023/10/13}{3.4.0}{sTeX package}
+\IfFileExists{stex-expl-compat.sty}{
+  \usepackage{stex-expl-compat}
+}{}
 \RequirePackage{stex-logo} % externalized for backwards-compatibility reasons
 \RequirePackage{standalone}
 
-\message{^^J*~This~is~sTeX~version~3.3.0~*^^J}
+\message{^^J*~This~is~sTeX~version~3.4.0~*^^J}
 \keys_define:nn { stex / package } {
   debug      .str_set_x:N  = \c_stex_debug_clist ,
   lang       .clist_set:N  = \c_stex_languages_clist ,
@@ -20,6 +23,7 @@
   writesms   .bool_set:N   = \c_stex_persist_write_mode_bool ,
   checkterms .bool_set:N   = \c_stex_check_terms_bool ,
   image      .bool_set:N   = \c_tikzinput_image_bool,
+  nofrontmatter .bool_set:N = \c_stex_no_frontmatter_bool,
   unknown    .code:n       = {}
 }
 \exp_args:NNo \clist_set:Nn \c_stex_debug_clist \c_stex_debug_clist
@@ -84,11 +88,11 @@
 }
 
 \exp_args:NNo \clist_if_in:NnTF \c_stex_debug_clist {\tl_to_str:n{all}} {
-    \msg_redirect_module:nnn{ stex }{ none }{ term }
+    \msg_redirect_module:nnn{ stex }{ none }{ warning }
     \stex_debug:nn{all}{Logging~everything!}
 }{
   \clist_map_inline:Nn \c_stex_debug_clist {
-    \msg_redirect_name:nnn{ stex }{ debug / #1 }{ term }
+    \msg_redirect_name:nnn{ stex }{ debug / #1 }{ warning }
     \stex_debug:nn{#1}{Logging~#1}
   }
 }
@@ -329,8 +333,8 @@
 
 \cs_new_protected:Nn \stex_deactivate_macro:Nn {
   \tl_set_eq:cN{\tl_to_str:n{#1}~-~orig}#1
-  \tl_set:Nn#1{
-    \msg_error:nnnn{stex}{error/deactivated-macro}{\detokenize{#1}}{#2}
+  \cs_set_protected:Npn#1{
+    \exp_args:Nnno\msg_error:nnnn{stex}{error/deactivated-macro}{#1}{#2}
   }
 }
 \cs_new_protected:Nn \stex_reactivate_macro:N {
@@ -1417,46 +1421,48 @@
 }
 
 \AtBeginDocument{
-  \cs_if_exist:NTF\frontmatter{
-    \let\__stex_doc_orig_frontmatter\frontmatter
-    \let\frontmatter\relax
-  }{
-    \tl_set:Nn\__stex_doc_orig_frontmatter{
-      \clearpage
-      %\@mainmatterfalse
-      \pagenumbering{roman}
+  \bool_if:NF \c_stex_no_frontmatter_bool {
+    \cs_if_exist:NTF\frontmatter{
+      \let\__stex_doc_orig_frontmatter\frontmatter
+      \let\frontmatter\relax
+    }{
+      \tl_set:Nn\__stex_doc_orig_frontmatter{
+        \clearpage
+        %\@mainmatterfalse
+        \pagenumbering{roman}
+      }
     }
-  }
-  \cs_if_exist:NTF\backmatter{
-    \let\__stex_doc_orig_backmatter\backmatter
-    \let\backmatter\relax
-  }{
-    \tl_set:Nn\__stex_doc_orig_backmatter{
-      \clearpage
-      %\@mainmatterfalse
-      \pagenumbering{roman}
+    \cs_if_exist:NTF\backmatter{
+      \let\__stex_doc_orig_backmatter\backmatter
+      \let\backmatter\relax
+    }{
+      \tl_set:Nn\__stex_doc_orig_backmatter{
+        \clearpage
+        %\@mainmatterfalse
+        \pagenumbering{roman}
+      }
     }
-  }
-  \newenvironment{frontmatter}{
-    \__stex_doc_orig_frontmatter
-  }{
-    \cs_if_exist:NTF\mainmatter{
-      \mainmatter
+    \newenvironment{frontmatter}{
+      \__stex_doc_orig_frontmatter
     }{
-      \clearpage
-      %\@mainmattertrue
-      \pagenumbering{arabic}
+      \cs_if_exist:NTF\mainmatter{
+        \mainmatter
+      }{
+        \clearpage
+        %\@mainmattertrue
+        \pagenumbering{arabic}
+      }
     }
-  }
-  \newenvironment{backmatter}{
-    \__stex_doc_orig_backmatter
-  }{
-    \cs_if_exist:NTF\mainmatter{
-      \mainmatter
+    \newenvironment{backmatter}{
+      \__stex_doc_orig_backmatter
     }{
-      \clearpage
-      %\@mainmattertrue
-      \pagenumbering{arabic}
+      \cs_if_exist:NTF\mainmatter{
+        \mainmatter
+      }{
+        \clearpage
+        %\@mainmattertrue
+        \pagenumbering{arabic}
+      }
     }
   }
 }
@@ -1777,7 +1783,10 @@
 }
 
 \cs_new_protected:Nn \stex_ref_new_sym_target:n {
-  \exp_args:Ne \label{\tl_to_str:n{sref at sym@ #1}}
+  \cs_if_exist:NT \hypertarget{
+    \exp_args:Ne \hypertarget{\tl_to_str:n{sref at sym@ #1}}{}
+    \str_gset:cx{\tl_to_str:n{r at sref@sym@ #1}}{\tl_to_str:n{sref at sym@ #1}}
+  }
 }
 
 \cs_new_protected:Nn \stex_ref_new_sym_target:nn {
@@ -1794,8 +1803,8 @@
 }
 
 \cs_new_protected:Npn \__stex_refs_do_internal_link:nn #1 {
-  \cs_if_exist:NTF \hyperref {
-    \hyperref[{#1}]
+  \cs_if_exist:NTF \hyperlink {
+    \hyperlink{#1}
   }\use:n
 }
 
@@ -1804,7 +1813,7 @@
 }
 
 \cs_new_protected:Npn \__stex_refs_sym_aux:nn #1 {
-  \cs_if_exist:cTF{r at sref@sym@\tl_to_str:n{#1}}{
+  \cs_if_exist:cTF{\tl_to_str:n{r at sref@sym@#1}}{
     \exp_args:Ne \__stex_refs_do_internal_link:nn{\tl_to_str:n{sref at sym@#1}}
   }{
     \str_if_exist:cTF{g_stex_sref_sym_#1_label}{
@@ -1877,9 +1886,9 @@
     }
   }{
     \IfFileExists{ \stex_file_use:N \c_stex_mathhub_file / #1 / source / #2 }{
-      \par\stex_annotate_invisible:nn{shtml:inputref={
+      \ifvmode\noindent\fi\stex_annotate_invisible:nn{shtml:inputref={
         \l_tmpa_str / #2
-      }}{~}
+      }}{}
     }{
       \input{ \stex_file_use:N \c_stex_mathhub_file / #1 / source / #2 }
     }
@@ -1950,7 +1959,9 @@
   \bool_while_do:nn { ! \seq_if_empty_p:N \l__stex_inputs_id_seq }{
     \str_set:Nx \l__stex_inputs_path_str {\stex_file_use:N \l__stex_inputs_path_seq / meta-inf / lib / #1.#2}
     \IfFileExists{ \l__stex_inputs_path_str }{
-      \seq_put_right:No \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str
+      \exp_args:NNo \seq_if_in:NnF \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str {
+        \seq_put_right:No \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str
+      }
     }{}
     \seq_pop_left:NN \l__stex_inputs_id_seq \l__stex_inputs_path_str
     \seq_put_right:No \l__stex_inputs_path_seq \l__stex_inputs_path_str
@@ -1958,7 +1969,9 @@
 
   \str_set:Nx \l__stex_inputs_path_str {\stex_file_use:N \l__stex_inputs_path_seq / lib / #1.#2}
   \IfFileExists{ \l__stex_inputs_path_str }{
-    \seq_put_right:No \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str
+    \exp_args:NNo \seq_if_in:NnF \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str {
+      \seq_put_right:No \l__stex_inputs_libinput_files_seq \l__stex_inputs_path_str
+    }
   }{}
 }
 
@@ -2036,7 +2049,7 @@
   }
   \newcommand\cmhtikzinput[2][]{\begin{center}\mhtikzinput[#1]{#2}\end{center}}
 }
-\cs_new_protected:Nn \__stex_inputs_usetikzlibrary:nn {
+\cs_new_protected:Nn \__stex_inputs_usetikzlibrary_i:nn {
   \pgfkeys at spdef\pgf at temp{#1}
   \expandafter\ifx\csname tikz at library@\pgf at temp @loaded\endcsname\relax%
   \expandafter\global\expandafter\let\csname tikz at library@\pgf at temp @loaded\endcsname=\pgfutil at empty%
@@ -2052,17 +2065,25 @@
   \catcode`\$=\csname tikz at library@#1 at dollarcode\endcsname
 }
 
-\cs_new_protected:Npn \libusetikzlibrary #1 {
-  \cs_if_exist:NF \usetikzlibrary {
-    \msg_error:nnx{stex}{error/notikz}{\tl_to_str:n{\libusetikzlibrary}}
-  }
+\cs_new_protected:Nn \__stex_inputs_usetikzlibrary:n{
   \__stex_inputs_up_archive:nn{tikzlibrary#1}{code.tex}
   \int_compare:nNnTF {\seq_count:N \l__stex_inputs_libinput_files_seq} = 1 {
-    \exp_args:Nne \__stex_inputs_usetikzlibrary:nn{#1}{ \seq_item:Nn \l__stex_inputs_libinput_files_seq 1 }
+    \exp_args:Nne \__stex_inputs_usetikzlibrary_i:nn{#1}{ \seq_item:Nn \l__stex_inputs_libinput_files_seq 1 }
   }{
     \stex_fatal_error:nnn{error/nofile}{\libusetikzlibrary}{tikzlibrary#1.code.tex}
   }
 }
+
+\newcommand \libusetikzlibrary [2][] {
+  \cs_if_exist:NF \usetikzlibrary {
+    \msg_error:nnx{stex}{error/notikz}{\tl_to_str:n{\libusetikzlibrary}}
+  }
+  \tl_if_empty:nTF{#1}{
+    \__stex_inputs_usetikzlibrary:n{#2}
+  }{
+    \stex_in_archive:nn{#1}{\__stex_inputs_usetikzlibrary:n{#2}}
+  }
+}
 \tl_new:N \g__stex_smsmode_allowed_tl
 \tl_new:N \g__stex_smsmode_allowed_escape_tl
 \seq_new:N \g__stex_smsmode_allowedenvs_seq
@@ -3482,11 +3503,14 @@
   \str_clear:N \l__stex_morphisms_name_str
   \str_clear:N \l__stex_morphisms_newname_str
   \tl_clear:N \l__stex_morphisms_ass_tl
+  \stex_debug:nn{morphisms}{Parsing~#1}
   \exp_args:NNe \seq_set_split:Nnn \l__stex_morphisms_seq {\tl_to_str:n{@}} {#1}
   \int_compare:nNnTF {\seq_count:N \l__stex_morphisms_seq} = 1 {
+    \stex_debug:nn{morphisms}{No~@}
     \seq_pop_left:NN \l__stex_morphisms_seq \l__stex_morphisms_next_tl
   }{
     \seq_pop_left:NN \l__stex_morphisms_seq \l__stex_morphisms_name_str
+    \stex_debug:nn{morphisms}{Name:~\l__stex_morphisms_name_str}
     \exp_args:NNo \str_set:Nn \l__stex_morphisms_name_str \l__stex_morphisms_name_str
     \tl_set:Nx \l__stex_morphisms_next_tl {\seq_use:Nn \l__stex_morphisms_seq @}
   }
@@ -3560,7 +3584,7 @@
 }{}
 \stex_deactivate_macro:Nn \interpretmod {module~environments}
 \stex_every_module:n {
-  \stex_reactivate_macro:N \iterpretmod
+  \stex_reactivate_macro:N \interpretmod
 }
 \stex_sms_allow_escape:N\interpretmod
 
@@ -3634,6 +3658,7 @@
   \tl_clear:N \l_stex_key_type_tl
   \tl_clear:N \l_stex_key_def_tl
   \tl_clear:N \l_stex_key_return_tl
+  \str_clear:N \l_stex_key_wikidata_str
   \clist_clear:N \l_stex_key_argtypes_clist
 }{
   name      .str_set:N  = \l_stex_key_name_str ,
@@ -3640,6 +3665,7 @@
 
   return    .tl_set:N     = \l_stex_key_return_tl ,
   argtypes  .clist_set:N  = \l_stex_key_argtypes_clist ,
+  wikidata  .str_set:N    = \l_stex_key_wikidata_str ,
 
   type      .tl_set:N     = \l_stex_key_type_tl  ,
   def       .tl_set:N     = \l_stex_key_def_tl   ,
@@ -3712,6 +3738,9 @@
     \str_if_empty:NF \l_stex_macroname_str {,
       shtml:macroname={\l_stex_macroname_str}
     }
+    \str_if_empty:NF \l_stex_key_wikidata_str {,
+      shtml:wikidata={\l_stex_key_wikidata_str}
+    }
     \str_if_empty:NF \l_stex_key_assoc_str {,
       shtml:assoctype={\l_stex_key_assoc_str}
     }
@@ -4069,7 +4098,11 @@
   intent     .str_set:N    = \l_stex_key_intent_str ,
   argnames   .clist_set:N  = \l_stex_key_intent_args_clist ,
   unknown    .code:n       = {
-    \str_set_eq:NN \l_stex_key_variant_str \l_keys_key_str
+    \str_if_empty:NTF \l_keys_key_str {
+        \str_set:Nx \l_stex_key_variant_str {\l_keys_key_tl}
+    }{
+        \str_set_eq:NN \l_stex_key_variant_str \l_keys_key_str
+    }
   }
 }{style}
 \stex_new_stylable_cmd:nnnn {notation} { s m O{} m} {
@@ -4368,10 +4401,21 @@
 }
 
 \cs_new_protected:Nn \_stex_notation_set_default:n{
-  \stex_module_add_notation:eoeoo{#1}{}
-    {\int_use:N \l_stex_get_symbol_arity_int}
-    \l_stex_notation_macrocode_cs
-    \l_stex_key_op_tl
+  \stex_if_in_module:TF{
+    \stex_module_add_notation:eoeoo{#1}{}
+      {\int_use:N \l_stex_get_symbol_arity_int}
+      \l_stex_notation_macrocode_cs
+      \l_stex_key_op_tl
+  }{
+    \cs_set_eq:cN {l_stex_notation_
+      \l_stex_get_symbol_mod_str?\l_stex_get_symbol_name_str
+      __cs}\l_stex_notation_macrocode_cs
+    \tl_if_empty:NF \l_stex_key_op_tl {
+      \cs_set_eq:cN{l_stex_notation_
+      \l_stex_get_symbol_mod_str?\l_stex_get_symbol_name_str
+      _op__cs}\l_stex_key_op_tl
+    }
+  }
 }
 \stex_new_stylable_cmd:nnnn {varnotation} { s m O{} m} {
   \stex_keys_set:nn{notation}{#3}
@@ -6003,7 +6047,11 @@
 }{
   this    .tl_set:N = \l_stex_current_this_tl ,
   unknown .code:n   = {
-    \str_set_eq:NN \l__stex_structures_name_str \l_keys_key_str
+    \str_if_empty:NTF \l_keys_key_str {
+      \str_set:Nx \l__stex_structures_name_str {\l_keys_key_tl}
+    }{
+      \str_set_eq:NN \l__stex_structures_name_str \l_keys_key_str
+    }
   }
 }{}
 
@@ -6978,7 +7026,7 @@
 \NewDocumentCommand \premise {O{} m} {
   \tl_if_empty:nF {#1} {
     \stex_debug:nn{Here:}{Variable~#1}
-    \exp_args:NNx\exp_args:Nnx\vardef{v#1}{#1}
+    \exp_args:Nne\use:nn{\vardef}{{v#1}[name=#1]{#1}}
   }
   \stex_annotate:nn{shtml:premise={#1}}{#2}
 }
@@ -7305,7 +7353,7 @@
     \stex_keys_set:nn{spfsteps}{##2}
     \str_if_empty:NF \l_stex_key_name_str {
       \stex_debug:nn{Here:}{Variable~\l_stex_key_name_str}
-      \exp_args:NNx\exp_args:Nnx\vardef{v\l_stex_key_name_str}{\l_stex_key_name_str}
+      \exp_args:Nne\use:nn{\vardef}{{v\l_stex_key_name_str}[name=\l_stex_key_name_str]{\l_stex_key_name_str}}
     }
 
     \begin{spfstepenv}
@@ -7563,6 +7611,48 @@
 }
 \stex_deactivate_macro:Nn \mmtdef {mmtinterface~environments}
 \stex_sms_allow_escape:N \mmtdef
+\newcommand\precondition[2]{
+    \str_clear:N \l_stex_get_symbol_name_str
+    \stex_get_symbol:n{#2}
+    \str_if_empty:NTF \l_stex_get_symbol_name_str{
+        \errmessage{Unknown~symbol~#2}
+    }{
+  \str_case:nnTF {#1}{
+      {remember}{}
+      {understand}{}
+      {analyze}{}
+      {evaluate}{}
+      {apply}{}
+      {create}{}
+  }{
+   \stex_annotate_invisible:nn{
+   shtml:preconditionsymbol={\l_stex_get_symbol_mod_str ? \l_stex_get_symbol_name_str},
+   shtml:preconditiondimension={#1}
+   }{}
+  }{\errmessage{Unknown~cognitive~dimension~#1}}
+    }
+}
+\newcommand\objective[2]{
+    \str_clear:N \l_stex_get_symbol_name_str
+    \stex_get_symbol:n{#2}
+    \str_if_empty:NTF \l_stex_get_symbol_name_str{
+        \errmessage{Unknown~symbol~#2}
+    }{
+  \str_case:nnTF {#1}{
+{remember}{}
+{understand}{}
+{analyze}{}
+{evaluate}{}
+{apply}{}
+{create}{}
+  }{
+   \stex_annotate_invisible:nn{
+   shtml:objectivesymbol={\l_stex_get_symbol_mod_str ? \l_stex_get_symbol_name_str},
+   shtml:objectivedimension={#1}
+   }{}
+  }{\errmessage{Unknown~cognitive~dimension~#1}}
+    }
+}
 \seq_if_empty:NT \g_stex_current_file {
   \seq_gset_eq:NN \g_stex_current_file \c_stex_main_file
 }

Modified: trunk/Master/texmf-dist/tex/latex/stex/tikzinput.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/stex/tikzinput.sty	2023-10-16 19:58:47 UTC (rev 68568)
+++ trunk/Master/texmf-dist/tex/latex/stex/tikzinput.sty	2023-10-16 19:59:04 UTC (rev 68569)
@@ -9,7 +9,7 @@
 
 %%%%%%%%%%%%%   tikzinput.dtx   %%%%%%%%%%%%%
 
-\ProvidesExplPackage{tikzinput}{2023/03/19}{3.3.0}{tikzinput package}
+\ProvidesExplPackage{tikzinput}{2023/10/13}{3.4.0}{tikzinput package}
 \RequirePackage{l3keys2e}
 
 \keys_define:nn { tikzinput } {



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