diff options
author | Karl Berry <karl@freefriends.org> | 2022-06-20 21:05:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-06-20 21:05:45 +0000 |
commit | 97384c89d58ea2c4a96de01334de38d0913cab62 (patch) | |
tree | 4c1e35268020a075dbe79bf0c7eaa368a244361a /Master/texmf-dist/tex/latex | |
parent | f8365488a670454b3ac86c9e4292cebd56991927 (diff) |
jigsaw (20jun22)
git-svn-id: svn://tug.org/texlive/trunk@63662 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty b/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty index 748014c8425..ae1a7360422 100644 --- a/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty +++ b/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty @@ -11,12 +11,8 @@ % Released under the LaTeX Project Public License v1.3c or later % See http://www.latex-project.org/lppl.txt % -% Version 0.1a -% NOv 9, 2018 -% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\ProvidesPackage{jigsaw} - [2018/11/09 v0.1a Draw jigsaw pieces in TikZ] +\ProvidesPackage{jigsaw}[2018/11/09 v0.1 Draw jigsaw pieces in TikZ] \RequirePackage{tikz} @@ -40,7 +36,7 @@ (0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) .. (0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) .. (0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) .. -(1.0,#1*0.00) +(1.0,#1*0.00) -- ++(.5\pgflinewidth,0) } \newcommand{\halfpiece}[2]{ @@ -52,17 +48,17 @@ \ifx\tmp\@nnil \else \fill[#1] - \side{#2} -- (0.5,0.5) - [rotate around={90:(0.5,0.5)}] \side{#3} -- (0.5,0.5) - [rotate around={180:(0.5,0.5)}] \side{#5} -- (0.5,0.5) - [rotate around={270:(0.5,0.5)}] \side{#4} -- (0.5,0.5) + \side{#2} + [rotate around={90:(0.5,0.5)}] -- \side{#3} + [rotate around={90:(0.5,0.5)}] -- \side{#4} + [rotate around={90:(0.5,0.5)}] -- \side{#5} -- cycle; \fi \draw \side{#2} - [rotate around={90:(0.5,0.5)}] \side{#3} - [rotate around={180:(0.5,0.5)}] \side{#5} - [rotate around={270:(0.5,0.5)}] \side{#4}; + [rotate around={90:(0.5,0.5)}] -- \side{#3} + [rotate around={90:(0.5,0.5)}] -- \side{#4} + [rotate around={90:(0.5,0.5)}] -- \side{#5}; } \newcommand{\tile}[5][\@nil]{% @@ -97,4 +93,19 @@ } } \draw (0,0) -- (0,\ymax) -- (\xmax,\ymax); +} + +\tikzset{ + pics/piece/.style n args={4}{ + inherit options/.code={\csname tikz@options\endcsname},inherit options, + code = { + \path[pic actions] + \side{#1} + [rotate around={90:(0.5,0.5)}] -- \side{#2} + [rotate around={90:(0.5,0.5)}] -- \side{#3} + [rotate around={90:(0.5,0.5)}] -- \side{#4} + -- cycle; + } + }, + piece/.search also={,/tikz,/pgf}, }
\ No newline at end of file |