[latex3-commits] [git/LaTeX3-latex3-latex3] HiTeX: Add l3sys support for HiTeX (8d75e00da)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Apr 18 12:55:48 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : HiTeX
Link : https://github.com/latex3/latex3/commit/8d75e00da1f68b0381213b5d01d1c68c9c813f30
>---------------------------------------------------------------
commit 8d75e00da1f68b0381213b5d01d1c68c9c813f30
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Apr 18 11:55:48 2023 +0100
Add l3sys support for HiTeX
This is deliberately limited: no new functions,
just sufficient adjustment to allow HiTeX to load
a backend .def file and to avoid incorrect fixed-string
values.
>---------------------------------------------------------------
8d75e00da1f68b0381213b5d01d1c68c9c813f30
l3kernel/CHANGELOG.md | 1 +
l3kernel/l3sys.dtx | 57 ++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/l3kernel/CHANGELOG.md b/l3kernel/CHANGELOG.md
index cc9109562..9ffce62f9 100644
--- a/l3kernel/CHANGELOG.md
+++ b/l3kernel/CHANGELOG.md
@@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers.
### Added
- `\box_set_clipped:N` and variants (renamed from `\box_clip:N`)
+- Limited and _experimental_ support for HiTeX
### Changed
- `\box_set_trim:Nnnnn` and `\box_set_viewport:Nnnnn` moved to
diff --git a/l3kernel/l3sys.dtx b/l3kernel/l3sys.dtx
index 23115dde5..a5ae99472 100644
--- a/l3kernel/l3sys.dtx
+++ b/l3kernel/l3sys.dtx
@@ -328,6 +328,24 @@
% a backend.
% \end{function}
%
+% \subsection{Experimental Hi\TeX{} support}
+%
+% To allow testing with Hi\TeX{}, currently in development to allow reflowable
+% output from \TeX{}, a small number of adjustments are made in the \pkg{l3sys}
+% module if this program is used:
+% \begin{itemize}
+% \item \cs{c_sys_engine_str} will give the value \texttt{hitex};
+% \item \cs{c_sys_engine_exec_str} and \cs{c_sys_engine_format_str} will
+% being with~\texttt{hi};
+% \item \cs{c_sys_output_str} will take value \texttt{hnt};
+% \item Both \cs{sys_if_output_dvi:TF} and \cs{sys_if_output_pdf:} will
+% take the false branches, and the matching predicates will be false.
+% \end{itemize}
+% Note that no \emph{new} functions are defined: the putative
+% \cs{sys_if_engine_hitex:(TF)} is \emph{not} defined, nor is
+% \cs{sys_if_output_hnt:(TF)}. These may be added later depending on the
+% development of Hi\TeX{}.
+%
% \end{documentation}
%
% \begin{implementation}
@@ -384,6 +402,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
@@ -421,6 +440,7 @@
\cs_set_eq:NN \lua_now:e \tex_directlua:D
\str_const:Nx \c_sys_engine_exec_str
{
+ \cs_if_exist:NT \tex_HINTversion:D { hi }
\sys_if_engine_pdftex:T { pdf }
\sys_if_engine_xetex:T { xe }
\sys_if_engine_ptex:T { ep }
@@ -445,6 +465,7 @@
{ \str_if_eq_p:Vn \fmtname { plain } }
{ \str_if_eq_p:Vn \fmtname { LaTeX2e } }
{
+ \cs_if_exist:NT \tex_HINTversion:D { hi }
\sys_if_engine_pdftex:T
{ \int_compare:nNnT { \tex_pdfoutput:D } = { 1 } { pdf } }
\sys_if_engine_xetex:T { xe }
@@ -558,16 +579,20 @@
}
}
{
- \str_case:VnF #1
- {
- { dvipdfmx } { }
- { dvips } { }
- { dvisvgm } { }
- }
+ \cs_if_exist:NTF \tex_HINTversion:D
+ { \tl_gset:Nn #1 { hitex } }
{
- \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 }
+ }
}
}
}
@@ -1031,7 +1056,11 @@ end
\int_compare:nNnTF
{ \cs_if_exist_use:NF \tex_pdfoutput:D { 0 } } > { 0 }
{ pdf }
- { dvi }
+ {
+ \cs_if_exist:NTF \tex_HINTversion:D
+ { hnt }
+ { dvi }
+ }
}
\@@_const:nn { sys_if_output_dvi }
{ \str_if_eq_p:Vn \c_sys_output_str { dvi } }
@@ -1056,13 +1085,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 }
+ {
+ \cs_if_exist:NTF \tex_HINTversion:D
+ { hitex }
+ { dvips }
+ }
}
}
}
More information about the latex3-commits
mailing list.