texlive[67198] Master/texmf-dist: templatetools (23may23)

commits+karl at tug.org commits+karl at tug.org
Tue May 23 21:48:02 CEST 2023


Revision: 67198
          http://tug.org/svn/texlive?view=revision&revision=67198
Author:   karl
Date:     2023-05-23 21:48:02 +0200 (Tue, 23 May 2023)
Log Message:
-----------
templatetools (23may23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/templatetools/templatetools.pdf
    trunk/Master/texmf-dist/source/latex/templatetools/templatetools.dtx
    trunk/Master/texmf-dist/tex/latex/templatetools/templatetools.sty

Modified: trunk/Master/texmf-dist/doc/latex/templatetools/templatetools.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/templatetools/templatetools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/templatetools/templatetools.dtx	2023-05-23 18:34:15 UTC (rev 67197)
+++ trunk/Master/texmf-dist/source/latex/templatetools/templatetools.dtx	2023-05-23 19:48:02 UTC (rev 67198)
@@ -2,11 +2,11 @@
 % !TeX spellcheck = en-US
 % 
 % File:      templatetools.sty
-% Version:   2014/06/27 v0.1
+% Version:   2023/03/26 v0.1
 % Author:    Matthias Pospiech
 % Email:     <matthias at pospiech.eu>
 %
-% Copyright (C) 2014 by Matthias Pospiech <matthias at pospiech.eu>
+% Copyright (C) 2023 by Matthias Pospiech <matthias at pospiech.eu>
 % ---------------------------------------------------------------------------
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either version 1.3
@@ -32,7 +32,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{templatetools}
 %<*package>
-    [2014/06/27 v0.1 Collection of conditional commands useful inside templates]
+    [2023/03/26 v0.2 Collection of conditional commands useful inside templates]
 %</package>
 %
 %<*driver>
@@ -46,7 +46,7 @@
 %
 \usepackage{lmodern}
 
-\usepackage{templatetools}[2014/06/27]
+\usepackage{templatetools}[2023/03/26]
 
 \EnableCrossrefs  % (default) Every new macro name used within a macrocode or
                   % macrocode∗ environment will produce an index entry.
@@ -92,7 +92,8 @@
 %   Right brace   \}     Tilde         \~}
 %
 %
-% \changes{v0.1}{2014/06/27}{Converted to DTX file}
+% \changes{v0.1}{2017-10-12}{Converted to DTX file}
+% \changes{v0.2}{2023/03/26}{Added checking of bib environments}
 %
 % \DoNotIndex{\newcommand,\newenvironment}
 %
@@ -358,6 +359,9 @@
 % \DescribeMacro{\IfGlossariesStyleDefined} 
 % \marg{style name}\marg{is defined} \AfterLastParam
 %
+% \subsection{Bib environments}
+% \DescribeMacro{\IfBibEnvironmentDefined} 
+% \marg{environment name}\marg{is defined} \AfterLastParam
 %
 % \subsection{Template Definitions}
 % The following commands in principle define only macros, but in contrast to 
@@ -406,12 +410,12 @@
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
 \ProvidesPackage{templatetools}
-          [2014/06/27 v0.1 Collection of conditional commands useful inside templates]
+          [2023/03/26 v0.2 Collection of conditional commands useful inside templates]
 %    \end{macrocode}
 %    \begin{macrocode}
 %%% --- Necessary Packages
 %%% ------------------------------------------------------------------
-\RequirePackage{ifpdf}
+\RequirePackage{iftex}
 \RequirePackage{etoolbox}
 \RequirePackage{ltxcmds}
 \RequirePackage{array} % for column types
@@ -544,7 +548,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\IfElsePackageLoaded\}
+% \begin{macro}{\IfElsePackageLoaded}
 % Wrapper to \cs{ltx at ifpackageloaded}
 %    \begin{macrocode}
 \let\IfElsePackageLoaded\ltx at ifpackageloaded
@@ -813,8 +817,24 @@
 % Thanks to \person{cgnieder} on 
 %\href{http://tex.stackexchange.com/questions/95639/test-if-a-listings-or-glossaries-style-is-valid}{tex.stackexchange.com}
 % for the help to implement the command.
-
-
+%
+% \subsection{BibLaTeX Enivronemnts}
+%
+% \iffalse
+% ------------------------------------------------------------------
+% tests the existens of a bib environment
+% ------------------------------------------------------------------
+% \fi
+%
+% \begin{macro}{\IfBibEnvironmentDefined}
+% Checks if a bib environment is defined.  
+%    \begin{macrocode}
+\newcommand{\IfBibEnvironmentDefined}[1]{\ifcsdef{blx at env@#1}}
+%    \end{macrocode}
+% \end{macro}
+%
+% Thanks to \person{egreg} on \href{https://tex.stackexchange.com/questions/451911/check-if-a-bib-environment-is-defined}{tex.stackexchange.com} for the help to implement the command.
+%
 % \subsection{Template definitions}
 %
 % \iffalse

Modified: trunk/Master/texmf-dist/tex/latex/templatetools/templatetools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/templatetools/templatetools.sty	2023-05-23 18:34:15 UTC (rev 67197)
+++ trunk/Master/texmf-dist/tex/latex/templatetools/templatetools.sty	2023-05-23 19:48:02 UTC (rev 67198)
@@ -23,10 +23,10 @@
 
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
 \ProvidesPackage{templatetools}
-          [2014/06/27 v0.1 Collection of conditional commands useful inside templates]
+          [2023/03/26 v0.2 Collection of conditional commands useful inside templates]
 %%% --- Necessary Packages
 %%% ------------------------------------------------------------------
-\RequirePackage{ifpdf}
+\RequirePackage{iftex}
 \RequirePackage{etoolbox}
 \RequirePackage{ltxcmds}
 \RequirePackage{array} % for column types
@@ -167,7 +167,7 @@
 }
 \newcommand{\IfMathVersionDefined}[3]{\ifcsdef{mv@#1}{#2}{#3}}
 \newcommand{\IfGlossariesStyleDefined}[2]{\ifcsdef{@glsstyle@#1}{#2}{}}
-
+\newcommand{\IfBibEnvironmentDefined}[1]{\ifcsdef{blx at env@#1}}
 \newcommand\SetTemplateDefinition[3]{% 1: group, 2: property, 3: code
   \csdef{tpl at definition@#1@#2}{#3}
 }



More information about the tex-live-commits mailing list.