From fa07c77aefbc7f46ac32acf1dfe1367b5eaf9ce2 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 16 Apr 2021 20:15:03 +0000
Subject: tikzlings (16apr21)

git-svn-id: svn://tug.org/texlive/trunk@58885 c570f23f-e606-0410-a88d-b1316a301751
---
 .../tex/latex/tikzlings/tikzlings-addons.sty       | 45 +++++++++++++++++++---
 1 file changed, 40 insertions(+), 5 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/tikzlings/tikzlings-addons.sty')

diff --git a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-addons.sty b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-addons.sty
index 3251df7a1bf..4cc5eecbf35 100644
--- a/Master/texmf-dist/tex/latex/tikzlings/tikzlings-addons.sty
+++ b/Master/texmf-dist/tex/latex/tikzlings/tikzlings-addons.sty
@@ -12,11 +12,49 @@
 % See http://www.latex-project.org/lppl.txt
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\ProvidesPackage{tikzlings-addons}[2021/03/17 version v0.5 Draw additional items for the tikzlings]
+\ProvidesPackage{tikzlings-addons}[2021/04/16 version v0.6 Draw additional items for the tikzlings]
 
 \RequirePackage{tikz}
 \usetikzlibrary{patterns} % for the wizard hat
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% List of all TikZlings
+%
+% converting a list of the format
+%     bee/bees, marmot/marmots, ...
+% into a list of the format 
+%     /bee, /marmot, ...
+% for the also search option
+% usage: \tikzling@iteratesearch\tikzling@list
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\RequirePackage{tikzlings-list}
+\RequirePackage{expl3}
+
+\ExplSyntaxOn
+\cs_new:Npn \tikzlings_iteratesearch:N #1 { 
+  \clist_map_function:NN #1 \__tikzlings_slashed_items:n 
+}
+\cs_new:Npn \__tikzlings_slashed_items:n #1 {
+  / 
+  \exp_not:N { 
+    \__tikzlings_before_slashsearch:w #1 / \s_stop 
+  }
+  , 
+}
+\cs_new:Npn \__tikzlings_before_slashsearch:w #1 / #2 \s_stop {
+  \tl_trim_spaces:n {#1} 
+}
+\cs_new_eq:NN \tikzling@iteratesearch \tikzlings_iteratesearch:N
+\ExplSyntaxOff
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Addons
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \newcommand*{\thing}[1][]{%
   \begin{scope}%
     \tikzset{/thing/.cd,#1}%
@@ -79,10 +117,7 @@
   % General
   %
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-  /thing/.search also={%
-    /tikz,/pgf,
-    /bear,/coati,/koala,/marmot,/mouse,/owl,/penguin,/snowman,/moles,/sloth,/pig,/cat,/hippo,/rhino,/panda,/bee,/anteater,/squirrel,/sheep,
-  },
+  /thing/.search also/.expanded={/tikz,/pgf,\tikzling@iteratesearch\tikzling@list}, 
   %/thing/.unknown/.code=\relax, % bad idea, prevents tikz/pgf keys
   /thing/.cd,
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3

