[latex3-commits] [git/LaTeX3-latex3-latex3] master: Added \legacy_if:n(TF) (221e656)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu May 2 20:06:59 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/221e6563b77a8990be0de510adec28d485d15683
>---------------------------------------------------------------
commit 221e6563b77a8990be0de510adec28d485d15683
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu May 2 19:05:02 2019 +0100
Added \legacy_if:n(TF)
>---------------------------------------------------------------
221e6563b77a8990be0de510adec28d485d15683
l3kernel/CHANGELOG.md | 5 +++++
l3kernel/l3legacy.dtx | 28 ++++++++++++++++++++++++++++
l3kernel/testfiles/m3expl001.luatex.tlg | 4 ++++
l3kernel/testfiles/m3expl001.ptex.tlg | 4 ++++
l3kernel/testfiles/m3expl001.tlg | 4 ++++
l3kernel/testfiles/m3expl001.uptex.tlg | 4 ++++
l3kernel/testfiles/m3expl001.xetex.tlg | 4 ++++
l3kernel/testfiles/m3expl003.luatex.tlg | 4 ++++
l3kernel/testfiles/m3expl003.ptex.tlg | 4 ++++
l3kernel/testfiles/m3expl003.tlg | 4 ++++
l3kernel/testfiles/m3expl003.uptex.tlg | 4 ++++
l3kernel/testfiles/m3expl003.xetex.tlg | 4 ++++
12 files changed, 73 insertions(+)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index fb46686..51d764a 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -7,6 +7,11 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Added
+
+- New `l3legacy` module containing
+ - `\legacy_if:n(TF)`
+
## [2019-04-21]
### Added
diff --git a/l3kernel/l3legacy.dtx b/l3kernel/l3legacy.dtx
index 86be273..1095a31 100644
--- a/l3kernel/l3legacy.dtx
+++ b/l3kernel/l3legacy.dtx
@@ -49,6 +49,20 @@
%
% \begin{documentation}
%
+% There are a small number of \TeX{} or \LaTeXe{} concepts which are not used
+% in \pkg{expl3} code but which need to be manipulated when working as a \LaTeXe{}
+% package. To allow these to be integrated cleanly into \pkg{expl3} code, a set
+% of legacy interfaces are provided here.
+%
+% \begin{function}[EXP,pTF]{\legacy_if:n}
+% \begin{syntax}
+% \cs{legacy_if:nTF} \Arg{name} \Arg{true code} \Arg{false code}
+% \end{syntax}
+% Tests if the \LaTeXe{}/plain \TeX{} conditional (generated by \tn{newif})
+% if \texttt{true} or \texttt{false} and branches accordingly. The
+% \meta{name} of the conditional should \emph{omit} the leading \texttt{if}.
+% \end{function}
+%
% \end{documentation}
%
% \begin{implementation}
@@ -63,6 +77,20 @@
%<@@=legacy>
% \end{macrocode}
%
+% \begin{macro}[EXP,pTF]{\legacy_if:n}
+% A friendly wrapper.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF }
+ {
+ \exp_args:Nc \if_meaning:w { if#1 } \iftrue
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 44c2961..fe7be97 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -6213,6 +6213,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 95662fb..4d4e3ff 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -6211,6 +6211,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 333168b..ee37c44 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -6511,6 +6511,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 2a5a6fe..d265d55 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -6508,6 +6508,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index fcbf919..c0549a7 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -6212,6 +6212,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 44c2961..fe7be97 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -6213,6 +6213,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 95662fb..4d4e3ff 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -6211,6 +6211,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 333168b..ee37c44 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -6511,6 +6511,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 2a5a6fe..d265d55 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -6508,6 +6508,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index fcbf919..c0549a7 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -6212,6 +6212,10 @@ Defining \__peek_collect:NNn on line ...
Defining \__peek_collect_true:w on line ...
Defining \__peek_collect:N on line ...
Defining \__peek_collect_remove:nw on line ...
+Defining \legacy_if_p:n on line ...
+Defining \legacy_if:nT on line ...
+Defining \legacy_if:nF on line ...
+Defining \legacy_if:nTF on line ...
Defining \l__deprecation_grace_period_bool on line ...
Defining \__deprecation_date_compare:nNnTF on line ...
Defining \__deprecation_date_compare_aux:w on line ...
More information about the latex3-commits
mailing list