-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: documentation for the tikz library Fixed problem with key values "leaking" out Backed out `transform shape` for the moment and opened #20 instead moved super duck definition from tikzlibrary to example copied stuff from global gitignore over reverted back to own gitignore Added aliases with spaces. Added a .gitignore Added a wrapper around \duck@draw to turn it into a pic, seems to work (but could do with more extensive testing - see duck_library.tex for tests).
- Loading branch information
Showing
5 changed files
with
236 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Specific files # | ||
################## | ||
test.tex | ||
|
||
# LaTeX stuff # | ||
############### | ||
*.aux | ||
*.nav | ||
*.out | ||
*.snm | ||
*.toc | ||
*.txss | ||
*.bbl | ||
*.blg | ||
*.fdb_latexmk | ||
*.fls | ||
*.listing | ||
*.dvi | ||
*.ind | ||
*ilg | ||
*idx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
\documentclass{article} | ||
|
||
\usepackage{tikz} | ||
\usetikzlibrary{ducks} | ||
|
||
% A test duck with *everything* | ||
\tikzset{ | ||
/duck/.cd, | ||
super duck/.style={ | ||
duck/.cd, | ||
name=Donald, | ||
% Environment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
water, | ||
% body parts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
grumpy, | ||
% hair styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
shorthair, | ||
longhair, | ||
crazyhair, | ||
recedinghair, | ||
eyebrow, | ||
beard, | ||
mohican, | ||
mullet, | ||
% clothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
tshirt, | ||
jacket, | ||
tie, | ||
cape, | ||
stripes, | ||
% Headgear %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
alien, | ||
hat, | ||
cap, | ||
santa, | ||
unicorn, | ||
magichat, | ||
chef, | ||
witch, | ||
graduate, | ||
beret, | ||
crown, | ||
queencrown, | ||
kingcrown, | ||
peakedcap, | ||
bunny, | ||
tophat, | ||
darthvader, | ||
% Accessories %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
glasses, | ||
sunglasses, | ||
squareglasses, | ||
icecream, | ||
book, | ||
magicwand, | ||
cricket, | ||
rollingpin, | ||
signpost, | ||
lightsaber, | ||
cake, | ||
pizza, | ||
hockey, | ||
baguette, | ||
football, | ||
mask, | ||
necklace, | ||
milkshake, | ||
wine, | ||
prison, | ||
speech, | ||
think, | ||
torch, | ||
easter, | ||
basket, | ||
buttons, | ||
sheep, | ||
horsetail, | ||
crozier, | ||
davidlikespineapplepizza, | ||
} | ||
} | ||
|
||
%\usepackage{trace-pgfkeys} | ||
|
||
%\pgfkeystracelevel{trace} | ||
%\tikzset{duck/water=blue} | ||
%\pgfkeystracelevel{silent} | ||
|
||
\begin{document} | ||
|
||
\begin{tikzpicture} | ||
\draw (0,0) pic[duck/super duck] {duck}; | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
%\draw (4,0) pic[duck/water=blue] {duck}; | ||
\draw (0,0) pic[ | ||
duck/water=blue, | ||
duck/book={Animal Farm}, | ||
] {duck}; | ||
\draw (0,4) pic[ | ||
duck/water=blue, | ||
scale=2, | ||
duck/book={Animal Farm}, | ||
] {duck}; | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
\duck[book={Animal Farm}] | ||
\end{tikzpicture} | ||
|
||
\begin{tikzpicture} | ||
\duck[xscale=-1] | ||
\end{tikzpicture} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
\usepackage{tikzducks} | ||
|
||
% This is all that is needed ... | ||
\tikzset{ | ||
duck/.pic={% | ||
\duck@draw | ||
}, | ||
duck/.search also={,/tikz,/pgf}, | ||
} | ||
|
||
|