[latex3-commits] [git/LaTeX3-latex3-latex3] HiTeX: Add l3sys support for HiTeX (e0b4bac72)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Apr 17 18:13:33 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : HiTeX
Link : https://github.com/latex3/latex3/commit/e0b4bac72e1f27110836360ced47abb03ea5183a
>---------------------------------------------------------------
commit e0b4bac72e1f27110836360ced47abb03ea5183a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Apr 17 17:13:33 2023 +0100
Add l3sys support for HiTeX
>---------------------------------------------------------------
e0b4bac72e1f27110836360ced47abb03ea5183a
l3kernel/CHANGELOG.md | 2 +
l3kernel/l3sys.dtx | 70 ++++++++++++++++++++++-----------
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, 88 insertions(+), 24 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index cc9109562..9dc47654d 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,8 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- `\box_set_clipped:N` and variants (renamed from `\box_clip:N`)
+- Support for HiTeX: `\sys_if_engine_hitex:(pTF)`,
+ `\sys_if_output_hnt:(pTF)`
### Changed
- `\box_set_trim:Nnnnn` and `\box_set_viewport:Nnnnn` moved to
diff --git a/l3kernel/l3sys.dtx b/l3kernel/l3sys.dtx
index 23115dde5..b188f4004 100644
--- a/l3kernel/l3sys.dtx
+++ b/l3kernel/l3sys.dtx
@@ -81,8 +81,9 @@
%
% \section{Engine}
%
-% \begin{function}[added = 2015-09-07, EXP, pTF]
+% \begin{function}[added = 2015-09-07, updated = 2023-04-17, EXP, pTF]
% {
+% \sys_if_engine_hitex: ,
% \sys_if_engine_luatex:,
% \sys_if_engine_pdftex:,
% \sys_if_engine_ptex: ,
@@ -102,19 +103,19 @@
%
% \begin{variable}[added = 2015-09-19]{\c_sys_engine_str}
% The current engine given as a lower case string: one of
-% |luatex|, |pdftex|, |ptex|, |uptex| or |xetex|.
+% |hitex|, |luatex|, |pdftex|, |ptex|, |uptex| or |xetex|.
% \end{variable}
%
% \begin{variable}[added = 2020-08-20]{\c_sys_engine_exec_str}
% The name of the standard executable for the current \TeX{} engine given
% as a lower case string: one of |luatex|,
-% |luahbtex|, |pdftex|, |eptex|, |euptex| or |xetex|.
+% |hitex|, |luahbtex|, |pdftex|, |eptex|, |euptex| or |xetex|.
% \end{variable}
%
% \begin{variable}[added = 2020-08-20]{\c_sys_engine_format_str}
% The name of the preloaded format for the current \TeX{} run given
% as a lower case string: one of
-% |lualatex| (or |dvilualatex|),
+% |hilatex|, |lualatex| (or |dvilualatex|),
% |pdflatex| (or |latex|), |platex|, |uplatex| or |xelatex| for \LaTeX{},
% similar names for plain \TeX{} (except \pdfTeX{} in DVI mode yields
% |etex|), and |cont-en| for Con\TeX{}t (i.e.~the
@@ -134,24 +135,24 @@
%
% \section{Output format}
%
-% \begin{function}[added = 2015-09-19, EXP, pTF]
+% \begin{function}[added = 2015-09-19, updated = 2023-04-17, EXP, pTF]
% {
% \sys_if_output_dvi:,
+% \sys_if_output_hnt:,
% \sys_if_output_pdf:
% }
% \begin{syntax}
% \cs{sys_if_output_dvi:TF} \Arg{true code} \Arg{false code}
% \end{syntax}
% Conditionals which give the current output mode the \TeX{} run is
-% operating in. This is always one of two outcomes, DVI mode or
-% PDF mode. The two sets of conditionals are thus complementary and
-% are both provided to allow the programmer to emphasise the most
-% appropriate case.
+% operating in. There are three possible outcomes, the classical
+% \texttt{dvi}, direct \texttt{pdf} creation and the experimental
+% \texttt{hnt} (HINT) format.
% \end{function}
%
-% \begin{variable}[added = 2015-09-19]{\c_sys_output_str}
+% \begin{variable}[added = 2015-09-19, updated = 2023-04-17]{\c_sys_output_str}
% The current output mode given as a lower case string: one of
-% |dvi| or |pdf|.
+% |dvi|, |hnt| or |pdf|.
% \end{variable}
%
% \section{Platform}
@@ -302,6 +303,7 @@
% Set to the name of the backend in use by \cs{sys_load_backend:n} when
% issued. Possible values are
% \begin{itemize}
+% \item \texttt{hitex}
% \item \texttt{pdftex}
% \item \texttt{luatex}
% \item \texttt{xetex}
@@ -372,6 +374,7 @@
%
% \begin{macro}[pTF, EXP]
% {
+% \sys_if_engine_hitex: ,
% \sys_if_engine_luatex:,
% \sys_if_engine_pdftex:,
% \sys_if_engine_ptex:,
@@ -384,6 +387,7 @@
% \begin{macrocode}
\str_const:Nx \c_sys_engine_str
{
+ \cs_if_exist:NT \tex_HINTversion:D { hitex }
\cs_if_exist:NT \tex_luatexversion:D { luatex }
\cs_if_exist:NT \tex_pdftexversion:D { pdftex }
\cs_if_exist:NT \tex_kanjiskip:D
@@ -394,7 +398,8 @@
}
\cs_if_exist:NT \tex_XeTeXversion:D { xetex }
}
-\tl_map_inline:nn { { luatex } { pdftex } { ptex } { uptex } { xetex } }
+\tl_map_inline:nn
+ { { hitex } { luatex } { pdftex } { ptex } { uptex } { xetex } }
{
\@@_const:nn { sys_if_engine_ #1 }
{ \str_if_eq_p:Vn \c_sys_engine_str {#1} }
@@ -421,6 +426,7 @@
\cs_set_eq:NN \lua_now:e \tex_directlua:D
\str_const:Nx \c_sys_engine_exec_str
{
+ \sys_if_engine_hitex:T { hi }
\sys_if_engine_pdftex:T { pdf }
\sys_if_engine_xetex:T { xe }
\sys_if_engine_ptex:T { ep }
@@ -445,6 +451,7 @@
{ \str_if_eq_p:Vn \fmtname { plain } }
{ \str_if_eq_p:Vn \fmtname { LaTeX2e } }
{
+ \sys_if_engine_hitex:T { hi }
\sys_if_engine_pdftex:T
{ \int_compare:nNnT { \tex_pdfoutput:D } = { 1 } { pdf } }
\sys_if_engine_xetex:T { xe }
@@ -558,16 +565,20 @@
}
}
{
- \str_case:VnF #1
+ \sys_if_output_hnt:TF
+ { { \tl_gset:Nn #1 { hitex } } }
{
- { dvipdfmx } { }
- { dvips } { }
- { dvisvgm } { }
- }
- {
- \msg_error:nnxx { sys } { wrong-backend }
- #1 { dvips }
- \tl_gset:Nn #1 { dvips }
+ \str_case:VnF #1
+ {
+ { dvipdfmx } { }
+ { dvips } { }
+ { dvisvgm } { }
+ }
+ {
+ \msg_error:nnxx { sys } { wrong-backend }
+ #1 { dvips }
+ \tl_gset:Nn #1 { dvips }
+ }
}
}
}
@@ -1019,6 +1030,7 @@ end
% \begin{macro}[pTF, EXP]
% {
% \sys_if_output_dvi:,
+% \sys_if_output_hnt:,
% \sys_if_output_pdf:
% }
% \begin{variable}{\c_sys_output_str}
@@ -1031,10 +1043,16 @@ end
\int_compare:nNnTF
{ \cs_if_exist_use:NF \tex_pdfoutput:D { 0 } } > { 0 }
{ pdf }
- { dvi }
+ {
+ \sys_if_engine_hitex:TF
+ { hnt }
+ { dvi }
+ }
}
\@@_const:nn { sys_if_output_dvi }
{ \str_if_eq_p:Vn \c_sys_output_str { dvi } }
+ \@@_const:nn { sys_if_output_hnt }
+ { \str_if_eq_p:Vn \c_sys_output_str { hnt } }
\@@_const:nn { sys_if_output_pdf }
{ \str_if_eq_p:Vn \c_sys_output_str { pdf } }
}
@@ -1056,13 +1074,17 @@ end
\sys_if_engine_xetex:TF
{ xetex }
{
- \sys_if_output_pdf:TF
+ \sys_if_output_pdf:TF
{
\sys_if_engine_pdftex:TF
{ pdftex }
{ luatex }
}
- { dvips }
+ {
+ \sys_if_engine_hitex:TF
+ { hitex }
+ { dvips }
+ }
}
}
}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index c2a3364d8..1104b6569 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index ef4f01570..a62ab41f1 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 7f99c0e3e..4a21f01c0 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index ef4f01570..a62ab41f1 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 6d4216dd0..d33e0952f 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index c2a3364d8..1104b6569 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index ef4f01570..a62ab41f1 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 7f99c0e3e..4a21f01c0 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index ef4f01570..a62ab41f1 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 6d4216dd0..d33e0952f 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -10,6 +10,10 @@ Defining \sys_if_output_dvi:T on line ...
Defining \sys_if_output_dvi:F on line ...
Defining \sys_if_output_dvi:TF on line ...
Defining \sys_if_output_dvi_p: on line ...
+Defining \sys_if_output_hnt:T on line ...
+Defining \sys_if_output_hnt:F on line ...
+Defining \sys_if_output_hnt:TF on line ...
+Defining \sys_if_output_hnt_p: on line ...
Defining \sys_if_output_pdf:T on line ...
Defining \sys_if_output_pdf:F on line ...
Defining \sys_if_output_pdf:TF on line ...
More information about the latex3-commits
mailing list.