summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-05-10 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2023-05-10 03:00:55 +0000
commit5e139880c66c4b758877d1724c95670a40f8c2dc (patch)
tree2dde2243509fd19f3b50dedc6dedf8e03eab45f6 /macros
parent901b036639a3dca060ae150087e7fc5f9fbb5cba (diff)
CTAN sync 202305100300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md22
-rw-r--r--macros/latex/contrib/csvsimple/README.md4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty8
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin75624 -> 72043 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin1102361 -> 921414 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty82
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex168
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin828489 -> 690970 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty6
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex6
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin309282 -> 295749 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty6
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex6
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdfbin930794 -> 945084 bytes
-rw-r--r--macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex83
-rw-r--r--macros/latex/contrib/proflycee/tex/ProfLycee.sty3
-rw-r--r--macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex98
18 files changed, 434 insertions, 62 deletions
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 0b6d22cbd6..769baa5b68 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -16,8 +16,28 @@ and this project adheres to
### Security
+## [2.4.0] - 2023-05-09
-## [2.3.2 - 2022-09-20]
+### Added
+- New additive filter options (issue #24):
+ - `and filter bool`
+ - `and filter fp`
+ - `and filter strcmp`
+ - `and filter not strcmp`
+ - `or filter bool`
+ - `or filter fp`
+ - `or filter strcmp`
+ - `or filter not strcmp`
+- Hook `csvsimple/csvline` added with example for doublequote replacement (issue #19)
+- Option setting `separator = space` (issue #20)
+
+### Changed
+- The content of `range` is now expanded before processing it
+- Implementation of `filter bool`, `filter fp`, `filter strcmp`, `filter not strcmp`
+
+
+
+## [2.3.2] - 2022-09-20
### Fixed
- The `\ifcsvfirstrow` command doesn't work (issue #23)
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index aa8735dd43..f0c928fe02 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,7 +1,7 @@
-# The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+# The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
-> Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+> Copyright (c) 2008-2023 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
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index 853462e22e..b30ec16b39 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,9 +1,9 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.3.2}%
-\def\datum{2022/09/20}%
+\def\version{2.4.0}%
+\def\datum{2023/05/09}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index cdf3523190..13485dc4d8 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 8db7e0cbee..3d0fdd0448 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index fc2ade4296..460c0de9fb 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 96888cea1e..87e48bda79 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README.md
%%
-\ProvidesExplPackage{csvsimple-l3}{2022/09/20}{2.3.2}
+\ProvidesExplPackage{csvsimple-l3}{2023/05/09}{2.4.0}
{LaTeX3 CSV file processing}
@@ -79,7 +79,6 @@
\tl_const:Nn \c__csvsim_par_tl { \par }
-
\tl_new:N \g__csvsim_after_table_tl
\tl_new:N \g__csvsim_before_table_tl
\tl_new:N \g__csvsim_begin_table_center_tl
@@ -114,6 +113,8 @@
\tl_new:N \g__csvsim_table_foot_tl
\tl_new:N \g__csvsim_table_head_tl
+\tl_new:N \l__csvsim_filter_condition_tl
+
\group_begin:
\char_set_catcode_other:n { 9 }
@@ -122,6 +123,7 @@
\regex_const:Nn \c__csvsim_integer_regex {\A\d+\Z}
+\cs_generate_variant:Nn \bool_gset:Nn { NV }
\cs_generate_variant:Nn \seq_gset_split:Nnn { NVV }
@@ -156,6 +158,8 @@
%---- core loop processing
+\NewHook{csvsimple/csvline}
+
\cs_new_protected_nopar:Npn \__csvsim_read_line:
{
\group_begin:
@@ -169,6 +173,7 @@
\msg_error:nnx { csvsimple }{ file-error }{ \g__csvsim_curfilename_str }
}
\group_end:
+ \UseHook{csvsimple/csvline}
}
@@ -621,6 +626,10 @@
\tl_gset:NV \g__csvsim_separator_tl \c__csvsim_tab_str
\csvset{respect~tab}
},
+ separator/space .code:n =
+ {
+ \tl_gset:Nn \g__csvsim_separator_tl {~}
+ },
every~csv .meta:n = {},
no~head .meta:n = { head=false },
no~check~column~count .meta:n = { check~column~count=false },
@@ -679,6 +688,16 @@
}
+\cs_new_protected_nopar:Npn \__csvsim_set_filter_bool:n #1
+ {
+ \tl_set:Nn \l__csvsim_filter_condition_tl { #1 }
+ \tl_gset:Nn \g__csvsim_filter_tl
+ {
+ \bool_gset:NV \g__csvsim_line_accepted_bool \l__csvsim_filter_condition_tl
+ }
+ }
+
+
\NewDocumentCommand \csvfilteraccept { }
{
\__csvsim_set_filter:n
@@ -723,20 +742,52 @@
},
filter~bool .code:n =
{
- \__csvsim_set_filter:n
- {
- \bool_gset:Nn \g__csvsim_line_accepted_bool { #1 }
- }
+ \__csvsim_set_filter_bool:n { #1 }
},
filter~fp .code:n =
{
- \__csvsim_set_filter:n
- {
- \bool_gset:Nn \g__csvsim_line_accepted_bool { \fp_compare_p:n{#1} }
- }
+ \__csvsim_set_filter_bool:n { \fp_compare_p:n {#1} }
+ },
+ filter~strcmp .code:n =
+ {
+ \__csvsim_set_filter_bool:n { \str_if_eq_p:ee #1 }
+ },
+ filter~not~strcmp .code:n =
+ {
+ \__csvsim_set_filter_bool:n { !\str_if_eq_p:ee #1 }
+ },
+ and~filter~bool .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { && #1 }
+ },
+ and~filter~fp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { && \fp_compare_p:n {#1} }
+ },
+ and~filter~strcmp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { && \str_if_eq_p:ee #1 }
+ },
+ and~filter~not~strcmp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { && !\str_if_eq_p:ee #1 }
+ },
+ or~filter~bool .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { || #1 }
+ },
+ or~filter~fp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { || \fp_compare_p:n {#1} }
+ },
+ or~filter~strcmp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { || \str_if_eq_p:ee #1 }
+ },
+ or~filter~not~strcmp .code:n =
+ {
+ \tl_put_right:Nn \l__csvsim_filter_condition_tl { || !\str_if_eq_p:ee #1 }
},
- filter~strcmp .meta:n = { filter~test=\ifcsvstrcmp #1 },
- filter~not~strcmp .meta:n = { filter~test=\ifcsvnotstrcmp #1 },
}
@@ -846,12 +897,13 @@
{ #1 }
}
+\cs_generate_variant:Nn \__csvsim_set_range:n { e }
\keys_define:nn { csvsim }
{
range .code:n =
{
- \__csvsim_set_range:n {#1}
+ \__csvsim_set_range:e {#1}
},
}
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index d2cc219bf8..32595572b5 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,10 +1,10 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -51,7 +51,7 @@
\end{tcolorbox}
{\large Thomas F.~Sturm%
\footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
- Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+ University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip
\normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
\url{https://github.com/T-F-S/csvsimple}
@@ -116,9 +116,10 @@ Mind the following restrictions:
\item Values are expected to be comma separated, but the package
provides support for other separators, see \Fullref{sec:separators}.
\item Values are expected to be either not quoted or quoted with
- curly braces |{}| of \TeX\ groups. Other quotes like doublequotes
+ curly braces |{}| of \TeX\ groups. Other quotes like double-quotes
are not supported directly, but can be achieved
with external tools, see \Fullref{sec:importeddata}.
+ For approximate patching see \Fullref{sec:hooks}.
\item Every data line is expected to contain the same amount of values.
Unfeasible data lines are silently ignored by default, but this can
be configured, see \Fullref{sec:consistency}.
@@ -209,7 +210,7 @@ way.
\end{dispExample}
\smallskip
-An even more comfortable and preferrable way to create a table is setting
+An even more comfortable and preferable way to create a table is setting
appropriate option keys. Note, that this gives you the possibility to create a
meta key (called style here) which contains the whole table creation
using \refCom{csvstyle} or |keys_define:nn| from |l3keys|.
@@ -741,7 +742,7 @@ purpose:
\csvreader{grade.csv}{}{}%
The last file consists of \thecsvcolumncount{} columns and
\thecsvrow{} accepted data lines. The total number of lines
-ist \thecsvinputline{}.
+is \thecsvinputline{}.
\end{dispExample}
\end{docCommands}
@@ -754,7 +755,7 @@ ist \thecsvinputline{}.
current number of all data lines including the header line and all
lines filtered out.
Despite of the name, there is no associated \LaTeX\ counter |csvinputline|,
- but \refCom{thecsvinputline} is an accessor the \LaTeX3 integer
+ but \refCom{thecsvinputline} accesses the \LaTeX3 integer
\refCom{g_csvsim_inputline_int}.
\begin{dispExample}
\csvreader[
@@ -990,7 +991,7 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}.
\subsection{Consistency Check}\label{sec:consistency}%
\begin{docCsvKey}{check column count}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
- This key defines, wether the number of entries in a data line is checked against
+ This key defines, whether the number of entries in a data line is checked against
an expected value or not.\\
If |true|, every non consistent line is ignored without announcement.\\
If |false|, every line is accepted and may produce an error during
@@ -1033,10 +1034,10 @@ if they fulfill a given \emph{condition}.
The following string compare filters \refKey{/csvsim/filter strcmp} and
\refKey{/csvsim/filter equal} are identical by logic, but differ in implementation.
-\begin{docCsvKey}{filter strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}[][doc updated=2022-10-21]{filter strcmp}{=\marg{stringA}\marg{stringB}}{no default}
Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
are accepted.
- The implementation is done with \refCom{ifcsvstrcmp}.
+ The implementation is done with \docAuxCommand*{str_if_eq_p:ee}.
\begin{dispExample}
% \usepackage{booktabs}
\csvreader[
@@ -1052,28 +1053,28 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
\end{docCsvKey}
-\begin{docCsvKey}{filter not strcmp}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}[][doc updated=2022-10-21]{filter not strcmp}{=\marg{stringA}\marg{stringB}}{no default}
Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
are accepted.
- The implementation is done with \refCom{ifcsvnotstrcmp}.
+ The implementation is done with \docAuxCommand*{str_if_eq_p:ee}.
\end{docCsvKey}
-\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{style, no default}
+\begin{docCsvKey}{filter equal}{=\marg{stringA}\marg{stringB}}{no default}
Only lines where \meta{stringA} and \meta{stringB} are equal after expansion
are accepted.
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}
+\begin{docCsvKey}{filter not equal}{=\marg{stringA}\marg{stringB}}{no default}
Only lines where \meta{stringA} and \meta{stringB} are not equal after expansion
are accepted.
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}
+\begin{docCsvKey}[][doc new and updated={2021-06-25}{2022-10-21}]{filter fp}{=\marg{floating point expression}}{no default}
Only data lines which fulfill a \LaTeX3 \meta{floating point expression}
(|l3fp|, \ctanpkg{xfp}) are accepted.
\begin{dispExample}
@@ -1095,7 +1096,7 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
\clearpage
-\begin{docCsvKey}[][doc new=2021-06-25]{filter bool}{=\meta{boolean expression}}{no default}
+\begin{docCsvKey}[][doc new and updated={2021-06-25}{2022-10-21}]{filter bool}{=\marg{boolean expression}}{no default}
Only data lines which fulfill a \LaTeX3 \meta{boolean expression} are accepted.
Note that such an \meta{boolean expression} needs expl3 code.
To preprocess the data line before testing the \meta{boolean expression},
@@ -1108,8 +1109,8 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
{
filter~bool =
{
- \int_compare_p:n { \matriculation > 20000 } &&
- \str_compare_p:eNe { \gender } = { m }
+ \int_compare_p:n { \matriculation > 20000 } &&
+ \str_if_eq_p:ee { \gender }{ m }
}
}
\ExplSyntaxOff
@@ -1136,8 +1137,8 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
%>> list only matriculation numbers greater than 20000, list only men <<
\csvfilterbool{myfilter}
{
- \int_compare_p:n { \matriculation > 20000 } &&
- \str_compare_p:eNe { \gender } = { m }
+ \int_compare_p:n { \matriculation > 20000 } &&
+ \str_if_eq_p:ee { \gender }{ m }
}
\ExplSyntaxOff
@@ -1154,6 +1155,85 @@ The following string compare filters \refKey{/csvsim/filter strcmp} and
\end{docCommand}
+\clearpage
+
+The following filter options are \emph{appendable} to the expl3 based
+filter options:
+\begin{itemize}
+\item \refKey{/csvsim/filter strcmp}
+\item \refKey{/csvsim/filter not strcmp}
+\item \refKey{/csvsim/filter fp}
+\item \refKey{/csvsim/filter bool}
+\end{itemize}
+
+\begin{docCsvKeys}[
+ doc parameter = {=\marg{stringA}\marg{stringB}},
+ doc description = {no default},
+ doc new = {2022-10-21}
+ ]
+ {
+ { doc name = and filter strcmp },
+ { doc name = or filter strcmp },
+ }
+ Like \refKey{/csvsim/filter strcmp}, but appended to a required existing
+ expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+
+\begin{dispExample}
+\csvreader[
+ head to column names,
+ tabular = llll,
+ table head = \toprule & \bfseries Name & \bfseries Matr & \bfseries Grade\\\midrule,
+ table foot = \bottomrule,
+ filter fp = {\matriculation>20000},
+ and filter strcmp = {\gender}{m},
+ ]{grade.csv}{}{%
+ \thecsvrow & \slshape\name, \givenname & \matriculation & \grade
+ }
+\end{dispExample}
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+ doc parameter = {=\marg{stringA}\marg{stringB}},
+ doc description = {no default},
+ doc new = {2022-10-21}
+ ]
+ {
+ { doc name = and filter not strcmp },
+ { doc name = or filter not strcmp },
+ }
+ Like \refKey{/csvsim/filter not strcmp}, but appended to a required existing
+ expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+ doc parameter = {=\marg{floating point expression}},
+ doc description = {style,no default},
+ doc new = {2022-10-21}
+ ]
+ {
+ { doc name = and filter fp },
+ { doc name = or filter fp },
+ }
+ Like \refKey{/csvsim/filter fp}, but appended to a required existing
+ expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
+
+\begin{docCsvKeys}[
+ doc parameter = {=\marg{boolean expression}},
+ doc description = {style,no default},
+ doc new = {2022-10-21}
+ ]
+ {
+ { doc name = and filter bool },
+ { doc name = or filter bool },
+ }
+ Like \refKey{/csvsim/filter bool}, but appended to a required existing
+ expl3 based filter with \emph{and} (|&&|) resp. \emph{or} (\texttt{\textbar\textbar}).
+\end{docCsvKeys}
+
\clearpage
@@ -1291,7 +1371,7 @@ and 42 lines are accepted, a \emph{range} could select the first 20 of them or
line 10 to 30 of the accepted lines.
-\begin{docCsvKey}[][doc new=2021-06-29]{range}{=\brackets{\meta{range1},\meta{range2},\meta{range3},... }}{no default, initially empty}
+\begin{docCsvKey}[][doc new and updated={2021-06-29}{2022-09-21}]{range}{=\brackets{\meta{range1},\meta{range2},\meta{range3},... }}{no default, initially empty}
Defines a comma separated list of line ranges. If a line number \refCom{thecsvrow}
satisfies one or more of the given \meta{range1}, \meta{range2}, \ldots,
the corresponding line is processed and displayed.
@@ -1701,7 +1781,7 @@ as normal characters (|\catcode| 12, other), if one or more of the following opt
\subsection{Separators}\label{sec:separators}%
\begin{docCsvKey}{separator}{=\meta{sign}}{no default, initially |comma|}
\catcode `|=12
- Sets the \meta{sign} which is treates as separator between the data values
+ Sets the \meta{sign} which is treated as separator between the data values
of a data line. Feasible values are:
\begin{itemize}
\item\docValue{comma}: This is the initial value with '\texttt{,}' as separator.
@@ -1737,6 +1817,23 @@ as normal characters (|\catcode| 12, other), if one or more of the following opt
\item\docValue{tab}: Sets the separator to the tabulator sign.
Automatically, \refKey{/csvsim/respect tab} is set also.
+
+\clearpage
+\item\docValue{space}:\tcbdocmarginnote{\tcbdocnew{2023-05-08}}
+ Sets the separator to space(s).
+\begin{dispExample}
+% \usepackage{tcolorbox} for tcbverbatimwrite
+\begin{tcbverbatimwrite}{space.csv}
+ name givenname matriculation gender grade
+ Maier Hans 12345 m 1.0
+ Huber Anna 23456 f 2.3
+ Weißbäck Werner 34567 m 5.0
+\end{tcbverbatimwrite}
+
+\csvautobooktabular[separator=space]{space.csv}
+\end{dispExample}
+ Note that leading spaces are ignored and multiple spaces are treated as one space.
+ To denote an empty data cell insert \verb+{}+, e.g. \verb*+1 {} 3+.
\end{itemize}
\end{docCsvKey}
@@ -2188,6 +2285,31 @@ The following number tests are wrappers for corresponding \LaTeX3 conditionals.
\clearpage
+\section{Hooks}\label{sec:hooks}%
+The following hook(s) are present following \LaTeX's hook management.
+
+\begin{description}
+\item[\textcolor{DarkViolet}{\ttfamily csvsimple/csvline}]
+ \tcbdocmarginnote{\tcbdocnew{2023-05-08}}
+ This hook adds code after reading
+ a line into \refCom{csvline} and before processing this line.
+ The token list \refCom{csvline} may be manipulated with a global assignment.\par
+ The following example replaces every \verb+"..."+ by \verb+{...}+ to
+ approximate double-quote processing within \LaTeX. Still, masking of double-quotes
+ or nesting will not work.
+\begin{dispListing}
+\AddToHook{csvsimple/csvline}
+ {
+ \tl_set_eq:NN \l_tmpa_tl \csvline
+ \regex_replace_all:nnN { "([^"]+)" } { {\1} } \l_tmpa_tl
+ \tl_gset_eq:NN \csvline \l_tmpa_tl
+ }
+\end{dispListing}
+
+\end{description}
+
+
+\clearpage
\section{Examples}%
\subsection{A Serial Letter}%
@@ -2465,7 +2587,7 @@ tables generated by |csvsimple-l3| is the |\tablenum| macro from
\clearpage
-It is also possible to create on-the-fly tables using calcations of
+It is also possible to create on-the-fly tables using calculations of
the given data. The following example shows cat values bisected and
dog values doubled.
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index e68b2fc161..ebf97bfd4e 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 e586e36043..915d318c27 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2022/09/20 version 2.3.2 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2023/05/09 version 2.4.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 e2df6cc2f4..1fe95b89b8 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,10 +1,10 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -45,7 +45,7 @@
\end{tcolorbox}
{\large Thomas F.~Sturm%
\footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
- Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+ University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip
\normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
\url{https://github.com/T-F-S/csvsimple}
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 1a75caa2ea..8a9fb039bb 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 aef303b402..ae9306a2a8 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,8 +1,8 @@
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -19,7 +19,7 @@
%%
\RequirePackage{l3keys2e}
-\ProvidesExplPackage{csvsimple}{2022/09/20}{2.3.2}
+\ProvidesExplPackage{csvsimple}{2023/05/09}{2.4.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 450b45b4d3..5aa9e34ca7 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,10 +1,10 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.3.2 (2022/09/20)
+%% The LaTeX package csvsimple - version 2.4.0 (2023/05/09)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
-%% Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% Copyright (c) 2008-2023 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
%% -------------------------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -43,7 +43,7 @@
\end{tcolorbox}
{\large Thomas F.~Sturm%
\footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
- Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+ University of the Bundeswehr Munich, D-85577 Neubiberg, Germany;
email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}}\par\medskip
\normalsize\url{https://www.ctan.org/pkg/csvsimple}\par
\url{https://github.com/T-F-S/csvsimple}
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
index 59e4a2b8b9..f3ed122090 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
index 1d1638cbee..9301ef24f3 100644
--- a/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
+++ b/macros/latex/contrib/proflycee/doc/ProfLycee-doc.tex
@@ -5,8 +5,8 @@
% arara: lualatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
\documentclass[a4paper,french,11pt]{article}
-\def\PLversion{2.6.2}
-\def\PLdate{3 mai 2023}
+\def\PLversion{2.6.3}
+\def\PLdate{9 mai 2023}
\usepackage{ProfLycee}
\useproflyclib{piton,minted,pythontex}
\usepackage[math-style=french]{fourier-otf}
@@ -595,6 +595,9 @@ Elles sont présentées de manière \textit{succincte}, mais elles sont présent
%Valeur approchée d'une intégrale
\IntegraleApprochee[clés]{fonction}{a}{b}
+
+%Équation réduite d'une droite
+\EquationReduite[option]{A/xa/ya,B/xb/yb}
\end{PresCodeTexPL}
\begin{PresCodeTexPL}{listing only}
@@ -1177,6 +1180,80 @@ $\displaystyle\IntegraleApprochee[NbSubDiv=100,AffFormule,Expr={80x\,\text{e}^{-
\newpage
+\section{Équation réduite d'une droite}\label{eqreduite}
+
+\subsection{Idée}
+
+\begin{tipblock}
+\cmaj{2.6.3} L'idée est de proposer une commande pour déterminer l'équation réduite d'une droite passant par deux points :
+\begin{itemize}
+ \item en traitant les cas particuliers \textit{horizontale}, \textit{verticale} ;
+ \item en affichant une méthode de résolution ;
+ \item en travaillant sous forme exacte fractionnaire (les racines carrées ou autres ne seront pas gérés).
+\end{itemize}
+
+À noter que les calculs et résultats sont traités par la commande de \textit{conversion de fraction} de \ctex{ProfLycee}.
+\end{tipblock}
+
+\begin{warningblock}
+La commande se charge de formater (normalement !) correctement les différentes étapes de calculs (il se peut quand même que cela puisse ne pas donner le résultat réellement escompté\ldots) :
+
+\begin{itemize}
+ \item en travaillant en fraction ;
+ \item en mettant les parenthèses nécessaires devant les éventuels nombres négatifs ;
+ \item en traitant les cas particuliers $m=\pm1$ et $b=0$.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{warningblock}
+
+\begin{PresCodeTexPL}{listing only}
+\EquationReduite[option]{A/xa/ya,B/xb/yb}
+\end{PresCodeTexPL}
+
+\subsection{Clés et arguments}
+
+\begin{cautionblock}
+Concernant le fonctionnement de la commande :
+
+\begin{itemize}
+ \item le premier argument, optionnel et entre \ctex{[...]} et valant \Cle{[d]} par défaut, permet de formater les fractions éventuelles en mode \ctex{\textbackslash displaystyle} ;
+ \item le second argument, obligatoire et entre \ctex{\{...\}}, permet de donner les coordonnées des points concernés.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{PresCodePL}{}
+\EquationReduite{C/2/0,D/-2/-8}
+\end{PresCodePL}
+
+\subsection{Exemples}
+
+\begin{PresCodePL}{}
+\EquationReduite{I/-4/5,J/-4/12}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\EquationReduite{U/-4/5,V/-4/5}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\EquationReduite{L/10/7,M/-2/7}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\EquationReduite{L/{1/3}/2.5,M/{-5/7}/{3/5}}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\EquationReduite{P/4/-4,Q/-2/2}
+\end{PresCodePL}
+
+\begin{PresCodePL}{}
+\EquationReduite{G/-4/5,H/10/4}
+\end{PresCodePL}
+
+\newpage
+
\phantom{t}\par\vfill\par
\begin{PART}
\begin{center}
@@ -6490,6 +6567,8 @@ La grille, créée en \TikZ, est portée par le rectangle de \og coins \fg{} $(0
\part{Historique}
+{\small \bverb|v 2.6.3|~:~~~~Ajout d'une commande pour déterminer une équation réduite (page \pageref{eqreduite})
+
{\small \bverb|v 2.6.2|~:~~~~Ajout d'une clé [AffTraitsEq] pour les équations trigo (page \pageref{cercletrigo})
{\small \bverb|v 2.6.1|~:~~~~Ajout de commandes pour du calcul intégral (pages \pageref{calcintegr} et \pageref{integrtikz})
diff --git a/macros/latex/contrib/proflycee/tex/ProfLycee.sty b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
index 4056245d3e..322e4ad25d 100644
--- a/macros/latex/contrib/proflycee/tex/ProfLycee.sty
+++ b/macros/latex/contrib/proflycee/tex/ProfLycee.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfLycee}[2023/05/03 2.6.2 Aide pour l'utilisation de LaTeX en lycee]
+\ProvidesPackage{ProfLycee}[2023/05/09 2.6.3 Aide pour l'utilisation de LaTeX en lycee]
+% 2.6.3 Ajout d'une commande pour l'équation affine d'une droite passant par deux points
% 2.6.2 Correction de commandes pour la pseudo3d + nouvelle clé pour la trigo
% 2.6.1 Ajout de commandes pour du calcul intégral (valeur approchée + tikz)
% 2.6.0 Ajout d'une clé [Brut] pour les mesures principales + commande calcul ligne trigo
diff --git a/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex b/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
index e1ccba52d6..0e8906ee96 100644
--- a/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
+++ b/macros/latex/contrib/proflycee/tex/proflycee-tools-analyse.tex
@@ -531,4 +531,102 @@
{}%
}
+%==fonction affine==
+\NewDocumentCommand\AffCoeffFAm{ O{d} m }{%
+ \xintifboolexpr{#2 == 0}{}{}%
+ \xintifboolexpr{#2 == 1}{x}{}%
+ \xintifboolexpr{#2 == -1}{-x}{}%
+ \xintifboolexpr{#2 != 0 'and' #2 !=1 'and' #2 != -1}{\ConversionFraction[#1]{#2} x}{}%
+}
+
+\NewDocumentCommand\AffCoeffFAp{ O{d} m }{%
+ \xintifboolexpr{#2 == 0}%
+ {}%
+ {%
+ \xintifboolexpr{#2 > 0}{+\ConversionFraction[#1]{#2}}{\ConversionFraction[#1]{#2}}%
+ }%
+}
+
+\NewDocumentCommand\AffCoeffFloatPa{ O{d} m }{%
+ \IfDecimal{#2}%
+ {%
+ \xintifboolexpr{#2 < 0}%
+ {\left(\num{#2}\right)}%
+ {\num{#2}}%
+ }%
+ {%
+ \xintifboolexpr{#2 < 0}%
+ {\left(\ConversionFraction[#1]{#2}\right)}%
+ {\ConversionFraction[#1]{#2}}%
+ }%
+}
+
+\NewDocumentCommand\AffCoeffFloat{ O{d} m }{%
+ \IfDecimal{#2}%
+ {%
+ {\num{#2}}%
+ }%
+ {%
+ {\ConversionFraction[#1]{#2}}%
+ }%
+}
+
+\NewDocumentCommand\AffCoeffPa{ O{d} m }{%
+ \xintifboolexpr{#2 < 0}%
+ {\left(\ConversionFraction[#1]{#2}\right)}%
+ {\ConversionFraction[#1]{#2}}%
+}
+
+\NewDocumentCommand\EquationReduite{ O{d} m}{%
+ \setsepchar[*]{,*/}%
+ \readlist*\ListePoints{#2}%
+ %Les cas particuliers
+ \xintifboolexpr{\ListePoints[2,2] == \ListePoints[1,2] 'and' \ListePoints[2,3] == \ListePoints[1,3] }%
+ {
+ Les deux points donnés sont identiques, donc pas de droite\ldots
+ }%
+ {}%
+ \xintifboolexpr{\ListePoints[2,2] == \ListePoints[1,2] 'and' \ListePoints[2,3] != \ListePoints[1,3] }%
+ {
+ Étant donné que $x_{\ListePoints[1,1]} = x_{\ListePoints[2,1]}$, la droite $(\ListePoints[1,1]\ListePoints[2,1])$ est verticale, dont une équation est $x=\ConversionFraction[#1]{\ListePoints[1,2]}$.
+ }%
+ {}%
+ \xintifboolexpr{\ListePoints[2,2] != \ListePoints[1,2] 'and' \ListePoints[2,3] == \ListePoints[1,3] }%
+ {%
+ Étant donné que $y_{\ListePoints[1,1]} = y_{\ListePoints[2,1]}$, la droite $(\ListePoints[1,1]\ListePoints[2,1])$ est horizontale, dont une équation est $y=\ConversionFraction[#1]{\ListePoints[1,3]}$.
+ }%
+ {}%
+ \xintifboolexpr{\ListePoints[2,2] != \ListePoints[1,2] 'and' \ListePoints[2,3] != \ListePoints[1,3] }%
+ {%
+ \itemtomacro\ListePoints[1,1]\NomA%
+ \itemtomacro\ListePoints[2,1]\NomB%
+ \itemtomacro\ListePoints[1,2]\xA%
+ \itemtomacro\ListePoints[1,3]\yA%
+ \itemtomacro\ListePoints[2,2]\xB%
+ \itemtomacro\ListePoints[2,3]\yB%
+ \xdef\CoeffDirBrut{\xinteval{(\yB-\yA)/(\xB-\xA)}}%
+ \xdef\OrdoOrigBrut{\xinteval{\yB-(\CoeffDirBrut*\xB)}}%
+ \xdef\CoeffDirConv{\ConversionFraction{(\yB-\yA)/(\xB-\xA)}}%
+ \xdef\OrdoOrigConv{\ConversionFraction{\yB-(\CoeffDirBrut*\xB)}}%
+ Afin de déterminer l'équation réduite d'une droite passant par les points $\NomA$ et $\NomB$, on doit d'abord déterminer le coefficient directeur $m$ :
+ \[m=\frac{y_\NomB-y_\NomA}{x_\NomB-x_\NomA}=
+ \frac{\AffCoeffFloat[]{\yB}-\AffCoeffFloatPa[]{\yA}}{\AffCoeffFloat[]{\xB}-\AffCoeffFloatPa[]{\xA}}=
+ \frac{\ConversionFraction{\xinteval{\yB-\yA}}}{\ConversionFraction{\xinteval{\xB-\xA}}}=
+ \ConversionFraction{\CoeffDirBrut}\]%
+ %
+ L'équation réduite de la droite est donc de la forme $(\NomA\NomB)$ : $y=\AffCoeffFAm[#1]{\CoeffDirBrut}+p$.\par
+ %
+ Il faut enfin déterminer l'ordonnée à l'origine $p$.\par
+ %
+ On sait que la droite passe par le point $\NomA$, donc les coordonnées $\NomA\left(\AffCoeffFloat[]{\xA};\AffCoeffFloat[]{\yA}\right)$ vérifient l'équation. On a alors :
+ %
+ \[y_\NomA=\ConversionFraction{\CoeffDirBrut} \times x_\NomA+p
+ \implies
+ \AffCoeffFloat[#1]{\yA} = \ConversionFraction{\CoeffDirBrut} \times \AffCoeffFloatPa[#1]{\xA} + p \implies p = \AffCoeffFloat[#1]{\yA} - \left(\ConversionFraction{\CoeffDirBrut} \times \AffCoeffFloatPa{\xA}\right) \implies p = \OrdoOrigConv\]
+ %
+ Donc l'équation réduite de $(\NomA\NomB)$ est $y=\AffCoeffFAm[#1]{\CoeffDirBrut} \AffCoeffFAp[#1]{\OrdoOrigBrut}$.
+ }%
+ {}%
+}
+
\endinput \ No newline at end of file