[latex3-commits] [latex3/xfrac] main: Load xtemplate only if necessary (0db8abb)
github at latex-project.org
github at latex-project.org
Tue Feb 13 18:37:08 CET 2024
Repository : https://github.com/latex3/xfrac
On branch : main
Link : https://github.com/latex3/xfrac/commit/0db8abbbc7847ac5228736b9375cbaca97503c87
>---------------------------------------------------------------
commit 0db8abbbc7847ac5228736b9375cbaca97503c87
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Feb 13 17:37:08 2024 +0000
Load xtemplate only if necessary
Unlike other changes, this is prep. work but means
things should 'just work' from June.
>---------------------------------------------------------------
0db8abbbc7847ac5228736b9375cbaca97503c87
xfrac.dtx | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/xfrac.dtx b/xfrac.dtx
index 81512d2..e727bca 100644
--- a/xfrac.dtx
+++ b/xfrac.dtx
@@ -24,7 +24,7 @@
% for those people who are interested.
%
%<*driver|package>
-\RequirePackage{amstext,graphicx,xtemplate}
+\RequirePackage{amstext,graphicx}
%</driver|package>
%<*driver>
\documentclass[full]{l3doc}
@@ -563,6 +563,12 @@
}
% \end{macrocode}
%
+% \begin{macrocode}
+\IfFormatAtLeastTF { 2024-06-01 }
+ { }
+ { \RequirePackage { xtemplate } }
+% \end{macrocode}
+%
% \begin{variable}{\l_@@_slash_box}
% \begin{variable}{\l_@@_tmp_box}
% In keeping with the \LaTeX3 philosophy, rather than use generic
@@ -692,7 +698,10 @@
% There is only one object type in \pkg{xfrac}, rather unimaginatively
% named \texttt{xfrac}.
% \begin{macrocode}
-\DeclareObjectType { xfrac } { 3 }
+\IfFormatAtLeastTF { 2024-06-01 }
+ { \NewTemplateType }
+ { \DeclareObjectType }
+ { xfrac } { 3 }
% \end{macrocode}
%
% A single template interface is used for both text and math(s), which
More information about the latex3-commits
mailing list.