summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-04-21 21:21:49 +0000
committerKarl Berry <karl@freefriends.org>2020-04-21 21:21:49 +0000
commitadba3df74d6c6d863ab73aaa6d6099d883ec2ae0 (patch)
treecc43e41bba5aab6997d97b9573dc9fd401582d2a
parent52b5238ab893a61a4e2c64843d074cd296836359 (diff)
bearwear (21apr20)
git-svn-id: svn://tug.org/texlive/trunk@54826 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/bearwear/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/bearwear/bearwear-doc.tex73
-rw-r--r--Master/texmf-dist/doc/latex/bearwear/bearwear.pdfbin613998 -> 621128 bytes
-rw-r--r--Master/texmf-dist/source/latex/bearwear/bearwear.dtx81
-rw-r--r--Master/texmf-dist/tex/latex/bearwear/bearwear.sty6
5 files changed, 113 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/bearwear/README.md b/Master/texmf-dist/doc/latex/bearwear/README.md
index fe6ffb7a6e5..44d6d374c61 100644
--- a/Master/texmf-dist/doc/latex/bearwear/README.md
+++ b/Master/texmf-dist/doc/latex/bearwear/README.md
@@ -1,7 +1,7 @@
# bearwear --- A package for tikz bear fashion
-Packageversion: 0.1
+Packageversion: 0.2
Idea: Bär, Implementation: Ulrike Fischer 2020
-Packagedate: 2020-01-15
+Packagedate: 2020-04-21
## LICENSE
LaTeX Project Public License
diff --git a/Master/texmf-dist/doc/latex/bearwear/bearwear-doc.tex b/Master/texmf-dist/doc/latex/bearwear/bearwear-doc.tex
index 9c6bd593391..80e6f2efdea 100644
--- a/Master/texmf-dist/doc/latex/bearwear/bearwear-doc.tex
+++ b/Master/texmf-dist/doc/latex/bearwear/bearwear-doc.tex
@@ -47,8 +47,8 @@
To dress the bear with the shirt, simply add the \verb+\bear+ command from the \bearwearkey{tikzlings-bears} package.
\begin{tcblisting}{before=\parindent0pt\nopagebreak}
- \tikz{\bear;\bearwear[v-neckline];}
- \tikz{\bear;\bearwear[muscle shirt];}
+ \tikz{\bear\bearwear[v-neckline];}
+ \tikz{\bear\bearwear[muscle shirt];}
\end{tcblisting}
\subsection{Coloring the shirts}
@@ -57,33 +57,33 @@
Basically every option that would make sense in a \lstinline|\fill| is allowed here.
Patterns e.g. would work too.
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[v-neckline,
leftarm=red,
rightarm=green,
- body=blue];
+ body=blue]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
- \bearwear[arms=green];
+ \bear
+ \bearwear[arms=green]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[shirt=
{shade,
top color=blue,
- bottom color=red}];
+ bottom color=red}]
\end{tcblisting}
\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak}
- \bear;
+ \bear
\bearwear
[v-neckline,
shirt =
{pattern=
- horizontal lines light blue}];
+ horizontal lines light blue}]
\end{tcblisting}
\subsection{Additional patterns}
@@ -94,7 +94,7 @@
\bearwearkey{body pattern}, \bearwearkey{shirt pattern},
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[v-neckline,
shirt=red,
@@ -102,7 +102,7 @@
{pattern=
{Stars[points=6,
radius=0.5mm,distance=1.5mm]},
- pattern color=yellow}];
+ pattern color=yellow}]
\end{tcblisting}
\subsection{Decorations}
@@ -111,7 +111,7 @@
predefined: \bearwearkey{bearheart} and \bearwearkey{beartummy}.
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[shirt deco =
{\fill[red] (beartummy) circle (1pt);
\fill[red] (bearheart) circle (1pt);}
@@ -119,7 +119,7 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[shirt deco =
{\node at (beartummy)
{\includegraphics[width=5cm]
@@ -127,25 +127,25 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[body deco=
{\node at ([yshift=-1mm]bearheart)
{\includegraphics[width=0.3cm]
- {flag}};}];
+ {flag}};}]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
shirt=Beige!80!black,
body deco=
{\node at ([yshift=-1mm]bearheart)
{\includegraphics[width=0.5cm]
- {latex-project-logo}};}];
+ {latex-project-logo}};}]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
shirt=HotPink,
body deco=
@@ -154,7 +154,7 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
arms= DeepSkyBlue,
body deco =
@@ -170,11 +170,14 @@
\subsection{Scaling}
- Scaling works as expected, but don't forget that nodes in \TikZ{} normally don't scale if you don't use the \lstinline|transform shape| key:
+ Scaling works as expected, but don't forget that nodes in \TikZ{} normally don't scale if you don't use the \lstinline|transform shape| key.
+ You can use a scope for the scaling, or the \texttt{scale} key as as unknown keys are passed to tikz --
+ in this case don't forget that both
+ the bear and the shirt needs the same scaling factor.
\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
\begin{scope}[scale=1.5]
- \bear;
+ \bear
\bearwear[
arms= DeepSkyBlue,
body deco =
@@ -189,6 +192,32 @@
\end{scope}
\end{tcblisting}
+\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
+ \bear[scale=0.7]
+ \bearwear[scale=0.7,
+ arms= DeepSkyBlue,
+ body deco =
+ {\node at ([yshift=-2mm]beartummy)
+ {\includegraphics[width=4cm]
+ {montblanc}};
+ \node[text=white,
+ font=\tiny\sffamily]
+ at ([yshift=2mm]beartummy)
+ {{Mont Blanc}};
+ }]
+ \end{tcblisting}
+
+ \subsection{Moving}
+
+It is possible to move the bear and the shirt with it. Ensure that the same shift
+is used if you don't want to undress the bear.
+
+\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
+ \coordinate (newbear) at (3,0);
+ \bear\bearwear
+ \bear[shift=(newbear)]\bearwear[shirt=red,shift=(newbear)]
+\end{tcblisting}
+
\subsection{Setting up defaults}
With \lstinline|\bearwearsetup| you can change the defaults:
diff --git a/Master/texmf-dist/doc/latex/bearwear/bearwear.pdf b/Master/texmf-dist/doc/latex/bearwear/bearwear.pdf
index 6eb455f091a..d0b9e3429c4 100644
--- a/Master/texmf-dist/doc/latex/bearwear/bearwear.pdf
+++ b/Master/texmf-dist/doc/latex/bearwear/bearwear.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/bearwear/bearwear.dtx b/Master/texmf-dist/source/latex/bearwear/bearwear.dtx
index 497cf445440..a635c727756 100644
--- a/Master/texmf-dist/source/latex/bearwear/bearwear.dtx
+++ b/Master/texmf-dist/source/latex/bearwear/bearwear.dtx
@@ -81,7 +81,7 @@
\end{scope}
\end{scope}},}
\raggedbottom
-\let\bearwearkey\lstinline
+\newcommand\bearwearkey{\lstinline[style=bearwarestyle,breaklines=false]}
\newcommand{\TikZ}{Ti\emph{k}Z}
\GetFileInfo{bearwear.sty}
@@ -107,7 +107,7 @@
%<*package>
\RequirePackage{xparse}
\RequirePackage{tikzlings-bears}
-\ProvidesExplPackage {bearwear} {2020-01-15} {0.1}
+\ProvidesExplPackage {bearwear} {2020-04-21} {0.2}
{A package for tikz bear fashion}
\ProcessOptions\relax
% a tikzset style to reverse the clip:
@@ -224,6 +224,7 @@
\tl_new:N \l_@@_leftarm_deco_tl
\tl_new:N \l_@@_rightarm_deco_tl
\tl_new:N \l_@@_body_deco_tl
+\tl_new:N \l_@@_tikzkeys_tl
\keys_define:nn {@@}
{
@@ -265,7 +266,8 @@
{
\begin{scope}[even~odd~rule]
% handle keys
- \keys_set:nn { @@ } {#1}
+ \keys_set_known:nnN { @@ } {#1}\l_@@_tikzkeys_tl
+ \exp_args:No\tikzset{\l_@@_tikzkeys_tl}
\@@_init_path:
\@@_set_coordinates:
\@@_clipping_path:
@@ -318,8 +320,8 @@
To dress the bear with the shirt, simply add the \verb+\bear+ command from the \bearwearkey{tikzlings-bears} package.
\begin{tcblisting}{before=\parindent0pt\nopagebreak}
- \tikz{\bear;\bearwear[v-neckline];}
- \tikz{\bear;\bearwear[muscle shirt];}
+ \tikz{\bear\bearwear[v-neckline];}
+ \tikz{\bear\bearwear[muscle shirt];}
\end{tcblisting}
\subsection{Coloring the shirts}
@@ -328,35 +330,35 @@
Basically every option that would make sense in a \lstinline|\fill| is allowed here.
Patterns e.g. would work too.
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[v-neckline,
leftarm=red,
rightarm=green,
- body=blue];
+ body=blue]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
- \bearwear[arms=green];
+ \bear
+ \bearwear[arms=green]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[shirt=
{shade,
top color=blue,
- bottom color=red}];
+ bottom color=red}]
\end{tcblisting}
\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak}
- \bear;
+ \bear
\bearwear
[v-neckline,
shirt =
{pattern=
- horizontal lines light blue}];
+ horizontal lines light blue}]
\end{tcblisting}
\subsection{Additional patterns}
@@ -367,7 +369,7 @@
\bearwearkey{body pattern}, \bearwearkey{shirt pattern},
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear
[v-neckline,
shirt=red,
@@ -375,7 +377,7 @@
{pattern=
{Stars[points=6,
radius=0.5mm,distance=1.5mm]},
- pattern color=yellow}];
+ pattern color=yellow}]
\end{tcblisting}
\subsection{Decorations}
@@ -384,7 +386,7 @@
predefined: \bearwearkey{bearheart} and \bearwearkey{beartummy}.
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[shirt deco =
{\fill[red] (beartummy) circle (1pt);
\fill[red] (bearheart) circle (1pt);}
@@ -392,7 +394,7 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[shirt deco =
{\node at (beartummy)
{\includegraphics[width=5cm]
@@ -400,25 +402,25 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[body deco=
{\node at ([yshift=-1mm]bearheart)
{\includegraphics[width=0.3cm]
- {flag}};}];
+ {flag}};}]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
shirt=Beige!80!black,
body deco=
{\node at ([yshift=-1mm]bearheart)
{\includegraphics[width=0.5cm]
- {latex-project-logo}};}];
+ {latex-project-logo}};}]
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
shirt=HotPink,
body deco=
@@ -427,7 +429,7 @@
\end{tcblisting}
\begin{tcblisting}{tikz lower}
- \bear;
+ \bear
\bearwear[
arms= DeepSkyBlue,
body deco =
@@ -443,11 +445,14 @@
\subsection{Scaling}
- Scaling works as expected, but don't forget that nodes in \TikZ{} normally don't scale if you don't use the \lstinline|transform shape| key:
+ Scaling works as expected, but don't forget that nodes in \TikZ{} normally don't scale if you don't use the \lstinline|transform shape| key.
+ You can use a scope for the scaling, or the \texttt{scale} key as as unknown keys are passed to tikz --
+ in this case don't forget that both
+ the bear and the shirt needs the same scaling factor.
\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
\begin{scope}[scale=1.5]
- \bear;
+ \bear
\bearwear[
arms= DeepSkyBlue,
body deco =
@@ -462,6 +467,32 @@
\end{scope}
\end{tcblisting}
+\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
+ \bear[scale=0.7]
+ \bearwear[scale=0.7,
+ arms= DeepSkyBlue,
+ body deco =
+ {\node at ([yshift=-2mm]beartummy)
+ {\includegraphics[width=4cm]
+ {montblanc}};
+ \node[text=white,
+ font=\tiny\sffamily]
+ at ([yshift=2mm]beartummy)
+ {{Mont Blanc}};
+ }]
+ \end{tcblisting}
+
+ \subsection{Moving}
+
+It is possible to move the bear and the shirt with it. Ensure that the same shift
+is used if you don't want to undress the bear.
+
+\begin{tcblisting}{tikz lower,before=\parindent0pt\nopagebreak,}
+ \coordinate (newbear) at (3,0);
+ \bear\bearwear
+ \bear[shift=(newbear)]\bearwear[shirt=red,shift=(newbear)]
+\end{tcblisting}
+
\subsection{Setting up defaults}
With \lstinline|\bearwearsetup| you can change the defaults:
diff --git a/Master/texmf-dist/tex/latex/bearwear/bearwear.sty b/Master/texmf-dist/tex/latex/bearwear/bearwear.sty
index 7a4be45c2b8..ffb8fe2f2ad 100644
--- a/Master/texmf-dist/tex/latex/bearwear/bearwear.sty
+++ b/Master/texmf-dist/tex/latex/bearwear/bearwear.sty
@@ -21,7 +21,7 @@
%% File: bearwear.dtx
\RequirePackage{xparse}
\RequirePackage{tikzlings-bears}
-\ProvidesExplPackage {bearwear} {2020-01-15} {0.1}
+\ProvidesExplPackage {bearwear} {2020-04-21} {0.2}
{A package for tikz bear fashion}
\ProcessOptions\relax
\tikzset
@@ -137,6 +137,7 @@
\tl_new:N \l__bearwear_leftarm_deco_tl
\tl_new:N \l__bearwear_rightarm_deco_tl
\tl_new:N \l__bearwear_body_deco_tl
+\tl_new:N \l__bearwear_tikzkeys_tl
\keys_define:nn {__bearwear}
{
@@ -178,7 +179,8 @@
{
\begin{scope}[even~odd~rule]
% handle keys
- \keys_set:nn { __bearwear } {#1}
+ \keys_set_known:nnN { __bearwear } {#1}\l__bearwear_tikzkeys_tl
+ \exp_args:No\tikzset{\l__bearwear_tikzkeys_tl}
\__bearwear_init_path:
\__bearwear_set_coordinates:
\__bearwear_clipping_path: