From d617df6026a3bd8ba94d1723e379225dcb79790f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 19 Jul 2022 20:08:55 +0000 Subject: jigsaw (19jul22) git-svn-id: svn://tug.org/texlive/trunk@63937 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty b/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty index ae1a7360422..ad8bcc96743 100644 --- a/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty +++ b/Master/texmf-dist/tex/latex/jigsaw/jigsaw.sty @@ -40,19 +40,19 @@ } \newcommand{\halfpiece}[2]{ - \draw \side{#1} [rotate around={90:(0.5,0.5)}] \side{#2}; + \draw \side{#1} [rotate around={90:(0.5,0.5)}] \side{#2}; } \newcommand{\piece}[5][\@nil]{ - \def\tmp{#1}% - \ifx\tmp\@nnil - \else - \fill[#1] - \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; + \def\tmp{#1}% + \ifx\tmp\@nnil + \else + \fill[#1] + \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} @@ -62,12 +62,12 @@ } \newcommand{\tile}[5][\@nil]{% - \begin{tikzpicture} - \path (0,0) rectangle (1,0.97); - \begin{pgfinterruptboundingbox} - \piece[#1]{#2}{#3}{#4}{#5} - \end{pgfinterruptboundingbox} - \end{tikzpicture}% + \begin{tikzpicture} + \path (0,0) rectangle (1,0.97); + \begin{pgfinterruptboundingbox} + \piece[#1]{#2}{#3}{#4}{#5} + \end{pgfinterruptboundingbox} + \end{tikzpicture}% } \pgfmathdeclarerandomlist{inout}{{-1}{1}} @@ -99,12 +99,15 @@ 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; + \path (0,0) rectangle (1,1); + \begin{pgfinterruptboundingbox} + \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; + \end{pgfinterruptboundingbox} } }, piece/.search also={,/tikz,/pgf}, -- cgit v1.2.3