From 940e03ca0b55d204785182f33537a0c75fffbb0e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 28 Feb 2018 23:45:07 +0000 Subject: rubik (28feb18) git-svn-id: svn://tug.org/texlive/trunk@46764 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/rubik/rubikcube.sty | 729 +++++++++----- .../texmf-dist/tex/latex/rubik/rubikpatterns.sty | 113 ++- .../texmf-dist/tex/latex/rubik/rubikrotation.sty | 38 +- Master/texmf-dist/tex/latex/rubik/rubiktwocube.sty | 1061 ++++++++++++++++++++ 4 files changed, 1611 insertions(+), 330 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/rubik/rubiktwocube.sty (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/rubik/rubikcube.sty b/Master/texmf-dist/tex/latex/rubik/rubikcube.sty index 40e52aa7266..e673ce4c30d 100644 --- a/Master/texmf-dist/tex/latex/rubik/rubikcube.sty +++ b/Master/texmf-dist/tex/latex/rubik/rubikcube.sty @@ -10,9 +10,9 @@ %% Authors: RWD Nickalls (dick@nickalls.org) %% and Apostolos Syropoulos (asyropoulos@yahoo.com) %% -%% Copyright 03 March 2017 RWD Nickalls and A Syropoulos +%% Copyright February 25, 2018 RWD Nickalls and A Syropoulos %% -%% VERSION 4.0 +%% VERSION 5.0 %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -30,7 +30,7 @@ %% %% This package requires the basic TikZ package to be loaded already %% ------------------------------------------------------------------ -%%% \CheckSum{5683} +%%% \CheckSum{6231} %%% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -52,11 +52,9 @@ %% \DescribeMacro{\RubikCubeSolvedWB} -%%set up the UP face -%%draw the UP face and sides -\def\RCfileversion{4.0}% -\def\RCfiledate{2017/03/03}% +\def\RCfileversion{5.0}% +\def\RCfiledate{2018/02/25}% February 25, 2018 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{rubikcube}[\RCfiledate\space (v\RCfileversion)] \@ifpackageloaded{tikz}{}{% @@ -109,18 +107,18 @@ \newcommand{\xcount}{\thislevelcount} \newcommand{\ShowSequence}[3]{% \ForEachX{,}{% - \ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}% + {\ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}}% }{#3}% }% \newcommand{\ShowSequenceF}[3]{% \fbox{% \ForEachX{,}{% - \ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}% + {\ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}}% }{#3}% }}% \newcommand{\ShowSequencef}[3]{% \ForEachX{,}{% - \ifthenelse{\xcount=1}{\fbox{#2{\x}}}{#1{\fbox{#2{\x}}}}% + {\ifthenelse{\xcount=1}{\fbox{#2{\x}}}{#1{\fbox{#2{\x}}}}}% }{#3}% }% \newcommand{\SequenceInfo}{{}}% %% INFO only @@ -131,6 +129,7 @@ \newcommand{\SequenceBraceB}[2]{$\underbrace{\mbox{#2}}_{\mbox{#1}}$}% \newcommand{\SequenceBraceAF}[2]{\fbox{$\overbrace{\mbox{#2}}^{\mbox{#1}}$}}% \newcommand{\SequenceBraceBF}[2]{\fbox{$\underbrace{\mbox{#2}}_{\mbox{#1}}$}}% + \newcommand{\RubikFaceUp}[9]{% \def\Ult{#1}\def\Umt{#2}\def\Urt{#3}% \def\Ulm{#4}\def\Umm{#5}\def\Urm{#6}% @@ -197,17 +196,28 @@ \RubikFaceRightAll{X}% \RubikFaceFrontAll{X}% \RubikFaceBackAll{X}% - \newcommand{\RubikCubeGrey}{% -\RubikFaceUp {X}{X}{X}{X}{W}{X}{X}{X}{X}% -\RubikFaceDown {X}{X}{X}{X}{Y}{X}{X}{X}{X}% -\RubikFaceLeft {X}{X}{X}{X}{B}{X}{X}{X}{X}% -\RubikFaceRight{X}{X}{X}{X}{G}{X}{X}{X}{X}% -\RubikFaceFront{X}{X}{X}{X}{O}{X}{X}{X}{X}% -\RubikFaceBack {X}{X}{X}{X}{R}{X}{X}{X}{X}% + \RubikFaceRight{X}{X}{X}{X}{G}{X}{X}{X}{X}% + \RubikFaceLeft {X}{X}{X}{X}{B}{X}{X}{X}{X}% + \RubikFaceUp {X}{X}{X}{X}{W}{X}{X}{X}{X}% + \RubikFaceDown {X}{X}{X}{X}{Y}{X}{X}{X}{X}% + \RubikFaceFront{X}{X}{X}{X}{O}{X}{X}{X}{X}% + \RubikFaceBack {X}{X}{X}{X}{R}{X}{X}{X}{X}% } \newcommand{\RubikCubeGray}{\RubikCubeGrey} -\newcommand{\SolvedConfig}[6]{% +\newcommand{\RubikCubeGreyWY}{\RubikCubeGrey} +\newcommand{\RubikCubeGrayWY}{\RubikCubeGreyWY} +%% +\newcommand{\RubikCubeGreyWB}{% + \RubikFaceRight{X}{X}{X}{X}{R}{X}{X}{X}{X}% + \RubikFaceLeft {X}{X}{X}{X}{O}{X}{X}{X}{X}% + \RubikFaceUp {X}{X}{X}{X}{W}{X}{X}{X}{X}% + \RubikFaceDown {X}{X}{X}{X}{B}{X}{X}{X}{X}% + \RubikFaceFront{X}{X}{X}{X}{G}{X}{X}{X}{X}% + \RubikFaceBack {X}{X}{X}{X}{Y}{X}{X}{X}{X}% +} +\newcommand{\RubikCubeGrayWB}{\RubikCubeGreyWB} +\newcommand{\RubikSolvedConfig}[6]{% \RubikFaceRightAll{#1}% \RubikFaceLeftAll{#2}% \RubikFaceUpAll{#3}% @@ -215,11 +225,11 @@ \RubikFaceFrontAll{#5}% \RubikFaceBackAll{#6}% } -\newcommand{\RubikCubeGreyAll}{\SolvedConfig{X}{X}{X}{X}{X}{X}}% +\newcommand{\RubikCubeGreyAll}{\RubikSolvedConfig{X}{X}{X}{X}{X}{X}}% \newcommand{\RubikCubeGrayAll}{\RubikCubeGreyAll} -\newcommand{\RubikCubeSolved}{\SolvedConfig{G}{B}{W}{Y}{O}{R}}% +\newcommand{\RubikCubeSolved}{\RubikSolvedConfig{G}{B}{W}{Y}{O}{R}}% \newcommand{\RubikCubeSolvedWY}{\RubikCubeSolved}% -\newcommand{\RubikCubeSolvedWB}{\SolvedConfig{R}{O}{W}{B}{G}{Y}}% +\newcommand{\RubikCubeSolvedWB}{\RubikSolvedConfig{R}{O}{W}{B}{G}{Y}}% \newcommand{\RubikSliceTopR}[6]{% \def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% \def\Rlt{#4}\def\Rmt{#5}\def\Rrt{#6}% @@ -272,7 +282,6 @@ \draw[line join=round,line cap=round,ultra thick,fill=\Frb]% (2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; } - \newcommand{\DrawRubikCubeRU}{% \DrawRubikCubeFrontFace %% frontface %%-----------Up face---------- @@ -463,55 +472,7 @@ (2,3) -- (1.66, 3.33) -- (2.66,3.33) -- (3,3) -- cycle;% \ %%trailing space } -\newcommand{\DrawRubikLayerFace}[9]{% -%%-----------FRONT face--------- -%%---top row -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#2]% -(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#3]% -(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; -%%-----middle row -\draw[line join=round,line cap=round,ultra thick,fill=#4]% -(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#5]% -(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#6]% -(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; -%%----bottom row -\draw[line join=round,line cap=round,ultra thick,fill=#7]% -(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#8]% -(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#9]% -(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; -} -\newcommand{\DrawRubikLayerFaceAll}[1]{% -%%----------FRONT face----------- -%%---top row -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; -%%-----middle row -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; -%%----bottom row -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; -\draw[line join=round,line cap=round,ultra thick,fill=#1]% -(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; -} -\newcommand{\DrawFlatUp}[2]{% +\newcommand{\DrawRubikFlatUp}[2]{% \pgfmathsetmacro{\ux}{#1}% \pgfmathsetmacro{\uy}{#2}% %%---top row @@ -546,7 +507,7 @@ -- (\ux + 3,\uy + 0) -- cycle; } %%------------------------- -\newcommand{\DrawFlatDown}[2]{% +\newcommand{\DrawRubikFlatDown}[2]{% \pgfmathsetmacro{\ddx}{#1}% \pgfmathsetmacro{\ddy}{#2}% %%---top row @@ -581,61 +542,77 @@ -- (\ddx + 3,\ddy + 0) -- cycle; } %%------------------------- -\newcommand{\DrawFlatLeft}[2]{% +\newcommand{\DrawRubikFlatLeft}[2]{% \pgfmathsetmacro{\lx}{#1}% \pgfmathsetmacro{\ly}{#2}% -%% NOTE: y variable coord not yet implemented %%---top row \draw[line join=round,line cap=round,ultra thick,fill=\Llt]% -(\lx + 0,2) -- (\lx + 0, 3) -- (\lx + 1,3) -- (\lx + 1,2) -- cycle; +(\lx + 0, \ly + 2) -- (\lx + 0, \ly + 3) -- (\lx + 1, \ly + 3)% + -- (\lx + 1, \ly + 2) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% -(\lx + 1,2) -- (\lx + 1, 3) -- (\lx + 2,3) -- (\lx + 2,2) -- cycle; +(\lx + 1, \ly + 2) -- (\lx + 1, \ly + 3) -- (\lx + 2, \ly + 3)% + -- (\lx + 2, \ly + 2) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% -(\lx + 2,2) -- (\lx + 2, 3) -- (\lx + 3,3) -- (\lx + 3,2) -- cycle; +(\lx + 2, \ly + 2) -- (\lx + 2, \ly + 3) -- (\lx + 3, \ly + 3)% + -- (\lx + 3, \ly + 2) -- cycle; %%-----middle row \draw[line join=round,line cap=round,ultra thick,fill=\Llm]% -(\lx + 0,1) -- (\lx + 0, 2) -- (\lx + 1,2) -- (\lx + 1,1) -- cycle; +(\lx + 0, \ly + 1) -- (\lx + 0, \ly + 2) -- (\lx + 1, \ly + 2)% + -- (\lx + 1, \ly + 1) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% -(\lx + 1,1) -- (\lx + 1, 2) -- (\lx + 2,2) -- (\lx + 2,1) -- cycle; +(\lx + 1, \ly + 1) -- (\lx + 1, \ly + 2) -- (\lx + 2, \ly + 2)% + -- (\lx + 2, \ly + 1) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% -(\lx + 2,1) -- (\lx + 2, 2) -- (\lx + 3,2) -- (\lx + 3,1) -- cycle; +(\lx + 2, \ly + 1) -- (\lx + 2, \ly + 2) -- (\lx + 3, \ly + 2)% + -- (\lx + 3, \ly + 1) -- cycle; %%----bottom row \draw[line join=round,line cap=round,ultra thick,fill=\Llb]% -(\lx + 0,0) -- (\lx + 0, 1) -- (\lx + 1,1) -- (\lx + 1,0) -- cycle; +(\lx + 0, \ly + 0) -- (\lx + 0, \ly + 1) -- (\lx + 1, \ly + 1)% + -- (\lx + 1, \ly + 0) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% -(\lx + 1,0) -- (\lx + 1, 1) -- (\lx + 2,1) -- (\lx + 2,0) -- cycle; +(\lx + 1, \ly + 0) -- (\lx + 1, \ly + 1) -- (\lx + 2, \ly + 1)% + -- (\lx + 2, \ly + 0) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% -(\lx + 2,0) -- (\lx + 2, 1) -- (\lx + 3,1) -- (\lx + 3,0) -- cycle; +(\lx + 2, \ly + 0) -- (\lx + 2, \ly + 1) -- (\lx + 3, \ly + 1)% + -- (\lx + 3, \ly + 0) -- cycle; } %%-------------------------- -\newcommand{\DrawFlatRight}[2]{% -\pgfmathsetmacro{\rx}{#1}% %3 -\pgfmathsetmacro{\ry}{#2}% %0 -%% NOTE: y variable coord not yet implemented +\newcommand{\DrawRubikFlatRight}[2]{% +\pgfmathsetmacro{\rx}{#1}% +\pgfmathsetmacro{\ry}{#2}% %%---top row \draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% -(\rx + 0,2) -- (\rx + 0, 3) -- (\rx + 1,3) -- (\rx + 1,2) -- cycle; +(\rx + 0, \ry + 2) -- (\rx + 0, \ry + 3) -- (\rx + 1, \ry + 3)% + -- (\rx + 1, \ry + 2) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% -(\rx + 1,2) -- (\rx + 1, 3) -- (\rx + 2,3) -- (\rx + 2,2) -- cycle; +(\rx + 1, \ry + 2) -- (\rx + 1, \ry + 3) -- (\rx + 2, \ry + 3)% + -- (\rx + 2, \ry + 2) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% -(\rx + 2,2) -- (\rx + 2, 3) -- (\rx + 3,3) -- (\rx + 3,2) -- cycle; +(\rx + 2, \ry + 2) -- (\rx + 2, \ry + 3) -- (\rx + 3, \ry + 3)% + -- (\rx + 3, \ry + 2) -- cycle; %%-----middle row \draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% -(\rx + 0,1) -- (\rx + 0, 2) -- (\rx + 1,2) -- (\rx + 1,1) -- cycle; +(\rx + 0, \ry + 1) -- (\rx + 0, \ry + 2) -- (\rx + 1, \ry + 2)% + -- (\rx + 1, \ry + 1) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% -(\rx + 1,1) -- (\rx + 1, 2) -- (\rx + 2,2) -- (\rx + 2,1) -- cycle; +(\rx + 1, \ry + 1) -- (\rx + 1, \ry + 2) -- (\rx + 2, \ry + 2)% + -- (\rx + 2, \ry + 1) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% -(\rx + 2,1) -- (\rx + 2, 2) -- (\rx + 3,2) -- (\rx + 3,1) -- cycle; +(\rx + 2, \ry + 1) -- (\rx + 2, \ry + 2) -- (\rx + 3, \ry + 2)% + -- (\rx + 3, \ry + 1) -- cycle; %%----bottom row \draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% -(\rx + 0,0) -- (\rx + 0, 1) -- (\rx + 1,1) -- (\rx + 1,0) -- cycle; +(\rx + 0, \ry + 0) -- (\rx + 0, \ry + 1) -- (\rx + 1, \ry + 1)% + -- (\rx + 1, \ry + 0) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% -(\rx + 1,0) -- (\rx + 1, 1) -- (\rx + 2,1) -- (\rx + 2,0) -- cycle; +(\rx + 1, \ry + 0) -- (\rx + 1, \ry + 1) -- (\rx + 2, \ry + 1)% + -- (\rx + 2, \ry + 0) -- cycle; \draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% -(\rx + 2,0) -- (\rx + 2, 1) -- (\rx + 3,1) -- (\rx + 3,0) -- cycle; +(\rx + 2, \ry + 0) -- (\rx + 2, \ry + 1) -- (\rx + 3, \ry + 1)% + -- (\rx + 3, \ry + 0) -- cycle; } %%----------------------- -\newcommand{\DrawFlatFront}{% +\newcommand{\DrawRubikFlatFront}{% %% This command is used /only/ by the \cmd{\DrawRubikCubeF} command. %% NOTE: x, y variables not implemented as not required here %%---top row @@ -667,7 +644,7 @@ (2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; } %%------------------------- -\newcommand{\DrawFlatBack}[2]{% +\newcommand{\DrawRubikFlatBack}[2]{% \pgfmathsetmacro{\bx}{#1}% \pgfmathsetmacro{\by}{#2}% %%---top row @@ -702,186 +679,360 @@ -- (\bx + 3,\by + 0) -- cycle; } \newcommand{\DrawRubikCubeF}{% - \DrawFlatUp{0}{3}% - \DrawFlatDown{0}{-3}% - \DrawFlatLeft{-3}{0}% - \DrawFlatFront% - \DrawFlatRight{3}{0}% - \DrawFlatBack{6}{0}% + \DrawRubikFlatUp{0}{3}% + \DrawRubikFlatDown{0}{-3}% + \DrawRubikFlatLeft{-3}{0}% + \DrawRubikFlatFront% + \DrawRubikFlatRight{3}{0}% + \DrawRubikFlatBack{6}{0}% } \newcommand{\DrawRubikCubeSF}{% - \DrawRubikCube% - \DrawFlatDown{0}{-3}% - \DrawFlatLeft{-3}{0}% - \DrawFlatBack{4}{1}% -} -\newcommand{\DrawFlatUpSide}{% -\DrawFlatUp{0}{0}% -\DrawRubikLayerSideT{\Brt}{\Bmt}{\Blt}% -\DrawRubikLayerSideL{\Llt}{\Lmt}{\Lrt}% -\DrawRubikLayerSideR{\Rrt}{\Rmt}{\Rlt}% -\DrawRubikLayerSideB{\Flt}{\Fmt}{\Frt}% -} -\newcommand{\DrawFlatFrontSide}{% -\DrawFlatFront{0}{0}% -\DrawRubikLayerSideT{\Ulb}{\Umb}{\Urb}% -\DrawRubikLayerSideL{\Lrt}{\Lrm}{\Lrb}% -\DrawRubikLayerSideR{\Rlt}{\Rlm}{\Rlb}% -\DrawRubikLayerSideB{\Dlt}{\Dmt}{\Drt}% -} -\newcommand{\DrawFlatRightSide}{% -\DrawFlatRight{0}{0}% -\DrawRubikLayerSideT{\Urb}{\Urm}{\Urt}% -\DrawRubikLayerSideL{\Frt}{\Frm}{\Frb}% -\DrawRubikLayerSideR{\Blt}{\Blm}{\Blb}% -\DrawRubikLayerSideB{\Drt}{\Drm}{\Drb}% -} -\newcommand{\DrawFlatLeftSide}{% -\DrawFlatLeft{0}{0}% -\DrawRubikLayerSideT{\Ult}{\Ulm}{\Ulb}% -\DrawRubikLayerSideL{\Brt}{\Brm}{\Brb}% -\DrawRubikLayerSideR{\Flt}{\Flm}{\Flb}% -\DrawRubikLayerSideB{\Dlb}{\Dlm}{\Dlt}% -} -\newcommand{\DrawFlatBackSide}{% -\DrawFlatBack{0}{0}% -\DrawRubikLayerSideT{\Urt}{\Umt}{\Ult}% -\DrawRubikLayerSideL{\Rrt}{\Rrm}{\Rrb}% -\DrawRubikLayerSideR{\Llt}{\Llm}{\Llb}% -\DrawRubikLayerSideB{\Drb}{\Dmb}{\Dlb}% -} -\newcommand{\DrawFlatDownSide}{% -\DrawFlatDown{0}{0}% -\DrawRubikLayerSideT{\Flb}{\Fmb}{\Frb}% -\DrawRubikLayerSideL{\Lrb}{\Lmb}{\Llb}% -\DrawRubikLayerSideR{\Rlb}{\Rmb}{\Rrb}% -\DrawRubikLayerSideB{\Brb}{\Bmb}{\Blb}% -} -\newcommand{\DrawFaceUp}{\DrawFlatUp{0}{0}} -\newcommand{\DrawFaceDown}{\DrawFlatDown{0}{0}} -\newcommand{\DrawFaceLeft}{\DrawFlatLeft{0}{0}} -\newcommand{\DrawFaceRight}{\DrawFlatRight{0}{0}} -\newcommand{\DrawFaceFront}{\DrawFlatFront{0}{0}} -\newcommand{\DrawFaceBack}{\DrawFlatBack{0}{0}} -\newcommand{\DrawFaceUpSide}{\DrawFlatUpSide} -\newcommand{\DrawFaceDownSide}{\DrawFlatDownSide} -\newcommand{\DrawFaceLeftSide}{\DrawFlatLeftSide} -\newcommand{\DrawFaceRightSide}{\DrawFlatRightSide} -\newcommand{\DrawFaceFrontSide}{\DrawFlatFrontSide} -\newcommand{\DrawFaceBackSide}{\DrawFlatBackSide} + \DrawRubikCubeRU% + \DrawRubikFlatDown{0}{-3}% + \DrawRubikFlatLeft{-3}{0}% + \DrawRubikFlatBack{4}{1}% +} +\newcommand{\DrawRubikFaceUpSide}{% +\DrawRubikFlatUp{0}{0}% +\side@barT{1}{\Brt} +\side@barT{2}{\Bmt} +\side@barT{3}{\Blt} +\side@barL{1}{\Lrt} +\side@barL{2}{\Lmt} +\side@barL{3}{\Llt} +\side@barR{1}{\Rlt} +\side@barR{2}{\Rmt} +\side@barR{3}{\Rrt} +\side@barB{1}{\Flt} +\side@barB{2}{\Fmt} +\side@barB{3}{\Frt} +} +\newcommand{\DrawRubikFaceFrontSide}{% +\DrawRubikFlatFront{0}{0}% +\side@barT{1}{\Ulb} +\side@barT{2}{\Umb} +\side@barT{3}{\Urb} +\side@barL{1}{\Lrb} +\side@barL{2}{\Lrm} +\side@barL{3}{\Lrt} +\side@barR{1}{\Rlb} +\side@barR{2}{\Rlm} +\side@barR{3}{\Rlt} +\side@barB{1}{\Dlt} +\side@barB{2}{\Dmt} +\side@barB{3}{\Drt} +} +\newcommand{\DrawRubikFaceRightSide}{% +\DrawRubikFlatRight{0}{0}% +\side@barT{1}{\Urb} +\side@barT{2}{\Urm} +\side@barT{3}{\Urt} +\side@barL{1}{\Frb} +\side@barL{2}{\Frm} +\side@barL{3}{\Frt} +\side@barR{1}{\Blb} +\side@barR{2}{\Blm} +\side@barR{3}{\Blt} +\side@barB{1}{\Drt} +\side@barB{2}{\Drm} +\side@barB{3}{\Drb} +} +\newcommand{\DrawRubikFaceLeftSide}{% +\DrawRubikFlatLeft{0}{0}% +\side@barT{1}{\Ult} +\side@barT{2}{\Ulm} +\side@barT{3}{\Ulb} +\side@barL{1}{\Brb} +\side@barL{2}{\Brm} +\side@barL{3}{\Brt} +\side@barR{1}{\Flb} +\side@barR{2}{\Flm} +\side@barR{3}{\Flt} +\side@barB{1}{\Dlb} +\side@barB{2}{\Dlm} +\side@barB{3}{\Dlt} +} +\newcommand{\DrawRubikFaceBackSide}{% +\DrawRubikFlatBack{0}{0}% +\side@barT{1}{\Urt} +\side@barT{2}{\Umt} +\side@barT{3}{\Ult} +\side@barL{1}{\Rrb} +\side@barL{2}{\Rrm} +\side@barL{3}{\Rrt} +\side@barR{1}{\Llb} +\side@barR{2}{\Llm} +\side@barR{3}{\Llt} +\side@barB{1}{\Drb} +\side@barB{2}{\Dmb} +\side@barB{3}{\Dlb} +} +\newcommand{\DrawRubikFaceDownSide}{% +\DrawRubikFlatDown{0}{0}% +\side@barT{1}{\Flb} +\side@barT{2}{\Fmb} +\side@barT{3}{\Frb} +\side@barL{1}{\Llb} +\side@barL{2}{\Lmb} +\side@barL{3}{\Lrb} +\side@barR{1}{\Rrb} +\side@barR{2}{\Rmb} +\side@barR{3}{\Rlb} +\side@barB{1}{\Brb} +\side@barB{2}{\Bmb} +\side@barB{3}{\Blb} +} +\newcommand{\DrawRubikFaceUp}{\DrawRubikFlatUp{0}{0}} +\newcommand{\DrawRubikFaceDown}{\DrawRubikFlatDown{0}{0}} +\newcommand{\DrawRubikFaceLeft}{\DrawRubikFlatLeft{0}{0}} +\newcommand{\DrawRubikFaceRight}{\DrawRubikFlatRight{0}{0}} +\newcommand{\DrawRubikFaceFront}{\DrawRubikFlatFront{0}{0}} +\newcommand{\DrawRubikFaceBack}{\DrawRubikFlatBack{0}{0}} +%% RWDN19A Finally, we create the short-hand versions. +\newcommand{\DrawRubikFaceU}{\DrawRubikFaceUp} +\newcommand{\DrawRubikFaceD}{\DrawRubikFaceDown} +\newcommand{\DrawRubikFaceL}{\DrawRubikFaceLeft} +\newcommand{\DrawRubikFaceR}{\DrawRubikFaceRight} +\newcommand{\DrawRubikFaceF}{\DrawRubikFaceFront} +\newcommand{\DrawRubikFaceB}{\DrawRubikFaceBack} +\newcommand{\DrawRubikFaceUS}{\DrawRubikFaceUpSide} +\newcommand{\DrawRubikFaceDS}{\DrawRubikFaceDownSide} +\newcommand{\DrawRubikFaceLS}{\DrawRubikFaceLeftSide} +\newcommand{\DrawRubikFaceRS}{\DrawRubikFaceRightSide} +\newcommand{\DrawRubikFaceFS}{\DrawRubikFaceFrontSide} +\newcommand{\DrawRubikFaceBS}{\DrawRubikFaceBackSide} +\newcommand{\RubikSidebarWidth}[1]{\pgfmathsetmacro{\bw}{#1}} +\newcommand{\RubikSidebarLength}[1]{\pgfmathsetmacro{\bl}{#1}} +\newcommand{\RubikSidebarSep}[1]{\pgfmathsetmacro{\bs}{#1}} +\RubikSidebarWidth{0.3}% +\RubikSidebarLength{1}% +\RubikSidebarSep{0.3}% \newcommand{\RubikSideBarWidth}[1]{\pgfmathsetmacro{\bw}{#1}} \newcommand{\RubikSideBarLength}[1]{\pgfmathsetmacro{\bl}{#1}} \newcommand{\RubikSideBarSep}[1]{\pgfmathsetmacro{\bs}{#1}} -\RubikSideBarWidth{0.3}% -\RubikSideBarLength{1}% -\RubikSideBarSep{0.3}% + +\def\no@sidebar{}% +\newcommand{\NoSidebar}[1]{\def\no@sidebar{#1}} \newcommand{\side@barL}[2]{% -%% #1 = cubie possn no, #2 = colour -\pgfmathsetmacro{\blh}{\bl*(0.5)}% -\pgfmathsetmacro{\dx}{0 - \bs - \bw}% -\pgfmathsetmacro{\dy}{#1-1+0.5-\blh}% -\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{0 - \bs - \bw}% + \pgfmathsetmacro{\dy}{#1-1+0.5-\blh}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; -} +}} \newcommand{\side@barR}[2]{% -%% #1 = cubie possn no, #2 = colour -\pgfmathsetmacro{\blh}{\bl*(0.5)}% -\pgfmathsetmacro{\dx}{3 + \bs}% -\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh}% -\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{3 + \bs}% + \pgfmathsetmacro{\dy}{#1 -1+0.5-\blh}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; -} +}} \newcommand{\side@barT}[2]{% -%% #1 = cubie possn no, #2 = colour -\pgfmathsetmacro{\blh}{\bl*(0.5)}% -\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% -\pgfmathsetmacro{\dy}{3 +\bs}% -\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% + \pgfmathsetmacro{\dy}{3 +\bs}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; -} +}} \newcommand{\side@barB}[2]{% -%% #1 = cubie possn no, #2 = colour -\pgfmathsetmacro{\blh}{\bl*(0.5)}% -\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% -\pgfmathsetmacro{\dy}{0 -\bs-\bw}% -\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% + \pgfmathsetmacro{\dy}{0 -\bs-\bw}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +}} +\newcommand{\side@barRubikRbackRU}[2]{% + %% #1 = cubie possn no, #2 = colour + %% dx --> dx+1 + %% dy --> dy+1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{3 + \bs +1}% + \pgfmathsetmacro{\dy}{#1 -1+0.5-\blh +1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarRBRU}{% +\side@barRubikRbackRU{3}{\Blt}% +\side@barRubikRbackRU{2}{\Blm}% +\side@barRubikRbackRU{1}{\Blb}% +} +\newcommand{\DrawRubikCubeSidebarBRRU}{\DrawRubikCubeSidebarRBRU} +\newcommand{\DrawRubikCubeSidebarRB}[1]{\@join{\DrawRubikCubeSidebarRB}{#1}} +\newcommand{\DrawRubikCubeSidebarBR}[1]{\@join{\DrawRubikCubeSidebarBR}{#1}} +\newcommand{\side@barRubikTbackRU}[2]{% + %% #1 = cubie possn no; #2 = colour + %% dx --> dx+1 + %% dy --> dy+1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh +1}% + \pgfmathsetmacro{\dy}{3 +\bs +1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarUBRU}{% +\side@barRubikTbackRU{1}{\Brt}% +\side@barRubikTbackRU{2}{\Bmt}% +\side@barRubikTbackRU{3}{\Blt}% +} +\newcommand{\DrawRubikCubeSidebarBURU}{\DrawRubikCubeSidebarUBRU} +\newcommand{\DrawRubikCubeSidebarUB}[1]{\@join{\DrawRubikCubeSidebarUB}{#1}} +\newcommand{\DrawRubikCubeSidebarBU}[1]{\@join{\DrawRubikCubeSidebarBU}{#1}} +\newcommand{\DrawRubikCubeSidebarFLRU}{% +\side@barL{3}{\Lrt}% +\side@barL{2}{\Lrm}% +\side@barL{1}{\Lrb}% +} +\newcommand{\DrawRubikCubeSidebarLFRU}{\DrawRubikCubeSidebarFLRU} +\newcommand{\DrawRubikCubeSidebarFL}[1]{\@join{\DrawRubikCubeSidebarFL}{#1}} +\newcommand{\DrawRubikCubeSidebarLF}[1]{\@join{\DrawRubikCubeSidebarLF}{#1}} +\newcommand{\DrawRubikCubeSidebarFDRU}{% +\side@barB{1}{\Dlt}% +\side@barB{2}{\Dmt}% +\side@barB{3}{\Drt}% +} +\newcommand{\DrawRubikCubeSidebarDFRU}{\DrawRubikCubeSidebarFDRU} +\newcommand{\DrawRubikCubeSidebarFD}[1]{\@join{\DrawRubikCubeSidebarFD}{#1}} +\newcommand{\DrawRubikCubeSidebarDF}[1]{\@join{\DrawRubikCubeSidebarDF}{#1}} +\newcommand{\DrawRubikCubeSidebarDFLU}{\DrawRubikCubeSidebarDFRU} +\newcommand{\DrawRubikCubeSidebarFDLU}{\DrawRubikCubeSidebarFDRU} +\newcommand{\side@barRubikLbackLU}[2]{% + %% #1 = cubie possn no, #2 = colour + %% dx --> dx-1 + %% dy --> dy+1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{0 - \bs -\bw -1}% + \pgfmathsetmacro{\dy}{#1 -1+0.5-\blh +1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarLBLU}{% +\side@barRubikLbackLU{3}{\Brt}% +\side@barRubikLbackLU{2}{\Brm}% +\side@barRubikLbackLU{1}{\Brb}% +} +\newcommand{\DrawRubikCubeSidebarBLLU}{\DrawRubikCubeSidebarLBLU} +\newcommand{\DrawRubikCubeSidebarLB}[1]{\@join{\DrawRubikCubeSidebarLB}{#1}} +\newcommand{\DrawRubikCubeSidebarBL}[1]{\@join{\DrawRubikCubeSidebarBL}{#1}} +\newcommand{\side@barRubikTbackLU}[2]{% + %% #1 = cubie possn no; #2 = colour + %% dx --> dx-1 + %% dy --> dy+1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh -1}% + \pgfmathsetmacro{\dy}{3 +\bs +1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarUBLU}{% +\side@barRubikTbackLU{1}{\Brt}% +\side@barRubikTbackLU{2}{\Bmt}% +\side@barRubikTbackLU{3}{\Blt}% +} +\newcommand{\DrawRubikCubeSidebarBULU}{\DrawRubikCubeSidebarUBLU} +\newcommand{\DrawRubikCubeSidebarFRLU}{% +\side@barR{3}{\Rlt}% +\side@barR{2}{\Rlm}% +\side@barR{1}{\Rlb}% +} +\newcommand{\DrawRubikCubeSidebarRFLU}{\DrawRubikCubeSidebarFRLU} +\newcommand{\DrawRubikCubeSidebarFR}[1]{\@join{\DrawRubikCubeSidebarFR}{#1}} +\newcommand{\DrawRubikCubeSidebarRF}[1]{\@join{\DrawRubikCubeSidebarRF}{#1}} +\newcommand{\DrawRubikCubeSidebarFURD}{% +\side@barT{1}{\Ulb}% +\side@barT{2}{\Umb}% +\side@barT{3}{\Urb}% +} +\newcommand{\DrawRubikCubeSidebarUFRD}{\DrawRubikCubeSidebarFURD} +\newcommand{\DrawRubikCubeSidebarFU}[1]{\@join{\DrawRubikCubeSidebarFU}{#1}} +\newcommand{\DrawRubikCubeSidebarUF}[1]{\@join{\DrawRubikCubeSidebarUF}{#1}} +\newcommand{\DrawRubikCubeSidebarFLRD}{\DrawRubikCubeSidebarFLRU} +\newcommand{\DrawRubikCubeSidebarLFRD}{\DrawRubikCubeSidebarLFRU} +\newcommand{\side@barRubikRbackRD}[2]{% + %% #1 = cubie possn no, #2 = colour + %% dx --> dx+1 + %% dy --> dy-1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{3 + \bs +1}% + \pgfmathsetmacro{\dy}{#1 -1+0.5-\blh -1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarRBRD}{% +\side@barRubikRbackRD{3}{\Blt}% +\side@barRubikRbackRD{2}{\Blm}% +\side@barRubikRbackRD{1}{\Blb}% +} +\newcommand{\DrawRubikCubeSidebarBRRD}{\DrawRubikCubeSidebarRBRD} +\newcommand{\side@barRubikBbackRD}[2]{% + %% #1 = cubie possn no; #2 = colour + %% dx --> dx+1 + %% dy --> dy-1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh +1}% + \pgfmathsetmacro{\dy}{0 -\bs - \bw -1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarDBRD}{% +\side@barRubikBbackRD{1}{\Brb}% +\side@barRubikBbackRD{2}{\Bmb}% +\side@barRubikBbackRD{3}{\Blb}% +} +\newcommand{\DrawRubikCubeSidebarBDRD}{\DrawRubikCubeSidebarDBRD} +\newcommand{\DrawRubikCubeSidebarDB}[1]{\@join{\DrawRubikCubeSidebarDB}{#1}} +\newcommand{\DrawRubikCubeSidebarBD}[1]{\@join{\DrawRubikCubeSidebarBD}{#1}} +\newcommand{\DrawRubikCubeSidebarFULD}{\DrawRubikCubeSidebarFURD} +\newcommand{\DrawRubikCubeSidebarUFLD}{\DrawRubikCubeSidebarUFRD} +\newcommand{\DrawRubikCubeSidebarFRLD}{\DrawRubikCubeSidebarFRLU} +\newcommand{\DrawRubikCubeSidebarRFLD}{\DrawRubikCubeSidebarRFLU} +\newcommand{\side@barRubikLbackLD}[2]{% + %% #1 = cubie possn no, #2 = colour + %% dx --> dx-1 + %% dy --> dy-1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{0 - \bs -\bw -1}% + \pgfmathsetmacro{\dy}{#1 -1+0.5-\blh -1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) + -- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarLBLD}{% +\side@barRubikLbackLD{3}{\Brt}% +\side@barRubikLbackLD{2}{\Brm}% +\side@barRubikLbackLD{1}{\Brb}% +} +\newcommand{\DrawRubikCubeSidebarBLLD}{\DrawRubikCubeSidebarLBLD} +\newcommand{\side@barRubikBbackLD}[2]{% + %% #1 = cubie possn no; #2 = colour + %% dx --> dx-1 + %% dy --> dy-1 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\blh}{\bl*(0.5)}% + \pgfmathsetmacro{\dx}{#1 -1+0.5-\blh -1}% + \pgfmathsetmacro{\dy}{0 -\bs - \bw -1}% + \draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) + -- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; +}} +\newcommand{\DrawRubikCubeSidebarDBLD}{% +\side@barRubikBbackLD{1}{\Brb}% +\side@barRubikBbackLD{2}{\Bmb}% +\side@barRubikBbackLD{3}{\Blb}% } -%%---Left side -\newcommand{\DrawRubikLayerSideLTx}[1]{\side@barL{3}{#1}} -\newcommand{\DrawRubikLayerSideLMx}[1]{\side@barL{2}{#1}} -\newcommand{\DrawRubikLayerSideLM}[1]{\side@barL{2}{#1}} -\newcommand{\DrawRubikLayerSideLBx}[1]{\side@barL{1}{#1}} -\newcommand{\DrawRubikLayerSideRTx}[1]{\side@barR{3}{#1}} -\newcommand{\DrawRubikLayerSideRMx}[1]{\side@barR{2}{#1}} -\newcommand{\DrawRubikLayerSideRM}[1]{\side@barR{2}{#1}} -\newcommand{\DrawRubikLayerSideRBx}[1]{\side@barR{1}{#1}} -\newcommand{\DrawRubikLayerSideLTy}[1]{\side@barT{1}{#1}} -\newcommand{\DrawRubikLayerSideMTy}[1]{\side@barT{2}{#1}} -\newcommand{\DrawRubikLayerSideMT}[1]{\side@barT{2}{#1}} -\newcommand{\DrawRubikLayerSideRTy}[1]{\side@barT{3}{#1}} -\newcommand{\DrawRubikLayerSideLBy}[1]{\side@barB{1}{#1}} -\newcommand{\DrawRubikLayerSideMBy}[1]{\side@barB{2}{#1}} -\newcommand{\DrawRubikLayerSideMB}[1]{\side@barB{2}{#1}} -\newcommand{\DrawRubikLayerSideRBy}[1]{\side@barB{3}{#1}} -%%--Top side--- -\newcommand{\DrawRubikLayerSideT}[3]{% - \DrawRubikLayerSideLTy{#1}% - \DrawRubikLayerSideMTy{#2}% - \DrawRubikLayerSideRTy{#3}% -} -%%--Bottom side--- -\newcommand{\DrawRubikLayerSideB}[3]{% - \DrawRubikLayerSideLBy{#1}% - \DrawRubikLayerSideMBy{#2}% - \DrawRubikLayerSideRBy{#3}% -} -%%--Left side-------- -%% colours run vertically DOWN -\newcommand{\DrawRubikLayerSideL}[3]{% - \DrawRubikLayerSideLTx{#1}% - \DrawRubikLayerSideLMx{#2}% - \DrawRubikLayerSideLBx{#3}% -} -%%--Right side-------- -%% colours run vertically DOWN -\newcommand{\DrawRubikLayerSideR}[3]{% - \DrawRubikLayerSideRTx{#1}% - \DrawRubikLayerSideRMx{#2}% - \DrawRubikLayerSideRBx{#3}% -} -\newcommand{\DrawRubikLayerSideLR}[6]{% - \DrawRubikLayerSideLTx{#1}% - \DrawRubikLayerSideRTx{#2}% - \DrawRubikLayerSideLMx{#3}% - \DrawRubikLayerSideRMx{#4}% - \DrawRubikLayerSideLBx{#5}% - \DrawRubikLayerSideRBx{#6}% -} -\newcommand{\RubikSideFront}[3]{% -\def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% -} -\newcommand{\RubikSideRight}[3]{% -\def\Rlt{#1}\def\Rmt{#2}\def\Rrt{#3}% -} -\newcommand{\RubikSideLeft}[3]{% -\def\Llt{#1}\def\Lmt{#2}\def\Lrt{#3}% -} -\newcommand{\RubikSideBack}[3]{% -\def\Blt{#1}\def\Bmt{#2}\def\Brt{#3}% -} -\newcommand{\RubikSideFrontAll}[1]{% -\def\Flt{#1}\def\Fmt{#1}\def\Frt{#1}% -} -\newcommand{\RubikSideRightAll}[1]{% -\def\Rlt{#1}\def\Rmt{#1}\def\Rrt{#1}% -} -\newcommand{\RubikSideLeftAll}[1]{% -\def\Llt{#1}\def\Lmt{#1}\def\Lrt{#1}% -} -\newcommand{\RubikSideBackAll}[1]{% -\def\Blt{#1}\def\Bmt{#1}\def\Brt{#1}% -} +\newcommand{\DrawRubikCubeSidebarBDLD}{\DrawRubikCubeSidebarDBLD} \newcommand{\DrawNCubeAll}[4]{% \pgfmathsetmacro{\ncubes}{#1-1}% %% need to subtract 1 from the given number of cubies per side @@ -1035,14 +1186,22 @@ \newcommand{\@rrm}[1]{{\@rubikfont #1{\@rubikfontFNS m}}} \newcommand{\@rrmp}[1]{{\@rubikfont #1{\@rubikfontFNS m}\@rubikprime}} \newcommand{\@xyzh}[1]{[{\@rubikfont #1}]} -\newcommand{\@xyzhp}[1]{[{\@rubikfont #1\@rubikprime}]} -\newcommand{\@xyzRubik}[1]{\raisebox{3.45pt}{[{\@rubikfont #1}]}} -\newcommand{\@xyzRubikp}[1]{\raisebox{3.45pt}{[{\@rubikfont #1\@rubikprime}]}} -\newcommand{\@xyzhbdfl}[1]{[\raisebox{-0.6pt}{{\@rubikfont #1}}]} -\newcommand{\@xyzbdflRubik}[1]{\raisebox{3.45pt}{[\raisebox{-0.6pt}{{\@rubikfont #1}}]}} +\newcommand{\@xyzhp}[1]{[{\@rubikfont #1\raisebox{-0.6pt}{\@rubikprime}}]} +\newcommand{\@xyzRubik}[1]% + {\raisebox{3.45pt}{[{\@rubikfont #1}]}} +\newcommand{\@xyzRubikp}[1]% + {\raisebox{3.45pt}{[{\@rubikfont #1\raisebox{-0.6pt}{\@rubikprime}}]}} +\newcommand{\@xyzhbdfl}[1]% + {[\raisebox{-0.6pt}{{\@rubikfont #1}}]} +\newcommand{\@xyzhbdflp}[1]% + {[\raisebox{-0.6pt}{{\@rubikfont #1\@rubikprime}}]} +\newcommand{\@xyzbdflRubik}[1]% + {\raisebox{3.45pt}{[\raisebox{-0.6pt}{{\@rubikfont #1}}]}} +\newcommand{\@xyzbdflRubikp}[1]% + {\raisebox{3.45pt}{[\raisebox{-0.6pt}{{\@rubikfont #1\@rubikprime}}]}} \newcommand{\@SquareLetter}[1]{\setlength{\fboxsep}{2.5pt}% - \setlength{\fboxrule}{0.8pt}% - \fbox{\rule[-1pt]{0pt}{8.5pt}\raisebox{-0.5pt}{#1}}} + \setlength{\fboxrule}{0.8pt}% + \fbox{\rule[-1pt]{0pt}{8.5pt}\raisebox{-0.5pt}{#1}}} \newlength\@hRubik% \setlength{\@hRubik}{0.185cm}% \newcommand{\@tlen}{\hspace{1pt}}% @@ -2086,23 +2245,41 @@ \newcommand{\Rubikzp}{\@xyzRubikp{z}} \newcommand{\rrhzp}{\@xyzhp{z}} \newcommand{\rru}{\@rr{u}} -\newcommand{\Rubiku}{\@xyzRubik{u}} +\newcommand{\rrup}{\@rrp{u}} \newcommand{\rrhu}{\@xyzh{u}} +\newcommand{\rrhup}{\@xyzhp{u}} +\newcommand{\Rubiku}{\@xyzRubik{u}} +\newcommand{\Rubikup}{\@xyzRubikp{u}} \newcommand{\rrd}{\@rr{d}} +\newcommand{\rrdp}{\@rrp{d}} \newcommand{\rrhd}{\@xyzhbdfl{d}} +\newcommand{\rrhdp}{\@xyzhbdflp{d}} \newcommand{\Rubikd}{\@xyzbdflRubik{d}} +\newcommand{\Rubikdp}{\@xyzbdflRubikp{d}} \newcommand{\rrl}{\@rr{l}} +\newcommand{\rrlp}{\@rrp{l}} \newcommand{\rrhl}{\@xyzhbdfl{l}} +\newcommand{\rrhlp}{\@xyzhbdflp{l}} \newcommand{\Rubikl}{\@xyzbdflRubik{l}} +\newcommand{\Rubiklp}{\@xyzbdflRubikp{l}} \newcommand{\rrr}{\@rr{r}} -\newcommand{\Rubikr}{\@xyzRubik{r}} +\newcommand{\rrrp}{\@rrp{r}} \newcommand{\rrhr}{\@xyzh{r}} +\newcommand{\rrhrp}{\@xyzhp{r}} +\newcommand{\Rubikr}{\@xyzRubik{r}} +\newcommand{\Rubikrp}{\@xyzRubikp{r}} \newcommand{\rrf}{\@rr{f}} +\newcommand{\rrfp}{\@rrp{f}} \newcommand{\rrhf}{\@xyzhbdfl{f}} +\newcommand{\rrhfp}{\@xyzhbdflp{f}} \newcommand{\Rubikf}{\@xyzbdflRubik{f}} +\newcommand{\Rubikfp}{\@xyzbdflRubikp{f}} \newcommand{\rrb}{\@rr{b}} +\newcommand{\rrbp}{\@rrp{b}} \newcommand{\rrhb}{\@xyzhbdfl{b}} +\newcommand{\rrhbp}{\@xyzhbdflp{b}} \newcommand{\Rubikb}{\@xyzbdflRubik{b}} +\newcommand{\Rubikbp}{\@xyzbdflRubikp{b}} \newcommand{\@xyzhc}[1]{[\raisebox{-1.2pt}% {{\@rubikfont #1\@rubikfontFNS c}}]} \newcommand{\@xyzhcp}[1]{[\raisebox{-1.2pt}% @@ -2594,11 +2771,17 @@ \newcommand{\textRubikz}{\rrhz} \newcommand{\textRubikzp}{\rrhzp} \newcommand{\textRubikl}{\rrhl} +\newcommand{\textRubiklp}{\rrhlp} \newcommand{\textRubikr}{\rrhr} +\newcommand{\textRubikrp}{\rrhrp} \newcommand{\textRubiku}{\rrhu} +\newcommand{\textRubikup}{\rrhup} \newcommand{\textRubikd}{\rrhd} +\newcommand{\textRubikdp}{\rrhdp} \newcommand{\textRubikf}{\rrhf} +\newcommand{\textRubikfp}{\rrhfp} \newcommand{\textRubikb}{\rrhb} +\newcommand{\textRubikbp}{\rrhbp} \newcommand{\textRubikLc}{\rrhLc} \newcommand{\textRubikLcp}{\rrhLcp} \newcommand{\textRubikRc}{\rrhRc} diff --git a/Master/texmf-dist/tex/latex/rubik/rubikpatterns.sty b/Master/texmf-dist/tex/latex/rubik/rubikpatterns.sty index 3415a93d29f..9b53eedb87e 100644 --- a/Master/texmf-dist/tex/latex/rubik/rubikpatterns.sty +++ b/Master/texmf-dist/tex/latex/rubik/rubikpatterns.sty @@ -10,9 +10,9 @@ %% Authors: RWD Nickalls (dick@nickalls.org) %% and Apostolos Syropoulos (asyropoulos@yahoo.com) %% -%% Copyright March 03, 2017 RWD Nickalls and A Syropoulos +%% Copyright February 25, 2018 RWD Nickalls and A Syropoulos %% -%% VERSION 4.0 +%% VERSION 5.0 %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -47,101 +47,136 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\def\RPfileversion{4.0}% -\def\RPfiledate{2017/03/03}% + +\def\RPfileversion{5.0}% +\def\RPfiledate{2018/02/25}% 25 February 2018 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{rubikpatterns}[\RPfiledate\space (v\RPfileversion)] \newcommand{\rubikpatterns}{\textsc{rubikpatterns}} \newcommand{\Superflip}{[Superflip],Dp,R2,Fp,D2,F2,U2,Lp,R,Dp,R2,B,F,Rp,% U2,Lp,F2,Rp,U2,Rp,Up,<(20f*)>}% \newcommand{\superflip}{\Superflip} -\newcommand{\PonsAsinorum}{[PonsAsinorum],F2,B2,R2,L2,U2,D2,<(12q*, 6f*)>}% +\newcommand{\PonsAsinorum}{[PonsAsinorum],F2,B2,R2,L2,U2,D2,% + <(12q*, 6f*)>}% \newcommand{\ponsasinorum}{\PonsAsinorum}% \newcommand{\CheckerboardsThree}% -{[CheckerboardsThree],F,B2,Rp,D2,B,R,U,Dp,R,Lp,Dp,Fp,R2,D,F2,Bp,<(20q*, 16f*), order 3>}% + {[CheckerboardsThree],F,B2,Rp,D2,B,R,U,Dp,R,Lp,Dp,Fp,R2,D,F2,Bp,% + <(20q*, 16f*), order 3>}% \newcommand{\checkerboardsthree}{\CheckerboardsThree}% \newcommand{\CheckerboardsSix}% -{[CheckerboardsSix],R2,L2,U,B,L2,Dp,F,B2,R,Lp,Fp,B,R,D,F2,Lp,Up,<(17f*, 22q), order 6>}% + {[CheckerboardsSix],R2,L2,U,B,L2,Dp,F,B2,R,Lp,Fp,B,R,D,F2,Lp,Up,% + <(17f*, 22q), order 6>}% \newcommand{\checkerboardssix}{\CheckerboardsSix}% -\newcommand{\Stripes}{[Stripes],F,U,F,R,L2,B,Dp,R,D2,L,Dp,B,R2,L,F,U,F,<(20q*, 17f*)>}% +\newcommand{\Stripes}{[Stripes],F,U,F,R,L2,B,Dp,R,D2,L,Dp,B,R2,L,F,U,F,% + <(20q*, 17f*)>}% \newcommand{\stripes}{\Stripes}% -\newcommand{\CubeInCube}{[CubeInCube],F,L,F,Up,R,U,F2,L2,Up,Lp,B,Dp,Bp,L2,U,<(18q*, 15f*)>}% +\newcommand{\CubeInCube}{[CubeInCube],F,L,F,Up,R,U,F2,L2,Up,Lp,B,Dp,Bp,L2,U,% + <(18q*, 15f*)>}% \newcommand{\cubeincube}{\CubeInCube}% \newcommand{\CubeInCubeInCube}% -{[CubeInCubeInCube],Fp,U,Bp,Rp,U,F2,U2,Fp,Up,F,U2,D,Bp,Dp,R2,B2,Up,<(17f*, 22q)>}% + {[CubeInCubeInCube],Fp,U,Bp,Rp,U,F2,U2,Fp,Up,F,U2,D,Bp,Dp,R2,B2,Up,% + <(17f*, 22q)>}% \newcommand{\cubeincubeincube}{\CubeInCubeInCube}% -\newcommand{\ChristmasCross}{[ChristmansCross],U,F,Bp,L2,U2,L2,Fp,B,U2,L2,U,<(16q*, 11f*)>}% -\newcommand{\christmascross}{\ChristmansCross}% +\newcommand{\ChristmasCross}{[ChristmasCross],U,F,Bp,L2,U2,L2,Fp,B,U2,L2,U,% + <(16q*, 11f*)>}% +\newcommand{\christmascross}{\ChristmasCross}% \newcommand{\PlummersCross}% -{[PlummersCross],R2,Lp,D,F2,Rp,Dp,Rp,L,Up,D,R,D,B2,Rp,U,D2,<(20q*, 16f*)>}% + {[PlummersCross],R2,Lp,D,F2,Rp,Dp,Rp,L,Up,D,R,D,B2,Rp,U,D2,% + <(20q*, 16f*)>}% \newcommand{\plummerscross}{\PlummersCross}% -\newcommand{\Anaconda}{[Anaconda],L,U,Bp,Up,R,Lp,B,Rp,F,Bp,D,R,Dp,Fp,<(14q*, 14f*)>}% +\newcommand{\Anaconda}{[Anaconda],L,U,Bp,Up,R,Lp,B,Rp,F,Bp,D,R,Dp,Fp,% + <(14q*, 14f*)>}% \newcommand{\anaconda}{\Anaconda}% -\newcommand{\Python}{[Python],F2,Rp,Bp,U,Rp,L,Fp,L,Fp,B,Dp,R,B,L2,<(16q*, 14f*)>}% +\newcommand{\Python}{[Python],F2,Rp,Bp,U,Rp,L,Fp,L,Fp,B,Dp,R,B,L2,% + <(16q*, 14f*)>}% \newcommand{\python}{\Python}% -\newcommand{\BlackMamba}{[BlackMamba],R,D,L,Fp,R,Lp,D,Rp,U,Dp,B,Up,Rp,Dp,<(14q*, 14f*)>}% +\newcommand{\BlackMamba}{[BlackMamba],R,D,L,Fp,R,Lp,D,Rp,U,Dp,B,Up,Rp,Dp,% + <(14q*, 14f*)>}% \newcommand{\blackmamba}{\BlackMamba}% -\newcommand{\GreenMamba}{[GreenMamba],R,D,R,F,Rp,Fp,B,D,Rp,Up,Bp,U,D2,<(14q*, 13f*)>}% +\newcommand{\GreenMamba}{[GreenMamba],R,D,R,F,Rp,Fp,B,D,Rp,Up,Bp,U,D2,% + <(14q*, 13f*)>}% \newcommand{\greenmamba}{\GreenMamba}% \newcommand{\FemaleRattlesnake}% -{[FemaleRattlesnake],U2,Dp,L2,D,B,U,Bp,Rp,L2,U2,F,Up,F,R,<(18q*, 14f*)>}% + {[FemaleRattlesnake],U2,Dp,L2,D,B,U,Bp,Rp,L2,U2,F,Up,F,R,% + <(18q*, 14f*)>}% \newcommand{\femalerattlesnake}{\FemaleRattlesnake}% \newcommand{\MaleRattlesnake}% -{[MaleRattlesnake],Rp,Fp,U,Fp,U2,R,L2,B,Up,Bp,Dp,L2,U2,D,<(18q*, 14f*)>}% + {[MaleRattlesnake],Rp,Fp,U,Fp,U2,R,L2,B,Up,Bp,Dp,L2,U2,D,% + <(18q*, 14f*)>}% \newcommand{\malerattlesnake}{\MaleRattlesnake}% -\newcommand{\FemaleBoa}{[FemaleBoa],R,Up,R2,U2,F,D2,R2,Up,Dp,R,Dp,Fp,<(16q*, 12f*)>}% +\newcommand{\FemaleBoa}{[FemaleBoa],R,Up,R2,U2,F,D2,R2,Up,Dp,R,Dp,Fp,% + <(16q*, 12f*)>}% \newcommand{\femaleboa}{\FemaleBoa}% -\newcommand{\MaleBoa}{[MaleBoa],F,D,Rp,U,D,R2,D2,Fp,U2,R2,U,Rp,<(16q*, 12f*)>}% +\newcommand{\MaleBoa}{[MaleBoa],F,D,Rp,U,D,R2,D2,Fp,U2,R2,U,Rp,% + <(16q*, 12f*)>}% \newcommand{\maleboa}{\MaleBoa}% -\newcommand{\FourSpot}{[FourSpot],F2,B2,U,Dp,R2,L2,U,Dp,<(12q*, 8f*)>}% +\newcommand{\FourSpot}{[FourSpot],F2,B2,U,Dp,R2,L2,U,Dp,% + <(12q*, 8f*)>}% \newcommand{\fourspot}{\FourSpot}% -\newcommand{\SixSpot}{[SixSpot],U,Dp,R,Lp,F,Bp,U,Dp,<(8q*, 8f*)>}% +\newcommand{\SixSpot}{[SixSpot],U,Dp,R,Lp,F,Bp,U,Dp,% + <(8q*, 8f*)>}% \newcommand{\sixspot}{\SixSpot}% \newcommand{\OrthogonalBars}% -{[OrthogonalBars],F,Rp,U,L,Fp,Lp,F,Up,R,U,Lp,Up,L,Fp,<(14q*, 14f*)>}% + {[OrthogonalBars],F,Rp,U,L,Fp,Lp,F,Up,R,U,Lp,Up,L,Fp,% + <(14q*, 14f*)>}% \newcommand{\orthogonalbars}{\OrthogonalBars}% -\newcommand{\SixTs}{[SixTs],F2,R2,U2,Fp,B,D2,L2,F,B,<(14q*, 9f*)>}% +\newcommand{\SixTs}{[SixTs],F2,R2,U2,Fp,B,D2,L2,F,B,% + <(14q*, 9f*)>}% \newcommand{\sixts}{\SixTs}% -\newcommand{\SixTwoOne}{[SixTwoOne],U,B2,D2,L,Bp,Lp,Up,Lp,B,D2,B2,<(15q*, 11f*)>}% +\newcommand{\SixTwoOne}{[SixTwoOne],U,B2,D2,L,Bp,Lp,Up,Lp,B,D2,B2,% + <(15q*, 11f*)>}% \newcommand{\sixtwoone}{\SixTwoOne}% \newcommand{\ExchangedPeaks}% -{[ExchangedPeaks],F2,R2,D,R2,U,D,F2,Dp,Rp,Dp,F,L2,Fp,D,R,Up,<(16f*, 21q)>}% + {[ExchangedPeaks],F2,R2,D,R2,U,D,F2,Dp,Rp,Dp,F,L2,Fp,D,R,Up,% + <(16f*, 21q)>}% \newcommand{\exchangedpeaks}{\ExchangedPeaks}% \newcommand{\TwoTwistedPeaks}% -{[TwoTwistedPeaks],F,D2,B,R,Bp,Lp,F,Dp,L2,F2,R,Fp,Rp,F2,Lp,Fp,<(16f*, 20q)>}% + {[TwoTwistedPeaks],F,D2,B,R,Bp,Lp,F,Dp,L2,F2,R,Fp,Rp,F2,Lp,Fp,% + <(16f*, 20q)>}% \newcommand{\twotwistedpeaks}{\TwoTwistedPeaks}% \newcommand{\FourTwistedPeaks}% -{[FourTwistedPeaks],Up,D,B,Rp,F,R,Bp,Lp,Fp,B,L,F,Rp,Bp,R,Fp,Up,D,<(18q*, 18f*)>}% + {[FourTwistedPeaks],Up,D,B,Rp,F,R,Bp,Lp,Fp,B,L,F,Rp,Bp,R,Fp,Up,D,% + <(18q*, 18f*)>}% \newcommand{\fourtwistedpeaks}{\FourTwistedPeaks}% \newcommand{\ExchangedChickenFeet}% -{[ExchangedChickenFeet],F,Lp,Dp,Bp,L,F,U,Fp,Dp,F,L2,Bp,Rp,U,L2,Dp,F,<(19q*, 17f*)>}% + {[ExchangedChickenFeet],F,Lp,Dp,Bp,L,F,U,Fp,Dp,F,L2,Bp,Rp,U,L2,Dp,F,% + <(19q*, 17f*)>}% \newcommand{\exchangedchickenfeet}{\ExchangedChickenFeet}% \newcommand{\TwistedChickenFeet}% -{[TwistedChickenFeet],F,Lp,D,Fp,Up,B,U,F,Up,F,Rp,F2,L,Up,Rp,D2,<(18q*, 16f*)>}% + {[TwistedChickenFeet],F,Lp,D,Fp,Up,B,U,F,Up,F,Rp,F2,L,Up,Rp,D2,% + <(18q*, 16f*)>}% \newcommand{\twistedchickenfeet}{\TwistedChickenFeet}% \newcommand{\ExchangedRings}% -{[ExchangedRings],F,U,Dp,Lp,B2,L,Up,D,F,U,R2,L2,Up,L2,F2,<(15f*, 20q)>}% + {[ExchangedRings],F,U,Dp,Lp,B2,L,Up,D,F,U,R2,L2,Up,L2,F2,% + <(15f*, 20q)>}% \newcommand{\exchangedrings}{\ExchangedRings}% \newcommand{\TwistedRings}% -{[TwistedRings],F,D,Fp,D2,Lp,Bp,U,L,D,R,U,Lp,Fp,U,L,U2,<(18q*, 16f*)>}% + {[TwistedRings],F,D,Fp,D2,Lp,Bp,U,L,D,R,U,Lp,Fp,U,L,U2,% + <(18q*, 16f*)>}% \newcommand{\twistedrings}{\TwistedRings}% \newcommand{\EdgeHexagonTwo}% -{[EdgeHexagonTwo],U,B2,Up,Fp,Up,D,Lp,D2,L,U,Dp,F,Dp,L2,B2,Dp,<(20q*, 16f*) order2>}% + {[EdgeHexagonTwo],U,B2,Up,Fp,Up,D,Lp,D2,L,U,Dp,F,Dp,L2,B2,Dp,% + <(20q*, 16f*) order2>}% \newcommand{\edgehexagontwo}{\EdgeHexagonTwo}% \newcommand{\EdgeHexagonThree}% -{[EdgeHexagonThree],F,L,B,U,L,F2,B2,Rp,F2,B2,Up,Bp,Lp,Fp,<(14f*, 18q) order 3>}% + {[EdgeHexagonThree],F,L,B,U,L,F2,B2,Rp,F2,B2,Up,Bp,Lp,Fp,% + <(14f*, 18q) order 3>}% \newcommand{\edgehexagonthree}{\EdgeHexagonThree}% \newcommand{\TomParksPattern}% -{[TomParksPattern],L,U,F2,R,Lp,U2,Bp,U,D,B2,L,F,Bp,Rp,L,Fp,R,<(20q*, 17f*)>}% + {[TomParksPattern],L,U,F2,R,Lp,U2,Bp,U,D,B2,L,F,Bp,Rp,L,Fp,R,% + <(20q*, 17f*)>}% \newcommand{\tomparkspattern}{\TomParksPattern}% \newcommand{\RonsCubeInCube}% -{[RonsCubeInCube],L2,D2,Lp,D2,B2,L2,B2,Lp,D2,L2,B2,Lp,B2,<(13f*, 23q)>}% + {[RonsCubeInCube],L2,D2,Lp,D2,B2,L2,B2,Lp,D2,L2,B2,Lp,B2,% + <(13f*, 23q)>}% \newcommand{\ronscubeincube}{\RonsCubeInCube}% \newcommand{\TwistedDuckFeet}% -{[TwistedDuckFeet],F,Rp,B,R,U,Fp,Lp,Fp,U2,Lp,Up,D2,B,Dp,F,Bp,U2,<(20q*, 17f*)>}% + {[TwistedDuckFeet],F,Rp,B,R,U,Fp,Lp,Fp,U2,Lp,Up,D2,B,Dp,F,Bp,U2,% + <(20q*, 17f*)>}% \newcommand{\twistedduckfeet}{\TwistedDuckFeet}% \newcommand{\ExchangedDuckFeet}% -{[ExchangedDuckFeet],U,F,R2,Fp,Dp,R,U,B2,U2,Fp,R2,F,D,B2,R,Bp,<(21q*, 16f*)>}% + {[ExchangedDuckFeet],U,F,R2,Fp,Dp,R,U,B2,U2,Fp,R2,F,D,B2,R,Bp,% + <(21q*, 16f*)>}% \newcommand{\exchangedduckfeet}{\ExchangedDuckFeet}% \endinput %% diff --git a/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty b/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty index 6c3a06347aa..2b2904ef2db 100644 --- a/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty +++ b/Master/texmf-dist/tex/latex/rubik/rubikrotation.sty @@ -10,9 +10,9 @@ %% Authors: RWD Nickalls (dick@nickalls.org) %% and Apostolos Syropoulos (asyropoulos@yahoo.com) %% -%% Copyright 03 March 2017 RWD Nickalls and A Syropoulos +%% Copyright February 25, 2018 RWD Nickalls and A Syropoulos %% -%% VERSION 4.0 +%% VERSION 5.0 %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -30,8 +30,7 @@ %% %% This package requires the basic TikZ package to be loaded already %% ------------------------------------------------------------------ - -%%% \CheckSum{322} +%%% \CheckSum{332} %%% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -48,8 +47,8 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} -\def\RRfileversion{4.0}% -\def\RRfiledate{2017/03/03}% +\def\RRfileversion{5.0}% +\def\RRfiledate{2018/02/25}% 25 February 2018 \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{rubikrotation}[\RRfiledate\space (v\RRfileversion)] \@ifpackageloaded{rubikcube}{}{% @@ -90,21 +89,21 @@ \typeout{---creating file rubikstateERRORS.dat}% \newwrite\outfile% \immediate\openout\outfile=rubikstateERRORS.dat% -\@print{\@comment rubikstateERRORS.dat}% -\@print{\@comment --------------------}% +\@print{\@comment ShowErrors (rubikstateERRORS.dat)}% +\@print{\@comment ---------------------------------}% \immediate\closeout\outfile% \typeout{---setting up newwrite for rubikrotation.sty to use...}% \newwrite\outfile% \newcommand{\@openstatefile}{\immediate\openout\outfile=rubikstate.dat} \newcommand{\@closestatefile}{\immediate\closeout\outfile} \newcommand{\@printrubikstate}{% + \@print{cubesize,three}% \@print{up,\Ult,\Umt,\Urt,\Ulm,\Umm,\Urm,\Ulb,\Umb,\Urb}% \@print{down,\Dlt,\Dmt,\Drt,\Dlm,\Dmm,\Drm,\Dlb,\Dmb,\Drb}% \@print{left,\Llt,\Lmt,\Lrt,\Llm,\Lmm,\Lrm,\Llb,\Lmb,\Lrb}% \@print{right,\Rlt,\Rmt,\Rrt,\Rlm,\Rmm,\Rrm,\Rlb,\Rmb,\Rrb}% \@print{front,\Flt,\Fmt,\Frt,\Flm,\Fmm,\Frm,\Flb,\Fmb,\Frb}% \@print{back,\Blt,\Bmt,\Brt,\Blm,\Bmm,\Brm,\Blb,\Bmb,\Brb}% - \@print{checkstate}% } \newcommand{\SaveRubikState}[1]{% \typeout{---NEW save command------------------}% @@ -144,10 +143,11 @@ \next } \newcommand{\RubikRotation}[2][1]{% - \typeout{---TeX process (rubikrotation.sty)-------}% - \typeout{---NEW rotation command------------------}% + \typeout{---TeX process---------------------------}% + \typeout{---script = rubikrotation.sty v\RRfileversion\space (\RRfiledate)}% + \typeout{---NEW rotation command}% \typeout{---command = RubikRotation[#1]{#2}}% - \typeout{---writing current Rubik state to file rubikstate.dat}% + \typeout{---writing current cube state to file rubikstate.dat}% \@openstatefile% open data file \@print{\@comment filename: rubikstate.dat}% \@print{\@comment written by rubikrotation.sty% @@ -164,18 +164,19 @@ \input{rubikstateNEW.dat}% \typeout{-----------------------------------------}% } -\newcommand{\ShowRubikErrors}{% - \typeout{---ShowRubikErrors: inputting file rubikstateERRORS.dat}% +\newcommand{\ShowErrors}{% + \typeout{---ShowErrors: inputting file rubikstateERRORS.dat}% \VerbatimInput{rubikstateERRORS.dat}% } -\newcommand{\ShowErrors}{\ShowRubikErrors} -\newcommand{\CheckRubikState}{% +\newcommand{\ShowRubikErrors}{\ShowErrors} +\newcommand{\CheckState}{% \typeout{---NEW check command------------------}% - \typeout{---command = CheckRubikState}% - \typeout{---writing current Rubik state to file rubikstate.dat}% + \typeout{---command = CheckState}% + \typeout{---writing current cube state to file rubikstate.dat}% \@openstatefile% opens data file \@print{\@comment filename: rubikstate.dat}% \@printrubikstate% + \immediate\write\outfile{checkstate}% \@closestatefile% close data file \typeout{---running Perl script (rubikrotation.pl)}% \immediate\write18{\rubikperlcmd}% @@ -183,6 +184,7 @@ \input{rubikstateNEW.dat}% \typeout{-----------------------------------------}% } +\newcommand{\CheckRubikState}{\CheckState} \endinput %% %% End of file `rubikrotation.sty'. diff --git a/Master/texmf-dist/tex/latex/rubik/rubiktwocube.sty b/Master/texmf-dist/tex/latex/rubik/rubiktwocube.sty new file mode 100644 index 00000000000..145175df8dd --- /dev/null +++ b/Master/texmf-dist/tex/latex/rubik/rubiktwocube.sty @@ -0,0 +1,1061 @@ +%% +%% This is file `rubiktwocube.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% rubiktwocube.dtx (with options: `rubiktwocube') +%% +%% ----------------------------------------------------------------- +%% Authors: RWD Nickalls (dick@nickalls.org) +%% and Apostolos Syropoulos (asyropoulos@yahoo.com) +%% +%% Copyright February 25, 2018 RWD Nickalls and A Syropoulos +%% +%% VERSION 5.0 +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any +%% later version: +%% +%% This work consists of the files listed in the README file. +%% ----------------------------------------------------------------- +%% +%% This is a LaTeX/TikZ package for drawing Rubik cubes +%% Please report errors or suggestions for improvement to +%% +%% RWD Nickalls (dick@nickalls.org) +%% Apostolos Syropoulos (asyropoulos@yahoo.com) +%% +%% This package requires the basic TikZ package to be loaded already +%% ------------------------------------------------------------------ +%%% \CheckSum{2308} +%%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} + +\def\RTCfileversion{5.0}% +\def\RTCfiledate{2018/02/25}% February 25, 2018 +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{rubiktwocube}[\RTCfiledate\space (v\RTCfileversion)] +\@ifpackageloaded{tikz}{}{% + \typeout{---rubiktwocube requires the TikZ package.}% + \RequirePackage{tikz}}% +\@ifpackageloaded{rubikcube}{}{% + \typeout{---rubiktwocube requires the rubikcube package.}% + }% +\@ifpackageloaded{rubikrotation}{}{% + \typeout{---rubiktwocube requires the rubikrotation package.}% + }% +\newcommand{\rubiktwocube}{\textsc{rubiktwocube}}% +\newcommand{\@printTWOstate}{% + \@print{cubesize,two}% + \@print{\space \space up,\Ult,\Umt,\Urt,\Ulm,\Umm,\Urm,\Ulb,\Umb,\Urb}% + \@print{down,\Dlt,\Dmt,\Drt,\Dlm,\Dmm,\Drm,\Dlb,\Dmb,\Drb}% + \@print{left,\Llt,\Lmt,\Lrt,\Llm,\Lmm,\Lrm,\Llb,\Lmb,\Lrb}% + \@print{right,\Rlt,\Rmt,\Rrt,\Rlm,\Rmm,\Rrm,\Rlb,\Rmb,\Rrb}% + \@print{front,\Flt,\Fmt,\Frt,\Flm,\Fmm,\Frm,\Flb,\Fmb,\Frb}% + \@print{back,\Blt,\Bmt,\Brt,\Blm,\Bmm,\Brm,\Blb,\Bmb,\Brb}% +} +\newcommand{\SaveTwoState}{\SaveRubikState} +\newcommand{\TwoRotation}[2][1]{% + \typeout{---TeX process}% + \typeout{---script = TwoRotation cmd (rubiktwocube.sty)% + v\RTCfileversion\space (\RTCfiledate)}% + \typeout{---NEW rotation command}% + \typeout{---command = TwoRotation[#1]{#2}}% + \typeout{---writing current TWOcube state to file rubikstate.dat}% + \@openstatefile% open data file + \@print{\@comment filename: rubikstate.dat}% + \@print{\@comment written by TwoRotation cmd (rubiktwocube.sty)% + v\RTCfileversion\space (\RTCfiledate)}% + \@printTWOstate% + %% countingloop code from Feuersaenger (2015) + \newcount\ourRRcounter% + \@countingloop{\ourRRcounter} in 1:{#1}{% + \immediate\write\outfile{rotation,#2}}% + \@closestatefile% close data file + \typeout{---CALLing Perl script (rubikrotation.pl)}% + \immediate\write18{\rubikperlcmd}% + \typeout{---inputting NEW datafile (data written by Perl script)}% + \input{rubikstateNEW.dat}% + \typeout{-----------------------------------------}% + } +\newcommand{\TwoFaceUp}[4]{% + \def\Ult{#1}\def\Urt{#2}\def\Ulb{#3}\def\Urb{#4}} +\newcommand{\TwoFaceFront}[4]{% + \def\Flt{#1}\def\Frt{#2}\def\Flb{#3}\def\Frb{#4}} +\newcommand{\TwoFaceRight}[4]{% + \def\Rlt{#1}\def\Rrt{#2}\def\Rlb{#3}\def\Rrb{#4}} +\newcommand{\TwoFaceDown}[4]{% + \def\Dlt{#1}\def\Drt{#2}\def\Dlb{#3}\def\Drb{#4}} +\newcommand{\TwoFaceLeft}[4]{% + \def\Llt{#1}\def\Lrt{#2}\def\Llb{#3}\def\Lrb{#4}} +\newcommand{\TwoFaceBack}[4]{% + \def\Blt{#1}\def\Brt{#2}\def\Blb{#3}\def\Brb{#4}} +\newcommand{\TwoFaceUpAll}[1]{% + \def\Ult{#1}\def\Urt{#1}\def\Ulb{#1}\def\Urb{#1}} +\newcommand{\TwoFaceFrontAll}[1]{% + \def\Flt{#1}\def\Frt{#1}\def\Flb{#1}\def\Frb{#1}} +\newcommand{\TwoFaceRightAll}[1]{% + \def\Rlt{#1}\def\Rrt{#1}\def\Rlb{#1}\def\Rrb{#1}} +\newcommand{\TwoFaceLeftAll}[1]{% + \def\Llt{#1}\def\Lrt{#1}\def\Llb{#1}\def\Lrb{#1}} +\newcommand{\TwoFaceDownAll}[1]{% + \def\Dlt{#1}\def\Drt{#1}\def\Dlb{#1}\def\Drb{#1}} +\newcommand{\TwoFaceBackAll}[1]{% + \def\Blt{#1}\def\Brt{#1}\def\Blb{#1}\def\Brb{#1}} +%% set the default colour = grey = X +\TwoFaceUpAll{X}% +\TwoFaceDownAll{X}% +\TwoFaceLeftAll{X}% +\TwoFaceRightAll{X}% +\TwoFaceFrontAll{X}% +\TwoFaceBackAll{X}% +\newcommand{\TwoSolvedConfig}[6]{% + \TwoFaceRightAll{#1}% + \TwoFaceLeftAll{#2}% + \TwoFaceUpAll{#3}% + \TwoFaceDownAll{#4}% + \TwoFaceFrontAll{#5}% + \TwoFaceBackAll{#6}% +} +\newcommand{\TwoCubeGrey}{\RubikCubeGreyAll\TwoSolvedConfig{X}{X}{X}{X}{X}{X}}% +\newcommand{\TwoCubeGreyAll}{\TwoCubeGrey} +\newcommand{\TwoCubeGray}{\TwoCubeGrey} +\newcommand{\TwoCubeGrayAll}{\TwoCubeGrey} +\newcommand{\TwoCubeSolvedWY}{\RubikCubeGreyAll\TwoSolvedConfig{G}{B}{W}{Y}{O}{R}}% +\newcommand{\TwoCubeSolved}{\TwoCubeSolvedWY}% +\newcommand{\TwoCubeSolvedWB}{\RubikCubeGreyAll\TwoSolvedConfig{R}{O}{W}{B}{G}{Y}}% +\newcommand{\TwoSliceTopR}[4]{% + \def\Flt{#1}\def\Frt{#2}\def\Rlt{#3}\def\Rrt{#4}} +\newcommand{\TwoSliceTopL}[4]{% + \def\Llt{#1}\def\Lrt{#2}\def\Flt{#3}\def\Frt{#4}} +\newcommand{\TwoSliceBottomR}[4]{% + \def\Flb{#1}\def\Frb{#2}\def\Rlb{#3}\def\Rrb{#4}} +\newcommand{\TwoSliceBottomL}[4]{% + \def\Llb{#1}\def\Lrb{#2}\def\Flb{#3}\def\Frb{#4}} +%%--------------------- +\newcommand{\DrawTwoCubeFrontFace}{% +\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +} +\newcommand{\DrawTwoCubeRU}{% +%%-----------Front face---------- +\DrawTwoCubeFrontFace %% frontface +%%-----------Up face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(0.33,2.33) -- (0.66,2.66) -- (1.66,2.66) -- (1.33,2.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(1.33,2.33) -- (1.66,2.66) -- (2.66,2.66) -- (2.33,2.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(0,2) -- (0.33,2.33) -- (1.33,2.33) -- (1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(1,2) -- (1.33,2.33) -- (2.33,2.33) -- (2,2) -- cycle; +%%-----------Right face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(2,1) -- (2, 2) -- (2.33,2.33) -- (2.33,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(2.33,1.33) -- (2.33, 2.33) -- (2.66,2.66) -- (2.66,1.66) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(2,0) -- (2, 1) -- (2.33,1.33) -- (2.33,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(2.33,0.33) -- (2.33, 1.33) -- (2.66,1.66) -- (2.66,0.66) -- cycle; +} +%% +\newcommand{\DrawTwoCube}{\DrawTwoCubeRU} +%% +\newcommand{\DrawTwoCubeRD}{% +\DrawTwoCubeFrontFace %% frontface +%%----------Right face-------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(2,1) -- (2, 2) -- (2.33,1.66) -- (2.33,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(2.33,0.66) -- (2.33, 1.66) -- (2.66,1.33) -- (2.66,0.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(2,0) -- (2, 1) -- (2.33,0.66) -- (2.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(2.33,-0.33) -- (2.33, 0.66) -- (2.66,0.33) -- (2.66,-0.66) -- cycle; +%%-----------Down face--------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(0.33,-0.33) -- (0, 0) -- (1,0) -- (1.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(1.33,-0.33) -- (1, 0) -- (2,0) -- (2.33,-0.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(0.66,-0.66) -- (0.33, -0.33) -- (1.33,-0.33) -- (1.66,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(1.66,-0.66) -- (1.33, -0.33) -- (2.33,-0.33) -- (2.66,-0.66) -- cycle; +} +%% +\newcommand{\DrawTwoCubeLD}{% +\DrawTwoCubeFrontFace %% frontface +%%------------Left face-------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(-0.66,0.33) -- (-0.66, 1.33) -- (-0.33,1.66) -- (-0.33,0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(-0.33,0.66) -- (-0.33, 1.66) -- (0,2) -- (0,1) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(-0.66,-0.66) -- (-0.66, 0.33) -- (-0.33,0.66) -- (-0.33,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(-0.33,-0.33) -- (-0.33, 0.66) -- (0,1) -- (0,0) -- cycle; +%%------------Down face---------- +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(-0.33,-0.33) -- (0, 0) -- (1,0) -- (0.66,-0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(0.66,-0.33) -- (1, 0) -- (2,0) -- (1.66,-0.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(-0.66,-0.66) -- (-0.33, -0.33) -- (0.66,-0.33) -- (0.33,-0.66) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(0.33,-0.66) -- (0.66, -0.33) -- (1.66,-0.33) -- (1.33,-0.66) -- cycle; +} +%% +\newcommand{\DrawTwoCubeLU}{% +\DrawTwoCubeFrontFace %% frontface +%%-----------Left face----------- +%%------top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(-0.66,1.66) -- (-0.66, 2.66) -- (-0.33,2.33) -- (-0.33,1.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(-0.33,1.33) -- (-0.33, 2.33) -- (0,2) -- (0,1) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(-0.66,0.66) -- (-0.66, 1.66) -- (-0.33,1.33) -- (-0.33,0.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(-0.33,0.33) -- (-0.33, 1.33) -- (0,1) -- (0,0) -- cycle; +%%-----------Up face--------- +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(-0.33,2.33) -- (-0.66, 2.66) -- (0.33,2.66) -- (0.66,2.33) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(0.66,2.33) -- (0.33, 2.66) -- (1.33,2.66) -- (1.66,2.33) -- cycle; +%%---bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(0,2) -- (-0.33, 2.33) -- (0.66,2.33) -- (1,2) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(1,2) -- (0.66, 2.33) -- (1.66,2.33) -- (2,2) -- cycle; +} +%%---------------------- +\newcommand{\DrawTwoFlatUp}[2]{% +\pgfmathsetmacro{\ux}{#1}% +\pgfmathsetmacro{\uy}{#2}% +%%-----top row +\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% +(\ux + 0,\uy + 1) -- (\ux + 0,\uy + 2) -- (\ux + 1,\uy + 2)% + -- (\ux + 1,\uy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% +(\ux + 1,\uy + 1) -- (\ux + 1,\uy + 2) -- (\ux + 2,\uy + 2)% + -- (\ux + 2,\uy + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% +(\ux + 0,\uy + 0) -- (\ux + 0,\uy + 1) -- (\ux + 1,\uy + 1)% + -- (\ux + 1,\uy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% +(\ux + 1,\uy + 0) -- (\ux + 1,\uy + 1) -- (\ux + 2,\uy + 1)% + -- (\ux + 2,\uy + 0) -- cycle; +} +%%------------------------- +\newcommand{\DrawTwoFlatDown}[2]{% +\pgfmathsetmacro{\ddx}{#1}% +\pgfmathsetmacro{\ddy}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% +(\ddx + 0,\ddy + 1) -- (\ddx + 0,\ddy + 2) -- (\ddx + 1,\ddy + 2)% + -- (\ddx + 1,\ddy + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% +(\ddx + 1,\ddy + 1) -- (\ddx + 1,\ddy + 2) -- (\ddx + 2,\ddy + 2)% + -- (\ddx + 2,\ddy + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% +(\ddx + 0,\ddy + 0) -- (\ddx + 0,\ddy + 1) -- (\ddx + 1,\ddy + 1)% + -- (\ddx + 1,\ddy + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% +(\ddx + 1,\ddy + 0) -- (\ddx + 1,\ddy + 1) -- (\ddx + 2,\ddy + 1)% + -- (\ddx + 2,\ddy + 0) -- cycle; +} +%%------------------------- +\newcommand{\DrawTwoFlatLeft}[2]{% +\pgfmathsetmacro{\lx}{#1}% +\pgfmathsetmacro{\ly}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% +(\lx + 0, \ly + 1) -- (\lx + 0, \ly + 2) -- (\lx + 1, \ly + 2)% + -- (\lx + 1, \ly + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% +(\lx + 1, \ly + 1) -- (\lx + 1, \ly + 2) -- (\lx + 2, \ly + 2)% + -- (\lx + 2, \ly + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% +(\lx + 0, \ly + 0) -- (\lx + 0, \ly + 1) -- (\lx + 1, \ly + 1)% + -- (\lx + 1, \ly + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% +(\lx + 1, \ly + 0) -- (\lx + 1, \ly + 1) -- (\lx + 2, \ly + 1)% + -- (\lx + 2, \ly + 0) -- cycle; +} +%%-------------------------- +\newcommand{\DrawTwoFlatRight}[2]{% +\pgfmathsetmacro{\rx}{#1}% +\pgfmathsetmacro{\ry}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% +(\rx + 0, \ry + 1) -- (\rx + 0, \ry + 2) -- (\rx + 1, \ry + 2)% + -- (\rx + 1, \ry + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% +(\rx + 1, \ry + 1) -- (\rx + 1, \ry + 2) -- (\rx + 2, \ry + 2)% + -- (\rx + 2, \ry + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% +(\rx + 0, \ry + 0) -- (\rx + 0, \ry + 1) -- (\rx + 1, \ry + 1)% + -- (\rx + 1, \ry + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% +(\rx + 1, \ry + 0) -- (\rx + 1, \ry + 1) -- (\rx + 2, \ry + 1)% + -- (\rx + 2, \ry + 0) -- cycle; +} +%%-------------- +\newcommand{\DrawTwoFlatFront}{% +%% This command is used /only/ by the \cmd{\DrawRubikFlat} command. +%% NOTE: x, y variables not implemented as not required here +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% +(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% +(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% +(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; +%% +\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% +(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; +} +%%-------------------------- +\newcommand{\DrawTwoFlatBack}[2]{% +\pgfmathsetmacro{\bx}{#1}% +\pgfmathsetmacro{\by}{#2}% +%%---top row +\draw[line join=round,line cap=round,ultra thick,fill=\Blt]% +(\bx + 0,\by + 1) -- (\bx + 0,\by + 2) -- (\bx + 1,\by + 2)% + -- (\bx + 1,\by + 1) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Brt]% +(\bx + 1,\by + 1) -- (\bx + 1,\by + 2) -- (\bx + 2,\by + 2)% + -- (\bx + 2,\by + 1) -- cycle; +%%----bottom row +\draw[line join=round,line cap=round,ultra thick,fill=\Blb]% +(\bx + 0,\by + 0) -- (\bx + 0,\by + 1) -- (\bx + 1,\by + 1)% + -- (\bx + 1,\by + 0) -- cycle; +\draw[line join=round,line cap=round,ultra thick,fill=\Brb]% +(\bx + 1,\by + 0) -- (\bx + 1,\by + 1) -- (\bx + 2,\by + 1)% + -- (\bx + 2,\by + 0) -- cycle; +} +%%------------------------------ +\newcommand{\DrawTwoCubeF}{% + \DrawTwoFlatUp{0}{2}% + \DrawTwoFlatDown{0}{-2}% + \DrawTwoFlatLeft{-2}{0}% + \DrawTwoFlatFront% + \DrawTwoFlatRight{2}{0}% + \DrawTwoFlatBack{4}{0}% +} +%% +\newcommand{\DrawTwoCubeSF}{% + \DrawTwoCubeRU% RU + \DrawTwoFlatDown{0}{-2}% + \DrawTwoFlatLeft{-2}{0}% + \DrawTwoFlatBack{2.666}{0.66}% +} +\newcommand{\TwoSidebarWidth}[1]{\pgfmathsetmacro{\tbw}{#1}} +\newcommand{\TwoSidebarLength}[1]{\pgfmathsetmacro{\tbl}{#1}} +\newcommand{\TwoSidebarSep}[1]{\pgfmathsetmacro{\tbs}{#1}} +\TwoSidebarWidth{0.2} +\TwoSidebarLength{1.0} +\TwoSidebarSep{0.2} + +\newcommand{\TWOside@barL}[2]{% + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{0 - \tbs - \tbw}% + \pgfmathsetmacro{\tdy}{#1-1+0.5-\tblh}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; +}} +%% changed Rubik value (3 + \bs) --> (2 + \tbs) (as only TWO squares) +\newcommand{\TWOside@barR}[2]{% + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{2 + \tbs}% + \pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; +}} +%% changed Rubik value (3 + \bs) --> (2 + \tbs) (as only TWO squares) +\newcommand{\TWOside@barT}[2]{% + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh}% + \pgfmathsetmacro{\tdy}{2 +\tbs}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} +\newcommand{\TWOside@barB}[2]{% + %% #1 = cubie possn no, #2 = colour + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh}% + \pgfmathsetmacro{\tdy}{0 -\tbs-\tbw}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} + +\newcommand{\DrawTwoFaceUpSide}{% + \DrawTwoFlatUp{0}{0}% + \TWOside@barT{1}{\Brt}% + \TWOside@barT{2}{\Blt}% + \TWOside@barL{2}{\Llt}% + \TWOside@barL{1}{\Lrt}% + \TWOside@barR{2}{\Rrt}% + \TWOside@barR{1}{\Rlt}% + \TWOside@barB{1}{\Flt}% + \TWOside@barB{2}{\Frt}% +} +\newcommand{\DrawTwoFaceFrontSide}{% + \DrawTwoFlatFront{0}{0}% + \TWOside@barT{1}{\Ulb}% + \TWOside@barT{2}{\Urb}% + \TWOside@barL{2}{\Lrt}% + \TWOside@barL{1}{\Lrb}% + \TWOside@barR{2}{\Rlt}% + \TWOside@barR{1}{\Rlb}% + \TWOside@barB{1}{\Dlt}% + \TWOside@barB{2}{\Drt}% +} +\newcommand{\DrawTwoFaceRightSide}{% + \DrawTwoFlatRight{0}{0}% + \TWOside@barT{1}{\Urb}% + \TWOside@barT{2}{\Urt}% + \TWOside@barL{2}{\Frt}% + \TWOside@barL{1}{\Frb}% + \TWOside@barR{2}{\Blt}% + \TWOside@barR{1}{\Blb}% + \TWOside@barB{1}{\Drt}% + \TWOside@barB{2}{\Drb}% +} +\newcommand{\DrawTwoFaceLeftSide}{% + \DrawTwoFlatLeft{0}{0}% + \TWOside@barT{1}{\Ult}% + \TWOside@barT{2}{\Ulb}% + \TWOside@barL{2}{\Brt}% + \TWOside@barL{1}{\Brb}% + \TWOside@barR{2}{\Flt}% + \TWOside@barR{1}{\Flb}% + \TWOside@barB{1}{\Dlb}% + \TWOside@barB{2}{\Dlt}% +} +\newcommand{\DrawTwoFaceBackSide}{% + \DrawTwoFlatBack{0}{0}% + \TWOside@barT{1}{\Urt}% + \TWOside@barT{2}{\Ult}% + \TWOside@barL{2}{\Rrt}% + \TWOside@barL{1}{\Rrb}% + \TWOside@barR{2}{\Llt}% + \TWOside@barR{1}{\Llb}% + \TWOside@barB{1}{\Drb}% + \TWOside@barB{2}{\Dlb}% +} +\newcommand{\DrawTwoFaceDownSide}{% + \DrawTwoFlatDown{0}{0}% + \TWOside@barT{1}{\Flb}% + \TWOside@barT{2}{\Frb}% + \TWOside@barL{2}{\Lrb}% + \TWOside@barL{1}{\Llb}% + \TWOside@barR{2}{\Rlb}% + \TWOside@barR{1}{\Rrb}% + \TWOside@barB{1}{\Brb}% + \TWOside@barB{2}{\Blb}% +} +%% +%% v5: made Face versions (for USER) without the (x,y) coordinates +\newcommand{\DrawTwoFaceUp}{\DrawTwoFlatUp{0}{0}} +\newcommand{\DrawTwoFaceDown}{\DrawTwoFlatDown{0}{0}} +\newcommand{\DrawTwoFaceLeft}{\DrawTwoFlatLeft{0}{0}} +\newcommand{\DrawTwoFaceRight}{\DrawTwoFlatRight{0}{0}} +\newcommand{\DrawTwoFaceFront}{\DrawTwoFlatFront{0}{0}} +\newcommand{\DrawTwoFaceBack}{\DrawTwoFlatBack{0}{0}} +%% +%% v5: made short forms --> abbreviations +\newcommand{\DrawTwoFaceU}{\DrawTwoFlatUp{0}{0}} +\newcommand{\DrawTwoFaceD}{\DrawTwoFlatDown{0}{0}} +\newcommand{\DrawTwoFaceL}{\DrawTwoFlatLeft{0}{0}} +\newcommand{\DrawTwoFaceR}{\DrawTwoFlatRight{0}{0}} +\newcommand{\DrawTwoFaceF}{\DrawTwoFlatFront{0}{0}} +\newcommand{\DrawTwoFaceB}{\DrawTwoFlatBack{0}{0}} +%% +%% v5: made short forms --> abbreviations +\newcommand{\DrawTwoFaceUS}{\DrawTwoFaceUpSide} +\newcommand{\DrawTwoFaceDS}{\DrawTwoFaceDownSide} +\newcommand{\DrawTwoFaceLS}{\DrawTwoFaceLeftSide} +\newcommand{\DrawTwoFaceRS}{\DrawTwoFaceRightSide} +\newcommand{\DrawTwoFaceFS}{\DrawTwoFaceFrontSide} +\newcommand{\DrawTwoFaceBS}{\DrawTwoFaceBackSide} +\newcommand{\TWOside@barRbackRU}[2]{% + %% #1 = cubie possn no, #2 = colour + %% tdx --> tdx + (2/3) + %% tdy --> tdy + (2/3) + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{2 + \tbs +0.666}% + \pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh +0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle;% +}} +\newcommand{\DrawTwoCubeSidebarRBRU}{% + \TWOside@barRbackRU{2}{\Blt}% + \TWOside@barRbackRU{1}{\Blb}% +} +\newcommand{\DrawTwoCubeSidebarBRRU}{\DrawTwoCubeSidebarRBRU} +\newcommand{\DrawTwoCubeSidebarRB}[1]{\@join{\DrawTwoCubeSidebarRB}{#1}} +\newcommand{\DrawTwoCubeSidebarBR}[1]{\@join{\DrawTwoCubeSidebarBR}{#1}} +\newcommand{\TWOside@barTbackRU}[2]{% + %% #1 = cubie possn no; #2 = colour + %% tdx --> tdx + (2/3) + %% tdy --> tdy + (2/3) + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh +0.666}% + \pgfmathsetmacro{\tdy}{2 +\tbs +0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarUBRU}{% + \TWOside@barTbackRU{1}{\Brt}% + \TWOside@barTbackRU{2}{\Blt}% +} +\newcommand{\DrawTwoCubeSidebarBURU}{\DrawTwoCubeSidebarUBRU} +\newcommand{\DrawTwoCubeSidebarUB}[1]{\@join{\DrawTwoCubeSidebarUB}{#1}} +\newcommand{\DrawTwoCubeSidebarBU}[1]{\@join{\DrawTwoCubeSidebarBU}{#1}} +\newcommand{\DrawTwoCubeSidebarFLRU}{% + \TWOside@barL{2}{\Lrt}% + \TWOside@barL{1}{\Lrb}% +} +\newcommand{\DrawTwoCubeSidebarLFRU}{\DrawTwoCubeSidebarFLRU} +\newcommand{\DrawTwoCubeSidebarFL}[1]{\@join{\DrawTwoCubeSidebarFL}{#1}} +\newcommand{\DrawTwoCubeSidebarLF}[1]{\@join{\DrawTwoCubeSidebarLF}{#1}} +\newcommand{\DrawTwoCubeSidebarFDRU}{% + \TWOside@barB{1}{\Dlt}% + \TWOside@barB{2}{\Drt}% +} +\newcommand{\DrawTwoCubeSidebarDFRU}{\DrawTwoCubeSidebarFDRU} +\newcommand{\DrawTwoCubeSidebarFD}[1]{\@join{\DrawTwoCubeSidebarFD}{#1}} +\newcommand{\DrawTwoCubeSidebarDF}[1]{\@join{\DrawTwoCubeSidebarDF}{#1}} +\newcommand{\DrawTwoCubeSidebarDFLU}{\DrawTwoCubeSidebarDFRU} +\newcommand{\DrawTwoCubeSidebarFDLU}{\DrawTwoCubeSidebarFDRU} +\newcommand{\TWOside@barLbackLU}[2]{% + %% #1 = cubie possn no, #2 = colour + %% tdx --> tdx - 2/3 + %% tdy --> tdy + 2/3 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{0 - \tbs -\tbw -0.666}% + \pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh +0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarLBLU}{% + \TWOside@barLbackLU{2}{\Brt}% + \TWOside@barLbackLU{1}{\Brb}% +} +\newcommand{\DrawTwoCubeSidebarBLLU}{\DrawTwoCubeSidebarLBLU} +\newcommand{\DrawTwoCubeSidebarLB}[1]{\@join{\DrawTwoCubeSidebarLB}{#1}} +\newcommand{\DrawTwoCubeSidebarBL}[1]{\@join{\DrawTwoCubeSidebarBL}{#1}} +\newcommand{\TWOside@barTbackLU}[2]{% + %% #1 = cubie possn no; #2 = colour + %% tdx --> tdx-2/3 + %% tdy --> tdy+2/3 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh -0.666}% + \pgfmathsetmacro{\tdy}{2 +\tbs +0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarUBLU}{% + \TWOside@barTbackLU{1}{\Brt}% + \TWOside@barTbackLU{2}{\Blt}% +} +\newcommand{\DrawTwoCubeSidebarBULU}{\DrawTwoCubeSidebarUBLU} +\newcommand{\DrawTwoCubeSidebarFRLU}{% + \TWOside@barR{2}{\Rlt}% + \TWOside@barR{1}{\Rlb}% +} +\newcommand{\DrawTwoCubeSidebarRFLU}{\DrawTwoCubeSidebarFRLU} +\newcommand{\DrawTwoCubeSidebarFR}[1]{\@join{\DrawTwoCubeSidebarFR}{#1}} +\newcommand{\DrawTwoCubeSidebarRF}[1]{\@join{\DrawTwoCubeSidebarRF}{#1}} +\newcommand{\DrawTwoCubeSidebarFURD}{% + \TWOside@barT{1}{\Ulb}% + \TWOside@barT{2}{\Urb}% +} +\newcommand{\DrawTwoCubeSidebarUFRD}{\DrawTwoCubeSidebarFURD} +\newcommand{\DrawTwoCubeSidebarFU}[1]{\@join{\DrawTwoCubeSidebarFU}{#1}} +\newcommand{\DrawTwoCubeSidebarUF}[1]{\@join{\DrawTwoCubeSidebarUF}{#1}} +\newcommand{\DrawTwoCubeSidebarFLRD}{\DrawTwoCubeSidebarFLRU} +\newcommand{\DrawTwoCubeSidebarLFRD}{\DrawTwoCubeSidebarLFRU} +\newcommand{\TWOside@barRbackRD}[2]{% + %% #1 = cubie possn no, #2 = colour + %% tdx --> tdx + (2/3) + %% tdy --> tdy - (2/3) + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{2 + \tbs +0.666}% + \pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh -0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarRBRD}{% +\TWOside@barRbackRD{2}{\Blt}% +\TWOside@barRbackRD{1}{\Blb}% +} +\newcommand{\DrawTwoCubeSidebarBRRD}{\DrawTwoCubeSidebarRBRD} +\newcommand{\TWOside@barBbackRD}[2]{% + %% #1 = cubie possn no; #2 = colour + %% tdx --> tdx+2/3 + %% tdy --> tdy-2/3 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh +0.666}% + \pgfmathsetmacro{\tdy}{0 -\tbs - \tbw -0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarDBRD}{% + \TWOside@barBbackRD{1}{\Brb}% + \TWOside@barBbackRD{2}{\Blb}% +} +\newcommand{\DrawTwoCubeSidebarBDRD}{\DrawTwoCubeSidebarDBRD} +%% Now make the join commands +\newcommand{\DrawTwoCubeSidebarDB}[1]{\@join{\DrawTwoCubeSidebarDB}{#1}} +\newcommand{\DrawTwoCubeSidebarBD}[1]{\@join{\DrawTwoCubeSidebarBD}{#1}} +\newcommand{\DrawTwoCubeSidebarFULD}{\DrawTwoCubeSidebarFURD} +\newcommand{\DrawTwoCubeSidebarUFLD}{\DrawTwoCubeSidebarUFRD} +\newcommand{\DrawTwoCubeSidebarFRLD}{\DrawTwoCubeSidebarFRLU} +\newcommand{\DrawTwoCubeSidebarRFLD}{\DrawTwoCubeSidebarRFLU} +\newcommand{\TWOside@barLbackLD}[2]{% + %% #1 = cubie possn no, #2 = colour + %% tdx --> tdx-2/3 + %% tdy --> tdy-2/3 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{0 - \tbs -\tbw -0.666}% + \pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh -0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) + -- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarLBLD}{% + \TWOside@barLbackLD{2}{\Brt}% + \TWOside@barLbackLD{1}{\Brb}% +} +\newcommand{\DrawTwoCubeSidebarBLLD}{\DrawTwoCubeSidebarLBLD} +\newcommand{\TWOside@barBbackLD}[2]{% + %% #1 = cubie possn no; #2 = colour + %% tdx --> tdx-2/3 + %% tdy --> tdy-2/3 + \ifthenelse{\equal{#2}{\no@sidebar}}{}{% + \pgfmathsetmacro{\tblh}{\tbl*(0.5)}% + \pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh -0.666}% + \pgfmathsetmacro{\tdy}{0 -\tbs - \tbw -0.666}% + \draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) + -- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; +}} +\newcommand{\DrawTwoCubeSidebarDBLD}{% +\TWOside@barBbackLD{1}{\Brb}% +\TWOside@barBbackLD{2}{\Blb}% +} +\newcommand{\DrawTwoCubeSidebarBDLD}{\DrawTwoCubeSidebarDBLD} +\pgfmathsetmacro{\@tx}{0.0833} +\pgfmathsetmacro{\@ty}{0.0833} +\newcommand{\@tr}[1]{{\@rubikfont #1}} +\newcommand{\@trp}[1]{{\@rubikfont #1\@rubikprime}} +\newcommand*{\tr}[1]{\@join{\tr}{#1}} +\newcommand*{\trh}[1]{\@join{\trh}{#1}} +\newcommand*{\Two}[1]{\@join{\Two}{#1}} +\newcommand*{\textTwo}[1]{\@join{\textTwo}{#1}} +\newcommand{\trB}{\rrB} +\newcommand{\trBp}{\rrBp} +\newcommand{\trhB}{\rrhB} +\newcommand{\trhBp}{\rrhBp} +\newcommand{\TwoB}{\RubikB} +\newcommand{\TwoBp}{\RubikBp} +\newcommand{\textTwoB}{\textRubikB} +\newcommand{\textTwoBp}{\textRubikBp} +%% +\newcommand{\trD}{\@tr{D}} +%% +\newcommand{\SquaretD}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); +\draw [thick, ->] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); +\end{tikzpicture}% +} +\newcommand{\trhD}{\raisebox{-0.333\height}{\@tlen\SquaretD\@tlen}} +%% +\newcommand{\TwoD}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretD\\ +\trD% +\end{minipage}% +}} +\newcommand{\textTwoD}{\trD\,\trhD} +\newcommand{\trDp}{\@trp{D}} +%% +\newcommand{\SquaretDp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); +\draw [thick, <-] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); +\end{tikzpicture}% +} +\newcommand{\trhDp}{\raisebox{-0.333\height}{\@tlen\SquaretDp\@tlen}} +%% +\newcommand{\TwoDp}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretDp\\ +\trDp% +\end{minipage}% +}} +\newcommand{\textTwoDp}{\trDp\,\trhDp} +\newcommand{\trF}{\rrF} +\newcommand{\trFp}{\rrFp} +\newcommand{\trhF}{\rrhF} +\newcommand{\trhFp}{\rrhFp} +\newcommand{\TwoF}{\RubikF} +\newcommand{\TwoFp}{\RubikFp} +\newcommand{\textTwoF}{\textRubikF} +\newcommand{\textTwoFp}{\textRubikFp} +\newcommand{\trL}{\@tr{L}} +%% +\newcommand{\SquaretL}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); +\draw [thick] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); +\end{tikzpicture}% +} +\newcommand{\trhL}{\raisebox{-0.333\height}{\@tlen\SquaretL\@tlen}} +%% +\newcommand{\TwoL}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretL\\ +\trL% +\end{minipage}% +}} +\newcommand{\textTwoL}{\trL\,\trhL} +\newcommand{\trLp}{\@trp{L}} +%% +\newcommand{\SquaretLp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick,->] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); +\draw [thick] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); +\end{tikzpicture}% +} +\newcommand{\trhLp}{\raisebox{-0.333\height}{\@tlen\SquaretLp\@tlen}} +%% +\newcommand{\TwoLp}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretLp\\ +\trLp% +\end{minipage}% +}} +\newcommand{\textTwoLp}{\trLp\,\trhLp} +\newcommand{\trR}{\@tr{R}} +%% +\newcommand{\SquaretR}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +%% draw three lines in the square, one with an arrow +\draw [thick] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); +\draw [thick, ->] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); +\end{tikzpicture}% +} +\newcommand{\trhR}{\raisebox{-0.333\height}{\@tlen\SquaretR\@tlen}} +%% +\newcommand{\TwoR}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretR\\ +\trR% +\end{minipage}% +}} +\newcommand{\textTwoR}{\trR\,\trhR} +\newcommand{\trRp}{\@trp{R}} +%% +\newcommand{\SquaretRp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); +\draw [thick, <-] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); +\end{tikzpicture}% +} +\newcommand{\trhRp}{\raisebox{-0.333\height}{\@tlen\SquaretRp\@tlen}} +%% +\newcommand{\TwoRp}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretRp\\ +\trRp% +\end{minipage}% +}} +\newcommand{\textTwoRp}{\trRp\,\trhRp} +\newcommand{\trU}{\@tr{U}} +%% +\newcommand{\SquaretU}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, <-] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); +\draw [thick] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); +\end{tikzpicture}% +} +\newcommand{\trhU}{\raisebox{-0.333\height}{\@tlen\SquaretU\@tlen}} +%% +\newcommand{\TwoU}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretU\\ +\trU% +\end{minipage}%% +}} +\newcommand{\textTwoU}{\trU\,\trhU} +\newcommand{\trUp}{\@trp{U}} +%% +\newcommand{\SquaretUp}{% +\begin{tikzpicture}[scale=0.5] +\DrawNotationBox; +\draw [thick, ->] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); +\draw [thick] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); +\end{tikzpicture}% +} +\newcommand{\trhUp}{\raisebox{-0.333\height}{\@tlen\SquaretUp\@tlen}} +%% +\newcommand{\TwoUp}{% +{\@rubikfont% +\begin{minipage}{0.6cm} +\centering% +\SquaretUp\\ +\trUp% +\end{minipage}%% +}} +\newcommand{\textTwoUp}{\trUp\,\trhUp} +\newcommand{\trx}{\rrx} +\newcommand{\trxp}{\rrxp} +\newcommand{\try}{\rry} +\newcommand{\tryp}{\rryp} +\newcommand{\trz}{\rrz} +\newcommand{\trzp}{\rrzp} +\newcommand{\trl}{\rrl} + \newcommand{\trlp}{\rrlp} %%new +\newcommand{\trr}{\rrr} + \newcommand{\trrp}{\rrrp} %%new +\newcommand{\tru}{\rru} + \newcommand{\trup}{\rrup} %%new +\newcommand{\trd}{\rrd} + \newcommand{\trdp}{\rrdp} %%new +\newcommand{\trf}{\rrf} + \newcommand{\trfp}{\rrfp} %%new +\newcommand{\trb}{\rrb} + \newcommand{\trbp}{\rrbp} %%new +\newcommand{\trLc}{\rrLc} +\newcommand{\trLcp}{\rrLcp} +\newcommand{\trRc}{\rrRc} +\newcommand{\trRcp}{\rrRcp} +\newcommand{\trUc}{\rrUc} +\newcommand{\trUcp}{\rrUcp} +\newcommand{\trDc}{\rrDc} +\newcommand{\trDcp}{\rrDcp} +\newcommand{\trFc}{\rrFc} +\newcommand{\trFcp}{\rrFcp} +\newcommand{\trBc}{\rrBc} +\newcommand{\trBcp}{\rrBcp} +\newcommand{\trCL}{\rrCL} +\newcommand{\trCLp}{\rrCLp} +\newcommand{\trCR}{\rrCR} +\newcommand{\trCRp}{\rrCRp} +\newcommand{\trCU}{\rrCU} +\newcommand{\trCUp}{\rrCUp} +\newcommand{\trCD}{\rrCD} +\newcommand{\trCDp}{\rrCDp} +\newcommand{\trCF}{\rrCF} +\newcommand{\trCFp}{\rrCFp} +\newcommand{\trCB}{\rrCB} +\newcommand{\trCBp}{\rrCBp} +\newcommand{\trhx}{\rrhx} +\newcommand{\trhxp}{\rrhxp} +\newcommand{\trhy}{\rrhy} +\newcommand{\trhyp}{\rrhyp} +\newcommand{\trhz}{\rrhz} +\newcommand{\trhzp}{\rrhzp} +\newcommand{\trhl}{\rrhl} + \newcommand{\trhlp}{\rrhlp} % new +\newcommand{\trhr}{\rrhr} + \newcommand{\trhrp}{\rrhrp} % new +\newcommand{\trhu}{\rrhu} + \newcommand{\trhup}{\rrhup} % new +\newcommand{\trhd}{\rrhd} + \newcommand{\trhdp}{\rrhdp} % new +\newcommand{\trhf}{\rrhf} + \newcommand{\trhfp}{\rrhfp} % new +\newcommand{\trhb}{\rrhb} + \newcommand{\trhbp}{\rrhbp} % new +\newcommand{\trhLc}{\rrhLc} +\newcommand{\trhLcp}{\rrhLcp} +\newcommand{\trhRc}{\rrhRc} +\newcommand{\trhRcp}{\rrhRcp} +\newcommand{\trhUc}{\rrhUc} +\newcommand{\trhUcp}{\rrhUcp} +\newcommand{\trhDc}{\rrhDc} +\newcommand{\trhDcp}{\rrhDcp} +\newcommand{\trhFc}{\rrhFc} +\newcommand{\trhFcp}{\rrhFcp} +\newcommand{\trhBc}{\rrhBc} +\newcommand{\trhBcp}{\rrhBcp} +\newcommand{\trhCL}{\rrhCL} +\newcommand{\trhCLp}{\rrhCLp} +\newcommand{\trhCR}{\rrhCR} +\newcommand{\trhCRp}{\rrhCRp} +\newcommand{\trhCU}{\rrhCU} +\newcommand{\trhCUp}{\rrhCUp} +\newcommand{\trhCD}{\rrhCD} +\newcommand{\trhCDp}{\rrhCDp} +\newcommand{\trhCF}{\rrhCF} +\newcommand{\trhCFp}{\rrhCFp} +\newcommand{\trhCB}{\rrhCB} +\newcommand{\trhCBp}{\rrhCBp} +\newcommand{\Twox}{\Rubikx} +\newcommand{\Twoxp}{\Rubikxp} +\newcommand{\Twoy}{\Rubiky} +\newcommand{\Twoyp}{\Rubikyp} +\newcommand{\Twoz}{\Rubikz} +\newcommand{\Twozp}{\Rubikzp} +\newcommand{\Twol}{\Rubikl} + \newcommand{\Twolp}{\Rubiklp} % new +\newcommand{\Twor}{\Rubikr} + \newcommand{\Tworp}{\Rubikrp} % new +\newcommand{\Twou}{\Rubiku} + \newcommand{\Twoup}{\Rubikup} % new +\newcommand{\Twod}{\Rubikd} + \newcommand{\Twodp}{\Rubikdp} % new +\newcommand{\Twof}{\Rubikf} + \newcommand{\Twofp}{\Rubikfp} % new +\newcommand{\Twob}{\Rubikb} + \newcommand{\Twobp}{\Rubikbp} % new +\newcommand{\TwoLc}{\RubikLc} +\newcommand{\TwoLcp}{\RubikLcp} +\newcommand{\TwoRc}{\RubikRc} +\newcommand{\TwoRcp}{\RubikRcp} +\newcommand{\TwoUc}{\RubikUc} +\newcommand{\TwoUcp}{\RubikUcp} +\newcommand{\TwoDc}{\RubikDc} +\newcommand{\TwoDcp}{\RubikDcp} +\newcommand{\TwoFc}{\RubikFc} +\newcommand{\TwoFcp}{\RubikFcp} +\newcommand{\TwoBc}{\RubikBc} +\newcommand{\TwoBcp}{\RubikBcp} +\newcommand{\TwoCL}{\RubikCL} +\newcommand{\TwoCLp}{\RubikCLp} +\newcommand{\TwoCR}{\RubikCR} +\newcommand{\TwoCRp}{\RubikCRp} +\newcommand{\TwoCU}{\RubikCU} +\newcommand{\TwoCUp}{\RubikCUp} +\newcommand{\TwoCD}{\RubikCD} +\newcommand{\TwoCDp}{\RubikCDp} +\newcommand{\TwoCF}{\RubikCF} +\newcommand{\TwoCFp}{\RubikCFp} +\newcommand{\TwoCB}{\RubikCB} +\newcommand{\TwoCBp}{\RubikCBp} +\newcommand{\textTwox}{\rrhx} +\newcommand{\textTwoxp}{\rrhxp} +\newcommand{\textTwoy}{\rrhy} +\newcommand{\textTwoyp}{\rrhyp} +\newcommand{\textTwoz}{\rrhz} +\newcommand{\textTwozp}{\rrhzp} +\newcommand{\textTwol}{\rrhl} + \newcommand{\textTwolp}{\rrhlp} %new +\newcommand{\textTwor}{\rrhr} + \newcommand{\textTworp}{\rrhrp} %new +\newcommand{\textTwou}{\rrhu} + \newcommand{\textTwoup}{\rrhup} %new +\newcommand{\textTwod}{\rrhd} + \newcommand{\textTwodp}{\rrhdp} %new +\newcommand{\textTwof}{\rrhf} + \newcommand{\textTwofp}{\rrhfp} %new +\newcommand{\textTwob}{\rrhb} + \newcommand{\textTwobp}{\rrhbp} %new +\newcommand{\textTwoLc}{\rrhLc} +\newcommand{\textTwoLcp}{\rrhLcp} +\newcommand{\textTwoRc}{\rrhRc} +\newcommand{\textTwoRcp}{\rrhRcp} +\newcommand{\textTwoUc}{\rrhUc} +\newcommand{\textTwoUcp}{\rrhUcp} +\newcommand{\textTwoDc}{\rrhDc} +\newcommand{\textTwoDcp}{\rrhDcp} +\newcommand{\textTwoFc}{\rrhFc} +\newcommand{\textTwoFcp}{\rrhFcp} +\newcommand{\textTwoBc}{\rrhBc} +\newcommand{\textTwoBcp}{\rrhBcp} +\newcommand{\textTwoCL}{\rrhCL} +\newcommand{\textTwoCLp}{\rrhCLp} +\newcommand{\textTwoCR}{\rrhCR} +\newcommand{\textTwoCRp}{\rrhCRp} +\newcommand{\textTwoCU}{\rrhCU} +\newcommand{\textTwoCUp}{\rrhCUp} +\newcommand{\textTwoCD}{\rrhCD} +\newcommand{\textTwoCDp}{\rrhCDp} +\newcommand{\textTwoCF}{\rrhCF} +\newcommand{\textTwoCFp}{\rrhCFp} +\newcommand{\textTwoCB}{\rrhCB} +\newcommand{\textTwoCBp}{\rrhCBp} +\endinput +%% +%% End of file `rubiktwocube.sty'. -- cgit v1.2.3