Skip to content

Commit

Permalink
fix issue #90
Browse files Browse the repository at this point in the history
  • Loading branch information
cgnieder committed Jan 5, 2022
1 parent f002681 commit 26a628e
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 24 deletions.
6 changes: 4 additions & 2 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
Copyright 2017--2021 Clemens Niederberger
Copyright 2017--2022 Clemens Niederberger

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
Expand Down Expand Up @@ -181,7 +181,7 @@ HISTORY:
v0.20b 2021/02/02 - fix issue #78
v0.20c 2021/02/03 - fix issue #80
- add missing test in \xsim_if_exist:nnnTF
v0.21 2021/??/?? - make \__xsim_set_file_signature:nnn public
v0.21 2022/01/05 - make \__xsim_set_file_signature:nnn public
- make \l__xsim_file_path_and_name_tl, \l__xsim_file_name_tl
and \l__xsim_file_path_tl public
- introduce XSIMsetfilebeginX and XSIMsetfileendX
Expand All @@ -191,3 +191,5 @@ HISTORY:
- document option `blank/fill'
- add counter foreach type and collection that holds the
number of exercises of a type in a collection
- fix issue #90
- correct file hooks
2 changes: 1 addition & 1 deletion IDEAS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
Copyright 2017--2021 Clemens Niederberger
Copyright 2017--2022 Clemens Niederberger

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--------------------------------------------------------------------------
XSIM 2021/02/03 v0.20c
XSIM 2022/01/05 v0.21
XSIMVERB 2021/01/31 v0.3

eXercise Sheets IMproved
Expand All @@ -9,7 +9,7 @@ Clemens Niederberger
Web: https://github.com/cgnieder/xsim
E-Mail: contact@mychemistry.eu
--------------------------------------------------------------------------
Copyright 2017--2021 Clemens Niederberger
Copyright 2017--2022 Clemens Niederberger

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
Expand Down
2 changes: 1 addition & 1 deletion code/xsim.base.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
{ \msg_expandable_error:nnn {xsim} {attribute-not-set} {#1::#2} }
}
}

% #1: attribute
% #2: item
\prg_new_conditional:Npnn \xsim_attribute_if_set:nn #1#2 {p,T,F,TF}
Expand Down
7 changes: 5 additions & 2 deletions code/xsim.environments.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@
{
\xsim_verbose:n { Saving~ #3~ environment~ type~ `#1'~ id~ `#2' }
\xsim_set_property:nnnn {#1} {#2} {#3-body} {#4}
\xsim_if_exchange:nnnF {#1} {#2} {#3}
{ \xsim_set_property:nnnn {#1} {#2} {solution-body} {#4} }
\xsim_if_exchange:nnnT {#1} {#2} {#3}
{
\tl_if_eq:nnT {#3} {exercise}
{ \xsim_set_property:nnnn {#1} {#2} {solution-body} {#4} }
}
}

\cs_new:Npn \__xsim_save_environment_body_end: { }
Expand Down
6 changes: 6 additions & 0 deletions code/xsim.properties.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,12 @@
{ \xsim_attribute_get:nn {#1!#2} {#3} }
\cs_generate_variant:Nn \xsim_get_property:nnn {nx,ne,xx,oo,no,nnf,nf,oof,nV}

% #1: type
% #2: id
% #3: property
\cs_new:Npn \xsim_show_property:nnn #1#2#3
{ \xsim_attribute_show:nn {#1!#2} {#3} }

% #1: property
% #2: value
\cs_new:Npn \xsim_get_id_for_property:nn #1#2
Expand Down
10 changes: 5 additions & 5 deletions code/xsim.start.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
% Copyright 2017--2021 Clemens Niederberger
% Copyright 2017--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
Expand All @@ -29,10 +29,10 @@

\ExplSyntaxOn

\tl_const:Nn \c_xsim_date_tl {2021/02/03}
\tl_const:Nn \c_xsim_date_tl {2022/01/05}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
\tl_const:Nn \c_xsim_version_minor_number_tl {20}
\tl_const:Nn \c_xsim_version_subrelease_tl {c}
\tl_const:Nn \c_xsim_version_minor_number_tl {21}
\tl_const:Nn \c_xsim_version_subrelease_tl {}
\tl_const:Nx \c_xsim_version_number_tl
{
\c_xsim_version_major_number_tl .
Expand Down Expand Up @@ -248,7 +248,7 @@
\tl_if_exist:NF \c_xsim_version_tl
{ \tl_set:Nx \l__xsim_module_version_tl {\c_xsimverb_version_tl} }

\hook_gput_code:nnn {package/after/xsim} {xsim}
\hook_gput_code:nnn {package/xsim/after} {xsim}
{
\tl_set:NV \l__xsim_module_date_tl \c_xsim_date_tl
\tl_set:NV \l__xsim_module_version_tl \c_xsim_version_tl
Expand Down
25 changes: 17 additions & 8 deletions code/xsim.sty
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
% Copyright 2017--2021 Clemens Niederberger
% Copyright 2017--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
Expand All @@ -29,10 +29,10 @@

\ExplSyntaxOn

\tl_const:Nn \c_xsim_date_tl {2021/02/03}
\tl_const:Nn \c_xsim_date_tl {2022/01/05}
\tl_const:Nn \c_xsim_version_major_number_tl {0}
\tl_const:Nn \c_xsim_version_minor_number_tl {20}
\tl_const:Nn \c_xsim_version_subrelease_tl {c}
\tl_const:Nn \c_xsim_version_minor_number_tl {21}
\tl_const:Nn \c_xsim_version_subrelease_tl {}
\tl_const:Nx \c_xsim_version_number_tl
{
\c_xsim_version_major_number_tl .
Expand Down Expand Up @@ -248,7 +248,7 @@
\tl_if_exist:NF \c_xsim_version_tl
{ \tl_set:Nx \l__xsim_module_version_tl {\c_xsimverb_version_tl} }

\hook_gput_code:nnn {package/after/xsim} {xsim}
\hook_gput_code:nnn {package/xsim/after} {xsim}
{
\tl_set:NV \l__xsim_module_date_tl \c_xsim_date_tl
\tl_set:NV \l__xsim_module_version_tl \c_xsim_version_tl
Expand Down Expand Up @@ -554,7 +554,7 @@
{ \msg_expandable_error:nnn {xsim} {attribute-not-set} {#1::#2} }
}
}

% #1: attribute
% #2: item
\prg_new_conditional:Npnn \xsim_attribute_if_set:nn #1#2 {p,T,F,TF}
Expand Down Expand Up @@ -1215,6 +1215,12 @@
{ \xsim_attribute_get:nn {#1!#2} {#3} }
\cs_generate_variant:Nn \xsim_get_property:nnn {nx,ne,xx,oo,no,nnf,nf,oof,nV}

% #1: type
% #2: id
% #3: property
\cs_new:Npn \xsim_show_property:nnn #1#2#3
{ \xsim_attribute_show:nn {#1!#2} {#3} }

% #1: property
% #2: value
\cs_new:Npn \xsim_get_id_for_property:nn #1#2
Expand Down Expand Up @@ -1495,8 +1501,11 @@
{
\xsim_verbose:n { Saving~ #3~ environment~ type~ `#1'~ id~ `#2' }
\xsim_set_property:nnnn {#1} {#2} {#3-body} {#4}
\xsim_if_exchange:nnnF {#1} {#2} {#3}
{ \xsim_set_property:nnnn {#1} {#2} {solution-body} {#4} }
\xsim_if_exchange:nnnT {#1} {#2} {#3}
{
\tl_if_eq:nnT {#3} {exercise}
{ \xsim_set_property:nnnn {#1} {#2} {solution-body} {#4} }
}
}

\cs_new:Npn \__xsim_save_environment_body_end: { }
Expand Down
2 changes: 1 addition & 1 deletion code/xsim.style.layouts.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
% Copyright 2017--2021 Clemens Niederberger
% Copyright 2017--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
Expand Down
2 changes: 1 addition & 1 deletion code/xsimverb.start.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
% Copyright 2017--2021 Clemens Niederberger
% Copyright 2017--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
Expand Down
2 changes: 1 addition & 1 deletion code/xsimverb.sty
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
% Web: https://github.com/cgnieder/xsim
% E-Mail: contact@mychemistry.eu
% ----------------------------------------------------------------------------
% Copyright 2017--2021 Clemens Niederberger
% Copyright 2017--2022 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
Expand Down

0 comments on commit 26a628e

Please sign in to comment.