summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-07 23:12:39 +0000
committerKarl Berry <karl@freefriends.org>2013-03-07 23:12:39 +0000
commit81b31d750e9806bfcd17916b130f77496b1ee9e3 (patch)
tree69f724aca03a6e6b5bc5dd53575fcbb972101549 /Master/texmf-dist/tex
parentff0c4e73858f75ead37fa8d5f31ca28025ba49ef (diff)
tikzsymbols (7mar13)
git-svn-id: svn://tug.org/texlive/trunk@29308 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/tikzsymbols/tikzsymbols.sty253
1 files changed, 140 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/tikzsymbols/tikzsymbols.sty b/Master/texmf-dist/tex/latex/tikzsymbols/tikzsymbols.sty
index df1cd9ac432..f22f01cd51e 100644
--- a/Master/texmf-dist/tex/latex/tikzsymbols/tikzsymbols.sty
+++ b/Master/texmf-dist/tex/latex/tikzsymbols/tikzsymbols.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2011/06/27]
\ProvidesPackage{tikzsymbols}
-[2013/02/28 v1.7 Some symbols created using tikz.]
+[2013/03/07 v2.0 Some symbols created using tikz.]
\RequirePackage{tikz}
\RequirePackage{xargs}
\RequirePackage{xcolor}
@@ -28,6 +28,119 @@
\newcommand{\tikzsymbolsaftersymbolinput}{\xspace}
+\newif\if@tikzsymbols@marvosym
+\DeclareOptionX{marvosym}{\@tikzsymbols@marvosymtrue}
+
+\def\@leaf@is@leaf{leaf}
+
+\newif\if@tikzsymbols@draft
+\newif\if@tikzsymbols@final
+
+\DeclareRobustCommand{\@Tree@SetUp}[1][1]{\tikzset{%
+ld/.style={level distance=##1ex},lw/.style={line width=##1ex},%
+level 1/.style={ld=0.60, trunk, lw=0.1 ,sibling angle=60},%
+level 2/.style={ld=0.20, trunk!80!leaf a, lw=.073,sibling angle=70},%
+level 3/.style={ld=0.25, trunk!60!leaf a, lw=.05,sibling angle=70}, %
+level 4/.style={ld=0.10, trunk!40!leaf a, lw=.025,sibling angle=60},%
+level 5/.style={ld=0.15, trunk!20!leaf a, lw=.02,sibling angle=60},%
+level 6/.style={ld=0.08, leaf a, lw=.021,sibling angle=60},%
+}}%
+
+\DeclareRobustCommandx{\Basic@Tree}[5][1=1, usedefault]{{%
+\def\leaf@or@not@leaf{#5}%
+\@Tree@SetUp[#1]%
+\pgfarrowsdeclare{leaf}{leaf}%
+{\pgfarrowsleftextend{-.1ex} \pgfarrowsrightextend{-0.05ex}}%
+{%
+\pgfpathmoveto{\pgfpoint{-.01ex}{0ex}}%
+\pgfpatharc{150}{30}{0.08ex}% dicke
+\pgfpatharc{-30}{-150}{0.08ex}%
+\pgfusepathqfill%
+}%
+\colorlet{trunk}{#2}%
+\colorlet{leaf a}{#3}%
+\colorlet{leaf b}{#4}\begin{tikzpicture}[x=1ex,y=1ex,line width=0.07ex]%
+\ifx\leaf@or@not@leaf\@leaf@is@leaf%
+\draw[opacity=0,scale=#1+0.1*#1] (-0.82-0.1* #1/100,0) rectangle (0.82+0.1*#1/100, 1.4+0.01*#1/100);
+\else
+\draw[opacity=0,scale=#1+0.1*#1] (-0.75,-0.01) rectangle (0.75,1.3);
+\fi
+\pgflowlevel{\pgftransformscale{#1+0.02ex}}{\coordinate (root) [grow cyclic,rotate=90] child {
+child [line cap=round] foreach \a in {0,1, 2} { child foreach \b in {0,1} {
+child foreach \c in {0,1,2} { child foreach \d in {0,1} {
+child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] }
+}}} } edge from parent [shorten >=-0.05ex,serif cm-,line cap=butt]
+};}%
+\end{tikzpicture}%
+}}
+
+\DeclareOptionX{draft}{\@tikzsymbols@drafttrue\@tikzsymbols@finalfalse
+\def\Basic@Tree{\Basic@Tree@off}}
+\DeclareOptionX{final}{\@tikzsymbols@draftfalse\@tikzsymbols@finaltrue
+\def\Basic@Tree{\Basic@Tree@on}}
+
+\DeclareOptionX{tree}{%
+ \def\Basic@Tree{\csname Basic@Tree@#1\endcsname}%
+ \if@tikzsymbols@draft%
+\PackageWarningNoLine{tikzsymbols}{You can use class option \MessageBreak
+draft with package option tree=on/off;
+\MessageBreak but I think it would be better if you
+\MessageBreak delete tree=on/off}\fi%
+\if@tikzsymbols@final%
+\PackageWarningNoLine{tikzsymbols}{You can use class option \MessageBreak
+final with package option tree=on/off;
+\MessageBreak but I think it would be better if you
+\MessageBreak delete tree=on/off}\fi%
+ }
+
+\DeclareRobustCommandx{\Basic@Tree@off}[5][1=1, usedefault]{{%
+\def\leaf@or@not@leaf{#5}%
+\def\@y@@x@y@x{0.095*#1/100}%
+\begin{tikzpicture}[scale=#1+0.01*#1,x=1.35ex,y=1.3ex, line width=0.07ex*#1]
+\ifx\leaf@or@not@leaf\@leaf@is@leaf%
+\draw[#2] (0-\@y@@x@y@x,0) -- (0-\@y@@x@y@x,1.08+0.05*#1/100);
+\draw[#3] (0-\@y@@x@y@x,1.08+0.05*#1/100) -- (1.2+\@y@@x@y@x,1.08+0.05*#1/100);
+\draw[#4] (1.2+\@y@@x@y@x,1.08+0.05*#1/100) -- (1.2+\@y@@x@y@x,0);
+\draw[#3] (1.2+\@y@@x@y@x,0) -- (0.5,0);
+\draw[#4] (0.5+0.4*#1/100,0) -- (0-\@y@@x@y@x,0);
+\else
+\draw[#2] (0,0) -- (0,1);
+\draw[#3] (0,1) -- (1.15,1);
+\draw[#4] (1.15,1) -- +(0,-1);
+\fi%
+\end{tikzpicture}%
+}}
+
+\DeclareRobustCommandx{\Basic@Tree@on}[5][1=1, usedefault]{{%
+\def\leaf@or@not@leaf{#5}%
+\@Tree@SetUp[#1]%
+\pgfarrowsdeclare{leaf}{leaf}%
+{\pgfarrowsleftextend{-.1ex} \pgfarrowsrightextend{-0.05ex}}%
+{%
+\pgfpathmoveto{\pgfpoint{-.01ex}{0ex}}%
+\pgfpatharc{150}{30}{0.08ex}% dicke
+\pgfpatharc{-30}{-150}{0.08ex}%
+\pgfusepathqfill%
+}%
+\colorlet{trunk}{#2}%
+\colorlet{leaf a}{#3}%
+\colorlet{leaf b}{#4}\begin{tikzpicture}[x=1ex,y=1ex,line width=0.07ex]%
+\ifx\leaf@or@not@leaf\@leaf@is@leaf%
+\draw[opacity=0,scale=#1+0.1*#1] (-0.82-0.1* #1/100,0) rectangle (0.82+0.1*#1/100, 1.4+0.01*#1/100);
+\else
+\draw[opacity=0,scale=#1+0.1*#1] (-0.75,-0.01) rectangle (0.75,1.3);
+\fi
+\pgflowlevel{\pgftransformscale{#1+0.02ex}}{\coordinate (root) [grow cyclic,rotate=90] child {
+child [line cap=round] foreach \a in {0,1, 2} { child foreach \b in {0,1} {
+child foreach \c in {0,1,2} { child foreach \d in {0,1} {
+child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] }
+}}} } edge from parent [shorten >=-0.05ex,serif cm-,line cap=butt]
+};}%
+\end{tikzpicture}%
+}}%
+
+\ProcessOptionsX*\relax
+
\DeclareRobustCommand{\Kochtopf}[1][1]{%
\begin{tikzpicture}[x=2ex,y=2.2ex, line width=0.07ex*#1,scale=#1]
\draw[rounded corners=0.2ex*#1] (0,0.5) -- (0,0) -- (1,0) -- (1,0.5);
@@ -291,6 +404,7 @@
\tikzsymbolsaftersymbolinput%
}
+\if@tikzsymbols@marvosym\relax\else%
\DeclareRobustCommandx{\Smiley}[2][1=1,2={opacity=0} ,usedefault]{%
\begin{tikzpicture}[x=2.4ex, y=2.4ex, line width=0.12ex*#1,scale=#1]
\fill[#2,line width=0.12ex*#1] (0,0) circle (0.33);
@@ -300,7 +414,8 @@
\draw (-0.2,-0.1) .. controls (-0.1,-0.2) and (0.1,-0.2) .. (0.2,-0.1);
\end{tikzpicture}%
\tikzsymbolsaftersymbolinput%
-}
+}%
+\fi
\DeclareRobustCommandx{\dSmiley}[3][1=1,2=yellow,3=yellow,usedefault]{%
\begin{tikzpicture}[x=2.4ex, y=2.4ex, line width=0.12ex*#1,scale=#1]
\shade[ball color=#2] (0,0) circle (0.33);
@@ -758,6 +873,7 @@ decorate {-- (-0.25,0.24)}
\tikzsymbolsaftersymbolinput%
}
+\if@tikzsymbols@marvosym\relax\else%
\DeclareRobustCommand{\Coffeecup}[1][1]{%
\begin{tikzpicture}[x=0.7ex,y=0.7ex, scale=#1, line width=0.07ex*#1]
\draw (0,0) arc (180:269:0.8 and 1) -- ++(0.5,0) arc (269:360:0.8 and 1) -- cycle;
@@ -774,7 +890,8 @@ decorate {-- (-0.25,0.24)}
\draw (0,-1.05) -- (2.1,-1.05);
\end{tikzpicture}%
\tikzsymbolsaftersymbolinput%
-}
+}%
+\fi
\DeclareRobustCommand{\Chair}[1][1]{%
\begin{tikzpicture}[x=0.9ex,y=0.9ex, scale=#1, line width=0.07ex*#1]
@@ -798,6 +915,17 @@ decorate {-- (-0.25,0.24)}
\end{tikzpicture}%
\tikzsymbolsaftersymbolinput%
}
+
+\DeclareRobustCommand{\Tribar}[1][1]{%
+\begin{tikzpicture}[x=0.65ex,y=0.65ex,scale=#1,rounded corners=0.03ex*#1, line width=0.06ex*#1]
+\draw (0,0) -- (1,0) -- (0.5,1) -- cycle;
+\draw (0.15,0.3) -- (-0.15,-0.3) -- (1.75,-0.3) -- ++ (-0.15,-0.3) -- (-0.65,-0.6) -- (0.35,1.3) -- (0.8,.4);
+\draw (0.9,0) -- (1.3,0) -- (0.35,1.9) -- (0.65,1.9) -- (1.75,-0.3) -- +(-.05,-0.1);
+\draw (-0.6,-0.6) -- (-0.65,-0.6) -- ++ (-0.15,0.3) -- (0.35,1.9) -- (0.4,1.9);
+\end{tikzpicture}%
+\tikzsymbolsaftersymbolinput%
+}
+
\newlength{\tikzsymbolsMoaiscale}
\newlength{\tikzsymbolsMoaithickness}
\newlength{\tikzsymbolsMoaiCheckI}\setlength{\tikzsymbolsMoaiCheckI}{2ex}
@@ -835,115 +963,6 @@ decorate {-- (-0.25,0.24)}
\tikzsymbolsaftersymbolinput%
}
-\def\@leaf@is@leaf{leaf}
-
-\newif\if@tikzsymbols@draft
-\newif\if@tikzsymbols@final
-
-\DeclareRobustCommand{\@Tree@SetUp}[1][1]{\tikzset{%
-ld/.style={level distance=##1ex},lw/.style={line width=##1ex},%
-level 1/.style={ld=0.60, trunk, lw=0.1*#1 ,sibling angle=60},%
-level 2/.style={ld=0.20, trunk!80!leaf a, lw=.073*#1,sibling angle=70},%
-level 3/.style={ld=0.25, trunk!60!leaf a, lw=.05*#1,sibling angle=70}, %
-level 4/.style={ld=0.10, trunk!40!leaf a, lw=.025*#1,sibling angle=60},%
-level 5/.style={ld=0.15, trunk!20!leaf a, lw=.02*#1,sibling angle=60},%
-level 6/.style={ld=0.08, leaf a, lw=.021*#1,sibling angle=60},%
-}}%
-
-\DeclareRobustCommandx{\Basic@Tree}[5][1=1, usedefault]{{%
-\def\leaf@or@not@leaf{#5}%
-\@Tree@SetUp[#1]%
-\pgfarrowsdeclare{leaf}{leaf}%
-{\pgfarrowsleftextend{-.1ex} \pgfarrowsrightextend{-0.05ex}}%
-{%
-\pgfpathmoveto{\pgfpoint{-.01ex}{0ex}}%
-\pgfpatharc{150}{30}{0.16ex*(#1/2)}% dicke
-\pgfpatharc{-30}{-150}{0.16ex*(#1/2)}%
-\pgfusepathqfill%
-}%
-\colorlet{trunk}{#2}%
-\colorlet{leaf a}{#3}%
-\colorlet{leaf b}{#4}\begin{tikzpicture}[x=1ex,y=1ex, scale=#1+0.2, line width=0.07ex*#1]%
-\ifx\leaf@or@not@leaf\@leaf@is@leaf%
-\draw[opacity=0] (-0.82-0.1* #1/100,0) rectangle (0.82+0.1*#1/100, 1.415+0.01*#1/100);
-\else
-\draw[opacity=0] (-0.75,0.1) rectangle (0.75,1.3);
-\fi
-\coordinate (root) [grow cyclic,rotate=90] child {
-child [line cap=round] foreach \a in {0,1, 2} { child foreach \b in {0,1} {
-child foreach \c in {0,1,2} { child foreach \d in {0,1} {
-child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] }
-}}} } edge from parent [shorten >=-0.05ex,serif cm-,line cap=butt]
-};%
-\end{tikzpicture}%
-}}
-
-\DeclareOption{draft}{\@tikzsymbols@drafttrue\@tikzsymbols@finalfalse
-\def\Basic@Tree{\Basic@Tree@off}}
-\DeclareOption{final}{\@tikzsymbols@draftfalse\@tikzsymbols@finaltrue
-\def\Basic@Tree{\Basic@Tree@on}}
-
-\DeclareOption{tree}{%
- \def\Basic@Tree{\csname Basic@Tree@#1\endcsname}%
- \if@tikzsymbols@draft%
-\PackageWarningNoLine{tikzsymbols}{You can use class option \MessageBreak
-draft with package option tree=on/off;
-\MessageBreak but I think it would be better if you
-\MessageBreak delete tree=on/off}\fi%
-\if@tikzsymbols@final%
-\PackageWarningNoLine{tikzsymbols}{You can use class option \MessageBreak
-final with package option tree=on/off;
-\MessageBreak but I think it would be better if you
-\MessageBreak delete tree=on/off}\fi%
- }
-
-\DeclareRobustCommandx{\Basic@Tree@off}[5][1=1, usedefault]{{%
-\def\leaf@or@not@leaf{#5}%
-\def\@y@@x@y@x{0.095*#1/100}
-\begin{tikzpicture}[scale=#1+0.2,x=1.3ex,y=1.3ex, line width=0.07ex*#1]
-\ifx\leaf@or@not@leaf\@leaf@is@leaf%
-\draw[#2] (0-\@y@@x@y@x,0) -- (0-\@y@@x@y@x,1.08+0.05*#1/100);
-\draw[#3] (0-\@y@@x@y@x,1.08+0.05*#1/100) -- (1.2+\@y@@x@y@x,1.08+0.05*#1/100);
-\draw[#4] (1.2+\@y@@x@y@x,1.08+0.05*#1/100) -- (1.2+\@y@@x@y@x,0);
-\draw[#3] (1.2+\@y@@x@y@x,0) -- (0.5,0);
-\draw[#4] (0.5+0.4*#1/100,0) -- (0-\@y@@x@y@x,0);
-\else
-\draw[#2] (0,0) -- (0,1);
-\draw[#3] (0,1) -- (1.15,1);
-\draw[#4] (1.15,1) -- +(0,-1);
-\fi%
-\end{tikzpicture}%
-}}
-
-\DeclareRobustCommandx{\Basic@Tree@on}[5][1=1, usedefault]{{%
-\def\leaf@or@not@leaf{#5}%
-\@Tree@SetUp[#1]%
-\pgfarrowsdeclare{leaf}{leaf}%
-{\pgfarrowsleftextend{-.1ex} \pgfarrowsrightextend{-0.05ex}}%
-{%
-\pgfpathmoveto{\pgfpoint{-.01ex}{0ex}}%
-\pgfpatharc{150}{30}{0.16ex*(#1/2)}% dicke
-\pgfpatharc{-30}{-150}{0.16ex*(#1/2)}%
-\pgfusepathqfill%
-}%
-\colorlet{trunk}{#2}%
-\colorlet{leaf a}{#3}%
-\colorlet{leaf b}{#4}\begin{tikzpicture}[x=1ex,y=1ex, scale=#1+0.2, line width=0.07ex*#1]%
-\ifx\leaf@or@not@leaf\@leaf@is@leaf%
-\draw[opacity=0] (-0.82-0.1* #1/100,0) rectangle (0.82+0.1*#1/100, 1.415+0.01*#1/100);
-\else
-\draw[opacity=0] (-0.75,0.1) rectangle (0.75,1.3);
-\fi
-\coordinate (root) [grow cyclic,rotate=90] child {
-child [line cap=round] foreach \a in {0,1, 2} { child foreach \b in {0,1} {
-child foreach \c in {0,1,2} { child foreach \d in {0,1} {
-child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor,-#5] }
-}}} } edge from parent [shorten >=-0.05ex,serif cm-,line cap=butt]
-};%
-\end{tikzpicture}%
-}}
-
-\ProcessOptions*\relax
\newcommand\BasicTree[5][1]{%
\def\leaf@or@not@leaf{#5}%
@@ -954,7 +973,7 @@ child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor
\Basic@Tree[#1]{#2}{#3}{#4}{#5}\tikzsymbolsaftersymbolinput%
\else%
\PackageError{tikzsymbols}{The last parameter has either to be \MessageBreak
-`leaf` or has to be empty}{See the documentation. Section `Trees«.}%
+`leaf` or has to be empty}{See the tikzsymbols documentation. Section ``Trees''.}%
\fi\fi%
}
@@ -989,6 +1008,14 @@ child foreach \leafcolor in {leaf a,leaf b} { edge from parent [color=\leafcolor
\DeclareRobustCommandx{\Wintertree}[1][1=1, usedefault]%
{\BasicTree[#1]{black!80!}{black!50}{black!25}{}}
+\AtBeginDocument{
+\if@tikzsymbols@marvosym
+\@ifpackageloaded{marvosym}{}{%
+\PackageError{tikzsymbols}{Use option 'marvosym' only if you load package 'marvosym'}
+{Either load package 'marvosym' or delete the tikzsymbols option 'marvosym'}}
+\fi
+}
+
\DeclareRobustCommand{\@Keep@Cool@I}{%
\begin{tikzpicture}[x=1em, y=1em, line width=0.03em]
\fill[decorate,decoration={snake,amplitude=.02em,segment length=0.4em},cyan!20!]