summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-07 03:03:32 +0000
committerNorbert Preining <norbert@preining.info>2021-07-07 03:03:32 +0000
commit4747884efc69f5b8ad51cc818467f7bbf428b815 (patch)
treed05568e0369ce16288bc105806553f717c194a1c /macros/latex
parent109a435244c29109322bcd46386301f6c62d4061 (diff)
CTAN sync 202107070303
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md31
-rw-r--r--macros/latex/contrib/csvsimple/README.md12
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty12
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin75627 -> 75627 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin988201 -> 1040357 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty170
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex286
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin810666 -> 810809 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin309385 -> 309329 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex6
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx95
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin558963 -> 558693 bytes
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md8
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1493556 -> 1497392 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-emulation.dtx49
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin635018 -> 635531 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx.tex3
22 files changed, 580 insertions, 106 deletions
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 1899dbf1f8..391db06d65 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -8,6 +8,36 @@ and this project adheres to
## [Unreleased]
+### Added
+### Changed
+### Deprecated
+### Removed
+### Fixed
+### Security
+
+
+## [2.1.0] - 2021-07-06
+
+### Added
+- Support for (limited) data collection (issue #15)
+- Support for package `tabularray` (part of issue #12)
+- Option `after filter`
+- Option `collect data`
+- Option `data collection`
+- Option `tabularray`
+- Option `centered tabularray`
+- `\csvdatacollection`
+- `\csvexpval`
+- `\csvexpnot`
+- `\csvcollectn`
+- `\csvcollectx`
+- `\csvcollectV`
+
+### Fixed
+- Line Range was not resetted
+- Wrong link and word inside documentation `csvsimple.pdf` (issue #13, issue #15)
+- Several inconsistent local/global assignment errors
+
## [2.0.0] - 2021-06-29
@@ -77,7 +107,6 @@ and this project adheres to
-
## [1.22] - 2021-06-07
### Added
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index d0f920dd8c..37316ec36e 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,8 +1,8 @@
-# The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+# The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
+
->
> Copyright (c) 2008-2021 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
->
+
> This work may be distributed and/or modified under the
> conditions of the LaTeX Project Public License, either version 1.3
> of this license or (at your option) any later version.
@@ -10,11 +10,11 @@
> http://www.latex-project.org/lppl.txt
> and version 1.3 or later is part of all distributions of LaTeX
> version 2005/12/01 or later.
->
+
> This work has the LPPL maintenance status `author-maintained`.
->
+
> This work consists of all files listed in README.md
->
+
`csvsimple` provides a simple *LaTeX* interface for the processing of files
with comma separated values (CSV). `csvsimple` relies heavily on a key value
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index 6fd611a12c..c4b2c0bb40 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,5 +1,5 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.0.0}%
-\def\datum{2021/06/29}%
+\def\version{2.1.0}%
+\def\datum{2021/07/06}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
@@ -29,7 +29,7 @@
\RequirePackage{lmodern,parskip,array,ifthen,calc,makeidx}
\RequirePackage{amsmath,amssymb}
\RequirePackage[svgnames,table,hyperref]{xcolor}
-\RequirePackage{tikz,siunitx,xfp}
+\RequirePackage{tikz,siunitx,xfp,tabularray}
\RequirePackage{varioref}
\RequirePackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
\urlstyle{sf}
@@ -100,6 +100,10 @@
\NewTotalTCBox{\verbbox}{m}{enhanced,on line,size=fbox,frame empty,colback=red!5!white,
colupper=red!85!black,fontupper=\bfseries\ttfamily}{\detokenize{"}#1\detokenize{"}}
+\NewDocumentCommand{\ctanpkg}{m}
+ {%
+ \href{https://ctan.org/pkg/#1}{\texttt{#1}}%
+ }
\makeindex
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index 79a66bb9a2..62a47111b6 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.tex b/macros/latex/contrib/csvsimple/csvsimple-example.tex
index 4f8a80dcfd..e6466807a3 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index a25286a842..eec13b49b4 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.sty b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
index da7e62f47d..cfaf0b9819 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README.md
%%
-\ProvidesExplPackage{csvsimple-l3}{2021/06/29}{2.0.0}
+\ProvidesExplPackage{csvsimple-l3}{2021/07/06}{2.1.0}
{LaTeX3 CSV file processing}
@@ -40,10 +40,12 @@
%---- declarations and expl3 variants
\bool_new:N \g__csvsim_check_column_count_bool
+\bool_new:N \g__csvsim_collect_data_bool
\bool_new:N \g__csvsim_firstline_bool
\bool_new:N \g__csvsim_head_bool
\bool_new:N \g__csvsim_head_to_colnames_bool
\bool_new:N \g__csvsim_line_accepted_bool
+\bool_new:N \g__csvsim_line_firstline_bool
\bool_new:N \l__csvsim_respect_and_bool
\bool_new:N \l__csvsim_respect_backslash_bool
\bool_new:N \l__csvsim_respect_circumflex_bool
@@ -82,9 +84,12 @@
\tl_new:N \g__csvsim_body_tl
\tl_new:N \g__csvsim_catcode_tl
+\tl_new:N \g__csvsim_collect_tl
\tl_new:N \g__csvsim_columnnames_tl
+\tl_new:N \g__csvsim_data_collection_tl
\tl_new:N \g__csvsim_filter_tl
\tl_new:N \g__csvsim_headname_prefix_tl
+\tl_new:N \g__csvsim_hook_after_filter_tl
\tl_new:N \g__csvsim_hook_after_first_line_tl
\tl_new:N \g__csvsim_hook_after_head_tl
\tl_new:N \g__csvsim_hook_after_line_tl
@@ -105,6 +110,7 @@
\tl_new:N \g__csvsim_table_foot_tl
\tl_new:N \g__csvsim_table_head_tl
+
\group_begin:
\char_set_catcode_other:n { 9 }
\str_const:Nn \c__csvsim_tab_str { ^^I }
@@ -204,7 +210,7 @@
\msg_error:nnx { csvsimple }{ empty-head }{ \g__csvsim_filename_str }
}
{
- \int_zero:N \g_csvsim_columncount_int
+ \int_gzero:N \g_csvsim_columncount_int
\__csvsim_scan_line:
\int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
}
@@ -265,6 +271,10 @@
\int_gzero:N \g_csvsim_inputline_int
\int_gzero:N \g_csvsim_row_int
\int_gset_eq:NN \g__csvsim_colmax_int \c_one_int
+ \bool_if:NT \g__csvsim_collect_data_bool
+ {
+ \__csvsim_collect_data:
+ }
% open file
\g__csvsim_hook_before_reading_tl
@@ -317,6 +327,7 @@
{
\g__csvsim_hook_late_after_head_tl
}
+ \g__csvsim_hook_after_filter_tl
\g__csvsim_hook_before_first_line_tl
\g__csvsim_body_tl
\g__csvsim_hook_after_first_line_tl
@@ -324,6 +335,7 @@
}
{
\g__csvsim_hook_late_after_line_tl
+ \g__csvsim_hook_after_filter_tl
\g__csvsim_hook_before_line_tl
\g__csvsim_body_tl
\g__csvsim_hook_after_line_tl
@@ -354,6 +366,11 @@
}
\g__csvsim_hook_table_end_tl
\g__csvsim_hook_after_reading_tl
+ \bool_if:NT \g__csvsim_collect_data_bool
+ {
+ \exp_args:NV \tl_gset_eq:NN \g__csvsim_data_collection_tl \g__csvsim_collect_tl
+ \tl_gclear:N \g__csvsim_collect_tl
+ }
}
@@ -561,10 +578,10 @@
\tl_gput_right:Nn \g__csvsim_columnnames_tl {,#1}
}
},
- command .tl_gset:N = \g__csvsim_body_tl,
- check~column~count .bool_gset:N = \g__csvsim_check_column_count_bool,
- on~column~count~error .tl_gset:N = \g__csvsim_hook_columncounterror_tl,
- head .bool_gset:N = \g__csvsim_head_bool,
+ command .tl_gset:N = \g__csvsim_body_tl,
+ check~column~count .bool_gset:N = \g__csvsim_check_column_count_bool,
+ on~column~count~error .tl_gset:N = \g__csvsim_hook_columncounterror_tl,
+ head .bool_gset:N = \g__csvsim_head_bool,
head~to~column~names~prefix .tl_gset:N = \g__csvsim_headname_prefix_tl,
head~to~column~names .bool_gset:N = \g__csvsim_head_to_colnames_bool,
column~count .int_gset:N = \g_csvsim_columncount_int,
@@ -607,6 +624,7 @@
before~reading .tl_gset:N = \g__csvsim_hook_before_reading_tl,
after~head .tl_gset:N = \g__csvsim_hook_after_head_tl,
before~filter .tl_gset:N = \g__csvsim_hook_before_filter_tl,
+ after~filter .tl_gset:N = \g__csvsim_hook_after_filter_tl,
late~after~head .tl_gset:N = \g__csvsim_hook_late_after_head_tl,
late~after~first~line .tl_gset:N = \g__csvsim_hook_late_after_first_line_tl,
late~after~last~line .tl_gset:N = \g__csvsim_hook_late_after_last_line_tl,
@@ -852,6 +870,81 @@
+%---- data collection
+
+\cs_new_protected_nopar:Npn \__csvsim_gset_tl_to_collect:N #1
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_not:N \tl_gput_right:Nn
+ \exp_not:N \g__csvsim_collect_tl
+ {\exp_not:V #1}
+ }
+ }
+
+
+\cs_new_protected_nopar:Npn \__csvsim_gset_tl_to_collect_expanded:N #1
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_not:N \tl_gput_right:Nx
+ \exp_not:N \g__csvsim_collect_tl
+ {\exp_not:V #1}
+ }
+ }
+
+
+\cs_new_protected_nopar:Npn \__csvsim_collect_data:
+ {
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_after_head_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_after_line_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_before_first_line_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_before_line_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_late_after_first_line_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_late_after_head_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_late_after_last_line_tl
+ \__csvsim_gset_tl_to_collect:N \g__csvsim_hook_late_after_line_tl
+ \__csvsim_gset_tl_to_collect_expanded:N \g__csvsim_body_tl
+ \tl_gclear:N \g__csvsim_collect_tl
+ }
+
+
+\cs_set_eq:NN \csvexpval \exp_not:V
+\cs_set_eq:NN \csvexpnot \exp_not:N
+
+
+\NewDocumentCommand{ \csvcollectn }{ +m }
+ {
+ \tl_gput_right:Nn \g__csvsim_collect_tl {#1}
+ }
+
+
+\NewDocumentCommand{ \csvcollectx }{ +m }
+ {
+ \tl_gput_right:Nx \g__csvsim_collect_tl {#1}
+ }
+
+
+\NewDocumentCommand{ \csvcollectV }{ m }
+ {
+ \tl_gput_right:NV \g__csvsim_collect_tl #1
+ }
+
+
+\keys_define:nn { csvsim }
+ {
+ collect~data .bool_gset:N = \g__csvsim_collect_data_bool,
+ data~collection .tl_gset:N = \g__csvsim_data_collection_tl,
+ }
+
+
+\keys_set:nn { csvsim }
+ {
+ data~collection = \csvdatacollection,
+ }
+
+
+
%---- catcodes
\cs_new_protected_nopar:Npn \__csvsim_setup_catcode_list:
@@ -983,6 +1076,48 @@
late~after~line = \\,
late~after~last~line =
},
+ tabularray .meta:n =
+ {
+ collect~data,
+ _table_ =
+ {
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_before_table_tl
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \begin{tblr}{#1} }
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_table_head_tl
+ }
+ {
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_table_foot_tl
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \end{tblr} }
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_after_table_tl
+ },
+ late~after~line = \\,
+ after~reading =
+ {
+ \tl_use:N \g__csvsim_collect_tl
+ },
+ },
+ centered~tabularray .meta:n =
+ {
+ collect~data,
+ _table_ =
+ {
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \begin{center} }
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_before_table_tl
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \begin{tblr}{#1} }
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_table_head_tl
+ }
+ {
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_table_foot_tl
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \end{tblr} }
+ \tl_gput_right:NV \g__csvsim_collect_tl \g__csvsim_after_table_tl
+ \tl_gput_right:Nn \g__csvsim_collect_tl { \end{center} }
+ },
+ late~after~line = \\,
+ after~reading =
+ {
+ \tl_use:N \g__csvsim_collect_tl
+ },
+ },
_autotab_ .meta:n =
{
file = #1,
@@ -1001,7 +1136,7 @@
_autotabular_ = #1,
head,
after~head = \g__csvsim_before_table_tl
- \begin{tabular}{|*{\int_use:N\g__csvsim_col_int}{l|}}
+ \begin{tabular}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
table~head = \hline\csvlinetotablerow\\\hline,
table~foot = \\\hline,
@@ -1011,7 +1146,7 @@
_autotabular_ = #1,
no~head,
before~first~line = \g__csvsim_before_table_tl
- \begin{tabular}{|*{\int_use:N\g__csvsim_col_int}{l|}}
+ \begin{tabular}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
table~head = \hline,
table~foot = \\\hline,
@@ -1021,7 +1156,7 @@
_autotabular_ = #1,
head,
after~head = \g__csvsim_before_table_tl
- \begin{tabular}{*{\int_use:N\g__csvsim_col_int}{l}}
+ \begin{tabular}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
table~head = \toprule\csvlinetotablerow\\\midrule,
table~foot = \\\bottomrule,
@@ -1031,7 +1166,7 @@
_autotabular_ = #1,
no~head,
before~first~line = \g__csvsim_before_table_tl
- \begin{tabular}{*{\int_use:N\g__csvsim_col_int}{l}}
+ \begin{tabular}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
table~head = \toprule,
table~foot = \\\bottomrule,
@@ -1047,7 +1182,7 @@
_autolongtable_ = #1,
head,
after~head = \g__csvsim_before_table_tl
- \begin{longtable}{|*{\int_use:N\g__csvsim_col_int}{l|}}
+ \begin{longtable}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
table~head = \hline\csvlinetotablerow\\\hline\endhead
\hline\endfoot,
@@ -1057,7 +1192,7 @@
_autolongtable_ = #1,
no~head,
before~first~line = \g__csvsim_before_table_tl
- \begin{longtable}{|*{\int_use:N\g__csvsim_col_int}{l|}}
+ \begin{longtable}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
table~head = \hline\endhead
\hline\endfoot,
@@ -1067,7 +1202,7 @@
_autolongtable_ = #1,
head,
after~head = \g__csvsim_before_table_tl
- \begin{longtable}{*{\int_use:N\g__csvsim_col_int}{l}}
+ \begin{longtable}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
table~head = \toprule\csvlinetotablerow\\\midrule\endhead
\bottomrule\endfoot,
@@ -1077,7 +1212,7 @@
_autolongtable_ = #1,
no~head,
before~first~line = \g__csvsim_before_table_tl
- \begin{longtable}{*{\int_use:N\g__csvsim_col_int}{l}}
+ \begin{longtable}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
table~head = \toprule\endhead
\bottomrule\endfoot,
@@ -1157,7 +1292,7 @@
\keys_define:nn { csvsim }
{
- preprocessor .tl_gset:N = \l__csvsim_preprocessor_tl,
+ preprocessor .tl_set:N = \l__csvsim_preprocessor_tl,
preprocessed~file .code:n = \__csvsim_set_filename:Nn \l__csvsim_ppfilename_str {#1},
csvsorter~command .code:n = \__csvsim_set_filename:Nn \l__csvsim_csvsorter_command_str {#1},
csvsorter~configpath .code:n = \__csvsim_set_filename:Nn\l__csvsim_csvsorter_configpath_str {#1},
@@ -1233,10 +1368,13 @@
check~column~count,
head~to~column~names~prefix = ,
head~to~column~names = false,
+ collect~data = false,
column~count = 0,
on~column~count~error =,
+ range =,
no~filter,
before~filter =,
+ after~filter =,
before~line =,
after~line =,
late~after~line =,
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index a3e61e241f..fc8d82b903 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -19,6 +19,7 @@
%%
%% This work consists of all files listed in README.md
%%
+% \RequirePackage[check-declarations,enable-debug]{expl3}
\documentclass[a4paper,11pt]{ltxdoc}
\usepackage{csvsimple-doc}
@@ -102,7 +103,7 @@ This processing is controlled by key value assignments according to the
syntax of |l3keys|. Sample applications of the package
are tabular lists, serial letters, and charts.
-An alternative to |csvsimple-l3| is the |datatool| package
+An alternative to |csvsimple-l3| is the \ctanpkg{datatool} package
which provides considerably more functions and allows sorting of data by \LaTeX.
|csvsimple-l3| has a different approach for the user interface and
is deliberately restricted to some basic functions with fast
@@ -134,7 +135,7 @@ alternatives inside the preamble:
\end{dispListing}
Not automatically loaded, but used for many examples are the packages
-|longtable|, |booktabs|, |ifthen|, and |booktabs|.
+\ctanpkg{longtable}, \ctanpkg{booktabs}, \ctanpkg{ifthen}, and \ctanpkg{etoolbox}.
\clearpage
@@ -788,12 +789,21 @@ to be used inside these macros.
\begin{docCsvKey}{before filter}{=\meta{code}}{no default, initially empty}
Sets the \meta{code} to be executed after reading and consistency checking
- of a data line. They are executed before any filter condition is checked,
- see e.g. \refKey{/csvsim/filter ifthen}.
- Also see \refKey{/csvsim/full filter}.
+ of a data line. It is executed before any filter condition is checked,
+ see e.g. \refKey{/csvsim/filter ifthen} and
+ also see \refKey{/csvsim/full filter}.
+ No additions to the input stream should be given here.
All line entries are available.
\end{docCsvKey}
+\begin{docCsvKey}[][doc new=2021-07-06]{after filter}{=\meta{code}}{no default, initially empty}
+ Sets the \meta{code} to be executed for an accepted line after
+ \refKey{/csvsim/late after line} and before \refKey{/csvsim/before line}.
+ All line entries are available.
+ No additions to the input stream should be given here. \meta{code} may
+ contain processing of data content to generate new values.
+\end{docCsvKey}
+
\begin{docCsvKey}{late after head}{=\meta{code}}{no default, initially empty}
Sets the \meta{code} to be executed after reading and disassembling
of the first accepted data line.
@@ -833,7 +843,7 @@ to be used inside these macros.
\begin{docCsvKey}{before line}{=\meta{code}}{no default, initially empty}
- Sets the \meta{code} to be executed after \refKey{/csvsim/late after line}
+ Sets the \meta{code} to be executed after \refKey{/csvsim/after filter}
and before \refKey{/csvsim/command}.
All line entries are available.
\refKey{/csvsim/before line} overwrites
@@ -848,6 +858,7 @@ to be used inside these macros.
This key has to be set after \refKey{/csvsim/before line}.
\end{docCsvKey}
+\pagebreak
\begin{docCsvKey}{command}{=\meta{code}}{no default, initially \cs{csvline}}
Sets the \meta{code} to be executed for every accepted data line.
@@ -857,8 +868,6 @@ to be used inside these macros.
parameter.
\end{docCsvKey}
-\pagebreak
-
\begin{docCsvKey}{after line}{=\meta{code}}{no default, initially empty}
Sets the \meta{code} to be executed for every accepted data line
after \refKey{/csvsim/command}.
@@ -889,6 +898,7 @@ parameter of \refCom{csvreader}.
before reading = \meta{before reading}\\,
after head = \meta{after head},
before filter = \\\meta{before filter},
+ after filter = \meta{after filter},
late after head = \meta{late after head},
late after line = \meta{late after line},
late after first line = \meta{late after first line},
@@ -1041,20 +1051,20 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{style, no default}
Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
are accepted.
- The implementation is done with the |ifthen| package (loading required!).
+ The implementation is done with the \ctanpkg{ifthen} package (loading required!).
\end{docCsvKey}
\begin{docCsvKey}{filter not equal}{=\marg{stringA}\marg{stringB}}{style, no default}
Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
are accepted.
- The implementation is done with the |ifthen| package (loading required!).
+ The implementation is done with the \ctanpkg{ifthen} package (loading required!).
\end{docCsvKey}
\begin{docCsvKey}[][doc new=2021-06-25]{filter fp}{=\meta{floating point expression}}{no default}
Only data lines which fulfill a \LaTeX3 \meta{floating point expression}
- (|l3fp|, |xfp|) are accepted.
+ (|l3fp|, \ctanpkg{xfp}) are accepted.
\begin{dispExample}
% \usepackage{booktabs}
\csvreader[
@@ -1146,7 +1156,7 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
\begin{dispListing}
filter test=\iftest{some testing},
\end{dispListing}
- For |\iftest|, tests from the |etoolbox| package like
+ For |\iftest|, tests from the \ctanpkg{etoolbox} package like
|\ifnumcomp|, |\ifdimgreater|, etc. and from \Fullref{sec:stringtests} can be used.
Also, arbitrary own macros fulfilling this signature can be applied.
\begin{dispExample}
@@ -1169,7 +1179,7 @@ filter test=\iftest{some testing},
\begin{docCsvKey}[][doc new=2016-07-01]{filter expr}{=\meta{boolean expression}}{no default}
Only data lines which fulfill a \meta{boolean expression} are accepted.
Every \meta{boolean expression}
- from the |etoolbox| package is feasible (package loading required!).
+ from the \ctanpkg{etoolbox} package is feasible (package loading required!).
To preprocess the data line before testing the \meta{condition},
the option key \refKey{/csvsim/before filter} can be used.
\begin{dispExample}
@@ -1193,7 +1203,7 @@ filter test=\iftest{some testing},
\clearpage
\begin{docCsvKey}[][doc new=2016-07-01]{filter ifthen}{=\meta{boolean expression}}{no default}
Only data lines which fulfill a \meta{boolean expression} are accepted.
- For the \meta{boolean expression}, every term from the |ifthen| package
+ For the \meta{boolean expression}, every term from the \ctanpkg{ifthen} package
is feasible (package loading required!).
To preprocess the data line before testing the \meta{condition},
the option key \refKey{/csvsim/before filter} can be used.
@@ -1372,7 +1382,7 @@ The following example displays the last three line numbers:
\begin{docCsvKey}{tabular}{=\meta{table format}}{style, no default}
Surrounds the CSV processing with |\begin{tabular}|\marg{table format}
at begin and with |\end{tabular}| at end.
-Additionally, the commands defined by the key values of
+ Additionally, the commands defined by the key values of
\refKey{/csvsim/before table}, \refKey{/csvsim/table head}, \refKey{/csvsim/table foot},
and \refKey{/csvsim/after table} are executed at the appropriate places.
\end{docCsvKey}
@@ -1385,7 +1395,7 @@ Additionally, the commands defined by the key values of
\begin{docCsvKey}{longtable}{=\meta{table format}}{style, no default}
Like \refKey{/csvsim/tabular} but for the |longtable| environment.
- This requires the package |longtable| (not loaded automatically).
+ This requires the package \ctanpkg{longtable} (not loaded automatically).
\end{docCsvKey}
@@ -1399,6 +1409,21 @@ Additionally, the commands defined by the key values of
\end{docCsvKey}
+\begin{docCsvKey}[][doc new=2021-07-06]{tabularray}{=\meta{table format}}{style, no default}
+ Like \refKey{/csvsim/tabular} but for the |tblr| environment.
+ This requires the package \ctanpkg{tabularray} (not loaded automatically).
+ This also sets \refKey{/csvsim/collect data} since this kind of table
+ needs collected content, see \Fullref{sec:datacollection}.
+ Note that \refKey{/csvsim/after reading} is set to use the collected
+ data immediately. See \Fullref{sec:tabularray} for examples.
+\end{docCsvKey}
+
+
+\begin{docCsvKey}[][doc new=2021-07-06]{centered tabularray}{=\meta{table format}}{style, no default}
+ Like \refKey{/csvsim/tabularray} but inside an additional |center| environment.
+\end{docCsvKey}
+
+
\begin{docCsvKey}{no table}{}{style, no value}
Deactivates |tabular|, |longtable|, and |tabbing|.
\end{docCsvKey}
@@ -1879,6 +1904,118 @@ Now, we can use the new rule:
\clearpage
+\subsection{Data Collection}\label{sec:datacollection}
+
+|csvsimple-l3| reads and processes a CSV file line by line. Accordingly, the \TeX{}
+input stream is filled line by line.
+Although this is an efficient procedure, for some applications like tables with
+the \ctanpkg{tabularray} package, collecting the data from the CSV file into a macro is needed.
+This macro can be given to the target application for further processing.
+
+
+\begin{docCsvKey}[][doc new=2021-07-06]{collect data}{\colOpt{=true\textbar false}}{default |true|, initially |false|}
+|csvsimple-l3| provides limited and experimental support to collect the input data
+from the CSV file plus user additions into a macro named \refCom{csvdatacollection}.
+Setting \refKey{/csvsim/collect data} adds the contents of the following keys
+to \refCom{csvdatacollection}:
+\begin{itemize}
+\item\refKey{/csvsim/after head}
+\item\refKey{/csvsim/after line}
+\item\refKey{/csvsim/before first line}
+\item\refKey{/csvsim/before line}
+\item\refKey{/csvsim/late after first line}
+\item\refKey{/csvsim/late after head}
+\item\refKey{/csvsim/late after last line}
+\item\refKey{/csvsim/late after line}
+\end{itemize}
+Also, the \emph{expanded} content of
+\begin{itemize}
+\item\refKey{/csvsim/command}
+\end{itemize}
+is added to \docAuxCommand{csvdatacollection}.
+Note that for \refKey{/csvsim/command} special care has to be taken
+\emph{what} should be protected from expansion and \emph{what not}.
+Observe the following hints for \refKey{/csvsim/command}:
+\begin{itemize}
+\item For data macros like |\csvcoli| use |\csvexpval\csvcoli| to add
+ the \emph{value} of this macro to \refCom{csvdatacollection}.
+ This is optional, if |\csvcoli| contains numbers or text without active
+ characters, but essential, if it contains macros.
+\item For macros like |\textbf| use |\csvexpnot\textbf| to \emph{prevent}
+ expansion.
+\item Using computations or not expandable conditionals may likely cause
+ compilation errors.
+\end{itemize}
+
+\begin{dispExample}
+\csvreader[
+ collect data,
+ head to column names,
+ late after line=\\,
+ late after last line=,
+ ]{grade.csv}{}{%
+ \thecsvrow. \csvexpval\givenname\ \csvexpnot\textbf{\csvexpval\name}
+ }
+Collected data:\par
+\csvdatacollection
+\end{dispExample}
+
+Note that data collection is \emph{limited} to some special cases and does not
+allow to save all possible content. Table options like \refKey{/csvsim/longtable}
+are generally not supported with the important exception of \refKey{/csvsim/tabularray}
+which uses \refKey{/csvsim/collect data} automatically.\par
+See \Fullref{sec:tabularray} for examples.
+\end{docCsvKey}
+
+\clearpage
+
+\begin{docCsvKey}[][doc new=2021-07-06]{data collection}{=\meta{macro}}{no default, initially \refCom{csvdatacollection}}
+Sets the collection macro to an alternative for \refCom{csvdatacollection}.
+\begin{dispListing}
+ data collection = \myData, % instead of \csvdatacollection
+\end{dispListing}
+\end{docCsvKey}
+
+
+\begin{docCommand}[doc new=2021-07-26]{csvdatacollection}{}
+ Macro which contains the collected data of a CSV file processed with
+ \refKey{/csvsim/collect data}. This macro name can be changed by
+ settiing \refKey{/csvsim/data collection}.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2021-07-26]{csvexpval}{\meta{macro}}
+ Recovers the content of the given \meta{macro} and prevents further
+ expansion. This is a wrapper for \docAuxCommand*{exp_not:V}.
+ Alternatively, |\expandonce| from \ctanpkg{etoolbox} could be used.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2021-07-26]{csvexpnot}{\meta{macro}}
+ Prevents the expansion of the given \meta{macro}. This is a wrapper
+ for \docAuxCommand*{exp_not:N}.
+ Alternatively, |\noexpand| could be used.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2021-07-26]{csvcollectn}{\marg{code}}
+ Appends the given \meta{code} to \refCom{csvdatacollection}.\\
+ This corresponds to \docAuxCommand*{tl_gput_right:Nn}.
+\end{docCommand}
+
+
+\begin{docCommand}[doc new=2021-07-26]{csvcollectx}{\marg{code}}
+ Appends the expansion of the given \meta{code} to \refCom{csvdatacollection}.\\
+ This corresponds to \docAuxCommand*{tl_gput_right:Nx}.
+\end{docCommand}
+
+\begin{docCommand}[doc new=2021-07-26]{csvcollectV}{\meta{macro}}
+ Appends the content of the given \meta{macro} to \refCom{csvdatacollection}.\\
+ This corresponds to \docAuxCommand*{tl_gput_right:NV}.
+\end{docCommand}
+
+
+\clearpage
\section{String and Number Tests}\label{sec:stringtests}%
The following string tests are complementing the string tests
@@ -2003,7 +2140,7 @@ introduced.
\clearpage
-\subsection{A Graphical Presentation}%
+\subsection{A Graphical Presentation}\label{sec:examgrapghpres}%
For this example, we use some artificial statistical data given by a CSV file.
%-- file embedded for simplicity --
@@ -2202,10 +2339,10 @@ December, 2.2, 3.3e3
\medskip
-The |siunitx| package provides a huge amount of formatting options for
-numbers. A good and robust way to apply formatting by |siunitx| inside
+The \ctanpkg{siunitx} package provides a huge amount of formatting options for
+numbers. A good and robust way to apply formatting by \ctanpkg{siunitx} inside
tables generated by |csvsimple-l3| is the |\tablenum| macro from
-|siunitx|.
+\ctanpkg{siunitx}.
\begin{dispExample}
% \usepackage{siunitx,array,booktabs}
@@ -2366,6 +2503,113 @@ because there is no head, but the columns can be addressed by their numbers:
\end{dispExample}
+
+\clearpage
+\subsection{Tables with \texttt{tabularray}}\label{sec:tabularray}%
+
+The \ctanpkg{tabularray} package gives extended control for generating
+tables. \refKey{/csvsim/tabularray} and \refKey{/csvsim/centered tabularray}
+support such tables. A distinctiveness is that for \ctanpkg{tabularray}
+data from a CSV file has to be \emph{collected} first (into a macro)
+and applied afterwards. The process is hidden from the user view, but
+has to be taken into account when \refKey{/csvsim/command} is set up,
+see \Fullref{sec:datacollection}.
+
+The following examples uses |data.csv| from \Fullref{sec:examgrapghpres}.
+
+\begin{dispExample}
+% \usepackage{tabularray,siunitx,xfp}
+\csvreader[
+ head to column names,
+ centered tabularray =
+ {
+ rowsep = 1mm,
+ colsep = 5mm,
+ rows = {blue7},
+ hlines = {2pt, white},
+ vlines = {2pt, white},
+ row{1} = {bg=azure3, fg=white, font=\bfseries\large, 8mm},
+ },
+ table head = {\SetCell[c=4]{c} Important Data Table \\},
+ ]{data.csv}{}{
+ \ifcsvstrcmp{\group}{A}{\csvexpnot\SetRow{brown7}}{}
+ \csvexpnot\SetCell{bg=purple7}
+ \csvexpval\land
+ & \csvexpval\group
+ & \csvexpval\amount
+ & \csvexpnot\tablenum[exponent-mode=scientific, round-precision=3,
+ round-mode=places, table-format=1.3e1]{\fpeval{pi*\amount}}
+ }
+\end{dispExample}
+
+Note in the example above that
+\begin{itemize}
+\item \refKey{/csvsim/table head} is \emph{collected} unexpanded, i.e.
+ |\SetCell| has not to be protected. On the other hand, CSV data could not
+ be used here.
+\item \refKey{/csvsim/command} is \emph{collected} expanded. This is identical
+ to the mandatory last argument of \refCom{csvreader}.
+ \begin{itemize}
+ \item Therefore, expansion of |\SetRow|, |\SetCell|, etc. is prevented by \refCom{csvexpnot}.
+ \item The \emph{values} (content) of |\land|, |\group|, etc. are recovered by
+ \refCom{csvexpval}.
+ \item |\ifcsvstrcmp| and |\fpeval| are \emph{expandable} and therefore the
+ results of these commands are \emph{collected}.
+ \end{itemize}
+\end{itemize}
+
+\clearpage
+
+Filters and line ranges can be used for \ctanpkg{tabularray} and all
+data collections without restriction:
+
+\begin{dispExample}
+% \usepackage{tabularray}
+Display group `A` only:\par
+\csvreader[
+ head to column names,
+ filter strcmp = {\group}{A},
+ centered tabularray =
+ {
+ rowsep = 1mm,
+ colsep = 5mm,
+ column{1} = {r, fg=yellow5, colsep=2pt},
+ column{2} = {r, yellow8!10, font=\bfseries},
+ column{3} = {l, yellow8},
+ hlines = {2pt, white},
+ },
+ ]{data.csv}{}{
+ \thecsvrow
+ & \csvexpval\land
+ & \csvexpval\amount
+ }
+\end{dispExample}
+
+
+\begin{dispExample}
+% \usepackage{tabularray}
+Display data from line 3 on:\par
+\csvreader[
+ head to column names,
+ range = 3-,
+ centered tabularray =
+ {
+ rowsep = 1mm,
+ colsep = 5mm,
+ column{1} = {r, fg=violet5, colsep=2pt},
+ column{2} = {r, violet8!10, font=\bfseries},
+ column{3} = {l, violet8},
+ hlines = {2pt, white},
+ },
+ ]{data.csv}{}{
+ \thecsvrow
+ & \csvexpval\land
+ & \csvexpval\amount
+ }
+\end{dispExample}
+
+
+
\clearpage
\subsection{Imported CSV data}\label{sec:importeddata}%
If data is imported from other applications, there is not always a choice
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index 93c22e5fc3..d732b8d80c 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
index 53a30ab9e3..90be1ca205 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2021/06/29 version 2.0.0 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2021/07/06 version 2.1.0 LaTeX2e CSV file processing]
%---- check package
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
index c22c56181f..d38d3de3a7 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 805a052473..46cfca6325 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple.sty b/macros/latex/contrib/csvsimple/csvsimple.sty
index def091859f..f4c8a1d503 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -19,7 +19,7 @@
%%
\RequirePackage{l3keys2e}
-\ProvidesExplPackage{csvsimple}{2021/06/29}{2.0.0}
+\ProvidesExplPackage{csvsimple}{2021/07/06}{2.1.0}
{LaTeX CSV file processing}
\cs_if_exist:NT \c__csvsim_package_expl_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex
index 305f949631..448e6698b0 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.0.0 (2021/06/29)
+%% The LaTeX package csvsimple - version 2.1.0 (2021/07/06)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -78,7 +78,7 @@ following packages:
\end{dispListing}
\medskip
-\item \href{csvsimple-l3.pdf}{\flqq The |csvsimple-legacy| package\frqq}:\\
+\item \href{csvsimple-legacy.pdf}{\flqq The |csvsimple-legacy| package\frqq}:\\
This is the \LaTeXe{} version of |csvsimple|. It is considered
to be the \emph{superseded} version identical to version 1.22 of |csvsimple|.
Documents based on that former version do \emph{not have to be changed}
@@ -121,7 +121,7 @@ upgrade point of view.
\item The most significant change of the user interface is that the key value
engine of |csvsimple-legacy| is |pgfkeys| (root \docAuxKey*[csv]{}) while |csvsimple-l3| uses
|l3keys| (root \docAuxKey*[csvsim]{}).
- Names und usage of the keys are \emph{unchanged}.
+ Names and usage of the keys are \emph{unchanged}.
But, if
you made own |pgfkeys| \emph{styles} using the |pgfkeys| style handler,
these \emph{styles} have to be adapted to |.meta| keys of |l3keys|.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 1086c6ffb0..1b04478f14 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/05\hskip\ccwd\relax v1.26s\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/06\hskip\ccwd\relax v1.26u\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -158,7 +158,7 @@
% floatpage = <true|(false)>
% \end{syntax}
% 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26s}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
+% \changes{v1.26u}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
% \end{function}
%
% \subsection{article 模式}
@@ -240,7 +240,7 @@
% \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码}
% \end{syntax}
% \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26s}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
+% \changes{v1.26u}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
% \end{function}
%
% \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
@@ -248,17 +248,17 @@
% \subsection{上标和下标}
% \begin{function}[added = 2021-06-26]{\super,\sub,\supersub,\textsuperscript,\textsubscript}
% \begin{syntax}
-% \tn{super*}\oarg{垂直偏移}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移}
-% \tn{sub*}\oarg{垂直偏移}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移}
-% \tn{supersub*}\oarg{上下标间距}\oarg{对齐方式}\parg{上标代码}
+% \tn{super*}\oarg{垂直偏移|(0pt)}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移|(0pt)}
+% \tn{sub*}\oarg{垂直偏移|(0pt)}[<高度>,<深度>]\parg{格式代码}\marg{内容}\oarg{水平偏移|(0pt)}
+% \tn{supersub*}\oarg{上下标间距|(0.3ex)}\oarg{对齐方式|(l)|c|r}\parg{上标代码}
% \ \marg{上标内容}\marg{下标内容}
-% \ \oarg{水平偏移}\parg{下标代码}
+% \ \oarg{水平偏移|(0pt)}\parg{下标代码}
% \end{syntax}
% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
-% \changes{v1.26s}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
+% \changes{v1.26u}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
% \end{function}
%
-% 垂直和水平偏移默认值都是 0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。\tn{textsuperscript} 和 \tn{textsubscript} 命令已被重新定义并且分别等价于 \tn{super} 和 \tn{sub},如果您需要使用它们的原始定义创建新命令,则可以使用 \tn{spb@textsuperscript@save} 和 \tn{spb@textsubscript@save} 命令。
+% 垂直和水平偏移默认值都是 0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。上标和下标命令还分别具有更简短的等价命令 \tn{sp}、\tn{sb} 和 \tn{spb}。
%
% \section{接口选项}
% \label{sec:interface options}
@@ -306,7 +306,7 @@
% \tn{DeclareThemeColor}\{<风格名称>,<ctex@frame>,<ctex@emph>,<ctex@verb>\}
% \end{syntax}
% 可以使用 \tn{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.26s}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
+% \changes{v1.26u}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
% \end{function}
% \item[color-all] 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
@@ -371,7 +371,7 @@
% \tn{DeclareLinkColor}\{<风格名称>,<ctex@link>,<ctex@url>,<ctex@cite>\}
% \end{syntax}
% 可以使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
-% \changes{v1.26s}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
+% \changes{v1.26u}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
% \end{function}
% \item[linkcol-all] 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
@@ -492,7 +492,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{thmset/...}
% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-% \changes{v1.26s}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
+% \changes{v1.26u}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
% \end{function}
%
% \begin{optdesc}
@@ -519,7 +519,7 @@
% 文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。}
-% \changes{v1.26s}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
+% \changes{v1.26u}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -625,7 +625,7 @@
% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
% \end{syntax}
% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26s}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
+% \changes{v1.26u}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
% \end{function}
%
% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
@@ -963,7 +963,7 @@
% \tn{EBUseCounter*}\oarg{父计数器}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}\parg{数值}
% \end{syntax}
% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{EBUseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\tn{the}\meta{计数器}\meta{内容} 输出当前内容。
-% \changes{v1.26s}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
+% \changes{v1.26u}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
% \end{function}
%
% 需要注意的是 \tn{EBUseCounter} 仅具有 \textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
@@ -1150,7 +1150,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/05}{1.26s}
+\ProvidesExplClass{easybook}{2021/07/06}{1.26u}
{Typeset Chinese books or notes}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1242,10 +1242,9 @@
\exp_args:Nc \RenewDocumentCommand {set#1font}{O{}mO{}}
{\use:c { eb_set#1font:nn } {##2} {##1,##3}}
}
-\seq_const_from_clist:Nn \c__eb_font_reset_family_seq
+\eb_clist_map_function:nN
{ main,sans,mono,CJKmain,CJKsans,CJKmono }
-\seq_map_inline:Nn \c__eb_font_reset_family_seq
- { \eb_font_double_engine_set:n {#1} }
+ \eb_font_double_engine_set:n
\cs_new_protected:Npn \eb_setmainfont:nn #1#2
{ \__fontspec_main_setmainfont:nn {#2} {#1} }
@@ -1398,7 +1397,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/05}{1.26s}
+\ProvidesExplPackage{easybase}{2021/07/06}{1.26u}
{Typeset Chinese books or notes}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
@@ -1409,16 +1408,28 @@
\cs_generate_variant:Nn \seq_set_from_clist:Nn { No }
\cs_generate_variant:Nn \int_compare:nNnT { oNnT }
\cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
+\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
\cs_new_protected:Npn \eb_ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
+\cs_new_protected:Npn \eb_clist_map_inline:nn #1#2
+ {
+ \seq_set_from_clist:Nn \l_tmpa_seq {#1}
+ \seq_map_inline:Nn \l_tmpa_seq {#2}
+ }
+\cs_new_protected:Npn \eb_clist_map_function:nN #1#2
+ {
+ \seq_set_from_clist:Nn \l_tmpb_seq {#1}
+ \seq_map_function:NN \l_tmpb_seq #2
+ }
+\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
+ {
+ \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
+ { } { \ctex_patch_failure:N #1 }
+ }
\cs_new_protected:Npn \eb_patch_cmd:nnn #1#2#3
{
- \seq_set_from_clist:Nn \l__eb_control_sequence_seq {#1}
- \seq_map_inline:Nn \l__eb_control_sequence_seq
- {
- \ctex_patch_cmd_once:NnnnTF ##1 { } {#2} {#3}
- { } { \ctex_patch_failure:N ##1 }
- }
+ \eb_clist_map_inline:nn {#1}
+ { \eb_patch_cmd:Nnn ##1 {#2} {#3} }
}
\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
{
@@ -1432,8 +1443,7 @@
}
\cs_new_protected:Npn \eb_at_begin_environment:nn #1#2
{
- \seq_set_from_clist:No \l__eb_env_hook_name_seq {#1}
- \seq_map_inline:Nn \l__eb_env_hook_name_seq
+ \eb_clist_map_inline:nn {#1}
{ \AtBeginEnvironment{##1}{#2} }
}
\cs_new_protected:Npn \eb_match_package_name:n #1
@@ -1511,13 +1521,12 @@
\bool_new:N \l__eb_chap_counter_withpart_bool
\tl_new:N \l__eb_foot_counter_parent_choice_tl
-\seq_const_from_clist:Nn \c__eb_options_path_seq
+\eb_clist_map_inline:nn
{
style,subfont,spread,
refset,bibset,thmset,
geoset,hdrset,tocset
}
-\seq_map_inline:Nn \c__eb_options_path_seq
{
\ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} }
\cs_new:cpn {#1} ##1 { \keys_set:nn { ctex/#1 } {##1} }
@@ -1676,9 +1685,8 @@
\booltrue{@mainmatter}
\pagenumbering{arabic}
}
-\seq_const_from_clist:Nn \c__eb_mark_title_level_seq
+\eb_clist_map_inline:nn
{ chapter,section,subsection }
-\seq_map_inline:Nn \c__eb_mark_title_level_seq
{
\exp_args:Nc \NewDocumentCommand { eb@mark@#1@label@layout }
{O{\use:c { CTEXthe#1 }}m}
@@ -1942,11 +1950,9 @@
}
\seq_map_function:NN
\c__eb_toc_heading_level_seq \eb_toc_assign_keys:n
-
-\seq_const_from_clist:Nn \c__eb_toc_list_meta_keys_seq
- { format,format+,format~+,indent,rule,numsep,belowoffset }
\ctex_define:n { tocset/list .meta:nn = { ctex/tocset/list } {#1} }
-\seq_map_inline:Nn \c__eb_toc_list_meta_keys_seq
+\eb_clist_map_inline:nn
+ { format,format+,format~+,indent,rule,numsep,belowoffset }
{
\eb_ctex_define:nn { tocset }
{
@@ -2153,9 +2159,8 @@
\cs_set:Npn \thebisection { \eb_section_counter_prefix:n { bi } }
\cs_set:Npn \thebisubsection { \thebisection.\eb_arabic:n { bisubsection } }
\cs_set:Npn \thesection { \eb_section_counter_prefix:n { } }
-\seq_const_from_clist:Nn \c__eb_serial_number_counter_seq
+\eb_clist_map_inline:nn
{ figure,table,lstlisting,equation }
-\seq_map_inline:Nn \c__eb_serial_number_counter_seq
{
\cs_set:cpn { the#1 }
{
@@ -2185,9 +2190,8 @@
\addcontentsline{tec}{#1}{\use:c { CTEX@#1@tocline }{#1}{#2}}
\group_end:
}
-\seq_const_from_clist:Nn \c__eb_bitoc_title_level_seq
+\eb_clist_map_inline:nn
{ chapter,section,subsection }
-\seq_map_inline:Nn \c__eb_bitoc_title_level_seq
{
\exp_args:Nc \NewDocumentCommand { bi#1 }{sO{##3}mm}
{
@@ -2387,10 +2391,7 @@
binmuber .initial:n = \arabic{chapter}
}
\cs_new_protected:Npn \eb_counter_zero:n #1
- {
- \seq_set_from_clist:No \l__eb_counter_name_seq {#1}
- \seq_map_inline:Nn \l__eb_counter_name_seq { \setcounter{##1}{0} }
- }
+ { \eb_clist_map_inline:nn {#1} { \setcounter{##1}{0} } }
\RenewDocumentCommand{\appendix}
{O{Appendix\space}D(){\Alph{chapter}}}
{
@@ -2398,7 +2399,7 @@
\int_compare:nNnTF { \c@chapter } > { 0 }
{
\ExplSyntaxOn\char_set_catcode_letter:N \@
- \eb_patch_cmd:nnn { \CTEX@addbitocline }
+ \eb_patch_cmd:Nnn \CTEX@addbitocline
{
\def\CTEX@prechapter{\CTEX@prebichapter}
\def\CTEX@thechapter{\CTEX@bichapter@number}
@@ -2757,7 +2758,7 @@
\linespread{\fp_use:N \l__eb_spread_math_fp}
\selectfont\collect@body
}
-\eb_patch_cmd:nnn { \gather@split }
+\eb_patch_cmd:Nnn \gather@split
{ \spread@equation }
{
\linespread{\fp_use:N \l__eb_spread_math_fp}
@@ -3131,7 +3132,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/05}{1.26s}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/06}{1.26u}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 2e4f2c9a77..8dcf4520b0 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 829db2c92a..d02f541581 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,11 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.19]
+
+### Fixed
+- Emulation for `\SendSettingsToPgf` (issue #501)
+
## [v3.0.18]
### Fixed
@@ -1420,7 +1425,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.18...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.19...HEAD
+[v3.0.19]: https://github.com/josephwright/siunitx/compare/v3.0.18...v3.0.19
[v3.0.18]: https://github.com/josephwright/siunitx/compare/v3.0.17...v3.0.18
[v3.0.17]: https://github.com/josephwright/siunitx/compare/v3.0.16...v3.0.17
[v3.0.16]: https://github.com/josephwright/siunitx/compare/v3.0.15...v3.0.16
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index ed17e84c1c..92e8cf9837 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-emulation.dtx b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
index 8e11abda62..92e3671852 100644
--- a/macros/latex/contrib/siunitx/siunitx-emulation.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-emulation.dtx
@@ -1011,6 +1011,8 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Unit commands}
+%
% \begin{macro}{\celsius}
% Deprecated but should work.
% \begin{macrocode}
@@ -1090,6 +1092,53 @@
\q_recursion_stop
% \end{macrocode}
%
+% \subsection{Communication with \pkg{pgf}}
+%
+% \begin{macrocode}
+%<@@=siunitx_number>
+% \end{macrocode}
+%
+% \begin{macro}{\SendSettingsToPgf}
+% \begin{macrocode}
+\NewDocumentCommand \SendSettingsToPgf { }
+ {
+ \use:x
+ {
+ \exp_not:N \pgfqkeys { /pgf/number~format }
+ {
+ \str_if_eq:VnT \l_@@_round_mode_tl { figures }
+ {
+ fixed ,
+ fixed~zerofill = true ,
+ }
+ precision = \int_use:N \l_@@_round_precision_int ,
+ set~decimal~separator =
+ \str_if_eq:VnTF \l_siunitx_number_output_decimal_tl { , }
+ { \exp_not:N \mathord }
+ { \use:n }
+ { \exp_not:V \l_siunitx_number_output_decimal_tl } ,
+ set~thousands~separator =
+ set~decimal~separator =
+ \str_if_eq:VnTF \l_@@_group_separator_tl { , }
+ { \exp_not:N \mathord }
+ { \use:n }
+ { \exp_not:V \l_@@_group_separator_tl } ,
+ min~exponent~for~1000~sep =
+ \int_eval:n { \l_@@_group_minimum_int - 1 } ,
+ \bool_lazy_or:nnF
+ { \l_@@_group_decimal_bool }
+ { \l_@@_group_integer_bool }
+ { min~exponent~for~1000~sep = 999 , }
+ showpos =
+ \bool_if:NTF \l_@@_implicit_plus_bool
+ { true }
+ { false }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</interfaces>
% \end{macrocode}
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 52da6d7b36..7111f98392 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-07-04} {3.0.18}
+\ProvidesExplPackage {siunitx} {2021-07-06} {3.0.19}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index 57e3ffb45e..7ffe026741 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx.tex b/macros/latex/contrib/siunitx/siunitx.tex
index 2be2483297..a97ab0bc58 100644
--- a/macros/latex/contrib/siunitx/siunitx.tex
+++ b/macros/latex/contrib/siunitx/siunitx.tex
@@ -2949,6 +2949,9 @@ has been removed. However, the approach described in
Section~\ref{sec:hint:config} may be used to achieve the same effect with the
additions more clearly shown in document sources.
+The command \cs{SendSettingsToPgf} is deprecated, and should be replaced
+simply by setting the appropriate \cs{pgfkeys} in parallel to \cs{sisetup}.
+
\section{Unit changes made by \acro{BIPM}%
\label{sec:BIPM8}}