summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/templatetools
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-05-23 03:00:46 +0000
committerNorbert Preining <norbert@preining.info>2023-05-23 03:00:46 +0000
commitd470efdd8b7b603d5d048f896fa1dce095a3e245 (patch)
tree9ef898fa049e63d1e6afe68840871c19ca41df08 /macros/latex/contrib/templatetools
parentaaab1b0cf810d8f8df45d972eb51da24a0114047 (diff)
CTAN sync 202305230300
Diffstat (limited to 'macros/latex/contrib/templatetools')
-rw-r--r--macros/latex/contrib/templatetools/templatetools.dtx40
-rw-r--r--macros/latex/contrib/templatetools/templatetools.pdfbin441431 -> 442537 bytes
2 files changed, 30 insertions, 10 deletions
diff --git a/macros/latex/contrib/templatetools/templatetools.dtx b/macros/latex/contrib/templatetools/templatetools.dtx
index 7cecc11565..56c587902e 100644
--- a/macros/latex/contrib/templatetools/templatetools.dtx
+++ b/macros/latex/contrib/templatetools/templatetools.dtx
@@ -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@pospiech.eu>
%
-% Copyright (C) 2014 by Matthias Pospiech <matthias@pospiech.eu>
+% Copyright (C) 2023 by Matthias Pospiech <matthias@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 @@ text which is considerably longer than the width of the column \\
% \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 @@ text which is considerably longer than the width of the column \\
% \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 @@ text which is considerably longer than the width of the column \\
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfElsePackageLoaded\}
+% \begin{macro}{\IfElsePackageLoaded}
% Wrapper to \cs{ltx@ifpackageloaded}
% \begin{macrocode}
\let\IfElsePackageLoaded\ltx@ifpackageloaded
@@ -813,8 +817,24 @@ text which is considerably longer than the width of the column \\
% 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@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
diff --git a/macros/latex/contrib/templatetools/templatetools.pdf b/macros/latex/contrib/templatetools/templatetools.pdf
index 9febccfab4..aae712014e 100644
--- a/macros/latex/contrib/templatetools/templatetools.pdf
+++ b/macros/latex/contrib/templatetools/templatetools.pdf
Binary files differ