| 1 |
% \iffalse meta-comment |
| 2 |
% rubikcube.dtx |
| 3 |
% |
| 4 |
% version v5.0 (February 25, 2018) |
| 5 |
% |
| 6 |
% Copyright 2018 |
| 7 |
% RWD Nickalls ([email protected]) and |
| 8 |
% A Syropoulos ([email protected]) |
| 9 |
% |
| 10 |
% This work may be distributed and/or modified under the |
| 11 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 12 |
% of this license or (at your option) any later version. |
| 13 |
% The latest version of this license is in |
| 14 |
% http://www.latex-project.org/lppl.txt |
| 15 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 16 |
% version 2005/12/01 or later. |
| 17 |
% |
| 18 |
% |
| 19 |
% This work consists of the files rubikcube.dtx and rubikcube.ins |
| 20 |
% and the derived file rubikcube.sty. |
| 21 |
% |
| 22 |
%<*readme> |
| 23 |
% |
| 24 |
% The rubikcube package provides a collection of LaTeX commands and macros |
| 25 |
% for the typesetting of Rubik cube configurations and rotation |
| 26 |
% sequences using the TikZ graphic language. |
| 27 |
% |
| 28 |
% Please report errors or suggestions for improvement to |
| 29 |
% |
| 30 |
% Dick Nickalls or Apostolos Syropoulos |
| 31 |
% |
| 32 |
% This package requires the basic TikZ package to be loaded already |
| 33 |
%</readme> |
| 34 |
% |
| 35 |
%<*driver> |
| 36 |
\listfiles |
| 37 |
\documentclass{ltxdoc} |
| 38 |
\IfFileExists{rubikcube.sty}{\usepackage{rubikcube}}{% |
| 39 |
\GenericWarning{rubikcube.dtx}{Package file rubikcube.sty not found. |
| 40 |
Documentation will be messed up!^^J |
| 41 |
(Generate rubikcube.sty by (La)TeXing rubikcube.ins, and then^^J |
| 42 |
process rubikcube.dtx again)^^J}\stop |
| 43 |
}% |
| 44 |
\pagestyle{myheadings} |
| 45 |
\markright{\texttt{rubikcube} \ \ (Rubik bundle v5.0, 2018) \ \ \texttt{www.ctan.org/pkg/rubik}} |
| 46 |
\usepackage{ifpdf} |
| 47 |
\usepackage{url,path} %% for references |
| 48 |
\usepackage{supertabular} %% for Notation table |
| 49 |
\usepackage{hypdoc} %% for hyperref documenting of LaTeX packages |
| 50 |
%%\OnlyDescription |
| 51 |
\EnableCrossrefs |
| 52 |
\PageIndex |
| 53 |
\CodelineIndex |
| 54 |
\CodelineNumbered |
| 55 |
\RecordChanges |
| 56 |
\setcounter{StandardModuleDepth}{1} |
| 57 |
\begin{document} |
| 58 |
\DocInput{rubikcube.dtx} |
| 59 |
\PrintChanges |
| 60 |
\PrintIndex |
| 61 |
\end{document} |
| 62 |
%</driver> |
| 63 |
% \fi |
| 64 |
% |
| 65 |
% |
| 66 |
% |
| 67 |
%%% \CheckSum{6231} |
| 68 |
% |
| 69 |
%%% \CharacterTable |
| 70 |
%% {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 |
| 71 |
%% 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 |
| 72 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 73 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 74 |
%% Dollar \$ Percent \% Ampersand \& |
| 75 |
%% Acute accent \' Left paren \( Right paren \) |
| 76 |
%% Asterisk \* Plus \+ Comma \, |
| 77 |
%% Minus \- Point \. Solidus \/ |
| 78 |
%% Colon \: Semicolon \; Less than \< |
| 79 |
%% Equals \= Greater than \> Question mark \? |
| 80 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 81 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 82 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 83 |
%% Right brace \} Tilde \~} |
| 84 |
% |
| 85 |
% |
| 86 |
% \title{% |
| 87 |
% \ifpdf\pdfbookmark[1]{Title}{Title}\else\fi% |
| 88 |
% The \textsc{rubikcube} package} |
| 89 |
% |
| 90 |
% \author{ |
| 91 |
% RWD Nickalls ([email protected]) \\ |
| 92 |
% A Syropoulos ([email protected]) |
| 93 |
% } |
| 94 |
% \date{This file describes version \RCfileversion\ (\RCfiledate)\\ |
| 95 |
% \texttt{www.ctan.org/pkg/rubik}} |
| 96 |
% \maketitle |
| 97 |
% |
| 98 |
% \begin{abstract} |
| 99 |
% The \rubikcube\ package provides LaTeX commands and macros |
| 100 |
% for typesetting Rubik cube (3x3x3) notation, configurations, and |
| 101 |
% rotation sequences using the TikZ graphic language. It is part of the |
| 102 |
% Rubik `bundle'. |
| 103 |
% \end{abstract} |
| 104 |
% |
| 105 |
% \medskip |
| 106 |
% |
| 107 |
% \begin{minipage}{11cm} |
| 108 |
% \centering |
| 109 |
% \ifpdf |
| 110 |
% \includegraphics[width=10cm]{rubik-doc-figF.pdf} |
| 111 |
% \else |
| 112 |
% \fi |
| 113 |
% \end{minipage} |
| 114 |
% |
| 115 |
% \tableofcontents |
| 116 |
% |
| 117 |
% \pagebreak |
| 118 |
% |
| 119 |
% \section{Introduction} |
| 120 |
% |
| 121 |
% The \rubikcube\ package (part of the \textsc{rubik} `bundle') provides a |
| 122 |
% collection of \LaTeX\ commands |
| 123 |
% and macros for typesetting Rubik cube (3x3x3) configurations using the |
| 124 |
% PGF/TikZ graphic languages. |
| 125 |
% We have extended the rotation hieroglyph notation, originally |
| 126 |
% developed by Garfath-Cox (1981), and improved by Duvoid (2010, 2011). |
| 127 |
% |
| 128 |
% The \rubikcube\ package is the `base' package of the bundle, and is required by all of |
| 129 |
% the Rubik packages; it deals primarily with typesetting 3x3x3 cube (Rubik cube) |
| 130 |
% configurations. |
| 131 |
% The \textsc{rubikrotation} package processes rotation sequences and keeps track of |
| 132 |
% the cube's configuration during rotations. |
| 133 |
% The \textsc{rubikpatterns} package is a small database of 3x3x3 (Rubik) cube rotation |
| 134 |
% sequences which generate well-known named cube configurations (patterns). |
| 135 |
% The \textsc{rubiktwocube} package allows the typesetting of 2x2x2 cube (Two cube) |
| 136 |
% configurations. |
| 137 |
% |
| 138 |
% Full 3x3x3 functionality requires the following packages to be loaded |
| 139 |
% (TikZ first; \textsc{rubikcube} second), as follows: |
| 140 |
%\begin{verbatim} |
| 141 |
% \usepackage{tikz} |
| 142 |
% \usepackage{rubikcube,rubikrotation,rubikpatterns} |
| 143 |
%\end{verbatim} |
| 144 |
% Full 2x2x2 functionality requires the \textsc{rubiktwocube} package \textit{in addition} to the |
| 145 |
% packages listed above. |
| 146 |
% Note that the \verb!TikZ! package must be loaded \textit{before} the \textsc{rubikcube} |
| 147 |
% package. |
| 148 |
% |
| 149 |
% The \rubikcube\ package has been road-tested on a Microsoft |
| 150 |
% platform (with \textsf{MiK}\TeX), a GNU-Linux platform (Debian 8.2.0 |
| 151 |
% and {\TeX}Live 2017), and on a Solaris platform (OpenIndiana). |
| 152 |
% |
| 153 |
% |
| 154 |
% For the mathematics and group theory associated with the Rubik cube see Chen~(2004), |
| 155 |
% Davis (2006), Fung website, Golomb~(1981, 1982), Hofstadter (1981), Hutchings~(2011), |
| 156 |
% Heise website, Joyner~(2008), Kociemba website, |
| 157 |
% Rokicki~\textit{et al.} (2013), Scherphius website, Tran~(2005). |
| 158 |
% Other useful websites are the Speedsolving website, and those |
| 159 |
% maintained by Duvoid, by Fridrich, by Jelinek, by Reid, and by Vandenburgh. |
| 160 |
% A useful online solver utility (based on an algorithm by Kociemba) is |
| 161 |
% available at the RuWix website. Websites with good pages on patterns and symmetries are |
| 162 |
% those by Fridrich, Kociemba, Longridge, Reid, Randelshofer, Scherphius |
| 163 |
% (see References for details). |
| 164 |
% |
| 165 |
% For historical and technical details regarding Rubik's cube see Sher (2014), |
| 166 |
% and also the Wikipedia article \textit{Rubik's Cube}. |
| 167 |
% |
| 168 |
% |
| 169 |
% \subsection{Requirements} |
| 170 |
% |
| 171 |
% The \rubikcube\ package requires the TikZ package, since it makes |
| 172 |
% use of the TikZ picture environment and the \cmd{\pgfmathsetmacro} command. |
| 173 |
% Consequently, the \verb!TikZ! package must be loaded \textit{before} |
| 174 |
% the \textsc{rubikcube} package. |
| 175 |
% The \textsc{rubikrotation} package (see below) |
| 176 |
% requires Perl to be installed. |
| 177 |
% |
| 178 |
% |
| 179 |
% \subsection[rubikrotation package]{Supporting tool---the |
| 180 |
% \textsc{rubikrotation} package} |
| 181 |
% \label{sec:rubikrotation} |
| 182 |
% |
| 183 |
% The \textsc{rubikrotation} package (also part of the \textsc{rubik} `bundle'), |
| 184 |
% is a dynamic extension to the \rubikcube\ package. It consists of the |
| 185 |
% Perl program \texttt{rubikrotation.pl} and the associated style option |
| 186 |
% \texttt{rubikrotation.sty}. |
| 187 |
% The \textsc{rubikrotation} package implements rotation sequences on-the-fly using a |
| 188 |
% \cmd{\RubikRotation}\marg{rotation-sequence} command. It returns the |
| 189 |
% new state in a form which can then be used by the \rubikcube\ package. |
| 190 |
% It also returns some useful strings associated with the rotation sequence |
| 191 |
% which can be used by the \rubikcube\ |
| 192 |
% package---see also Section~\ref{sec:showsequence}. |
| 193 |
% |
| 194 |
% Since the \cmd{\RubikRotation} command works by \textsc{call}ing the |
| 195 |
% \texttt{rubikrotation.pl} program, it follows that the \textsc{rubikrotation} |
| 196 |
% package requires (a)~Perl to be installed, |
| 197 |
% and (b)~the \LaTeX\ engine needs to be run using the \texttt{--shell-escape} |
| 198 |
% command-line option. Those wishing to use Lua\LaTeX\ will also need to have access |
| 199 |
% to the \texttt{shellesc} package (this can always be downloaded from CTAN directly). |
| 200 |
% See the \textsc{rubikrotation} documentation for further details. |
| 201 |
% See also the examples in the file \texttt{RubikExamples.pdf}. |
| 202 |
% |
| 203 |
% |
| 204 |
% |
| 205 |
% \subsection[rubikpatterns]{Supporting database---\textsc{rubikpatterns} package } |
| 206 |
% \label{sec:patterns} |
| 207 |
% |
| 208 |
% |
| 209 |
% The \textsc{rubikpatterns.sty} file (also part of the \textsc{rubik} `bundle') |
| 210 |
% is a small database of some well-known 3x3x3 cube (Rubik cube) rotation sequences, |
| 211 |
% stored as named macros. For~example, the `fourspot' and `sixspot' sequences are encoded in |
| 212 |
% this package as follows: |
| 213 |
%\begin{verbatim} |
| 214 |
% \newcommand{\fourspot}{[fourspot],F2,B2,U,Dp,R2,L2,U,Dp,<(12q*, 8f*)>} |
| 215 |
% \newcommand{\sixspot}{[sixspot],U,Dp,R,Lp,F,Bp,U,Dp,<(8q*, 8f*)>} |
| 216 |
%\end{verbatim} |
| 217 |
% These sequences can be processed by name (using the \cmd{\RubikRotation} command |
| 218 |
% which also requires Perl to be installed---see Section~\ref{sec:rubikrotation}), and |
| 219 |
% then displayed (using the \cmd{\ShowCube} command in conjunction with various |
| 220 |
% \cmd{\DrawRubikCube...} commands). So, for~example, one could typeset the so-called |
| 221 |
% `fourspot' configuration using the following code: |
| 222 |
%\begin{verbatim} |
| 223 |
% \usepackage{tikz,rubikcube,rubikrotation,rubikpatterns} |
| 224 |
% ... |
| 225 |
% \RubikCubeSolved |
| 226 |
% \RubikRotation{\fourspot} % this runs the Perl program \texttt{rubikrotation.pl} |
| 227 |
% \ShowCube{2.4cm}{0.6}{\DrawRubikCubeRU} |
| 228 |
%\end{verbatim} |
| 229 |
% The sequence itself can be readily typeset using the \cmd{\ShowSequence} command |
| 230 |
% (see Section~\ref{sec:showsequence}). |
| 231 |
% See also the \textsc{rubikrotation} documentation---especially |
| 232 |
% Section~5.1.1 \textit{Sequences as macros}. |
| 233 |
% See also the examples in the file \texttt{RubikExamples.pdf}. |
| 234 |
% |
| 235 |
% |
| 236 |
% |
| 237 |
% \subsection[rubiktwocube]{Supporting 2x2x2 package---\textsc{rubiktwocube} package } |
| 238 |
% \label{sec:patterns} |
| 239 |
% |
| 240 |
% The \textsc{rubiktwocube} package carries the macros and commands necessary |
| 241 |
% for processing and displaying 2x2x2 cubes (TwoCubes). The 2x2x2 commands are isomorphic |
| 242 |
% with the 3x3x3 commands---i.e.,~the word `\texttt{Two}' has replaced the |
| 243 |
% word `\texttt{Rubik}' in commands. |
| 244 |
% Consequently, users of this package will need to be familiar with the \textsc{rubikcube} package. |
| 245 |
% There are lots of 2x2x2 examples in the file \texttt{RubikExamples.pdf}. |
| 246 |
% |
| 247 |
% |
| 248 |
% \subsection{Copyright} |
| 249 |
% Copyright 2014--2018 RWD Nickalls and A Syropoulos. |
| 250 |
% |
| 251 |
% \medskip |
| 252 |
% {\noindent}This work may be distributed and/or modified under the |
| 253 |
% conditions of the LaTeX Project Public License, either |
| 254 |
% version 1.3c of this license or any |
| 255 |
% later version. The latest version of this licence is in |
| 256 |
% |www.latex-project.org/lppl.txt| |
| 257 |
% |
| 258 |
% |
| 259 |
% \section{Installation} |
| 260 |
% |
| 261 |
% The Rubik bundle consists of the four packages \rubikcube, \textsc{rubikrotation}, |
| 262 |
% \textsc{rubikpatterns} and \textsc{rubiktwocube}. Although installing the Rubik bundle |
| 263 |
% will typically install everything automatically (eg.,~from the {\TeX}Live DVD), |
| 264 |
% each package can be installed separately if necessary. |
| 265 |
% Here we detail only the \rubikcube\ package. |
| 266 |
% |
| 267 |
% \subsection{Generating the \rubikcube\ files} |
| 268 |
% |
| 269 |
% Place the file \texttt{rubikcube.zip} into a temporary directory, and unzip it. |
| 270 |
% This will generate the following files: |
| 271 |
%\begin{verbatim} |
| 272 |
% rubikcube.ins |
| 273 |
% rubikcube.dtx |
| 274 |
% rubikcube.pdf --documentation of the rubikcube package |
| 275 |
% rubik-doc-figA.pdf |
| 276 |
% rubik-doc-figB.pdf |
| 277 |
% rubik-doc-figC.pdf |
| 278 |
% rubik-doc-figD.pdf |
| 279 |
% rubik-doc-figE.pdf |
| 280 |
% rubik-doc-figF.pdf |
| 281 |
% rubikexamples.tex |
| 282 |
% rubikexamples.pdf |
| 283 |
% rubikexamples.sh |
| 284 |
% rubikexamples.bat |
| 285 |
%\end{verbatim} |
| 286 |
% |
| 287 |
% The style option \texttt{rubikcube.sty} is generated by running (pdf)\LaTeX\ on |
| 288 |
% the file \texttt{rubikcube.ins} as follows: |
| 289 |
%\begin{verbatim} |
| 290 |
% pdflatex rubikcube.ins |
| 291 |
%\end{verbatim} |
| 292 |
% This documentation file (\texttt{rubikcube.pdf}) can then be generated using the following |
| 293 |
% steps\,\footnote{Several pdflatex runs are required, since the documentation includes |
| 294 |
% an index as well as hyperef links (the package \texttt{hypdoc} |
| 295 |
% is used). Prior to the first run it is |
| 296 |
% a good idea to delete any relevant \texttt{.toc}, \texttt{.aux}, \texttt{.out} files.}: |
| 297 |
%\begin{verbatim} |
| 298 |
% pdflatex rubikcube.dtx |
| 299 |
% pdflatex rubikcube.dtx |
| 300 |
% makeindex -s gind.ist rubikcube |
| 301 |
% makeindex -s gglo.ist -o rubikcube.gls rubikcube.glo |
| 302 |
% pdflatex rubikcube.dtx |
| 303 |
% pdflatex rubikcube.dtx |
| 304 |
%\end{verbatim} |
| 305 |
% |
| 306 |
% |
| 307 |
% \subsection{RubikExamples file} |
| 308 |
% |
| 309 |
% Note that the package includes a `rubikexamples' file (\texttt{rubikexamples.pdf}), |
| 310 |
% as well as the source file (\texttt{rubikexamples.tex}), and |
| 311 |
% associated \texttt{.sh} (Linux) and \texttt{.bat} (Microsoft) batch |
| 312 |
% files, which can be used to facilitate processing the source \texttt{.tex} file. |
| 313 |
% The file \texttt{rubikexamples.pdf} showcases both 3x3x3 (Rubik cube) |
| 314 |
% and 2x2x2 (Two cube) examples. |
| 315 |
% |
| 316 |
% Note that should you need to generate the file \texttt{rubikexamples.pdf} |
| 317 |
% from the source file (\texttt{rubikexamples.tex}) you will require |
| 318 |
% the \textsc{rubikrotation}, \textsc{rubikpatterns} and |
| 319 |
% \textsc{rubiktwocube} packages to be installed, |
| 320 |
% and will also need to use the \verb!--shell-escape! command-line |
| 321 |
% option (see Section~\ref{sec:rubikrotation} for details). |
| 322 |
% |
| 323 |
% |
| 324 |
% \subsection{Placing the files} |
| 325 |
% |
| 326 |
% Place the files either in the local working directory, or where your system |
| 327 |
% will find them. For a Linux system with a standard \TeX\ Directory Structure (TDS), then: |
| 328 |
% |
| 329 |
%\medskip |
| 330 |
%{\noindent}*.sty $\rightarrow$ |
| 331 |
% \texttt{/usr/local/texlive/texmf-local/tex/latex/rubik/} |
| 332 |
%{\newline}*.pdf $\rightarrow$ \texttt{/usr/local/texlive/texmf-local/doc/rubik/} |
| 333 |
% |
| 334 |
% \medskip |
| 335 |
% {\noindent}Finally, (depending on your system) update the \TeX\ file database. |
| 336 |
% For~example, on a Linux system one uses the \texttt{texhash} command. |
| 337 |
% |
| 338 |
% |
| 339 |
% \subsection{Usage} |
| 340 |
% |
| 341 |
% Load the package by using the command \cmd{\usepackage\{rubikcube\}}. |
| 342 |
% Note that the \rubikcube\ package requires the TikZ package, and so always load TikZ |
| 343 |
% before \rubikcube\ as follows: |
| 344 |
% \begin{quote} |
| 345 |
%\begin{verbatim} |
| 346 |
% \usepackage{tikz} |
| 347 |
% \usepackage{rubikcube,rubikrotation,rubikpatterns,rubiktwocube} |
| 348 |
%\end{verbatim} |
| 349 |
% \end{quote} |
| 350 |
% However, the \rubikcube\ package does check for the presence of TikZ, and will |
| 351 |
% load it if TikZ is not already loaded. |
| 352 |
% |
| 353 |
% While \rubikcube\ is a stand-alone package, for full 3x3x3 functionality it is necessary |
| 354 |
% to load the complementary packages \textsc{rubikrotation}, \textsc{rubikpatterns}. |
| 355 |
% For full 2x2x2 functionality you need to load all four packages. |
| 356 |
% |
| 357 |
% |
| 358 |
% \pagebreak |
| 359 |
% |
| 360 |
% \section{Command conventions} |
| 361 |
% \label{sec:conventions} |
| 362 |
% |
| 363 |
|
| 364 |
% |
| 365 |
% All \rubikcube\ package commands assume a 3x3x3 cube by default. |
| 366 |
% Since all cubes are displayed or `drawn' using the TikZ picture environment, |
| 367 |
% it is useful (initially at least) to categorise commands with regard to this environment |
| 368 |
% (and also with regard to the \cmd{\ShowCube..} command since this |
| 369 |
% is simply a convenient wrapper for the TikZ picture environment). |
| 370 |
% On~this basis, we can distingush three conceptually useful categories, as follows: |
| 371 |
% |
| 372 |
% \begin{enumerate} |
| 373 |
% |
| 374 |
% \item \cmd{\Draw..} commands |
| 375 |
% (which must \textit{always} be used \textit{inside} a TikZ picture environment), |
| 376 |
% |
| 377 |
% \item `parameter-allocation' commands (which can be used either inside |
| 378 |
% or outside a TikZ environment); for example, \cmd{\RubikFace..} (for allocating |
| 379 |
% facelet colours), and |
| 380 |
% |
| 381 |
% \item commands which can be used in ordinary text; for example, |\rr{}| (for typesetting |
| 382 |
% certain rotation codes). |
| 383 |
% |
| 384 |
% \end{enumerate} |
| 385 |
% From a functional point of view, however, we can view the Rubik bundle commands as |
| 386 |
% splitting into the following groups: |
| 387 |
% \begin{enumerate} |
| 388 |
% |
| 389 |
% \item those that allocate colour |
| 390 |
% to faces, facelets etc., ---these commands all start with \cmd{\Rubik} (for 3x3x3 cubes) or \cmd{\Two} |
| 391 |
% (for 2x2x2 cubes \footnote{Requires the \textsc{rubiktwocube} package}), |
| 392 |
% |
| 393 |
% \item those that % draw ---these commands all start with \cmd{\Draw}, |
| 394 |
% |
| 395 |
% \item those that typeset rotation codes or hieroglyphs; |
| 396 |
% ---there are just four of these for 3x3x3 cubes (these commands |
| 397 |
% start with \cmd{\rr}, \cmd{\rrh}, \cmd{\Rubik}, |
| 398 |
% and \cmd{\textRubik}), and an equivalent four commands for 2x2x2 cubes |
| 399 |
% (these start with \cmd{\tr}, \cmd{\trh}, \cmd{\Two}, and \cmd{\textTwo}). |
| 400 |
% |
| 401 |
% \end{enumerate} |
| 402 |
|
| 403 |
% \medskip |
| 404 |
% |
| 405 |
% \DescribeMacro{\rubikcube} |
| 406 |
% {\noindent}This command generates the logo \rubikcube. |
| 407 |
% |
| 408 |
% |
| 409 |
% |
| 410 |
% \subsection[Keywords Rubik and Two]{The keywords Rubik and Two in commands} |
| 411 |
% \label{sec:rubikandtwo} |
| 412 |
% |
| 413 |
% In order to try and keep commands intuitive\,\footnote{This is a tricky problem |
| 414 |
% given the large number of commands, so any feedback or ideas on how to avoid ambiguity, |
| 415 |
% including pruning or revising `bad' commands, is always welcome.} |
| 416 |
% we adopt the convention that |
| 417 |
% the word `Rubik' in a command reflects the fact that the command |
| 418 |
% relates to a 3x3x3 cube (i.e.,~a `Rubik' cube). Similarly, commands which relate |
| 419 |
% to a 2x2x2 cube (a `Two' cube) ---see the \textsc{rubiktwocube} package--- |
| 420 |
% use instead the word `Two'. |
| 421 |
% For~example, the commands for drawing a 3x3x3 cube and a 2x2x2 cube from a RU viewpoint |
| 422 |
% are respectively \cmd{\DrawRubikCubeRU} and \cmd{\DrawTwoCubeRU}. |
| 423 |
% |
| 424 |
% Having packages now for both 3x3x3 and 2x2x2 cubes (v5) means we need to be more careful regarding |
| 425 |
% command names, and try to make commands (a)~as intuitive as possible, and (b)~use the |
| 426 |
% same command name format for equivalent 3x3x3 and 2x2x2 commands (as shown in the example above). |
| 427 |
% |
| 428 |
% In keeping with this approach, some commands have had to be renamed. |
| 429 |
% For~example, in this new version we have therefore renamed the |
| 430 |
% earlier \cmd{\DrawFace..} commands $\rightarrow$ \cmd{\DrawRubikFace..} |
| 431 |
% (see Section~\ref{sec:deprecated}). |
| 432 |
% |
| 433 |
% |
| 434 |
% \subsection{Environments} |
| 435 |
% |
| 436 |
% Although the \rubikcube\ package has been designed with TikZ in mind, |
| 437 |
% it is important to appreciate that of all the various \rubikcube\ package |
| 438 |
% commands only the Rubik \cmd{\Draw...} commands and TikZ commands actually |
| 439 |
% have to be used inside a TikZ picture environment. |
| 440 |
% |
| 441 |
% Indeed, using \rubikcube\ package commands which influence the Rubik colour state |
| 442 |
% (configuration) outside the \texttt{tikzpicture}, \texttt{minipage} or |
| 443 |
% \texttt{figure} environments can make for useful |
| 444 |
% flexibility when a document is generating more than one figure |
| 445 |
% or image. This is because the scope of any colours specified by commands inside |
| 446 |
% these environments is constrained to |
| 447 |
% be `local' to that particular environment, and hence any change in the |
| 448 |
% Rubik colour state brought about by such commands is not accessible |
| 449 |
% globally (i.e.,~outside the environment) ---see also Section~5 in the documentation |
| 450 |
% of the \textsc{rubikrotation} package. |
| 451 |
% |
| 452 |
% Consequently users need to be mindful of the environments when |
| 453 |
% drawing sequences of rotations across several figures; for~example, keeping commands like |
| 454 |
% \cmd{\RubikRotation}, \cmd{\RubikFace..}, \cmd{\RubikCubeSolved}, |
| 455 |
% outside the environments keeps their effects global |
| 456 |
% (an example of this problem is presented in the file \texttt{RubikExamples.pdf}). |
| 457 |
% |
| 458 |
% |
| 459 |
% \subsection{Capital letters} |
| 460 |
% |
| 461 |
% Virtually all Rubik bundle commands start with a capital letter, primarily to |
| 462 |
% avoid any confusion with TikZ commands (these generally start with lower-case letters). However, |
| 463 |
% each `word' in a Rubik bundle command (except the word `text') also starts |
| 464 |
% with a capital letter, primarily to facilitate readability. |
| 465 |
% For~example, \cmd{\DrawRubikCubeRU}, \cmd{\DrawCubieRU}. |
| 466 |
% However, as with \LaTeX, `text..' commands start with a lower-case `t'; |
| 467 |
% for~example \cmd{\textCubieRU}. Letter arguments for colours (R, O, Y, G, B, W, X) are |
| 468 |
% always written in upper-case letters. |
| 469 |
% |
| 470 |
% |
| 471 |
% |
| 472 |
% \subsection{XYZ argument ordering} |
| 473 |
% \label{sec:xyzarguments} |
| 474 |
% |
| 475 |
% Many commands have an appended two, three, or even six ordered arguments or letters |
| 476 |
% which form some feature of the structure of a command; perhaps |
| 477 |
% either face or colour code or a viewpoint direction. |
| 478 |
% |
| 479 |
% We adopt the convention that where ordering of arguments is critical, then the |
| 480 |
% arguments are ordered in the XYZ, $+$, $-$ order. An XYZ code implies that |
| 481 |
% the first letter in the code relates to an X-related parameter, |
| 482 |
% for~example, L (Left) or R (Right); the second letter relates to a Y-related |
| 483 |
% parameter, for~example, U (Up) or D (Down); the third (if required) |
| 484 |
% relates to a Z-related parameter, for~example, F (Front) or B (Back) |
| 485 |
% ---see Figure~\ref{fig:notation}. |
| 486 |
% |
| 487 |
% Some commands have six arguments which adopt an (XYZ;$+$$-$) format. In this case, |
| 488 |
% for~example, the \cmd{\RubikSolvedConfig} command, for which the six colour arguments |
| 489 |
% are ordered as X$+$, X$-$, Y$+$, Y$-$, Z$+$, Z$-$. Here the colour argument |
| 490 |
% associated with a face positioned on the $+$ve axis is ordered before |
| 491 |
% its $-$ve complement on the same axis. |
| 492 |
% |
| 493 |
% Another example is the |\DrawCubieRU{G}{Y}{O}| command, which draws a cubie. Here |
| 494 |
% the RU letters are XY ordered; i.e.,~RightUp viewpoint. The sequence of colour codes |
| 495 |
% for the three visible faces are XYZ ordered, and hence result in the cube having a |
| 496 |
% Green Right face, Yellow Up face and Orange Front face. |
| 497 |
% |
| 498 |
% |
| 499 |
% |
| 500 |
% \subsection{Trailing \% on the end of commands} |
| 501 |
% \label{sec:trailingpercent} |
| 502 |
% |
| 503 |
% Since the all the output of this package is drawn using graphic elements |
| 504 |
% using TikZ, it is important to include a trailing \% on the end |
| 505 |
% of \rubikcube\ package commands when used \textit{outside} a TikZ picture environment, and |
| 506 |
% also on the end of the \cmd{\end\{tikzpicture\}} environment command itself. |
| 507 |
% In particular it is important to use a trailing \% on |
| 508 |
% the end of lines which break before the terminal curly bracket of a \cmd{\newcommand}. |
| 509 |
% |
| 510 |
% This is to prevent accumulating spurious spaces which may otherwise appear in |
| 511 |
% figures and diagrams as a strange or unexpected horizontal shift or white-space. |
| 512 |
% That this can occur is because in \TeX\ every newline character is automatically converted |
| 513 |
% to a white space---unless you have an empty line |
| 514 |
% (Feuers\"{a}nger 2016). |
| 515 |
% |
| 516 |
% The \LaTeX\ fbox is a useful aid for visualising unwanted white space |
| 517 |
% which may have accumulated, and for identifying the cause. |
| 518 |
% See Section~\ref{sec:showcube} on the \cmd{\ShowCubeF} command for |
| 519 |
% more details regarding this approach. |
| 520 |
% |
| 521 |
% Although this effect is mostly small, and is generally only observed in situations |
| 522 |
% when centering a graphic is critical, it is, however, cumulative and can be surprisingly large. |
| 523 |
% In these situations, the cure is the addition of terminal \% characters to preceding |
| 524 |
% code guided by careful detective use of the fbox technique mentioned above. |
| 525 |
% |
| 526 |
% |
| 527 |
% \subsection{Cubies, cubicles, faces and facelets} |
| 528 |
% |
| 529 |
% The sub-cubes which make up the Rubik cube are known as `cubies'; the small |
| 530 |
% coloured face of a cubie is known as a `facelet'. The cubies |
| 531 |
% are named either according to the colours of their two or three facelets, or |
| 532 |
% according to their physical position. |
| 533 |
% |
| 534 |
% We distinguish three types of cubie: |
| 535 |
% centre-cubies (single colour), edge-cubies (two colours) and corner-cubies |
| 536 |
% (three colours). For~example, the red/white edge-cubie is called |
| 537 |
% the RW cubie, and the red/white/green corner-cubie is called the |
| 538 |
% RWG cubie etc. Note that the colour of a particular face of a 3x3x3 Rubik |
| 539 |
% cube is determined by the colour of its centre-cubie. |
| 540 |
% |
| 541 |
% Similarly, the positions (known as `cubicles') occupied by cubies are |
| 542 |
% defined using either a two or three letter face code. For~example, the |
| 543 |
% right edge position in the Up-layer is termed the Up/Right position, |
| 544 |
% or just the UR position, and the corner joining the \textsc{down} |
| 545 |
% \textsc{front} and \textsc{right} faces is the DFR position. |
| 546 |
% |
| 547 |
% |
| 548 |
% |
| 549 |
% \section{Rubik cube coordinates} |
| 550 |
% \label{sec:coordinates} |
| 551 |
% |
| 552 |
% The coordinate origin of all 2D cube images is located |
| 553 |
% at the bottom-left corner of the \textsc{front} face, as shown in |
| 554 |
% Figure~\ref{fig:cubesquaregraph}. Note also that the bottom left |
| 555 |
% extent of this particular 2D rendering of the 3x3x3 cube is actually |
| 556 |
% at $(-1,-1)$, and hence the default height and width of all oblique-view |
| 557 |
% cubes is 4~units (i.e.,~equivalent to 4cm if the TikZ scale-factor = 1). |
| 558 |
% |
| 559 |
% \begin{figure}[hbt] |
| 560 |
% \centering |
| 561 |
% \ifpdf |
| 562 |
% \includegraphics[height=4cm]{rubik-doc-figB.pdf} |
| 563 |
% \else |
| 564 |
% \includegraphics[height=4cm]{rubik-doc-figB.eps} |
| 565 |
% \fi |
| 566 |
% |
| 567 |
% \parbox{9cm}{\caption{\label{fig:cubesquaregraph}Origin of coordinates |
| 568 |
% is at the bottom left corner of the grey \textsc{front} face. |
| 569 |
% Since $P$ is at $(-1,-1)$ then the default height and width of the |
| 570 |
% 2D~cube image is 4~units.}} |
| 571 |
% \end{figure} |
| 572 |
% |
| 573 |
% Arranging for $P$ to be at $(-1,-1)$, as well as using the bottom-left corner |
| 574 |
% of the \textsc{front} face as the origin, is a useful design |
| 575 |
% feature which make it easy to figure-out the coordinates of any point on |
| 576 |
% the image plane (either on the cube or outside the cube), and hence |
| 577 |
% facilitates the use of TikZ commands |
| 578 |
% (e.g.,~\cmd{\draw} and \cmd{\node} commands) to superimpose lines, |
| 579 |
% arrows and text etc.,~onto the Rubik cube (see Section~\ref{sec:arrows}). |
| 580 |
% |
| 581 |
% |
| 582 |
% \subsection[Size of cube minipage]{Size of cube \cmd{\minipage}} |
| 583 |
% \label{sec:sizeofminipage} |
| 584 |
% |
| 585 |
% Since the the default height and width of the oblique 2D~cube image is |
| 586 |
% 4~units (see Section~\ref{sec:coordinates} above), |
| 587 |
% it follows that the width of the \cmd{\minipage} required for a cube in a |
| 588 |
% \texttt{tikzpicture} environment can be easily calculated. For~example, |
| 589 |
% if the \texttt{tikzpicture} scale factor used is $0.5$, then the minimum |
| 590 |
% width of the required minipage for the \cmd{\DrawRubikCubeLD} view (shown above) |
| 591 |
% is therefore $0.5 \times 4\mbox{cm} = 2\mbox{cm}$. |
| 592 |
% |
| 593 |
% Note that the width of the semi-flat (SF) cube representation is therefore |
| 594 |
% 10~units ($=3+3+1+3$), and that of the flat (F) cube is 12~units ($=3+3+3+3$) |
| 595 |
% --- see Section~\ref{sec:flatcommands} for images of these forms. |
| 596 |
% If in doubt check the horizontal extent of an image using the \cmd{\ShowCubeF} command, |
| 597 |
% which places an fbox around the image. |
| 598 |
% |
| 599 |
% |
| 600 |
% |
| 601 |
% \section{TikZ picture environment} |
| 602 |
% \label{sec:tikz} |
| 603 |
% |
| 604 |
% All the Rubik bundle \cmd{\Draw..} commands are designed to be used |
| 605 |
% with the TikZ picture environment, and are compatible with standard TikZ. |
| 606 |
% For a basic introduction to the use of TikZ see the following manuals |
| 607 |
% (from CTAN or from \texttt{http://altermundus.com/}). |
| 608 |
% \begin{itemize} |
| 609 |
% \item \texttt{https://en.wikipedia.org/wiki/PGF/TikZ} |
| 610 |
% \item \texttt{pgfmanual.pdf}, version 3.0.1a (2015) (1161 pages) |
| 611 |
% \item \texttt{pgfplot.pdf}, version 1.14 (2016) (561 pages) |
| 612 |
% \item \texttt{tkz-base-screen.pdf}, version 1.16c (2011) (91 pages) |
| 613 |
% \end{itemize} |
| 614 |
% An example of the TikZ picture environment for use with the Rubik bundle |
| 615 |
% is as follows: |
| 616 |
% \begin{quote} |
| 617 |
%\begin{verbatim} |
| 618 |
% \begin{tikzpicture}[scale=0.5] |
| 619 |
% ... |
| 620 |
% \end{tikzpicture}% |
| 621 |
%\end{verbatim} |
| 622 |
% \end{quote} |
| 623 |
% If no scale-factor is used (default scale-factor = 1), then each of the small |
| 624 |
% cubie sides will have a length of 1~cm. |
| 625 |
% |
| 626 |
% \textsc{useful commands}:\ Probably the most |
| 627 |
% useful TikZ commands for use with regard |
| 628 |
% to the Rubik bundle are the \cmd{\draw} command (for drawing lines, arrows, circles), |
| 629 |
% and the \cmd{\node} command (for writing text at specific coordinate locations). |
| 630 |
% The basic structure of these commands is as~follows, where |
| 631 |
% (x,y) represent grid coordinates of start or end points of lines or arrows, |
| 632 |
% or of a circle centre, or of text position |
| 633 |
% (see Sections~\ref{sec:drawrubikcubecommands} and \ref{sec:arrows} for examples). |
| 634 |
% \begin{quote} |
| 635 |
% \begin{verbatim} |
| 636 |
% \draw[->,thick,color=blue] (4.5, 2.5) -- (3.5,2.5); |
| 637 |
% \draw[->,ultra thick,color=red] (4.5, 2.5) -- (3.5,2.5); |
| 638 |
% \draw [color=blue, thick] (0.3, 0.3) circle (1.3); |
| 639 |
% \node (B) at (7.5, 1.5) [black]{\small\textsf{B}}; |
| 640 |
%\end{verbatim} |
| 641 |
%\end{quote} |
| 642 |
% Remember that all TikZ commands which are valid inside a \texttt{tikzpicture} |
| 643 |
% environment require a terminal semicolon (see Section~\ref{sec:arrows} |
| 644 |
% for examples). |
| 645 |
% |
| 646 |
% \textsc{colours}: \ |
| 647 |
% The following colors are predefined by TikZ: red, green, blue, cyan, magenta, |
| 648 |
% yellow, black, gray, darkgray, lightgray, brown, lime, olive, orange, pink, |
| 649 |
% purple, teal, violet and white (see \texttt{https://en.wikipedia.org/wiki/PGF/TikZ}). |
| 650 |
% |
| 651 |
% \textsc{line width}: \ |
| 652 |
% TikZ allows line width to be specified directly |
| 653 |
% (e.g.,~\texttt{[line width=<dimension>]}), or by using the following abbreviations: |
| 654 |
% `ultra thin' for 0.1pt, `very thin' for 0.2pt, `thin' for 0.4pt (the default width), |
| 655 |
% `semi thick' for 0.6pt, `thick' for 0.8pt, `very thick' for 1.2pt, |
| 656 |
% `ultra thick' for 1.6pt (see \texttt{https://en.wikipedia.org/wiki/PGF/TikZ}). |
| 657 |
% |
| 658 |
%% \textsc{white space}: \ |
| 659 |
% A particularly useful feature of TikZ is that it automatically |
| 660 |
% minimises any horizontal white-space. However, it is good practice to place |
| 661 |
% a \% symbol after the \verb!\end{tikzpicture}! command |
| 662 |
% to avoid additional white space inadvertently being added by \LaTeX\ |
| 663 |
% (see Section~\ref{sec:trailingpercent}). |
| 664 |
% |
| 665 |
% When making images it can be helpful to place them inside a minipage |
| 666 |
% (e.g.,~using the \cmd{\ShowCube} command / environment below). |
| 667 |
% A~convenient approach is to first adjust the value of the tikzpicture scale-factor |
| 668 |
% (to obtain the appropriate size), and then adjust the minipage-width as necessary, using |
| 669 |
% the fbox associated with the \cmd{\ShowCubeF} command |
| 670 |
% (see Section~\ref{sec:sizeofminipage} for a useful guide on this). |
| 671 |
% |
| 672 |
% The main `display' tool for drawing cubes is the \cmd{\ShowCube} command |
| 673 |
% (see below), and this incorporates a |
| 674 |
% TikZ picture environment inside a minipage. The equivalent tool for |
| 675 |
% displaying rotation sequences is the \cmd{\ShowSequence} command. |
| 676 |
% |
| 677 |
% |
| 678 |
% |
| 679 |
% |
| 680 |
% |
| 681 |
% \section[ShowCube command]{\cmd{\ShowCube} command} |
| 682 |
% \label{sec:showcube} |
| 683 |
% |
| 684 |
% |
| 685 |
% \DescribeMacro{\ShowCube} |
| 686 |
% This command \cmd{\ShowCube}\marg{width}\marg{scale-factor}\marg{commands} |
| 687 |
% is a convenient tool for placing one or more commands inside a |
| 688 |
% tikzpicture environment which is also inside a minipage |
| 689 |
% (see Section~\ref{sec:showcubecode} for the code). |
| 690 |
% This command takes three arguments: the first (\verb!#1!) is the minipage width, |
| 691 |
% the second (\verb!#2!) is the tikzpicture scale factor, and the third (\verb!#3!) |
| 692 |
% is a series of any \rubikcube\ package \cmd{\Draw..} and other commands, as well as |
| 693 |
% any TikZ commands which are valid in a \texttt{tikzpicture} environment |
| 694 |
% (e.g.,~\cmd{\draw} or \cmd{\node} etc.). |
| 695 |
% |
| 696 |
% \medskip |
| 697 |
% |
| 698 |
% \noindent\textsc{usage}: |
| 699 |
% The following \cmd{\ShowCube} command displays a Rubik cube |
| 700 |
% (the `SixT's configuration\footnote{The \cmd{\sixts} macro is from the \textsc{rubikpatterns} |
| 701 |
% package.}) and a blue arrow in a minipage of width~3cm, using a tikzpicture scale |
| 702 |
% factor of~0.5. |
| 703 |
% Note that the TikZ \cmd{\draw} command requires a terminal |
| 704 |
% semicolon (see Section~\ref{sec:tikz}). |
| 705 |
% |
| 706 |
% \medskip |
| 707 |
% |
| 708 |
% {\noindent}% |
| 709 |
% \begin{minipage}{6.6cm} |
| 710 |
%\begin{verbatim} |
| 711 |
% \RubikCubeSolved |
| 712 |
% \RubikRotation{\sixts} |
| 713 |
% \ShowCube{3cm}{0.5}{% |
| 714 |
% \DrawRubikCubeLU |
| 715 |
% \draw[->,thick,color=blue] (4.5, 2.5) -- (3.5,2.5); |
| 716 |
% } |
| 717 |
%\end{verbatim} |
| 718 |
% \end{minipage} |
| 719 |
% \hspace{2.5cm}% |
| 720 |
%\RubikFaceUp{Y}{Y}{W}{W}{W}{W}{Y}{Y}{W}% |
| 721 |
%\RubikFaceDown{Y}{W}{W}{Y}{Y}{Y}{Y}{W}{W}% |
| 722 |
%\RubikFaceLeft{B}{G}{G}{B}{B}{B}{B}{G}{G}% |
| 723 |
%\RubikFaceRight{G}{B}{B}{G}{G}{G}{G}{B}{B}% |
| 724 |
%\RubikFaceFront{O}{O}{O}{R}{O}{R}{R}{O}{R}% |
| 725 |
%\RubikFaceBack{O}{R}{O}{O}{R}{O}{R}{R}{R}% |
| 726 |
% \ShowCube{3cm}{0.5}{% |
| 727 |
% \DrawRubikCubeLU |
| 728 |
% \draw[->,thick,color=blue] (4.5, 2.5) -- (3.5,2.5); |
| 729 |
% } |
| 730 |
% |
| 731 |
% \medskip |
| 732 |
% |
| 733 |
% {\noindent}The action of the \cmd{\ShowCube} command is illustrated below; the |
| 734 |
% \cmd{\ShowCube} command on the left is equivalent to the bunch of commands |
| 735 |
% on the right (see Section~\ref{sec:showcubecode} for the complete code). |
| 736 |
% $$ |
| 737 |
% \left. |
| 738 |
% \begin{array}{l} |
| 739 |
% {\ }\\ |
| 740 |
% {\ }\\ |
| 741 |
% \verb!\ShowCube{3cm}{0.5}{...}!\\ |
| 742 |
% {\ }\\ |
| 743 |
% {\ }\\ |
| 744 |
% \end{array} |
| 745 |
% \right\{ |
| 746 |
% \begin{array}{l} |
| 747 |
% \verb!\begin{minipage}{3cm}%!\\ |
| 748 |
% \verb!\centering%!\\ |
| 749 |
% \verb!\begin{tikzpicture}[scale=0.5]!\\ |
| 750 |
% ...\\ |
| 751 |
% \verb!\end{tikzpicture}%!\\ |
| 752 |
% \verb!\end{minipage}%!\\ |
| 753 |
% \end{array} |
| 754 |
% $$ |
| 755 |
% |
| 756 |
% \DescribeMacro{\ShowCubeF} |
| 757 |
% The \cmd{\ShowCubeF} command is similar in all respects except that it places |
| 758 |
% an \texttt{fbox} around the minipage in order to enable users to see the extent of any |
| 759 |
% associated white space. For~example, unexpected spacing between two adjacent images, |
| 760 |
% or between an image and adjacent text, is usually related to |
| 761 |
% `hidden' white-space associated with the image itself or excessive width |
| 762 |
% of the associated \cmd{\minipage} (see also Section~\ref{sec:trailingpercent}). |
| 763 |
% Consequently, a temporary \texttt{fbox} around the minipage can be a |
| 764 |
% useful aid when trying to visualise the full extent of the minipage |
| 765 |
% (and its associated white-space). Use the \cmd{\ShowCubeF} command for this. |
| 766 |
|
| 767 |
% For~example, the following use of the \cmd{\ShowCubeF} command reveals a significant |
| 768 |
% white-space problem: |
| 769 |
% |
| 770 |
% \medskip |
| 771 |
%{\noindent}% |
| 772 |
%\begin{minipage}{6.6cm} |
| 773 |
%\begin{verbatim} |
| 774 |
% \ShowCubeF{4cm}{0.3}{\DrawRubikCubeRU} |
| 775 |
%\end{verbatim} |
| 776 |
%\end{minipage} |
| 777 |
% \RubikCubeSolved |
| 778 |
% \ShowCubeF{4cm}{0.3}{\DrawRubikCubeRU} |
| 779 |
% |
| 780 |
% \medskip |
| 781 |
% {\noindent}In this example, clearly either the minipage is too wide (4cm) |
| 782 |
% or the \texttt{tikzpicture} scale factor is too small (0.3). |
| 783 |
% Once the figure/code has been corrected, then the |
| 784 |
% \texttt{F} in the \cmd{\ShowCubeF} command can be removed. |
| 785 |
% |
| 786 |
% Note that while the \cmd{\ShowCube} command centres the image |
| 787 |
% inside the minipage, \LaTeX\ positions |
| 788 |
% the minipage in the \cmd{\textwidth}, and hence it is generally best to minimise |
| 789 |
% the horizontal white-space as revealed by the \cmd{\ShowCubeF} command. The~relationship |
| 790 |
% between the required width of the minipage and the TikZ scale factor for the various |
| 791 |
% Rubik cube images is detailed in Section~\ref{sec:sizeofminipage}. |
| 792 |
% |
| 793 |
% |
| 794 |
% |
| 795 |
% \section{Optimum strategy} |
| 796 |
% \label{sec:optimumstrategy} |
| 797 |
% |
| 798 |
% |
| 799 |
% We suggest that the most convenient (and intuitive) approach for drawing |
| 800 |
% cubes or particular faces is to do it in stages, as follows |
| 801 |
% (all these steps are well illustrated in the examples file |
| 802 |
% \texttt{RubikExamples.pdf}): |
| 803 |
%\begin{itemize} |
| 804 |
% \item first, start by setting the colour state of the cube. This can be done using |
| 805 |
% either (a)~a \cmd{\RubikCubeSolved..} or \cmd{\RubikCubeGrey..} command |
| 806 |
% (for defining the whole cube), or (b)~using one or more \cmd{\RubikFace..} |
| 807 |
% commands (for defining parts of faces), or (c)~by imputting a file containing |
| 808 |
% a previously saved colour state\footnote{See the \textsc{rubikrotation} package documentation |
| 809 |
% for details of the \cmd{\SaveRubikState} command; see also the `SaveRubikState' example in the |
| 810 |
% file \texttt{RubikExamples.pdf}.}. |
| 811 |
% |
| 812 |
% \item second, use the \cmd{\RubikRotation}\ command to process a sequence of rotations |
| 813 |
% (remembering that this requires use of the \verb!--shell-escape! command-line option). |
| 814 |
% The \textsc{rubikpatterns} package is a small library of named rotation sequences. |
| 815 |
% |
| 816 |
% \item third, draw the image(s) using \cmd{\DrawRubikCube..} or |
| 817 |
% \cmd{\DrawRubikFace..} commands, plus any TikZ commands |
| 818 |
% (e.g.,~\cmd{\draw} and/or \cmd{\node}) in conjunction with the \cmd{\ShowCube} command. |
| 819 |
% Use the \cmd{\ShowCube} scale factor to adjust the size, and use the \cmd{\ShowCubeF} |
| 820 |
% command to reveal the extent of any \texttt{minipage} whitespace. |
| 821 |
% |
| 822 |
% \item fourth, spacing between graphic elements can be influenced by adjusting either |
| 823 |
% (a)~horizontal whitespace as set by the \cmd{\ShowCube} command, or (b)~using standard |
| 824 |
% \TeX\ spacing commands, e.g.,~\cmd{\quad}, \cmd{\qquad}, \cmd{\hspace..} etc. |
| 825 |
% |
| 826 |
% \item finally, give some thought to using a trailing \verb!%! in commands which are |
| 827 |
% broken across multiple lines (see Section~\ref{sec:trailingpercent}). |
| 828 |
% |
| 829 |
%\end{itemize} |
| 830 |
% With this approach the internal colour state |
| 831 |
% will be updated and processed correctly by all subsequent |
| 832 |
% \cmd{\Draw..} or \cmd{\RubikRotation}\ commands. |
| 833 |
% Note that exchanging the word `\texttt{Rubik}' for the word `\texttt{Two}' in a command will |
| 834 |
% generate the equivalent TwoCube version of the command (see Section~\ref{sec:rubikandtwo}). |
| 835 |
% |
| 836 |
% |
| 837 |
% |
| 838 |
% \section{Colour commands} |
| 839 |
% \label{sec:colours} |
| 840 |
% |
| 841 |
% The Rubik bundle of packages uses seven colours which are defined as follows: |
| 842 |
% R~(red), O~(orange), Y~(yellow), G~(green), B~(blue), W~(white), |
| 843 |
% and X~(grey). Now according to the following webpage\,\footnote{We thank Peter Bartal |
| 844 |
% for bringing this webpage to our attention.} |
| 845 |
% |
| 846 |
% \medskip |
| 847 |
% \noindent\texttt{http://The-Rubiks-Cube.deviantart.com/journal/Using-Official-Rubik} |
| 848 |
% \newline\texttt{-s-Cube-Colors-268760351} (Nov 2011) |
| 849 |
% |
| 850 |
% \medskip |
| 851 |
% {\noindent}the official Rubik cube colours are defined as |
| 852 |
% \begin{quote} |
| 853 |
%\begin{verbatim} |
| 854 |
% ... colours which are red (PMS 200C*), green (PMS 347C*), |
| 855 |
% blue (PMS 293C*), orange (PMS 021C*), yellow (PMS 012C*) |
| 856 |
% and white. |
| 857 |
% ... |
| 858 |
% Pantone colors can not be accurately converted to RGB colors, |
| 859 |
% the colors the web runs on. But they can be approximated. |
| 860 |
% Through some research, I have found some estimations which |
| 861 |
% may help you which I have listed below. Remember, these are |
| 862 |
% just approximate RGB equivalents to the official Rubik's Cube |
| 863 |
% colors. |
| 864 |
% |
| 865 |
% Red: 200C #C41E3A (www.perbang.dk/rgb/c41e3a/) |
| 866 |
% Green: 347C #009E60 (www.perbang.dk/rgb/009e60/) |
| 867 |
% Blue: 293C #0051BA (www.perbang.dk/rgb/0051ba/) |
| 868 |
% Orange: 021C "Pantone Orange" #FF5800 (www.perbang.dk/rgb/ff5800/) |
| 869 |
% Yellow: 012C "Pantone Yellow" #FFD500 (www.perbang.dk/rgb/ffd500/) |
| 870 |
% White: N/A #FFFFFF |
| 871 |
% |
| 872 |
% Red {HTML}{C41E3A} |
| 873 |
% green {HTML}{009E60} |
| 874 |
% Blue {HTML}{0051BA} |
| 875 |
% Yellow {HTML}{FFD500} |
| 876 |
% Orange {HTML}{FF5800} |
| 877 |
% White {HTML}{FFFFFF} |
| 878 |
%\end{verbatim} |
| 879 |
% \end{quote} |
| 880 |
% |
| 881 |
% {\noindent}The following RGB specifications are given by Sher (2014): |
| 882 |
% \begin{quote} |
| 883 |
%\begin{verbatim} |
| 884 |
% White {RGB}{255,255,255} |
| 885 |
% Red {RGB}{137,18,20} |
| 886 |
% Blue {RGB}{13,72,172} |
| 887 |
% Orange {RGB}{255,85,37} |
| 888 |
% Green {RGB}{25,155,76} |
| 889 |
% Yellow {RGB}{254,213,47} |
| 890 |
%\end{verbatim} |
| 891 |
% \end{quote} |
| 892 |
% |
| 893 |
% {\noindent}However, we have tried to optimise these prescribed colours very slightly |
| 894 |
% for screen \& print use (for~example, the yellow was made very |
| 895 |
% slightly brighter), and so the actual colours implemented by |
| 896 |
% the \rubikcube\ package are as follows\,\footnote{Although the Pantone |
| 897 |
% colours cannot be converted to RGB, there is a subset of of Pantone colours |
| 898 |
% which can be be converted using CMYK |
| 899 |
% (see \texttt{https://en.wikipedia.org/wiki/Pantone}).} |
| 900 |
% (see Section~\ref{sec:codecolours}): |
| 901 |
% |
| 902 |
% \begin{quote} |
| 903 |
%\begin{verbatim} |
| 904 |
% \definecolor{R}{HTML}{C41E33} |
| 905 |
% \definecolor{G}{HTML}{00BE38} |
| 906 |
% \definecolor{B}{HTML}{0051BA} |
| 907 |
% \definecolor{Y}{HTML}{FFFF00} |
| 908 |
% \colorlet{O}{orange} |
| 909 |
% \colorlet{W}{white} |
| 910 |
% \colorlet{X}{black!30}% |
| 911 |
%\end{verbatim} |
| 912 |
% \end{quote} |
| 913 |
% Different colours can be allocated to the ROYGBWX letters (using the |
| 914 |
% standard \LaTeX\ \cmd{\colorlet} command) as required. For~example, the |
| 915 |
% standard `red' colour could be allocated to the letter R using the command |
| 916 |
% \begin{quote} |
| 917 |
% \cmd{\colorlet\{R\}\{red\}} |
| 918 |
% \end{quote} |
| 919 |
% However, it is important to appreciate that the letter codes |
| 920 |
% ROYGBWX are `hardwired' into many of the macros in the \rubikcube\ package, |
| 921 |
% so don't change these. |
| 922 |
% |
| 923 |
% |
| 924 |
% |
| 925 |
% \subsection{Colour state of the cube} |
| 926 |
% \label{sec:colourstate} |
| 927 |
% |
| 928 |
% A given cubie facelet on a given face is denoted using an ordered sequence |
| 929 |
% of three letters, as follows: first the face code (U,D,L,R,F,B), |
| 930 |
% second the X-position of the column (l,m,r), |
| 931 |
% and third the Y-position of the row (t,m,b). |
| 932 |
% For example, the `right-bottom' facelet of the \textsc{front} face is denoted as |
| 933 |
% \texttt{Frb}, and consequently the curent colour-code (R,O,Y,G,B,W,X) of this facelet |
| 934 |
% is held as the variable \cmd{\Frb} etc.\ |
| 935 |
% (see Section~\ref{sec:rubikfacecode} for details and code). |
| 936 |
% |
| 937 |
% |
| 938 |
% Initially, when \LaTeX\ reads the file \texttt{rubikcube.sty} all facelets |
| 939 |
% are allocated the colour-code X, which can be regarded as a zero-colour state. |
| 940 |
% Until a facelet is allocated one of the six cube colours (using a suitable command) |
| 941 |
% it will be rendered as grey by a \cmd{\Draw...} command, since these commands |
| 942 |
% simply implement the current colour state of the cube (e.g.,~\cmd{\DrawRubikCubeRU}). |
| 943 |
% Facelets retain their colour allocation even if they are moved using |
| 944 |
% the \cmd{\RubikRotation} command (see \textsc{rubikrotation} package), unless they are |
| 945 |
% overwritten by a subsequent colour allocation command. |
| 946 |
% |
| 947 |
% \DescribeMacro{\RubikFace..} |
| 948 |
% \DescribeMacro{\RubikSlice..} |
| 949 |
% \DescribeMacro{\RubikCubeSolved..} |
| 950 |
% \DescribeMacro{\RubikCubeGrey..} |
| 951 |
% \DescribeMacro{\RubikCubeGreyAll} |
| 952 |
% Colours are allocated to facelets using using \cmd{\Rubik..} commands. |
| 953 |
% For example, the commands \cmd{\RubikCubeSolvedWY} and \cmd{\RubikCubeSolvedWB} |
| 954 |
% allocate prescribed colour states for the whole `solved' cube, and are |
| 955 |
% a very useful starting point (configuration) for subsequent rotations. |
| 956 |
% The commands \cmd{\RubikCubeGreyWY} and \cmd{\RubikCubeGreyAll} allocate different colour |
| 957 |
% states for the whole cube, and are designed to be useful starting points when illustrating |
| 958 |
% aspects of how to solve the cube. These two commands accept both `grey' and `gray' |
| 959 |
% (to be consistent with TikZ). |
| 960 |
% |
| 961 |
% Colours can also be allocated to subsets of facelets (eg faces, slices etc); |
| 962 |
% for example, using the |
| 963 |
% commands \cmd{\RubikFace...} and \cmd{\RubikSlice...} |
| 964 |
% commands (see Sections~\ref{sec:rubikfacecommands} and \ref{sec:slicecommands}). |
| 965 |
% |
| 966 |
% To visualise the current state of the cube one has to use a \cmd{\Draw...} command. |
| 967 |
% \cmd{\Draw..} commands never influence the internal colour state of the |
| 968 |
% cube.\footnote{That said, the now deprecated \cmd{\DrawRubikLayerFace...} |
| 969 |
% and \cmd{\DrawRubikLayerSice...} commands |
| 970 |
% (see Section~\ref{sec:deprecated}) did, confusingly, allow you to specify colours |
| 971 |
% as arguments, but they only `painted' colours onto facelet positions |
| 972 |
% (on the page, so to speak), and for this reason they are now deprecated, |
| 973 |
% and will be phased out in due course.} |
| 974 |
% |
| 975 |
% The current colour state / configuration of a cube can also be saved and |
| 976 |
% written to a named file, which can then be \cmd{\input} and processed later when required, |
| 977 |
% using the \cmd{\SaveRubikState} command (3x3x3 cube) |
| 978 |
% or \cmd{\SaveTwoState} command (2x2x2 cube). |
| 979 |
% |
| 980 |
% |
| 981 |
% |
| 982 |
% \subsection{RubikFace commands} |
| 983 |
% \label{sec:rubikfacecommands} |
| 984 |
% |
| 985 |
% \DescribeMacro{\RubikFaceUp} |
| 986 |
% \DescribeMacro{\RubikFaceDown} |
| 987 |
% \DescribeMacro{\RubikFaceLeft} |
| 988 |
% \DescribeMacro{\RubikFaceRight} |
| 989 |
% \DescribeMacro{\RubikFaceFront} |
| 990 |
% \DescribeMacro{\RubikFaceBack} |
| 991 |
% These commands allocate colours to the |
| 992 |
% individual cubies of a 3x3x3 cube face; they take nine colour arguments |
| 993 |
% (see Section~\ref{sec:rubikfacecode} for the code). |
| 994 |
% The ordering is isomorphic to the sequence 1--9, i.e.,~numbering the small |
| 995 |
% squares 1-3~(top row, left to right), 4-6~(middle row, left to right), |
| 996 |
% 7-9~(bottom row, left to right), as follows: |
| 997 |
% \begin{quote} |
| 998 |
% \fbox{ |
| 999 |
% \begin{minipage}{1.6cm} |
| 1000 |
% \#1 \#2 \#3 |
| 1001 |
% |
| 1002 |
% \#4 \#5 \#6 |
| 1003 |
% |
| 1004 |
% \#7 \#8 \#9 |
| 1005 |
% \end{minipage} |
| 1006 |
% } |
| 1007 |
% \end{quote} |
| 1008 |
% Conveniently, \LaTeX\ allows the colour arguments to be separated by spaces |
| 1009 |
% (e.g.,~in groups of three), or even spread across several |
| 1010 |
% lines (e.g.,~in a square block to resemble a 9-face). This is fortunate, as it |
| 1011 |
% allows the command to be written in several visually intuitive ways, as follows: |
| 1012 |
% |
| 1013 |
% \begin{quote} |
| 1014 |
% \begin{minipage}{8cm} |
| 1015 |
%\begin{verbatim} |
| 1016 |
% \RubikFaceUp{G}{B}{G} {G}{W}{O} {G}{O}{G} |
| 1017 |
% |
| 1018 |
% \RubikFaceFront{O}{W}{R} |
| 1019 |
% {W}{W}{W} |
| 1020 |
% {G}{W}{G} |
| 1021 |
% |
| 1022 |
%\end{verbatim} |
| 1023 |
% \end{minipage} |
| 1024 |
% \end{quote} |
| 1025 |
% Failure to include a valid colour argument will generate a |
| 1026 |
% `missing parameter' error, and no colour will be |
| 1027 |
% allocated (i.e.,~you will see a black-hole) when it is rendered. |
| 1028 |
% |
| 1029 |
% \DescribeMacro{\RubikFaceUpAll} |
| 1030 |
% \DescribeMacro{\RubikFaceDownAll} |
| 1031 |
% \DescribeMacro{\RubikFaceLeftAll} |
| 1032 |
% \DescribeMacro{\RubikFaceRightAll} |
| 1033 |
% \DescribeMacro{\RubikFaceFrontAll} |
| 1034 |
% \DescribeMacro{\RubikFaceBackAll} |
| 1035 |
% Each of the above commands has an associated |
| 1036 |
% `\texttt{All}' version which allocates the same colour to all the cubies |
| 1037 |
% on a 9-face (i.e.,~only a single colour argument is required). |
| 1038 |
% For example, if you want the \textsc{right} face to be all orange, then |
| 1039 |
% use the command \cmd{\RubikFaceRightAll\{O\}}. |
| 1040 |
% Use of these commands is shown in the following example. |
| 1041 |
% |
| 1042 |
% |
| 1043 |
% \bigskip |
| 1044 |
% |
| 1045 |
% \begin{minipage}{2.8cm} |
| 1046 |
% \RubikCubeGreyAll |
| 1047 |
% \RubikFaceRightAll{O} |
| 1048 |
% \RubikFaceFront{W}{Y}{G} |
| 1049 |
% {W}{Y}{G} |
| 1050 |
% {W}{Y}{G} |
| 1051 |
% \begin{tikzpicture}[scale=0.7] |
| 1052 |
% \DrawRubikCubeRU |
| 1053 |
% \end{tikzpicture}% |
| 1054 |
% \end{minipage} |
| 1055 |
% \hspace{5mm} |
| 1056 |
% \begin{minipage}{0.6\textwidth} |
| 1057 |
%\begin{verbatim} |
| 1058 |
% \RubikCubeGreyAll |
| 1059 |
% \RubikFaceRightAll{O} |
| 1060 |
% \RubikFaceFront{W}{Y}{G} |
| 1061 |
% {W}{Y}{G} |
| 1062 |
% {W}{Y}{G} |
| 1063 |
% \ShowCube{3cm}{0.7}{\DrawRubikCubeRU} |
| 1064 |
% \end{verbatim} |
| 1065 |
% \end{minipage} |
| 1066 |
% |
| 1067 |
% \bigskip |
| 1068 |
% |
| 1069 |
% |
| 1070 |
% Note that instead of using \cmd{\RubikCubeGreyAll} we could have used the |
| 1071 |
% command \verb!\RubikFaceUpAll{X}! to allocate grey to the whole of the |
| 1072 |
% \textsc{up} face. However, the \cmd{\RubikCubeGreyAll} command can be a useful |
| 1073 |
% starting point when dealing with a new cube, |
| 1074 |
% since it resets all the faces to their initial default colour. |
| 1075 |
% |
| 1076 |
% Finally, it is important to bear in mind that when allocating colours using |
| 1077 |
% the \cmd{\RubikFace..} commands it is very |
| 1078 |
% easy to inadvertently create a non-valid cube (ie a cube with either the wrong number |
| 1079 |
% of facelets with particular colours, or one which has a non-sovable configuration). |
| 1080 |
% However, some basic error checking of this sort is done whenever the |
| 1081 |
% \cmd{\RubikRotation} command is used |
| 1082 |
% (see the \textsc{rubikrotation} package documentation). |
| 1083 |
|
| 1084 |
% |
| 1085 |
% |
| 1086 |
% \subsection{RubikSolvedConfig command} |
| 1087 |
% \label{sec:rubiksolvedconfig} |
| 1088 |
% |
| 1089 |
% \DescribeMacro{\RubikSolvedConfig} |
| 1090 |
% This command allocates the six face colours according to the following ordered |
| 1091 |
% XYZ$+-$ argument rule, namely X$+$, X$-$, Y$+$, Y$-$, Z$+$, Z$-$; i.e.,~the order |
| 1092 |
% of the six colour arguments follows the face order |
| 1093 |
% \textsc{right, left, up, down, front, back} (for notation see |
| 1094 |
% Section~\ref{sec:xyzarguments} and Figure~\ref{fig:notation}). |
| 1095 |
% {\newline}\textsc{usage}:\ \verb!\RubikSolvedConfig{G}{B}{W}{Y}{O}{R}! |
| 1096 |
% {\newline}Examples of its use are shown in the next section. |
| 1097 |
% |
| 1098 |
% |
| 1099 |
% |
| 1100 |
% |
| 1101 |
% \subsection{RubikCubeSolved commands} |
| 1102 |
% \label{sec:rubikcubesolved} |
| 1103 |
% |
| 1104 |
% \DescribeMacro{\RubikCubeSolved} |
| 1105 |
% \DescribeMacro{\RubikCubeSolvedWY} |
| 1106 |
% The action of both of these commands is identical: |
| 1107 |
% they both set all the face colours to the following standard `solved' cube |
| 1108 |
% configuration, namely Up=white, Down=yellow, Right=green, Left=blue, Front=orange, Back=red, |
| 1109 |
% by invoking the above \cmd{\RubikSolvedConfig} command, as follows: |
| 1110 |
%\begin{verbatim} |
| 1111 |
%\newcommand{\RubikCubeSolved}{\RubikSolvedConfig{G}{B}{W}{Y}{O}{R}} |
| 1112 |
%\end{verbatim} |
| 1113 |
% Note that this is in fact just a convenient short-hand for the following: |
| 1114 |
%\begin{verbatim} |
| 1115 |
%\newcommand{\RubikCubeSolved}{% |
| 1116 |
% \RubikFaceRightAll{G}% |
| 1117 |
% \RubikFaceLeftAll{B}% |
| 1118 |
% \RubikFaceUpAll{W}% |
| 1119 |
% \RubikFaceDownAll{Y}% |
| 1120 |
% \RubikFaceFrontAll{O}% |
| 1121 |
% \RubikFaceBackAll{R}% |
| 1122 |
%} |
| 1123 |
%\end{verbatim} |
| 1124 |
% Note that for convenience, this configuration is also available using the command |
| 1125 |
% \verb!\RubikCubeSolvedWY! (WY denoting White opposite Yellow). |
| 1126 |
% This solved configuration is shown in the following |
| 1127 |
% semi-flat (SF) image. |
| 1128 |
% |
| 1129 |
% |
| 1130 |
% \bigskip |
| 1131 |
% |
| 1132 |
% \begin{minipage}{5cm} |
| 1133 |
% \centering |
| 1134 |
% \begin{tikzpicture}[scale=0.5] |
| 1135 |
% \RubikCubeSolvedWY |
| 1136 |
% \DrawRubikCubeSF |
| 1137 |
% \end{tikzpicture}% |
| 1138 |
% \end{minipage} |
| 1139 |
% \begin{minipage}{0.5\textwidth} |
| 1140 |
%\begin{verbatim} |
| 1141 |
% \RubikCubeSolvedWY |
| 1142 |
% \ShowCube{5cm}{0.5}{\DrawRubikCubeSF} |
| 1143 |
%\end{verbatim} |
| 1144 |
% \end{minipage} |
| 1145 |
% |
| 1146 |
% \bigskip |
| 1147 |
% |
| 1148 |
% Note that the width of the minipage used in the \cmd{\ShowCube} command above |
| 1149 |
% is set to 5cm. This value is derived from the fact |
| 1150 |
% that the \textit{unscaled} width of the semi-flat image is 10cm (9 + 1 squares), and hence if |
| 1151 |
% the TikZ scale factor is set to 0.5 (as in the above example) then the minimum minipage |
| 1152 |
% width = $10 \times 0.5 = 5$cm (see Section~\ref{sec:coordinates} for details). |
| 1153 |
% |
| 1154 |
% |
| 1155 |
% \textbf{Other orientations:} If other orientations of the solved cube are required, |
| 1156 |
% this can be easily achieved using the \cmd{\RubikRotation} command |
| 1157 |
% (from the \texttt{RubikRotation} package) to rotate the cube as required. |
| 1158 |
% For~example, we could make a command to show the above solved cube upside-down |
| 1159 |
% and rotated slightly, as follows: |
| 1160 |
%\begin{verbatim} |
| 1161 |
%\newcommand{\CubeUpSideDown}{\RubikCubeSolved\RubikRotation{x2,y}} |
| 1162 |
%\end{verbatim} |
| 1163 |
% ---this uses the rotations \rrx, \rrx, to invert, and then \rry\ to turn |
| 1164 |
% the cube 90~$\deg$: |
| 1165 |
% |
| 1166 |
% \bigskip |
| 1167 |
% |
| 1168 |
% \begin{minipage}{2.6cm} |
| 1169 |
% \centering |
| 1170 |
% \begin{tikzpicture}[scale=0.5] |
| 1171 |
% \DrawNCubeAll{3}{O}{Y}{G} |
| 1172 |
% \end{tikzpicture}% |
| 1173 |
% \end{minipage} |
| 1174 |
% \hspace{5mm} |
| 1175 |
% \begin{minipage}{0.6\textwidth} |
| 1176 |
%\begin{verbatim} |
| 1177 |
% \CubeUpSideDown |
| 1178 |
% \ShowCube{2cm}{0.5}\DrawRubikCubeRU} |
| 1179 |
%\end{verbatim} |
| 1180 |
% \end{minipage} |
| 1181 |
% |
| 1182 |
% \bigskip |
| 1183 |
% |
| 1184 |
%% \DescribeMacro{\RubikCubeSolvedWB} |
| 1185 |
% \textbf{Other configurations:} While the `solved' WY colour configuration |
| 1186 |
% described above (White face opposite Yellow) |
| 1187 |
% is that of the most commonly occurring Rubik cube, another `solved' colour configuration |
| 1188 |
% which is also commercially available has the White opposite Blue configuration, which |
| 1189 |
% is available using the command \verb!\RubikCubeSolvedWB!. |
| 1190 |
% Its colour configuration is as follows: |
| 1191 |
% |
| 1192 |
%\begin{center} |
| 1193 |
% \RubikCubeSolvedWB |
| 1194 |
% \ShowCube{4cm}{0.4}{\DrawRubikCubeSF}% |
| 1195 |
%\end{center} |
| 1196 |
% |
| 1197 |
% \bigskip |
| 1198 |
% |
| 1199 |
% Note that users can easily create their own alternative `solved' |
| 1200 |
% face/colour versions. |
| 1201 |
% For~example, the above mentioned white opposite |
| 1202 |
% blue~(WB) solved configuration command \verb!\RubikCubeSolvedWB! |
| 1203 |
% (white opposite blue, red opposite orange, |
| 1204 |
% and green opposite yellow), was created using \verb!\RubikSolvedConfig{R}{O}{W}{B}{G}{Y}! |
| 1205 |
% (for the code see \ref{sec:codesolvedconfig}). |
| 1206 |
% |
| 1207 |
% |
| 1208 |
% |
| 1209 |
% |
| 1210 |
% \subsection{RubikCubeGrey.. commands} |
| 1211 |
% \label{sec:rubikcubegrey} |
| 1212 |
% |
| 1213 |
% \DescribeMacro{\RubikCubeGreyWY} |
| 1214 |
% \DescribeMacro{\RubikCubeGreyWB} |
| 1215 |
% \DescribeMacro{\RubikCubeGreyAll} |
| 1216 |
% The command \cmd{\RubikCubeGreyWY} generates a 3x3x3 cube with no colours allocated |
| 1217 |
% \textit{except} for the central cubie of each face, which takes the same colour |
| 1218 |
% configuration as defined for the \cmd{\RubikCubeSolvedWY} command. |
| 1219 |
% The command \cmd{\RubikCubeGreyAll} generates a cube with \textit{all} the faces |
| 1220 |
% completely grey; this is useful as it can be used to reset all the facelets to |
| 1221 |
% the initial default state. |
| 1222 |
% These commands will accept either `grey' or `gray' (to be consistent with TikZ). |
| 1223 |
% |
| 1224 |
% These commands, are designed to be useful starting points when wanting to |
| 1225 |
% describe the movement of particular cubies. We can see the effect of |
| 1226 |
% the \cmd{\RubikCubeGreyWY} command by viewing the cube in a semi-flat (SF) format, |
| 1227 |
% as follows: |
| 1228 |
% |
| 1229 |
% \bigskip |
| 1230 |
% |
| 1231 |
% \RubikCubeGreyWY |
| 1232 |
% \ShowCube{4.5cm}{0.45}{\DrawRubikCubeSF} |
| 1233 |
% \hspace{3mm} |
| 1234 |
% \begin{minipage}{0.6\textwidth} |
| 1235 |
%\begin{verbatim} |
| 1236 |
% \RubikCubeGreyWY |
| 1237 |
% \ShowCube{4.5cm}{0.45}{\DrawRubikCubeSF} |
| 1238 |
%\end{verbatim} |
| 1239 |
% \end{minipage} |
| 1240 |
% |
| 1241 |
% \bigskip |
| 1242 |
% Users can of course set up their own alternative face/colour configuration |
| 1243 |
% by creating a new `variant' command altogether. |
| 1244 |
% |
| 1245 |
% |
| 1246 |
% |
| 1247 |
% \subsection{RubikSlice commands} |
| 1248 |
% \label{sec:slicecommands} |
| 1249 |
% |
| 1250 |
% \DescribeMacro{\RubikSliceTopX} |
| 1251 |
% \DescribeMacro{\RubikSliceMiddleX} |
| 1252 |
% \DescribeMacro{\RubikSliceBottomX} |
| 1253 |
% These three commands allocate the six visible cubie colours associated with a |
| 1254 |
% \textit{horizontal} slice of a Rubik cube. |
| 1255 |
% There are three pairs of Slice commands; one pair |
| 1256 |
% (Left view \& Right view) for each of the horizontal slices Top, Middle, Bottom. |
| 1257 |
% The six colour arguments associated with a given slice run in sequence |
| 1258 |
% from left to right irrespective of the viewpoint, e.g.,~\#1 \#2 \#3 \#4 \#5 \#6. |
| 1259 |
% |
| 1260 |
% Since the viewpoint of the Rubik cube (from the Right or from the Left) |
| 1261 |
% influences which face the colours are associated with, it is necessary |
| 1262 |
% to have the view (R or L) specified in the command name. |
| 1263 |
% |
| 1264 |
% The format of the `slice' command is shown in the following example. |
| 1265 |
% The Rubik cube is shown from the LeftDown (LD) view |
| 1266 |
% and consequently each of the `slice' commands in this |
| 1267 |
% particular example ends in L, consistent with |
| 1268 |
% the final \cmd{\DrawRubikCubeLD} command. |
| 1269 |
% |
| 1270 |
% Note that the two legacy `Equator' versions (now replaced by `Middle') |
| 1271 |
% are retained to allow backward compatibility. |
| 1272 |
% |
| 1273 |
% \bigskip |
| 1274 |
% |
| 1275 |
% \begin{minipage}{2.8cm} |
| 1276 |
% \centering |
| 1277 |
% \RubikFaceDownAll{Y} |
| 1278 |
% \RubikSliceTopL {G}{G}{G} {R}{R}{R} |
| 1279 |
% \RubikSliceMiddleL {R}{R}{R} {B}{B}{B} |
| 1280 |
% \RubikSliceBottomL {O}{O}{O} {G}{G}{G} |
| 1281 |
% \begin{tikzpicture}[scale=0.7] |
| 1282 |
% \DrawRubikCubeLD |
| 1283 |
% \end{tikzpicture}% |
| 1284 |
% \end{minipage} |
| 1285 |
% \hspace{5mm} |
| 1286 |
% \begin{minipage}{0.6\textwidth} |
| 1287 |
%\begin{verbatim} |
| 1288 |
% \RubikFaceDownAll{Y} |
| 1289 |
% \RubikSliceTopL {G}{G}{G} {R}{R}{R} |
| 1290 |
% \RubikSliceMiddleL {R}{R}{R} {B}{B}{B} |
| 1291 |
% \RubikSliceBottomL {O}{O}{O} {G}{G}{G} |
| 1292 |
% \ShowCube{3cm}{0.7}{\DrawRubikCubeLD} |
| 1293 |
%\end{verbatim} |
| 1294 |
% \end{minipage} |
| 1295 |
% |
| 1296 |
% |
| 1297 |
% |
| 1298 |
% |
| 1299 |
% |
| 1300 |
% \section{Rotation commands} |
| 1301 |
% \label{sec:RubikCommands} |
| 1302 |
% |
| 1303 |
% The Rubik bundle implements not only the standard Rubik cube notation of the |
| 1304 |
% World Cube Association (see WCA website), but also the main variant notations |
| 1305 |
% used by the Rubik interest groups and websites. |
| 1306 |
% |
| 1307 |
% \begin{figure}[hbt] |
| 1308 |
% \centering |
| 1309 |
% \ifpdf |
| 1310 |
% \includegraphics[height=5cm]{rubik-doc-figA.pdf} |
| 1311 |
% \fi |
| 1312 |
% \caption{\label{fig:notation}Face rotations} |
| 1313 |
% \end{figure} |
| 1314 |
% |
| 1315 |
% To avoid confusion the Rubik bundle uses a trailing `p' (lower case) in rotation-codes to denote |
| 1316 |
% a `prime' (reversed direction); we also recommend that commas are used to separate |
| 1317 |
% sequential Rubik rotations (moves). |
| 1318 |
% While these are mainly to avoid ambiguity, they also greatly facilitate computer |
| 1319 |
% searching and copy-and-pasting of rotation sequences. |
| 1320 |
% |
| 1321 |
% Unfortunately, obtaining a good balance between an intuitive notation for defining |
| 1322 |
% rotations and the need for flexibility is difficult, |
| 1323 |
% and consequently some notation is more intuitive than others. A good compromise |
| 1324 |
% seems to be the World Cube Association's FADN structure; i.e.,~Face (L,R,U,D,F,B), |
| 1325 |
% Action (m,w,s,a,c), Direction (p), |
| 1326 |
% N (n); for~example, codes like \texttt{R, R2, Rc, Rm, Rwp, Rwp2} etc. |
| 1327 |
% |
| 1328 |
% |
| 1329 |
% The \rubikcube\ package includes commands for typesetting a wide range of |
| 1330 |
% rotation-codes (e.g.,~\rr{R}, \rr{y}, \rr{Bw}) and |
| 1331 |
% equivalent hieroglyphs (e.g.,~\rrh{R}, \rrh{y}, \rrh{Bw}), as well as commands |
| 1332 |
% for typesetting 3x3x3 cubes\,\footnote{See the \textsc{rubiktwocube} package documentation |
| 1333 |
% for 2x2x2 cube commands.} and single cubies. All the rotation-codes and |
| 1334 |
% hieroglyphs are typeset using one particular font \& size which we call the `rubikfont' |
| 1335 |
% for convenience (see Section~\ref{sec:rubikfont} for details). |
| 1336 |
% All of the rotation-codes described |
| 1337 |
% here are recognised by the \textsc{rubikrotation} package |
| 1338 |
% (see Section~\ref{sec:rubikrotation}). |
| 1339 |
% |
| 1340 |
% Note that there are some rotation codes which are not represented by arrow |
| 1341 |
% hieroglyphs, since their rotation is not visible from the \textsc{front} face, |
| 1342 |
% and hence cannot easily be rendered as an arrow hieroglyph. Consequently these |
| 1343 |
% rotations have a simple `letter' hieroglyph |
| 1344 |
% in the form of the rotation-code in a square; for~example, \rrhBw, \rrhFm. |
| 1345 |
% |
| 1346 |
% |
| 1347 |
% |
| 1348 |
% \subsection{Typesetting} |
| 1349 |
% \label{sec:typesetting} |
| 1350 |
% |
| 1351 |
% We now describe the four commands used for typesetting the various rotation-codes. |
| 1352 |
% |
| 1353 |
% \DescribeMacro{\rr} |
| 1354 |
% The text version of a rotation-code is typeset using the rubik-rotation |
| 1355 |
% command \cmd{\rr\marg{rotation-code}}, i.e.,~\rr{R}\ is typeset using the command \cmd{\rr\{R\}}. |
| 1356 |
% The hieroglyph of a rotation is generated (in text) by \DescribeMacro{\rrh} |
| 1357 |
% using instead the command \cmd{\rrh\marg{rotation-code}}. For~example, the command |
| 1358 |
% \cmd{\rrh\{R\}} generates \rrh{R}\ which is the hieroglyph associated with |
| 1359 |
% the rotation \rr{R}. |
| 1360 |
% |
| 1361 |
% \DescribeMacro{\Rubik} |
| 1362 |
% A vertically combined rotation-code and its hieroglyph is generated using the command |
| 1363 |
% \cmd{\Rubik\marg{rotation-code}}. For~example, \Rubik{R}\ is generated by the command \cmd{\Rubik\{R\}}, |
| 1364 |
% with the square hieroglyph sitting on the baseline. |
| 1365 |
% For some hieroglyphs (e.g.,~\rrh{x}, \rrh{y}, \rrh{z}\ denoting 90~degree cube-axis rotations) |
| 1366 |
% the only difference between the \cmd{\rrh\{\}} and \cmd{\Rubik\{\}} form is that |
| 1367 |
% the \cmd{\Rubik\{\}} form is elevated to sit on the baseline just like the other |
| 1368 |
% \cmd{\Rubik\{\}} hieroglyphs. |
| 1369 |
% For~example, \cmd{\rrh\{yp\}} generates \rrh{yp}, while |
| 1370 |
% \cmd{\Rubik\{yp\}} generates \Rubik{yp}. |
| 1371 |
% |
| 1372 |
% \DescribeMacro{\textRubik} |
| 1373 |
% A horizontally combined rotation-code and its hieroglyph (in sequence as in text) |
| 1374 |
% is generated using the command \cmd{\textRubik\marg{rotation-code}}. |
| 1375 |
% For~example, \textRubik{R}\ is typeset using the command \cmd{\textRubik\{R\}}. |
| 1376 |
% A list of all rotation-code commands and their associated hieroglyphs is given in |
| 1377 |
% Section~\ref{sec:listofcommands}. |
| 1378 |
% |
| 1379 |
% |
| 1380 |
% |
| 1381 |
% \subsection{Face rotations} |
| 1382 |
% |
| 1383 |
% \DescribeMacro{U} |
| 1384 |
% \DescribeMacro{D} |
| 1385 |
% \DescribeMacro{L} |
| 1386 |
% \DescribeMacro{R} |
| 1387 |
% \DescribeMacro{F} |
| 1388 |
% \DescribeMacro{B} |
| 1389 |
% The six main faces of the cube are denoted as \textsc{front} (towards the observer), |
| 1390 |
% \textsc{back}, \textsc{left}, \textsc{right}, \textsc{up}, \textsc{down}. |
| 1391 |
% The upper-case initial letter of each face-name (\rr{F}, \rr{B}, \rr{L}, \rr{R}, \rr{U}, \rr{D}) |
| 1392 |
% denotes a clockwise 90-degree rotation of the face as shown in |
| 1393 |
% Figure~\ref{fig:notation}. |
| 1394 |
% For~example, \rr{D}\ is generated by the `rubik rotation' command \cmd{\rr\{D\}}. |
| 1395 |
% |
| 1396 |
% \DescribeMacro{Up} |
| 1397 |
% \DescribeMacro{Dp} |
| 1398 |
% \DescribeMacro{Lp} |
| 1399 |
% \DescribeMacro{Rp} |
| 1400 |
% \DescribeMacro{Fp} |
| 1401 |
% \DescribeMacro{Bp} |
| 1402 |
% An appended prime~$^\prime$ indicates an anticlockwise rotation; e.g.,~\rr{Fp}. |
| 1403 |
% This is sometimes written as \rr{F}$\boldmath{^{-1}}$. The `prime' notation is |
| 1404 |
% achieved by appending a lower-case `p' to the face rotation command. For~example, \rr{Rp}\ |
| 1405 |
% is generated by \cmd{\rr\{Rp\}}. More formally, \rr{Rp} is the `inverse' of \rr{R}. |
| 1406 |
% |
| 1407 |
% The superscript~$^2$, or sometimes just an ordinary~2, indicates that the rotation |
| 1408 |
% is applied twice. For~example, \rr{R}\textbf{$^2$} or \rr{R}\textbf{2} |
| 1409 |
% denote \textit{two} successive 90~degree clockwise rotations of the \textsc{right} face; |
| 1410 |
% \rr{R}\textbf{$^3$} is equivalent to \rr{Rp} etc. |
| 1411 |
% |
| 1412 |
% |
| 1413 |
% \subsection{Inner-slice rotations} |
| 1414 |
% \label{sec:slicerotations} |
| 1415 |
% |
| 1416 |
% The Rubik cube (3x3x3) has three orthogonal so-called |
| 1417 |
% `inner' slices (middle layers, middle slices), whose +ve |
| 1418 |
% rotation direction follows that of a named face. For~example, the inner-slice |
| 1419 |
% rotation between the \textsc{right} and \textsc{left} faces whose rotation |
| 1420 |
% direction follows the rotation \rr{R}\ (i.e.,~its rotation is isomorphic to \rr{R}). |
| 1421 |
% The inner-slice rotations form a group (the Slice group), originally |
| 1422 |
% described by John Conway (Frey and Singmaster, 1982, p~105). |
| 1423 |
% |
| 1424 |
% |
| 1425 |
% \subsubsection*{The `m' notation} |
| 1426 |
% \label{sec:mnotation} |
| 1427 |
% |
| 1428 |
% \DescribeMacro{Um} |
| 1429 |
% \DescribeMacro{Dm} |
| 1430 |
% \DescribeMacro{Lm} |
| 1431 |
% \DescribeMacro{Rm} |
| 1432 |
% \DescribeMacro{Fm} |
| 1433 |
% \DescribeMacro{Bm} |
| 1434 |
% Here `m' stands for the `middle' slice, namely that parallel to the designated |
| 1435 |
% \textsc{face}; its rotation mirrors that of the |
| 1436 |
% \textsc{face}. The \texttt{m} must be in lower case. |
| 1437 |
% Each of these rotation-codes has a complementary `prime' version, formed |
| 1438 |
% by appending a `p'; for~example, \rr{Rm} (\verb!\rr{Rm}!) is a middle layer rotation |
| 1439 |
% \rrh{Rm} between the \textsc{right} and \textsc{left} faces, and is in the same |
| 1440 |
% direction as \rr{R}. The code \rr{Rmp} (\verb!\rr{Rmp}!) refers to the same |
| 1441 |
% middle slice, but rotated in the opposite direction \rrh{Rmp}. |
| 1442 |
% |
| 1443 |
% This notation, which was probably invented by Singmaster, was originally used on the |
| 1444 |
% Cube Lovers usenet group (1981--1997). It is now much used on the |
| 1445 |
% Jaap Puzzles website (see Scherphius J) ---see also Section~\ref{sec:codeJaap}. |
| 1446 |
% |
| 1447 |
% |
| 1448 |
% \subsubsection*{The `M' notation} |
| 1449 |
% \label{sec:Mnotation} |
| 1450 |
% |
| 1451 |
% \DescribeMacro{MU} |
| 1452 |
% \DescribeMacro{MD} |
| 1453 |
% \DescribeMacro{ML} |
| 1454 |
% \DescribeMacro{MR} |
| 1455 |
% \DescribeMacro{MF} |
| 1456 |
% \DescribeMacro{MB} |
| 1457 |
% This variant of the above `middle' slice notation (e.g.,~\texttt{MR} $\equiv$ \texttt{Rm}) |
| 1458 |
% is part of the `superset' notation of Randelshofer. As before, the rotation |
| 1459 |
% direction follows that of the designated \textsc{face}. |
| 1460 |
% Each has a complementary `prime' version |
| 1461 |
% formed by appending a `p'. The \texttt{M} must be in upper case. |
| 1462 |
% |
| 1463 |
% |
| 1464 |
% \bigskip\bigskip |
| 1465 |
% |
| 1466 |
% \subsubsection*{The MES notation} |
| 1467 |
% |
| 1468 |
% \DescribeMacro{M} |
| 1469 |
% \DescribeMacro{E} |
| 1470 |
% \DescribeMacro{S} |
| 1471 |
% \DescribeMacro{Mp} |
| 1472 |
% \DescribeMacro{Ep} |
| 1473 |
% \DescribeMacro{Sp} |
| 1474 |
% An alternative but very confusing |
| 1475 |
% inner-slice notation (e.g.,~\texttt{Ep} $\equiv$ \texttt{Um}) which is occasionally used |
| 1476 |
% is the so-called MES notation as used in the Waterman algorithm |
| 1477 |
% (Treep and Waterman 1987), and the Roux method (Giles Roux). |
| 1478 |
% \begin{itemize} |
| 1479 |
% \item[\rr{M}] \ (\textsc{middle} \rrh{M}, between the \textsc{left} |
| 1480 |
% and \textsc{right} faces; direction follows \rr{L}), |
| 1481 |
% \item[\rr{E}] \ (\textsc{equator} \rrh{E}, between the \textsc{up} and \textsc{down} |
| 1482 |
% faces; direction follows \rr{D}), |
| 1483 |
% \item[\rr{S}] \ (\textsc{standing} \rrh{S}, between the \textsc{front} and |
| 1484 |
% \textsc{back} faces; direction follows \rr{F}). |
| 1485 |
% \end{itemize} |
| 1486 |
% Each of these also has an inverse (prime) version. |
| 1487 |
% |
| 1488 |
% |
| 1489 |
% \subsubsection*{The `S' notation} |
| 1490 |
% |
| 1491 |
% \DescribeMacro{Su} |
| 1492 |
% \DescribeMacro{Sd} |
| 1493 |
% \DescribeMacro{Sl} |
| 1494 |
% \DescribeMacro{Sr} |
| 1495 |
% \DescribeMacro{Sf} |
| 1496 |
% \DescribeMacro{Sb} |
| 1497 |
% In this equally confusing inner-slice notation, `S' stands for `inner-slice'; |
| 1498 |
% the face letter must be in lower case (e.g.,~\texttt{Sr} $\equiv$ \texttt{Rm}). |
| 1499 |
% For~example, the inner-slice |
| 1500 |
% rotation between the \textsc{right} and \textsc{left} faces whose rotation |
| 1501 |
% direction follows the rotation \rr{R}\ is denoted |
| 1502 |
% as \rr{Sr}, which is typeset using the command \cmd{\rr\{Sr\}}. |
| 1503 |
% Each has an inverse (prime) p-form. |
| 1504 |
% |
| 1505 |
% |
| 1506 |
% \subsection{Outer-slice rotations} |
| 1507 |
% |
| 1508 |
% \subsubsection*{The `s' (slice) notation} |
| 1509 |
% |
| 1510 |
% \DescribeMacro{Us} |
| 1511 |
% \DescribeMacro{Ds} |
| 1512 |
% \DescribeMacro{Ls} |
| 1513 |
% \DescribeMacro{Rs} |
| 1514 |
% \DescribeMacro{Fs} |
| 1515 |
% \DescribeMacro{Bs} |
| 1516 |
% This is a `paired' form of |
| 1517 |
% notation (two rotations at once), which can be thought of as complementing the |
| 1518 |
% inner-slice (middle layer) rotations. |
| 1519 |
% Each of these `slice' commands denotes a rotation of two opposite faces |
| 1520 |
% in the \textit{same} direction. |
| 1521 |
% {\linebreak}For~example, \textRubik{Us}\ $\equiv$ \textRubik{U}\ + \textRubik{Dp}; |
| 1522 |
% i.e.,~both face-rotations are in the \textit{same} direction |
| 1523 |
% as \rr{U}. Each of these rotation-codes has a complementary `anti-slice' version (see below). |
| 1524 |
% |
| 1525 |
% This notation was originally described by |
| 1526 |
% Singmaster (Frey and Singmaster, 1982), and is much used |
| 1527 |
% on the `Pretty patterns' page of the Fridrich website (this |
| 1528 |
% page also has a useful link to `notation'). |
| 1529 |
% |
| 1530 |
% |
| 1531 |
% \bigskip |
| 1532 |
% |
| 1533 |
% \DescribeMacro{SU} |
| 1534 |
% \DescribeMacro{SD} |
| 1535 |
% \DescribeMacro{SL} |
| 1536 |
% \DescribeMacro{SR} |
| 1537 |
% \DescribeMacro{SF} |
| 1538 |
% \DescribeMacro{SB} |
| 1539 |
% This variant of the above `slice' notation (e.g.,~\texttt{SU} $\equiv$ \texttt{Us}) |
| 1540 |
% is part of the `superset' notation of Randelshofer. As before, the rotation |
| 1541 |
% direction follows that of the designated |
| 1542 |
% \textsc{face}. Each has a complementary `prime' version formed by appending a `p'. |
| 1543 |
% |
| 1544 |
% |
| 1545 |
% \bigskip\bigskip |
| 1546 |
% |
| 1547 |
|
| 1548 |
% |
| 1549 |
% \subsubsection*{The `a' (anti-slice) notation} |
| 1550 |
% |
| 1551 |
% \DescribeMacro{Ua} |
| 1552 |
% \DescribeMacro{Da} |
| 1553 |
% \DescribeMacro{La} |
| 1554 |
% \DescribeMacro{Ra} |
| 1555 |
% \DescribeMacro{Fa} |
| 1556 |
% \DescribeMacro{Ba} |
| 1557 |
% Each of these commands denotes a rotation of two opposite faces |
| 1558 |
% in \textit{opposite} directions. |
| 1559 |
% For~example, \textRubik{Ua}\ $\equiv$ \textRubik{U}\ + \textRubik{D}. |
| 1560 |
% This notation is much used on the `Pretty patterns' page of the |
| 1561 |
% Fridrich website (see the note above re: `slice notation'). |
| 1562 |
% |
| 1563 |
% \bigskip\bigskip |
| 1564 |
% |
| 1565 |
% |
| 1566 |
% \subsection{Wide rotations} |
| 1567 |
% |
| 1568 |
% \subsubsection*{The `w' notation} |
| 1569 |
% \label{sec:wnotation} |
| 1570 |
% |
| 1571 |
% \DescribeMacro{Uw} |
| 1572 |
% \DescribeMacro{Dw} |
| 1573 |
% \DescribeMacro{Lw} |
| 1574 |
% \DescribeMacro{Rw} |
| 1575 |
% \DescribeMacro{Fw} |
| 1576 |
% \DescribeMacro{Bw} |
| 1577 |
% The clockwise \textit{combined} rotation of an outer face AND its adjacent inner-slice |
| 1578 |
% (officially known as a `double block', or `double outer slice' move) |
| 1579 |
% is denoted by appending a lower-case \textbf{\textsf{\footnotesize{w}}} |
| 1580 |
% (denoting `wide') to a rotation-code (endorsed by the WCA). |
| 1581 |
% For~example, a \textsc{right} double outer slice rotation \rrh{Rw} (\verb!\rrh{Rw}!) |
| 1582 |
% is denoted as \rr{Rw} (\verb!\rr{Rw}!). The `prime' version is formed by |
| 1583 |
% appending a `p' to the rotation-code. For~example, \rr{Rwp}\ is generated by \verb!\rr{Rwp}!. |
| 1584 |
% |
| 1585 |
% |
| 1586 |
% \bigskip |
| 1587 |
% |
| 1588 |
% \subsubsection*{The `T' notation} |
| 1589 |
% \label{sec:Tnotation} |
| 1590 |
% |
| 1591 |
% \DescribeMacro{TU} |
| 1592 |
% \DescribeMacro{TD} |
| 1593 |
% \DescribeMacro{TL} |
| 1594 |
% \DescribeMacro{TR} |
| 1595 |
% \DescribeMacro{TF} |
| 1596 |
% \DescribeMacro{TB} |
| 1597 |
% This confusing variant of the above `w' notation (e.g.,~\texttt{TR} $\equiv$ \texttt{Rw}) is part of |
| 1598 |
% the `superset' notation of Randelshofer. As before, the rotation direction |
| 1599 |
% follows that of the designated \textsc{face}. Each has a complementary `prime' version |
| 1600 |
% formed by appending a `p'. |
| 1601 |
% |
| 1602 |
% \bigskip\bigskip |
| 1603 |
% |
| 1604 |
% |
| 1605 |
% \subsection{Axis rotations} |
| 1606 |
% |
| 1607 |
% \subsubsection*{The x, y, z notation} |
| 1608 |
% \label{sec:xyznotation} |
| 1609 |
% |
| 1610 |
% \DescribeMacro{x} |
| 1611 |
% \DescribeMacro{y} |
| 1612 |
% \DescribeMacro{z} |
| 1613 |
% Whole-cube clockwise rotations of 90-degrees about about the orthogonal axes centred |
| 1614 |
% on the \textsc{right}, \textsc{up}, \textsc{front} faces are denoted |
| 1615 |
% as \rr{x}, \rr{y}, \rr{z}\ (the \cmd{\rr\{\}} forms) respectively (see Figure~\ref{fig:notation}), |
| 1616 |
% with their hieroglyphs (the \cmd{\rrh\{\}} forms) being denoted |
| 1617 |
% as \rrh{x}, \rrh{y}, \rrh{z}\ in order to distinguish them from square layer-rotation |
| 1618 |
% hieroglyphs. |
| 1619 |
% Note that since \rr{x}, \rr{y}, \rr{z}\ rotations are always expressed in lower case; |
| 1620 |
% this practice is also extended to the commands. |
| 1621 |
% |
| 1622 |
% For~example, an \rr{x}\textbf{2} rotation (two \rr{x}\ rotations one after |
| 1623 |
% the other, i.e.,~\rrh{x}\ \rrh{x}) denotes rotating |
| 1624 |
% the cube 180~degrees about its x axis so as to bring the \textsc{down} face |
| 1625 |
% into the \textsc{up} position. |
| 1626 |
% |
| 1627 |
% An appended prime~$^\prime$ indicates an anticlockwise rotation; |
| 1628 |
% for~example, \rr{xp}\ (which is generated by appending a `p' to the |
| 1629 |
% rotation-code, i.e.,~\cmd{\rr\{xp\}}). |
| 1630 |
% |
| 1631 |
% The \cmd{\Rubik\{\}} forms (and their prime `p' versions) generate the same |
| 1632 |
% hieroglyphs as their \cmd{\rrh\{\}} versions, except that their spacing is |
| 1633 |
% similar to that associated with the `square box' \cmd{\Rubik\{\}} hieroglyphs. |
| 1634 |
% Consequently when typesetting an axis command in a sequence of `square-box' |
| 1635 |
% \cmd{\Rubik\{\}} commands, it is better to use the \cmd{\Rubik\{\}} form rather than |
| 1636 |
% the equivalent \cmd{\rrh\{\}} form (see the examples in Section~\ref{sec:examples}). |
| 1637 |
% There are no \cmd{\textRubik\{\}} forms for the axis commands (since they are |
| 1638 |
% not necessary). |
| 1639 |
% |
| 1640 |
% |
| 1641 |
% \subsubsection*{The u, d, l, r, f, b notation} |
| 1642 |
% |
| 1643 |
% |
| 1644 |
% \DescribeMacro{u} |
| 1645 |
% \DescribeMacro{d} |
| 1646 |
% \DescribeMacro{l} |
| 1647 |
% \DescribeMacro{r} |
| 1648 |
% \DescribeMacro{f} |
| 1649 |
% \DescribeMacro{b} |
| 1650 |
% These are a commonly used alternative for the \rr{x}, \rr{y}, \rr{z}\ notation |
| 1651 |
% (and also endorsed by the WCA), and denote a 90~degree whole-cube rotation in the same |
| 1652 |
% directional sense as that of the associated face rotation. |
| 1653 |
% |
| 1654 |
% {\noindent}Thus |
| 1655 |
% \rr{d}\ $\equiv$ \rr{up} $\equiv$ \rr{yp} etc. |
| 1656 |
% For~example, \rr{d}\ and \rr{dp}\ are generated by the commands \cmd{\rr\{d\}} |
| 1657 |
% and \cmd{\rr\{dp\}} respectively. |
| 1658 |
% Note that \rr{u}~is the opposite of \rr{d}, \rr{l}~is the opposite of \rr{r}, and |
| 1659 |
% \rr{f}~is the opposite of \rr{b}, etc. |
| 1660 |
% |
| 1661 |
% As with the \rrh{x}, \rrh{y}, \rrh{z}\ forms (described above) there are also |
| 1662 |
% equivalent \cmd{\rrh\{\}} and \cmd{\Rubik\{\}} forms. For~example, |
| 1663 |
% \rrh{d}\ is generated by the command \cmd{\rrh\{d\}}. |
| 1664 |
% |
| 1665 |
% |
| 1666 |
% \pagebreak |
| 1667 |
% |
| 1668 |
% \subsubsection*{The `c' notation} |
| 1669 |
% \label{sec:cnotation} |
| 1670 |
% |
| 1671 |
% \DescribeMacro{Uc} |
| 1672 |
% \DescribeMacro{Dc} |
| 1673 |
% \DescribeMacro{Lc} |
| 1674 |
% \DescribeMacro{Rc} |
| 1675 |
% \DescribeMacro{Fc} |
| 1676 |
% \DescribeMacro{Bc} |
| 1677 |
% This slightly more intuitive notation (the `c' stands for `cube') also associates the rotation |
| 1678 |
% direction with that of the designated \textsc{face} (e.g.,~\texttt{Rc} $\equiv$ \texttt{x}). |
| 1679 |
% Each has a complementary `prime' version formed by appending a `p'. |
| 1680 |
% For~example, \rr{Rc} (\verb!\rr{Rc}!) is equivalent to \rr{x}; |
| 1681 |
% \rr{Rcp} (\verb!\rr{Rcp}!) is equivalent to \rr{xp}. |
| 1682 |
% |
| 1683 |
% This notation, which was probably invented by Singmaster, was originally used on the |
| 1684 |
% Cube Lovers usenet group (1981--1997). It is now much used on the |
| 1685 |
% Jaap Puzzles website (see Scherphius J) ---see also Section~\ref{sec:codeJaap}. |
| 1686 |
% |
| 1687 |
% \bigskip\bigskip |
| 1688 |
% |
| 1689 |
% \subsubsection*{The `C' notation} |
| 1690 |
% \label{sec:Cnotation} |
| 1691 |
% |
| 1692 |
% \DescribeMacro{CU} |
| 1693 |
% \DescribeMacro{CD} |
| 1694 |
% \DescribeMacro{CL} |
| 1695 |
% \DescribeMacro{CR} |
| 1696 |
% \DescribeMacro{CF} |
| 1697 |
% \DescribeMacro{CB} |
| 1698 |
% This variant of the whole cube rotation notation |
| 1699 |
% (e.g.,~\texttt{CR} $\equiv$ \texttt{Rc} $\equiv$ \texttt{x}) |
| 1700 |
% is part of the `superset' notation of Randelshofer. As before, the rotation |
| 1701 |
% direction follows that of the designated \textsc{face}. Each has a complementary |
| 1702 |
% `prime' version formed by appending a `p'. |
| 1703 |
% |
| 1704 |
% |
| 1705 |
% \bigskip% \bigskip |
| 1706 |
% |
| 1707 |
% \subsection{Examples} |
| 1708 |
% \label{sec:examples} |
| 1709 |
% |
| 1710 |
% {\noindent}\rr{R}\ is generated by the command \cmd{\rr\{R\}} |
| 1711 |
% |
| 1712 |
% {\noindent}\rr{Fw}\ is generated by the command \cmd{\rr\{Fw\}} |
| 1713 |
% |
| 1714 |
% {\noindent}\rr{L}$^2$ is generated by \cmd{\rr\{L\}}\verb!$^2$! |
| 1715 |
% |
| 1716 |
% {\noindent}\rr{L}2 is generated by \cmd{\rr\{L\}2} |
| 1717 |
% |
| 1718 |
% {\noindent}\rr{Rp}\ is generated by \cmd{\rr\{Rp\}} |
| 1719 |
% |
| 1720 |
% {\noindent}\rr{Fwp}\ is generated by \cmd{\rr\{Fwp\}} |
| 1721 |
% |
| 1722 |
% {\noindent}\rr{x}\ and \rrh{y}\ and \Rubik{zp}\ are generated by |
| 1723 |
% \cmd{\rr\{x\}} and \cmd{\rrh\{y\}} and \cmd{\Rubik\{zp\}} |
| 1724 |
% |
| 1725 |
% {\noindent}\rr{Fc}\ and \rrh{Bc}\ are generated by \cmd{\rr\{Fc\}} and \cmd{\rrh\{Bc\}} |
| 1726 |
% |
| 1727 |
% {\noindent}\rr{U}\rr{U}\rr{R}\rr{R}\ is generated by |
| 1728 |
% \cmd{\rr\{U\}}\cmd{\rr\{U\}}\cmd{\rr\{R\}}\cmd{\rr\{R\}} |
| 1729 |
% |
| 1730 |
% \medskip |
| 1731 |
% |
| 1732 |
% {\noindent}\Rubik{F}\Rubik{U}\Rubik{y}\Rubik{Rp}\Rubik{Lwp}\ |
| 1733 |
% \ \ \verb!\Rubik{F}\Rubik{U}\Rubik{y}\Rubik{Rp}\Rubik{Lwp}! |
| 1734 |
% |
| 1735 |
% \bigskip |
| 1736 |
% |
| 1737 |
% {\noindent}\textRubik{F}\ \textRubik{U}\ \ \ \ |
| 1738 |
% \verb!\textRubik{F}\ \textRubik{U}! |
| 1739 |
% |
| 1740 |
% \medskip |
| 1741 |
% |
| 1742 |
% {\noindent}Commas can be important in avoiding ambiguity; for~example, |
| 1743 |
% |
| 1744 |
% \medskip |
| 1745 |
% |
| 1746 |
% {\noindent}\rr{D},\rr{U}2,\rr{F}2,\rr{Ds}2,\rr{B}, \ \ \ \ \verb!\rr{U}2,\rr{F}2,\rr{Ds}2,\rr{B},! |
| 1747 |
% |
| 1748 |
% \medskip |
| 1749 |
% |
| 1750 |
% {\noindent}\rrh{U}2,\,\rrh{F}2,\,\rrh{Ds}2,\, \ \ \ \ \verb!\rrh{U}2,\,\rrh{F}2,\,\rrh{Ds}2! |
| 1751 |
% |
| 1752 |
% \medskip |
| 1753 |
% |
| 1754 |
% {\noindent}Finally, if each rotation element uses the \textit{same} font or encoding, for~example |
| 1755 |
% |
| 1756 |
% \medskip |
| 1757 |
% |
| 1758 |
% {\noindent}\rrh{F}\rrh{U}\rrh{y}\rrh{Rp}\rrh{Lwp} \ \ \ \ |
| 1759 |
% \verb!\rrh{F}\rrh{U}\rrh{y}\rrh{Rp}\rrh{Lwp}! |
| 1760 |
% |
| 1761 |
% \medskip |
| 1762 |
% |
| 1763 |
% {\noindent}then typesetting such a rotation sequence can be achieved more easily using the |
| 1764 |
% \verb!\ShowSequence! command (see Section~\ref{sec:showsequence}). For~example, we can |
| 1765 |
% typeset the last sequence much more conveniently, as follows: |
| 1766 |
% |
| 1767 |
% \medskip |
| 1768 |
% |
| 1769 |
% \verb!\ShowSequence{}{\rrh}{F,U,y,Rp,Lwp}! \ \ $\rightarrow$ \ \ \ShowSequence{}{\rrh}{F,U,y,Rp,Lwp} |
| 1770 |
% |
| 1771 |
% |
| 1772 |
% |
| 1773 |
% \subsection{Backwards compatibility} |
| 1774 |
% \label{sec:backwardscompat} |
| 1775 |
% |
| 1776 |
% Note that in keeping with `backwards compatibility' all rotation commands (see below) |
| 1777 |
% can still be written without the usual curly braces \verb!{}!. |
| 1778 |
% For~example, the hieroglyph \rrhD\ (\cmd{\rrh\{D\}}) can also be generated using the command |
| 1779 |
% \cmd{\rrhD}. |
| 1780 |
% |
| 1781 |
% |
| 1782 |
% |
| 1783 |
% \subsection{Listing of all rotation commands} |
| 1784 |
% \label{sec:listofcommands} |
| 1785 |
% |
| 1786 |
% |
| 1787 |
% Note that all the commands presented here also have a \cmd{\Rubik\{\}} equivalent form which |
| 1788 |
% typesets both the hieroglyph and its lettercode in a vertical format, |
| 1789 |
% as shown in the `Examples' section above. These have been omitted here |
| 1790 |
% owing to the difficulty of including this form easily in the following table. |
| 1791 |
% |
| 1792 |
% |
| 1793 |
% Note also that some \cmd{\rrh\{\}} commands (e.g.,~the \cmd{\rrh\{B\}} command) |
| 1794 |
% show only the lettercode in a square box, e.g.,~\rrh{B}. This is because these rotations |
| 1795 |
% do not have a `true' visual representation as seen from the \textsc{front} face, |
| 1796 |
% and hence can be somewhat ambiguous unless typeset with their associated |
| 1797 |
% lettercode. |
| 1798 |
% |
| 1799 |
% |
| 1800 |
% \newcommand{\dnstrut}{\rule{0pt}{17pt}} |
| 1801 |
% \newcommand{\dns}{\hspace{2mm}} |
| 1802 |
% \newcommand{\dnsp}{\hspace{2mm}} |
| 1803 |
% |
| 1804 |
% |
| 1805 |
% |
| 1806 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 1807 |
% \dnstrut\rr{U}\dns\cmd{\rr\{U\}} |
| 1808 |
% & \rrh{U}\dns\cmd{\rrh\{U\}} |
| 1809 |
% & \textRubik{U}\dns\cmd{\textRubik\{U\}} \nonumber\\ |
| 1810 |
% \dnstrut\rr{Up}\dns\cmd{\rr\{Up\}} |
| 1811 |
% & \rrh{Up}\dns\cmd{\rrh\{Up\}} |
| 1812 |
% & \textRubik{Up}\dns\cmd{\textRubik\{Up\}} \nonumber\\ |
| 1813 |
% \dnstrut\rr{Uw}\dns\cmd{\rr\{Uw\}} |
| 1814 |
% & \rrh{Uw}\dns\cmd{\rrh\{Uw\}} |
| 1815 |
% & \textRubik{Uw}\dns\cmd{\textRubik\{Uw\}} \nonumber\\ |
| 1816 |
% \dnstrut\rr{Uwp}\dns\cmd{\rr\{Uwp\}} |
| 1817 |
% & \rrh{Uwp}\dns\cmd{\rrh\{Uwp\}} |
| 1818 |
% & \textRubik{Uwp}\dns\cmd{\textRubik\{Uwp\}} \nonumber\\ |
| 1819 |
% \dnstrut\rr{Us}\dns\cmd{\rr\{Us\}} |
| 1820 |
% & \rrh{Us}\dns\cmd{\rrh\{Us\}} |
| 1821 |
% & \textRubik{Us}\dns\cmd{\textRubik\{Us\}} \nonumber\\ |
| 1822 |
% \dnstrut\rr{Usp}\dns\cmd{\rr\{Usp\}} |
| 1823 |
% & \rrh{Usp}\dns\cmd{\rrh\{Usp\}} |
| 1824 |
% & \textRubik{Usp}\dns\cmd{\textRubik\{Usp\}} \nonumber\\ |
| 1825 |
% \dnstrut\rr{Ua}\dns\cmd{\rr\{Ua\}} |
| 1826 |
% & \rrh{Ua}\dns\cmd{\rrh\{Ua\}} |
| 1827 |
% & \textRubik{Ua}\dns\cmd{\textRubik\{Ua\}} \nonumber\\ |
| 1828 |
% \dnstrut\rr{Uap}\dns\cmd{\rr\{Uap\}} |
| 1829 |
% & \rrh{Uap}\dns\cmd{\rrh\{Uap\}} |
| 1830 |
% & \textRubik{Uap}\dns\cmd{\textRubik\{Uap\}} \nonumber\\ |
| 1831 |
% \dnstrut\rr{Um}\dns\cmd{\rr\{Um\}} |
| 1832 |
% & \rrh{Um}\dns\cmd{\rrh\{Um\}} |
| 1833 |
% & \textRubik{Um}\dns\cmd{\textRubik\{Um\}} \nonumber\\ |
| 1834 |
% \dnstrut\rr{Ump}\dns\cmd{\rr\{Ump\}} |
| 1835 |
% & \rrh{Ump}\dns\cmd{\rrh\{Ump\}} |
| 1836 |
% & \textRubik{Ump}\dns\cmd{\textRubik\{Ump\}} \nonumber\\ |
| 1837 |
% \dnstrut\rr{Uc}\dns\cmd{\rr\{Uc\}} |
| 1838 |
% & \rrh{Uc}\dns\cmd{\rrh\{Uc\}} |
| 1839 |
% & \Rubik{Uc}\dns\cmd{\Rubik\{Uc\}} \nonumber\\ |
| 1840 |
% \dnstrut\rr{Ucp}\dns\cmd{\rr\{Ucp\}} |
| 1841 |
% & \rrh{Ucp}\dns\cmd{\rrh\{Ucp\}} |
| 1842 |
% & \Rubik{Ucp}\dns\cmd{\Rubik\{Ucp\}} \nonumber\\ |
| 1843 |
% \end{supertabular} |
| 1844 |
% |
| 1845 |
% |
| 1846 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 1847 |
% \dnstrut\rr{D}\dns\cmd{\rr\{D\}} |
| 1848 |
% & \rrh{D}\dns\cmd{\rrh\{D\}} |
| 1849 |
% & \textRubik{D}\dns\cmd{\textRubik\{D\}} \nonumber\\ |
| 1850 |
% \dnstrut\rr{Dp}\dns\cmd{\rr\{Dp\}} |
| 1851 |
% & \rrh{Dp}\dns\cmd{\rrh\{Dp\}} |
| 1852 |
% & \textRubik{Dp}\dns\cmd{\textRubik\{Dp\}} \nonumber\\ |
| 1853 |
% \dnstrut\rr{Dw}\dns\cmd{\rr\{Dw\}} |
| 1854 |
% & \rrh{Dw}\dns\cmd{\rrh\{Dw\}} |
| 1855 |
% & \textRubik{Dw}\dns\cmd{\textRubik\{Dw\}} \nonumber\\ |
| 1856 |
% \dnstrut\rr{Dwp}\dns\cmd{\rr\{Dwp\}} |
| 1857 |
% & \rrh{Dwp}\dns\cmd{\rrh\{Dwp\}} |
| 1858 |
% & \textRubik{Dwp}\dns\cmd{\textRubik\{Dwp\}} \nonumber\\ |
| 1859 |
% \dnstrut\rr{Ds}\dns\cmd{\rr\{Ds\}} |
| 1860 |
% & \rrh{Ds}\dns\cmd{\rrh\{Ds\}} |
| 1861 |
% & \textRubik{Ds}\dns\cmd{\textRubik\{Ds\}} \nonumber\\ |
| 1862 |
% \dnstrut\rr{Dsp}\dns\cmd{\rr\{Dsp\}} |
| 1863 |
% & \rrh{Dsp}\dns\cmd{\rrh\{Dsp\}} |
| 1864 |
% & \textRubik{Dsp}\dns\cmd{\textRubik\{Dsp\}} \nonumber\\ |
| 1865 |
% \dnstrut\rr{Da}\dns\cmd{\rr\{Da\}} |
| 1866 |
% & \rrh{Da}\dns\cmd{\rrh\{Da\}} |
| 1867 |
% & \textRubik{Da}\dns\cmd{\textRubik\{Da\}} \nonumber\\ |
| 1868 |
% \dnstrut\rr{Dap}\dns\cmd{\rr\{Dap\}} |
| 1869 |
% & \rrh{Dap}\dns\cmd{\rrh\{Dap\}} |
| 1870 |
% & \textRubik{Dap}\dns\cmd{\textRubik\{Dap\}} \nonumber\\ |
| 1871 |
% \dnstrut\rr{Dm}\dns\cmd{\rr\{Dm\}} |
| 1872 |
% & \rrh{Dm}\dns\cmd{\rrh\{Dm\}} |
| 1873 |
% & \textRubik{Dm}\dns\cmd{\textRubik\{Dm\}} \nonumber\\ |
| 1874 |
% \dnstrut\rr{Dmp}\dns\cmd{\rr\{Dmp\}} |
| 1875 |
% & \rrh{Dmp}\dns\cmd{\rrh\{Dmp\}} |
| 1876 |
% & \textRubik{Dmp}\dns\cmd{\textRubik\{Dmp\}} \nonumber\\ |
| 1877 |
% \dnstrut\rr{Dc}\dns\cmd{\rr\{Dc\}} |
| 1878 |
% & \rrh{Dc}\dns\cmd{\rrh\{Dc\}} |
| 1879 |
% & \Rubik{Dc}\dns\cmd{\Rubik\{Dc\}} \nonumber\\ |
| 1880 |
% \dnstrut\rr{Dcp}\dns\cmd{\rr\{Dcp\}} |
| 1881 |
% & \rrh{Dcp}\dns\cmd{\rrh\{Dcp\}} |
| 1882 |
% & \Rubik{Dcp}\dns\cmd{\Rubik\{Dcp\}} \nonumber\\ |
| 1883 |
% \end{supertabular} |
| 1884 |
% |
| 1885 |
% |
| 1886 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 1887 |
% \dnstrut\rr{L}\dns\cmd{\rr\{L\}} |
| 1888 |
% & \rrh{L}\dns\cmd{\rrh\{L\}} |
| 1889 |
% & \textRubik{L}\dns\cmd{\textRubik\{L\}} \nonumber\\ |
| 1890 |
% \dnstrut\rr{Lp}\dns\cmd{\rr\{Lp\}} |
| 1891 |
% & \rrh{Lp}\dns\cmd{\rrh\{Lp\}} |
| 1892 |
% & \textRubik{Lp}\dns\cmd{\textRubik\{Lp\}} \nonumber\\ |
| 1893 |
% \dnstrut\rr{Lw}\dns\cmd{\rr\{Lw\}} |
| 1894 |
% & \rrh{Lw}\dns\cmd{\rrh\{Lw\}} |
| 1895 |
% & \textRubik{Lw}\dns\cmd{\textRubik\{Lw\}} \nonumber\\ |
| 1896 |
% \dnstrut\rr{Lwp}\dns\cmd{\rr\{Lwp\}} |
| 1897 |
% & \rrh{Lwp}\dns\cmd{\rrh\{Lwp\}} |
| 1898 |
% & \textRubik{Lwp}\dns\cmd{\textRubik\{Lwp\}} \nonumber\\ |
| 1899 |
% \dnstrut\rr{Ls}\dns\cmd{\rr\{Ls\}} |
| 1900 |
% & \rrh{Ls}\dns\cmd{\rrh\{Ls\}} |
| 1901 |
% & \textRubik{Ls}\dns\cmd{\textRubik\{Ls\}} \nonumber\\ |
| 1902 |
% \dnstrut\rr{Lsp}\dns\cmd{\rr\{Lsp\}} |
| 1903 |
% & \rrh{Lsp}\dns\cmd{\rrh\{Lsp\}} |
| 1904 |
% & \textRubik{Lsp}\dns\cmd{\textRubik\{Lsp\}} \nonumber\\ |
| 1905 |
% \dnstrut\rr{La}\dns\cmd{\rr\{La\}} |
| 1906 |
% & \rrh{La}\dns\cmd{\rrh\{La\}} |
| 1907 |
% & \textRubik{La}\dns\cmd{\textRubik\{La\}} \nonumber\\ |
| 1908 |
% \dnstrut\rr{Lap}\dns\cmd{\rr\{Lap\}} |
| 1909 |
% & \rrh{Lap}\dns\cmd{\rrh\{Lap\}} |
| 1910 |
% & \textRubik{Lap}\dns\cmd{\textRubik\{Lap\}} \nonumber\\ |
| 1911 |
% \dnstrut\rr{Lm}\dns\cmd{\rr\{Lm\}} |
| 1912 |
% & \rrh{Lm}\dns\cmd{\rrh\{Lm\}} |
| 1913 |
% & \textRubik{Lm}\dns\cmd{\textRubik\{Lm\}} \nonumber\\ |
| 1914 |
% \dnstrut\rr{Lmp}\dns\cmd{\rr\{Lmp\}} |
| 1915 |
% & \rrh{Lmp}\dns\cmd{\rrh\{Lmp\}} |
| 1916 |
% & \textRubik{Lmp}\dns\cmd{\textRubik\{Lmp\}} \nonumber\\ |
| 1917 |
% \dnstrut\rr{Lc}\dns\cmd{\rr\{Lc\}} |
| 1918 |
% & \rrh{Lc}\dns\cmd{\rrh\{Lc\}} |
| 1919 |
% & \Rubik{Lc}\dns\cmd{\Rubik\{Lc\}} \nonumber\\ |
| 1920 |
% \dnstrut\rr{Lcp}\dns\cmd{\rr\{Lcp\}} |
| 1921 |
% & \rrh{Lcp}\dns\cmd{\rrh\{Lcp\}} |
| 1922 |
% & \Rubik{Lcp}\dns\cmd{\Rubik\{Lcp\}} \nonumber\\ |
| 1923 |
% \end{supertabular} |
| 1924 |
% |
| 1925 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 1926 |
% \dnstrut\rr{R}\dns\cmd{\rr\{R\}} |
| 1927 |
% & \rrh{R}\dns\cmd{\rrh\{R\}} |
| 1928 |
% & \textRubik{R}\dns\cmd{\textRubik\{R\}} \nonumber\\ |
| 1929 |
% \dnstrut\rr{Rp}\dns\cmd{\rr\{Rp\}} |
| 1930 |
% & \rrh{Rp}\dns\cmd{\rrh\{Rp\}} |
| 1931 |
% & \textRubik{Rp}\dns\cmd{\textRubik\{Rp\}} \nonumber\\ |
| 1932 |
% \dnstrut\rr{Rw}\dns\cmd{\rr\{Rw\}} |
| 1933 |
% & \rrh{Rw}\dns\cmd{\rrh\{Rw\}} |
| 1934 |
% & \textRubik{Rw}\dns\cmd{\textRubik\{Rw\}} \nonumber\\ |
| 1935 |
% \dnstrut\rr{Rwp}\dns\cmd{\rr\{Rwp\}} |
| 1936 |
% & \rrh{Rwp}\dns\cmd{\rrh\{Rwp\}} |
| 1937 |
% & \textRubik{Rwp}\dns\cmd{\textRubik\{Rwp\}} \nonumber\\ |
| 1938 |
% \dnstrut\rr{Rs}\dns\cmd{\rr\{Rs\}} |
| 1939 |
% & \rrh{Rs}\dns\cmd{\rrh\{Rs\}} |
| 1940 |
% & \textRubik{Rs}\dns\cmd{\textRubik\{Rs\}} \nonumber\\ |
| 1941 |
% \dnstrut\rr{Rsp}\dns\cmd{\rr\{Rsp\}} |
| 1942 |
% & \rrh{Rsp}\dns\cmd{\rrh\{Rsp\}} |
| 1943 |
% & \textRubik{Rsp}\dns\cmd{\textRubik\{Rsp\}} \nonumber\\ |
| 1944 |
% \dnstrut\rr{Ra}\dns\cmd{\rr\{Ra\}} |
| 1945 |
% & \rrh{Ra}\dns\cmd{\rrh\{Ra\}} |
| 1946 |
% & \textRubik{Ra}\dns\cmd{\textRubik\{Ra\}} \nonumber\\ |
| 1947 |
% \dnstrut\rr{Rap}\dns\cmd{\rr\{Rap\}} |
| 1948 |
% & \rrh{Rap}\dns\cmd{\rrh\{Rap\}} |
| 1949 |
% & \textRubik{Rap}\dns\cmd{\textRubik\{Rap\}} \nonumber\\ |
| 1950 |
% \dnstrut\rr{Rm}\dns\cmd{\rr\{Rm\}} |
| 1951 |
% & \rrh{Rm}\dns\cmd{\rrh\{Rm\}} |
| 1952 |
% & \textRubik{Rm}\dns\cmd{\textRubik\{Rm\}} \nonumber\\ |
| 1953 |
% \dnstrut\rr{Rmp}\dns\cmd{\rr\{Rmp\}} |
| 1954 |
% & \rrh{Rmp}\dns\cmd{\rrh\{Rmp\}} |
| 1955 |
% & \textRubik{Rmp}\dns\cmd{\textRubik\{Rmp\}} \nonumber\\ |
| 1956 |
% \dnstrut\rr{Rc}\dns\cmd{\rr\{Rc\}} |
| 1957 |
% & \rrh{Rc}\dns\cmd{\rrh\{Rc\}} |
| 1958 |
% & \Rubik{Rc}\dns\cmd{\Rubik\{Rc\}} \nonumber\\ |
| 1959 |
% \dnstrut\rr{Rcp}\dns\cmd{\rr\{Rcp\}} |
| 1960 |
% & \rrh{Rcp}\dns\cmd{\rrh\{Rcp\}} |
| 1961 |
% & \Rubik{Rcp}\dns\cmd{\Rubik\{Rcp\}} \nonumber\\ |
| 1962 |
% \end{supertabular} |
| 1963 |
% |
| 1964 |
% |
| 1965 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 1966 |
% \dnstrut\rr{F}\dns\cmd{\rr\{F\}} |
| 1967 |
% & \rrh{F}\dns\cmd{\rrh\{F\}} |
| 1968 |
% & \textRubik{F}\dns\cmd{\textRubik\{F\}} \nonumber\\ |
| 1969 |
% \dnstrut\rr{Fp}\dns\cmd{\rr\{Fp\}} |
| 1970 |
% & \rrh{Fp}\dns\cmd{\rrh\{Fp\}} |
| 1971 |
% & \textRubik{Fp}\dns\cmd{\textRubik\{Fp\}} \nonumber\\ |
| 1972 |
% \dnstrut\rr{Fw}\dns\cmd{\rr\{Fw\}} |
| 1973 |
% & \rrh{Fw}\dns\cmd{\rrh\{Fw\}} |
| 1974 |
% & \textRubik{Fw}\dns\cmd{\textRubik\{Fw\}} \nonumber\\ |
| 1975 |
% \dnstrut\rr{Fwp}\dns\cmd{\rr\{Fwp\}} |
| 1976 |
% & \rrh{Fwp}\dns\cmd{\rrh\{Fwp\}} |
| 1977 |
% & \textRubik{Fwp}\dns\cmd{\textRubik\{Fwp\}} \nonumber\\ |
| 1978 |
% \dnstrut\rr{Fs}\dns\cmd{\rr\{Fs\}} |
| 1979 |
% & \rrh{Fs}\dns\cmd{\rrh\{Fs\}} |
| 1980 |
% & \textRubik{Fs}\dns\cmd{\textRubik\{Fs\}} \nonumber\\ |
| 1981 |
% \dnstrut\rr{Fsp}\dns\cmd{\rr\{Fsp\}} |
| 1982 |
% & \rrh{Fsp}\dns\cmd{\rrh\{Fsp\}} |
| 1983 |
% & \textRubik{Fsp}\dns\cmd{\textRubik\{Fsp\}} \nonumber\\ |
| 1984 |
% \dnstrut\rr{Fa}\dns\cmd{\rr\{Fa\}} |
| 1985 |
% & \rrh{Fa}\dns\cmd{\rrh\{Fa\}} |
| 1986 |
% & \textRubik{Fa}\dns\cmd{\textRubik\{Fa\}} \nonumber\\ |
| 1987 |
% \dnstrut\rr{Fap}\dns\cmd{\rr\{Fap\}} |
| 1988 |
% & \rrh{Fap}\dns\cmd{\rrh\{Fap\}} |
| 1989 |
% & \textRubik{Fap}\dns\cmd{\textRubik\{Fap\}} \nonumber\\ |
| 1990 |
% \dnstrut\rr{Fm}\dns\cmd{\rr\{Fm\}} |
| 1991 |
% & \rrh{Fm}\dns\cmd{\rrh\{Fm\}} |
| 1992 |
% & \textRubik{Fm}\dns\cmd{\textRubik\{Fm\}} \nonumber\\ |
| 1993 |
% \dnstrut\rr{Fmp}\dns\cmd{\rr\{Fmp\}} |
| 1994 |
% & \rrh{Fmp}\dns\cmd{\rrh\{Fmp\}} |
| 1995 |
% & \textRubik{Fmp}\dns\cmd{\textRubik\{Fmp\}} \nonumber\\ |
| 1996 |
% \dnstrut\rr{Fc}\dns\cmd{\rr\{Fc\}} |
| 1997 |
% & \rrh{Fc}\dns\cmd{\rrh\{Fc\}} |
| 1998 |
% & \Rubik{Fc}\dns\cmd{\Rubik\{Fc\}} \nonumber\\ |
| 1999 |
% \dnstrut\rr{Fcp}\dns\cmd{\rr\{Fcp\}} |
| 2000 |
% & \rrh{Fcp}\dns\cmd{\rrh\{Fcp\}} |
| 2001 |
% & \Rubik{Fcp}\dns\cmd{\Rubik\{Fcp\}} \nonumber\\ |
| 2002 |
% \end{supertabular} |
| 2003 |
% |
| 2004 |
% |
| 2005 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2006 |
% \dnstrut\rr{B}\dns\cmd{\rr\{B\}} |
| 2007 |
% & \rrh{B}\dns\cmd{\rrh\{B\}} |
| 2008 |
% & \textRubik{B}\dns\cmd{\textRubik\{B\}} \nonumber\\ |
| 2009 |
% \dnstrut\rr{Bp}\dns\cmd{\rr\{Bp\}} |
| 2010 |
% & \rrh{Bp}\dns\cmd{\rrh\{Bp\}} |
| 2011 |
% & \textRubik{Bp}\dns\cmd{\textRubik\{Bp\}} \nonumber\\ |
| 2012 |
% \dnstrut\rr{Bw}\dns\cmd{\rr\{Bw\}} |
| 2013 |
% & \rrh{Bw}\dns\cmd{\rrh\{Bw\}} |
| 2014 |
% & \textRubik{Bw}\dns\cmd{\textRubik\{Bw\}} \nonumber\\ |
| 2015 |
% \dnstrut\rr{Bwp}\dns\cmd{\rr\{Bwp\}} |
| 2016 |
% & \rrh{Bwp}\dns\cmd{\rrh\{Bwp\}} |
| 2017 |
% & \textRubik{Bwp}\dns\cmd{\textRubik\{Bwp\}} \nonumber\\ |
| 2018 |
% \dnstrut\rr{Bs}\dns\cmd{\rr\{Bs\}} |
| 2019 |
% & \rrh{Bs}\dns\cmd{\rrh\{Bs\}} |
| 2020 |
% & \textRubik{Bs}\dns\cmd{\textRubik\{Bs\}} \nonumber\\ |
| 2021 |
% \dnstrut\rr{Bsp}\dns\cmd{\rr\{Bsp\}} |
| 2022 |
% & \rrh{Bsp}\dns\cmd{\rrh\{Bsp\}} |
| 2023 |
% & \textRubik{Bsp}\dns\cmd{\textRubik\{Bsp\}} \nonumber\\ |
| 2024 |
% \dnstrut\rr{Ba}\dns\cmd{\rr\{Ba\}} |
| 2025 |
% & \rrh{Ba}\dns\cmd{\rrh\{Ba\}} |
| 2026 |
% & \textRubik{Ba}\dns\cmd{\textRubik\{Ba\}} \nonumber\\ |
| 2027 |
% \dnstrut\rr{Bap}\dns\cmd{\rr\{Bap\}} |
| 2028 |
% & \rrh{Bap}\dns\cmd{\rrh\{Bap\}} |
| 2029 |
% & \textRubik{Bap}\dns\cmd{\textRubik\{Bap\}} \nonumber\\ |
| 2030 |
% \dnstrut\rr{Bm}\dns\cmd{\rr\{Bm\}} |
| 2031 |
% & \rrh{Bm}\dns\cmd{\rrh\{Bm\}} |
| 2032 |
% & \textRubik{Bm}\dns\cmd{\textRubik\{Bm\}} \nonumber\\ |
| 2033 |
% \dnstrut\rr{Bmp}\dns\cmd{\rr\{Bmp\}} |
| 2034 |
% & \rrh{Bmp}\dns\cmd{\rrh\{Bmp\}} |
| 2035 |
% & \textRubik{Bmp}\dns\cmd{\textRubik\{Bmp\}} \nonumber\\ |
| 2036 |
% \dnstrut\rr{Bc}\dns\cmd{\rr\{Bc\}} |
| 2037 |
% & \rrh{Bc}\dns\cmd{\rrh\{Bc\}} |
| 2038 |
% & \Rubik{Bc}\dns\cmd{\Rubik\{Bc\}} \nonumber\\ |
| 2039 |
% \dnstrut\rr{Bcp}\dns\cmd{\rr\{Bcp\}} |
| 2040 |
% & \rrh{Bcp}\dns\cmd{\rrh\{Bcp\}} |
| 2041 |
% & \Rubik{Bcp}\dns\cmd{\Rubik\{Bcp\}} \nonumber\\ |
| 2042 |
% \end{supertabular} |
| 2043 |
% |
| 2044 |
% |
| 2045 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2046 |
% \dnstrut\rr{Su}\dns\cmd{\rr\{Su\}} |
| 2047 |
% & \rrh{Su}\dns\cmd{\rrh\{Su\}} |
| 2048 |
% & \textRubik{Su}\dns\cmd{\textRubik\{Su\}} \nonumber\\ |
| 2049 |
% \dnstrut\rr{Sup}\dns\cmd{\rr\{Sup\}} |
| 2050 |
% & \rrh{Sup}\dns\cmd{\rrh\{Sup\}} |
| 2051 |
% & \textRubik{Sup}\dns\cmd{\textRubik\{Sup\}} \nonumber\\ |
| 2052 |
% \dnstrut\rr{Sd}\dns\cmd{\rr\{Sd\}} |
| 2053 |
% & \rrh{Sd}\dns\cmd{\rrh\{Sd\}} |
| 2054 |
% & \textRubik{Sd}\dns\cmd{\textRubik\{Sd\}} \nonumber\\ |
| 2055 |
% \dnstrut\rr{Sdp}\dns\cmd{\rr\{Sdp\}} |
| 2056 |
% & \rrh{Sdp}\dns\cmd{\rrh\{Sdp\}} |
| 2057 |
% & \textRubik{Sdp}\dns\cmd{\textRubik\{Sdp\}} \nonumber\\ |
| 2058 |
% \dnstrut\rr{Sl}\dns\cmd{\rr\{Sl\}} |
| 2059 |
% & \rrh{Sl}\dns\cmd{\rrh\{Sl\}} |
| 2060 |
% & \textRubik{Sl}\dns\cmd{\textRubik\{Sl\}} \nonumber\\ |
| 2061 |
% \dnstrut\rr{Slp}\dns\cmd{\rr\{Slp\}} |
| 2062 |
% & \rrh{Slp}\dns\cmd{\rrh\{Slp\}} |
| 2063 |
% & \textRubik{Slp}\dns\cmd{\textRubik\{Slp\}} \nonumber\\ |
| 2064 |
% \dnstrut\rr{Sr}\dns\cmd{\rr\{Sr\}} |
| 2065 |
% & \rrh{Sr}\dns\cmd{\rrh\{Sr\}} |
| 2066 |
% & \textRubik{Sr}\dns\cmd{\textRubik\{Sr\}} \nonumber\\ |
| 2067 |
% \dnstrut\rr{Srp}\dns\cmd{\rr\{Srp\}} |
| 2068 |
% & \rrh{Srp}\dns\cmd{\rrh\{Srp\}} |
| 2069 |
% & \textRubik{Srp}\dns\cmd{\textRubik\{Srp\}} \nonumber\\ |
| 2070 |
% \dnstrut\rr{Sf}\dns\cmd{\rr\{Sf\}} |
| 2071 |
% & \rrh{Sf}\dns\cmd{\rrh\{Sf\}} |
| 2072 |
% & \textRubik{Sf}\dns\cmd{\textRubik\{Sf\}} \nonumber\\ |
| 2073 |
% \dnstrut\rr{Sfp}\dns\cmd{\rr\{Sfp\}} |
| 2074 |
% & \rrh{Sfp}\dns\cmd{\rrh\{Sfp\}} |
| 2075 |
% & \textRubik{Sfp}\dns\cmd{\textRubik\{Sfp\}} \nonumber\\ |
| 2076 |
% \dnstrut\rr{Sb}\dns\cmd{\rr\{Sb\}} |
| 2077 |
% & \rrh{Sb}\dns\cmd{\rrh\{Sb\}} |
| 2078 |
% & \textRubik{Sb}\dns\cmd{\textRubik\{Sb\}} \nonumber\\ |
| 2079 |
% \dnstrut\rr{Sbp}\dns\cmd{\rr\{Sbp\}} |
| 2080 |
% & \rrh{Sbp}\dns\cmd{\rrh\{Sbp\}} |
| 2081 |
% & \textRubik{Sbp}\dns\cmd{\textRubik\{Sbp\}} \nonumber\\ |
| 2082 |
% \end{supertabular} |
| 2083 |
% |
| 2084 |
% |
| 2085 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2086 |
% \dnstrut\rr{E}\dns\cmd{\rr\{E\}} |
| 2087 |
% & \rrh{E}\dns\cmd{\rrh\{E\}} |
| 2088 |
% & \textRubik{E}\dns\cmd{\textRubik\{E\}} \nonumber\\ |
| 2089 |
% \dnstrut\rr{Ep}\dns\cmd{\rr\{Ep\}} |
| 2090 |
% & \rrh{Ep}\dns\cmd{\rrh\{Ep\}} |
| 2091 |
% & \textRubik{Ep}\dns\cmd{\textRubik\{Ep\}} \nonumber\\ |
| 2092 |
% \dnstrut\rr{M}\dns\cmd{\rr\{M\}} |
| 2093 |
% & \rrh{M}\dns\cmd{\rrh\{M\}} |
| 2094 |
% & \textRubik{M}\dns\cmd{\textRubik\{M\}} \nonumber\\ |
| 2095 |
% \dnstrut\rr{Mp}\dns\cmd{\rr\{Mp\}} |
| 2096 |
% & \rrh{Mp}\dns\cmd{\rrh\{Mp\}} |
| 2097 |
% & \textRubik{Mp}\dns\cmd{\textRubik\{Mp\}} \nonumber\\ |
| 2098 |
% \dnstrut\rr{S}\dns\cmd{\rr\{S\}} |
| 2099 |
% & \rrh{S}\dns\cmd{\rrh\{S\}} |
| 2100 |
% & \textRubik{S}\dns\cmd{\textRubik\{S\}} \nonumber\\ |
| 2101 |
% \dnstrut\rr{Sp}\dns\cmd{\rr\{Sp\}} |
| 2102 |
% & \rrh{Sp}\dns\cmd{\rrh\{Sp\}} |
| 2103 |
% & \textRubik{Sp}\dns\cmd{\textRubik\{Sp\}} \nonumber\\ |
| 2104 |
% \end{supertabular} |
| 2105 |
% |
| 2106 |
% |
| 2107 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2108 |
% \dnstrut\rr{x}\dns\cmd{\rr\{x\}} |
| 2109 |
% & \rrh{x}\dns\cmd{\rrh\{x\}} |
| 2110 |
% & \Rubik{x}\dns\cmd{\Rubik\{x\}} \nonumber\\ |
| 2111 |
% \dnstrut\rr{xp}\dns\cmd{\rr\{xp\}} |
| 2112 |
% & \rrh{xp}\dns\cmd{\rrh\{xp\}} |
| 2113 |
% & \Rubik{xp}\dns\cmd{\Rubik\{xp\}} \nonumber\\ |
| 2114 |
% \dnstrut\rr{y}\dns\cmd{\rr\{y\}} |
| 2115 |
% & \rrh{y}\dns\cmd{\rrh\{y\}} |
| 2116 |
% & \Rubik{y}\dns\cmd{\Rubik\{y\}} \nonumber\\ |
| 2117 |
% \dnstrut\rr{yp}\dns\cmd{\rr\{yp\}} |
| 2118 |
% & \rrh{yp}\dns\cmd{\rrh\{yp\}} |
| 2119 |
% & \Rubik{yp}\dns\cmd{\Rubik\{yp\}} \nonumber\\ |
| 2120 |
% \dnstrut\rr{z}\dns\cmd{\rr\{z\}} |
| 2121 |
% & \rrh{z}\dns\cmd{\rrh\{z\}} |
| 2122 |
% & \Rubik{z}\dns\cmd{\Rubik\{z\}} \nonumber\\ |
| 2123 |
% \dnstrut\rr{zp}\dns\cmd{\rr\{zp\}} |
| 2124 |
% & \rrh{zp}\dns\cmd{\rrh\{zp\}} |
| 2125 |
% & \Rubik{zp}\dns\cmd{\Rubik\{zp\}} \nonumber\\ |
| 2126 |
% \end{supertabular} |
| 2127 |
% |
| 2128 |
% |
| 2129 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2130 |
% \dnstrut\rr{u}\dns\cmd{\rr\{u\}} |
| 2131 |
% & \rrh{u}\dns\cmd{\rrh\{u\}} |
| 2132 |
% & \Rubik{u}\dns\cmd{\Rubik\{u\}} \nonumber\\ |
| 2133 |
% \dnstrut\rr{up}\dns\cmd{\rr\{up\}} |
| 2134 |
% & \rrh{up}\dns\cmd{\rrh\{up\}} |
| 2135 |
% & \Rubik{up}\dns\cmd{\Rubik\{up\}} \nonumber\\ |
| 2136 |
% |
| 2137 |
% \dnstrut\rr{d}\dns\cmd{\rr\{d\}} |
| 2138 |
% & \rrh{d}\dns\cmd{\rrh\{d\}} |
| 2139 |
% & \Rubik{d}\dns\cmd{\Rubik\{d\}} \nonumber\\ |
| 2140 |
% \dnstrut\rr{dp}\dns\cmd{\rr\{dp\}} |
| 2141 |
% & \rrh{dp}\dns\cmd{\rrh\{dp\}} |
| 2142 |
% & \Rubik{dp}\dns\cmd{\Rubik\{dp\}} \nonumber\\ |
| 2143 |
% |
| 2144 |
% \dnstrut\rr{l}\dns\cmd{\rr\{l\}} |
| 2145 |
% & \rrh{l}\dns\cmd{\rrh\{l\}} |
| 2146 |
% & \Rubik{l}\dns\cmd{\Rubik\{l\}} \nonumber\\ |
| 2147 |
% \dnstrut\rr{lp}\dns\cmd{\rr\{lp\}} |
| 2148 |
% & \rrh{lp}\dns\cmd{\rrh\{lp\}} |
| 2149 |
% & \Rubik{lp}\dns\cmd{\Rubik\{lp\}} \nonumber\\ |
| 2150 |
% |
| 2151 |
% \dnstrut\rr{r}\dns\cmd{\rr\{r\}} |
| 2152 |
% & \rrh{r}\dns\cmd{\rrh\{r\}} |
| 2153 |
% & \Rubik{r}\dns\cmd{\Rubik\{r\}} \nonumber\\ |
| 2154 |
% \dnstrut\rr{rp}\dns\cmd{\rr\{rp\}} |
| 2155 |
% & \rrh{rp}\dns\cmd{\rrh\{rp\}} |
| 2156 |
% & \Rubik{rp}\dns\cmd{\Rubik\{rp\}} \nonumber\\ |
| 2157 |
% |
| 2158 |
% \dnstrut\rr{f}\dns\cmd{\rr\{f\}} |
| 2159 |
% & \rrh{f}\dns\cmd{\rrh\{f\}} |
| 2160 |
% & \Rubik{f}\dns\cmd{\Rubik\{f\}} \nonumber\\ |
| 2161 |
% \dnstrut\rr{fp}\dns\cmd{\rr\{fp\}} |
| 2162 |
% & \rrh{fp}\dns\cmd{\rrh\{fp\}} |
| 2163 |
% & \Rubik{fp}\dns\cmd{\Rubik\{fp\}} \nonumber\\ |
| 2164 |
% |
| 2165 |
% \dnstrut\rr{b}\dns\cmd{\rr\{b\}} |
| 2166 |
% & \rrh{b}\dns\cmd{\rrh\{b\}} |
| 2167 |
% & \Rubik{b}\dns\cmd{\Rubik\{b\}} \nonumber\\ |
| 2168 |
% \dnstrut\rr{bp}\dns\cmd{\rr\{bp\}} |
| 2169 |
% & \rrh{bp}\dns\cmd{\rrh\{bp\}} |
| 2170 |
% & \Rubik{bp}\dns\cmd{\Rubik\{bp\}} \nonumber\\ |
| 2171 |
% \end{supertabular} |
| 2172 |
% |
| 2173 |
% |
| 2174 |
% \subsubsection{Randelshofer notation} |
| 2175 |
% \label{sec:listofRandelshofercommands} |
| 2176 |
% |
| 2177 |
% \newcommand{\dnRubik}[1]{% |
| 2178 |
% \dnstrut\rr{#1}\dns\cmd{\rr\{#1\}}% |
| 2179 |
% & \rrh{#1}\dns\cmd{\rrh\{#1\}}% |
| 2180 |
% & \Rubik{#1}\dns\cmd{\Rubik\{#1\}} \nonumber\\% |
| 2181 |
% }% |
| 2182 |
% |
| 2183 |
% \newcommand{\dntextRubik}[1]{% |
| 2184 |
% \dnstrut\rr{#1}\dns\cmd{\rr\{#1\}}% |
| 2185 |
% & \rrh{#1}\dns\cmd{\rrh\{#1\}}% |
| 2186 |
% & \textRubik{#1}\dns\cmd{\textRubik\{#1\}} \nonumber\\% |
| 2187 |
% }% |
| 2188 |
% |
| 2189 |
% |
| 2190 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2191 |
% \dnRubik{CR} |
| 2192 |
% \dnRubik{CRp} |
| 2193 |
% \dnRubik{CL} |
| 2194 |
% \dnRubik{CLp} |
| 2195 |
% \dnRubik{CU} |
| 2196 |
% \dnRubik{CUp} |
| 2197 |
% \dnRubik{CD} |
| 2198 |
% \dnRubik{CDp} |
| 2199 |
% \dnRubik{CF} |
| 2200 |
% \dnRubik{CFp} |
| 2201 |
% \dnRubik{CB} |
| 2202 |
% \dnRubik{CBp} |
| 2203 |
% \end{supertabular} |
| 2204 |
% |
| 2205 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2206 |
% \dntextRubik{MR} |
| 2207 |
% \dntextRubik{MRp} |
| 2208 |
% \dntextRubik{ML} |
| 2209 |
% \dntextRubik{MLp} |
| 2210 |
% \dntextRubik{MU} |
| 2211 |
% \dntextRubik{MUp} |
| 2212 |
% \dntextRubik{MD} |
| 2213 |
% \dntextRubik{MDp} |
| 2214 |
% \dntextRubik{MF} |
| 2215 |
% \dntextRubik{MFp} |
| 2216 |
% \dntextRubik{MB} |
| 2217 |
% \dntextRubik{MBp} |
| 2218 |
% \end{supertabular} |
| 2219 |
% |
| 2220 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2221 |
% \dntextRubik{SR} |
| 2222 |
% \dntextRubik{SRp} |
| 2223 |
% \dntextRubik{SL} |
| 2224 |
% \dntextRubik{SLp} |
| 2225 |
% \dntextRubik{SU} |
| 2226 |
% \dntextRubik{SUp} |
| 2227 |
% \dntextRubik{SD} |
| 2228 |
% \dntextRubik{SDp} |
| 2229 |
% \dntextRubik{SF} |
| 2230 |
% \dntextRubik{SFp} |
| 2231 |
% \dntextRubik{SB} |
| 2232 |
% \dntextRubik{SBp} |
| 2233 |
% \end{supertabular} |
| 2234 |
% |
| 2235 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 2236 |
% \dntextRubik{TR} |
| 2237 |
% \dntextRubik{TRp} |
| 2238 |
% \dntextRubik{TL} |
| 2239 |
% \dntextRubik{TLp} |
| 2240 |
% \dntextRubik{TU} |
| 2241 |
% \dntextRubik{TUp} |
| 2242 |
% \dntextRubik{TD} |
| 2243 |
% \dntextRubik{TDp} |
| 2244 |
% \dntextRubik{TF} |
| 2245 |
% \dntextRubik{TFp} |
| 2246 |
% \dntextRubik{TB} |
| 2247 |
% \dntextRubik{TBp} |
| 2248 |
% \end{supertabular} |
| 2249 |
% |
| 2250 |
% |
| 2251 |
% \subsection{The rubikfont} |
| 2252 |
% \label{sec:rubikfont} |
| 2253 |
% |
| 2254 |
% For hieroglyph-related text we use the standard Computer Modern Sans (cmss) |
| 2255 |
% bold extended (bx) 10pt font for upper-case letters, and the 8pt footnote size for lower-case |
| 2256 |
% letters (see Section~\ref{sec:coderubikfont} for details). This font (rubikfont) |
| 2257 |
% and the `prime' symbol (rubikprime) can be easily changed by `renewing' the three commands there. |
| 2258 |
% |
| 2259 |
% For~example, to change to the somewhat `lighter' semi-bold extended (sbx) CM Sans (cmss) form |
| 2260 |
% one can simply include the following in the preamble (the FNS suffix stands for `footnotesize'): |
| 2261 |
%\begin{verbatim} |
| 2262 |
% \makeatletter |
| 2263 |
% \renewcommand{\@rubikfont}{\fontsize{10}{12pt}\usefont{T1}{cmss}{sbx}{n}} |
| 2264 |
% \renewcommand{\@rubikfontFNS}{\fontsize{8}{12pt}\usefont{T1}{cmss}{sbx}{n}} |
| 2265 |
% \makeatother |
| 2266 |
%\end{verbatim} |
| 2267 |
% |
| 2268 |
% |
| 2269 |
% \subsubsection*{The `rubikprime' symbol} |
| 2270 |
% \label{sec:rubikprime} |
| 2271 |
% |
| 2272 |
% We currently use the apostrophe for the prime symbol (see Section~\ref{sec:coderubikfont}), |
| 2273 |
% since the maths \cmd{\prime} seems to be a bit too faint (especially since we need to use |
| 2274 |
% the `scriptstyle' size in this setting). However, users can |
| 2275 |
% easily make the Rubik bundle use the maths prime instead, by loading the following |
| 2276 |
% in the preamble. |
| 2277 |
%\begin{verbatim} |
| 2278 |
% \makeatletter |
| 2279 |
% \renewcommand{\@rubikprime}{\raisebox{1.2pt}{\ensuremath{\scriptstyle{^\prime}}}} |
| 2280 |
% \makeatother |
| 2281 |
%\end{verbatim} |
| 2282 |
% |
| 2283 |
% |
| 2284 |
% |
| 2285 |
% \section{Draw commands} |
| 2286 |
% |
| 2287 |
% A \cmd{\Draw..} command typesets either a cubie, cube or face |
| 2288 |
% using parameters set or defined via |
| 2289 |
% previous parameter-allocation commands (e.g.,~colours, dimensions etc). |
| 2290 |
% |
| 2291 |
% It is important to distinguish between the \rubikcube\ package \cmd{\Draw..} commands |
| 2292 |
% (with an upper-case~D) and TikZ \cmd{\draw..} commands (with a lowercase~d). |
| 2293 |
% Rubik \cmd{\Draw..} commands are implemented by the |
| 2294 |
% TikZ \cmd{\draw..} commands, and consequently \cmd{\Draw..} commands can only be |
| 2295 |
% used \textit{inside} a TikZ picture environment---and hence they can also be used safely in |
| 2296 |
% conjunction with the \cmd{\ShowCube} command, which itself uses a TikZ picture environment. |
| 2297 |
% See also Section~\ref{sec:drawerrormessage} below. |
| 2298 |
% |
| 2299 |
% There are six types of \cmd{\Draw..} commands, as follows: |
| 2300 |
% \begin{quote} |
| 2301 |
% \noindent\cmd{\DrawCubie..} |
| 2302 |
% \newline\noindent\cmd{\DrawRubikCube..} |
| 2303 |
% \newline\noindent\cmd{\DrawRubikCubeSidebar..} |
| 2304 |
% \newline\noindent\cmd{\DrawRubikFace..} |
| 2305 |
% \newline\noindent\cmd{\DrawRubikFlat..} |
| 2306 |
% \newline\noindent\cmd{\DrawNCube..} |
| 2307 |
% \end{quote} |
| 2308 |
% Note that the former \cmd{\DrawRubikLayer..}, \cmd{\DrawCube..}, \cmd{\DrawFace..} |
| 2309 |
% commands are now deprecated, since they have |
| 2310 |
% been superseded by more versatile and intuitive commands (see Section~\ref{sec:deprecated}). |
| 2311 |
% |
| 2312 |
% |
| 2313 |
% \subsection[Error message]{\cmd{\Draw} error message} |
| 2314 |
% \label{sec:drawerrormessage} |
| 2315 |
% |
| 2316 |
% If a \cmd{\Draw..} command is used \textit{outside} a |
| 2317 |
% TikZ picture environment, then \LaTeX\ issues an |
| 2318 |
% ``Undefined control sequence'' error message, indicating |
| 2319 |
% that it is trying to draw something using an undefined |
| 2320 |
% TikZ \cmd{\draw} command\,\footnote{Note that the TikZ \cmd{\draw} command |
| 2321 |
% uses a lower-case `d', while all \rubikcube\ commands start with an upper-case letter.}. |
| 2322 |
% |
| 2323 |
% This is because all Rubik \cmd{\Draw..} commands achieve their effects by |
| 2324 |
% implementing a series of TikZ \cmd{\draw..} and other commands, all of which |
| 2325 |
% need to be inside a \texttt{tikzpicture} environment. |
| 2326 |
% |
| 2327 |
% For~example, if the command \cmd{\DrawRubikCubeF} is used |
| 2328 |
% without a surrounding TikZ picture environment, |
| 2329 |
% then something similar to the following error message will be generated. |
| 2330 |
%\begin{verbatim} |
| 2331 |
%! Undefined control sequence. |
| 2332 |
%\DrawRubikFlatUp ... }{#1}\pgfmathsetmacro {\uy }{#2}\draw |
| 2333 |
% [line join=round,... |
| 2334 |
%l.56 \DrawRubikCubeF |
| 2335 |
%\end{verbatim} |
| 2336 |
% |
| 2337 |
% |
| 2338 |
% |
| 2339 |
% \subsection{DrawCubie commands} |
| 2340 |
% \label{sec:drawcubie} |
| 2341 |
% |
| 2342 |
% \DescribeMacro{\DrawCubieXY} |
| 2343 |
% This command draws a single cubie in one of four |
| 2344 |
% orientations as denoted by the terminal XY viewing-direction |
| 2345 |
% codes. |
| 2346 |
% Since a single cubie has only three visible faces this command takes three |
| 2347 |
% xyz-ordered colour parameter arguments. Consequently the \cmd{\DrawCubie} |
| 2348 |
% command has the format |
| 2349 |
% \begin{quote} |
| 2350 |
% \cmd{\DrawCubieXY\{x\}\{y\}\{z\}} |
| 2351 |
% \end{quote} |
| 2352 |
% where the XY pair denotes the viewing direction as before, and |
| 2353 |
% the xyz parameters denote the face colours associated with each of |
| 2354 |
% the three axes. |
| 2355 |
% |
| 2356 |
% For~example, the command \cmd{\DrawCubieRU\{O\}\{Y\}\{G\}} draws a |
| 2357 |
% single cubie as viewed from the RightUp direction, |
| 2358 |
% with face colours Orange (x-axis), Yellow (y-axis), Green (z-axis), as follows. |
| 2359 |
% |
| 2360 |
% \medskip |
| 2361 |
% |
| 2362 |
% \ShowCube{1.33cm}{1}{\DrawCubieRU{O}{Y}{G}} |
| 2363 |
% \hspace{1cm} |
| 2364 |
% \begin{minipage}{0.6\textwidth} |
| 2365 |
%\begin{verbatim} |
| 2366 |
% \ShowCube{1.33cm}{1}{\DrawCubieRU{O}{Y}{G}} |
| 2367 |
%\end{verbatim} |
| 2368 |
% \end{minipage} |
| 2369 |
% |
| 2370 |
% \medskip |
| 2371 |
% |
| 2372 |
% {\noindent}Since the front face is 1~unit wide and the 2D width of the side approx 1/3~unit, |
| 2373 |
% and the scale-factor =~1, then the minipage width required for the cubie image |
| 2374 |
% $=(1.33 \times 1) = 1.33$cm. |
| 2375 |
% |
| 2376 |
% \begin{figure}[hbt] |
| 2377 |
% \centering |
| 2378 |
% \ifpdf |
| 2379 |
% \includegraphics[height=4cm]{rubik-doc-figC.pdf} |
| 2380 |
% \else |
| 2381 |
% \includegraphics[height=4cm]{rubik-doc-figC.eps} |
| 2382 |
% \fi |
| 2383 |
% \vspace{-5mm}\caption{\label{fig:cubiedydx}Cubiedy and Cubiedx parameters} |
| 2384 |
% \end{figure} |
| 2385 |
% |
| 2386 |
% \DescribeMacro{\Cubiedy} |
| 2387 |
% \DescribeMacro{\Cubiedx} |
| 2388 |
% Minor cubie configuration changes can be effected |
| 2389 |
% by adjusting the Cubiedy and Cubiedx values ($> 0$; no units) |
| 2390 |
% shown in Figure~\ref{fig:cubiedydx} via the two commands |
| 2391 |
% \begin{quote} |
| 2392 |
% \cmd{\Cubiedy\{\}} \\ |
| 2393 |
% \cmd{\Cubiedx\{\}} |
| 2394 |
% \end{quote} |
| 2395 |
% as shown in the following example. |
| 2396 |
% |
| 2397 |
% \bigskip |
| 2398 |
% |
| 2399 |
% \ShowCube{1.7cm}{1}{% |
| 2400 |
% \Cubiedy{0.4}% |
| 2401 |
% \Cubiedx{0.8}% |
| 2402 |
% \DrawCubieRU{O}{Y}{G}% |
| 2403 |
% } |
| 2404 |
% \hspace{2cm} |
| 2405 |
% \begin{minipage}{0.6\textwidth} |
| 2406 |
%\begin{verbatim} |
| 2407 |
% \ShowCube{1.7cm}{1}{% |
| 2408 |
% \Cubiedy{0.4} |
| 2409 |
% \Cubiedx{0.8} |
| 2410 |
% \DrawCubieRU{O}{Y}{G} |
| 2411 |
% } |
| 2412 |
%\end{verbatim} |
| 2413 |
% \end{minipage} |
| 2414 |
% |
| 2415 |
% \bigskip |
| 2416 |
% |
| 2417 |
% {\noindent}Note that the \textsc{front} face of the cubie is a unit square, |
| 2418 |
% and the graphic origin of the cubie image is at the bottom left corner of the |
| 2419 |
% \textsc{front} face (see also the section on Arrows: Section~\ref{sec:arrows}). |
| 2420 |
% The default values of \cmd{\Cubiedy} and \cmd{\Cubiedx} are 0.4. |
| 2421 |
% |
| 2422 |
% |
| 2423 |
% |
| 2424 |
% \subsection{textCubie commands} |
| 2425 |
% |
| 2426 |
% \DescribeMacro{\textCubieRU} |
| 2427 |
% \DescribeMacro{\textCubieRD} |
| 2428 |
% \DescribeMacro{\textCubieLU} |
| 2429 |
% \DescribeMacro{\textCubieLD} |
| 2430 |
% For convenience, there are also four (smaller) `text' versions \textCubieRU{O}{Y}{G} |
| 2431 |
% of the four \cmd{\DrawCubie} commands for use in ordinary text, as follows: |
| 2432 |
% \begin{quote} |
| 2433 |
% \textCubieRU{O}{Y}{G} \ \ |\textCubieRU{O}{Y}{G}| |
| 2434 |
% |
| 2435 |
% \medskip |
| 2436 |
% |
| 2437 |
% \textCubieRD{O}{Y}{G} \ \ |\textCubieRD{O}{Y}{G}| |
| 2438 |
% |
| 2439 |
% \medskip |
| 2440 |
% |
| 2441 |
% \textCubieLU{O}{Y}{G} \ \ |\textCubieLU{O}{Y}{G}| |
| 2442 |
% |
| 2443 |
% \medskip |
| 2444 |
% |
| 2445 |
% \textCubieLD{O}{Y}{G} \ \ |\textCubieLD{O}{Y}{G}| |
| 2446 |
% \end{quote} |
| 2447 |
% Note that these \cmd{\textCubieXY} commands are not influenced by the |
| 2448 |
% \cmd{\Cubiedy}, \cmd{\Cubiedx} commands as their size is pre-set for text use. |
| 2449 |
% |
| 2450 |
% |
| 2451 |
% |
| 2452 |
% \subsection{DrawRubikCube commands} |
| 2453 |
% \label{sec:drawrubikcubecommands} |
| 2454 |
% |
| 2455 |
% \DescribeMacro{\DrawRubikCubeXY} |
| 2456 |
% \DescribeMacro{\DrawRubikCubeF} |
| 2457 |
% \DescribeMacro{\DrawRubikCubeSF} |
| 2458 |
% This command draws Rubik cubes in one of four oblique |
| 2459 |
% orientations or configurations as denoted by the following terminal |
| 2460 |
% XY viewing-direction codes: RU~(RightUp), RD~(RightDown), LU~(LeftUp), |
| 2461 |
% LD~(LeftDown); two additional terminal codes are F~(Flat) and SF~(Semi-Flat). |
| 2462 |
% For~example, the command |
| 2463 |
% \begin{quote} |
| 2464 |
% \cmd{\DrawRubikCubeRU} |
| 2465 |
% \end{quote} |
| 2466 |
% will draw a Rubik cube as viewed from the RightUp direction (RU), as |
| 2467 |
% shown in the following figure. |
| 2468 |
% |
| 2469 |
% \bigskip |
| 2470 |
% |
| 2471 |
% \begin{minipage}{2.8cm} |
| 2472 |
% \begin{tikzpicture}[scale=0.7] |
| 2473 |
% \RubikCubeSolvedWY |
| 2474 |
% \DrawRubikCubeRU |
| 2475 |
% \end{tikzpicture}% |
| 2476 |
% \end{minipage} |
| 2477 |
% \hspace{5mm} |
| 2478 |
% \begin{minipage}{0.6\textwidth} |
| 2479 |
%\begin{verbatim} |
| 2480 |
% \RubikCubeSolvedWY |
| 2481 |
% \ShowCube{3cm}{0.7}{\DrawRubikCubeRU} |
| 2482 |
%\end{verbatim} |
| 2483 |
% \end{minipage} |
| 2484 |
% |
| 2485 |
% \bigskip |
| 2486 |
% |
| 2487 |
% \DescribeMacro{\DrawRubikCubeF} |
| 2488 |
% This command draws the completely flat (F) format of the cube, as shown in the following example. |
| 2489 |
% |
| 2490 |
% \bigskip |
| 2491 |
% |
| 2492 |
% \begin{minipage}{0.4\textwidth} |
| 2493 |
% \centering |
| 2494 |
% \begin{tikzpicture}[scale=0.4] |
| 2495 |
% \RubikCubeSolvedWY |
| 2496 |
% \DrawRubikCubeF |
| 2497 |
% \node (U) at (1.5, 4.5) [black]{\small\textsf{U}}; |
| 2498 |
% \node (D) at (1.5, -1.5) [black]{\small\textsf{D}}; |
| 2499 |
% \node (L) at (-1.5, 1.5) [black]{\small\textsf{L}}; |
| 2500 |
% \node (R) at (4.5, 1.5) [black]{\small\textsf{R}}; |
| 2501 |
% \node (F) at (1.5, 1.5) [black]{\small\textsf{F}}; |
| 2502 |
% \node (B) at (7.5, 1.5) [black]{\small\textsf{B}}; |
| 2503 |
% \end{tikzpicture}% |
| 2504 |
% \end{minipage} |
| 2505 |
% \begin{minipage}{5cm} |
| 2506 |
%\begin{verbatim} |
| 2507 |
% \RubikCubeSolvedWY |
| 2508 |
% \ShowCube{5cm}{0.4}{\DrawRubikCubeF} |
| 2509 |
%\end{verbatim} |
| 2510 |
% \end{minipage} |
| 2511 |
% |
| 2512 |
% \bigskip |
| 2513 |
% |
| 2514 |
% The addition of text (numbers or letters) in the faces is |
| 2515 |
% straightforward---the origin of the 1-unit grid is located at the |
| 2516 |
% bottom left corner of the \textsc{front} face (orange here). |
| 2517 |
% The letters were placed using the following TikZ code inside the |
| 2518 |
% TikZ picture environment |
| 2519 |
% (remember TikZ commands require a terminal semi-colon~;). |
| 2520 |
% |
| 2521 |
%\begin{verbatim} |
| 2522 |
% \RubikCubeSolved |
| 2523 |
% \ShowCube{5cm}{0.4}{% |
| 2524 |
% \DrawRubikCubeF |
| 2525 |
% \node (U) at (1.5, 4.5) [black]{\small\textsf{U}}; |
| 2526 |
% \node (D) at (1.5, -1.5) [black]{\small\textsf{D}}; |
| 2527 |
% \node (L) at (-1.5, 1.5) [black]{\small\textsf{L}}; |
| 2528 |
% \node (R) at (4.5, 1.5) [black]{\small\textsf{R}}; |
| 2529 |
% \node (F) at (1.5, 1.5) [black]{\small\textsf{F}}; |
| 2530 |
% \node (B) at (7.5, 1.5) [black]{\small\textsf{B}}; |
| 2531 |
% } |
| 2532 |
%\end{verbatim} |
| 2533 |
% |
| 2534 |
% \DescribeMacro{\DrawRubikCubeSF} |
| 2535 |
% {\noindent}A useful `semi-flat' (SF) alternative format, which uses |
| 2536 |
% the standard RU view of the cube and appends the three hidden |
| 2537 |
% sides (cf.,~Rokicki \textit{et~al.}, 2013), is generated by the |
| 2538 |
% command \cmd{\DrawRubikCubeSF} as follows. |
| 2539 |
% |
| 2540 |
% \bigskip |
| 2541 |
% |
| 2542 |
% \begin{minipage}{5cm} |
| 2543 |
% \begin{tikzpicture}[scale=0.5] |
| 2544 |
% \RubikCubeSolvedWY |
| 2545 |
% \DrawRubikCubeSF |
| 2546 |
% \node (B) at (5.5, 2.5) [white]{\small\textsf{B}}; |
| 2547 |
% \end{tikzpicture}% |
| 2548 |
% \end{minipage} |
| 2549 |
% \begin{minipage}{5cm} |
| 2550 |
%\begin{verbatim} |
| 2551 |
% \RubikCubeSolvedWY |
| 2552 |
% \ShowCube{5cm}{0.5}{% |
| 2553 |
% \DrawRubikCubeSF |
| 2554 |
% \node (B) at (5.5, 2.5) |
| 2555 |
% [white]{\small\textsf{B}}; |
| 2556 |
% } |
| 2557 |
%\end{verbatim} |
| 2558 |
% \end{minipage} |
| 2559 |
% |
| 2560 |
% \bigskip |
| 2561 |
% |
| 2562 |
% Note that even in this configuration it is straight-forward to |
| 2563 |
% write text on the graphic, since the 2D width (on the page) of |
| 2564 |
% the green \textsc{right} face is exactly 1-unit, and the |
| 2565 |
% bottom right-hand corner of the green face is raised exactly 1-unit |
| 2566 |
% (see Figure~\ref{fig:cubesquaregraph}). |
| 2567 |
% Consequently, since the origin of the coordinate-grid is at the bottom left |
| 2568 |
% corner of the \textsc{front} face (the orange face here), the ($x,y$) coordinates |
| 2569 |
% of the centre of the red \textsc{back} face are easily determined to be (5.5, 2.5). |
| 2570 |
% |
| 2571 |
% |
| 2572 |
% |
| 2573 |
% \subsection{DrawRubikFace.. commands} |
| 2574 |
% \label{sec:drawrubikfacecommands} |
| 2575 |
% |
| 2576 |
% |
| 2577 |
% \DescribeMacro{\DrawRubikFaceUp} |
| 2578 |
% \DescribeMacro{\DrawRubikFaceDown} |
| 2579 |
% \DescribeMacro{\DrawRubikFaceLeft} |
| 2580 |
% \DescribeMacro{\DrawRubikFaceRight} |
| 2581 |
% \DescribeMacro{\DrawRubikFaceFront} |
| 2582 |
% \DescribeMacro{\DrawRubikFaceBack} |
| 2583 |
% \DescribeMacro{\DrawRubikFaceUpSide} |
| 2584 |
% \DescribeMacro{\DrawRubikFaceDownSide} |
| 2585 |
% \DescribeMacro{\DrawRubikFaceLeftSide} |
| 2586 |
% \DescribeMacro{\DrawRubikFaceRightSide} |
| 2587 |
% \DescribeMacro{\DrawRubikFaceFrontSide} |
| 2588 |
% \DescribeMacro{\DrawRubikFaceBackSide} |
| 2589 |
% These commands draw the current state of a specified face |
| 2590 |
% (e.g.,~\cmd{\DrawRubikFaceUp}), or the face and all the associated sidebars |
| 2591 |
% (e.g.,~\cmd{\DrawRubikFaceUpSide}). These commands do \textsc{not} take any |
| 2592 |
% arguments---for code see Section~\ref{sec:drawrubikfacecode}. |
| 2593 |
% |
| 2594 |
% \textsc{Note}: These commands replace the earlier |
| 2595 |
% \cmd{\DrawFace...} commands (see Section~\ref{sec:deprecated}). |
| 2596 |
% |
| 2597 |
% For example, a simple way to show the yellow-cross configuration in |
| 2598 |
% the \textsc{up}~face would be to first define the colours using |
| 2599 |
% the \cmd{\RubikFaceUp} command, and then draw the \textsc{up} face |
| 2600 |
% using the \cmd{\DrawRubikFaceUp} command, as follows: |
| 2601 |
% |
| 2602 |
% \bigskip |
| 2603 |
% |
| 2604 |
% |
| 2605 |
% \RubikFaceUp{X}{Y}{X} |
| 2606 |
% {Y}{Y}{Y} |
| 2607 |
% {X}{Y}{X} |
| 2608 |
% \ShowCube{2.1cm}{0.7}{\DrawRubikFaceUp} |
| 2609 |
% \hspace{1cm} |
| 2610 |
% \begin{minipage}{0.6\textwidth} |
| 2611 |
%\begin{verbatim} |
| 2612 |
% \RubikFaceUp{X}{Y}{X} |
| 2613 |
% {Y}{Y}{Y} |
| 2614 |
% {X}{Y}{X} |
| 2615 |
% \ShowCube{2.1cm}{0.7}{\DrawRubikFaceUp} |
| 2616 |
%\end{verbatim} |
| 2617 |
% \end{minipage} |
| 2618 |
% |
| 2619 |
% |
| 2620 |
% |
| 2621 |
% \subsection[Drawing Sidebars (Face)]{Sidebars \& DrawRubikFaceXSide commands} |
| 2622 |
% \label{sec:sidebars} |
| 2623 |
% |
| 2624 |
% |
| 2625 |
% In the next example we use the \cmd{\DrawRubikFaceUpSide} command to |
| 2626 |
% draw the \textsc{up}~face and all its sidebars in a cube having |
| 2627 |
% a `solved' WY (White opposite Yellow) configuration. |
| 2628 |
% |
| 2629 |
% \bigskip |
| 2630 |
% |
| 2631 |
% \RubikCubeSolvedWY |
| 2632 |
% \ShowCube{1.6cm}{0.5}{\DrawRubikFaceUpSide} |
| 2633 |
% \hspace{1cm} |
| 2634 |
% \begin{minipage}{0.6\textwidth} |
| 2635 |
%\begin{verbatim} |
| 2636 |
% \RubikCubeSolvedWY |
| 2637 |
% \ShowCube{1.6cm}{0.5}{\DrawRubikFaceUpSide} |
| 2638 |
%\end{verbatim} |
| 2639 |
% \end{minipage} |
| 2640 |
% |
| 2641 |
% \bigskip |
| 2642 |
% |
| 2643 |
% \noindent\textbf{Short-hand versions}: For convenience each of these commands |
| 2644 |
% has an equivalent short-hand version generated by using just the first letter of the |
| 2645 |
% face name and (where appropriate) the first letter of the word Side. For~example, |
| 2646 |
% \newline\cmd{\DrawRubikFaceR} $\equiv$ \cmd{\DrawRubikFaceRight}, |
| 2647 |
% \newline \cmd{\DrawRubikFaceRS} $\equiv$ \cmd{\DrawRubikFaceRightSide}, etc. |
| 2648 |
% |
| 2649 |
% |
| 2650 |
% |
| 2651 |
% |
| 2652 |
% |
| 2653 |
% \subsection{Sidebar parameters} |
| 2654 |
% \label{sec:sidebarparameters} |
| 2655 |
% |
| 2656 |
% \DescribeMacro{\RubikSidebarWidth} |
| 2657 |
% \DescribeMacro{\RubikSidebarLength} |
| 2658 |
% \DescribeMacro{\RubikSidebarSep} |
| 2659 |
% The default values (size) of the sidebars are as follows: |
| 2660 |
% width (0.3), length(1) and separation from the square face (0.3) |
| 2661 |
% ---see Section~\ref{sec:sidebarcode} for the code. |
| 2662 |
% Note that the default value of the length of a cubie side is 1. |
| 2663 |
% These sidebar values (decimal values $\geq 0$; no units) can be |
| 2664 |
% changed from their default values using the three commands. |
| 2665 |
% \begin{quote} |
| 2666 |
% \cmd{\RubikSidebarWidth\{\}}\hspace{35.751pt}(default = 0.3)\\ |
| 2667 |
% \cmd{\RubikSidebarLength\{\}}\hspace{30pt}(default = 1.0)\\ |
| 2668 |
% \cmd{\RubikSidebarSep\{\}}\hspace{46.251pt}(default = 0.3) |
| 2669 |
% \end{quote} |
| 2670 |
% Values set in the document preamble will apply globally, while values |
| 2671 |
% set within a TikZ picture environment will apply only locally to that |
| 2672 |
% particular environment. Alternatively, one can keep the effect local |
| 2673 |
% using braces (see below). |
| 2674 |
% |
| 2675 |
% In the following example, we show the effect |
| 2676 |
% on the \textsc{up} face and sidebars of a normally solved (WY) cube |
| 2677 |
% after dramatically changing the sidebar width, length and separation |
| 2678 |
% from the default values---compare with the previous image. |
| 2679 |
% For~convenience, we have used a pair of braces |
| 2680 |
% to keep the effect local to this example. |
| 2681 |
% |
| 2682 |
% \bigskip |
| 2683 |
% |
| 2684 |
% { |
| 2685 |
% \RubikCubeSolvedWY |
| 2686 |
% \RubikSidebarWidth{0.8} |
| 2687 |
% \RubikSidebarLength{0.5} |
| 2688 |
% \RubikSidebarSep{0.7} |
| 2689 |
% \ShowCube{2cm}{0.5}{\DrawRubikFaceUpSide} |
| 2690 |
% } |
| 2691 |
% \hspace{2cm} |
| 2692 |
% \begin{minipage}{0.6\textwidth} |
| 2693 |
%\begin{verbatim} |
| 2694 |
% { |
| 2695 |
% \RubikCubeSolvedWY |
| 2696 |
% \RubikSidebarWidth{0.8} |
| 2697 |
% \RubikSidebarLength{0.5} |
| 2698 |
% \RubikSidebarSep{0.7} |
| 2699 |
% \ShowCube{2cm}{0.5}{\DrawRubikFaceUpSide} |
| 2700 |
% } |
| 2701 |
%\end{verbatim} |
| 2702 |
% \end{minipage} |
| 2703 |
% |
| 2704 |
% \bigskip |
| 2705 |
% |
| 2706 |
% Note also that changing the sidebar-width or sidebar-separation |
| 2707 |
% values may well also change the surrounding white-space (use \cmd{\fbox} |
| 2708 |
% to visualise this) and may therefore require some fine-tuning of the |
| 2709 |
% minipage width setting in order to optimise appearance. |
| 2710 |
% |
| 2711 |
% |
| 2712 |
% |
| 2713 |
% |
| 2714 |
% \subsection[NoSidebar command]{\cmd{\NoSidebar} command} |
| 2715 |
% \label{sec:nosidebar} |
| 2716 |
% |
| 2717 |
% \DescribeMacro{\NoSidebar} |
| 2718 |
% The \cmd{\NoSidebar}\marg{colour-code} command |
| 2719 |
% (which takes a single colour code argument) |
| 2720 |
% allows the user to disable the drawing of sidebars having a particular colour |
| 2721 |
% (for code see Section~\ref{sec:nosidebarcode}). |
| 2722 |
% Its action can be localised by placing the command inside an environment |
| 2723 |
% (e.g.,~inside the \verb!\ShowCube! environment). |
| 2724 |
% Alternatively, the action of this command can be disabled simply by writing it with an empty |
| 2725 |
% argument, e.g.,~\verb!\NoSidebar{}!. |
| 2726 |
% |
| 2727 |
% This command is designed to facilitate the drawing of so-called |
| 2728 |
% OLL (Orientate Last Layer) configurations, |
| 2729 |
% which are typically rendered using the yellow face. |
| 2730 |
% |
| 2731 |
% For~example, the following figure uses the \verb!\DrawRubikFaceUpSide! command to |
| 2732 |
% draw the commonly encountered OLL configuration known as the `yellow cross' |
| 2733 |
% (the remaining four yellow facelets associated with this layer are shown as sidebars). |
| 2734 |
% In this example, we first define the colours for the whole cube (grey), and then |
| 2735 |
% redefine the colours for the \textsc{up}~face and its four adjacent faces. |
| 2736 |
% Finally we draw the \textsc{up}~face and sidebars; we also show an alternative |
| 2737 |
% way of writing the facelet colour codes (ie without using the curly brackets). |
| 2738 |
% |
| 2739 |
% \bigskip |
| 2740 |
% |
| 2741 |
% \begin{minipage}{3cm} |
| 2742 |
% \RubikCubeGreyAll |
| 2743 |
% \RubikFaceUp XYX |
| 2744 |
% YYY |
| 2745 |
% XYX |
| 2746 |
% \RubikFaceFront YXY XXXXXX |
| 2747 |
% \RubikFaceRight XXY XXXXXX |
| 2748 |
% \RubikFaceBack XXX XXXXXX |
| 2749 |
% \RubikFaceLeft YXX XXXXXX |
| 2750 |
% \ShowCube{2.6cm}{0.6}{\DrawRubikFaceUpSide} |
| 2751 |
% \end{minipage} |
| 2752 |
% \hspace{4mm} |
| 2753 |
% \begin{minipage}{5cm} |
| 2754 |
% \begin{verbatim} |
| 2755 |
% \RubikCubeGreyAll |
| 2756 |
% \RubikFaceUp XYX |
| 2757 |
% YYY |
| 2758 |
% XYX |
| 2759 |
% \RubikFaceFront YXY XXXXXX |
| 2760 |
% \RubikFaceRight XXY XXXXXX |
| 2761 |
% \RubikFaceBack XXX XXXXXX |
| 2762 |
% \RubikFaceLeft YXX XXXXXX |
| 2763 |
% \ShowCube{2.6cm}{0.6}{\DrawRubikFaceUpSide} |
| 2764 |
% \end{verbatim} |
| 2765 |
% \end{minipage} |
| 2766 |
% \bigskip |
| 2767 |
% |
| 2768 |
% {\noindent}However, we can greatly improve the OLL image by |
| 2769 |
% disabling the drawing of all the grey (X) sidebars by using the |
| 2770 |
% \verb!\NoSidebar{X}! command as follows (here we have placed the |
| 2771 |
% \verb!\NoSidebar{X}! command inside the \verb!\ShowCube! environment |
| 2772 |
% in order to limit its action locally). Note also that this time we |
| 2773 |
% have used the short-hand US (UpSide) version of the |
| 2774 |
% \cmd{\DrawRubikFaceUpSide} command. |
| 2775 |
% |
| 2776 |
% \bigskip |
| 2777 |
% |
| 2778 |
% \begin{minipage}{3cm} |
| 2779 |
% \RubikCubeGreyAll |
| 2780 |
% \RubikFaceUp XYX |
| 2781 |
% YYY |
| 2782 |
% XYX |
| 2783 |
% \RubikFaceFront YXY XXXXXX |
| 2784 |
% \RubikFaceRight XXY XXXXXX |
| 2785 |
% \RubikFaceBack XXX XXXXXX |
| 2786 |
% \RubikFaceLeft YXX XXXXXX |
| 2787 |
% \ShowCube{2.6cm}{0.6}{\NoSidebar{X}\DrawRubikFaceUS} |
| 2788 |
% \end{minipage} |
| 2789 |
% \hspace{4mm} |
| 2790 |
% \begin{minipage}{5cm} |
| 2791 |
% \begin{verbatim} |
| 2792 |
% \RubikCubeGreyAll |
| 2793 |
% ... |
| 2794 |
% ... |
| 2795 |
% \ShowCube{2.6cm}{0.6}{\NoSidebar{X}% |
| 2796 |
% \DrawRubikFaceUS% |
| 2797 |
% } |
| 2798 |
% \end{verbatim} |
| 2799 |
% \end{minipage} |
| 2800 |
% |
| 2801 |
% \bigskip |
| 2802 |
% |
| 2803 |
% |
| 2804 |
% |
| 2805 |
% \subsection[Drawing Sidebars (Cube)]{Cube sidebars \& DrawRubikCubeSidebar commands} |
| 2806 |
% \label{sec:sidebarscube} |
| 2807 |
% |
| 2808 |
% |
| 2809 |
% |
| 2810 |
% |
| 2811 |
% Cube sidebars are drawn adjacent to cube edges which are |
| 2812 |
% defined by the two faces forming the edge. |
| 2813 |
% Thus the BR (Back-Right) sidebar is placed adjacent to the |
| 2814 |
% edge formed by the \textsc{back} and \textsc{right} faces. |
| 2815 |
% |
| 2816 |
% Since the cube orientation (view direction; RU, RD, LU, LD) |
| 2817 |
% determines which sidebars are visible, the command for drawing |
| 2818 |
% the sidebar (\texttt{DrawRubikCubeSidebar..}) also needs to |
| 2819 |
% incorporate the view direction. The command takes |
| 2820 |
% two mandatory arguments: the first is the pair of face codes defining the edge (XX); |
| 2821 |
% the second is the view direction, as follows: |
| 2822 |
% \begin{quote} |
| 2823 |
% \cmd{\DrawRubikCubeSidebarXX}\marg{view direction} |
| 2824 |
% |
| 2825 |
% \textsc{example:} \verb!\DrawRubikCubeSidebarRB{LD}! |
| 2826 |
% \end{quote} |
| 2827 |
% Note that the pair of face codes are order \textit{independent}, |
| 2828 |
% and hence can be written in any order, which makes remembering the commands very easy. |
| 2829 |
% |
| 2830 |
% Note also that at present commands are only available for the |
| 2831 |
% eight sidebars which are parallel to X,Y axes, as these seem |
| 2832 |
% to be the most useful. |
| 2833 |
% |
| 2834 |
% In the following example, we input a previously saved cube state |
| 2835 |
% (in the file \texttt{cubestate-A.tex}) and draw the cube and the |
| 2836 |
% four main sidebars (BR, BD, FL, FU) visible from the RD view direction. |
| 2837 |
% |
| 2838 |
% \bigskip |
| 2839 |
% |
| 2840 |
% \RubikFaceUp{O}{G}{Y}{B}{B}{O}{R}{B}{G}% |
| 2841 |
% \RubikFaceDown{Y}{R}{B}{R}{W}{O}{W}{Y}{R}% |
| 2842 |
% \RubikFaceLeft{Y}{G}{W}{W}{Y}{R}{O}{W}{B}% |
| 2843 |
% \RubikFaceRight{B}{B}{B}{W}{G}{O}{R}{G}{W}% |
| 2844 |
% \RubikFaceFront{G}{R}{O}{Y}{R}{O}{R}{G}{G}% |
| 2845 |
% \RubikFaceBack{O}{W}{W}{Y}{O}{Y}{Y}{B}{G}% |
| 2846 |
% \ShowCube{4cm}{0.6}{ |
| 2847 |
% \DrawRubikCubeRD |
| 2848 |
% \DrawRubikCubeSidebarBR{RD} |
| 2849 |
% \DrawRubikCubeSidebarBD{RD} |
| 2850 |
% \DrawRubikCubeSidebarFL{RD} |
| 2851 |
% \DrawRubikCubeSidebarFU{RD} |
| 2852 |
% } |
| 2853 |
% \begin{minipage}{5cm} |
| 2854 |
%\begin{verbatim} |
| 2855 |
% \input{cubestate-A.tex} |
| 2856 |
% \ShowCube{3cm}{0.6}{ |
| 2857 |
% \DrawRubikCubeRD |
| 2858 |
% \DrawRubikCubeSidebarBR{RD} |
| 2859 |
% \DrawRubikCubeSidebarBD{RD} |
| 2860 |
% \DrawRubikCubeSidebarFL{RD} |
| 2861 |
% \DrawRubikCubeSidebarFU{RD} |
| 2862 |
% } |
| 2863 |
%\end{verbatim} |
| 2864 |
% \end{minipage} |
| 2865 |
% |
| 2866 |
%\bigskip |
| 2867 |
% |
| 2868 |
% |
| 2869 |
% |
| 2870 |
% |
| 2871 |
% \subsection{DrawRubikFlat commands} |
| 2872 |
% \label{sec:drawrubikflatcommands} |
| 2873 |
% |
| 2874 |
% \DescribeMacro{\DrawRubikFlatUp} |
| 2875 |
% \DescribeMacro{\DrawRubikFlatDown} |
| 2876 |
% \DescribeMacro{\DrawRubikFlatLeft} |
| 2877 |
% \DescribeMacro{\DrawRubikFlatRight} |
| 2878 |
% \DescribeMacro{\DrawRubikFlatFront} |
| 2879 |
% \DescribeMacro{\DrawRubikFlatBack} |
| 2880 |
% The \cmd{\DrawRubikFlat..}\marg{x}\marg{y} commands draw a `flat' square |
| 2881 |
% representation of a specified face, located such that its |
| 2882 |
% bottom left corner is positioned at ($x,y$). |
| 2883 |
% Each command (except \cmd{\DrawRubikFlatFront}) takes two arguments, |
| 2884 |
% namely the X-coordinate and Y-coordinate of the bottom left |
| 2885 |
% corner of the face. This ($x,y$) pair allows the user to position |
| 2886 |
% the face (see Section~\ref{sec:codedrawrubikflatcommands} for the code). |
| 2887 |
% |
| 2888 |
% These commands are designed to supplement the \cmd{\DrawRubikCube...} commands and |
| 2889 |
% allow hidden faces to be represented. |
| 2890 |
% |
| 2891 |
% Note also that the \cmd{\DrawRubikFlatFront} command currently takes \textit{no} |
| 2892 |
% arguments, since by definition the bottom left corner of this face is |
| 2893 |
% always at (0,0), and there seems to be no reason (just now) for |
| 2894 |
% this face to have the ($x,y$) facility. |
| 2895 |
% |
| 2896 |
% \textsc{usage}:\ The following example uses the command \verb!\DrawRubikFlatBack{4}{1}! to |
| 2897 |
% append the \textsc{back} face to the side of a 3D cube. Note that since |
| 2898 |
% the coordinates of the bottom/back/right corner of the cube rendered by the |
| 2899 |
% command \cmd{\DrawRubikCubeRU} is (4,1) |
| 2900 |
% (see Section~\ref{sec:coordinates}), we can position the |
| 2901 |
% lower/left corner of the \textsc{back} face at this point using the command |
| 2902 |
% \verb!\DrawRubikFlatBack{4}{1}! as follows: |
| 2903 |
% |
| 2904 |
% \bigskip |
| 2905 |
% |
| 2906 |
% \begin{minipage}{0.4\textwidth} |
| 2907 |
% \centering |
| 2908 |
% \RubikCubeSolvedWY |
| 2909 |
% \begin{tikzpicture}[scale=0.5] |
| 2910 |
% \DrawRubikCubeRU |
| 2911 |
% \DrawRubikFlatBack{4}{1} |
| 2912 |
% \end{tikzpicture}% |
| 2913 |
% \end{minipage} |
| 2914 |
% \begin{minipage}{5cm} |
| 2915 |
%\begin{verbatim} |
| 2916 |
% \RubikCubeSolvedWY |
| 2917 |
% \ShowCube{3cm}{0.5}{% |
| 2918 |
% \DrawRubikCubeRU |
| 2919 |
% \DrawRubikFlatBack{4}{1} |
| 2920 |
% } |
| 2921 |
%\end{verbatim} |
| 2922 |
% \end{minipage} |
| 2923 |
% |
| 2924 |
% |
| 2925 |
% \subsection[DrawNCube]{DrawNCube (NxNxN)} |
| 2926 |
% \label{sec:NCube} |
| 2927 |
% |
| 2928 |
% \DescribeMacro{\DrawNCubeAll} |
| 2929 |
% An `NCube' is a solved NxNxN cube drawn from the RU direction; |
| 2930 |
% (i.e.,~only shows faces \textsc{up}, \textsc{front}, \textsc{right}). |
| 2931 |
% The cubie colours of each face are All the same. |
| 2932 |
% \begin{quote} |
| 2933 |
% \cmd{\DrawNCubeAll\{N\}\{Xcolour\}\{Ycolour\}\{Zcolour\}}. |
| 2934 |
% \end{quote} |
| 2935 |
% This command takes four ordered parameters (N, X, Y, Z)---the number |
| 2936 |
% (integer; $N>0$) of cubies along an edge, followed by three face |
| 2937 |
% colours in XYZ order. |
| 2938 |
% Since the viewpoint is only from the RU direction, the three colour |
| 2939 |
% parameters are: X(Right), Y(Up), Z(Front). |
| 2940 |
% |
| 2941 |
% \bigskip |
| 2942 |
% |
| 2943 |
% \begin{minipage}{0.3\textwidth} |
| 2944 |
% \begin{tikzpicture}[scale=0.5] |
| 2945 |
% \DrawNCubeAll{5}{O}{Y}{G} |
| 2946 |
% \end{tikzpicture}% |
| 2947 |
% \end{minipage} |
| 2948 |
% \begin{minipage}{0.5\textwidth} |
| 2949 |
%\begin{verbatim} |
| 2950 |
% \ShowCube{3.5cm}{0.5}{\DrawNCubeAll{5}{O}{Y}{G}} |
| 2951 |
%\end{verbatim} |
| 2952 |
% \end{minipage} |
| 2953 |
% |
| 2954 |
% |
| 2955 |
% |
| 2956 |
% |
| 2957 |
% \section[ShowSequence command]{\cmd{\ShowSequence} command} |
| 2958 |
% \label{sec:showsequence} |
| 2959 |
% |
| 2960 |
% \DescribeMacro{\ShowSequence} |
| 2961 |
% \DescribeMacro{\ShowSequenceF} |
| 2962 |
% \DescribeMacro{\ShowSequencef} |
| 2963 |
% The \cmd{\ShowSequence}\marg{separator}\marg{font-code}\marg{sequence} command |
| 2964 |
% typesets a comma-separated sequence of rotation |
| 2965 |
% codes---for code see Section~\ref{sec:codeshowsequence}. |
| 2966 |
% Appending an `F' to the command-name (\cmd{\ShowSequenceF}) results in an fbox around |
| 2967 |
% the whole output (cf.~the \cmd{\ShowCubeF} command). |
| 2968 |
% Appending a lower-case `f' to the command-name (\cmd{\ShowSequencef}) generates fboxs around |
| 2969 |
% \textit{each element} in the output (these two forms can be helpful when checking white space). |
| 2970 |
% |
| 2971 |
% The \cmd{\ShowSequence} command takes three mandatory arguments: |
| 2972 |
% the first is the separator (\verb!#1!), |
| 2973 |
% the second is the font or style code (\verb!#2!), |
| 2974 |
% and third is a comma-separated sequence of Rubik rotation codes (|#3|). |
| 2975 |
% |
| 2976 |
% The separator (e.g.,~comma) used for typesetting the sequence can be specified |
| 2977 |
% (or just omitted---i.e.,~an empty bracket); |
| 2978 |
% the sequence can be either a named sequence (i.e.,~encoded as a macro) or just a |
| 2979 |
% comma separated sequence of rotation codes. |
| 2980 |
% |
| 2981 |
% \noindent\textsc{usage}: |
| 2982 |
% The following command displays the rotation sequence F, R, U, Rp, Up, using |
| 2983 |
% the \verb!\rr! encoding and comma \& space separated. |
| 2984 |
% |
| 2985 |
% \medskip |
| 2986 |
% |
| 2987 |
% \verb!\ShowSequence{,\ }{\rr}{F,R,U,Rp,Up}! \ \ $\rightarrow$ \ \ \ShowSequence{,\ }{\rr}{F,R,U,Rp,Up} |
| 2988 |
% |
| 2989 |
% \medskip |
| 2990 |
% |
| 2991 |
% Remember that if you want a very long sequence to break automatically |
| 2992 |
% at the line-ends, then you need to include at least one space between |
| 2993 |
% the sequence elements, either with or without a comma; for this the |
| 2994 |
% separator argument needs to include a space, i.e.,~something like |
| 2995 |
% \verb!{,\ }! or \verb!{\ }! or just \verb!{ }! perhaps. |
| 2996 |
% |
| 2997 |
% |
| 2998 |
% For~example, the following commands typeset the comma-separated |
| 2999 |
% rotation sequence U,D,Lp,R using different separators and fonts. |
| 3000 |
% For convenience, we start by encoding the sequence as the macro \verb!\myseq!. |
| 3001 |
% |
| 3002 |
% |
| 3003 |
% \newcommand{\myseq}{U,D,Lp,R} |
| 3004 |
% |
| 3005 |
% \medskip\noindent\verb!\newcommand{\myseq}{U,D,Lp,R}! |
| 3006 |
% |
| 3007 |
% \medskip\noindent\verb!\ShowSequence{,}{\texttt}{\myseq}! \ $\longrightarrow$ \ \ShowSequence{,}{\texttt}{\myseq} |
| 3008 |
% |
| 3009 |
% \medskip\noindent\verb!\ShowSequence{,}{\rr}{\myseq}! \ $\longrightarrow$ \ \rr{U},\rr{D},\rr{Lp},\rr{R} |
| 3010 |
% |
| 3011 |
% \medskip\noindent\verb!\ShowSequence{}{\rrh}{\myseq}! \ $\longrightarrow$ \ \rrh{U}\rrh{D}\rrh{Lp}\rrh{R} |
| 3012 |
% |
| 3013 |
% \medskip\noindent\verb!\ShowSequence{\ }{\rrh}{\myseq}! \ $\longrightarrow$ \ \rrh{U}\ \rrh{D}\ \rrh{Lp}\ \rrh{R} |
| 3014 |
% |
| 3015 |
% \medskip\noindent\verb!\ShowSequence{,\ }{\textRubik}{\myseq}! \ $\longrightarrow$ \ \textRubik{U},\ \textRubik{D},\ |
| 3016 |
% \textRubik{Lp},\ \textRubik{R} |
| 3017 |
% |
| 3018 |
% |
| 3019 |
% |
| 3020 |
% |
| 3021 |
% \subsection{Trailing digits} |
| 3022 |
% |
| 3023 |
% Note that the commands \verb!\rr!, \verb!\rrh!, \verb!\Rubik! |
| 3024 |
% and \verb!\textRubik! will fail for rotation codes which |
| 3025 |
% have a trailing digit, e.g.,~R2, Dp3 (so-called `short' codes), since the |
| 3026 |
% \verb!\ShowSequence! macro currently only reads the whole string between pairs of |
| 3027 |
% commas (i.e.,~it does not \textit{interpret} strings like R2 $\rightarrow$ R,R etc.). |
| 3028 |
% However, if you just want to `see' the text, then the standard \LaTeX\ typewriter command |
| 3029 |
% \verb!\texttt! will typeset the text correctly, as you would expect |
| 3030 |
% (but using the \texttt{tt} font of course). |
| 3031 |
% |
| 3032 |
% A useful `work-around' for this limitation is provided by the \verb!\RubikRotation{}! |
| 3033 |
% command\,\footnote{Using the \texttt{--shell-escape} command-line option |
| 3034 |
% with the \LaTeX\ engine---see Section~\ref{sec:rubikrotation}.} |
| 3035 |
% (part of the \textsc{rubikrotation} package), since this returns (via the Perl program |
| 3036 |
% \texttt{rubikrotation.pl}) an extended (`long') form of a given sequence in which |
| 3037 |
% any `short' rotation codes are converted into their separate (atomic) long-form rotation codes; |
| 3038 |
% the associated string is \verb!\SequenceLong!. |
| 3039 |
% In fact three different forms of the sequence are returned, as shown below. |
| 3040 |
% |
| 3041 |
% For~example, consider the following short-form sequence L,R,D2,L3, and denote |
| 3042 |
% it as `seqA' as follows: \verb!\newcommand{\seqA}{[seqA],L,R,D2,L3,<test>}!. |
| 3043 |
% In~this case D2,L3, and the name `seqA' fail to be typeset when using |
| 3044 |
% the \verb!\rr! font with the \verb!\ShowSequence! command |
| 3045 |
% (notice there are lots of commas with nothing between them), |
| 3046 |
% while \cmd{\texttt} does work, as follows: |
| 3047 |
% |
| 3048 |
% \newcommand{\seqA}{[seqA],L,R,D2,L3,<test>} |
| 3049 |
% |
| 3050 |
% \medskip\noindent\verb!\newcommand{\seqA}{[seqA],L,R,D2,L3,<test>}! |
| 3051 |
% |
| 3052 |
% \medskip\noindent\verb!\ShowSequence{,}{\rr}{\seqA}! \ $\longrightarrow$ \ \ShowSequence{,}{\rr}{\seqA} |
| 3053 |
% |
| 3054 |
% \medskip\noindent\verb!\ShowSequence{,}{\texttt}{\seqA}! \ $\longrightarrow$ \ \ShowSequence{,}{\texttt}{\seqA} |
| 3055 |
% |
| 3056 |
% \medskip |
| 3057 |
% |
| 3058 |
% However, if we now run the command \verb!\RubikRotation{\seqA}! we shall then have |
| 3059 |
% at our disposal the following four strings: |
| 3060 |
% |
| 3061 |
% \medskip |
| 3062 |
% |
| 3063 |
% \verb!\SequenceInfo = ! test |
| 3064 |
% |
| 3065 |
% \verb!\SequenceName = ! seqA |
| 3066 |
% |
| 3067 |
% \verb!\SequenceShort = ! L,R,D2,L3 |
| 3068 |
% |
| 3069 |
% \verb!\SequenceLong = ! L,R,D,D,L,L,L |
| 3070 |
% |
| 3071 |
% \medskip |
| 3072 |
% |
| 3073 |
% {\noindent}and therefore have full control over typesetting rotation sequences. |
| 3074 |
% This approach therefore offers sufficient flexibility for most purposes. |
| 3075 |
% For~example, if we now write the command \verb!\ShowSequence{,}{\rr}{\SequenceLong}! |
| 3076 |
% we obtain |
| 3077 |
% |
| 3078 |
% \medskip\noindent\verb!\ShowSequence{,}{\rr}{\SequenceLong}! \ $\longrightarrow$ \ |
| 3079 |
% \ShowSequence{,}{\rr}{L,R,D,D,L,L,L} |
| 3080 |
% |
| 3081 |
% \medskip |
| 3082 |
% |
| 3083 |
% In practice, any trailing digit is converted (modulo~4) and expanded accordingly, the details being |
| 3084 |
% copied to the log-file. For~example, if one writes the command |
| 3085 |
% \cmd{\RubikRotation\{[test],R,D28978\}}, then since $28978 \equiv 2$\,(modulo~4) then \cmd{\SequenceLong} |
| 3086 |
% will be returned containing the string |R,D,D|. The associated entries in the log-file are |
| 3087 |
% as follows: |
| 3088 |
%\begin{verbatim} |
| 3089 |
%...rotation R OK |
| 3090 |
%...Expanding D28978 (28978 = 2 mod 4) ... |
| 3091 |
%...rotation D OK (= Dp3) |
| 3092 |
%...rotation D OK (= Dp3) |
| 3093 |
%...writing new Rubik state to file rubikstateNEW.dat |
| 3094 |
%...SequenceName = test |
| 3095 |
%...SequenceShort = R,D28978 |
| 3096 |
%...SequenceLong = R,D,D |
| 3097 |
%\end{verbatim} |
| 3098 |
% |
| 3099 |
% |
| 3100 |
% |
| 3101 |
% \section{SequenceBrace commands} |
| 3102 |
% \label{sec:sequencebrace} |
| 3103 |
% |
| 3104 |
% \DescribeMacro{\SequenceBraceA} |
| 3105 |
% \DescribeMacro{\SequenceBraceB} |
| 3106 |
% \DescribeMacro{\SequenceBraceAF} |
| 3107 |
% \DescribeMacro{\SequenceBraceBF} |
| 3108 |
% The \cmd{\SequenceBraceX}\marg{name}\marg{sequence} command |
| 3109 |
% is a tool for displaying a named sequence using a brace. The trailing~A |
| 3110 |
% denotes that the brace is placed Above the sequence; the trailing~B denotes |
| 3111 |
% the brace is Below the sequence. |
| 3112 |
% Appending an `F' to the command-name (e.g.,~\cmd{\SequenceBraceAF}) results |
| 3113 |
% in a surrounding fbox (cf.~the \cmd{\ShowCubeF} command). |
| 3114 |
% For the code see Section~\ref{sec:sequencebracecode}. |
| 3115 |
% |
| 3116 |
% {\noindent}Thus \verb!\SequenceBraceB{myseq}{U,D,L,R}! generates |
| 3117 |
% \ \SequenceBraceB{myseq}{U,D,L,R}. |
| 3118 |
% |
| 3119 |
% {\noindent}A typical example of its use might be: |
| 3120 |
% |
| 3121 |
% \bigskip |
| 3122 |
% |
| 3123 |
%\noindent% |
| 3124 |
%\RubikCubeSolvedWY% |
| 3125 |
%\ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3126 |
%\quad\SequenceBraceA{fourspot}{\ShowSequence{}{\Rubik}{F,F,B,B,U,Dp,R,R,L,L,U,Dp}}% |
| 3127 |
%\quad$\longrightarrow$\quad% |
| 3128 |
%\RubikFaceFront{R}{R}{R}% |
| 3129 |
% {R}{O}{R}% |
| 3130 |
% {R}{R}{R}% |
| 3131 |
%\RubikFaceRight{B}{B}{B}% |
| 3132 |
% {B}{G}{B}% |
| 3133 |
% {B}{B}{B}% |
| 3134 |
%\ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3135 |
% |
| 3136 |
% |
| 3137 |
% \bigskip |
| 3138 |
% |
| 3139 |
% {\noindent}which was generated by the following code, showing that the \cmd{\ShowSequence} |
| 3140 |
% command can be used as an argument for the \cmd{\SequenceBraceA} command: |
| 3141 |
%\begin{verbatim} |
| 3142 |
%\newcommand{\fourspot}{[fourspot],F2,B2,U,Dp,R2,L2,U,Dp}% |
| 3143 |
%\noindent% |
| 3144 |
%\RubikCubeSolvedWY% |
| 3145 |
%\ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3146 |
%\RubikRotation{\fourspot}% |
| 3147 |
%\quad\SequenceBraceA{\SequenceName}{% |
| 3148 |
% \ShowSequence{}{\Rubik}{\SequenceLong}}% |
| 3149 |
%\quad$\longrightarrow$\quad% |
| 3150 |
%\ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3151 |
%\end{verbatim} |
| 3152 |
% Note (1)~that the `fourspot' listing is included in the \textsc{rubikpatterns} package, and |
| 3153 |
% (2)~the \cmd{\RubikRotation} command requires using the \texttt{--shell-escape} command-line |
| 3154 |
% option with the \LaTeX\ engine---see Section~\ref{sec:rubikrotation} for details. |
| 3155 |
% |
| 3156 |
% |
| 3157 |
% |
| 3158 |
% \section{Arrows} |
| 3159 |
% \label{sec:arrows} |
| 3160 |
% |
| 3161 |
% The \rubikcube\ package does not offer any special commands for drawing |
| 3162 |
% arrows since it is straightforward just to include the appropriate TikZ |
| 3163 |
% `draw' commands in the \texttt{tikzpicture} environment (i.e.,~in our |
| 3164 |
% own \cmd{\ShowCube} environment). |
| 3165 |
% |
| 3166 |
% In order to facilitate using the standard TikZ `draw' commands |
| 3167 |
% the graphic grid origin of Rubik cube images is located at the bottom left corner |
| 3168 |
% of the \textsc{front} face (see also Section~\ref{sec:coordinates} for details of the |
| 3169 |
% cube's coordinate system). Similarly, single face images (e.g.,~drawn using the |
| 3170 |
% \cmd{\DrawRubikFace..} or \cmd{\DrawRubikFlat..} commands etc.) and also Sidebars, have |
| 3171 |
% their grid origin at the bottom left corner of the face. |
| 3172 |
% Consequently the start and finish coordinates for any arrow or line are |
| 3173 |
% easy to determine. |
| 3174 |
% |
| 3175 |
% \begin{figure}[hbt] |
| 3176 |
% \centering |
| 3177 |
% \ifpdf |
| 3178 |
% \includegraphics[height=3cm]{rubik-doc-figE.pdf} |
| 3179 |
% \fi |
| 3180 |
% |
| 3181 |
% \parbox{9cm}{% |
| 3182 |
% \caption{\label{fig:facegraph}Grid showing the positive coordinates |
| 3183 |
% associated with \textsc{front} face of a cube image, or of a face-only image.} |
| 3184 |
% }% |
| 3185 |
% \end{figure} |
| 3186 |
% |
| 3187 |
% \medskip |
| 3188 |
% |
| 3189 |
% For~example, Figure~\ref{fig:facegraph} shows a green |
| 3190 |
% arrow drawn from the centre of the lower-left cubie $(0.5, 0.5)$ to the centre of |
| 3191 |
% middle cubie $(1.5, 1.5)$. |
| 3192 |
% To do this we just include the following TikZ command (remember that TikZ |
| 3193 |
% commands require a terminal semicolon): |
| 3194 |
% \begin{quote} |
| 3195 |
%\begin{verbatim} |
| 3196 |
% \draw[->,color=green] (0.5,0.5) -- (1.5, 1.5); |
| 3197 |
%\end{verbatim} |
| 3198 |
% \end{quote} |
| 3199 |
% |
| 3200 |
% The following example shows the cubie movement in the \textsc{up} face |
| 3201 |
% generated by the rotation sequence \rrF\rrR\rrU\rrRp\rrUp\rrFp. |
| 3202 |
% The magenta arrows indicate movement \textit{with} cubie rotations, |
| 3203 |
% while the black arrow indicates movement \textit{without} rotation. |
| 3204 |
% This example also highlights the fact that when there are several arrows, |
| 3205 |
% the start and end positions often need to be offset slightly away from cubie centres. |
| 3206 |
% |
| 3207 |
% \bigskip |
| 3208 |
% \noindent |
| 3209 |
% \RubikCubeSolvedWY |
| 3210 |
% \ShowCube{2.5cm}{0.7}{% |
| 3211 |
% \DrawRubikFaceUp |
| 3212 |
% \draw[->,thick,color=magenta] (1.5,0.5) -- (2.4, 1.4); |
| 3213 |
% \draw[->,thick] (2.5,1.5) -- (1.6, 2.4); |
| 3214 |
% \draw[->,thick,color=magenta] (1.3, 2.3) -- (1.3, 0.5); |
| 3215 |
% \draw[<->,thick,color=magenta] (0.5,2.6) -- (2.5, 2.6); |
| 3216 |
% \draw[<->,thick,color=magenta] (0.5,0.3) -- (2.5, 0.3); |
| 3217 |
% } |
| 3218 |
% \begin{minipage}{0.6\textwidth} |
| 3219 |
%\begin{verbatim} |
| 3220 |
% \RubikCubeSolvedWY |
| 3221 |
% \ShowCube{2.5cm}{0.7}{% |
| 3222 |
% \DrawRubikFaceUp |
| 3223 |
% \draw[->,thick,color=magenta] (1.5,0.5) -- (2.4, 1.4); |
| 3224 |
% \draw[->,thick] (2.5,1.5) -- (1.6, 2.4); |
| 3225 |
% \draw[->,thick,color=magenta] (1.3, 2.3) -- (1.3, 0.5); |
| 3226 |
% \draw[<->,thick,color=magenta] (0.5,2.6) -- (2.5, 2.6); |
| 3227 |
% \draw[<->,thick,color=magenta] (0.5,0.3) -- (2.5, 0.3); |
| 3228 |
% } |
| 3229 |
%\end{verbatim} |
| 3230 |
% \end{minipage} |
| 3231 |
% |
| 3232 |
% \bigskip |
| 3233 |
% Since the coordinates shown in Figure~\ref{fig:facegraph} extend |
| 3234 |
% outwards in all directions, they can also be used as a guide for drawing |
| 3235 |
% arrows (or other structures) outside this 3x3 `face' square. |
| 3236 |
% The origin is at lower left corner of the face. |
| 3237 |
% |
| 3238 |
% In the following example, we input a Rubik cube configuration |
| 3239 |
% (previously saved as the file \texttt{CubeFour.tex} |
| 3240 |
% (see the \textsc{rubikrotation} package documentation for details)\footnote{See also |
| 3241 |
% the `SaveRubikState' example in the file \texttt{RubikExamples.pdf}.}, and |
| 3242 |
% draw an arrow to highlight a yellow side facelet. |
| 3243 |
% |
| 3244 |
% \bigskip |
| 3245 |
% \noindent |
| 3246 |
% \RubikCubeGreyAll |
| 3247 |
% \RubikFaceUp OYG YYY BYY |
| 3248 |
% \RubikFaceFront YRR XXXXXX |
| 3249 |
% \RubikFaceRight GOO XXXXXX |
| 3250 |
% \RubikFaceBack YBB XXXXXX |
| 3251 |
% \RubikFaceLeft YGR XXXXXX |
| 3252 |
% \ShowCube{2.2cm}{0.5}{\DrawRubikFaceUpSide% |
| 3253 |
% \draw[->,ultra thick,color=green] (2.5,5) -- (2.5, 4); |
| 3254 |
% } |
| 3255 |
% \begin{minipage}{0.6\textwidth} |
| 3256 |
%\begin{verbatim} |
| 3257 |
% \input{CubeFour.tex} |
| 3258 |
% \ShowCube{2.2cm}{0.5}{\DrawRubikFaceUpSide% |
| 3259 |
% \draw[->,ultra thick,color=green] (2.5,5) -- (2.5, 4); |
| 3260 |
% } |
| 3261 |
%\end{verbatim} |
| 3262 |
% \end{minipage} |
| 3263 |
% |
| 3264 |
% \bigskip |
| 3265 |
% |
| 3266 |
% {\noindent}The following example shows an arrow on the Rubik cube. |
| 3267 |
% The origin of coordinates is at the bottom left corner of the |
| 3268 |
% \textsc{front} face (see Section~\ref{sec:coordinates}). |
| 3269 |
% |
| 3270 |
% \bigskip |
| 3271 |
% \noindent |
| 3272 |
% \begin{minipage}{2.8cm} |
| 3273 |
% \centering |
| 3274 |
% \begin{tikzpicture}[scale=0.7] |
| 3275 |
% |
| 3276 |
% \RubikFaceFront{O}{O}{O} |
| 3277 |
% {O}{O}{X} |
| 3278 |
% {X}{O}{X} |
| 3279 |
% |
| 3280 |
% \RubikFaceRight{G}{G}{G} |
| 3281 |
% {X}{G}{G} |
| 3282 |
% {X}{X}{X} |
| 3283 |
% |
| 3284 |
% \RubikFaceDown {X}{G}{X} |
| 3285 |
% {X}{Y}{X} |
| 3286 |
% {X}{X}{X} |
| 3287 |
% |
| 3288 |
% \DrawRubikCubeRD |
| 3289 |
% \draw[ultra thick,->,color=blue] |
| 3290 |
% (1.5,0.5) -- (2.5, 1.5); |
| 3291 |
% \end{tikzpicture}% |
| 3292 |
% \end{minipage} |
| 3293 |
% \hspace{1cm} |
| 3294 |
% \begin{minipage}{0.6\textwidth} |
| 3295 |
%\begin{verbatim} |
| 3296 |
% \RubikFaceFront{O}{O}{O} |
| 3297 |
% {O}{O}{X} |
| 3298 |
% {X}{O}{X} |
| 3299 |
% |
| 3300 |
% \RubikFaceRight{G}{G}{G} |
| 3301 |
% {X}{G}{G} |
| 3302 |
% {X}{X}{X} |
| 3303 |
% |
| 3304 |
% \RubikFaceDown {X}{G}{X} |
| 3305 |
% {X}{Y}{X} |
| 3306 |
% {X}{X}{X} |
| 3307 |
% \ShowCube{3cm}{0.7}{% |
| 3308 |
% \DrawRubikCubeRD |
| 3309 |
% \draw[ultra thick,->,color=blue] |
| 3310 |
% (1.5,0.5) -- (2.5, 1.5); |
| 3311 |
% } |
| 3312 |
%\end{verbatim} |
| 3313 |
% \end{minipage} |
| 3314 |
% |
| 3315 |
% \bigskip |
| 3316 |
% |
| 3317 |
% In the following example we use a blue circle to highlight a corner cubie |
| 3318 |
% to be rotated into the top layer. Note we also use the command |
| 3319 |
% \verb!\DrawRubikCubeSidebarFD{RU}! to draw the sidebar along |
| 3320 |
% the FD (Front-Down) edge, and show the colour of the hidden facelet |
| 3321 |
% of the corner-cubie. |
| 3322 |
% |
| 3323 |
% \bigskip |
| 3324 |
% |
| 3325 |
% \noindent% |
| 3326 |
% \RubikCubeGreyWY |
| 3327 |
% \RubikFaceUp{X}{W}{X}% |
| 3328 |
% {W}{W}{W}% |
| 3329 |
% {W}{W}{X}% |
| 3330 |
% \RubikFaceDown{X}{X}{O}{X}{X}{X}{X}{X}{X}% |
| 3331 |
% \RubikSliceBottomR{X}{X}{W}{G}{X}{X}% |
| 3332 |
% \ShowCube{2.5cm}{0.5}{% |
| 3333 |
% \DrawRubikCubeRU |
| 3334 |
% \DrawRubikCubeSidebarFD{RU} |
| 3335 |
% \draw[ultra thick,->,color=blue] (2.5,0.5) -- (2.5, 2.5); |
| 3336 |
% \draw [color=blue, thick] (2.7, 0.3) circle (1.3); |
| 3337 |
% }% |
| 3338 |
% \hspace{3mm} |
| 3339 |
% \begin{minipage}{0.6\textwidth} |
| 3340 |
%\begin{verbatim} |
| 3341 |
% \RubikCubeGreyWY |
| 3342 |
% \RubikFaceUp{X}{W}{X} |
| 3343 |
% {W}{W}{W} |
| 3344 |
% {W}{W}{X} |
| 3345 |
% \RubikFaceDown{X}{X}{O}{X}{Y}{X}{X}{X}{X}% |
| 3346 |
% \RubikSliceBottomR{X}{X}{W}{G}{X}{X} |
| 3347 |
% \ShowCube{2.5cm}{0.5}{% |
| 3348 |
% \DrawRubikCubeRU |
| 3349 |
% \DrawRubikCubeSidebarFD{RU} |
| 3350 |
% \draw[ultra thick,->,color=blue] |
| 3351 |
% (2.5,0.5) -- (2.5, 2.5); |
| 3352 |
% \draw [color=blue, thick] (2.7, 0.3) circle (1.3); |
| 3353 |
% }% |
| 3354 |
%\end{verbatim} |
| 3355 |
% \end{minipage} |
| 3356 |
% |
| 3357 |
% |
| 3358 |
% |
| 3359 |
% |
| 3360 |
% |
| 3361 |
% \section{Final example} |
| 3362 |
% |
| 3363 |
% We now present, as a final example, the code used to draw the front page |
| 3364 |
% figure\,\footnote{This is a well-known sequence of order 6 used to cycle three |
| 3365 |
% edge cubies; it is used to generate the `cross' configuration in the final layer |
| 3366 |
% when solving the cube. Here we are performing the sequence on a `solved' cube, |
| 3367 |
% since this allows you to see how the three edge cubies move, and either |
| 3368 |
% flip (magenta arrows) or do not flip (black arrow).}. |
| 3369 |
% This code uses the \cmd{\RubikRotation} command (from the \textsc{rubikrotation} |
| 3370 |
% package), and therefore the \LaTeX\ engine needs to be run using the |
| 3371 |
% \verb!--shell-escape! command-line switch (see Section~\ref{sec:rubikrotation} for details). |
| 3372 |
% |
| 3373 |
% \bigskip |
| 3374 |
% |
| 3375 |
% \noindent\hfil% |
| 3376 |
% \RubikCubeSolvedWY% |
| 3377 |
% \ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3378 |
% \quad\ShowCube{1.6cm}{0.4}{% |
| 3379 |
% \DrawRubikFaceUpSide |
| 3380 |
% \draw[thick,->,color=magenta] (1.5,0.5) -- (2.4, 1.4); |
| 3381 |
% \draw[thick,->] (2.5,1.5) -- (1.6, 2.4); |
| 3382 |
% \draw[thick,->,color=magenta] (1.3, 2.3) -- (1.3, 0.5); |
| 3383 |
% \draw[thick,<->, color=blue] (0.5,2.6) -- (2.5, 2.6); |
| 3384 |
% \draw[thick,<->, color=blue] (0.5,0.3) -- (2.5, 0.3); |
| 3385 |
% }% |
| 3386 |
% \quad\Rubik{F}\Rubik{R}\Rubik{U}\Rubik{Rp}\Rubik{Up}\Rubik{Fp}% |
| 3387 |
% \quad$\longrightarrow$% |
| 3388 |
% \RubikFaceUp WWB WWOWRB% |
| 3389 |
% \RubikFaceBack RGG XXXXXX% |
| 3390 |
% \RubikFaceLeft RBO XXXXXX% |
| 3391 |
% \RubikFaceFront GWO XXXXXX% |
| 3392 |
% \RubikFaceRight WWW XXXXXX% |
| 3393 |
% \quad\ShowCube{1.6cm}{0.4}{\DrawRubikFaceUpSide} |
| 3394 |
% \hfil% |
| 3395 |
% |
| 3396 |
% |
| 3397 |
% \bigskip |
| 3398 |
% |
| 3399 |
%\begin{verbatim} |
| 3400 |
% \noindent\hfil% |
| 3401 |
% \RubikCubeSolvedWY% |
| 3402 |
% \ShowCube{1.6cm}{0.4}{\DrawRubikCubeRU}% |
| 3403 |
% \quad\ShowCube{1.6cm}{0.4}{% |
| 3404 |
% \DrawRubikFaceUpSide% |
| 3405 |
% \draw[thick,->,color=magenta] (1.5,0.5) -- (2.4, 1.4); |
| 3406 |
% \draw[thick,->] (2.5,1.5) -- (1.6, 2.4); |
| 3407 |
% \draw[thick,->,color=magenta] (1.3, 2.3) -- (1.3, 0.5); |
| 3408 |
% \draw[thick,<->, color=blue] (0.5,2.6) -- (2.5, 2.6); |
| 3409 |
% \draw[thick,<->, color=blue] (0.5,0.3) -- (2.5, 0.3); |
| 3410 |
% }% |
| 3411 |
% \RubikRotation{F,R,U,Rp,Up,Fp}% |
| 3412 |
% \quad\ShowSequence{}{\Rubik}{\SequenceLong}\quad$\longrightarrow$% |
| 3413 |
% \ShowCube{1.6cm}{0.4}{\DrawRubikFaceUpSide}% |
| 3414 |
% \hfil |
| 3415 |
%\end{verbatim} |
| 3416 |
% |
| 3417 |
% |
| 3418 |
% |
| 3419 |
% \subsection[Without using {\textbackslash}RubikRotation]{Without using \cmd{\RubikRotation}} |
| 3420 |
% |
| 3421 |
% If you really need to draw the above figure \textit{without} using |
| 3422 |
% the \textsc{rubikrotation} package (as we had to in order to write |
| 3423 |
% this particular document) then you would need to replace the |
| 3424 |
% commands |
| 3425 |
%\begin{verbatim} |
| 3426 |
% \RubikRotation{F,R,U,Rp,Up,Fp} |
| 3427 |
% \ShowSequence{,}{\Rubik}{\SequenceLong} \ \ \ $\longrightarrow$ |
| 3428 |
% \ShowCube{2cm}{0.4}{\DrawRubikFaceUpSide} |
| 3429 |
%\end{verbatim} |
| 3430 |
% with the following commands: |
| 3431 |
% |
| 3432 |
%\begin{verbatim} |
| 3433 |
% \Rubik{F}\Rubik{R}\Rubik{U}\Rubik{Rp}\Rubik{Up}\Rubik{Fp} |
| 3434 |
% \ \ \ $\longrightarrow$ |
| 3435 |
% \RubikFaceUp WWB WWOWRB |
| 3436 |
% \RubikFaceBack RGG XXXXXX |
| 3437 |
% \RubikFaceLeft RBO XXXXXX |
| 3438 |
% \RubikFaceFront GWO XXXXXX |
| 3439 |
% \RubikFaceRight WWW XXXXXX |
| 3440 |
% \quad\ShowCube{1.6cm}{0.4}{\DrawRubikFaceUpSide} |
| 3441 |
% \hfil |
| 3442 |
%\end{verbatim} |
| 3443 |
% |
| 3444 |
% |
| 3445 |
% |
| 3446 |
% |
| 3447 |
% |
| 3448 |
% \section{Deprecated commands} |
| 3449 |
% \label{sec:deprecated} |
| 3450 |
% |
| 3451 |
% |
| 3452 |
% The \cmd{\DrawRubikLayerFace..} and \cmd{\DrawRubikLayerSide..} |
| 3453 |
% are now deprecated; they were found to be |
| 3454 |
% confusing since (a)~they both drew faces \textit{and} took colour arguments |
| 3455 |
% for facelets, and (b)~they did not update the internal colour state of a |
| 3456 |
% cube or face---i.e.,~their colouring was simply a local `painting' action |
| 3457 |
% without memory. |
| 3458 |
% They have both been superseded by the more versatile |
| 3459 |
% \cmd{\DrawRubikFace..}\ commands (see Section~\ref{sec:drawrubikfacecommands}). |
| 3460 |
% |
| 3461 |
% The \cmd{\RubikSide..} commands are also deprecated, since they duplicated |
| 3462 |
% some of the function of the \cmd{\RubikFace..}\ commands. |
| 3463 |
% |
| 3464 |
% The earlier \cmd{\DrawFace..}\ (v4) and \cmd{\DrawFlat..}\ (v3) commands |
| 3465 |
% are also deprecated since they lacked the Rubik or Two keyword |
| 3466 |
% (see Sections~\ref{sec:rubikandtwo} and \ref{sec:drawrubikfacecommands}). |
| 3467 |
% |
| 3468 |
% \medskip |
| 3469 |
% |
| 3470 |
% {\noindent}Summary of all deprecated commands (and their current versions) since v3. |
| 3471 |
% |
| 3472 |
% \smallskip |
| 3473 |
% |
| 3474 |
% \begin{supertabular}[ll]{p{4cm} p{6cm}} |
| 3475 |
% \verb!\DrawRubikCubeFlat! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikCubeSF! \ (Semi-Flat) \\ |
| 3476 |
% \verb!\DrawRubikFlat! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikCubeF! \ \ (Flat) \\ |
| 3477 |
% \verb!\DrawFace..! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikFace..! \\ |
| 3478 |
% \verb!\DrawFlat..! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikFlat..! \\ |
| 3479 |
% \verb!\DrawFlat..Side! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikFace..Side! \\ |
| 3480 |
% \verb!\DrawRubikLayerFace..! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikFace..! \\ |
| 3481 |
% \verb!\DrawRubikLayerSide..! & $\rightarrow$ \hspace{0.5cm} \verb!\DrawRubikFace..! \\ |
| 3482 |
% \end{supertabular} |
| 3483 |
% |
| 3484 |
% |
| 3485 |
% |
| 3486 |
% |
| 3487 |
% \section{Known limitations} |
| 3488 |
% |
| 3489 |
% Please contact the authors regarding any ideas for improvement, errors, |
| 3490 |
% problems or shortcomings etc. |
| 3491 |
% |
| 3492 |
% \begin{itemize} |
| 3493 |
% |
| 3494 |
% \item Note that the rotation hieroglyphs are optimised for a 10pt font |
| 3495 |
% and do not scale with document font size. However, they do work well in |
| 3496 |
% conjunction with the standard 11pt and 12pt document fonts sizes. Nevertheless, |
| 3497 |
% the font size can of course be changed by renewing the font command |
| 3498 |
% (see Section~\ref{sec:rubikfont} for details). |
| 3499 |
% |
| 3500 |
% \item The sidebars cannot be arbitrarily positioned (note: hidden |
| 3501 |
% faces can be arbitrarily positioned). |
| 3502 |
% |
| 3503 |
% \end{itemize} |
| 3504 |
% |
| 3505 |
% |
| 3506 |
% |
| 3507 |
% |
| 3508 |
% \section{Change history} |
| 3509 |
% |
| 3510 |
% \begin{itemize} |
| 3511 |
% |
| 3512 |
% \item Version 5 (February 2018) |
| 3513 |
% |
| 3514 |
% -- Removed some now unnecessary commands (see Section~\ref{sec:deprecated}) |
| 3515 |
% and made some of the internal code a bit more efficient. |
| 3516 |
% |
| 3517 |
% ---Added two new `grey' commands: \cmd{\RubikCubeGreyWY} and \cmd{\RubikCubeGreyWB} |
| 3518 |
% (so as to complement the related \cmd{\RubikCubeSolvedXX} commands). |
| 3519 |
% |
| 3520 |
% ---Bugfix: added a pair of containing braces around the \cmd{\ifthenelse..} command |
| 3521 |
% used by the \cmd{\ShowSequence} command (for code see Section~\ref{sec:codeshowsequence}). |
| 3522 |
% This fixed an occasional problem of a font not being contained. |
| 3523 |
% |
| 3524 |
% |
| 3525 |
% ---Added missing lowercase cube `prime' versions of whole cube rotation notation |
| 3526 |
% (\rr{up}, \rr{dp}, \rr{lp}, \rr{rp}, \rr{fp}, \rr{bp}); see Section~\ref{sec:xyznotation}. |
| 3527 |
% |
| 3528 |
% |
| 3529 |
% ---New \cmd{\NoSidebar} command for disabling the drawing of sidebars of a particular colour |
| 3530 |
% (see Section~\ref{sec:nosidebar}). |
| 3531 |
% |
| 3532 |
% |
| 3533 |
% ---Implemented the terminal $x,y$ position parameters for |
| 3534 |
% the \cmd{\DrawRubikFlatLeft} and \cmd{\DrawRubikFlatRight} |
| 3535 |
% commands; all the \cmd{\DrawRubikFlat..} commands work correctly now |
| 3536 |
% (see Section~\ref{sec:codedrawrubikflatcommands}) |
| 3537 |
% |
| 3538 |
% |
| 3539 |
% |
| 3540 |
% \item Version 4.0 (March 2017) |
| 3541 |
% |
| 3542 |
% ---Improved documentation. |
| 3543 |
% |
| 3544 |
% ---Improved inter-hieroglyph spacing and vertical position. The Computer Modern sans bold font |
| 3545 |
% (10/12pt) is used for the hieroglyphs and rotation codes (see Section~\ref{sec:coderubikfont} |
| 3546 |
% for details). |
| 3547 |
% |
| 3548 |
% ---Improved the \cmd{\ShowCube} and \cmd{\ShowCubeF} macros (see Sections~\ref{sec:showcube} |
| 3549 |
% and \ref{sec:showcubecode}). |
| 3550 |
% |
| 3551 |
% ---Additional notation for middle slice rotations (`m' notation), e.g.,~\rr{Rm}, \rr{Rmp} etc |
| 3552 |
% (see Sections~\ref{sec:mnotation} and \ref{sec:codeJaap}). |
| 3553 |
% |
| 3554 |
% ---Additional notation for whole cube rotations (`c' notation), e.g.,~\rr{Rc}, \rr{Rcp} etc |
| 3555 |
% (see Sections~\ref{sec:cnotation} and \ref{sec:codeJaap}). |
| 3556 |
% |
| 3557 |
% ---Added Randelshofer notation (the `CMST' rotations), e.g.,~\rr{CR}, \rr{MR} etc |
| 3558 |
% (see Sections~\ref{sec:listofRandelshofercommands} and \ref{sec:codeRandelshofer}). |
| 3559 |
% |
| 3560 |
% |
| 3561 |
% |
| 3562 |
% ---Six new commands for showing and annotating rotation sequences; the versions with a |
| 3563 |
% terminal `F' also surround the object with an fbox to allow users to see the extent |
| 3564 |
% of any associated white space |
| 3565 |
% (see Sections~\ref{sec:showsequence} \& \ref{sec:sequencebrace}): |
| 3566 |
% \begin{quote} |
| 3567 |
% \cmd{\ShowSequence} |
| 3568 |
% \newline\cmd{\ShowSequenceF} |
| 3569 |
% \newline\cmd{\ShowSequencef} |
| 3570 |
% \newline\cmd{\SequenceBraceA} |
| 3571 |
% \newline\cmd{\SequenceBraceAF} |
| 3572 |
% \newline\cmd{\SequenceBraceB} |
| 3573 |
% \newline\cmd{\SequenceBraceBF} |
| 3574 |
% |
| 3575 |
% \end{quote} |
| 3576 |
% |
| 3577 |
% ---A new command for setting up or allocating a `solved' colour configuration. |
| 3578 |
% (see Section~\ref{sec:rubiksolvedconfig}): |
| 3579 |
% \begin{quote} |
| 3580 |
% \cmd{\RubikSolvedConfig} |
| 3581 |
% \end{quote} |
| 3582 |
% |
| 3583 |
% ---A new command for setting up a `starter cube' for which the \textit{whole} cube |
| 3584 |
% is allocated the default `grey' colour (see Section~\ref{sec:rubikcubegrey}): |
| 3585 |
% \begin{quote} |
| 3586 |
% \cmd{\RubikCubeGreyAll} |
| 3587 |
% \end{quote} |
| 3588 |
% |
| 3589 |
% ---A new supporting \textsc{rubikpatterns} package has been added to |
| 3590 |
% the Rubik bundle. It is a small macro database of well-known named Rubik patterns |
| 3591 |
% and associated sequences (see Section~\ref{sec:patterns}). |
| 3592 |
% |
| 3593 |
% |
| 3594 |
% |
| 3595 |
% \item Version 3.0 (September 2015) |
| 3596 |
% |
| 3597 |
% ---All rotation commands can now use the rotation-code as an argument; for~example, |
| 3598 |
% the rotation \rr{D} can now be typeset using the command \cmd{\rr\{D\}} etc |
| 3599 |
% (see Section~\ref{sec:RubikCommands}). |
| 3600 |
% The new rotation commands are: |
| 3601 |
% \begin{quote} |
| 3602 |
% \cmd{\rr\marg{rotation-code}} |
| 3603 |
% \newline\cmd{\rrh\marg{rotation-code}} |
| 3604 |
% \newline\cmd{\Rubik\marg{rotation-code}} |
| 3605 |
% \newline\cmd{\textRubik\marg{rotation-code}} |
| 3606 |
%\end{quote} |
| 3607 |
% The original rotation command formats (e.g.,~\cmd{\rrD}) are still supported for backwards compatibility. |
| 3608 |
% |
| 3609 |
% --- \cmd{\ShowCube} and \cmd{\ShowCubeF} are new commands for displaying |
| 3610 |
% a cube inside a minipage (see Sections~\ref{sec:showcube} and \ref{sec:showcubecode}). |
| 3611 |
% |
| 3612 |
% --- \cmd{\RubikCubeGrey} is a new command for setting up a `starter cube' for which the |
| 3613 |
% only allocated colours are those for the centre cubies (see Section~\ref{sec:rubikcubegrey}). |
| 3614 |
% The colour configuration matches that of the \cmd{\RubikCubeSolved}. |
| 3615 |
% |
| 3616 |
% \item Version 2.2 (January 2015) |
| 3617 |
% |
| 3618 |
% ---Fixed typos and minor errors in the documentation. |
| 3619 |
% |
| 3620 |
% ---Added the following commands to facilitate typesetting a face |
| 3621 |
% (but see Section~\ref{sec:deprecated}). |
| 3622 |
%\begin{quote} |
| 3623 |
%\begin{verbatim} |
| 3624 |
%\DrawFlatUp |
| 3625 |
%\DrawFlatDown |
| 3626 |
%\DrawFlatLeft |
| 3627 |
%\DrawFlatRight |
| 3628 |
%\DrawFlatFront |
| 3629 |
%\DrawFlatBack |
| 3630 |
%\DrawFlatUpSide |
| 3631 |
%\DrawFlatDownSide |
| 3632 |
%\DrawFlatLeftSide |
| 3633 |
%\DrawFlatRightSide |
| 3634 |
%\DrawFlatFrontSide |
| 3635 |
%\DrawFlatBackSide |
| 3636 |
%\end{verbatim} |
| 3637 |
%\end{quote} |
| 3638 |
% |
| 3639 |
% ---Changed `Equator' $\rightarrow$ `Middle' in all \cmd{\DrawLayer..} |
| 3640 |
% commands (for consistency). Hence `E' $\rightarrow$ `M' in all Flat |
| 3641 |
% commands and Slice commands. Note that although the former use of `Equator' is |
| 3642 |
% retained for backward compatibility (for the moment) it is now deprecated. |
| 3643 |
% |
| 3644 |
% ---Fixed a conflict with the \TeX\ \cmd{\sb} command as used by the \textbf{url} |
| 3645 |
% package which resulted in reference chaos when the \textbf{url} package was used with |
| 3646 |
% the \Rubikcube\ package (internalised \cmd{\sb} to \cmd{\@sb}). Also internalised, for |
| 3647 |
% convenience, \cmd{\sd} to \cmd{\@sd}; \cmd{\sh} to \cmd{\@sh}; \cmd{\sc} to \cmd{\@sc}; |
| 3648 |
% \cmd{\sq} to \cmd{\@sq}. |
| 3649 |
% |
| 3650 |
% |
| 3651 |
% \item Version 2.0 (February 5, 2014) |
| 3652 |
% |
| 3653 |
% ---First release. |
| 3654 |
% |
| 3655 |
% \end{itemize} |
| 3656 |
% |
| 3657 |
% |
| 3658 |
% |
| 3659 |
% \section{Acknowledgements} |
| 3660 |
% |
| 3661 |
% We thank Peter Bartal and Peter Grill for useful ideas and |
| 3662 |
% suggestions; we have built on some of their ideas and have acknowledged |
| 3663 |
% these instances in the documentation. |
| 3664 |
% We also thank Christian Tellechea for the \cmd{\@join\{\}\{\}} |
| 3665 |
% command (see Section~\ref{sec:usefulinternalcommands}), |
| 3666 |
% Christian Schr\"{o}ppel for help regarding the \textsf{forarray} package |
| 3667 |
% (see Section~\ref{sec:codeshowsequence}), Herbert Kociemba for helpful comments, |
| 3668 |
% and Robert Ma\v{r}\'{\i}k for suggesting the \cmd{\NoSidebar\{\}} command |
| 3669 |
% (see Section~\ref{sec:nosidebar}). |
| 3670 |
% |
| 3671 |
% |
| 3672 |
% \section{References} |
| 3673 |
% |
| 3674 |
% \begin{itemize} |
| 3675 |
% |
| 3676 |
% |
| 3677 |
% \item Bartal P (2011). \ |
| 3678 |
% \url{http://tex.stackexchange.com/questions/34482/} |
| 3679 |
% |
| 3680 |
% \item Chen JJ (2004). Group theory and the Rubik's cube. |
| 3681 |
% \url{http://www.math.harvard.edu/~jjchen/docs/rubik.pdf} |
| 3682 |
% |
| 3683 |
% |
| 3684 |
% \item Davis T (2006). Group theory via Rubik's cube. |
| 3685 |
% \url{http://www.geometer.org/rubik/group.pdf} |
| 3686 |
% |
| 3687 |
% \item Demaine ED, Demaine ML, Eisenstat S, Lubiw A and Winslow A (2011). |
| 3688 |
% Algorithms for solving Rubik's cubes. |
| 3689 |
% \url{http://www.arxiv.org/abs/1106.5736/} |
| 3690 |
% |
| 3691 |
% \item Duvoid T (2010). |
| 3692 |
% M\'{e}thode simple pour remonter le Rubik's cube. |
| 3693 |
% \newline\url{http://duvoid.fr/rubik/rubik-debutant-couleurs.pdf} |
| 3694 |
% \newline\url{http://duvoid.fr/rubik/sources/notation_en.eps} |
| 3695 |
% \newline\url{http://duvoid.fr/rubik/sources/rubik-debutant-couleurs.tex} |
| 3696 |
% |
| 3697 |
% \item Duvoid T (2011). |
| 3698 |
% M\'{e}thode avanc\'{e}e pour remonter le Rubik's cube. |
| 3699 |
% \newline\url{http://duvoid.fr/rubik/rubik-friddrich-couleurs.pdf} |
| 3700 |
% \newline\url{http://duvoid.fr/rubik/sources/rubik-friddrich-couleurs.tex} |
| 3701 |
% |
| 3702 |
% \item Feuers\"{a}nger (2016). Manual for package \textsc{pgfplots}. |
| 3703 |
% v\,1.13 (2016/01/06), \S\,3.2.3, page~21. (\texttt{pgfplots.pdf}) |
| 3704 |
% \url{http://www.ctan.org/pkg/pgfplots}. [re: preventing extra white space] |
| 3705 |
% |
| 3706 |
% \item Fridrich website (Fridrich J). \ \ \url{http://www.ws.binghamton.edu/fridrich/}. |
| 3707 |
% See the useful `notation' section on the `Pretty patterns' webpage at |
| 3708 |
% \url{http://www.ws.binghamton.edu/fridrich/ptrns.html}. |
| 3709 |
% |
| 3710 |
% \item Frey AH and Singmaster D (1982). \textit{Handbook of cubik math}, |
| 3711 |
% (Enslow Publishers, Inc.) (republished: 2010, Lutterworth Press, UK) |
| 3712 |
% |
| 3713 |
% \item Fung website (Fung A). Solving the Rubik's cube systematically. |
| 3714 |
% \url{http://alexfung.info/favorite/cube/cube.htm} |
| 3715 |
% |
| 3716 |
% \item Garfath-Cox, A (1981). \textit{The cube}, (Bolden Publishing Co., |
| 3717 |
% East Molesey, Surrey) pp.32. [copy in British Library] |
| 3718 |
% |
| 3719 |
% \item Golomb SW (1981). Rubik's cube and a model of quark confinement. |
| 3720 |
% \textit{Am.\ J.\ Phys.}; vol~49, pp~1030--1031. |
| 3721 |
% |
| 3722 |
% \item Golomb SW (1982). Rubik's cube and quarks: twists on the eight corner cells |
| 3723 |
% of Rubik's cube provide a model for many aspects of quark behaviour. |
| 3724 |
% \textit{American Scientist}; \underline{70}, No~3 (May--June 1982), |
| 3725 |
% pp.~257--259. \url{http://www.jstor.org/stable/27851433} |
| 3726 |
% |
| 3727 |
% \item Gymrek M (2009). The mathematics of the Rubik's cube. |
| 3728 |
% \newline\url{http://web.mit.edu/sp.268/www/rubik.pdf} |
| 3729 |
% |
| 3730 |
% \item Harris D (2008). Speedsolving the cube. |
| 3731 |
% (Sterling Publishing Co.\ Inc., New York, USA.) pp.~166. |
| 3732 |
% [covers 2x2x2, 3x3x3, 4x4x4, 5x5x5 cubes] |
| 3733 |
% |
| 3734 |
% \item Harris website (Harris D). \url{http://www.cubestation.co.uk} |
| 3735 |
% |
| 3736 |
% \item Heise website (Heise R). Rubik's cube theory. \url{http://www.ryanheise.com/cube/theory.html} |
| 3737 |
% |
| 3738 |
% \item Hofstadter D (1981). Rubik cube. \textit{Scientific American}; March issue. |
| 3739 |
% |
| 3740 |
% \item Hutchings M (2011). The mathematics of Rubik's cube (slide presentation). |
| 3741 |
% \url{http://math.berkeley.edu/~hutching/rubik.pdf} |
| 3742 |
% |
| 3743 |
% \item Jelinek website (Jelinek J). Rubik's cube solution methods. |
| 3744 |
% \url{http://www.rubikscube.info/} |
| 3745 |
% |
| 3746 |
% \item Joyner D (2008). \textit{Adventures in group theory: |
| 3747 |
% Rubik's cube, Merlin's machine and other mathematical toys}; pp~322. |
| 3748 |
% \url{http://www.mike.verdone.ca/media/rubiks.pdf} |
| 3749 |
% |
| 3750 |
% |
| 3751 |
% \item Kociemba website (Kociemba H). \url{http://www.kociemba.org/cube.htm} |
| 3752 |
% {\newline}---for superflip see: \url{http://www.kociemba.org/math/oh.htm} |
| 3753 |
% |
| 3754 |
% |
| 3755 |
% \item Kriz I and Siegel P (2008). Rubik's cube-inspired puzzles demonstrate math's |
| 3756 |
% simple groups. \textit{Scientific American}; July 2008 |
| 3757 |
% |
| 3758 |
% \item Longridge website (Longridge M). The cube pattern archive. \url{http://www.cubeman.org} |
| 3759 |
% |
| 3760 |
% \item Randelshofer website (Randelshofer W). Pretty patterns. |
| 3761 |
% \url{http://www.randelshofer.ch/rubik/patterns/} |
| 3762 |
% |
| 3763 |
% \item Reid website (Reid M). \ \ \url{http://www.cflmath.com/Rubik}, |
| 3764 |
% for patterns see \url{http://www.cflmath.com/Rubik/patterns.html} |
| 3765 |
% |
| 3766 |
% \item Reid M. (1995). Superflip requires 20 face turns. (January 1995) |
| 3767 |
% \url{http://www.math.ucf.edu/~reid/Rubik/CubeLovers/} |
| 3768 |
% {\newline}[cited from Rokicki \textit{et~al.}, 2013]. |
| 3769 |
% {\newline}(Note: easier to use is the following html indexed version of the |
| 3770 |
% archive of the Cube-Lovers usenet group (1982--1997) |
| 3771 |
% \url{http://www.math.rwth-aachen.de/~Martin.Schoenert/Cube-Lovers/}) |
| 3772 |
% |
| 3773 |
% |
| 3774 |
% \item Rokicki T, Kociemba H, Davidson M and Dethridge J (2013). The diameter of the |
| 3775 |
% Rubik's cube is twenty. \textit{SIAM.\ J.\ Discrete Math.}, \underline{27}, 1082--1105. |
| 3776 |
% (\url{http://tomas.rokicki.com/rubik20.pdf}) |
| 3777 |
% |
| 3778 |
% \item Roux website (Roux G). \ \ \url{http://www.grroux.free.fr} |
| 3779 |
% |
| 3780 |
% \item Rubik's cube. See Section on notation. |
| 3781 |
% \newline\url{http://en.wikipedia.org/wiki/Rubik's_Cube} |
| 3782 |
% |
| 3783 |
% \item RuWix website (Ferenec D). \ \ \url{http://www.ruwix.com}. |
| 3784 |
% See the online Rubik's cube solver \url{http://www.ruwix.com/online-rubiks-cube-solver-program}. |
| 3785 |
% |
| 3786 |
% \item Scherphius website (Scherphius J). Jaap Puzzles website |
| 3787 |
% \url{http://www.jaapsch.net/puzzles/symmetr1.htm} |
| 3788 |
% |
| 3789 |
% \item Sher S.\ T-H.\ (2014). The new durable Rubik's cube (technical description). |
| 3790 |
% \url{http://www.scf.usc.edu/~tsher/files/Rubiks_Cube.pdf} [includes RGB colour specification] |
| 3791 |
% |
| 3792 |
% |
| 3793 |
% \item Singmaster D (1981). \textit{Notes on Rubik's magic cube} (Harmondsworth, Eng., Penguin Books) |
| 3794 |
% |
| 3795 |
% \item Speedsolving website. \url{http://www.speedsolving.com/} |
| 3796 |
% |
| 3797 |
% |
| 3798 |
% \item Storer website (Storer JA). \url{http://www.cs.brandeis.edu/~storer/JimPuzzles/} |
| 3799 |
% {\newline} For Rubik cube, see: \url{http://www.cs.brandeis.edu/~storer/JimPuzzles/RUBIK/Rubik3x3x3.pdf} |
| 3800 |
% {\newline} For puzzle book, see: \url{http://www.cs.brandeis.edu/~storer/zzzJimPuzzles/JimPuzzlesBook.pdf} |
| 3801 |
% |
| 3802 |
% |
| 3803 |
% \item Tran R (2005). A mathematical approach to solving Rubik's cube. |
| 3804 |
% \url{http://www.math.ubc.ca/~cass/courses/m308/projects/rtran/rtran.pdf} |
| 3805 |
% |
| 3806 |
% |
| 3807 |
% \item Treep A and Waterman M (1987). Marc Waterman's Algorithm, Part 2. |
| 3808 |
% \textit{Cubism For Fun 15}, p.~10 (Nederlandse Kubus Club) |
| 3809 |
% [cited from \textit{Wikipedia} (Rubik's cube)] |
| 3810 |
% |
| 3811 |
% |
| 3812 |
% \item Vandenbergh website (Vandenbergh L). \ \ \textsc{cubezone} \url{http://www.cubezone.be} |
| 3813 |
% |
| 3814 |
% \item WCA (2016). World Cube Association Regulations. See \S\,12 for notation. |
| 3815 |
% \url{http://www.worldcubeassociation.org/regulations.htm} |
| 3816 |
% |
| 3817 |
% |
| 3818 |
% \end{itemize} |
| 3819 |
% |
| 3820 |
% |
| 3821 |
% |
| 3822 |
% ^^A ================================================== |
| 3823 |
% \StopEventually{\PrintIndex} |
| 3824 |
% |
| 3825 |
% |
| 3826 |
% |
| 3827 |
% \section{The code (\texttt{rubikcube.sty})} |
| 3828 |
% |
| 3829 |
% The conventions we adopt regarding capital letters and the |
| 3830 |
% XYZ argument ordering are detailed in Section~\ref{sec:conventions}. |
| 3831 |
% |
| 3832 |
% Note that it is important when using a graphics package to use a trailing \% on |
| 3833 |
% the end of lines which break before the terminal curly bracket of a \cmd{\newcommand}. |
| 3834 |
% This is to prevent accumulating spurious spaces which may otherwise appear in |
| 3835 |
% figures and diagrams as a strange or unexpected horizontal shift or white-space. |
| 3836 |
% |
| 3837 |
% \subsection{\hspace{3mm}Package heading} |
| 3838 |
% |
| 3839 |
% \begin{macrocode} |
| 3840 |
%<*rubikcube> |
| 3841 |
\def\RCfileversion{5.0}% |
| 3842 |
\def\RCfiledate{2018/02/25}% February 25, 2018 |
| 3843 |
\NeedsTeXFormat{LaTeX2e} |
| 3844 |
\ProvidesPackage{rubikcube}[\RCfiledate\space (v\RCfileversion)] |
| 3845 |
% \end{macrocode} |
| 3846 |
% The package requires TikZ---so we load it if not already loaded. |
| 3847 |
% \begin{macrocode} |
| 3848 |
\@ifpackageloaded{tikz}{}{% |
| 3849 |
\typeout{---rubikcube requires the TikZ package.}% |
| 3850 |
\RequirePackage{tikz}}% |
| 3851 |
% \end{macrocode} |
| 3852 |
% |
| 3853 |
% The package requires the Forarray package (see Section~\ref{sec:codeshowsequence})---so |
| 3854 |
% we load it if not already loaded. |
| 3855 |
% \begin{macrocode} |
| 3856 |
\@ifpackageloaded{forarray}{}{% |
| 3857 |
\typeout{---rubikcube requires the Forarray package.}% |
| 3858 |
\RequirePackage{forarray}}% |
| 3859 |
% \end{macrocode} |
| 3860 |
% |
| 3861 |
% The package requires the IfThen package (see Section~\ref{sec:codeshowsequence})---so |
| 3862 |
% we load it if not already loaded. |
| 3863 |
% \begin{macrocode} |
| 3864 |
\@ifpackageloaded{ifthen}{}{% |
| 3865 |
\typeout{---rubikcube requires the IfThen package.}% |
| 3866 |
\RequirePackage{ifthen}}% |
| 3867 |
% \end{macrocode} |
| 3868 |
% |
| 3869 |
% |
| 3870 |
% |
| 3871 |
% \begin{macro}{\rubikcube} |
| 3872 |
% First we create a suitable logo |
| 3873 |
% \begin{macrocode} |
| 3874 |
\newcommand{\rubikcube}{\textsc{rubikcube}}% |
| 3875 |
\newcommand{\Rubikcube}{\textsc{Rubikcube}}% |
| 3876 |
% \end{macrocode} |
| 3877 |
% \end{macro} |
| 3878 |
% |
| 3879 |
% |
| 3880 |
% \subsection{\hspace{3mm}Colours} |
| 3881 |
% \label{sec:codecolours} |
| 3882 |
% |
| 3883 |
% We have adopted the following colour allocations---see Section~\ref{sec:colours} |
| 3884 |
% for details. |
| 3885 |
% |
| 3886 |
% \begin{macrocode} |
| 3887 |
\definecolor{R}{HTML}{C41E33}% |
| 3888 |
\definecolor{G}{HTML}{00BE38}% |
| 3889 |
\definecolor{B}{HTML}{0051BA}% |
| 3890 |
\definecolor{Y}{HTML}{FFFF00}% |
| 3891 |
\colorlet{X}{black!30}% grey |
| 3892 |
\colorlet{O}{orange}% |
| 3893 |
\colorlet{W}{white}% |
| 3894 |
% \end{macrocode} |
| 3895 |
% |
| 3896 |
% |
| 3897 |
% |
| 3898 |
% \subsection{\hspace{3mm}The rubikfont} |
| 3899 |
% \label{sec:coderubikfont} |
| 3900 |
% |
| 3901 |
% \begin{macro}{\@rubikfont} |
| 3902 |
% \begin{macro}{\@rubikfontFNS} |
| 3903 |
% \begin{macro}{\@rubikprime} |
| 3904 |
% We define two fonts for text associated with the Rubik glyphs |
| 3905 |
% (both the `arrow' glyphs and the `letter' glyphs), |
| 3906 |
% namely, (1)~Computer Modern Sans (cmss), bold extended (bx), normal shape (n) |
| 3907 |
% at 10/12pt, and (2)~a footnotesize (FNS) version (8pt) for the lower-case letters |
| 3908 |
% [for cmss see Latex Companion (2004), p.\,417 \& p.\,354\,\footnote{Note the typo in Table~7.5 (p.\,354): |
| 3909 |
% the font-series code for the Sans semi-bold condensed form is `sbx' (not sbc).}]. |
| 3910 |
% This has the effect of keeping the size |
| 3911 |
% of Rubik glyphs constant in the face of any changes in the document fonts. |
| 3912 |
% We make the baseline-skip values the same, since the `arrow' glyphs generated by |
| 3913 |
% the \cmd{\Rubik} commands involve a single baseline-skip (for~example, as with |
| 3914 |
% \verb!\Rubik{D}!; see Section~\ref{sec:coderotationD}). |
| 3915 |
% We use the cmss font apostrophe as the `prime' symbol (the user has |
| 3916 |
% the opportunity to use the maths \cmd{\prime} |
| 3917 |
% instead---see Section~\ref{sec:rubikprime}). |
| 3918 |
%\begin{macrocode} |
| 3919 |
\newcommand{\@rubikfont}{\fontsize{10}{12pt}\usefont{T1}{cmss}{bx}{n}} |
| 3920 |
\newcommand{\@rubikfontFNS}{\fontsize{8}{12pt}\usefont{T1}{cmss}{bx}{n}} |
| 3921 |
\newcommand{\@rubikprime}{'} |
| 3922 |
% \end{macrocode} |
| 3923 |
% \end{macro} |
| 3924 |
% \end{macro} |
| 3925 |
% \end{macro} |
| 3926 |
% |
| 3927 |
% |
| 3928 |
% |
| 3929 |
% \subsection{\hspace{3mm}ShowCube command} |
| 3930 |
% \label{sec:showcubecode} |
| 3931 |
% |
| 3932 |
% \begin{macro}{\ShowCube} |
| 3933 |
% \begin{macro}{\ShowCubeF} |
| 3934 |
% The macro \cmd{\ShowCube}\marg{minipage width}\marg{TikZ scale factor}\marg{Draw.. cmd} |
| 3935 |
% displays the cube inside a minipage, so that we can easily tailor the minipage |
| 3936 |
% width (|#1|) and also the TikZ scale factor (|#2|). The \cmd{\ShowCubeF} command |
| 3937 |
% places an fbox around the minipage so users can see the extent of any white space. |
| 3938 |
% {\newline}\textsc{usage}: |\ShowCube{2cm}{0.5}{\DrawRubikCubeRU}| |
| 3939 |
% |
| 3940 |
% February 2017 (RWDN): \ We first require a new length variable (which will become the minipage-width), |
| 3941 |
% so we can add the length 1.6pt to it (this is the width of the TikZ ultra-thick line |
| 3942 |
% which is used to draw the Rubik cubes). |
| 3943 |
% In order for a width of an image made up of $x$~units to be equal |
| 3944 |
% to $x \times (\mbox{scale-factor})$ we need to add an extra line-width |
| 3945 |
% (i.e.,~to include the right-hand edge). |
| 3946 |
% \begin{macrocode} |
| 3947 |
\newlength{\@showcubewidth}% |
| 3948 |
% \end{macrocode} |
| 3949 |
% We can now build the two macros. We set the \cmd{\fboxsep} value to zero. |
| 3950 |
% \begin{macrocode} |
| 3951 |
\newcommand{\ShowCube}[3]{% |
| 3952 |
\setlength{\fboxsep}{0cm}% |
| 3953 |
\setlength{\@showcubewidth}{#1}% |
| 3954 |
\advance\@showcubewidth by 1.6pt\relax% |
| 3955 |
\begin{minipage}{\the\@showcubewidth}% |
| 3956 |
\centering% |
| 3957 |
\begin{tikzpicture}[scale=#2]% |
| 3958 |
#3% |
| 3959 |
\end{tikzpicture}% |
| 3960 |
\end{minipage}% |
| 3961 |
}% |
| 3962 |
\newcommand{\ShowCubeF}[3]{% |
| 3963 |
\setlength{\fboxsep}{0cm}% |
| 3964 |
\setlength{\fboxrule}{0.4pt}% |
| 3965 |
\setlength{\@showcubewidth}{#1}% |
| 3966 |
\advance\@showcubewidth by 1.6pt\relax% |
| 3967 |
\framebox{% |
| 3968 |
\begin{minipage}{\the\@showcubewidth}% |
| 3969 |
\centering% |
| 3970 |
\begin{tikzpicture}[scale=#2]% |
| 3971 |
#3% |
| 3972 |
\end{tikzpicture}% |
| 3973 |
\end{minipage}% |
| 3974 |
}}% |
| 3975 |
% \end{macrocode} |
| 3976 |
% \end{macro} |
| 3977 |
% \end{macro} |
| 3978 |
% |
| 3979 |
% |
| 3980 |
% |
| 3981 |
% |
| 3982 |
% \subsection{\hspace{3mm}ShowSequence command} |
| 3983 |
% \label{sec:codeshowsequence} |
| 3984 |
% |
| 3985 |
% \begin{macro}{\ShowSequence} |
| 3986 |
% \begin{macro}{\ShowSequenceF} |
| 3987 |
% \begin{macro}{\ShowSequencef} |
| 3988 |
% The \cmd{\ShowSequence}\marg{separator}\marg{font-code}\marg{sequence} command |
| 3989 |
% typesets a comma separated sequence of rotation commands. |
| 3990 |
% (See Section~\ref{sec:showsequence}). |
| 3991 |
% This command takes three mandatory arguments: the first is the separator (\verb!#1!), |
| 3992 |
% the second is the font or style code (\verb!#2!), and third is a comma-separated |
| 3993 |
% sequence of Rubik rotation commands (|#3|). |
| 3994 |
% |
| 3995 |
% This command requires the \texttt{forarray} |
| 3996 |
% package---by Christian Schr\"{o}ppel---(for the \cmd{\ForEachX} command) |
| 3997 |
% and the \texttt{ifthen} package---by David Carlisle---(for the \cmd{\ifthenelse} command). |
| 3998 |
% These two packages are loaded at startup if not already loaded. |
| 3999 |
% We first need to define two variables for use by the command; these are |
| 4000 |
% derived from the \texttt{forarray} package. |
| 4001 |
% |
| 4002 |
% \begin{macrocode} |
| 4003 |
\newcommand{\x}{\thislevelitem} |
| 4004 |
\newcommand{\xcount}{\thislevelcount} |
| 4005 |
% \end{macrocode} |
| 4006 |
% |
| 4007 |
% \noindent\textsc{example usage:} |\ForEachX{;}{\texttt{\x}}{L;R;U;D}| |
| 4008 |
% |
| 4009 |
% An important feature of the |\ForEachX| command is that it expands its third argument |
| 4010 |
% (the list of elements), since this allows the list of elements to be presented as |
| 4011 |
% a macro, which is extremely convenient for the user. |
| 4012 |
% |
| 4013 |
% The \cmd{\ShowSequence} command typesets a sequence of elements (|#3|), and places |
| 4014 |
% an optional separator (|#1|) between them. |
| 4015 |
% For each element (|\x|, see above) of the sequence |#3| this command forms the |
| 4016 |
% construction |#2{element of #3}|. |
| 4017 |
% For~example, if |#2 = \rr|, and D is an element of |#3|, then it will form the |
| 4018 |
% command |\rr{D}| etc. |
| 4019 |
% |
| 4020 |
% Note that it is not straightforward to place the separator (|#1|) \textit{only between} |
| 4021 |
% the derived elements (i.e.,~without the separator being either before the first element, |
| 4022 |
% or following the last element) using only the |ForEachX| command. This is because |
| 4023 |
% the |ForEachX| command processes each element in exactly the |
| 4024 |
% same way---i.e.,~a comma after the first element (good) means there will be a comma after |
| 4025 |
% the final element (bad). |
| 4026 |
% |
| 4027 |
% We solve this problem by using the |\ifthenelse| command to allow the first element |
| 4028 |
% to be processed differently from all the remaining elements. This is because it is easy |
| 4029 |
% for \TeX\ to identify the first element of a sequence, but very difficult for it to |
| 4030 |
% identify the final element since we generally don't know the number of elements beforehand. |
| 4031 |
% Consequently we identify the first element (using the |\xcount|) variable (see above), |
| 4032 |
% and then process this first element \textit{without} any comma; |
| 4033 |
% we then place a comma in front of each of the remaining elements. |
| 4034 |
% |
| 4035 |
% We also create two fbox versions of the command: the `F' version places an fbox about the |
| 4036 |
% whole output; the `f' version places an fbox about each element in the output |
| 4037 |
% (these two versions can be helpful when checking white space). |
| 4038 |
% |
| 4039 |
% Note: bugfix 22 October 2017 (RWDN): if the user implemented tt output using \cmd{\tt} |
| 4040 |
% instead of the standard \cmd{\texttt} as the \verb!#2! argument, then the action would |
| 4041 |
% not of course remain local, and consequently we have added a leading brace and |
| 4042 |
% complementary trailing brace around the the \cmd{\ifthenelse...} command in each of |
| 4043 |
% the following three macros to limit the action. |
| 4044 |
% |
| 4045 |
% \noindent\textsc{usage}: |\ShowSequence{,}{\rr}{R,L,Up,Dp.....}| |
| 4046 |
% |
| 4047 |
% \begin{macrocode} |
| 4048 |
\newcommand{\ShowSequence}[3]{% |
| 4049 |
\ForEachX{,}{% |
| 4050 |
{\ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}}% |
| 4051 |
}{#3}% |
| 4052 |
}% |
| 4053 |
\newcommand{\ShowSequenceF}[3]{% |
| 4054 |
\fbox{% |
| 4055 |
\ForEachX{,}{% |
| 4056 |
{\ifthenelse{\xcount=1}{#2{\x}}{#1#2{\x}}}% |
| 4057 |
}{#3}% |
| 4058 |
}}% |
| 4059 |
\newcommand{\ShowSequencef}[3]{% |
| 4060 |
\ForEachX{,}{% |
| 4061 |
{\ifthenelse{\xcount=1}{\fbox{#2{\x}}}{#1{\fbox{#2{\x}}}}}% |
| 4062 |
}{#3}% |
| 4063 |
}% |
| 4064 |
% \end{macrocode} |
| 4065 |
% \begin{macro}{\SequenceInfo} |
| 4066 |
% \begin{macro}{\SequenceName} |
| 4067 |
% \begin{macro}{\SequenceShort} |
| 4068 |
% \begin{macro}{\SequenceLong} |
| 4069 |
% \noindent\textsc{Sequence holders}: providing none of the Rubik rotation-codes has a trailing |
| 4070 |
% integer (e.g.,~R3) then the Rubik macros (|\rr|, |\rrh|, |\Rubik|, |\textRubik|) will work |
| 4071 |
% as expected when used as the second argument in the \cmd{\ShowSequence} command |
| 4072 |
% (described above). However, a problem arises when trying to process in this way any Rubik |
| 4073 |
% rotation-codes having a terminal integer (for~example, short-codes e.g.,~R2, D3,...), since the |
| 4074 |
% \cmd{\ShowSequence} macro cannot expand short-codes into their long-code |
| 4075 |
% elements (e.g.,~~R,R,D,D,D,...). |
| 4076 |
% |
| 4077 |
% Accommodating such codes when using the \cmd{\ShowSequence} command is currently |
| 4078 |
% solved by using separate `holders' for four derived strings, namely: \cmd{\SequenceInfo}, |
| 4079 |
% \cmd{\SequenceName},\cmd{\SequenceShort} and \cmd{\SequenceLong} |
| 4080 |
% (for details see Section~\ref{sec:showsequence}). |
| 4081 |
% These are generated automatically by the Perl \textsc{rubikrotation} program, which returns |
| 4082 |
% a so-called `long' version of the `short' string (the argument of the \cmd{\RubikRotation} |
| 4083 |
% command). For~example, the Perl program converts |
| 4084 |
% any short codes (e.g.,~R2, D3,... ) $\rightarrow$ long form, e.g.,~R,R,D,D,D,... |
| 4085 |
% (see the \textsc{rubikrotation} documentation for details). |
| 4086 |
% In order for the four `holders' of these derived strings generated by the Perl program |
| 4087 |
% (written to the file \texttt{rubikstateNEW.dat}) to be accessible to the user they need to |
| 4088 |
% defined here so that they can then be `redefined' (by the Perl program) in the file |
| 4089 |
% \texttt{rubikstateNEW.dat}: |
| 4090 |
% \begin{macrocode} |
| 4091 |
\newcommand{\SequenceInfo}{{}}% %% INFO only |
| 4092 |
\newcommand{\SequenceName}{{}}% %% NAME only |
| 4093 |
\newcommand{\SequenceShort}{{}}% %% original SHORT seq but with NO NAME |
| 4094 |
\newcommand{\SequenceLong}{{}}% %% just the LONG string \& no name |
| 4095 |
% \end{macrocode} |
| 4096 |
% \end{macro} |
| 4097 |
% \end{macro} |
| 4098 |
% \end{macro} |
| 4099 |
% \end{macro} |
| 4100 |
% \end{macro} |
| 4101 |
% \end{macro} |
| 4102 |
% \end{macro} |
| 4103 |
% |
| 4104 |
% |
| 4105 |
% |
| 4106 |
% \subsection{\hspace{3mm}SequenceBrace commands} |
| 4107 |
% \label{sec:sequencebracecode} |
| 4108 |
% |
| 4109 |
% \begin{macro}{\SequenceBraceA} |
| 4110 |
% \begin{macro}{\SequenceBraceB} |
| 4111 |
% The \cmd{\SequenceBraceX}\marg{name}\marg{sequence} command |
| 4112 |
% is a tool for displaying a named sequence using a brace. The trailing~A |
| 4113 |
% denotes that the brace is placed Above the sequence; B~denotes the brace is Below the sequence. |
| 4114 |
% For usage see Section~\ref{sec:sequencebrace}. |
| 4115 |
% |
| 4116 |
% \begin{macrocode} |
| 4117 |
\newcommand{\SequenceBraceA}[2]{$\overbrace{\mbox{#2}}^{\mbox{#1}}$}% |
| 4118 |
\newcommand{\SequenceBraceB}[2]{$\underbrace{\mbox{#2}}_{\mbox{#1}}$}% |
| 4119 |
\newcommand{\SequenceBraceAF}[2]{\fbox{$\overbrace{\mbox{#2}}^{\mbox{#1}}$}}% |
| 4120 |
\newcommand{\SequenceBraceBF}[2]{\fbox{$\underbrace{\mbox{#2}}_{\mbox{#1}}$}}% |
| 4121 |
% \end{macrocode} |
| 4122 |
% \end{macro} |
| 4123 |
% \end{macro} |
| 4124 |
% |
| 4125 |
% |
| 4126 |
% \subsection{\hspace{3mm}RubikFace commands} |
| 4127 |
% \label{sec:rubikfacecode} |
| 4128 |
% |
| 4129 |
% Cube face notation: U, D, L, R, F, B (Singmaster) |
| 4130 |
% {\newline}Cubie-facelet notation: t, m, b, l, m, r = top, middle, |
| 4131 |
% bottom, left, middle, right. |
| 4132 |
% We use this lower case notation in XY-pairs to denote individual cubie facelets |
| 4133 |
% on a given face (to avoid confusion with cube Face notation), as follows: |
| 4134 |
% {\newline}\strut\hspace{1cm}top row \ \ \ \ \ (1,2,3) = lt, \ \, mt, \ rt |
| 4135 |
% {\newline}\strut\hspace{1cm}middle row\, (4,5,6) = lm, mm, rm |
| 4136 |
% {\newline}\strut\hspace{1cm}bottom row (7,8,9) = lb, \ mb, \ rb |
| 4137 |
% {\newline}For example, the current colour of the \textbf{r}ight \textbf{b}ottom facelet |
| 4138 |
% on the \textsc{front} face is held as the variable \cmd{\Frb} etc. |
| 4139 |
% |
| 4140 |
% The cubie-facelets (squares) on a face are also parameterized numerically |
| 4141 |
% \verb!#1!--\verb!#9! reading from left-to-right, starting top-left \& |
| 4142 |
% ending bottom-right, when used as arguments for specifying particular colours |
| 4143 |
% (as in the \cmd{\RubikFace..} commands---see below). |
| 4144 |
|
| 4145 |
% |
| 4146 |
% |
| 4147 |
% \begin{macro}{\RubikFaceUp} |
| 4148 |
% \begin{macro}{\RubikFaceDown} |
| 4149 |
% \begin{macro}{\RubikFaceLeft} |
| 4150 |
% \begin{macro}{\RubikFaceRight} |
| 4151 |
% \begin{macro}{\RubikFaceFront} |
| 4152 |
% \begin{macro}{\RubikFaceBack} |
| 4153 |
% These 5 commands allocate a colour to each of the 9 cubie-squares in the |
| 4154 |
% specified face (Up, Down, Left, Right, Front, Back). Each command takes 9 arguments |
| 4155 |
% (colour codes) in the order 1--9 as specified above. |
| 4156 |
% |
| 4157 |
% {\noindent}\textsc{example}: \cmd{\RubikFaceUp\{R\}\{O\}\{Y\} \{G\}\{B\}\{W\} \{X\}\{R\}\{G\}} |
| 4158 |
% |
| 4159 |
% |
| 4160 |
% {\noindent}Each of the 9 \cmd{\def\{\}} commands below allocates one colour |
| 4161 |
% to a specific cubie-square (facelet), using a simple three-letter encoding. |
| 4162 |
% Each letter is an initial letter of the words Up, Down, Left, Right, Front, Back, |
| 4163 |
% left, middle, right, top, middle, bottom. |
| 4164 |
% |
| 4165 |
% For~example, in the command \verb!\def\Urt{#1}! |
| 4166 |
% the U denotes the Up face of the cube, while the \texttt{rt} denotes |
| 4167 |
% the ``right-top'' facelet on this face. Note that the order |
| 4168 |
% of the two lower-case letters (\texttt{rt}) is |
| 4169 |
% in the $x,y$ order; i.e.,~the first of the two lower-case letters relates to the $x$ |
| 4170 |
% direction (either left, middle, or right), while the second lower-case letter |
| 4171 |
% relates to the $y$ direction (either top, middle, or bottom)---this rule makes it |
| 4172 |
% easy to remember the order. |
| 4173 |
% \end{macro} |
| 4174 |
% \end{macro} |
| 4175 |
% \end{macro} |
| 4176 |
% \end{macro} |
| 4177 |
% \end{macro} |
| 4178 |
% \end{macro} |
| 4179 |
% \begin{macrocode} |
| 4180 |
\newcommand{\RubikFaceUp}[9]{% |
| 4181 |
\def\Ult{#1}\def\Umt{#2}\def\Urt{#3}% |
| 4182 |
\def\Ulm{#4}\def\Umm{#5}\def\Urm{#6}% |
| 4183 |
\def\Ulb{#7}\def\Umb{#8}\def\Urb{#9}% |
| 4184 |
} |
| 4185 |
\newcommand{\RubikFaceFront}[9]{% |
| 4186 |
\def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% |
| 4187 |
\def\Flm{#4}\def\Fmm{#5}\def\Frm{#6}% |
| 4188 |
\def\Flb{#7}\def\Fmb{#8}\def\Frb{#9}% |
| 4189 |
} |
| 4190 |
\newcommand{\RubikFaceRight}[9]{% |
| 4191 |
\def\Rlt{#1}\def\Rmt{#2}\def\Rrt{#3}% |
| 4192 |
\def\Rlm{#4}\def\Rmm{#5}\def\Rrm{#6}% |
| 4193 |
\def\Rlb{#7}\def\Rmb{#8}\def\Rrb{#9}% |
| 4194 |
} |
| 4195 |
\newcommand{\RubikFaceDown}[9]{% |
| 4196 |
\def\Dlt{#1}\def\Dmt{#2}\def\Drt{#3}% |
| 4197 |
\def\Dlm{#4}\def\Dmm{#5}\def\Drm{#6}% |
| 4198 |
\def\Dlb{#7}\def\Dmb{#8}\def\Drb{#9}% |
| 4199 |
} |
| 4200 |
\newcommand{\RubikFaceLeft}[9]{% |
| 4201 |
\def\Llt{#1}\def\Lmt{#2}\def\Lrt{#3}% |
| 4202 |
\def\Llm{#4}\def\Lmm{#5}\def\Lrm{#6}% |
| 4203 |
\def\Llb{#7}\def\Lmb{#8}\def\Lrb{#9}% |
| 4204 |
} |
| 4205 |
\newcommand{\RubikFaceBack}[9]{% |
| 4206 |
\def\Blt{#1}\def\Bmt{#2}\def\Brt{#3}% |
| 4207 |
\def\Blm{#4}\def\Bmm{#5}\def\Brm{#6}% |
| 4208 |
\def\Blb{#7}\def\Bmb{#8}\def\Brb{#9}% |
| 4209 |
} |
| 4210 |
% \end{macrocode} |
| 4211 |
% |
| 4212 |
% \begin{macro}{\RubikFaceUpAll} |
| 4213 |
% \begin{macro}{\RubikFaceDownAll} |
| 4214 |
% \begin{macro}{\RubikFaceLeftAll} |
| 4215 |
% \begin{macro}{\RubikFaceRightAll} |
| 4216 |
% \begin{macro}{\RubikFaceFrontAll} |
| 4217 |
% \begin{macro}{\RubikFaceBackAll} |
| 4218 |
% These 5 commands allocate the same colour to all 9 cubie-squares |
| 4219 |
% in the specified face (Up, Down, Left, Right, Front). |
| 4220 |
% Each command therefore takes only 1~argument (one of the colour codes). |
| 4221 |
% |
| 4222 |
% {\noindent}For~example, \cmd{\RubikFaceUpAll\{R\}} |
| 4223 |
% \end{macro} |
| 4224 |
% \end{macro} |
| 4225 |
% \end{macro} |
| 4226 |
% \end{macro} |
| 4227 |
% \end{macro} |
| 4228 |
% \end{macro} |
| 4229 |
% \begin{macrocode} |
| 4230 |
\newcommand{\RubikFaceUpAll}[1]{% |
| 4231 |
\def\Ult{#1}\def\Umt{#1}\def\Urt{#1}% |
| 4232 |
\def\Ulm{#1}\def\Umm{#1}\def\Urm{#1}% |
| 4233 |
\def\Ulb{#1}\def\Umb{#1}\def\Urb{#1}% |
| 4234 |
} |
| 4235 |
\newcommand{\RubikFaceFrontAll}[1]{% |
| 4236 |
\def\Flt{#1}\def\Fmt{#1}\def\Frt{#1}% |
| 4237 |
\def\Flm{#1}\def\Fmm{#1}\def\Frm{#1}% |
| 4238 |
\def\Flb{#1}\def\Fmb{#1}\def\Frb{#1}% |
| 4239 |
} |
| 4240 |
\newcommand{\RubikFaceRightAll}[1]{% |
| 4241 |
\def\Rlt{#1}\def\Rmt{#1}\def\Rrt{#1}% |
| 4242 |
\def\Rlm{#1}\def\Rmm{#1}\def\Rrm{#1}% |
| 4243 |
\def\Rlb{#1}\def\Rmb{#1}\def\Rrb{#1}% |
| 4244 |
} |
| 4245 |
\newcommand{\RubikFaceLeftAll}[1]{% |
| 4246 |
\def\Llt{#1}\def\Lmt{#1}\def\Lrt{#1}% |
| 4247 |
\def\Llm{#1}\def\Lmm{#1}\def\Lrm{#1}% |
| 4248 |
\def\Llb{#1}\def\Lmb{#1}\def\Lrb{#1}% |
| 4249 |
} |
| 4250 |
\newcommand{\RubikFaceDownAll}[1]{% |
| 4251 |
\def\Dlt{#1}\def\Dmt{#1}\def\Drt{#1}% |
| 4252 |
\def\Dlm{#1}\def\Dmm{#1}\def\Drm{#1}% |
| 4253 |
\def\Dlb{#1}\def\Dmb{#1}\def\Drb{#1}% |
| 4254 |
} |
| 4255 |
\newcommand{\RubikFaceBackAll}[1]{% |
| 4256 |
\def\Blt{#1}\def\Bmt{#1}\def\Brt{#1}% |
| 4257 |
\def\Blm{#1}\def\Bmm{#1}\def\Brm{#1}% |
| 4258 |
\def\Blb{#1}\def\Bmb{#1}\def\Brb{#1}% |
| 4259 |
} |
| 4260 |
% \end{macrocode} |
| 4261 |
% |
| 4262 |
% {\noindent}Finally, we now use these commands to initialise all |
| 4263 |
% visible faces to the default colour grey~(X) |
| 4264 |
% |
| 4265 |
% \begin{macrocode} |
| 4266 |
\RubikFaceUpAll{X}% |
| 4267 |
\RubikFaceDownAll{X}% |
| 4268 |
\RubikFaceLeftAll{X}% |
| 4269 |
\RubikFaceRightAll{X}% |
| 4270 |
\RubikFaceFrontAll{X}% |
| 4271 |
\RubikFaceBackAll{X}% |
| 4272 |
% \end{macrocode} |
| 4273 |
% |
| 4274 |
% |
| 4275 |
% |
| 4276 |
% |
| 4277 |
% \subsection{\hspace{3mm}RubikCubeGrey command} |
| 4278 |
% \label{sec:codegrey} |
| 4279 |
% |
| 4280 |
% \begin{macro}{\RubikCubeGrey} |
| 4281 |
% \begin{macro}{\RubikCubeGreyWY} |
| 4282 |
% \begin{macro}{\RubikCubeGreyWB} |
| 4283 |
% This command sets the face/colour configuration (state) of a 3x3x3 |
| 4284 |
% Rubik cube with no colours allocated except for the central cubie of each face. |
| 4285 |
% The colour configuration of the central cubies matches those defined for |
| 4286 |
% the RubikCubeSolved command (i.e.,~white opposite yellow etc). |
| 4287 |
% We also make WY and WB versions, and implement equivalent `gray' versions |
| 4288 |
% (to be consistent with TikZ). |
| 4289 |
% \begin{macrocode} |
| 4290 |
\newcommand{\RubikCubeGrey}{% |
| 4291 |
\RubikFaceRight{X}{X}{X}{X}{G}{X}{X}{X}{X}% |
| 4292 |
\RubikFaceLeft {X}{X}{X}{X}{B}{X}{X}{X}{X}% |
| 4293 |
\RubikFaceUp {X}{X}{X}{X}{W}{X}{X}{X}{X}% |
| 4294 |
\RubikFaceDown {X}{X}{X}{X}{Y}{X}{X}{X}{X}% |
| 4295 |
\RubikFaceFront{X}{X}{X}{X}{O}{X}{X}{X}{X}% |
| 4296 |
\RubikFaceBack {X}{X}{X}{X}{R}{X}{X}{X}{X}% |
| 4297 |
} |
| 4298 |
\newcommand{\RubikCubeGray}{\RubikCubeGrey} |
| 4299 |
\newcommand{\RubikCubeGreyWY}{\RubikCubeGrey} |
| 4300 |
\newcommand{\RubikCubeGrayWY}{\RubikCubeGreyWY} |
| 4301 |
%% |
| 4302 |
\newcommand{\RubikCubeGreyWB}{% |
| 4303 |
\RubikFaceRight{X}{X}{X}{X}{R}{X}{X}{X}{X}% |
| 4304 |
\RubikFaceLeft {X}{X}{X}{X}{O}{X}{X}{X}{X}% |
| 4305 |
\RubikFaceUp {X}{X}{X}{X}{W}{X}{X}{X}{X}% |
| 4306 |
\RubikFaceDown {X}{X}{X}{X}{B}{X}{X}{X}{X}% |
| 4307 |
\RubikFaceFront{X}{X}{X}{X}{G}{X}{X}{X}{X}% |
| 4308 |
\RubikFaceBack {X}{X}{X}{X}{Y}{X}{X}{X}{X}% |
| 4309 |
} |
| 4310 |
\newcommand{\RubikCubeGrayWB}{\RubikCubeGreyWB} |
| 4311 |
% \end{macrocode} |
| 4312 |
% \end{macro} |
| 4313 |
% \end{macro} |
| 4314 |
% \end{macro} |
| 4315 |
% |
| 4316 |
% |
| 4317 |
% |
| 4318 |
% |
| 4319 |
% \subsection{\hspace{3mm}SolvedConfig command} |
| 4320 |
% |
| 4321 |
% \begin{macro}{\RubikSolvedConfig} |
| 4322 |
% This command sets the face/colour configuration (state) of a typical |
| 4323 |
% solved Rubik cube. Note that the order is Right, Left, Up, Down, Front, Back |
| 4324 |
% (i.e.,~X$+$, X$-$, Y$+$, Y$-$, Z$+$, Z$-$, order). |
| 4325 |
% We shall use this command to define solved cube configurations. |
| 4326 |
% \begin{macrocode} |
| 4327 |
\newcommand{\RubikSolvedConfig}[6]{% |
| 4328 |
\RubikFaceRightAll{#1}% |
| 4329 |
\RubikFaceLeftAll{#2}% |
| 4330 |
\RubikFaceUpAll{#3}% |
| 4331 |
\RubikFaceDownAll{#4}% |
| 4332 |
\RubikFaceFrontAll{#5}% |
| 4333 |
\RubikFaceBackAll{#6}% |
| 4334 |
} |
| 4335 |
% \end{macrocode} |
| 4336 |
% \end{macro} |
| 4337 |
% |
| 4338 |
% |
| 4339 |
% |
| 4340 |
% |
| 4341 |
% \subsection{\hspace{3mm}RubikCubeGreyAll command} |
| 4342 |
% \label{sec:codegreyall} |
| 4343 |
% |
| 4344 |
% \begin{macro}{\RubikCubeGreyAll} |
| 4345 |
% This command sets the face/colour configuration (state) of a 3x3x3 |
| 4346 |
% Rubik cube with no colours allocated. |
| 4347 |
% This colour configuration is the same as the startup default state---all cubies will |
| 4348 |
% appear grey. We implement it using the \cmd{\RubikSolvedConfig} command (above). |
| 4349 |
% We also implement an equivalent `gray' version (to be consistent with TikZ). |
| 4350 |
% \begin{macrocode} |
| 4351 |
\newcommand{\RubikCubeGreyAll}{\RubikSolvedConfig{X}{X}{X}{X}{X}{X}}% |
| 4352 |
\newcommand{\RubikCubeGrayAll}{\RubikCubeGreyAll} |
| 4353 |
% \end{macrocode} |
| 4354 |
% \end{macro} |
| 4355 |
% |
| 4356 |
% |
| 4357 |
% \subsection{\hspace{3mm}RubikCubeSolved command} |
| 4358 |
% \label{sec:codesolvedconfig} |
| 4359 |
% |
| 4360 |
% \begin{macro}{\RubikCubeSolved} |
| 4361 |
% \begin{macro}{\RubikCubeSolvedWY} |
| 4362 |
% \begin{macro}{\RubikCubeSolvedWB} |
| 4363 |
% The first (default) command sets the face/colour configuration (state) one of the standard |
| 4364 |
% commercially available solved Rubik cube (white opposite yellow). The argument order |
| 4365 |
% follows the XYZ notation. For convenience we make a copy named \cmd{\RubikCubeSolvedWY} |
| 4366 |
% (denoting the White opposite Yellow configuration), and also a different version named |
| 4367 |
% \cmd{\RubikCubeSolvedWB} (denoting the White opposite Blue configuration). |
| 4368 |
% These represent the two standard versions of the Rubik Cube. |
| 4369 |
% \begin{macrocode} |
| 4370 |
\newcommand{\RubikCubeSolved}{\RubikSolvedConfig{G}{B}{W}{Y}{O}{R}}% |
| 4371 |
\newcommand{\RubikCubeSolvedWY}{\RubikCubeSolved}% |
| 4372 |
\newcommand{\RubikCubeSolvedWB}{\RubikSolvedConfig{R}{O}{W}{B}{G}{Y}}% |
| 4373 |
% \end{macrocode} |
| 4374 |
% \end{macro} |
| 4375 |
% \end{macro} |
| 4376 |
% \end{macro} |
| 4377 |
% |
| 4378 |
% |
| 4379 |
% \subsection{\hspace{3mm}Slice commands} |
| 4380 |
% |
| 4381 |
% \begin{macro}{\RubikSliceTopR} |
| 4382 |
% \begin{macro}{\RubikSliceTopL} |
| 4383 |
% \begin{macro}{\RubikSliceMiddleR} |
| 4384 |
% \begin{macro}{\RubikSliceMiddleL} |
| 4385 |
% \begin{macro}{\RubikSliceBottomR} |
| 4386 |
% \begin{macro}{\RubikSliceBottomL} |
| 4387 |
% These 6~commands allocate the colour arguments for the 6~visible ordered |
| 4388 |
% facelets along a horizontal slice. There are three horizontal |
| 4389 |
% slices to consider (Top, Middle, Bottom) and each has two viewpoints. |
| 4390 |
% The colour-code arguments are ordered 1--6 from left to right. |
| 4391 |
% The terminal L and R denote the Left (L) viewpoint and Right (R) |
| 4392 |
% viewpoint versions. |
| 4393 |
% Note that the two legacy `Equator' versions (now replaced by `Middle') |
| 4394 |
% are retained (below) to allow backward compatibility. |
| 4395 |
% \begin{macrocode} |
| 4396 |
\newcommand{\RubikSliceTopR}[6]{% |
| 4397 |
\def\Flt{#1}\def\Fmt{#2}\def\Frt{#3}% |
| 4398 |
\def\Rlt{#4}\def\Rmt{#5}\def\Rrt{#6}% |
| 4399 |
} |
| 4400 |
\newcommand{\RubikSliceTopL}[6]{% |
| 4401 |
\def\Llt{#1}\def\Lmt{#2}\def\Lrt{#3}% |
| 4402 |
\def\Flt{#4}\def\Fmt{#5}\def\Frt{#6}% |
| 4403 |
} |
| 4404 |
\newcommand{\RubikSliceMiddleR}[6]{% |
| 4405 |
\def\Flm{#1}\def\Fmm{#2}\def\Frm{#3}% |
| 4406 |
\def\Rlm{#4}\def\Rmm{#5}\def\Rrm{#6}% |
| 4407 |
} |
| 4408 |
\newcommand{\RubikSliceMiddleL}[6]{% |
| 4409 |
\def\Llm{#1}\def\Lmm{#2}\def\Lrm{#3}% |
| 4410 |
\def\Flm{#4}\def\Fmm{#5}\def\Frm{#6}% |
| 4411 |
} |
| 4412 |
\newcommand{\RubikSliceEquatorR}[6]{% |
| 4413 |
\def\Flm{#1}\def\Fmm{#2}\def\Frm{#3}% |
| 4414 |
\def\Rlm{#4}\def\Rmm{#5}\def\Rrm{#6}% |
| 4415 |
} |
| 4416 |
\newcommand{\RubikSliceEquatorL}[6]{% |
| 4417 |
\def\Llm{#1}\def\Lmm{#2}\def\Lrm{#3}% |
| 4418 |
\def\Flm{#4}\def\Fmm{#5}\def\Frm{#6}% |
| 4419 |
} |
| 4420 |
\newcommand{\RubikSliceBottomR}[6]{% |
| 4421 |
\def\Flb{#1}\def\Fmb{#2}\def\Frb{#3}% |
| 4422 |
\def\Rlb{#4}\def\Rmb{#5}\def\Rrb{#6}% |
| 4423 |
} |
| 4424 |
\newcommand{\RubikSliceBottomL}[6]{% |
| 4425 |
\def\Llb{#1}\def\Lmb{#2}\def\Lrb{#3}% |
| 4426 |
\def\Flb{#4}\def\Fmb{#5}\def\Frb{#6}% |
| 4427 |
} |
| 4428 |
% \end{macrocode} |
| 4429 |
% \end{macro} |
| 4430 |
% \end{macro} |
| 4431 |
% \end{macro} |
| 4432 |
% \end{macro} |
| 4433 |
% \end{macro} |
| 4434 |
% \end{macro} |
| 4435 |
% |
| 4436 |
% |
| 4437 |
% \subsection{\hspace{3mm}Cube drawing macros} |
| 4438 |
% |
| 4439 |
% Since the three visible sides of a Rubik cube have up to 27 non-grey colours, |
| 4440 |
% and \TeX\ has only 9 macro parameters available, we are forced to draw |
| 4441 |
% Rubik cubes by first specifying the colours on each of the three faces, |
| 4442 |
% and then using a `DrawRubikCubeXY' command, where the trailing XY code |
| 4443 |
% defines the viewing direction (X = either R or L; Y = either U or D). |
| 4444 |
% The order of the XY code is important: X~first, Y~second (so it is easy to remember). |
| 4445 |
% |
| 4446 |
% On each face the facelets are drawn in the following order: Top row |
| 4447 |
% (left to right), Middle row (left to right), Bottom row (left to right). |
| 4448 |
% |
| 4449 |
% The TikZ draw cycle for each facelet square on a Rubik cube face cycles |
| 4450 |
% through the four corners of the facelet in the following order: |
| 4451 |
% lb $\rightarrow$ lt $\rightarrow$ rt $\rightarrow$ rb; the code being |
| 4452 |
% lb (LeftBottom), lt (LeftTop), rt (RightTop), rb (RightBottom) |
| 4453 |
% (only need four coords); the (x,y) grid origin is at the bottom-left corner of the |
| 4454 |
% \textsc{front} face. |
| 4455 |
% |
| 4456 |
% \begin{macro}{\DrawRubikCubeFrontFace} |
| 4457 |
% This `FrontFace' command is an `internal' command which draws and paints |
| 4458 |
% all the facelets on the \textsc{front} face of a Rubik cube. It is used by all |
| 4459 |
% of the cube drawing macros which display the \textsc{front} face. |
| 4460 |
% The 9~colours are allocated by an earlier \cmd{\RubikFaceFront} command. |
| 4461 |
% These Face macros are based, in part, on those of Peter Bartal (2011). |
| 4462 |
% \begin{macrocode} |
| 4463 |
\newcommand{\DrawRubikCubeFrontFace}{% |
| 4464 |
% ---top row left to right |
| 4465 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% |
| 4466 |
(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; |
| 4467 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmt]% |
| 4468 |
(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; |
| 4469 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% |
| 4470 |
(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; |
| 4471 |
% -----middle row left to right |
| 4472 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flm]% |
| 4473 |
(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; |
| 4474 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmm]% |
| 4475 |
(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; |
| 4476 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frm]% |
| 4477 |
(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; |
| 4478 |
% ----bottom row left to right |
| 4479 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% |
| 4480 |
(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; |
| 4481 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmb]% |
| 4482 |
(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; |
| 4483 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% |
| 4484 |
(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; |
| 4485 |
} |
| 4486 |
% \end{macrocode} |
| 4487 |
% \end{macro} |
| 4488 |
% |
| 4489 |
% \subsubsection{\hspace{3mm}Viewing direction} |
| 4490 |
% |
| 4491 |
% The command `DrawRubikCubeXY' command uses the trailing XY code |
| 4492 |
% to specify the view direction (X = either R or L; Y = either U or D). |
| 4493 |
% The order of the XY code is important: X~first, Y~second (so it is easy |
| 4494 |
% to remember). |
| 4495 |
% |
| 4496 |
% \begin{macro}{\DrawRubikCubeRU} |
| 4497 |
% This command draws and paints a Rubik cube as viewed from |
| 4498 |
% the Right Upper (RU) viewpoint. It starts by using the internal |
| 4499 |
% command \cmd{\DrawRubikCubeFrontFace} to draw the \textsc{front} face, |
| 4500 |
% and then draws the \textsc{up} face followed by the \textsc{right} face. |
| 4501 |
% The colours are allocated to particular facelets using the \cmd{\RubikFaceUp}, |
| 4502 |
% \cmd{\RubikFaceRight} and \cmd{\RubikFaceFront} commands. |
| 4503 |
% |
| 4504 |
% The (x,y) grid origin is at the bottom-left corner of the \textsc{front} face |
| 4505 |
% (see Section~\ref{sec:coordinates}). |
| 4506 |
% The perspective is designed so that the 2D~graphic image of the side face |
| 4507 |
% (\textsc{right} in this particular case) has its `horizontal' lines running |
| 4508 |
% at 45~degrees. This has the useful advantage that the 2D~width of the side is |
| 4509 |
% exactly 1-unit, and so makes it easy to determine the 2D~(x,y) coordinates |
| 4510 |
% of any position, and hence facilitates typesetting text onto the image of |
| 4511 |
% the cube using TikZ commands. |
| 4512 |
% \end{macro} |
| 4513 |
% \begin{macrocode} |
| 4514 |
\newcommand{\DrawRubikCubeRU}{% |
| 4515 |
\DrawRubikCubeFrontFace %% frontface |
| 4516 |
%%-----------Up face---------- |
| 4517 |
%%---top row |
| 4518 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 4519 |
(0.66,3.66) -- (1,4) -- (2,4) -- (1.66,3.66) -- cycle; |
| 4520 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% |
| 4521 |
(1.66,3.66) -- (2,4) -- (3,4) -- (2.66,3.66) -- cycle; |
| 4522 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 4523 |
(2.66,3.66) -- (3,4) -- (4,4) -- (3.66,3.66) -- cycle; |
| 4524 |
%%---middle row |
| 4525 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% |
| 4526 |
(0.33,3.33) -- (0.66,3.66) -- (1.66,3.66) -- (1.33,3.33) -- cycle; |
| 4527 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% |
| 4528 |
(1.33,3.33) -- (1.66,3.66) -- (2.66,3.66) -- (2.33,3.33) -- cycle; |
| 4529 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% |
| 4530 |
(2.33,3.33) -- (2.66,3.66) -- (3.66,3.66) -- (3.33,3.33) -- cycle; |
| 4531 |
%%---bottom row |
| 4532 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 4533 |
(0,3) -- (0.33,3.33) -- (1.33,3.33) -- (1,3) -- cycle; |
| 4534 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% |
| 4535 |
(1,3) -- (1.33,3.33) -- (2.33,3.33) -- (2,3) -- cycle; |
| 4536 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 4537 |
(2,3) -- (2.33,3.33) -- (3.33,3.33) -- (3,3) -- cycle; |
| 4538 |
%%-----------Right face---------- |
| 4539 |
%%---top row |
| 4540 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 4541 |
(3,2) -- (3, 3) -- (3.33,3.33) -- (3.33,2.33) -- cycle; |
| 4542 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% |
| 4543 |
(3.33,2.33) -- (3.33, 3.33) -- (3.66,3.66) -- (3.66,2.66) -- cycle; |
| 4544 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 4545 |
(3.66,2.66) -- (3.66, 3.66) -- (4,4) -- (4,3) -- cycle; |
| 4546 |
%%---middle row |
| 4547 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% |
| 4548 |
(3,1) -- (3, 2) -- (3.33,2.33) -- (3.33,1.33) -- cycle; |
| 4549 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% |
| 4550 |
(3.33,1.33) -- (3.33, 2.33) -- (3.66,2.66) -- (3.66,1.66) -- cycle; |
| 4551 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% |
| 4552 |
(3.66,1.66) -- (3.66, 2.66) -- (4,3) -- (4,2) -- cycle; |
| 4553 |
%%---bottom row |
| 4554 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 4555 |
(3,0) -- (3, 1) -- (3.33,1.33) -- (3.33,0.33) -- cycle; |
| 4556 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% |
| 4557 |
(3.33,0.33) -- (3.33, 1.33) -- (3.66,1.66) -- (3.66,0.66) -- cycle; |
| 4558 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 4559 |
(3.66,0.66) -- (3.66, 1.66) -- (4,2) -- (4,1) -- cycle; |
| 4560 |
} |
| 4561 |
% \end{macrocode} |
| 4562 |
% |
| 4563 |
% \begin{macro}{\DrawRubikCube} |
| 4564 |
% This command is equivalent to the previous \cmd{\DrawRubikCubeRU} |
| 4565 |
% and hence is the default form (i.e.,~if the trailing XY |
| 4566 |
% viewpoint code is accidentally omitted). |
| 4567 |
% \end{macro} |
| 4568 |
% \begin{macrocode} |
| 4569 |
\newcommand{\DrawRubikCube}{\DrawRubikCubeRU} |
| 4570 |
% \end{macrocode} |
| 4571 |
% |
| 4572 |
% |
| 4573 |
% \begin{macro}{\DrawRubikCubeRD} |
| 4574 |
% This command draws and paints a Rubik cube as viewed from |
| 4575 |
% the Right Down (RD) viewpoint. |
| 4576 |
% \end{macro} |
| 4577 |
% \begin{macrocode} |
| 4578 |
\newcommand{\DrawRubikCubeRD}{% |
| 4579 |
\DrawRubikCubeFrontFace %% frontface |
| 4580 |
%%----------Right face-------- |
| 4581 |
%%---top row |
| 4582 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 4583 |
(3,2) -- (3, 3) -- (3.33,2.66) -- (3.33,1.66) -- cycle; |
| 4584 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% |
| 4585 |
(3.33,1.66) -- (3.33, 2.66) -- (3.66,2.33) -- (3.66,1.33) -- cycle; |
| 4586 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 4587 |
(3.66,1.33) -- (3.66, 2.33) -- (4,2) -- (4,1) -- cycle; |
| 4588 |
%%---middle row |
| 4589 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% |
| 4590 |
(3,1) -- (3, 2) -- (3.33,1.66) -- (3.33,0.66) -- cycle; |
| 4591 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% |
| 4592 |
(3.33,0.66) -- (3.33, 1.66) -- (3.66,1.33) -- (3.66,0.33) -- cycle; |
| 4593 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% |
| 4594 |
(3.66,0.33) -- (3.66, 1.33) -- (4,1) -- (4,0) -- cycle; |
| 4595 |
%%---bottom row |
| 4596 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 4597 |
(3,0) -- (3, 1) -- (3.33,0.66) -- (3.33,-0.33) -- cycle; |
| 4598 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% |
| 4599 |
(3.33,-0.33) -- (3.33, 0.66) -- (3.66,0.33) -- (3.66,-0.66) -- cycle; |
| 4600 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 4601 |
(3.66,-0.66) -- (3.66, 0.33) -- (4,0) -- (4,-1) -- cycle; |
| 4602 |
%%-----------Down face--------- |
| 4603 |
%%---top row |
| 4604 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 4605 |
(0.33,-0.33) -- (0, 0) -- (1,0) -- (1.33,-0.33) -- cycle; |
| 4606 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% |
| 4607 |
(1.33,-0.33) -- (1, 0) -- (2,0) -- (2.33,-0.33) -- cycle; |
| 4608 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 4609 |
(2.33,-0.33) -- (2, 0) -- (3,0) -- (3.33,-0.33) -- cycle; |
| 4610 |
%%---middle row |
| 4611 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% |
| 4612 |
(0.66,-0.66) -- (0.33, -0.33) -- (1.33,-0.33) -- (1.66,-0.66) -- cycle; |
| 4613 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% |
| 4614 |
(1.66,-0.66) -- (1.33, -0.33) -- (2.33,-0.33) -- (2.66,-0.66) -- cycle; |
| 4615 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% |
| 4616 |
(2.66,-0.66) -- (2.33, -0.33) -- (3.33,-0.33) -- (3.66,-0.66) -- cycle; |
| 4617 |
%%---bottom row |
| 4618 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 4619 |
(1,-1) -- (0.66, -0.66) -- (1.66,-0.66) -- (2,-1) -- cycle; |
| 4620 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% |
| 4621 |
(2,-1) -- (1.66, -0.66) -- (2.66,-0.66) -- (3,-1) -- cycle; |
| 4622 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 4623 |
(3,-1) -- (2.66, -0.66) -- (3.66,-0.66) -- (4,-1) -- cycle; |
| 4624 |
} |
| 4625 |
% \end{macrocode} |
| 4626 |
% |
| 4627 |
% \begin{macro}{\DrawRubikCubeLD} |
| 4628 |
% This command draws and paints a Rubik cube as viewed from |
| 4629 |
% the Left Down (LD) viewpoint. |
| 4630 |
% \end{macro} |
| 4631 |
% \begin{macrocode} |
| 4632 |
\newcommand{\DrawRubikCubeLD}{% |
| 4633 |
\DrawRubikCubeFrontFace %% frontface |
| 4634 |
%%------------Left face-------- |
| 4635 |
%%---top row |
| 4636 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 4637 |
(-1,1) -- (-1, 2) -- (-0.66,2.33) -- (-0.66,1.33) -- cycle; |
| 4638 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% |
| 4639 |
(-0.66,1.33) -- (-0.66, 2.33) -- (-0.33,2.66) -- (-0.33,1.66) -- cycle; |
| 4640 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 4641 |
(-0.33,1.66) -- (-0.33, 2.66) -- (0,3) -- (0,2) -- cycle; |
| 4642 |
%%---middle row |
| 4643 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% |
| 4644 |
(-1,0) -- (-1, 1) -- (-0.66,1.33) -- (-0.66,0.33) -- cycle; |
| 4645 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% |
| 4646 |
(-0.66,0.33) -- (-0.66, 1.33) -- (-0.33,1.66) -- (-0.33,0.66) -- cycle; |
| 4647 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% |
| 4648 |
(-0.33,0.66) -- (-0.33, 1.66) -- (0,2) -- (0,1) -- cycle; |
| 4649 |
%%---bottom row |
| 4650 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 4651 |
(-1,-1) -- (-1, 0) -- (-0.66,0.33) -- (-0.66,-0.66) -- cycle; |
| 4652 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% |
| 4653 |
(-0.66,-0.66) -- (-0.66, 0.33) -- (-0.33,0.66) -- (-0.33,-0.33) -- cycle; |
| 4654 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 4655 |
(-0.33,-0.33) -- (-0.33, 0.66) -- (0,1) -- (0,0) -- cycle; |
| 4656 |
%%------------Down face---------- |
| 4657 |
%%---top row |
| 4658 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 4659 |
(-0.33,-0.33) -- (0, 0) -- (1,0) -- (0.66,-0.33) -- cycle; |
| 4660 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% |
| 4661 |
(0.66,-0.33) -- (1, 0) -- (2,0) -- (1.66,-0.33) -- cycle; |
| 4662 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 4663 |
(1.66,-0.33) -- (2, 0) -- (3,0) -- (2.66,-0.33) -- cycle; |
| 4664 |
%%---middle row |
| 4665 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% |
| 4666 |
(-0.66,-0.66) -- (-0.33, -0.33) -- (0.66,-0.33) -- (0.33,-0.66) -- cycle; |
| 4667 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% |
| 4668 |
(0.33,-0.66) -- (0.66, -0.33) -- (1.66,-0.33) -- (1.33,-0.66) -- cycle; |
| 4669 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% |
| 4670 |
(1.33,-0.66) -- (1.66, -0.33) -- (2.66,-0.33) -- (2.33,-0.66) -- cycle; |
| 4671 |
%%---bottom row |
| 4672 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 4673 |
(-1,-1) -- (-0.66, -0.66) -- (0.33,-0.66) -- (0,-1) -- cycle; |
| 4674 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% |
| 4675 |
(0,-1) -- (0.33, -0.66) -- (1.33,-0.66) -- (1,-1) -- cycle; |
| 4676 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 4677 |
(1,-1) -- (1.33, -0.66) -- (2.33,-0.66) -- (2,-1) -- cycle; |
| 4678 |
} |
| 4679 |
% \end{macrocode} |
| 4680 |
% |
| 4681 |
% |
| 4682 |
% \begin{macro}{\DrawRubikCubeLU} |
| 4683 |
% This command draws and paints a Rubik cube as viewed from |
| 4684 |
% the Left Up (LU) viewpoint. |
| 4685 |
% \end{macro} |
| 4686 |
% \begin{macrocode} |
| 4687 |
\newcommand{\DrawRubikCubeLU}{% |
| 4688 |
\DrawRubikCubeFrontFace %% frontface |
| 4689 |
%%-----------Left face----------- |
| 4690 |
%%---top row |
| 4691 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 4692 |
(-1,3) -- (-1, 4) -- (-0.66,3.66) -- (-0.66,2.66) -- cycle; |
| 4693 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% |
| 4694 |
(-0.66,2.66) -- (-0.66, 3.66) -- (-0.33,3.33) -- (-0.33,2.33) -- cycle; |
| 4695 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 4696 |
(-0.33,2.33) -- (-0.33, 3.33) -- (0,3) -- (0,2) -- cycle; |
| 4697 |
%%---middle row |
| 4698 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% |
| 4699 |
(-1,2) -- (-1, 3) -- (-0.66,2.66) -- (-0.66,1.66) -- cycle; |
| 4700 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% |
| 4701 |
(-0.66,1.66) -- (-0.66, 2.66) -- (-0.33,2.33) -- (-0.33,1.33) -- cycle; |
| 4702 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% |
| 4703 |
(-0.33,1.33) -- (-0.33, 2.33) -- (0,2) -- (0,1) -- cycle; |
| 4704 |
%%---bottom row |
| 4705 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 4706 |
(-1,1) -- (-1, 2) -- (-0.66,1.66) -- (-0.66,0.66) -- cycle; |
| 4707 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% |
| 4708 |
(-0.66,0.66) -- (-0.66, 1.66) -- (-0.33,1.33) -- (-0.33,0.33) -- cycle; |
| 4709 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 4710 |
(-0.33,0.33) -- (-0.33, 1.33) -- (0,1) -- (0,0) -- cycle; |
| 4711 |
%%-----------Up face--------- |
| 4712 |
%%---top row |
| 4713 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 4714 |
(-0.66,3.66) -- (-1, 4) -- (0,4) -- (0.33,3.66) -- cycle; |
| 4715 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% |
| 4716 |
(0.33,3.66) -- (0, 4) -- (1,4) -- (1.33,3.66) -- cycle; |
| 4717 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 4718 |
(1.33,3.66) -- (1, 4) -- (2,4) -- (2.33,3.66) -- cycle; |
| 4719 |
%%---middle row |
| 4720 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% |
| 4721 |
(-0.33,3.33) -- (-0.66, 3.66) -- (0.33,3.66) -- (0.66,3.33) -- cycle; |
| 4722 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% |
| 4723 |
(0.66,3.33) -- (0.33, 3.66) -- (1.33,3.66) -- (1.66,3.33) -- cycle; |
| 4724 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% |
| 4725 |
(1.66,3.33) -- (1.33, 3.66) -- (2.33,3.66) -- (2.66,3.33) -- cycle; |
| 4726 |
%%---bottom row |
| 4727 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 4728 |
(0,3) -- (-0.33, 3.33) -- (0.66,3.33) -- (1,3) -- cycle; |
| 4729 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% |
| 4730 |
(1,3) -- (0.66, 3.33) -- (1.66,3.33) -- (2,3) -- cycle; |
| 4731 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 4732 |
(2,3) -- (1.66, 3.33) -- (2.66,3.33) -- (3,3) -- cycle;% |
| 4733 |
\ %%trailing space |
| 4734 |
} |
| 4735 |
% \end{macrocode} |
| 4736 |
% |
| 4737 |
% RWDN19D removed DrawRubikLayerFace commands Feb 19 2018 |
| 4738 |
% |
| 4739 |
% |
| 4740 |
% |
| 4741 |
% \subsection{\hspace{3mm}DrawRubikFlatX commands} |
| 4742 |
% \label{sec:codedrawrubikflatcommands} |
| 4743 |
% |
| 4744 |
% [\textsc{Background}: These commands (new in version 3.0) were modified from the |
| 4745 |
% earlier \cmd{\FlatUp}, \cmd{\FlatDown} etc., commands; i.e.,~they were |
| 4746 |
% renamed as a set of \cmd{\Draw...} commands so as to make this |
| 4747 |
% notation consistent with the other \cmd{\Draw..} commands. |
| 4748 |
% Note also that the \cmd{\DrawRubikFace..} commands are essentially |
| 4749 |
% these same commands but with their two coordinate arguments X,Y |
| 4750 |
% set to $x=0$, $y=0$---see Section~\ref{sec:drawrubikfacecode}] |
| 4751 |
% |
| 4752 |
% \begin{macro}{\DrawRubikFlatUp} |
| 4753 |
% \begin{macro}{\DrawRubikFlatDown} |
| 4754 |
% \begin{macro}{\DrawRubikFlatLeft} |
| 4755 |
% \begin{macro}{\DrawRubikFlatRight} |
| 4756 |
% \begin{macro}{\DrawRubikFlatFront} |
| 4757 |
% \begin{macro}{\DrawRubikFlatBack} |
| 4758 |
% Each of these commands draws a separate (flat) face (9~facelets). |
| 4759 |
% Each command (except \cmd{\DrawRubikFlatFront}) takes two arguments, |
| 4760 |
% namely the X-coordinate and Y-coordinate of the bottom-left |
| 4761 |
% corner of the face. This (X,Y) pair of coordinates therefore allows |
| 4762 |
% the user to position the face in relation to the cube itself. |
| 4763 |
% These commands were motivated by a need to |
| 4764 |
% be able to show hidden faces under certain circumstances. |
| 4765 |
% |
| 4766 |
% Note also that the \cmd{\DrawRubikFlatFront} command takes no arguments, |
| 4767 |
% since by definition the bottom left corner of this face is at (0,0), |
| 4768 |
% and there seems to be no reason (just now) for this face to have the |
| 4769 |
% facility to be positioned otherwise. |
| 4770 |
% |
| 4771 |
% \textsc{example}: The following command positions the Up face so |
| 4772 |
% that its bottom left corner is located at (0,3): |
| 4773 |
% \begin{quote} |
| 4774 |
% \cmd{\DrawRubikFlatUp\{0\}\{3\}} |
| 4775 |
% \end{quote} |
| 4776 |
% These new commands are also used by the commands \cmd{\DrawRubikCubeF} and |
| 4777 |
% \cmd{\DrawRubikCubeSF} to draw various `flat' representations |
| 4778 |
% of a Rubik cube. |
| 4779 |
% |
| 4780 |
% The (x,y) variables are here encoded as (\cmd{\ux}, \cmd{\uy}) where the |
| 4781 |
% `u' stands for Up etc. However, since we are unable to use a `dx, dy' notation |
| 4782 |
% with the \cmd{\DrawRubikFlatDown} command (since dx and dy are already used by the |
| 4783 |
% \cmd{\cube@dxdydz...} command), we encode these instead as (\cmd{\ddx}, \cmd{\ddy}). |
| 4784 |
% |
| 4785 |
% \end{macro} |
| 4786 |
% \end{macro} |
| 4787 |
% \end{macro} |
| 4788 |
% \end{macro} |
| 4789 |
% \end{macro} |
| 4790 |
% \end{macro} |
| 4791 |
% \begin{macrocode} |
| 4792 |
\newcommand{\DrawRubikFlatUp}[2]{% |
| 4793 |
\pgfmathsetmacro{\ux}{#1}% |
| 4794 |
\pgfmathsetmacro{\uy}{#2}% |
| 4795 |
%%---top row |
| 4796 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 4797 |
(\ux + 0,\uy + 2) -- (\ux + 0,\uy + 3) -- (\ux + 1,\uy + 3)% |
| 4798 |
-- (\ux + 1,\uy + 2) -- cycle; |
| 4799 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umt]% |
| 4800 |
(\ux + 1,\uy + 2) -- (\ux + 1,\uy + 3) -- (\ux + 2,\uy + 3)% |
| 4801 |
-- (\ux + 2,\uy + 2) -- cycle; |
| 4802 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 4803 |
(\ux + 2,\uy + 2) -- (\ux + 2,\uy + 3) -- (\ux + 3,\uy + 3)% |
| 4804 |
-- (\ux + 3,\uy + 2) -- cycle; |
| 4805 |
%%-----middle row |
| 4806 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulm]% |
| 4807 |
(\ux + 0,\uy + 1) -- (\ux + 0,\uy + 2) -- (\ux + 1,\uy + 2)% |
| 4808 |
-- (\ux + 1,\uy + 1) -- cycle; |
| 4809 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umm]% |
| 4810 |
(\ux + 1,\uy + 1) -- (\ux + 1,\uy + 2) -- (\ux + 2,\uy + 2)% |
| 4811 |
-- (\ux + 2,\uy + 1) -- cycle; |
| 4812 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urm]% |
| 4813 |
(\ux + 2,\uy + 1) -- (\ux + 2,\uy + 2) -- (\ux + 3,\uy + 2)% |
| 4814 |
-- (\ux + 3,\uy + 1) -- cycle; |
| 4815 |
%%----bottom row |
| 4816 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 4817 |
(\ux + 0,\uy + 0) -- (\ux + 0,\uy + 1) -- (\ux + 1,\uy + 1)% |
| 4818 |
-- (\ux + 1,\uy + 0) -- cycle; |
| 4819 |
\draw[line join=round,line cap=round,ultra thick,fill=\Umb]% |
| 4820 |
(\ux + 1,\uy + 0) -- (\ux + 1,\uy + 1) -- (\ux + 2,\uy + 1)% |
| 4821 |
-- (\ux + 2,\uy + 0) -- cycle; |
| 4822 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 4823 |
(\ux + 2,\uy + 0) -- (\ux + 2,\uy + 1) -- (\ux + 3,\uy + 1)% |
| 4824 |
-- (\ux + 3,\uy + 0) -- cycle; |
| 4825 |
} |
| 4826 |
%%------------------------- |
| 4827 |
\newcommand{\DrawRubikFlatDown}[2]{% |
| 4828 |
\pgfmathsetmacro{\ddx}{#1}% |
| 4829 |
\pgfmathsetmacro{\ddy}{#2}% |
| 4830 |
%%---top row |
| 4831 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 4832 |
(\ddx + 0,\ddy + 2) -- (\ddx + 0,\ddy + 3) -- (\ddx + 1,\ddy + 3)% |
| 4833 |
-- (\ddx + 1,\ddy + 2) -- cycle; |
| 4834 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmt]% |
| 4835 |
(\ddx + 1,\ddy + 2) -- (\ddx + 1,\ddy + 3) -- (\ddx + 2,\ddy + 3)% |
| 4836 |
-- (\ddx + 2,\ddy + 2) -- cycle; |
| 4837 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 4838 |
(\ddx + 2,\ddy + 2) -- (\ddx + 2,\ddy + 3) -- (\ddx + 3,\ddy + 3)% |
| 4839 |
-- (\ddx + 3,\ddy + 2) -- cycle; |
| 4840 |
%%-----middle row |
| 4841 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlm]% |
| 4842 |
(\ddx + 0,\ddy + 1) -- (\ddx + 0,\ddy + 2) -- (\ddx + 1,\ddy + 2)% |
| 4843 |
-- (\ddx + 1,\ddy + 1) -- cycle; |
| 4844 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmm]% |
| 4845 |
(\ddx + 1,\ddy + 1) -- (\ddx + 1,\ddy + 2) -- (\ddx + 2,\ddy + 2)% |
| 4846 |
-- (\ddx + 2,\ddy + 1) -- cycle; |
| 4847 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drm]% |
| 4848 |
(\ddx + 2,\ddy + 1) -- (\ddx + 2,\ddy + 2) -- (\ddx + 3,\ddy + 2)% |
| 4849 |
-- (\ddx + 3,\ddy + 1) -- cycle; |
| 4850 |
%%----bottom row |
| 4851 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 4852 |
(\ddx + 0,\ddy + 0) -- (\ddx + 0,\ddy + 1) -- (\ddx + 1,\ddy + 1)% |
| 4853 |
-- (\ddx + 1,\ddy + 0) -- cycle; |
| 4854 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dmb]% |
| 4855 |
(\ddx + 1,\ddy + 0) -- (\ddx + 1,\ddy + 1) -- (\ddx + 2,\ddy + 1)% |
| 4856 |
-- (\ddx + 2,\ddy + 0) -- cycle; |
| 4857 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 4858 |
(\ddx + 2,\ddy + 0) -- (\ddx + 2,\ddy + 1) -- (\ddx + 3,\ddy + 1)% |
| 4859 |
-- (\ddx + 3,\ddy + 0) -- cycle; |
| 4860 |
} |
| 4861 |
%%------------------------- |
| 4862 |
\newcommand{\DrawRubikFlatLeft}[2]{% |
| 4863 |
\pgfmathsetmacro{\lx}{#1}% |
| 4864 |
\pgfmathsetmacro{\ly}{#2}% |
| 4865 |
%%---top row |
| 4866 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 4867 |
(\lx + 0, \ly + 2) -- (\lx + 0, \ly + 3) -- (\lx + 1, \ly + 3)% |
| 4868 |
-- (\lx + 1, \ly + 2) -- cycle; |
| 4869 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmt]% |
| 4870 |
(\lx + 1, \ly + 2) -- (\lx + 1, \ly + 3) -- (\lx + 2, \ly + 3)% |
| 4871 |
-- (\lx + 2, \ly + 2) -- cycle; |
| 4872 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 4873 |
(\lx + 2, \ly + 2) -- (\lx + 2, \ly + 3) -- (\lx + 3, \ly + 3)% |
| 4874 |
-- (\lx + 3, \ly + 2) -- cycle; |
| 4875 |
%%-----middle row |
| 4876 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llm]% |
| 4877 |
(\lx + 0, \ly + 1) -- (\lx + 0, \ly + 2) -- (\lx + 1, \ly + 2)% |
| 4878 |
-- (\lx + 1, \ly + 1) -- cycle; |
| 4879 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmm]% |
| 4880 |
(\lx + 1, \ly + 1) -- (\lx + 1, \ly + 2) -- (\lx + 2, \ly + 2)% |
| 4881 |
-- (\lx + 2, \ly + 1) -- cycle; |
| 4882 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrm]% |
| 4883 |
(\lx + 2, \ly + 1) -- (\lx + 2, \ly + 2) -- (\lx + 3, \ly + 2)% |
| 4884 |
-- (\lx + 3, \ly + 1) -- cycle; |
| 4885 |
%%----bottom row |
| 4886 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 4887 |
(\lx + 0, \ly + 0) -- (\lx + 0, \ly + 1) -- (\lx + 1, \ly + 1)% |
| 4888 |
-- (\lx + 1, \ly + 0) -- cycle; |
| 4889 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lmb]% |
| 4890 |
(\lx + 1, \ly + 0) -- (\lx + 1, \ly + 1) -- (\lx + 2, \ly + 1)% |
| 4891 |
-- (\lx + 2, \ly + 0) -- cycle; |
| 4892 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 4893 |
(\lx + 2, \ly + 0) -- (\lx + 2, \ly + 1) -- (\lx + 3, \ly + 1)% |
| 4894 |
-- (\lx + 3, \ly + 0) -- cycle; |
| 4895 |
} |
| 4896 |
%%-------------------------- |
| 4897 |
\newcommand{\DrawRubikFlatRight}[2]{% |
| 4898 |
\pgfmathsetmacro{\rx}{#1}% |
| 4899 |
\pgfmathsetmacro{\ry}{#2}% |
| 4900 |
%%---top row |
| 4901 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 4902 |
(\rx + 0, \ry + 2) -- (\rx + 0, \ry + 3) -- (\rx + 1, \ry + 3)% |
| 4903 |
-- (\rx + 1, \ry + 2) -- cycle; |
| 4904 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmt]% |
| 4905 |
(\rx + 1, \ry + 2) -- (\rx + 1, \ry + 3) -- (\rx + 2, \ry + 3)% |
| 4906 |
-- (\rx + 2, \ry + 2) -- cycle; |
| 4907 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 4908 |
(\rx + 2, \ry + 2) -- (\rx + 2, \ry + 3) -- (\rx + 3, \ry + 3)% |
| 4909 |
-- (\rx + 3, \ry + 2) -- cycle; |
| 4910 |
%%-----middle row |
| 4911 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlm]% |
| 4912 |
(\rx + 0, \ry + 1) -- (\rx + 0, \ry + 2) -- (\rx + 1, \ry + 2)% |
| 4913 |
-- (\rx + 1, \ry + 1) -- cycle; |
| 4914 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmm]% |
| 4915 |
(\rx + 1, \ry + 1) -- (\rx + 1, \ry + 2) -- (\rx + 2, \ry + 2)% |
| 4916 |
-- (\rx + 2, \ry + 1) -- cycle; |
| 4917 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrm]% |
| 4918 |
(\rx + 2, \ry + 1) -- (\rx + 2, \ry + 2) -- (\rx + 3, \ry + 2)% |
| 4919 |
-- (\rx + 3, \ry + 1) -- cycle; |
| 4920 |
%%----bottom row |
| 4921 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 4922 |
(\rx + 0, \ry + 0) -- (\rx + 0, \ry + 1) -- (\rx + 1, \ry + 1)% |
| 4923 |
-- (\rx + 1, \ry + 0) -- cycle; |
| 4924 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rmb]% |
| 4925 |
(\rx + 1, \ry + 0) -- (\rx + 1, \ry + 1) -- (\rx + 2, \ry + 1)% |
| 4926 |
-- (\rx + 2, \ry + 0) -- cycle; |
| 4927 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 4928 |
(\rx + 2, \ry + 0) -- (\rx + 2, \ry + 1) -- (\rx + 3, \ry + 1)% |
| 4929 |
-- (\rx + 3, \ry + 0) -- cycle; |
| 4930 |
} |
| 4931 |
%%----------------------- |
| 4932 |
\newcommand{\DrawRubikFlatFront}{% |
| 4933 |
%% This command is used /only/ by the \cmd{\DrawRubikCubeF} command. |
| 4934 |
%% NOTE: x, y variables not implemented as not required here |
| 4935 |
%%---top row |
| 4936 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% |
| 4937 |
(0,2) -- (0, 3) -- (1,3) -- (1,2) -- cycle; |
| 4938 |
%% |
| 4939 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmt]% |
| 4940 |
(1,2) -- (1, 3) -- (2,3) -- (2,2) -- cycle; |
| 4941 |
%% |
| 4942 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% |
| 4943 |
(2,2) -- (2, 3) -- (3,3) -- (3,2) -- cycle; |
| 4944 |
%%-----middle row |
| 4945 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flm]% |
| 4946 |
(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; |
| 4947 |
%% |
| 4948 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmm]% |
| 4949 |
(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; |
| 4950 |
%% |
| 4951 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frm]% |
| 4952 |
(2,1) -- (2, 2) -- (3,2) -- (3,1) -- cycle; |
| 4953 |
%%----bottom row |
| 4954 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% |
| 4955 |
(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; |
| 4956 |
%% |
| 4957 |
\draw[line join=round,line cap=round,ultra thick,fill=\Fmb]% |
| 4958 |
(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; |
| 4959 |
%% |
| 4960 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% |
| 4961 |
(2,0) -- (2, 1) -- (3,1) -- (3,0) -- cycle; |
| 4962 |
} |
| 4963 |
%%------------------------- |
| 4964 |
\newcommand{\DrawRubikFlatBack}[2]{% |
| 4965 |
\pgfmathsetmacro{\bx}{#1}% |
| 4966 |
\pgfmathsetmacro{\by}{#2}% |
| 4967 |
%%---top row |
| 4968 |
\draw[line join=round,line cap=round,ultra thick,fill=\Blt]% |
| 4969 |
(\bx + 0,\by + 2) -- (\bx + 0,\by + 3) -- (\bx + 1,\by + 3)% |
| 4970 |
-- (\bx + 1,\by + 2) -- cycle; |
| 4971 |
\draw[line join=round,line cap=round,ultra thick,fill=\Bmt]% |
| 4972 |
(\bx + 1,\by + 2) -- (\bx + 1,\by + 3) -- (\bx + 2,\by + 3)% |
| 4973 |
-- (\bx + 2,\by + 2) -- cycle; |
| 4974 |
\draw[line join=round,line cap=round,ultra thick,fill=\Brt]% |
| 4975 |
(\bx + 2,\by + 2) -- (\bx + 2,\by + 3) -- (\bx + 3,\by + 3)% |
| 4976 |
-- (\bx + 3,\by + 2) -- cycle; |
| 4977 |
%%-----middle row |
| 4978 |
\draw[line join=round,line cap=round,ultra thick,fill=\Blm]% |
| 4979 |
(\bx + 0,\by + 1) -- (\bx + 0,\by + 2) -- (\bx + 1,\by + 2)% |
| 4980 |
-- (\bx + 1,\by + 1) -- cycle; |
| 4981 |
\draw[line join=round,line cap=round,ultra thick,fill=\Bmm]% |
| 4982 |
(\bx + 1,\by + 1) -- (\bx + 1,\by + 2) -- (\bx + 2,\by + 2)% |
| 4983 |
-- (\bx + 2,\by + 1) -- cycle; |
| 4984 |
\draw[line join=round,line cap=round,ultra thick,fill=\Brm]% |
| 4985 |
(\bx + 2,\by + 1) -- (\bx + 2,\by + 2) -- (\bx + 3,\by + 2)% |
| 4986 |
-- (\bx + 3,\by + 1) -- cycle; |
| 4987 |
%%----bottom row |
| 4988 |
\draw[line join=round,line cap=round,ultra thick,fill=\Blb]% |
| 4989 |
(\bx + 0,\by + 0) -- (\bx + 0,\by + 1) -- (\bx + 1,\by + 1)% |
| 4990 |
-- (\bx + 1,\by + 0) -- cycle; |
| 4991 |
\draw[line join=round,line cap=round,ultra thick,fill=\Bmb]% |
| 4992 |
(\bx + 1,\by + 0) -- (\bx + 1,\by + 1) -- (\bx + 2,\by + 1)% |
| 4993 |
-- (\bx + 2,\by + 0) -- cycle; |
| 4994 |
\draw[line join=round,line cap=round,ultra thick,fill=\Brb]% |
| 4995 |
(\bx + 2,\by + 0) -- (\bx + 2,\by + 1) -- (\bx + 3,\by + 1)% |
| 4996 |
-- (\bx + 3,\by + 0) -- cycle; |
| 4997 |
} |
| 4998 |
% \end{macrocode} |
| 4999 |
% |
| 5000 |
% \begin{macro}{\DrawRubikCubeF} |
| 5001 |
% Draws a standard flat (F) representation of the Rubik |
| 5002 |
% cube (colours only). Note that \cmd{\DrawRubikFlatFront} (below) |
| 5003 |
% does not take any arguments (x,y). |
| 5004 |
% \begin{macrocode} |
| 5005 |
\newcommand{\DrawRubikCubeF}{% |
| 5006 |
\DrawRubikFlatUp{0}{3}% |
| 5007 |
\DrawRubikFlatDown{0}{-3}% |
| 5008 |
\DrawRubikFlatLeft{-3}{0}% |
| 5009 |
\DrawRubikFlatFront% |
| 5010 |
\DrawRubikFlatRight{3}{0}% |
| 5011 |
\DrawRubikFlatBack{6}{0}% |
| 5012 |
} |
| 5013 |
% \end{macrocode} |
| 5014 |
% \end{macro} |
| 5015 |
% |
| 5016 |
% |
| 5017 |
% \begin{macro}{\DrawRubikCubeSF} |
| 5018 |
% Draws a Rubik cube together with the three hidden faces |
| 5019 |
% (colours only) in a semi-flat (SF) representation. The (x,y) |
| 5020 |
% arguments (below) are for the bottom-left corner of the face. |
| 5021 |
% \begin{macrocode} |
| 5022 |
\newcommand{\DrawRubikCubeSF}{% |
| 5023 |
\DrawRubikCubeRU% |
| 5024 |
\DrawRubikFlatDown{0}{-3}% |
| 5025 |
\DrawRubikFlatLeft{-3}{0}% |
| 5026 |
\DrawRubikFlatBack{4}{1}% |
| 5027 |
} |
| 5028 |
% \end{macrocode} |
| 5029 |
% \end{macro} |
| 5030 |
% |
| 5031 |
% |
| 5032 |
% |
| 5033 |
% \subsubsection{DrawRubikFaceXSide commands} |
| 5034 |
% \label{sec:drawrubikflatxsidecode} |
| 5035 |
% |
| 5036 |
% These six commands draw a face together with all four sidebars |
| 5037 |
% (colours only). They use the \cmd{\DrawRubikFlatX} commands to draw the face, |
| 5038 |
% and the \cmd{\side@bar..} commands to draw the sidebars. Since each |
| 5039 |
% of the four sides of a face has three small (side) bars, we use a total |
| 5040 |
% of 12 side@bar commands for each command. |
| 5041 |
% |
| 5042 |
% The parameter codes for the \cmd{\side@bar..} |
| 5043 |
% commands are as follows (see Section~\ref{sec:side@barcode} for full details). |
| 5044 |
% Top (T) and Bottom (B) = left to right; |
| 5045 |
% Left (L) and Right (R) = top to bottom; |
| 5046 |
% |
| 5047 |
% Note that since these commands are quite long, thay all have a |
| 5048 |
% slightly more convenient short-hand version whereby the terminal two words |
| 5049 |
% are contracted to their two initial letters (see Section~\ref{sec:drawrubikfacecode}). |
| 5050 |
% RWDN19B |
| 5051 |
% |
| 5052 |
% \begin{macro}{\DrawRubikFaceUpSide} |
| 5053 |
% Draws the \textsc{up} face together with all four sidebars. |
| 5054 |
% \begin{macrocode} |
| 5055 |
\newcommand{\DrawRubikFaceUpSide}{% |
| 5056 |
\DrawRubikFlatUp{0}{0}% |
| 5057 |
%Top is a horizontal sidebar, so 1 = r, 3=l |
| 5058 |
\side@barT{1}{\Brt} |
| 5059 |
\side@barT{2}{\Bmt} |
| 5060 |
\side@barT{3}{\Blt} |
| 5061 |
%Left is a vertical sidebar, so 1 = r, 3=l |
| 5062 |
\side@barL{1}{\Lrt} |
| 5063 |
\side@barL{2}{\Lmt} |
| 5064 |
\side@barL{3}{\Llt} |
| 5065 |
%Right is a vertical sidebar, so 1 = l, 3=r |
| 5066 |
\side@barR{1}{\Rlt} |
| 5067 |
\side@barR{2}{\Rmt} |
| 5068 |
\side@barR{3}{\Rrt} |
| 5069 |
%Bottom is a horizontal sidebar, so 1 = l, 3=r |
| 5070 |
\side@barB{1}{\Flt} |
| 5071 |
\side@barB{2}{\Fmt} |
| 5072 |
\side@barB{3}{\Frt} |
| 5073 |
} |
| 5074 |
% \end{macrocode} |
| 5075 |
% \end{macro} |
| 5076 |
% |
| 5077 |
% |
| 5078 |
% \begin{macro}{\DrawRubikFaceFrontSide} |
| 5079 |
% Draws the \textsc{front} face together with all four sidebars. |
| 5080 |
% \begin{macrocode} |
| 5081 |
\newcommand{\DrawRubikFaceFrontSide}{% |
| 5082 |
\DrawRubikFlatFront{0}{0}% |
| 5083 |
%Top |
| 5084 |
\side@barT{1}{\Ulb} |
| 5085 |
\side@barT{2}{\Umb} |
| 5086 |
\side@barT{3}{\Urb} |
| 5087 |
%Left |
| 5088 |
\side@barL{1}{\Lrb} |
| 5089 |
\side@barL{2}{\Lrm} |
| 5090 |
\side@barL{3}{\Lrt} |
| 5091 |
%Right |
| 5092 |
\side@barR{1}{\Rlb} |
| 5093 |
\side@barR{2}{\Rlm} |
| 5094 |
\side@barR{3}{\Rlt} |
| 5095 |
%Bottom |
| 5096 |
\side@barB{1}{\Dlt} |
| 5097 |
\side@barB{2}{\Dmt} |
| 5098 |
\side@barB{3}{\Drt} |
| 5099 |
} |
| 5100 |
% \end{macrocode} |
| 5101 |
% \end{macro} |
| 5102 |
% |
| 5103 |
% |
| 5104 |
% \begin{macro}{\DrawRubikFaceRightSide} |
| 5105 |
% Draws the \textsc{right} face together with all four sidebars. |
| 5106 |
% \begin{macrocode} |
| 5107 |
\newcommand{\DrawRubikFaceRightSide}{% |
| 5108 |
\DrawRubikFlatRight{0}{0}% |
| 5109 |
%Top |
| 5110 |
\side@barT{1}{\Urb} |
| 5111 |
\side@barT{2}{\Urm} |
| 5112 |
\side@barT{3}{\Urt} |
| 5113 |
%Left |
| 5114 |
\side@barL{1}{\Frb} |
| 5115 |
\side@barL{2}{\Frm} |
| 5116 |
\side@barL{3}{\Frt} |
| 5117 |
%Right |
| 5118 |
\side@barR{1}{\Blb} |
| 5119 |
\side@barR{2}{\Blm} |
| 5120 |
\side@barR{3}{\Blt} |
| 5121 |
%Bottom |
| 5122 |
\side@barB{1}{\Drt} |
| 5123 |
\side@barB{2}{\Drm} |
| 5124 |
\side@barB{3}{\Drb} |
| 5125 |
} |
| 5126 |
% \end{macrocode} |
| 5127 |
% \end{macro} |
| 5128 |
% |
| 5129 |
% |
| 5130 |
% \begin{macro}{\DrawRubikFaceLeftSide} |
| 5131 |
% Draws the \textsc{left} face together with all four sidebars. |
| 5132 |
% \begin{macrocode} |
| 5133 |
\newcommand{\DrawRubikFaceLeftSide}{% |
| 5134 |
\DrawRubikFlatLeft{0}{0}% |
| 5135 |
%Top |
| 5136 |
\side@barT{1}{\Ult} |
| 5137 |
\side@barT{2}{\Ulm} |
| 5138 |
\side@barT{3}{\Ulb} |
| 5139 |
%Left |
| 5140 |
\side@barL{1}{\Brb} |
| 5141 |
\side@barL{2}{\Brm} |
| 5142 |
\side@barL{3}{\Brt} |
| 5143 |
%Right |
| 5144 |
\side@barR{1}{\Flb} |
| 5145 |
\side@barR{2}{\Flm} |
| 5146 |
\side@barR{3}{\Flt} |
| 5147 |
%Bottom |
| 5148 |
\side@barB{1}{\Dlb} |
| 5149 |
\side@barB{2}{\Dlm} |
| 5150 |
\side@barB{3}{\Dlt} |
| 5151 |
} |
| 5152 |
% \end{macrocode} |
| 5153 |
% \end{macro} |
| 5154 |
% |
| 5155 |
% |
| 5156 |
% \begin{macro}{\DrawRubikFaceBackSide} |
| 5157 |
% Draws the \textsc{back} face together with all four sidebars. |
| 5158 |
% \begin{macrocode} |
| 5159 |
\newcommand{\DrawRubikFaceBackSide}{% |
| 5160 |
\DrawRubikFlatBack{0}{0}% |
| 5161 |
%Top |
| 5162 |
\side@barT{1}{\Urt} |
| 5163 |
\side@barT{2}{\Umt} |
| 5164 |
\side@barT{3}{\Ult} |
| 5165 |
%Left |
| 5166 |
\side@barL{1}{\Rrb} |
| 5167 |
\side@barL{2}{\Rrm} |
| 5168 |
\side@barL{3}{\Rrt} |
| 5169 |
%Right |
| 5170 |
\side@barR{1}{\Llb} |
| 5171 |
\side@barR{2}{\Llm} |
| 5172 |
\side@barR{3}{\Llt} |
| 5173 |
%Bottom |
| 5174 |
\side@barB{1}{\Drb} |
| 5175 |
\side@barB{2}{\Dmb} |
| 5176 |
\side@barB{3}{\Dlb} |
| 5177 |
} |
| 5178 |
% \end{macrocode} |
| 5179 |
% \end{macro} |
| 5180 |
% |
| 5181 |
% |
| 5182 |
% \begin{macro}{\DrawRubikFaceDownSide} |
| 5183 |
% Draws the \textsc{down} face together with all four sidebars. |
| 5184 |
% \begin{macrocode} |
| 5185 |
\newcommand{\DrawRubikFaceDownSide}{% |
| 5186 |
\DrawRubikFlatDown{0}{0}% |
| 5187 |
%Top |
| 5188 |
\side@barT{1}{\Flb} |
| 5189 |
\side@barT{2}{\Fmb} |
| 5190 |
\side@barT{3}{\Frb} |
| 5191 |
%Left |
| 5192 |
\side@barL{1}{\Llb} |
| 5193 |
\side@barL{2}{\Lmb} |
| 5194 |
\side@barL{3}{\Lrb} |
| 5195 |
%Right |
| 5196 |
\side@barR{1}{\Rrb} |
| 5197 |
\side@barR{2}{\Rmb} |
| 5198 |
\side@barR{3}{\Rlb} |
| 5199 |
%Bottom |
| 5200 |
\side@barB{1}{\Brb} |
| 5201 |
\side@barB{2}{\Bmb} |
| 5202 |
\side@barB{3}{\Blb} |
| 5203 |
} |
| 5204 |
% \end{macrocode} |
| 5205 |
% \end{macro} |
| 5206 |
% |
| 5207 |
% |
| 5208 |
% |
| 5209 |
% \subsection{\hspace{3mm}DrawRubikFace commands} |
| 5210 |
% \label{sec:drawrubikfacecode} |
| 5211 |
% |
| 5212 |
% \textsc{Background}: \ The above \cmd{\DrawRubikFlat..} commands were originally just |
| 5213 |
% \cmd{\DrawFlat..} commands. They were subsequently copied \& renamed |
| 5214 |
% (here) as the more intuitive \cmd{\DrawFace..} commands, since most of |
| 5215 |
% the time the user wants just to draw a particular face with or |
| 5216 |
% without sidebars. |
| 5217 |
% |
| 5218 |
% In v5 it was necessary to rename them as \cmd{\DrawRubikFace...} commands |
| 5219 |
% since they relate to a 3x3x3 cube. At the same time we also included |
| 5220 |
% their more convenient short-hand versions |
| 5221 |
% (eg \cmd{\DrawRubikFaceUpSide} $\rightarrow$ \cmd{\DrawRubikFaceUS} etc), |
| 5222 |
% as the commands were getting a bit too long. |
| 5223 |
% |
| 5224 |
% We therefore now deprecate the use of the earlier |
| 5225 |
% \cmd{\DrawFace...} commands, although they will be maintained for the |
| 5226 |
% moment at least. |
| 5227 |
% \begin{macrocode} |
| 5228 |
\newcommand{\DrawRubikFaceUp}{\DrawRubikFlatUp{0}{0}} |
| 5229 |
\newcommand{\DrawRubikFaceDown}{\DrawRubikFlatDown{0}{0}} |
| 5230 |
\newcommand{\DrawRubikFaceLeft}{\DrawRubikFlatLeft{0}{0}} |
| 5231 |
\newcommand{\DrawRubikFaceRight}{\DrawRubikFlatRight{0}{0}} |
| 5232 |
\newcommand{\DrawRubikFaceFront}{\DrawRubikFlatFront{0}{0}} |
| 5233 |
\newcommand{\DrawRubikFaceBack}{\DrawRubikFlatBack{0}{0}} |
| 5234 |
% \end{macrocode} |
| 5235 |
%% RWDN19A Finally, we create the short-hand versions. |
| 5236 |
% \begin{macrocode} |
| 5237 |
\newcommand{\DrawRubikFaceU}{\DrawRubikFaceUp} |
| 5238 |
\newcommand{\DrawRubikFaceD}{\DrawRubikFaceDown} |
| 5239 |
\newcommand{\DrawRubikFaceL}{\DrawRubikFaceLeft} |
| 5240 |
\newcommand{\DrawRubikFaceR}{\DrawRubikFaceRight} |
| 5241 |
\newcommand{\DrawRubikFaceF}{\DrawRubikFaceFront} |
| 5242 |
\newcommand{\DrawRubikFaceB}{\DrawRubikFaceBack} |
| 5243 |
\newcommand{\DrawRubikFaceUS}{\DrawRubikFaceUpSide} |
| 5244 |
\newcommand{\DrawRubikFaceDS}{\DrawRubikFaceDownSide} |
| 5245 |
\newcommand{\DrawRubikFaceLS}{\DrawRubikFaceLeftSide} |
| 5246 |
\newcommand{\DrawRubikFaceRS}{\DrawRubikFaceRightSide} |
| 5247 |
\newcommand{\DrawRubikFaceFS}{\DrawRubikFaceFrontSide} |
| 5248 |
\newcommand{\DrawRubikFaceBS}{\DrawRubikFaceBackSide} |
| 5249 |
% \end{macrocode} |
| 5250 |
% |
| 5251 |
% |
| 5252 |
% \subsection{Sidebars (Face)} |
| 5253 |
% \label{sec:sidebarcode} |
| 5254 |
% |
| 5255 |
% Sidebar commands draw narrow bars of colour indicating the |
| 5256 |
% side colours of each of the facelets forming the side of |
| 5257 |
% a given layer (face). Each Sidebar is the length of a |
| 5258 |
% single facelet (see Section~\ref{sec:sidebars}). |
| 5259 |
% |
| 5260 |
% \begin{macro}{\RubikSidebarWidth} |
| 5261 |
% \begin{macro}{\RubikSidebarLength} |
| 5262 |
% \begin{macro}{\RubikSidebarSep} |
| 5263 |
% These three commands allow the user to set the Width, Length |
| 5264 |
% and Separation parameters for the sidebar (in decimal values, |
| 5265 |
% where 1~is equivalent to the length of the side of a facelet). |
| 5266 |
% \end{macro} |
| 5267 |
% \end{macro} |
| 5268 |
% \end{macro} |
| 5269 |
% \begin{macrocode} |
| 5270 |
\newcommand{\RubikSidebarWidth}[1]{\pgfmathsetmacro{\bw}{#1}} |
| 5271 |
\newcommand{\RubikSidebarLength}[1]{\pgfmathsetmacro{\bl}{#1}} |
| 5272 |
\newcommand{\RubikSidebarSep}[1]{\pgfmathsetmacro{\bs}{#1}} |
| 5273 |
% \end{macrocode} |
| 5274 |
% We first set some default values |
| 5275 |
% \begin{macrocode} |
| 5276 |
\RubikSidebarWidth{0.3}% |
| 5277 |
\RubikSidebarLength{1}% |
| 5278 |
\RubikSidebarSep{0.3}% |
| 5279 |
% \end{macrocode} |
| 5280 |
% In order to avoid conflicting nomenclature (between bar and Bar) we recommend |
| 5281 |
% using the lowercase `bar' and deprecate the use of `Bar' in commands. |
| 5282 |
% For backwards compatibility, however, we will retain the three original `Bar' |
| 5283 |
% commands (for the moment at least), as follows: |
| 5284 |
% \begin{macrocode} |
| 5285 |
\newcommand{\RubikSideBarWidth}[1]{\pgfmathsetmacro{\bw}{#1}} |
| 5286 |
\newcommand{\RubikSideBarLength}[1]{\pgfmathsetmacro{\bl}{#1}} |
| 5287 |
\newcommand{\RubikSideBarSep}[1]{\pgfmathsetmacro{\bs}{#1}} |
| 5288 |
% \end{macrocode} |
| 5289 |
% |
| 5290 |
% |
| 5291 |
% |
| 5292 |
% |
| 5293 |
% \subsubsection{\hspace{3mm}Drawing and allocating a colour to a single facelet sidebar} |
| 5294 |
% \label{sec:side@barcode} |
| 5295 |
% |
| 5296 |
% |
| 5297 |
% Full length face sidebars are really multiple instances of |
| 5298 |
% small single facelet bars, each of which is drawn using one of the internal sidebar |
| 5299 |
% commands. |
| 5300 |
% |
| 5301 |
% |
| 5302 |
% \begin{figure}[hbt] |
| 5303 |
% \centering |
| 5304 |
% \ifpdf |
| 5305 |
% \includegraphics[height=3cm]{rubik-doc-figD.pdf} |
| 5306 |
% \fi |
| 5307 |
% \vspace{-5mm} |
| 5308 |
% \caption{\label{fig:facenotation}Face-edge and facelet-position codes |
| 5309 |
% (see text) } |
| 5310 |
% \end{figure} |
| 5311 |
% |
| 5312 |
% |
| 5313 |
% \begin{macro}{\side@barT} |
| 5314 |
% \begin{macro}{\side@barB} |
| 5315 |
% \begin{macro}{\side@barL} |
| 5316 |
% \begin{macro}{\side@barR} |
| 5317 |
% There are four \cmd{\side@barX} commands, each with a trailing letter code X, which indicates the |
| 5318 |
% position of the sidebar relative to the square face displayed, |
| 5319 |
% namely either T (Top), B (Bottom), L (Left) or R (Right) |
| 5320 |
% ---see Figure~\ref{fig:facenotation}. |
| 5321 |
|
| 5322 |
% \cmd{\side@barL}\marg{position-number}\marg{facelet location-code}. |
| 5323 |
% Each \cmd{\side@barX} command takes two arguments: |
| 5324 |
% The first argument is a number (distance) \marg{$ 1 \mid 2 \mid 3$} |
| 5325 |
% from the relevant axis depending on whether it is a vertical or horizontal sidebar |
| 5326 |
% (e.g.,~1 = first bar (nearest the origin); 2 = second bar, |
| 5327 |
% 3 = third bar). |
| 5328 |
% |
| 5329 |
% The second argument is the facelet location-code expressed as a command |
| 5330 |
% (e.g.,~\cmd{\Lrt}, \cmd{\Dlb} etc. Note that the facelet location |
| 5331 |
% uses a three letter code: the first (capital) letter (U, D, L, R, F, B) denotes the \textsc{face}; |
| 5332 |
% the second (lower-case) letter (l,m,r) is the `x' position in the 3x3 matrix; |
| 5333 |
% the third (lower-case) letter (t,m,b) is the `y' position ---see Figure~\ref{fig:facenotation}. |
| 5334 |
% |
| 5335 |
% \textsc{example}: the following command draws a small single Right sidebar, |
| 5336 |
% in the middle position (no.~2), with the colour |
| 5337 |
% allocated to the Rlt facelet (left top facelet in the \textsc{right} face. |
| 5338 |
% \begin{quote} |
| 5339 |
% \verb!\side@barR{2}{\Rlt}! |
| 5340 |
% \end{quote} |
| 5341 |
% Notice that we use the command \cmd{\Rlt} as the argument; this is because |
| 5342 |
% the command is defined as: \verb!\def{\Rlt}{#1}!, and hence the command gets replaced by the |
| 5343 |
% colour-code currently allocated to this particular facelet. |
| 5344 |
% |
| 5345 |
% There are three small rectangular sidebars on each of the four sides |
| 5346 |
% of a 3x3 square face, and these are embedded in a coordinate system with origin |
| 5347 |
% at the bottom left corner (0,0) of the square face (see Figure~\ref{fig:facenotation}). |
| 5348 |
% |
| 5349 |
% The \cmd{\side@bar..} command also implements the set (or default) |
| 5350 |
% RubikSidebarLength \cmd{\bl}, RubikSidebarWidth \cmd{\bw} |
| 5351 |
% and RubikSidebarSep \cmd{\bs} (separation) |
| 5352 |
% values mentioned above. \cmd{\blh} = Half \cmd{\bl} = \cmd{\bl}/2. |
| 5353 |
% Note that the TikZ \cmd{\pgfmathsetmacro} commands (which do the maths) |
| 5354 |
% must be inside the \cmd{\side@bar..} command in order to work. |
| 5355 |
% The start point of the TikZ \cmd{\draw} command for each rectangular sidebar |
| 5356 |
% is the bottom Left corner of the sidebar = (\cmd{\dx},\cmd{\dy}). |
| 5357 |
% \end{macro} |
| 5358 |
% \end{macro} |
| 5359 |
% \end{macro} |
| 5360 |
% \end{macro} |
| 5361 |
% |
| 5362 |
% |
| 5363 |
% \label{sec:nosidebarcode} |
| 5364 |
% \begin{macro}{\no@sidebar} |
| 5365 |
% The \cmd{\NoSidebar}\marg{colour code} command defines a (single) colour for which |
| 5366 |
% sidebars should \textit{not} be drawn (particularly useful when drawing OLL configurations). |
| 5367 |
% This idea was suggested by Robert Ma\v{r}\'{\i}k (May 2017) ---see Section~\ref{sec:nosidebar}. |
| 5368 |
% {\newline}The principle is that we let the command \cmd{\NoSidebar} define a face colour, |
| 5369 |
% and then we use the \verb!\ifthenelse{\equal{#2}{\no@sidebar}}{}{...}! structure |
| 5370 |
% inside the \cmd{\side@bar..} commands (see below) |
| 5371 |
% to either (a)~draw all sidebars as usual (if \cmd{\NoSidebar} is undefined), |
| 5372 |
% or (b)~draw all sidebars \textit{except} |
| 5373 |
% those having the \cmd{\NoSidebar} colour (if \cmd{\NoSidebar} colour = \verb!#2!). |
| 5374 |
% \newline\textsc{usage}: \verb!\NoSidebar{X}! \ If this command in \textit{not} |
| 5375 |
% inside an environment, then its action will continue until it is disabled |
| 5376 |
% (undefined) as follows: \verb!\NoSidebar{}!. |
| 5377 |
% \begin{macrocode} |
| 5378 |
\def\no@sidebar{}% |
| 5379 |
\newcommand{\NoSidebar}[1]{\def\no@sidebar{#1}} |
| 5380 |
% \end{macrocode} |
| 5381 |
% \end{macro} |
| 5382 |
% |
| 5383 |
% |
| 5384 |
% \begin{macrocode} |
| 5385 |
\newcommand{\side@barL}[2]{% |
| 5386 |
%% #1 = cubie possn no, #2 = colour |
| 5387 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5388 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5389 |
\pgfmathsetmacro{\dx}{0 - \bs - \bw}% |
| 5390 |
\pgfmathsetmacro{\dy}{#1-1+0.5-\blh}% |
| 5391 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5392 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5393 |
}} |
| 5394 |
\newcommand{\side@barR}[2]{% |
| 5395 |
%% #1 = cubie possn no, #2 = colour |
| 5396 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5397 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5398 |
\pgfmathsetmacro{\dx}{3 + \bs}% |
| 5399 |
\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh}% |
| 5400 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5401 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5402 |
}} |
| 5403 |
\newcommand{\side@barT}[2]{% |
| 5404 |
%% #1 = cubie possn no, #2 = colour |
| 5405 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5406 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5407 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% |
| 5408 |
\pgfmathsetmacro{\dy}{3 +\bs}% |
| 5409 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5410 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5411 |
}} |
| 5412 |
\newcommand{\side@barB}[2]{% |
| 5413 |
%% #1 = cubie possn no, #2 = colour |
| 5414 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5415 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5416 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh}% |
| 5417 |
\pgfmathsetmacro{\dy}{0 -\bs-\bw}% |
| 5418 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5419 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5420 |
}} |
| 5421 |
% \end{macrocode} |
| 5422 |
% |
| 5423 |
% RWDN19C removed 20:17:2 and 20:17:3 19 Feb 2018 |
| 5424 |
% |
| 5425 |
% |
| 5426 |
% |
| 5427 |
% |
| 5428 |
% |
| 5429 |
% |
| 5430 |
% \subsection{Sidebars (Cube)} |
| 5431 |
% \label{sec:sidebarscubecode} |
| 5432 |
% |
| 5433 |
% |
| 5434 |
% In order to position sidebars adjacent to a Rubik Cube (ie in 3D) |
| 5435 |
% requires that we first make some new \cmd{\side@bar..} |
| 5436 |
% commands for drawing sidebars adjacent to the \textsc{back} face of the cube |
| 5437 |
% (we have already made the macros for the front |
| 5438 |
% face sidebars---see Section~\ref{sec:sidebarcode}). |
| 5439 |
% Furthermore, these new macros need to be tailored to each of the |
| 5440 |
% four standard cube viewing directions RU, LU, RD, LD. |
| 5441 |
% |
| 5442 |
% Finally, the USER commands for drawing these sidebars need |
| 5443 |
% to accommodate (a)~some code for identifying each set of sidebars, |
| 5444 |
% and (b)~the viewing direction. So, for example, a USER command for |
| 5445 |
% drawing the sidebars associated with the cube edge formed |
| 5446 |
% by the \textsc{right} face and the \textsc{back} face |
| 5447 |
% (lets define this as the RB sidebar) as viewed from the RU direction, |
| 5448 |
% might be something like \cmd{\DrawRubikCubeSidebarRBRU}. |
| 5449 |
% Since this is not particularly user-friendly, |
| 5450 |
% we can improve on this slightly for the USER by |
| 5451 |
% (a)~defining the sidebar as \texttt{SidebarRB}, and |
| 5452 |
% (b)~appending the view direction in a curly bracket, say as \verb!{RU}!. |
| 5453 |
% This allows a more intuitive command structure for the USER, |
| 5454 |
% as follows: \verb!\DrawRubikCubeSidebarRB{RU}!. |
| 5455 |
% We then use the \cmd{\@join} command to append the string \verb!RU! to the string |
| 5456 |
% \verb!DrawRubicCubeSidebarRB! forming the (internal) |
| 5457 |
% command \cmd{\DrawRubicCubeSidebarRBRU}. |
| 5458 |
% |
| 5459 |
% In the following we will group the code according to to the view |
| 5460 |
% direction (RU, LU, RD, LD). |
| 5461 |
% |
| 5462 |
% |
| 5463 |
% |
| 5464 |
% \subsubsection{Sidebars: RU view} |
| 5465 |
% |
| 5466 |
% \subsubsection*{Right-Back vert sidebar (RU view)} |
| 5467 |
% |
| 5468 |
% |
| 5469 |
% Need to write a new command for this position |
| 5470 |
% modified from \cmd{\side@barR} (in Section 20.16.1) |
| 5471 |
% draws only a single small bar |
| 5472 |
% each of the three small bars has a numbered position (1,2,3); |
| 5473 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5474 |
% \begin{macrocode} |
| 5475 |
\newcommand{\side@barRubikRbackRU}[2]{% |
| 5476 |
%% #1 = cubie possn no, #2 = colour |
| 5477 |
%% dx --> dx+1 |
| 5478 |
%% dy --> dy+1 |
| 5479 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5480 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5481 |
\pgfmathsetmacro{\dx}{3 + \bs +1}% |
| 5482 |
\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh +1}% |
| 5483 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5484 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5485 |
}} |
| 5486 |
% \end{macrocode} |
| 5487 |
% Make the RB (RightBack) version; |
| 5488 |
% bar 1 is at the bottom |
| 5489 |
% \begin{macrocode} |
| 5490 |
\newcommand{\DrawRubikCubeSidebarRBRU}{% |
| 5491 |
\side@barRubikRbackRU{3}{\Blt}% |
| 5492 |
\side@barRubikRbackRU{2}{\Blm}% |
| 5493 |
\side@barRubikRbackRU{1}{\Blb}% |
| 5494 |
} |
| 5495 |
% \end{macrocode} |
| 5496 |
% Now do the reverse (BR) = RB |
| 5497 |
% \begin{macrocode} |
| 5498 |
\newcommand{\DrawRubikCubeSidebarBRRU}{\DrawRubikCubeSidebarRBRU} |
| 5499 |
% \end{macrocode} |
| 5500 |
% Make the join commands |
| 5501 |
% \begin{macrocode} |
| 5502 |
\newcommand{\DrawRubikCubeSidebarRB}[1]{\@join{\DrawRubikCubeSidebarRB}{#1}} |
| 5503 |
\newcommand{\DrawRubikCubeSidebarBR}[1]{\@join{\DrawRubikCubeSidebarBR}{#1}} |
| 5504 |
% \end{macrocode} |
| 5505 |
% |
| 5506 |
% |
| 5507 |
% \medskip |
| 5508 |
% |
| 5509 |
% \subsubsection*{Up-Back horiz sidebar (RU view)} |
| 5510 |
% |
| 5511 |
% |
| 5512 |
% Need to write a new command for this position |
| 5513 |
% modified from \cmd{\side@barT} (in Section 20.16.1) |
| 5514 |
% draws only a single small bar |
| 5515 |
% each of the three small bars has a numbered position (1,2,3); |
| 5516 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5517 |
% \begin{macrocode} |
| 5518 |
\newcommand{\side@barRubikTbackRU}[2]{% |
| 5519 |
%% #1 = cubie possn no; #2 = colour |
| 5520 |
%% dx --> dx+1 |
| 5521 |
%% dy --> dy+1 |
| 5522 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5523 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5524 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh +1}% |
| 5525 |
\pgfmathsetmacro{\dy}{3 +\bs +1}% |
| 5526 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5527 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5528 |
}} |
| 5529 |
% \end{macrocode} |
| 5530 |
% Make the UB (Up-Back) version; |
| 5531 |
% bar 1 is at the left, 3 on the rhs (as we look at the image) |
| 5532 |
% \begin{macrocode} |
| 5533 |
\newcommand{\DrawRubikCubeSidebarUBRU}{% |
| 5534 |
\side@barRubikTbackRU{1}{\Brt}% |
| 5535 |
\side@barRubikTbackRU{2}{\Bmt}% |
| 5536 |
\side@barRubikTbackRU{3}{\Blt}% |
| 5537 |
} |
| 5538 |
% \end{macrocode} |
| 5539 |
% Now do the reverse (BU) = UB |
| 5540 |
% \begin{macrocode} |
| 5541 |
\newcommand{\DrawRubikCubeSidebarBURU}{\DrawRubikCubeSidebarUBRU} |
| 5542 |
% \end{macrocode} |
| 5543 |
% Make the join commands |
| 5544 |
% \begin{macrocode} |
| 5545 |
\newcommand{\DrawRubikCubeSidebarUB}[1]{\@join{\DrawRubikCubeSidebarUB}{#1}} |
| 5546 |
\newcommand{\DrawRubikCubeSidebarBU}[1]{\@join{\DrawRubikCubeSidebarBU}{#1}} |
| 5547 |
% \end{macrocode} |
| 5548 |
% |
| 5549 |
% |
| 5550 |
% \medskip |
| 5551 |
% |
| 5552 |
% \subsubsection*{Front-Left vert sidebar (RU view)} |
| 5553 |
% |
| 5554 |
% For the front face we can use the regular \cmd{side@barL} commands |
| 5555 |
% since it is the same as for an ordinary face sidebar |
| 5556 |
% \begin{macrocode} |
| 5557 |
\newcommand{\DrawRubikCubeSidebarFLRU}{% |
| 5558 |
\side@barL{3}{\Lrt}% |
| 5559 |
\side@barL{2}{\Lrm}% |
| 5560 |
\side@barL{1}{\Lrb}% |
| 5561 |
} |
| 5562 |
% \end{macrocode} |
| 5563 |
% Now do the reverse (LF) |
| 5564 |
% \begin{macrocode} |
| 5565 |
\newcommand{\DrawRubikCubeSidebarLFRU}{\DrawRubikCubeSidebarFLRU} |
| 5566 |
% \end{macrocode} |
| 5567 |
% Now do the two join commands |
| 5568 |
% \begin{macrocode} |
| 5569 |
\newcommand{\DrawRubikCubeSidebarFL}[1]{\@join{\DrawRubikCubeSidebarFL}{#1}} |
| 5570 |
\newcommand{\DrawRubikCubeSidebarLF}[1]{\@join{\DrawRubikCubeSidebarLF}{#1}} |
| 5571 |
% \end{macrocode} |
| 5572 |
% |
| 5573 |
% |
| 5574 |
% \medskip |
| 5575 |
% |
| 5576 |
% \subsubsection*{Front-Down horizontal sidebar (RU view)} |
| 5577 |
% |
| 5578 |
% Horiz sidebar, so 1 at the left, 2=middle, 3= rhs) |
| 5579 |
% here we have to use the B for bottom (of front face) and the |
| 5580 |
% facelets of the top row of the Down face |
| 5581 |
% \begin{macrocode} |
| 5582 |
\newcommand{\DrawRubikCubeSidebarFDRU}{% |
| 5583 |
\side@barB{1}{\Dlt}% |
| 5584 |
\side@barB{2}{\Dmt}% |
| 5585 |
\side@barB{3}{\Drt}% |
| 5586 |
} |
| 5587 |
% \end{macrocode} |
| 5588 |
% Now do the reverse (DF) = FD |
| 5589 |
% \begin{macrocode} |
| 5590 |
\newcommand{\DrawRubikCubeSidebarDFRU}{\DrawRubikCubeSidebarFDRU} |
| 5591 |
% \end{macrocode} |
| 5592 |
% Now do the two join commands |
| 5593 |
% \begin{macrocode} |
| 5594 |
\newcommand{\DrawRubikCubeSidebarFD}[1]{\@join{\DrawRubikCubeSidebarFD}{#1}} |
| 5595 |
\newcommand{\DrawRubikCubeSidebarDF}[1]{\@join{\DrawRubikCubeSidebarDF}{#1}} |
| 5596 |
% \end{macrocode} |
| 5597 |
% But FD-LU is the same as FD-RU, so need to make copies of each |
| 5598 |
% \begin{macrocode} |
| 5599 |
\newcommand{\DrawRubikCubeSidebarDFLU}{\DrawRubikCubeSidebarDFRU} |
| 5600 |
\newcommand{\DrawRubikCubeSidebarFDLU}{\DrawRubikCubeSidebarFDRU} |
| 5601 |
% \end{macrocode} |
| 5602 |
% |
| 5603 |
% |
| 5604 |
% \medskip |
| 5605 |
% |
| 5606 |
% \subsubsection{Sidebars: LU view} |
| 5607 |
% |
| 5608 |
% |
| 5609 |
% \subsubsection*{Left-Back vert sidebar (LU view)} |
| 5610 |
% |
| 5611 |
% Need to write a new command for this position |
| 5612 |
% modified from \cmd{\side@barL} (in Section 20.16.1) |
| 5613 |
% draws only a single small bar |
| 5614 |
% each of the three small bars has a numbered position (1,2,3); |
| 5615 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5616 |
% \begin{macrocode} |
| 5617 |
\newcommand{\side@barRubikLbackLU}[2]{% |
| 5618 |
%% #1 = cubie possn no, #2 = colour |
| 5619 |
%% dx --> dx-1 |
| 5620 |
%% dy --> dy+1 |
| 5621 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5622 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5623 |
\pgfmathsetmacro{\dx}{0 - \bs -\bw -1}% |
| 5624 |
\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh +1}% |
| 5625 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5626 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5627 |
}} |
| 5628 |
% \end{macrocode} |
| 5629 |
% Make the LB (LeftBack) version; |
| 5630 |
% bar 1 is at the bottom |
| 5631 |
% \begin{macrocode} |
| 5632 |
\newcommand{\DrawRubikCubeSidebarLBLU}{% |
| 5633 |
\side@barRubikLbackLU{3}{\Brt}% |
| 5634 |
\side@barRubikLbackLU{2}{\Brm}% |
| 5635 |
\side@barRubikLbackLU{1}{\Brb}% |
| 5636 |
} |
| 5637 |
% \end{macrocode} |
| 5638 |
% Now do the reverse (BL) = LB |
| 5639 |
% \begin{macrocode} |
| 5640 |
\newcommand{\DrawRubikCubeSidebarBLLU}{\DrawRubikCubeSidebarLBLU} |
| 5641 |
% \end{macrocode} |
| 5642 |
% Make the join commands |
| 5643 |
% \begin{macrocode} |
| 5644 |
\newcommand{\DrawRubikCubeSidebarLB}[1]{\@join{\DrawRubikCubeSidebarLB}{#1}} |
| 5645 |
\newcommand{\DrawRubikCubeSidebarBL}[1]{\@join{\DrawRubikCubeSidebarBL}{#1}} |
| 5646 |
% \end{macrocode} |
| 5647 |
% |
| 5648 |
% |
| 5649 |
% \medskip |
| 5650 |
% |
| 5651 |
% \subsubsection*{Up-Back horizontal sidebar (LU view)} |
| 5652 |
% |
| 5653 |
% Modified from \cmd{\side@barT} (in Section 20.16.1) |
| 5654 |
% draws only a single small bar |
| 5655 |
% each of the three small bars has a numbered position (1,2,3); |
| 5656 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5657 |
% \begin{macrocode} |
| 5658 |
\newcommand{\side@barRubikTbackLU}[2]{% |
| 5659 |
%% #1 = cubie possn no; #2 = colour |
| 5660 |
%% dx --> dx-1 |
| 5661 |
%% dy --> dy+1 |
| 5662 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5663 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5664 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh -1}% |
| 5665 |
\pgfmathsetmacro{\dy}{3 +\bs +1}% |
| 5666 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5667 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5668 |
}} |
| 5669 |
% \end{macrocode} |
| 5670 |
% Make the UB (Up-Back) version; |
| 5671 |
% bar 1 is at the left, 3 on the rhs (as we look at the image) |
| 5672 |
% \begin{macrocode} |
| 5673 |
\newcommand{\DrawRubikCubeSidebarUBLU}{% |
| 5674 |
\side@barRubikTbackLU{1}{\Brt}% |
| 5675 |
\side@barRubikTbackLU{2}{\Bmt}% |
| 5676 |
\side@barRubikTbackLU{3}{\Blt}% |
| 5677 |
} |
| 5678 |
% \end{macrocode} |
| 5679 |
% Now do the reverse (BU) = UB |
| 5680 |
% \begin{macrocode} |
| 5681 |
\newcommand{\DrawRubikCubeSidebarBULU}{\DrawRubikCubeSidebarUBLU} |
| 5682 |
% \end{macrocode} |
| 5683 |
% Do not need to make the join commands |
| 5684 |
% as the USER commands for BU and UB are the same as for the RU. |
| 5685 |
% |
| 5686 |
% |
| 5687 |
% \medskip |
| 5688 |
% |
| 5689 |
% \subsubsection*{Front-Right vertical sidebar (LU view)} |
| 5690 |
% |
| 5691 |
% Only needed for the LU view and LD. |
| 5692 |
% for the front face we can use the regular side@barR commands |
| 5693 |
% since it is the same as for an ordinary face sidebar RHS |
| 5694 |
% \begin{macrocode} |
| 5695 |
\newcommand{\DrawRubikCubeSidebarFRLU}{% |
| 5696 |
\side@barR{3}{\Rlt}% |
| 5697 |
\side@barR{2}{\Rlm}% |
| 5698 |
\side@barR{1}{\Rlb}% |
| 5699 |
} |
| 5700 |
% \end{macrocode} |
| 5701 |
% Now do the reverse (RF) |
| 5702 |
% \begin{macrocode} |
| 5703 |
\newcommand{\DrawRubikCubeSidebarRFLU}{\DrawRubikCubeSidebarFRLU} |
| 5704 |
% \end{macrocode} |
| 5705 |
% Now do the two join commands |
| 5706 |
% \begin{macrocode} |
| 5707 |
\newcommand{\DrawRubikCubeSidebarFR}[1]{\@join{\DrawRubikCubeSidebarFR}{#1}} |
| 5708 |
\newcommand{\DrawRubikCubeSidebarRF}[1]{\@join{\DrawRubikCubeSidebarRF}{#1}} |
| 5709 |
% \end{macrocode} |
| 5710 |
% |
| 5711 |
% |
| 5712 |
% |
| 5713 |
% |
| 5714 |
% \subsubsection{Sidebars: RD view} |
| 5715 |
% |
| 5716 |
% \medskip |
| 5717 |
% |
| 5718 |
% \subsubsection*{Front-Up horizontal sidebar (RD view)} |
| 5719 |
% |
| 5720 |
% Horiz sidebar, so 1 at the left, 2=middle, 3= rhs |
| 5721 |
% here we have to use the T for bottom (of front face) and the |
| 5722 |
% facelets of the top row of the Down face |
| 5723 |
% \begin{macrocode} |
| 5724 |
\newcommand{\DrawRubikCubeSidebarFURD}{% |
| 5725 |
\side@barT{1}{\Ulb}% |
| 5726 |
\side@barT{2}{\Umb}% |
| 5727 |
\side@barT{3}{\Urb}% |
| 5728 |
} |
| 5729 |
% \end{macrocode} |
| 5730 |
% Now do the reverse (UF) = FU |
| 5731 |
% \begin{macrocode} |
| 5732 |
\newcommand{\DrawRubikCubeSidebarUFRD}{\DrawRubikCubeSidebarFURD} |
| 5733 |
% \end{macrocode} |
| 5734 |
% Now do the two join commands |
| 5735 |
% \begin{macrocode} |
| 5736 |
\newcommand{\DrawRubikCubeSidebarFU}[1]{\@join{\DrawRubikCubeSidebarFU}{#1}} |
| 5737 |
\newcommand{\DrawRubikCubeSidebarUF}[1]{\@join{\DrawRubikCubeSidebarUF}{#1}} |
| 5738 |
% \end{macrocode} |
| 5739 |
% |
| 5740 |
% \medskip |
| 5741 |
% |
| 5742 |
% \subsubsection*{Front-Left vertical sidebar (RD view)} |
| 5743 |
% |
| 5744 |
% |
| 5745 |
% |
| 5746 |
% Front LEFT (RD view = same as for RU) |
| 5747 |
% \begin{macrocode} |
| 5748 |
\newcommand{\DrawRubikCubeSidebarFLRD}{\DrawRubikCubeSidebarFLRU} |
| 5749 |
\newcommand{\DrawRubikCubeSidebarLFRD}{\DrawRubikCubeSidebarLFRU} |
| 5750 |
% \end{macrocode} |
| 5751 |
% |
| 5752 |
% |
| 5753 |
% \medskip |
| 5754 |
% |
| 5755 |
% \subsubsection*{Right-Back vertical sidebar (RD view)} |
| 5756 |
% |
| 5757 |
% Modified from \cmd{\side@barR} (in Section 20.16.1) |
| 5758 |
% draws only a single small bar |
| 5759 |
% each of the three small bars has a numbered position (1,2,3); |
| 5760 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5761 |
% \begin{macrocode} |
| 5762 |
\newcommand{\side@barRubikRbackRD}[2]{% |
| 5763 |
%% #1 = cubie possn no, #2 = colour |
| 5764 |
%% dx --> dx+1 |
| 5765 |
%% dy --> dy-1 |
| 5766 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5767 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5768 |
\pgfmathsetmacro{\dx}{3 + \bs +1}% |
| 5769 |
\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh -1}% |
| 5770 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5771 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5772 |
}} |
| 5773 |
% \end{macrocode} |
| 5774 |
% Make the RB (RightBack) version; |
| 5775 |
% bar 1 is at the bottom |
| 5776 |
% \begin{macrocode} |
| 5777 |
\newcommand{\DrawRubikCubeSidebarRBRD}{% |
| 5778 |
\side@barRubikRbackRD{3}{\Blt}% |
| 5779 |
\side@barRubikRbackRD{2}{\Blm}% |
| 5780 |
\side@barRubikRbackRD{1}{\Blb}% |
| 5781 |
} |
| 5782 |
% \end{macrocode} |
| 5783 |
% Now do the reverse (BR) = RB |
| 5784 |
% \begin{macrocode} |
| 5785 |
\newcommand{\DrawRubikCubeSidebarBRRD}{\DrawRubikCubeSidebarRBRD} |
| 5786 |
% \end{macrocode} |
| 5787 |
% Do NOT need to make the join commands (same as for the RU view) |
| 5788 |
% |
| 5789 |
% |
| 5790 |
% \medskip |
| 5791 |
% |
| 5792 |
% \subsubsection*{Down-Back horizotal sidebar (RD view)} |
| 5793 |
% |
| 5794 |
% Modified from \cmd{\side@barB} (in Section 20.16.1) |
| 5795 |
% draws only a single small bar |
| 5796 |
% each of the three small bars has a numbered position (1,2,3); |
| 5797 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5798 |
% \begin{macrocode} |
| 5799 |
\newcommand{\side@barRubikBbackRD}[2]{% |
| 5800 |
%% #1 = cubie possn no; #2 = colour |
| 5801 |
%% dx --> dx+1 |
| 5802 |
%% dy --> dy-1 |
| 5803 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5804 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5805 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh +1}% |
| 5806 |
\pgfmathsetmacro{\dy}{0 -\bs - \bw -1}% |
| 5807 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5808 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5809 |
}} |
| 5810 |
% \end{macrocode} |
| 5811 |
% Make the DB (Down-Back) version; |
| 5812 |
% bar 1 is at the left, 3 on the rhs (as we look at the image) |
| 5813 |
% \begin{macrocode} |
| 5814 |
\newcommand{\DrawRubikCubeSidebarDBRD}{% |
| 5815 |
\side@barRubikBbackRD{1}{\Brb}% |
| 5816 |
\side@barRubikBbackRD{2}{\Bmb}% |
| 5817 |
\side@barRubikBbackRD{3}{\Blb}% |
| 5818 |
} |
| 5819 |
% \end{macrocode} |
| 5820 |
% Now do the reverse (BD) = DB |
| 5821 |
% \begin{macrocode} |
| 5822 |
\newcommand{\DrawRubikCubeSidebarBDRD}{\DrawRubikCubeSidebarDBRD} |
| 5823 |
% \end{macrocode} |
| 5824 |
% Make the join commands |
| 5825 |
% \begin{macrocode} |
| 5826 |
\newcommand{\DrawRubikCubeSidebarDB}[1]{\@join{\DrawRubikCubeSidebarDB}{#1}} |
| 5827 |
\newcommand{\DrawRubikCubeSidebarBD}[1]{\@join{\DrawRubikCubeSidebarBD}{#1}} |
| 5828 |
% \end{macrocode} |
| 5829 |
% |
| 5830 |
% |
| 5831 |
% |
| 5832 |
% \subsubsection{Sidebars: LD view} |
| 5833 |
% |
| 5834 |
% |
| 5835 |
% \medskip |
| 5836 |
% |
| 5837 |
% \subsubsection*{Front-Up horizontal sidebar (LD view)} |
| 5838 |
% |
| 5839 |
% But FR (LD view) is the same as for (RU view), (see above) |
| 5840 |
% \begin{macrocode} |
| 5841 |
\newcommand{\DrawRubikCubeSidebarFULD}{\DrawRubikCubeSidebarFURD} |
| 5842 |
\newcommand{\DrawRubikCubeSidebarUFLD}{\DrawRubikCubeSidebarUFRD} |
| 5843 |
% \end{macrocode} |
| 5844 |
% |
| 5845 |
% \medskip |
| 5846 |
% |
| 5847 |
% \subsubsection*{Front-Right vertical sidebar (LD view)} |
| 5848 |
% |
| 5849 |
% Front Right (LDview) = same as for (LU view), (see above) |
| 5850 |
% \begin{macrocode} |
| 5851 |
\newcommand{\DrawRubikCubeSidebarFRLD}{\DrawRubikCubeSidebarFRLU} |
| 5852 |
\newcommand{\DrawRubikCubeSidebarRFLD}{\DrawRubikCubeSidebarRFLU} |
| 5853 |
% \end{macrocode} |
| 5854 |
% |
| 5855 |
% |
| 5856 |
% \medskip |
| 5857 |
% |
| 5858 |
% \subsubsection*{Left-Back vertical sidebar (LD view)} |
| 5859 |
% |
| 5860 |
% Modified from \cmd{\side@barL} (in Section 20.16.1) |
| 5861 |
% draws only a single small bar |
| 5862 |
% each of the three small bars has a numbered position (1,2,3); |
| 5863 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5864 |
% \begin{macrocode} |
| 5865 |
\newcommand{\side@barRubikLbackLD}[2]{% |
| 5866 |
%% #1 = cubie possn no, #2 = colour |
| 5867 |
%% dx --> dx-1 |
| 5868 |
%% dy --> dy-1 |
| 5869 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5870 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5871 |
\pgfmathsetmacro{\dx}{0 - \bs -\bw -1}% |
| 5872 |
\pgfmathsetmacro{\dy}{#1 -1+0.5-\blh -1}% |
| 5873 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bl) |
| 5874 |
-- (\dx+\bw,\dy+\bl) -- (\dx+\bw,\dy) -- cycle; |
| 5875 |
}} |
| 5876 |
% \end{macrocode} |
| 5877 |
% Make the LB (LeftBack) version; |
| 5878 |
% bar 1 is at the bottom |
| 5879 |
% \begin{macrocode} |
| 5880 |
\newcommand{\DrawRubikCubeSidebarLBLD}{% |
| 5881 |
\side@barRubikLbackLD{3}{\Brt}% |
| 5882 |
\side@barRubikLbackLD{2}{\Brm}% |
| 5883 |
\side@barRubikLbackLD{1}{\Brb}% |
| 5884 |
} |
| 5885 |
% \end{macrocode} |
| 5886 |
% Now do the reverse (BL) = LB |
| 5887 |
% \begin{macrocode} |
| 5888 |
\newcommand{\DrawRubikCubeSidebarBLLD}{\DrawRubikCubeSidebarLBLD} |
| 5889 |
% \end{macrocode} |
| 5890 |
% Do NOT need to make the join commands (same as for the LU view) |
| 5891 |
% |
| 5892 |
% |
| 5893 |
% \medskip |
| 5894 |
% |
| 5895 |
% \subsubsection*{Down-Back horizontal sidebar (LD view)} |
| 5896 |
% |
| 5897 |
% |
| 5898 |
% Modified from \cmd{\side@barB} (in Section 20.16.1) |
| 5899 |
% draws only a single small bar |
| 5900 |
% each of the three small bars has a numbered position (1,2,3); |
| 5901 |
% (dx,dy) = bottom Left corner of single facelet bar |
| 5902 |
% \begin{macrocode} |
| 5903 |
\newcommand{\side@barRubikBbackLD}[2]{% |
| 5904 |
%% #1 = cubie possn no; #2 = colour |
| 5905 |
%% dx --> dx-1 |
| 5906 |
%% dy --> dy-1 |
| 5907 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 5908 |
\pgfmathsetmacro{\blh}{\bl*(0.5)}% |
| 5909 |
\pgfmathsetmacro{\dx}{#1 -1+0.5-\blh -1}% |
| 5910 |
\pgfmathsetmacro{\dy}{0 -\bs - \bw -1}% |
| 5911 |
\draw[fill=#2] (\dx,\dy) -- (\dx,\dy + \bw) |
| 5912 |
-- (\dx+\bl,\dy+\bw) -- (\dx+\bl,\dy) -- cycle; |
| 5913 |
}} |
| 5914 |
% \end{macrocode} |
| 5915 |
% Make the DB (Down-Back) version; |
| 5916 |
% bar 1 is at the left, 3 on the rhs (as we look at the image) |
| 5917 |
% \begin{macrocode} |
| 5918 |
\newcommand{\DrawRubikCubeSidebarDBLD}{% |
| 5919 |
\side@barRubikBbackLD{1}{\Brb}% |
| 5920 |
\side@barRubikBbackLD{2}{\Bmb}% |
| 5921 |
\side@barRubikBbackLD{3}{\Blb}% |
| 5922 |
} |
| 5923 |
% \end{macrocode} |
| 5924 |
% Now do the reverse (BD) = DB |
| 5925 |
% \begin{macrocode} |
| 5926 |
\newcommand{\DrawRubikCubeSidebarBDLD}{\DrawRubikCubeSidebarDBLD} |
| 5927 |
% \end{macrocode} |
| 5928 |
% Do NOT need to make the join commands (same as for the RD view |
| 5929 |
% |
| 5930 |
% |
| 5931 |
% |
| 5932 |
% |
| 5933 |
% \subsection{\hspace{3mm}DrawNCube command} |
| 5934 |
% |
| 5935 |
% \textsc{history}: The essence of this command was originally developed by Peter Bartal |
| 5936 |
% as his command \cmd{\rubikcube} (see Bartal, |
| 5937 |
% 2011). We have modified it, as follows (June 2012): |
| 5938 |
% \newline\strut\hspace{\parindent}(1) adjusted to use the |
| 5939 |
% TikZ \cmd{\pgfmathsetmacro\{\}\{\}} command (suggested by Peter Grill), |
| 5940 |
% \newline\strut\hspace{\parindent}(2) renamed to \cmd{\DrawNCubeAll}. |
| 5941 |
% |
| 5942 |
% \begin{macro}{\DrawNCubeAll} |
| 5943 |
% {\noindent}This command draws a solved NxNxN Rubik's cube from the RightUp viewpoint. |
| 5944 |
% All cubies on a given face have the same colour. |
| 5945 |
% The command takes four ordered arguments, as follows: |
| 5946 |
% \begin{quote} |
| 5947 |
% \#1 = number of cubies ($n>0$) along each side, |
| 5948 |
% {\newline}\#2, \#3, \#4 = colours of the visible faces (in X,Y,Z order); |
| 5949 |
% X=Right face colour, Y=Up face colour, Z=Front face colour. |
| 5950 |
% \end{quote} |
| 5951 |
% We use the \cmd{\pgfmathsetmacro}\marg{variable-name}\marg{numeric value or maths} |
| 5952 |
% command. Note that the second argument must not involve any units---just numeric |
| 5953 |
% values or mathematics. |
| 5954 |
% |
| 5955 |
% \begin{macrocode} |
| 5956 |
\newcommand{\DrawNCubeAll}[4]{% |
| 5957 |
\pgfmathsetmacro{\ncubes}{#1-1}% |
| 5958 |
%% need to subtract 1 from the given number of cubies per side |
| 5959 |
%% to avoid the origin of the initial cube to be displaced |
| 5960 |
\foreach \x in {0,...,\ncubes}{% |
| 5961 |
\foreach \y in {0,...,\ncubes}{% |
| 5962 |
\foreach \z in {0,...,\ncubes}{% |
| 5963 |
\cube@dxdydz{1}{#2}{#3}{#4}{\x}{\y}{\z}% |
| 5964 |
}}}} |
| 5965 |
% \end{macrocode} |
| 5966 |
% \end{macro} |
| 5967 |
% |
| 5968 |
% \begin{macro}{\cube@dxdydz} |
| 5969 |
% This internal command is used only by the \cmd{\DrawNCubeAll} command |
| 5970 |
% (see above). The original version of this command was developed |
| 5971 |
% by Peter Bartal (see Bartal, 2011). |
| 5972 |
% It was later modified (2012) by RWD Nickalls (to implement a more |
| 5973 |
% intuitive X, Y, Z ordering of the face colour parameters). |
| 5974 |
% |
| 5975 |
% The cube need not be in the origin, the distances of |
| 5976 |
% the \textsc{down}-behind [L] corner from |
| 5977 |
% the origin are taken as parameters 5,6,7. |
| 5978 |
% The command takes 7 ordered arguments: |
| 5979 |
% \begin{quote} |
| 5980 |
% 1 - length of an edge |
| 5981 |
% {\newline}2 - X-face colour (\textsc{right} face) |
| 5982 |
% {\newline}3 - Y-face colour (\textsc{up} face) |
| 5983 |
% {\newline}4 - Z-face colour (\textsc{front} face) |
| 5984 |
% {\newline}5 - x-position in space |
| 5985 |
% {\newline}6 - y-position in space |
| 5986 |
% {\newline}7 - z-position in space |
| 5987 |
% \end{quote} |
| 5988 |
% |
| 5989 |
% \textsc{usage}: |\cube@dxdydz{1}{X}{Y}{Z}{x}{y}{z}| |
| 5990 |
% |
| 5991 |
% {\noindent}The original code |
| 5992 |
% |\pgfmathparse{#1+#5}\let\dy\pgfmathresult| |
| 5993 |
% {\newline} was changed to the more intuitive |\pgfmathsetmacro{\dx}{#1+#5}| |
| 5994 |
% (suggested by Peter Grill 2011). |
| 5995 |
% |
| 5996 |
% \textsc{changes}: RWD Nickalls (2012): |
| 5997 |
% (1) added the [line join=round,line cap=round] |
| 5998 |
% options to each of the TikZ \cmd{\draw} commands, in order to improve |
| 5999 |
% the line joining (first two options); (2) adjusted the \cmd{\cube@dxdydz} macro |
| 6000 |
% to adopt the ordered XYZ face colour notation |
| 6001 |
% (by reassigning \#2, \#3, \#4 to the X, Y, Z face colours, as shown above). |
| 6002 |
% |
| 6003 |
% \begin{macrocode} |
| 6004 |
\newcommand{\cube@dxdydz}[7]{% |
| 6005 |
\pgfmathsetmacro{\dx}{#1+#5}% |
| 6006 |
%% calculates the 'displacement' (distance from the origin) of the |
| 6007 |
%% far corners of the cube along the x axis from the arguments |
| 6008 |
\pgfmathsetmacro{\dy}{#1+#6}% |
| 6009 |
%% calculates the 'displacement' (distance from the origin) of the |
| 6010 |
%% far corners of the cube along the y axis from the arguments |
| 6011 |
\pgfmathsetmacro{\dz}{#1+#7}% |
| 6012 |
%% calculates the 'displacement' (distance from the origin) of the |
| 6013 |
%% far corners of the cube along the z axis from the arguments |
| 6014 |
%% Draw FRONT face (using the X colour = #4) |
| 6015 |
\draw[line join=round,line cap=round,ultra thick,fill=#4]% |
| 6016 |
(#5,#6,\dz) -- (\dx,#6,\dz) -- (\dx,\dy,\dz) -- (#5,\dy,\dz) -- cycle; |
| 6017 |
%% The 'rectangle' command does not work with 3D coordinates, |
| 6018 |
%% so this is the way to draw the squares with space coordinates |
| 6019 |
%% Draw UP face (using the Y colour = #3) |
| 6020 |
\draw[line join=round,line cap=round,ultra thick,fill=#3]% |
| 6021 |
(#5,\dy,\dz) -- (\dx,\dy,\dz) -- (\dx,\dy,#7) -- (#5,\dy,#7) -- cycle; |
| 6022 |
%% Draw RIGHT face (using the X colour = #2) |
| 6023 |
\draw[line join=round,line cap=round,ultra thick,fill=#2]% |
| 6024 |
(\dx,#6,\dz) -- (\dx,#6,#7) -- (\dx,\dy,#7) -- (\dx,\dy,\dz) -- cycle; |
| 6025 |
} |
| 6026 |
% \end{macrocode} |
| 6027 |
% \end{macro} |
| 6028 |
% |
| 6029 |
% |
| 6030 |
% |
| 6031 |
% \subsection{\hspace{3mm}Drawing single cubies} |
| 6032 |
% |
| 6033 |
% \begin{macro}{\Cubiedx} |
| 6034 |
% \begin{macro}{\Cubiedy} |
| 6035 |
% These two commands set the value of the two length parameters |
| 6036 |
% \texttt{cx} and \texttt{cy}, and allow the user to vary the size |
| 6037 |
% (adjust \texttt{cy}) and horizontal viewpoint (adjust \texttt{cx}) |
| 6038 |
% of a single cubie (described in more detail in the \rubikcube\ |
| 6039 |
% package documentation). |
| 6040 |
% Note that we cannot use the names \texttt{dx}, \texttt{dy} for the |
| 6041 |
% variables here since these names have been allocated already |
| 6042 |
% (see above). However, we can use \texttt{dx}, \texttt{dy} in the |
| 6043 |
% command names as these will be more readily understood by the user. |
| 6044 |
% \begin{macrocode} |
| 6045 |
\newcommand{\Cubiedx}[1]{\pgfmathsetmacro{\cx}{#1}} |
| 6046 |
\newcommand{\Cubiedy}[1]{\pgfmathsetmacro{\cy}{#1}} |
| 6047 |
% \end{macrocode} |
| 6048 |
% \end{macro} |
| 6049 |
% \end{macro} |
| 6050 |
% We now set the default values (cx=cy=0.4) |
| 6051 |
% \begin{macrocode} |
| 6052 |
\Cubiedx{0.4} |
| 6053 |
\Cubiedy{0.4} |
| 6054 |
% \end{macrocode} |
| 6055 |
% |
| 6056 |
% |
| 6057 |
% \begin{macro}{\DrawCubieRU} |
| 6058 |
% \begin{macro}{\DrawCubieRD} |
| 6059 |
% \begin{macro}{\DrawCubieLU} |
| 6060 |
% \begin{macro}{\DrawCubieLD} |
| 6061 |
% These four commands draw a single cubie from the RightUp, RightDown, |
| 6062 |
% LeftUp, LeftDown viewpoint. The viewpoint is specified using an appended |
| 6063 |
% two-letter XY ordered viewpoint code: either RU, RD, LU, LD. |
| 6064 |
% These commands take three arguments, namely three different XYZ |
| 6065 |
% ordered colour codes (R,O,Y,G,B,W,X). |
| 6066 |
% \newline\textsc{format}: \cmd{\DrawCubieRU}\marg{Xcolour}\marg{Ycolour}\marg{Zcolour} |
| 6067 |
% \newline\textsc{usage}: |\DrawCubieRU{G}{B}{W}| |
| 6068 |
% \end{macro} |
| 6069 |
% \end{macro} |
| 6070 |
% \end{macro} |
| 6071 |
% \end{macro} |
| 6072 |
% \begin{macrocode} |
| 6073 |
\newcommand{\DrawCubieRU}[3]{% |
| 6074 |
%% Front face (z) |
| 6075 |
\draw[line join=round,line cap=round,ultra thick,fill=#3]% |
| 6076 |
(0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; |
| 6077 |
%% Up face(y) |
| 6078 |
\draw[line join=round,line cap=round,ultra thick,fill=#2]% |
| 6079 |
(0,1) -- (\cx, 1+\cy) -- (1+\cx,1+\cy) -- (1,1) -- cycle; |
| 6080 |
%% Right face(x) |
| 6081 |
\draw[line join=round,line cap=round,ultra thick,fill=#1]% |
| 6082 |
(1,0) -- (1,1) -- (1+\cx,1+\cy) -- (1+\cx, \cy) -- cycle; |
| 6083 |
} |
| 6084 |
\newcommand{\DrawCubieRD}[3]{% |
| 6085 |
%% Front face (z) |
| 6086 |
\draw[line join=round,line cap=round,ultra thick,fill=#3]% |
| 6087 |
(0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; |
| 6088 |
%% Down face (y) |
| 6089 |
\draw[line join=round,line cap=round,ultra thick,fill=#2]% |
| 6090 |
(\cx,-\cy) -- (0, 0) -- (1,0) -- (1+\cx,-\cy) -- cycle; |
| 6091 |
%% Right face (x) |
| 6092 |
\draw[line join=round,line cap=round,ultra thick,fill=#1]% |
| 6093 |
(1,0) -- (1,1) -- (1+\cx,-\cy+1) -- (1+\cx, -\cy) -- cycle; |
| 6094 |
} |
| 6095 |
\newcommand{\DrawCubieLD}[3]{% |
| 6096 |
%% Front face (z) |
| 6097 |
\draw[line join=round,line cap=round,ultra thick,fill=#3]% |
| 6098 |
(0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; |
| 6099 |
%% Down face (y) |
| 6100 |
\draw[line join=round,line cap=round,ultra thick,fill=#2]% |
| 6101 |
(-\cx,-\cy) -- (0, 0) -- (1,0) -- (1-\cx,-\cy) -- cycle; |
| 6102 |
%% Left face (x) |
| 6103 |
\draw[line join=round,line cap=round,ultra thick,fill=#1]% |
| 6104 |
(-\cx,-\cy) -- (-\cx,-\cy+1) -- (0,1) -- (0,0) -- cycle; |
| 6105 |
} |
| 6106 |
\newcommand{\DrawCubieLU}[3]{% |
| 6107 |
%% Front face (z) |
| 6108 |
\draw[line join=round,line cap=round,ultra thick,fill=#3]% |
| 6109 |
(0,0) -- (0, 1) -- (1, 1) -- (1,0) -- cycle; |
| 6110 |
%% Up face (y) |
| 6111 |
\draw[line join=round,line cap=round,ultra thick,fill=#2]% |
| 6112 |
(-\cx,1+\cy) -- (1-\cx, 1+\cy) -- (1,1) -- (0,1) -- cycle; |
| 6113 |
%% Left face (x) |
| 6114 |
\draw[line join=round,line cap=round,ultra thick,fill=#1]% |
| 6115 |
(-\cx, \cy) -- (-\cx,\cy+1) -- (0,1) -- (0,0) -- cycle; |
| 6116 |
} |
| 6117 |
% \end{macrocode} |
| 6118 |
% |
| 6119 |
% |
| 6120 |
% \subsection{\hspace{3mm}Text cubies} |
| 6121 |
% |
| 6122 |
% \begin{macro}{\textCubieRU} |
| 6123 |
% \begin{macro}{\textCubieRD} |
| 6124 |
% \begin{macro}{\textCubieLU} |
| 6125 |
% \begin{macro}{\textCubieLD} |
| 6126 |
% These four commands draw a single `text' cubie from the RightUp, RightDown, |
| 6127 |
% LeftUp, LeftDown viewpoint. |
| 6128 |
% They are `text' forms of the \cmd{\DrawCubie} commands described above. |
| 6129 |
% Their size was chosen to be suitable for use with 10--12 point fonts. |
| 6130 |
% |
| 6131 |
% As before, the viewpoint is specified using an appended |
| 6132 |
% two-letter XY ordered viewpoint code: either RU, RD, LU, LD. |
| 6133 |
% These commands take three arguments (since just three faces are visible with this |
| 6134 |
% cube format), namely three different XYZ ordered colour codes (R,O,Y,G,B,W,X). |
| 6135 |
% \newline\textsc{format}: \cmd{\textCubieRU}\marg{Xcolour}\marg{Ycolour}\marg{Zcolour} |
| 6136 |
% \newline\textsc{usage}: |\textCubieRU{G}{B}{W}| |
| 6137 |
% \end{macro} |
| 6138 |
% \end{macro} |
| 6139 |
% \end{macro} |
| 6140 |
% \end{macro} |
| 6141 |
% \begin{macrocode} |
| 6142 |
\newcommand{\textCubieRU}[3]{% |
| 6143 |
\begin{minipage}{0.66cm} |
| 6144 |
\centering |
| 6145 |
\begin{tikzpicture}[scale=0.5] |
| 6146 |
\Cubiedx{0.4}\Cubiedy{0.4} |
| 6147 |
\DrawCubieRU{#1}{#2}{#3} |
| 6148 |
\end{tikzpicture}% |
| 6149 |
\end{minipage} |
| 6150 |
} |
| 6151 |
\newcommand{\textCubieRD}[3]{% |
| 6152 |
\begin{minipage}{0.66cm} |
| 6153 |
\centering |
| 6154 |
\begin{tikzpicture}[scale=0.5] |
| 6155 |
\Cubiedx{0.4}\Cubiedy{0.4} |
| 6156 |
\DrawCubieRD{#1}{#2}{#3} |
| 6157 |
\end{tikzpicture}% |
| 6158 |
\end{minipage} |
| 6159 |
} |
| 6160 |
\newcommand{\textCubieLD}[3]{% |
| 6161 |
\begin{minipage}{0.66cm} |
| 6162 |
\centering |
| 6163 |
\begin{tikzpicture}[scale=0.5] |
| 6164 |
\Cubiedx{0.4}\Cubiedy{0.4} |
| 6165 |
\DrawCubieLD{#1}{#2}{#3} |
| 6166 |
\end{tikzpicture}% |
| 6167 |
\end{minipage} |
| 6168 |
} |
| 6169 |
\newcommand{\textCubieLU}[3]{% |
| 6170 |
\begin{minipage}{0.66cm} |
| 6171 |
\centering |
| 6172 |
\begin{tikzpicture}[scale=0.5] |
| 6173 |
\Cubiedx{0.4}\Cubiedy{0.4} |
| 6174 |
\DrawCubieLU{#1}{#2}{#3} |
| 6175 |
\end{tikzpicture}% |
| 6176 |
\end{minipage} |
| 6177 |
} |
| 6178 |
% \end{macrocode} |
| 6179 |
% |
| 6180 |
% |
| 6181 |
% \subsection{\hspace{3mm}Rotation commands} |
| 6182 |
% \label{sec:rotationcommandscode} |
| 6183 |
% |
| 6184 |
% |
| 6185 |
% \subsubsection{\hspace{3mm}Introduction} |
| 6186 |
% |
| 6187 |
% We use a special prefix notation to denote each of four different representations |
| 6188 |
% of the various Rubik cube rotations as follows: the name of the Rubik rotation (rr), its |
| 6189 |
% associated hieroglyph (rrh), and combinations of name and hieroglyph both vertical (Rubik) |
| 6190 |
% and horizontal (textRubik). A rotation command is a combination of a rotation-code appended |
| 6191 |
% to one of the four prefixes. |
| 6192 |
% |
| 6193 |
% For~example, the command \cmd{\rrhD} generates the hieroglyph (rrh) associated with |
| 6194 |
% the rotation-code D. In this form it is used internally, but it is also available for the user. |
| 6195 |
% |
| 6196 |
% In version~3.0, however, all the rotation commands were also made available to the user |
| 6197 |
% in the much more intuitive form stem\{argument\} form, for~example, |
| 6198 |
% |\rrh{D}|. In practice, this `argument' form actually generates the original non-argument |
| 6199 |
% form by the use of the internal macro |\@join|. |
| 6200 |
% For~example, \verb!\rrh{D}! $\rightarrow$ join(\verb!\rrh! + \verb!D!) $\rightarrow$ \verb!\rrhD! |
| 6201 |
% (see Section~\ref{sec:cmdsusingjoin} for details). |
| 6202 |
% |
| 6203 |
% The hieroglyphs are of two types: `arrow' glyphs (all exactly square), |
| 6204 |
% and `letter' glyphs (mostly square, but many are rectangular); however both |
| 6205 |
% types are designed to have the same height so they sit nicely when arranged side-by-side. |
| 6206 |
% A lot of special macros for generating these glyphs are described below |
| 6207 |
% in Section~\ref{sec:usefulinternalcommands} (and also in Section~\ref{sec:codedrawnotationbox}). |
| 6208 |
% |
| 6209 |
% The `arrow' hieroglyphs are built up in stages using TikZ. We first create a |
| 6210 |
% command for drawing the square (\cmd{\DrawNotationBox}; |
| 6211 |
% see Section~\ref{sec:codedrawnotationbox}) and then draw the |
| 6212 |
% contents (lines, arrows, arcs of circles). For an example, |
| 6213 |
% see the D~form \rrh{D}\ constructed in Section~\ref{sec:coderotationD}. |
| 6214 |
% |
| 6215 |
% The `letter' hieroglyphs (glyphs for which the rotations cannot be seen from the front, |
| 6216 |
% and hence cannot have arrows) just give a letter representation of the rotation |
| 6217 |
% (say, Bw for `back wide'). These glyphs are therefore made using an fbox (for convenience), |
| 6218 |
% and therefore these are sometimes not square. Some vertical fine-tuning using |
| 6219 |
% the \verb!\raisebox! command is often required to force these `letter' glyphs to |
| 6220 |
% have the same vertical position as their `arrow' cousins. A typical example |
| 6221 |
% is the form \rrh{Bw}\ which is detailed in Section~\ref{sec:coderotationBw}. |
| 6222 |
% |
| 6223 |
% The presence of small overfilled \cmd{\hbox}es associated with these squares |
| 6224 |
% were originally checked for using the \texttt{ltugboat.cls}, and all fixed mainly |
| 6225 |
% by setting their associated small minipages $\rightarrow$ width = 0.6cm, |
| 6226 |
% and using TikZ scale=0.5. |
| 6227 |
% |
| 6228 |
% |
| 6229 |
% \subsubsection{\hspace{3mm}DrawNotationBox} |
| 6230 |
% \label{sec:codedrawnotationbox} |
| 6231 |
% |
| 6232 |
% |
| 6233 |
% \begin{macro}{\DrawNotationBox} |
| 6234 |
% This internal command draws the surrounding square box of all the hieroglyphs. |
| 6235 |
% Note that we start at (0,0) and draw to the final point |
| 6236 |
% in order to make a nice corner join. |
| 6237 |
% |
| 6238 |
% \textsc{todo}: ? make this a proper internal command |
| 6239 |
% using \verb!@! sometime. |
| 6240 |
% |
| 6241 |
% \begin{macrocode} |
| 6242 |
\newcommand{\DrawNotationBox}{% |
| 6243 |
\draw [thick] (0,0) -- (0,1) -- (1,1) -- (1,0) -- (0,0) -- (0,1)% |
| 6244 |
} |
| 6245 |
% \end{macrocode} |
| 6246 |
% \end{macro} |
| 6247 |
% |
| 6248 |
% We now define a number of points and line-segments inside the square |
| 6249 |
% `notationbox' (e.g.,~\cmd{\@sd}, \cmd{\@sh} \ldots\ etc.) which will be required |
| 6250 |
% for use in drawing the various lines and arrows. |
| 6251 |
% Some hieroglyphs contain either one circular arc, or two concentric arcs, |
| 6252 |
% and these arcs require both a centre and a start point. |
| 6253 |
% Note that the final argument does not use any units. |
| 6254 |
% For the TikZ ARC command see TikZ pgfmanual (2012) page~146 (\S 14.8). |
| 6255 |
% |
| 6256 |
% \textsc{todo}: make a small diagram to illustrate the position of these |
| 6257 |
% parameters and make things a bit clearer sometime. |
| 6258 |
% |
| 6259 |
%\begin{macrocode} |
| 6260 |
\pgfmathsetmacro{\@sd}{0.25} % a small horiz space |
| 6261 |
\pgfmathsetmacro{\@sdd}{2*\@sd} % 2x horiz space |
| 6262 |
\pgfmathsetmacro{\@sddd}{3*\@sd} % 3x horiz space |
| 6263 |
\pgfmathsetmacro{\@sh}{0.6} % height |
| 6264 |
\pgfmathsetmacro{\@sb}{0.2} % base |
| 6265 |
\pgfmathsetmacro{\@sbh}{\@sb + \@sh} % UP |
| 6266 |
\pgfmathsetmacro{\@scx}{\@sdd+0.2} % Start of CircleX arc |
| 6267 |
\pgfmathsetmacro{\@scy}{\@sd*2/3} % Start of CircleY arc |
| 6268 |
\pgfmathsetmacro{\@sqcx}{\@scx-0.13} %% SQuare CenterX coord |
| 6269 |
\pgfmathsetmacro{\@sqcy}{\@scy+0.25} %% SQuare CenterY cpprd |
| 6270 |
% \end{macrocode} |
| 6271 |
% |
| 6272 |
% |
| 6273 |
% |
| 6274 |
% |
| 6275 |
% \subsubsection{\hspace{3mm}Some useful internal commands} |
| 6276 |
% \label{sec:usefulinternalcommands} |
| 6277 |
% |
| 6278 |
% \begin{macro}{\@rr} |
| 6279 |
% \begin{macro}{\@rrp} |
| 6280 |
% \begin{macro}{\@rrw} |
| 6281 |
% \begin{macro}{\@rrwp} |
| 6282 |
% \begin{macro}{\@rrs} |
| 6283 |
% \begin{macro}{\@rrsp} |
| 6284 |
% \begin{macro}{\@rra} |
| 6285 |
% \begin{macro}{\@rrap} |
| 6286 |
% \begin{macro}{\@xyzh} |
| 6287 |
% \begin{macro}{\@xyzhp} |
| 6288 |
% \begin{macro}{\@xyzRubik} |
| 6289 |
% \begin{macro}{\@xyzRubikp} |
| 6290 |
% \begin{macro}{\@SquareLetter} |
| 6291 |
% \begin{macro}{\@hRubik} |
| 6292 |
% These internal commands are used to generate the |
| 6293 |
% prime, w, w-prime, s, s-prime, a, a-prime |
| 6294 |
% rotation commands. They attach a letter or a prime to the associated argument; |
| 6295 |
% for~example, the command \verb!\@rrwp{B}! appends a `w' and a prime (p) to the |
| 6296 |
% argument `B', i.e.~$\rightarrow$ \rr{Bwp} (see Section~\ref{sec:coderotationBwp}). |
| 6297 |
% Users are then able to access this glyph by typing the command \verb!\rrBwp!, or, |
| 6298 |
% more intuitively, \verb!\rr{Bwp}! |
| 6299 |
% (see also \verb!\@join! detailed in Section~\ref{sec:cmdsusingjoin}). |
| 6300 |
% |
| 6301 |
% The \cmd{\@xyz..} commands are used to generate the |
| 6302 |
% x, y, z, u, d, l, r, f, b commands and their associated prime rotation commands. |
| 6303 |
% The commands \verb!\@xyzhbdfl! and \verb!\@xyzbdflRubik! relate to the |
| 6304 |
% axis rotations denoted as b, d, f, l; since these four letters have long upstrokes |
| 6305 |
% they require special fine-tuning for vertical position. |
| 6306 |
% |
| 6307 |
% The \cmd{\@SquareLetter} command is used to form the separate square hieroglyph form |
| 6308 |
% used for rotations with no visible representation from the front |
| 6309 |
% (e.g.,~B.., Fs, Fsp, Fa, Fap, S, Sp, Sf, Sfp, Sb, Sbp). |
| 6310 |
% Note that the TikZ `thick' line code = 0.8pt (used in \cmd{\@SquareLetter}). |
| 6311 |
% The \cmd{\@hRubik} is the vertical shift used to raise the box carrying the rotation |
| 6312 |
% rotation-code in \cmd{\Rubik..} commands not visible from the front. |
| 6313 |
% |
| 6314 |
% The idea is that by using these internal |
| 6315 |
% tools taking parameters we are able to more easily standardise the size |
| 6316 |
% and position of all the various glyphs. For details of the |
| 6317 |
% rubikfont and rubikprime see Section~\ref{sec:coderubikfont}). |
| 6318 |
% |
| 6319 |
% \begin{macrocode} |
| 6320 |
\newcommand{\@rr}[1]{{\@rubikfont #1}} |
| 6321 |
\newcommand{\@rrp}[1]{{\@rubikfont #1\@rubikprime}} |
| 6322 |
\newcommand{\@rrw}[1]{{\@rubikfont #1{\@rubikfontFNS w}}} |
| 6323 |
\newcommand{\@rrwp}[1]{{\@rubikfont #1{\@rubikfontFNS w}\@rubikprime}} |
| 6324 |
\newcommand{\@rrs}[1]{{\@rubikfont #1{\@rubikfontFNS s}}} |
| 6325 |
\newcommand{\@rrsp}[1]{{\@rubikfont #1{\@rubikfontFNS s}\@rubikprime}} |
| 6326 |
\newcommand{\@rra}[1]{{\@rubikfont #1{\@rubikfontFNS a}}} |
| 6327 |
\newcommand{\@rrap}[1]{{\@rubikfont #1{\@rubikfontFNS a}\@rubikprime}} |
| 6328 |
\newcommand{\@rru}[1]{{\@rubikfont #1{\@rubikfontFNS u}}} |
| 6329 |
\newcommand{\@rrup}[1]{{\@rubikfont #1{\@rubikfontFNS u}\@rubikprime}} |
| 6330 |
\newcommand{\@rrd}[1]{{\@rubikfont #1{\@rubikfontFNS d}}} |
| 6331 |
\newcommand{\@rrdp}[1]{{\@rubikfont #1{\@rubikfontFNS d}\@rubikprime}} |
| 6332 |
\newcommand{\@rrl}[1]{{\@rubikfont #1{\@rubikfontFNS l}}} |
| 6333 |
\newcommand{\@rrlp}[1]{{\@rubikfont #1{\@rubikfontFNS l}\@rubikprime}} |
| 6334 |
\newcommand{\@rrr}[1]{{\@rubikfont #1{\@rubikfontFNS r}}} |
| 6335 |
\newcommand{\@rrrp}[1]{{\@rubikfont #1{\@rubikfontFNS r}\@rubikprime}} |
| 6336 |
\newcommand{\@rrf}[1]{{\@rubikfont #1{\@rubikfontFNS f}}} |
| 6337 |
\newcommand{\@rrfp}[1]{{\@rubikfont #1{\@rubikfontFNS f}\@rubikprime}} |
| 6338 |
\newcommand{\@rrb}[1]{{\@rubikfont #1{\@rubikfontFNS b}}} |
| 6339 |
\newcommand{\@rrbp}[1]{{\@rubikfont #1{\@rubikfontFNS b}\@rubikprime}} |
| 6340 |
\newcommand{\@rrc}[1]{{\@rubikfont #1{\@rubikfontFNS c}}} |
| 6341 |
\newcommand{\@rrcp}[1]{{\@rubikfont #1{\@rubikfontFNS c}\@rubikprime}} |
| 6342 |
\newcommand{\@rrm}[1]{{\@rubikfont #1{\@rubikfontFNS m}}} |
| 6343 |
\newcommand{\@rrmp}[1]{{\@rubikfont #1{\@rubikfontFNS m}\@rubikprime}} |
| 6344 |
\newcommand{\@xyzh}[1]{[{\@rubikfont #1}]} |
| 6345 |
\newcommand{\@xyzhp}[1]{[{\@rubikfont #1\raisebox{-0.6pt}{\@rubikprime}}]} |
| 6346 |
\newcommand{\@xyzRubik}[1]% |
| 6347 |
{\raisebox{3.45pt}{[{\@rubikfont #1}]}} |
| 6348 |
\newcommand{\@xyzRubikp}[1]% |
| 6349 |
{\raisebox{3.45pt}{[{\@rubikfont #1\raisebox{-0.6pt}{\@rubikprime}}]}} |
| 6350 |
\newcommand{\@xyzhbdfl}[1]% |
| 6351 |
{[\raisebox{-0.6pt}{{\@rubikfont #1}}]} |
| 6352 |
\newcommand{\@xyzhbdflp}[1]% |
| 6353 |
{[\raisebox{-0.6pt}{{\@rubikfont #1\@rubikprime}}]} |
| 6354 |
\newcommand{\@xyzbdflRubik}[1]% |
| 6355 |
{\raisebox{3.45pt}{[\raisebox{-0.6pt}{{\@rubikfont #1}}]}} |
| 6356 |
\newcommand{\@xyzbdflRubikp}[1]% |
| 6357 |
{\raisebox{3.45pt}{[\raisebox{-0.6pt}{{\@rubikfont #1\@rubikprime}}]}} |
| 6358 |
\newcommand{\@SquareLetter}[1]{\setlength{\fboxsep}{2.5pt}% |
| 6359 |
\setlength{\fboxrule}{0.8pt}% |
| 6360 |
\fbox{\rule[-1pt]{0pt}{8.5pt}\raisebox{-0.5pt}{#1}}} |
| 6361 |
\newlength\@hRubik% |
| 6362 |
\setlength{\@hRubik}{0.185cm}% |
| 6363 |
% \end{macrocode} |
| 6364 |
% \end{macro} |
| 6365 |
% \end{macro} |
| 6366 |
% \end{macro} |
| 6367 |
% \end{macro} |
| 6368 |
% \end{macro} |
| 6369 |
% \end{macro} |
| 6370 |
% \end{macro} |
| 6371 |
% \end{macro} |
| 6372 |
% \end{macro} |
| 6373 |
% \end{macro} |
| 6374 |
% \end{macro} |
| 6375 |
% \end{macro} |
| 6376 |
% \end{macro} |
| 6377 |
% \end{macro} |
| 6378 |
% |
| 6379 |
% |
| 6380 |
% |
| 6381 |
% \begin{macro}{\@tlen} |
| 6382 |
% Feb 2017 (RWDN): \ We also need to define a small length for fine-tuning the default |
| 6383 |
% horizontal space between a pair of `letter' hieroglyphs, eg~B (i.e.,~when no |
| 6384 |
% additional space has been added by the user), so that this matches that between a pair of |
| 6385 |
% `arrow' hieroglyphs. This length is inserted on both sides of the square frame. |
| 6386 |
% This length is used in two settings: (a)~in `letter' hieroglyphs (for an example, |
| 6387 |
% see the definition of the macro \cmd{\SquareB} in Section~\ref{sec:coderotationB}), |
| 6388 |
% and in (b)~in `arrow' hieroglyphs (for an example, |
| 6389 |
% see the definition of the macro \cmd{\rrhD} in Section~\ref{sec:coderotationD}). |
| 6390 |
% |
| 6391 |
%\begin{macrocode} |
| 6392 |
\newcommand{\@tlen}{\hspace{1pt}}% |
| 6393 |
% \end{macrocode} |
| 6394 |
% \end{macro} |
| 6395 |
% |
| 6396 |
% |
| 6397 |
% |
| 6398 |
% |
| 6399 |
% \subsubsection{\hspace{3mm}Using {\textbackslash}\texttt{@join}} |
| 6400 |
% \label{sec:cmdsusingjoin} |
| 6401 |
% |
| 6402 |
% |
| 6403 |
% \begin{macro}{\@join} |
| 6404 |
% We also require a macro for joining two strings so we can convert |
| 6405 |
% a rotation-code, say U, into a macro (say, \cmd{\rrhU}) which typesets it in some form. |
| 6406 |
% The following \cmd{\@join\{\}\{\}} command is by Christian Tellechea (many thanks\,!). |
| 6407 |
% {\newline}\textsc{usage}: \cmd{\@join\marg{command-stem}\marg{rotation-code}}. For~example, |
| 6408 |
% to create the command \cmd{\rrhU} we would write |\@join{\rrh}{U}|, and hence |
| 6409 |
% the intuitive command |\rrh{U}| is equivalent to \cmd{\rrhU}. |
| 6410 |
% {\newline}Since this macro is also useful for processing rotation-codes in a list, |
| 6411 |
% which may also include macros, it is important that |#2| is not detokenized. |
| 6412 |
% \begin{macrocode} |
| 6413 |
\newcommand*\@join[2]{% |
| 6414 |
\csname\expandafter\@gobble\string#1#2\endcsname} |
| 6415 |
% \end{macrocode} |
| 6416 |
% The following section shows how this command is used in practice. |
| 6417 |
% \end{macro} |
| 6418 |
% |
| 6419 |
% |
| 6420 |
% |
| 6421 |
% \begin{macro}{\textRubik} |
| 6422 |
% \begin{macro}{\Rubik} |
| 6423 |
% \begin{macro}{\rr} |
| 6424 |
% \begin{macro}{\rrh} |
| 6425 |
% The following four commands typeset a single rotation, where a rotation-code (e.g.,~U) is |
| 6426 |
% the argument (see Section~\ref{sec:typesetting}). As an example, the format for |
| 6427 |
% the \cmd{\rrh\{\}} command is |
| 6428 |
% \cmd{\rrh}\marg{rotation-code}. In practice, these four commands are really a |
| 6429 |
% sort of front-end for all the commands which follow this section. For~example, the |
| 6430 |
% command \cmd{\rrh\{U\}} generates the command \cmd{\rrhU} which itself typesets the |
| 6431 |
% rotation hieroglyph for the rotation~U, etc. |
| 6432 |
% |
| 6433 |
% These four commands, which use the |
| 6434 |
% internal \cmd{\@join} command (see above), are |
| 6435 |
% especially useful when typesetting a list of rotation-codes. |
| 6436 |
% Furthermore, it is more intuitive for the user to specify a rotation command |
| 6437 |
% using the rotation-code as an argument. |
| 6438 |
% \begin{macrocode} |
| 6439 |
\newcommand*{\Rubik}[1]{\@join{\Rubik}{#1}} |
| 6440 |
\newcommand*{\textRubik}[1]{\@join{\textRubik}{#1}} |
| 6441 |
\newcommand*{\rr}[1]{\@join{\rr}{#1}} |
| 6442 |
\newcommand*{\rrh}[1]{\@join{\rrh}{#1}} |
| 6443 |
% \end{macrocode} |
| 6444 |
% \end{macro} |
| 6445 |
% \end{macro} |
| 6446 |
% \end{macro} |
| 6447 |
% \end{macro} |
| 6448 |
% |
| 6449 |
% |
| 6450 |
% |
| 6451 |
% \subsubsection{\hspace{3mm}Rotation B} |
| 6452 |
% \label{sec:coderotationB} |
| 6453 |
% |
| 6454 |
% \begin{macro}{\rrB} |
| 6455 |
% \begin{macro}{\SquareB} |
| 6456 |
% \begin{macro}{\rrhB} |
| 6457 |
% \begin{macro}{\RubikB} |
| 6458 |
% \begin{macro}{\textRubikB} |
| 6459 |
% These commands all draw forms which denote the B (\textsc{back}-face) rotation. |
| 6460 |
% Not visible from the front. |
| 6461 |
% |
| 6462 |
% Feb 2017 (RWDN): added the \cmd{\@tlen} length (= 1pt; defined above) to the |
| 6463 |
% \cmd{\SquareB} command, and removed the terminal \cmd{\,} space |
| 6464 |
% from the rrhB, RubikB, textRubikB commands, and copied |
| 6465 |
% this action with all the subsequent Letter hieroglyphs (e.g.,~B, Bw,..). |
| 6466 |
% These minor changes were to improve the spacing between two Letter hieroglyphs, |
| 6467 |
% and make it match that between two square `arrow' hieroglyphs. |
| 6468 |
% The same changes were made to all the `letter' hieroglyphs. |
| 6469 |
% \begin{macrocode} |
| 6470 |
\newcommand{\rrB}{\@rr{B}} |
| 6471 |
\newcommand{\SquareB}{\@tlen\@SquareLetter{\rrB}\@tlen} |
| 6472 |
\newcommand{\rrhB}{\raisebox{-0.25mm}{\SquareB}} |
| 6473 |
\newcommand{\RubikB}{\raisebox{\@hRubik}{\SquareB}} |
| 6474 |
\newcommand{\textRubikB}{\rrhB} |
| 6475 |
% \end{macrocode} |
| 6476 |
% \end{macro} |
| 6477 |
% \end{macro} |
| 6478 |
% \end{macro} |
| 6479 |
% \end{macro} |
| 6480 |
% \end{macro} |
| 6481 |
% |
| 6482 |
% |
| 6483 |
% \subsubsection{\hspace{3mm}Rotation Bp} |
| 6484 |
% |
| 6485 |
% \begin{macro}{\rrBp} |
| 6486 |
% \begin{macro}{\SquareBp} |
| 6487 |
% \begin{macro}{\rrhBp} |
| 6488 |
% \begin{macro}{\RubikBp} |
| 6489 |
% \begin{macro}{\textRubikBp} |
| 6490 |
% These commands all draw forms which denote the Bp rotation. |
| 6491 |
% Not visible from the front. |
| 6492 |
% \begin{macrocode} |
| 6493 |
\newcommand{\rrBp}{\@rrp{B}} |
| 6494 |
\newcommand{\SquareBp}{\@tlen\@SquareLetter{\rrBp}\@tlen} |
| 6495 |
\newcommand{\rrhBp}{\raisebox{-0.25mm}{\SquareBp}} |
| 6496 |
\newcommand{\RubikBp}{\raisebox{\@hRubik}{\SquareBp}} |
| 6497 |
\newcommand{\textRubikBp}{\rrhBp} |
| 6498 |
% \end{macrocode} |
| 6499 |
% \end{macro} |
| 6500 |
% \end{macro} |
| 6501 |
% \end{macro} |
| 6502 |
% \end{macro} |
| 6503 |
% \end{macro} |
| 6504 |
% |
| 6505 |
% |
| 6506 |
% \subsubsection{\hspace{3mm}Rotation Bw} |
| 6507 |
% \label{sec:coderotationBw} |
| 6508 |
% |
| 6509 |
% \begin{macro}{\rrBw} |
| 6510 |
% \begin{macro}{\SquareBw} |
| 6511 |
% \begin{macro}{\rrhBw} |
| 6512 |
% \begin{macro}{\RubikBw} |
| 6513 |
% \begin{macro}{\textRubikBw} |
| 6514 |
% These commands all draw forms which denote the Bw rotation. |
| 6515 |
% Not visible from the front. |
| 6516 |
% \begin{macrocode} |
| 6517 |
\newcommand{\rrBw}{\@rrw{B}} |
| 6518 |
\newcommand{\SquareBw}{\@tlen\@SquareLetter{\rrBw}\@tlen} |
| 6519 |
\newcommand{\rrhBw}{\raisebox{-0.25mm}{\SquareBw}} |
| 6520 |
\newcommand{\RubikBw}{\raisebox{\@hRubik}{\SquareBw}} |
| 6521 |
\newcommand{\textRubikBw}{\rrhBw} |
| 6522 |
% \end{macrocode} |
| 6523 |
% \end{macro} |
| 6524 |
% \end{macro} |
| 6525 |
% \end{macro} |
| 6526 |
% \end{macro} |
| 6527 |
% \end{macro} |
| 6528 |
% |
| 6529 |
% |
| 6530 |
% \subsubsection{\hspace{3mm}Rotation Bwp} |
| 6531 |
% \label{sec:coderotationBwp} |
| 6532 |
% |
| 6533 |
% \begin{macro}{\rrBwp} |
| 6534 |
% \begin{macro}{\SquareBwp} |
| 6535 |
% \begin{macro}{\rrhBwp} |
| 6536 |
% \begin{macro}{\RubikBwp} |
| 6537 |
% \begin{macro}{\textRubikBwp} |
| 6538 |
% These commands all draw forms which denote the Bwp rotation. |
| 6539 |
% Not visible from the front. |
| 6540 |
% \begin{macrocode} |
| 6541 |
\newcommand{\rrBwp}{\@rrwp{B}} |
| 6542 |
\newcommand{\SquareBwp}{\@tlen\@SquareLetter{\rrBwp}\@tlen} |
| 6543 |
\newcommand{\rrhBwp}{\raisebox{-0.25mm}{\SquareBwp}} |
| 6544 |
\newcommand{\RubikBwp}{\raisebox{\@hRubik}{\SquareBwp}} |
| 6545 |
\newcommand{\textRubikBwp}{\rrhBwp} |
| 6546 |
% \end{macrocode} |
| 6547 |
% \end{macro} |
| 6548 |
% \end{macro} |
| 6549 |
% \end{macro} |
| 6550 |
% \end{macro} |
| 6551 |
% \end{macro} |
| 6552 |
% |
| 6553 |
% |
| 6554 |
% \subsubsection{\hspace{3mm}Rotation Bs} |
| 6555 |
% |
| 6556 |
% \begin{macro}{\rrBs} |
| 6557 |
% \begin{macro}{\SquareBs} |
| 6558 |
% \begin{macro}{\rrhBs} |
| 6559 |
% \begin{macro}{\RubikBs} |
| 6560 |
% \begin{macro}{\textRubikBs} |
| 6561 |
% These commands all draw forms which denote the Bs rotation. |
| 6562 |
% Not visible from the front. |
| 6563 |
% \begin{macrocode} |
| 6564 |
\newcommand{\rrBs}{\@rrs{B}} |
| 6565 |
\newcommand{\SquareBs}{\@tlen\@SquareLetter{\rrBs}\@tlen} |
| 6566 |
\newcommand{\rrhBs}{\raisebox{-0.25mm}{\SquareBs}} |
| 6567 |
\newcommand{\RubikBs}{\raisebox{\@hRubik}{\SquareBs}} |
| 6568 |
\newcommand{\textRubikBs}{\rrhBs} |
| 6569 |
% \end{macrocode} |
| 6570 |
% \end{macro} |
| 6571 |
% \end{macro} |
| 6572 |
% \end{macro} |
| 6573 |
% \end{macro} |
| 6574 |
% \end{macro} |
| 6575 |
% |
| 6576 |
% |
| 6577 |
% \subsubsection{\hspace{3mm}Rotation Bsp} |
| 6578 |
% |
| 6579 |
% \begin{macro}{\rrBsp} |
| 6580 |
% \begin{macro}{\SquareBsp} |
| 6581 |
% \begin{macro}{\rrhBsp} |
| 6582 |
% \begin{macro}{\RubikBsp} |
| 6583 |
% \begin{macro}{\textRubikBsp} |
| 6584 |
% These commands all draw forms which denote the Bsp rotation. |
| 6585 |
% Not visible from the front. |
| 6586 |
% \begin{macrocode} |
| 6587 |
\newcommand{\rrBsp}{\@rrsp{B}} |
| 6588 |
\newcommand{\SquareBsp}{\@tlen\@SquareLetter{\rrBsp}\@tlen} |
| 6589 |
\newcommand{\rrhBsp}{\raisebox{-0.25mm}{\SquareBsp}} |
| 6590 |
\newcommand{\RubikBsp}{\raisebox{\@hRubik}{\SquareBsp}} |
| 6591 |
\newcommand{\textRubikBsp}{\rrhBsp} |
| 6592 |
% \end{macrocode} |
| 6593 |
% \end{macro} |
| 6594 |
% \end{macro} |
| 6595 |
% \end{macro} |
| 6596 |
% \end{macro} |
| 6597 |
% \end{macro} |
| 6598 |
% |
| 6599 |
% |
| 6600 |
% \subsubsection{\hspace{3mm}Rotation Ba} |
| 6601 |
% |
| 6602 |
% \begin{macro}{\rrBa} |
| 6603 |
% \begin{macro}{\SquareBa} |
| 6604 |
% \begin{macro}{\rrhBa} |
| 6605 |
% \begin{macro}{\RubikBa} |
| 6606 |
% \begin{macro}{\textRubikBa} |
| 6607 |
% These commands all draw forms which denote the Ba rotation. |
| 6608 |
% Not visible from the front. |
| 6609 |
% \begin{macrocode} |
| 6610 |
\newcommand{\rrBa}{\@rra{B}} |
| 6611 |
\newcommand{\SquareBa}{\@tlen\@SquareLetter{\rrBa}\@tlen} |
| 6612 |
\newcommand{\rrhBa}{\raisebox{-0.25mm}{\SquareBa}} |
| 6613 |
\newcommand{\RubikBa}{\raisebox{\@hRubik}{\SquareBa}} |
| 6614 |
\newcommand{\textRubikBa}{\rrhBa} |
| 6615 |
% \end{macrocode} |
| 6616 |
% \end{macro} |
| 6617 |
% \end{macro} |
| 6618 |
% \end{macro} |
| 6619 |
% \end{macro} |
| 6620 |
% \end{macro} |
| 6621 |
% |
| 6622 |
% |
| 6623 |
% \subsubsection{\hspace{3mm}Rotation Bap} |
| 6624 |
% |
| 6625 |
% \begin{macro}{\rrBap} |
| 6626 |
% \begin{macro}{\SquareBap} |
| 6627 |
% \begin{macro}{\rrhBap} |
| 6628 |
% \begin{macro}{\RubikBap} |
| 6629 |
% \begin{macro}{\textRubikBap} |
| 6630 |
% These commands all draw forms which denote the Bap rotation. |
| 6631 |
% Not visible from the front. |
| 6632 |
% \begin{macrocode} |
| 6633 |
\newcommand{\rrBap}{\@rrap{B}} |
| 6634 |
\newcommand{\SquareBap}{\@tlen\@SquareLetter{\rrBap}\@tlen} |
| 6635 |
\newcommand{\rrhBap}{\raisebox{-0.25mm}{\SquareBap}} |
| 6636 |
\newcommand{\RubikBap}{\raisebox{\@hRubik}{\SquareBap}} |
| 6637 |
\newcommand{\textRubikBap}{\rrhBap} |
| 6638 |
% \end{macrocode} |
| 6639 |
% \end{macro} |
| 6640 |
% \end{macro} |
| 6641 |
% \end{macro} |
| 6642 |
% \end{macro} |
| 6643 |
% \end{macro} |
| 6644 |
% |
| 6645 |
% |
| 6646 |
% \subsubsection{\hspace{3mm}Rotation D} |
| 6647 |
% \label{sec:coderotationD} |
| 6648 |
% |
| 6649 |
% \begin{macro}{\rrD} |
| 6650 |
% \begin{macro}{\SquareD} |
| 6651 |
% \begin{macro}{\rrhD} |
| 6652 |
% \begin{macro}{\RubikD} |
| 6653 |
% \begin{macro}{\textRubikD} |
| 6654 |
% These commands all draw forms which denote the D rotation. |
| 6655 |
% |
| 6656 |
% Feb 2017 (RWDN): \ added the \cmd{\@tlen} length to the \cmd{\rrhD} command to improve the |
| 6657 |
% spacing between two `arrow' square hieroglyphs; and also removed the terminal \cmd{\,} |
| 6658 |
% space. The same changes were made to all the `arrow' hieroglyphs. |
| 6659 |
% \begin{macrocode} |
| 6660 |
\newcommand{\rrD}{\@rr{D}} |
| 6661 |
%% |
| 6662 |
\newcommand{\SquareD}{% |
| 6663 |
\begin{tikzpicture}[scale=0.5] |
| 6664 |
\DrawNotationBox; |
| 6665 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6666 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6667 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6668 |
\end{tikzpicture}% |
| 6669 |
} |
| 6670 |
\newcommand{\rrhD}{\raisebox{-0.333\height}{\@tlen\SquareD\@tlen}} |
| 6671 |
%% |
| 6672 |
\newcommand{\RubikD}{% |
| 6673 |
{\@rubikfont% |
| 6674 |
\begin{minipage}{0.6cm} |
| 6675 |
\centering% |
| 6676 |
\SquareD\\ |
| 6677 |
\rrD% |
| 6678 |
\end{minipage}% |
| 6679 |
}} |
| 6680 |
\newcommand{\textRubikD}{\rrD\,\rrhD} |
| 6681 |
% \end{macrocode} |
| 6682 |
% \end{macro} |
| 6683 |
% \end{macro} |
| 6684 |
% \end{macro} |
| 6685 |
% \end{macro} |
| 6686 |
% \end{macro} |
| 6687 |
% |
| 6688 |
% |
| 6689 |
% \subsubsection{\hspace{3mm}Rotation Dp} |
| 6690 |
% |
| 6691 |
% \begin{macro}{\rrDp} |
| 6692 |
% \begin{macro}{\SquareDp} |
| 6693 |
% \begin{macro}{\rrhDp} |
| 6694 |
% \begin{macro}{\RubikDp} |
| 6695 |
% \begin{macro}{\textRubikDp} |
| 6696 |
% These commands all draw forms which denote the Dp rotation. |
| 6697 |
% \begin{macrocode} |
| 6698 |
\newcommand{\rrDp}{\@rrp{D}} |
| 6699 |
%% |
| 6700 |
\newcommand{\SquareDp}{% |
| 6701 |
\begin{tikzpicture}[scale=0.5] |
| 6702 |
\DrawNotationBox; |
| 6703 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6704 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6705 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6706 |
\end{tikzpicture}% |
| 6707 |
} |
| 6708 |
\newcommand{\rrhDp}{\raisebox{-0.333\height}{\@tlen\SquareDp\@tlen}} |
| 6709 |
%% |
| 6710 |
\newcommand{\RubikDp}{% |
| 6711 |
{\@rubikfont% |
| 6712 |
\begin{minipage}{0.6cm} |
| 6713 |
\centering% |
| 6714 |
\SquareDp\\ |
| 6715 |
\rrDp% |
| 6716 |
\end{minipage}% |
| 6717 |
}} |
| 6718 |
\newcommand{\textRubikDp}{\rrDp\,\rrhDp} |
| 6719 |
% \end{macrocode} |
| 6720 |
% \end{macro} |
| 6721 |
% \end{macro} |
| 6722 |
% \end{macro} |
| 6723 |
% \end{macro} |
| 6724 |
% \end{macro} |
| 6725 |
% |
| 6726 |
% |
| 6727 |
% \subsubsection{\hspace{3mm}Rotation Dw} |
| 6728 |
% |
| 6729 |
% \begin{macro}{\rrDw} |
| 6730 |
% \begin{macro}{\SquareDw} |
| 6731 |
% \begin{macro}{\rrhDw} |
| 6732 |
% \begin{macro}{\RubikDw} |
| 6733 |
% \begin{macro}{\textRubikDw} |
| 6734 |
% These commands all draw forms which denote the Dw rotation. |
| 6735 |
% \begin{macrocode} |
| 6736 |
\newcommand{\rrDw}{\@rrw{D}} |
| 6737 |
%% |
| 6738 |
\newcommand{\SquareDw}{% |
| 6739 |
\begin{tikzpicture}[scale=0.5] |
| 6740 |
\DrawNotationBox; |
| 6741 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6742 |
\draw [thick, ->] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6743 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6744 |
\end{tikzpicture}% |
| 6745 |
} |
| 6746 |
\newcommand{\rrhDw}{\raisebox{-0.333\height}{\@tlen\SquareDw\@tlen}} |
| 6747 |
%% |
| 6748 |
\newcommand{\RubikDw}{% |
| 6749 |
{\@rubikfont% |
| 6750 |
\begin{minipage}{0.6cm} |
| 6751 |
\centering% |
| 6752 |
\SquareDw\\ |
| 6753 |
\rrDw% |
| 6754 |
\end{minipage}% |
| 6755 |
}} |
| 6756 |
\newcommand{\textRubikDw}{\rrDw\,\rrhDw} |
| 6757 |
% \end{macrocode} |
| 6758 |
% \end{macro} |
| 6759 |
% \end{macro} |
| 6760 |
% \end{macro} |
| 6761 |
% \end{macro} |
| 6762 |
% \end{macro} |
| 6763 |
% |
| 6764 |
% |
| 6765 |
% \subsubsection{\hspace{3mm}Rotation Dwp} |
| 6766 |
% |
| 6767 |
% \begin{macro}{\rrDwp} |
| 6768 |
% \begin{macro}{\SquareDwp} |
| 6769 |
% \begin{macro}{\rrhDwp} |
| 6770 |
% \begin{macro}{\RubikDwp} |
| 6771 |
% \begin{macro}{\textRubikDwp} |
| 6772 |
% These commands all draw forms which denote the Dwp rotation. |
| 6773 |
% \begin{macrocode} |
| 6774 |
\newcommand{\rrDwp}{\@rrwp{D}} |
| 6775 |
%% |
| 6776 |
\newcommand{\SquareDwp}{% |
| 6777 |
\begin{tikzpicture}[scale=0.5] |
| 6778 |
\DrawNotationBox; |
| 6779 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6780 |
\draw [thick, <-] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6781 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6782 |
\end{tikzpicture}% |
| 6783 |
} |
| 6784 |
\newcommand{\rrhDwp}{\raisebox{-0.333\height}{\@tlen\SquareDwp\@tlen}} |
| 6785 |
%% |
| 6786 |
\newcommand{\RubikDwp}{% |
| 6787 |
{\@rubikfont% |
| 6788 |
\begin{minipage}{0.6cm} |
| 6789 |
\centering% |
| 6790 |
\SquareDwp\\ |
| 6791 |
\rrDwp% |
| 6792 |
\end{minipage}% |
| 6793 |
}} |
| 6794 |
\newcommand{\textRubikDwp}{\rrDwp\,\rrhDwp} |
| 6795 |
% \end{macrocode} |
| 6796 |
% \end{macro} |
| 6797 |
% \end{macro} |
| 6798 |
% \end{macro} |
| 6799 |
% \end{macro} |
| 6800 |
% \end{macro} |
| 6801 |
% |
| 6802 |
% |
| 6803 |
% \subsubsection{\hspace{3mm}Rotation Ds} |
| 6804 |
% |
| 6805 |
% \begin{macro}{\rrDs} |
| 6806 |
% \begin{macro}{\SquareDs} |
| 6807 |
% \begin{macro}{\rrhDs} |
| 6808 |
% \begin{macro}{\RubikDs} |
| 6809 |
% \begin{macro}{\textRubikDs} |
| 6810 |
% These commands all draw forms which denote the Ds rotation. |
| 6811 |
% \begin{macrocode} |
| 6812 |
\newcommand{\rrDs}{\@rrs{D}} |
| 6813 |
%% |
| 6814 |
\newcommand{\SquareDs}{% |
| 6815 |
\begin{tikzpicture}[scale=0.5] |
| 6816 |
\DrawNotationBox; |
| 6817 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6818 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6819 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6820 |
\end{tikzpicture}% |
| 6821 |
} |
| 6822 |
\newcommand{\rrhDs}{\raisebox{-0.333\height}{\@tlen\SquareDs\@tlen}} |
| 6823 |
%% |
| 6824 |
\newcommand{\RubikDs}{% |
| 6825 |
{\@rubikfont% |
| 6826 |
\begin{minipage}{0.6cm} |
| 6827 |
\centering% |
| 6828 |
\SquareDs\\ |
| 6829 |
\rrDs% |
| 6830 |
\end{minipage}% |
| 6831 |
}} |
| 6832 |
\newcommand{\textRubikDs}{\rrDs\,\rrhDs} |
| 6833 |
% \end{macrocode} |
| 6834 |
% \end{macro} |
| 6835 |
% \end{macro} |
| 6836 |
% \end{macro} |
| 6837 |
% \end{macro} |
| 6838 |
% \end{macro} |
| 6839 |
% |
| 6840 |
% |
| 6841 |
% \subsubsection{\hspace{3mm}Rotation Dsp} |
| 6842 |
% |
| 6843 |
% \begin{macro}{\rrDsp} |
| 6844 |
% \begin{macro}{\SquareDsp} |
| 6845 |
% \begin{macro}{\rrhDsp} |
| 6846 |
% \begin{macro}{\RubikDsp} |
| 6847 |
% \begin{macro}{\textRubikDsp} |
| 6848 |
% These commands all draw forms which denote the Dsp rotation. |
| 6849 |
% \begin{macrocode} |
| 6850 |
\newcommand{\rrDsp}{\@rrsp{D}} |
| 6851 |
%% |
| 6852 |
\newcommand{\SquareDsp}{% |
| 6853 |
\begin{tikzpicture}[scale=0.5] |
| 6854 |
\DrawNotationBox; |
| 6855 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6856 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6857 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6858 |
\end{tikzpicture}% |
| 6859 |
} |
| 6860 |
\newcommand{\rrhDsp}{\raisebox{-0.333\height}{\@tlen\SquareDsp\@tlen}} |
| 6861 |
%% |
| 6862 |
\newcommand{\RubikDsp}{% |
| 6863 |
{\@rubikfont% |
| 6864 |
\begin{minipage}{0.6cm} |
| 6865 |
\centering% |
| 6866 |
\SquareDsp\\ |
| 6867 |
\rrDsp% |
| 6868 |
\end{minipage}% |
| 6869 |
}} |
| 6870 |
\newcommand{\textRubikDsp}{\rrDsp\,\rrhDsp} |
| 6871 |
% \end{macrocode} |
| 6872 |
% \end{macro} |
| 6873 |
% \end{macro} |
| 6874 |
% \end{macro} |
| 6875 |
% \end{macro} |
| 6876 |
% \end{macro} |
| 6877 |
% |
| 6878 |
% |
| 6879 |
% \subsubsection{\hspace{3mm}Rotation Da} |
| 6880 |
% |
| 6881 |
% \begin{macro}{\rrDa} |
| 6882 |
% \begin{macro}{\SquareDa} |
| 6883 |
% \begin{macro}{\rrhDa} |
| 6884 |
% \begin{macro}{\RubikDa} |
| 6885 |
% \begin{macro}{\textRubikDa} |
| 6886 |
% These commands all draw forms which denote the Da rotation. |
| 6887 |
% \begin{macrocode} |
| 6888 |
\newcommand{\rrDa}{\@rra{D}} |
| 6889 |
%% |
| 6890 |
\newcommand{\SquareDa}{% |
| 6891 |
\begin{tikzpicture}[scale=0.5] |
| 6892 |
\DrawNotationBox; |
| 6893 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6894 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6895 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6896 |
\end{tikzpicture}% |
| 6897 |
} |
| 6898 |
\newcommand{\rrhDa}{\raisebox{-0.333\height}{\@tlen\SquareDa\@tlen}} |
| 6899 |
%% |
| 6900 |
\newcommand{\RubikDa}{% |
| 6901 |
{\@rubikfont% |
| 6902 |
\begin{minipage}{0.6cm} |
| 6903 |
\centering% |
| 6904 |
\SquareDa\\ |
| 6905 |
\rrDa% |
| 6906 |
\end{minipage}% |
| 6907 |
}} |
| 6908 |
\newcommand{\textRubikDa}{\rrDa\,\rrhDa} |
| 6909 |
% \end{macrocode} |
| 6910 |
% \end{macro} |
| 6911 |
% \end{macro} |
| 6912 |
% \end{macro} |
| 6913 |
% \end{macro} |
| 6914 |
% \end{macro} |
| 6915 |
% |
| 6916 |
% |
| 6917 |
% \subsubsection{\hspace{3mm}Rotation Dap} |
| 6918 |
% |
| 6919 |
% \begin{macro}{\rrDap} |
| 6920 |
% \begin{macro}{\SquareDap} |
| 6921 |
% \begin{macro}{\rrhDap} |
| 6922 |
% \begin{macro}{\RubikDap} |
| 6923 |
% \begin{macro}{\textRubikDap} |
| 6924 |
% These commands all draw forms which denote the Dap rotation. |
| 6925 |
% \begin{macrocode} |
| 6926 |
\newcommand{\rrDap}{\@rrap{D}} |
| 6927 |
%% |
| 6928 |
\newcommand{\SquareDap}{% |
| 6929 |
\begin{tikzpicture}[scale=0.5] |
| 6930 |
\DrawNotationBox; |
| 6931 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6932 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6933 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6934 |
\end{tikzpicture}% |
| 6935 |
} |
| 6936 |
\newcommand{\rrhDap}{\raisebox{-0.333\height}{\@tlen\SquareDap\@tlen}} |
| 6937 |
%% |
| 6938 |
\newcommand{\RubikDap}{% |
| 6939 |
{\@rubikfont% |
| 6940 |
\begin{minipage}{0.6cm} |
| 6941 |
\centering% |
| 6942 |
\SquareDap\\ |
| 6943 |
\rrDap% |
| 6944 |
\end{minipage}% |
| 6945 |
}} |
| 6946 |
\newcommand{\textRubikDap}{\rrDap\,\rrhDap} |
| 6947 |
% \end{macrocode} |
| 6948 |
% \end{macro} |
| 6949 |
% \end{macro} |
| 6950 |
% \end{macro} |
| 6951 |
% \end{macro} |
| 6952 |
% \end{macro} |
| 6953 |
% |
| 6954 |
% |
| 6955 |
% \subsubsection{\hspace{3mm}Rotation E} |
| 6956 |
% |
| 6957 |
% \begin{macro}{\rrE} |
| 6958 |
% \begin{macro}{\SquareE} |
| 6959 |
% \begin{macro}{\rrhE} |
| 6960 |
% \begin{macro}{\RubikE} |
| 6961 |
% \begin{macro}{\textRubikE} |
| 6962 |
% These commands all draw forms which denote the E rotation. |
| 6963 |
% \begin{macrocode} |
| 6964 |
\newcommand{\rrE}{\@rr{E}} |
| 6965 |
%% |
| 6966 |
\newcommand{\SquareE}{% |
| 6967 |
\begin{tikzpicture}[scale=0.5] |
| 6968 |
\DrawNotationBox; |
| 6969 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 6970 |
\draw [thick, ->] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 6971 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 6972 |
\end{tikzpicture}% |
| 6973 |
} |
| 6974 |
\newcommand{\rrhE}{\raisebox{-0.333\height}{\@tlen\SquareE\@tlen}} |
| 6975 |
%% |
| 6976 |
\newcommand{\RubikE}{% |
| 6977 |
{\@rubikfont% |
| 6978 |
\begin{minipage}{0.6cm} |
| 6979 |
\centering% |
| 6980 |
\SquareE\\ |
| 6981 |
\rrE% |
| 6982 |
\end{minipage}% |
| 6983 |
}} |
| 6984 |
\newcommand{\textRubikE}{\rrE\,\rrhE} |
| 6985 |
% \end{macrocode} |
| 6986 |
% \end{macro} |
| 6987 |
% \end{macro} |
| 6988 |
% \end{macro} |
| 6989 |
% \end{macro} |
| 6990 |
% \end{macro} |
| 6991 |
% |
| 6992 |
% |
| 6993 |
% \subsubsection{\hspace{3mm}Rotation Ep} |
| 6994 |
% |
| 6995 |
% \begin{macro}{\rrEp} |
| 6996 |
% \begin{macro}{\SquareEp} |
| 6997 |
% \begin{macro}{\rrhEp} |
| 6998 |
% \begin{macro}{\RubikEp} |
| 6999 |
% \begin{macro}{\textRubikEp} |
| 7000 |
% These commands all draw forms which denote the Ep rotation. |
| 7001 |
% \begin{macrocode} |
| 7002 |
\newcommand{\rrEp}{\@rrp{E}} |
| 7003 |
%% |
| 7004 |
\newcommand{\SquareEp}{% |
| 7005 |
\begin{tikzpicture}[scale=0.5] |
| 7006 |
\DrawNotationBox; |
| 7007 |
\draw [thick] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 7008 |
\draw [thick, <-] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 7009 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 7010 |
\end{tikzpicture}% |
| 7011 |
} |
| 7012 |
\newcommand{\rrhEp}{\raisebox{-0.333\height}{\@tlen\SquareEp\@tlen}} |
| 7013 |
%% |
| 7014 |
\newcommand{\RubikEp}{% |
| 7015 |
{\@rubikfont% |
| 7016 |
\begin{minipage}{0.6cm} |
| 7017 |
\centering% |
| 7018 |
\SquareEp\\ |
| 7019 |
\rrEp% |
| 7020 |
\end{minipage}% |
| 7021 |
}} |
| 7022 |
\newcommand{\textRubikEp}{\rrEp\,\rrhEp} |
| 7023 |
% \end{macrocode} |
| 7024 |
% \end{macro} |
| 7025 |
% \end{macro} |
| 7026 |
% \end{macro} |
| 7027 |
% \end{macro} |
| 7028 |
% \end{macro} |
| 7029 |
% |
| 7030 |
% |
| 7031 |
% \subsubsection{\hspace{3mm}Rotation F} |
| 7032 |
% |
| 7033 |
% \begin{macro}{\rrF} |
| 7034 |
% \begin{macro}{\SquareF} |
| 7035 |
% \begin{macro}{\rrhF} |
| 7036 |
% \begin{macro}{\RubikF} |
| 7037 |
% \begin{macro}{\textRubikF} |
| 7038 |
% These commands all draw forms which denote the F rotation. |
| 7039 |
% \begin{macrocode} |
| 7040 |
\newcommand{\rrF}{\@rr{F}} |
| 7041 |
%% |
| 7042 |
\newcommand{\SquareF}{% |
| 7043 |
\begin{tikzpicture}[scale=0.5] |
| 7044 |
\DrawNotationBox; |
| 7045 |
\draw [thick, <-] (\@scx, \@scy) arc[radius=0.35, start angle=-60, delta angle=290]; |
| 7046 |
\end{tikzpicture}% |
| 7047 |
} |
| 7048 |
\newcommand{\rrhF}{\raisebox{-0.333\height}{\@tlen\SquareF\@tlen}} |
| 7049 |
%% |
| 7050 |
\newcommand{\RubikF}{% |
| 7051 |
{\@rubikfont% |
| 7052 |
\begin{minipage}{0.6cm} |
| 7053 |
\centering% |
| 7054 |
\SquareF\\ |
| 7055 |
\rrF% |
| 7056 |
\end{minipage}% |
| 7057 |
}} |
| 7058 |
\newcommand{\textRubikF}{\rrF\,\rrhF} |
| 7059 |
% \end{macrocode} |
| 7060 |
% \end{macro} |
| 7061 |
% \end{macro} |
| 7062 |
% \end{macro} |
| 7063 |
% \end{macro} |
| 7064 |
% \end{macro} |
| 7065 |
% |
| 7066 |
% |
| 7067 |
% \subsubsection{\hspace{3mm}Rotation Fp} |
| 7068 |
% |
| 7069 |
% \begin{macro}{\rrFp} |
| 7070 |
% \begin{macro}{\SquareFp} |
| 7071 |
% \begin{macro}{\rrhFp} |
| 7072 |
% \begin{macro}{\RubikFp} |
| 7073 |
% \begin{macro}{\textRubikFp} |
| 7074 |
% These commands all draw forms which denote the Fp rotation. |
| 7075 |
% \begin{macrocode} |
| 7076 |
\newcommand{\rrFp}{\@rrp{F}} |
| 7077 |
%% |
| 7078 |
\newcommand{\SquareFp}{% |
| 7079 |
\begin{tikzpicture}[scale=0.5] |
| 7080 |
\DrawNotationBox; |
| 7081 |
\draw [thick, ->] (\@scx, \@scy) arc[radius=0.35, start angle=-60, delta angle=290]; |
| 7082 |
\end{tikzpicture}% |
| 7083 |
} |
| 7084 |
\newcommand{\rrhFp}{\raisebox{-0.333\height}{\@tlen\SquareFp\@tlen}} |
| 7085 |
%% |
| 7086 |
\newcommand{\RubikFp}{% |
| 7087 |
{\@rubikfont% |
| 7088 |
\begin{minipage}{0.6cm} |
| 7089 |
\centering% |
| 7090 |
\SquareFp\\ |
| 7091 |
\rrFp% |
| 7092 |
\end{minipage}% |
| 7093 |
}} |
| 7094 |
\newcommand{\textRubikFp}{\rrFp\,\rrhFp} |
| 7095 |
% \end{macrocode} |
| 7096 |
% \end{macro} |
| 7097 |
% \end{macro} |
| 7098 |
% \end{macro} |
| 7099 |
% \end{macro} |
| 7100 |
% \end{macro} |
| 7101 |
% |
| 7102 |
% |
| 7103 |
% \subsubsection{\hspace{3mm}Rotation Fw} |
| 7104 |
% |
| 7105 |
% \begin{macro}{\rrFw} |
| 7106 |
% \begin{macro}{\SquareFw} |
| 7107 |
% \begin{macro}{\rrhFw} |
| 7108 |
% \begin{macro}{\RubikFw} |
| 7109 |
% \begin{macro}{\textRubikFw} |
| 7110 |
% These commands all draw forms which denote the Fw rotation. |
| 7111 |
% \begin{macrocode} |
| 7112 |
\newcommand{\rrFw}{\@rrw{F}} |
| 7113 |
%% |
| 7114 |
\newcommand{\SquareFw}{% |
| 7115 |
\begin{tikzpicture}[scale=0.5] |
| 7116 |
\DrawNotationBox; |
| 7117 |
\draw [thick, <-] (\@scx, \@scy) arc[radius=0.35, start angle=-60, delta angle=290]; |
| 7118 |
\draw [thick] (\@sqcx,\@sqcy) arc[radius=0.1, start angle=-60, delta angle=360]; |
| 7119 |
%\node (squareLab) at (0.5,0.5) {$o$}; |
| 7120 |
\end{tikzpicture}% |
| 7121 |
} |
| 7122 |
\newcommand{\rrhFw}{\raisebox{-0.333\height}{\@tlen\SquareFw\@tlen}} |
| 7123 |
%% |
| 7124 |
\newcommand{\RubikFw}{% |
| 7125 |
{\@rubikfont% |
| 7126 |
\begin{minipage}{0.6cm} |
| 7127 |
\centering% |
| 7128 |
\SquareFw\\ |
| 7129 |
\rrFw% |
| 7130 |
\end{minipage}% |
| 7131 |
}} |
| 7132 |
\newcommand{\textRubikFw}{\rrFw\,\rrhFw} |
| 7133 |
% \end{macrocode} |
| 7134 |
% \end{macro} |
| 7135 |
% \end{macro} |
| 7136 |
% \end{macro} |
| 7137 |
% \end{macro} |
| 7138 |
% \end{macro} |
| 7139 |
% |
| 7140 |
% |
| 7141 |
% \subsubsection{\hspace{3mm}Rotation Fwp} |
| 7142 |
% |
| 7143 |
% \begin{macro}{\rrFwp} |
| 7144 |
% \begin{macro}{\SquareFwp} |
| 7145 |
% \begin{macro}{\rrhFwp} |
| 7146 |
% \begin{macro}{\RubikFwp} |
| 7147 |
% \begin{macro}{\textRubikFwp} |
| 7148 |
% These commands all draw forms which denote the Fwp rotation. |
| 7149 |
% \begin{macrocode} |
| 7150 |
\newcommand{\rrFwp}{\@rrwp{F}} |
| 7151 |
%% |
| 7152 |
\newcommand{\SquareFwp}{% |
| 7153 |
\begin{tikzpicture}[scale=0.5] |
| 7154 |
\DrawNotationBox; |
| 7155 |
\draw [thick, ->] (\@scx, \@scy) arc[radius=0.35, start angle=-60, delta angle=290]; |
| 7156 |
\draw [thick] (\@sqcx,\@sqcy) arc[radius=0.1, start angle=-60, delta angle=360]; |
| 7157 |
\end{tikzpicture}% |
| 7158 |
} |
| 7159 |
\newcommand{\rrhFwp}{\raisebox{-0.333\height}{\@tlen\SquareFwp\@tlen}} |
| 7160 |
%% |
| 7161 |
\newcommand{\RubikFwp}{% |
| 7162 |
{\@rubikfont% |
| 7163 |
\begin{minipage}{0.6cm} |
| 7164 |
\centering% |
| 7165 |
\SquareFwp\\ |
| 7166 |
\rrFwp% |
| 7167 |
\end{minipage}% |
| 7168 |
}} |
| 7169 |
\newcommand{\textRubikFwp}{\rrFwp\,\rrhFwp} |
| 7170 |
%% |
| 7171 |
% \end{macrocode} |
| 7172 |
% \end{macro} |
| 7173 |
% \end{macro} |
| 7174 |
% \end{macro} |
| 7175 |
% \end{macro} |
| 7176 |
% \end{macro} |
| 7177 |
% |
| 7178 |
% |
| 7179 |
% \subsubsection{\hspace{3mm}Rotation Fs} |
| 7180 |
% |
| 7181 |
% \begin{macro}{\rrFs} |
| 7182 |
% \begin{macro}{\rrhFs} |
| 7183 |
% \begin{macro}{\RubikFs} |
| 7184 |
% \begin{macro}{\textRubikFs} |
| 7185 |
% These commands draw forms of the Singmaster Fs slice rotation. |
| 7186 |
% We need to just make square with Fs in square; |
| 7187 |
% adjust box height using a \cmd{\rule}; |
| 7188 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 7189 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 7190 |
% bounded by \{\} so no need to reset to defaults. |
| 7191 |
% Not visible from the front. |
| 7192 |
% \begin{macrocode} |
| 7193 |
\newcommand{\rrFs}{\@rrs{F}} |
| 7194 |
\newcommand{\SquareFs}{\@tlen\@SquareLetter{\rrFs}\@tlen} |
| 7195 |
\newcommand{\rrhFs}{\raisebox{-0.25mm}{\SquareFs}} |
| 7196 |
\newcommand{\RubikFs}{\raisebox{\@hRubik}{\SquareFs}} |
| 7197 |
\newcommand{\textRubikFs}{\rrhFs} |
| 7198 |
% \end{macrocode} |
| 7199 |
% \end{macro} |
| 7200 |
% \end{macro} |
| 7201 |
% \end{macro} |
| 7202 |
% \end{macro} |
| 7203 |
% |
| 7204 |
% |
| 7205 |
% \subsubsection{\hspace{3mm}Rotation Fsp} |
| 7206 |
% |
| 7207 |
% \begin{macro}{\rrFsp} |
| 7208 |
% \begin{macro}{\rrhFsp} |
| 7209 |
% \begin{macro}{\RubikFsp} |
| 7210 |
% \begin{macro}{\textRubikFsp} |
| 7211 |
% These commands draw forms of the Singmaster Fsp slice rotation. |
| 7212 |
% We need to just make square with Fsp in square; |
| 7213 |
% adjust box height using a \cmd{\rule}; |
| 7214 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 7215 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 7216 |
% bounded by \{\} so no need to reset to defaults. |
| 7217 |
% Not visible from the front. |
| 7218 |
% \begin{macrocode} |
| 7219 |
\newcommand{\rrFsp}{\@rrsp{F}} |
| 7220 |
\newcommand{\SquareFsp}{\@tlen\@SquareLetter{\rrFsp}\@tlen} |
| 7221 |
\newcommand{\rrhFsp}{\raisebox{-0.25mm}{\SquareFsp}} |
| 7222 |
\newcommand{\RubikFsp}{\raisebox{\@hRubik}{\SquareFsp}} |
| 7223 |
\newcommand{\textRubikFsp}{\rrhFsp} |
| 7224 |
% \end{macrocode} |
| 7225 |
% \end{macro} |
| 7226 |
% \end{macro} |
| 7227 |
% \end{macro} |
| 7228 |
% \end{macro} |
| 7229 |
% |
| 7230 |
% |
| 7231 |
% \subsubsection{\hspace{3mm}Rotation Fa} |
| 7232 |
% |
| 7233 |
% \begin{macro}{\rrFa} |
| 7234 |
% \begin{macro}{\rrhFa} |
| 7235 |
% \begin{macro}{\RubikFa} |
| 7236 |
% \begin{macro}{\textRubikFa} |
| 7237 |
% These commands draw forms of the Singmaster Fa slice rotation. |
| 7238 |
% We need to just make square with Fa in square; |
| 7239 |
% adjust box height using a \cmd{\rule}; |
| 7240 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 7241 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 7242 |
% bounded by \{\} so no need to reset to defaults. |
| 7243 |
% Not visible from the front. |
| 7244 |
% \begin{macrocode} |
| 7245 |
\newcommand{\rrFa}{\@rra{F}} |
| 7246 |
\newcommand{\SquareFa}{\@tlen\@SquareLetter{\rrFa}\@tlen} |
| 7247 |
\newcommand{\rrhFa}{\raisebox{-0.25mm}{\SquareFa}} |
| 7248 |
\newcommand{\RubikFa}{\raisebox{\@hRubik}{\SquareFa}} |
| 7249 |
\newcommand{\textRubikFa}{\rrhFa} |
| 7250 |
% \end{macrocode} |
| 7251 |
% \end{macro} |
| 7252 |
% \end{macro} |
| 7253 |
% \end{macro} |
| 7254 |
% \end{macro} |
| 7255 |
% |
| 7256 |
% |
| 7257 |
% \subsubsection{\hspace{3mm}Rotation Fap} |
| 7258 |
% |
| 7259 |
% \begin{macro}{\rrFap} |
| 7260 |
% \begin{macro}{\rrhFap} |
| 7261 |
% \begin{macro}{\RubikFap} |
| 7262 |
% \begin{macro}{\textRubikFap} |
| 7263 |
% These commands draw forms of the Singmaster Fap slice rotation. |
| 7264 |
% We need to just make square with Fap in square; |
| 7265 |
% adjust box height using a \cmd{\rule}; |
| 7266 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 7267 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 7268 |
% bounded by \{\} so no need to reset to defaults. |
| 7269 |
% Not visible from the front. |
| 7270 |
% \begin{macrocode} |
| 7271 |
\newcommand{\rrFap}{\@rrap{F}} |
| 7272 |
\newcommand{\SquareFap}{\@tlen\@SquareLetter{\rrFap}\@tlen} |
| 7273 |
\newcommand{\rrhFap}{\raisebox{-0.25mm}{\SquareFap}} |
| 7274 |
\newcommand{\RubikFap}{\raisebox{\@hRubik}{\SquareFap}} |
| 7275 |
\newcommand{\textRubikFap}{\rrhFap} |
| 7276 |
% \end{macrocode} |
| 7277 |
% \end{macro} |
| 7278 |
% \end{macro} |
| 7279 |
% \end{macro} |
| 7280 |
% \end{macro} |
| 7281 |
% |
| 7282 |
% |
| 7283 |
% \subsubsection{\hspace{3mm}Rotation L} |
| 7284 |
% |
| 7285 |
% \begin{macro}{\rrL} |
| 7286 |
% \begin{macro}{\SquareL} |
| 7287 |
% \begin{macro}{\rrhL} |
| 7288 |
% \begin{macro}{\RubikL} |
| 7289 |
% \begin{macro}{\textRubikL} |
| 7290 |
% These commands all draw forms which denote the L rotation. |
| 7291 |
% \begin{macrocode} |
| 7292 |
\newcommand{\rrL}{\@rr{L}} |
| 7293 |
%% |
| 7294 |
\newcommand{\SquareL}{% |
| 7295 |
\begin{tikzpicture}[scale=0.5] |
| 7296 |
\DrawNotationBox; |
| 7297 |
\draw [thick, <-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7298 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7299 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7300 |
\end{tikzpicture}% |
| 7301 |
} |
| 7302 |
\newcommand{\rrhL}{\raisebox{-0.333\height}{\@tlen\SquareL\@tlen}} |
| 7303 |
%% |
| 7304 |
\newcommand{\RubikL}{% |
| 7305 |
{\@rubikfont% |
| 7306 |
\begin{minipage}{0.6cm} |
| 7307 |
\centering% |
| 7308 |
\SquareL\\ |
| 7309 |
\rrL% |
| 7310 |
\end{minipage}% |
| 7311 |
}} |
| 7312 |
\newcommand{\textRubikL}{\rrL\,\rrhL} |
| 7313 |
% \end{macrocode} |
| 7314 |
% \end{macro} |
| 7315 |
% \end{macro} |
| 7316 |
% \end{macro} |
| 7317 |
% \end{macro} |
| 7318 |
% \end{macro} |
| 7319 |
% |
| 7320 |
% |
| 7321 |
% \subsubsection{\hspace{3mm}Rotation Lp} |
| 7322 |
% |
| 7323 |
% \begin{macro}{\rrLp} |
| 7324 |
% \begin{macro}{\SquareLp} |
| 7325 |
% \begin{macro}{\rrhLp} |
| 7326 |
% \begin{macro}{\RubikLp} |
| 7327 |
% \begin{macro}{\textRubikLp} |
| 7328 |
% These commands all draw forms which denote the Lp rotation. |
| 7329 |
% \begin{macrocode} |
| 7330 |
\newcommand{\rrLp}{\@rrp{L}} |
| 7331 |
%% |
| 7332 |
\newcommand{\SquareLp}{% |
| 7333 |
\begin{tikzpicture}[scale=0.5] |
| 7334 |
\DrawNotationBox; |
| 7335 |
\draw [thick,->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7336 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7337 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7338 |
\end{tikzpicture}% |
| 7339 |
} |
| 7340 |
\newcommand{\rrhLp}{\raisebox{-0.333\height}{\@tlen\SquareLp\@tlen}} |
| 7341 |
%% |
| 7342 |
\newcommand{\RubikLp}{% |
| 7343 |
{\@rubikfont% |
| 7344 |
\begin{minipage}{0.6cm} |
| 7345 |
\centering% |
| 7346 |
\SquareLp\\ |
| 7347 |
\rrLp% |
| 7348 |
\end{minipage}% |
| 7349 |
}} |
| 7350 |
\newcommand{\textRubikLp}{\rrLp\,\rrhLp} |
| 7351 |
% \end{macrocode} |
| 7352 |
% \end{macro} |
| 7353 |
% \end{macro} |
| 7354 |
% \end{macro} |
| 7355 |
% \end{macro} |
| 7356 |
% \end{macro} |
| 7357 |
% |
| 7358 |
% |
| 7359 |
% \subsubsection{\hspace{3mm}Rotation Lw} |
| 7360 |
% |
| 7361 |
% \begin{macro}{\rrLw} |
| 7362 |
% \begin{macro}{\SquareLw} |
| 7363 |
% \begin{macro}{\rrhLw} |
| 7364 |
% \begin{macro}{\RubikLw} |
| 7365 |
% \begin{macro}{\textRubikLw} |
| 7366 |
% These commands all draw forms which denote the Lw rotation. |
| 7367 |
% \begin{macrocode} |
| 7368 |
\newcommand{\rrLw}{\@rrw{L}} |
| 7369 |
%% |
| 7370 |
\newcommand{\SquareLw}{% |
| 7371 |
\begin{tikzpicture}[scale=0.5] |
| 7372 |
\DrawNotationBox; |
| 7373 |
\draw [thick, <-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7374 |
\draw [thick, <-] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7375 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7376 |
\end{tikzpicture}% |
| 7377 |
} |
| 7378 |
\newcommand{\rrhLw}{\raisebox{-0.333\height}{\@tlen\SquareLw\@tlen}} |
| 7379 |
%% |
| 7380 |
\newcommand{\RubikLw}{% |
| 7381 |
{\@rubikfont% |
| 7382 |
\begin{minipage}{0.6cm} |
| 7383 |
\centering% |
| 7384 |
\SquareLw\\ |
| 7385 |
\rrLw% |
| 7386 |
\end{minipage}% |
| 7387 |
}} |
| 7388 |
\newcommand{\textRubikLw}{\rrLw\,\rrhLw} |
| 7389 |
% \end{macrocode} |
| 7390 |
% \end{macro} |
| 7391 |
% \end{macro} |
| 7392 |
% \end{macro} |
| 7393 |
% \end{macro} |
| 7394 |
% \end{macro} |
| 7395 |
% |
| 7396 |
% |
| 7397 |
% \subsubsection{\hspace{3mm}Rotation Lwp} |
| 7398 |
% |
| 7399 |
% \begin{macro}{\rrLwp} |
| 7400 |
% \begin{macro}{\SquareLwp} |
| 7401 |
% \begin{macro}{\rrhLwp} |
| 7402 |
% \begin{macro}{\RubikLwp} |
| 7403 |
% \begin{macro}{\textRubikLwp} |
| 7404 |
% These commands all draw forms which denote the Lwp rotation. |
| 7405 |
% \begin{macrocode} |
| 7406 |
\newcommand{\rrLwp}{\@rrwp{L}} |
| 7407 |
%% |
| 7408 |
\newcommand{\SquareLwp}{% |
| 7409 |
\begin{tikzpicture}[scale=0.5] |
| 7410 |
\DrawNotationBox; |
| 7411 |
\draw [thick,->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7412 |
\draw [thick,->] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7413 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7414 |
\end{tikzpicture}% |
| 7415 |
} |
| 7416 |
\newcommand{\rrhLwp}{\raisebox{-0.333\height}{\@tlen\SquareLwp\@tlen}} |
| 7417 |
%% |
| 7418 |
\newcommand{\RubikLwp}{% |
| 7419 |
{\@rubikfont% |
| 7420 |
\begin{minipage}{0.6cm} |
| 7421 |
\centering% |
| 7422 |
\SquareLwp\\ |
| 7423 |
\rrLwp% |
| 7424 |
\end{minipage}% |
| 7425 |
}} |
| 7426 |
\newcommand{\textRubikLwp}{\rrLwp\,\rrhLwp} |
| 7427 |
% \end{macrocode} |
| 7428 |
% \end{macro} |
| 7429 |
% \end{macro} |
| 7430 |
% \end{macro} |
| 7431 |
% \end{macro} |
| 7432 |
% \end{macro} |
| 7433 |
% |
| 7434 |
% |
| 7435 |
% \subsubsection{\hspace{3mm}Rotation Ls} |
| 7436 |
% |
| 7437 |
% \begin{macro}{\rrLs} |
| 7438 |
% \begin{macro}{\SquareLs} |
| 7439 |
% \begin{macro}{\rrhLs} |
| 7440 |
% \begin{macro}{\RubikLs} |
| 7441 |
% \begin{macro}{\textRubikLs} |
| 7442 |
% These commands all draw forms which denote the Ls rotation. |
| 7443 |
% \begin{macrocode} |
| 7444 |
\newcommand{\rrLs}{\@rrs{L}} |
| 7445 |
%% |
| 7446 |
\newcommand{\SquareLs}{% |
| 7447 |
\begin{tikzpicture}[scale=0.5] |
| 7448 |
\DrawNotationBox; |
| 7449 |
\draw [thick, <-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7450 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7451 |
\draw [thick, <-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7452 |
\end{tikzpicture}% |
| 7453 |
} |
| 7454 |
\newcommand{\rrhLs}{\raisebox{-0.333\height}{\@tlen\SquareLs\@tlen}} |
| 7455 |
%% |
| 7456 |
\newcommand{\RubikLs}{% |
| 7457 |
{\@rubikfont% |
| 7458 |
\begin{minipage}{0.6cm} |
| 7459 |
\centering% |
| 7460 |
\SquareLs\\ |
| 7461 |
\rrLs% |
| 7462 |
\end{minipage}% |
| 7463 |
}} |
| 7464 |
\newcommand{\textRubikLs}{\rrLs\,\rrhLs} |
| 7465 |
% \end{macrocode} |
| 7466 |
% \end{macro} |
| 7467 |
% \end{macro} |
| 7468 |
% \end{macro} |
| 7469 |
% \end{macro} |
| 7470 |
% \end{macro} |
| 7471 |
% |
| 7472 |
% |
| 7473 |
% \subsubsection{\hspace{3mm}Rotation Lsp} |
| 7474 |
% |
| 7475 |
% \begin{macro}{\rrLsp} |
| 7476 |
% \begin{macro}{\SquareLsp} |
| 7477 |
% \begin{macro}{\rrhLsp} |
| 7478 |
% \begin{macro}{\RubikLsp} |
| 7479 |
% \begin{macro}{\textRubikLsp} |
| 7480 |
% These commands all draw forms which denote the Lsp rotation. |
| 7481 |
% \begin{macrocode} |
| 7482 |
\newcommand{\rrLsp}{\@rrsp{L}} |
| 7483 |
%% |
| 7484 |
\newcommand{\SquareLsp}{% |
| 7485 |
\begin{tikzpicture}[scale=0.5] |
| 7486 |
\DrawNotationBox; |
| 7487 |
\draw [thick, ->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7488 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7489 |
\draw [thick, ->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7490 |
\end{tikzpicture}% |
| 7491 |
} |
| 7492 |
\newcommand{\rrhLsp}{\raisebox{-0.333\height}{\@tlen\SquareLsp\@tlen}} |
| 7493 |
%% |
| 7494 |
\newcommand{\RubikLsp}{% |
| 7495 |
{\@rubikfont% |
| 7496 |
\begin{minipage}{0.6cm} |
| 7497 |
\centering% |
| 7498 |
\SquareLsp\\ |
| 7499 |
\rrLsp% |
| 7500 |
\end{minipage}% |
| 7501 |
}} |
| 7502 |
\newcommand{\textRubikLsp}{\rrLsp\,\rrhLsp} |
| 7503 |
% \end{macrocode} |
| 7504 |
% \end{macro} |
| 7505 |
% \end{macro} |
| 7506 |
% \end{macro} |
| 7507 |
% \end{macro} |
| 7508 |
% \end{macro} |
| 7509 |
% |
| 7510 |
% |
| 7511 |
% \subsubsection{\hspace{3mm}Rotation La} |
| 7512 |
% |
| 7513 |
% \begin{macro}{\rrLa} |
| 7514 |
% \begin{macro}{\SquareLa} |
| 7515 |
% \begin{macro}{\rrhLa} |
| 7516 |
% \begin{macro}{\RubikLa} |
| 7517 |
% \begin{macro}{\textRubikLa} |
| 7518 |
% These commands all draw forms which denote the La rotation. |
| 7519 |
% \begin{macrocode} |
| 7520 |
\newcommand{\rrLa}{\@rra{L}} |
| 7521 |
%% |
| 7522 |
\newcommand{\SquareLa}{% |
| 7523 |
\begin{tikzpicture}[scale=0.5] |
| 7524 |
\DrawNotationBox; |
| 7525 |
\draw [thick, <-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7526 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7527 |
\draw [thick, ->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7528 |
\end{tikzpicture}% |
| 7529 |
} |
| 7530 |
\newcommand{\rrhLa}{\raisebox{-0.333\height}{\@tlen\SquareLa\@tlen}} |
| 7531 |
%% |
| 7532 |
\newcommand{\RubikLa}{% |
| 7533 |
{\@rubikfont% |
| 7534 |
\begin{minipage}{0.6cm} |
| 7535 |
\centering% |
| 7536 |
\SquareLa\\ |
| 7537 |
\rrLa% |
| 7538 |
\end{minipage}% |
| 7539 |
}} |
| 7540 |
\newcommand{\textRubikLa}{\rrLa\,\rrhLa} |
| 7541 |
% \end{macrocode} |
| 7542 |
% \end{macro} |
| 7543 |
% \end{macro} |
| 7544 |
% \end{macro} |
| 7545 |
% \end{macro} |
| 7546 |
% \end{macro} |
| 7547 |
% |
| 7548 |
% |
| 7549 |
% \subsubsection{\hspace{3mm}Rotation Lap} |
| 7550 |
% |
| 7551 |
% \begin{macro}{\rrLap} |
| 7552 |
% \begin{macro}{\SquareLap} |
| 7553 |
% \begin{macro}{\rrhLap} |
| 7554 |
% \begin{macro}{\RubikLap} |
| 7555 |
% \begin{macro}{\textRubikLap} |
| 7556 |
% These commands all draw forms which denote the Lap rotation. |
| 7557 |
% \begin{macrocode} |
| 7558 |
\newcommand{\rrLap}{\@rrap{L}} |
| 7559 |
%% |
| 7560 |
\newcommand{\SquareLap}{% |
| 7561 |
\begin{tikzpicture}[scale=0.5] |
| 7562 |
\DrawNotationBox; |
| 7563 |
\draw [thick, ->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7564 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7565 |
\draw [thick, <-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7566 |
\end{tikzpicture}% |
| 7567 |
} |
| 7568 |
\newcommand{\rrhLap}{\raisebox{-0.333\height}{\@tlen\SquareLap\@tlen}} |
| 7569 |
%% |
| 7570 |
\newcommand{\RubikLap}{% |
| 7571 |
{\@rubikfont% |
| 7572 |
\begin{minipage}{0.6cm} |
| 7573 |
\centering% |
| 7574 |
\SquareLap\\ |
| 7575 |
\rrLap% |
| 7576 |
\end{minipage}% |
| 7577 |
}} |
| 7578 |
\newcommand{\textRubikLap}{\rrLap\,\rrhLap} |
| 7579 |
% \end{macrocode} |
| 7580 |
% \end{macro} |
| 7581 |
% \end{macro} |
| 7582 |
% \end{macro} |
| 7583 |
% \end{macro} |
| 7584 |
% \end{macro} |
| 7585 |
% |
| 7586 |
% |
| 7587 |
% \subsubsection{\hspace{3mm}Rotation M} |
| 7588 |
% |
| 7589 |
% \begin{macro}{\rrM} |
| 7590 |
% \begin{macro}{\SquareM} |
| 7591 |
% \begin{macro}{\rrhM} |
| 7592 |
% \begin{macro}{\RubikM} |
| 7593 |
% \begin{macro}{\textRubikM} |
| 7594 |
% These commands all draw forms which denote the M rotation. |
| 7595 |
% \begin{macrocode} |
| 7596 |
\newcommand{\rrM}{\@rr{M}} |
| 7597 |
%% |
| 7598 |
\newcommand{\SquareM}{% |
| 7599 |
\begin{tikzpicture}[scale=0.5] |
| 7600 |
\DrawNotationBox; |
| 7601 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7602 |
\draw [thick, <-] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7603 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7604 |
\end{tikzpicture}% |
| 7605 |
} |
| 7606 |
\newcommand{\rrhM}{\raisebox{-0.333\height}{\@tlen\SquareM\@tlen}} |
| 7607 |
%% |
| 7608 |
\newcommand{\RubikM}{% |
| 7609 |
{\@rubikfont% |
| 7610 |
\begin{minipage}{0.6cm} |
| 7611 |
\centering% |
| 7612 |
\SquareM\\ |
| 7613 |
\rrM% |
| 7614 |
\end{minipage}% |
| 7615 |
}} |
| 7616 |
\newcommand{\textRubikM}{\rrM\,\rrhM} |
| 7617 |
% \end{macrocode} |
| 7618 |
% \end{macro} |
| 7619 |
% \end{macro} |
| 7620 |
% \end{macro} |
| 7621 |
% \end{macro} |
| 7622 |
% \end{macro} |
| 7623 |
% |
| 7624 |
% |
| 7625 |
% \subsubsection{\hspace{3mm}Rotation Mp} |
| 7626 |
% |
| 7627 |
% \begin{macro}{\rrMp} |
| 7628 |
% \begin{macro}{\SquareMp} |
| 7629 |
% \begin{macro}{\rrhMp} |
| 7630 |
% \begin{macro}{\RubikMp} |
| 7631 |
% \begin{macro}{\textRubikMp} |
| 7632 |
% These commands all draw forms which denote the Mp rotation. |
| 7633 |
% \begin{macrocode} |
| 7634 |
\newcommand{\rrMp}{\@rrp{M}} |
| 7635 |
%% |
| 7636 |
\newcommand{\SquareMp}{% |
| 7637 |
\begin{tikzpicture}[scale=0.5] |
| 7638 |
\DrawNotationBox; |
| 7639 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7640 |
\draw [thick,->] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7641 |
\draw [thick] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7642 |
\end{tikzpicture}% |
| 7643 |
} |
| 7644 |
\newcommand{\rrhMp}{\raisebox{-0.333\height}{\@tlen\SquareMp\@tlen}} |
| 7645 |
%% |
| 7646 |
\newcommand{\RubikMp}{% |
| 7647 |
{\@rubikfont% |
| 7648 |
\begin{minipage}{0.6cm} |
| 7649 |
\centering% |
| 7650 |
\SquareMp\\ |
| 7651 |
\rrMp% |
| 7652 |
\end{minipage}% |
| 7653 |
}} |
| 7654 |
\newcommand{\textRubikMp}{\rrMp\,\rrhMp} |
| 7655 |
% \end{macrocode} |
| 7656 |
% \end{macro} |
| 7657 |
% \end{macro} |
| 7658 |
% \end{macro} |
| 7659 |
% \end{macro} |
| 7660 |
% \end{macro} |
| 7661 |
% |
| 7662 |
% |
| 7663 |
% \subsubsection{\hspace{3mm}Rotation R} |
| 7664 |
% |
| 7665 |
% \begin{macro}{\rrR} |
| 7666 |
% \begin{macro}{\SquareR} |
| 7667 |
% \begin{macro}{\rrhR} |
| 7668 |
% \begin{macro}{\RubikR} |
| 7669 |
% \begin{macro}{\textRubikR} |
| 7670 |
% These commands all draw forms which denote the R rotation. |
| 7671 |
% \begin{macrocode} |
| 7672 |
\newcommand{\rrR}{\@rr{R}} |
| 7673 |
%% |
| 7674 |
\newcommand{\SquareR}{% |
| 7675 |
\begin{tikzpicture}[scale=0.5] |
| 7676 |
\DrawNotationBox; |
| 7677 |
%% draw three lines in the square, one with an arrow |
| 7678 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7679 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7680 |
\draw [thick, ->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7681 |
\end{tikzpicture}% |
| 7682 |
} |
| 7683 |
\newcommand{\rrhR}{\raisebox{-0.333\height}{\@tlen\SquareR\@tlen}} |
| 7684 |
%% |
| 7685 |
\newcommand{\RubikR}{% |
| 7686 |
{\@rubikfont% |
| 7687 |
\begin{minipage}{0.6cm} |
| 7688 |
\centering% |
| 7689 |
\SquareR\\ |
| 7690 |
\rrR% |
| 7691 |
\end{minipage}% |
| 7692 |
}} |
| 7693 |
\newcommand{\textRubikR}{\rrR\,\rrhR} |
| 7694 |
% \end{macrocode} |
| 7695 |
% \end{macro} |
| 7696 |
% \end{macro} |
| 7697 |
% \end{macro} |
| 7698 |
% \end{macro} |
| 7699 |
% \end{macro} |
| 7700 |
% |
| 7701 |
% |
| 7702 |
% \subsubsection{\hspace{3mm}Rotation Rp} |
| 7703 |
% |
| 7704 |
% \begin{macro}{\rrRp} |
| 7705 |
% \begin{macro}{\SquareRp} |
| 7706 |
% \begin{macro}{\rrhRp} |
| 7707 |
% \begin{macro}{\RubikRp} |
| 7708 |
% \begin{macro}{\textRubikRp} |
| 7709 |
% These commands all draw forms which denote the Rp rotation. |
| 7710 |
% \begin{macrocode} |
| 7711 |
\newcommand{\rrRp}{\@rrp{R}} |
| 7712 |
%% |
| 7713 |
\newcommand{\SquareRp}{% |
| 7714 |
\begin{tikzpicture}[scale=0.5] |
| 7715 |
\DrawNotationBox; |
| 7716 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7717 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7718 |
\draw [thick, <-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7719 |
\end{tikzpicture}% |
| 7720 |
} |
| 7721 |
\newcommand{\rrhRp}{\raisebox{-0.333\height}{\@tlen\SquareRp\@tlen}} |
| 7722 |
%% |
| 7723 |
\newcommand{\RubikRp}{% |
| 7724 |
{\@rubikfont% |
| 7725 |
\begin{minipage}{0.6cm} |
| 7726 |
\centering% |
| 7727 |
\SquareRp\\ |
| 7728 |
\rrRp% |
| 7729 |
\end{minipage}% |
| 7730 |
}} |
| 7731 |
\newcommand{\textRubikRp}{\rrRp\,\rrhRp} |
| 7732 |
% \end{macrocode} |
| 7733 |
% \end{macro} |
| 7734 |
% \end{macro} |
| 7735 |
% \end{macro} |
| 7736 |
% \end{macro} |
| 7737 |
% \end{macro} |
| 7738 |
% |
| 7739 |
% |
| 7740 |
% \subsubsection{\hspace{3mm}Rotation Rw} |
| 7741 |
% |
| 7742 |
% \begin{macro}{\rrRw} |
| 7743 |
% \begin{macro}{\SquareRw} |
| 7744 |
% \begin{macro}{\rrhRw} |
| 7745 |
% \begin{macro}{\RubikRw} |
| 7746 |
% \begin{macro}{\textRubikRw} |
| 7747 |
% These commands all draw forms which denote the Rw rotation. |
| 7748 |
% \begin{macrocode} |
| 7749 |
\newcommand{\rrRw}{\@rrw{R}} |
| 7750 |
%% |
| 7751 |
\newcommand{\SquareRw}{% |
| 7752 |
\begin{tikzpicture}[scale=0.5] |
| 7753 |
\DrawNotationBox; |
| 7754 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7755 |
\draw [thick, ->] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7756 |
\draw [thick, ->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7757 |
\end{tikzpicture}% |
| 7758 |
} |
| 7759 |
\newcommand{\rrhRw}{\raisebox{-0.333\height}{\@tlen\SquareRw\@tlen}} |
| 7760 |
%% |
| 7761 |
\newcommand{\RubikRw}{% |
| 7762 |
{\@rubikfont% |
| 7763 |
\begin{minipage}{0.6cm} |
| 7764 |
\centering% |
| 7765 |
\SquareRw\\ |
| 7766 |
\rrRw% |
| 7767 |
\end{minipage}% |
| 7768 |
}} |
| 7769 |
\newcommand{\textRubikRw}{\rrRw\,\rrhRw} |
| 7770 |
% \end{macrocode} |
| 7771 |
% \end{macro} |
| 7772 |
% \end{macro} |
| 7773 |
% \end{macro} |
| 7774 |
% \end{macro} |
| 7775 |
% \end{macro} |
| 7776 |
% |
| 7777 |
% |
| 7778 |
% \subsubsection{\hspace{3mm}Rotation Rwp} |
| 7779 |
% |
| 7780 |
% \begin{macro}{\rrRwp} |
| 7781 |
% \begin{macro}{\SquareRwp} |
| 7782 |
% \begin{macro}{\rrhRwp} |
| 7783 |
% \begin{macro}{\RubikRwp} |
| 7784 |
% \begin{macro}{\textRubikRwp} |
| 7785 |
% These commands all draw forms which denote the Rwp rotation. |
| 7786 |
% \begin{macrocode} |
| 7787 |
\newcommand{\rrRwp}{\@rrwp{R}} |
| 7788 |
%% |
| 7789 |
\newcommand{\SquareRwp}{% |
| 7790 |
\begin{tikzpicture}[scale=0.5] |
| 7791 |
\DrawNotationBox; |
| 7792 |
\draw [thick] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7793 |
\draw [thick, <-] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7794 |
\draw [thick, <-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7795 |
\end{tikzpicture}% |
| 7796 |
} |
| 7797 |
\newcommand{\rrhRwp}{\raisebox{-0.333\height}{\@tlen\SquareRwp\@tlen}} |
| 7798 |
%% |
| 7799 |
\newcommand{\RubikRwp}{% |
| 7800 |
{\@rubikfont% |
| 7801 |
\begin{minipage}{0.6cm} |
| 7802 |
\centering% |
| 7803 |
\SquareRwp\\ |
| 7804 |
\rrRwp% |
| 7805 |
\end{minipage}% |
| 7806 |
}} |
| 7807 |
\newcommand{\textRubikRwp}{\rrRwp\,\rrhRwp} |
| 7808 |
% \end{macrocode} |
| 7809 |
% \end{macro} |
| 7810 |
% \end{macro} |
| 7811 |
% \end{macro} |
| 7812 |
% \end{macro} |
| 7813 |
% \end{macro} |
| 7814 |
% |
| 7815 |
% |
| 7816 |
% \subsubsection{\hspace{3mm}Rotation Rs} |
| 7817 |
% |
| 7818 |
% \begin{macro}{\rrRs} |
| 7819 |
% \begin{macro}{\SquareRs} |
| 7820 |
% \begin{macro}{\rrhRs} |
| 7821 |
% \begin{macro}{\RubikRs} |
| 7822 |
% \begin{macro}{\textRubikRs} |
| 7823 |
% These commands all draw forms which denote the Rs rotation. |
| 7824 |
% \begin{macrocode} |
| 7825 |
\newcommand{\rrRs}{\@rrs{R}} |
| 7826 |
%% |
| 7827 |
\newcommand{\SquareRs}{% |
| 7828 |
\begin{tikzpicture}[scale=0.5] |
| 7829 |
\DrawNotationBox; |
| 7830 |
\draw [thick,->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7831 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7832 |
\draw [thick,->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7833 |
\end{tikzpicture}% |
| 7834 |
} |
| 7835 |
\newcommand{\rrhRs}{\raisebox{-0.333\height}{\@tlen\SquareRs\@tlen}} |
| 7836 |
%% |
| 7837 |
\newcommand{\RubikRs}{% |
| 7838 |
{\@rubikfont% |
| 7839 |
\begin{minipage}{0.6cm} |
| 7840 |
\centering% |
| 7841 |
\SquareRs\\ |
| 7842 |
\rrRs% |
| 7843 |
\end{minipage}% |
| 7844 |
}} |
| 7845 |
\newcommand{\textRubikRs}{\rrRs\,\rrhRs} |
| 7846 |
% \end{macrocode} |
| 7847 |
% \end{macro} |
| 7848 |
% \end{macro} |
| 7849 |
% \end{macro} |
| 7850 |
% \end{macro} |
| 7851 |
% \end{macro} |
| 7852 |
% |
| 7853 |
% |
| 7854 |
% \subsubsection{\hspace{3mm}Rotation Rsp} |
| 7855 |
% |
| 7856 |
% \begin{macro}{\rrRsp} |
| 7857 |
% \begin{macro}{\SquareRsp} |
| 7858 |
% \begin{macro}{\rrhRsp} |
| 7859 |
% \begin{macro}{\RubikRsp} |
| 7860 |
% \begin{macro}{\textRubikRsp} |
| 7861 |
% These commands all draw forms which denote the Rsp rotation. |
| 7862 |
% \begin{macrocode} |
| 7863 |
\newcommand{\rrRsp}{\@rrsp{R}} |
| 7864 |
%% |
| 7865 |
\newcommand{\SquareRsp}{% |
| 7866 |
\begin{tikzpicture}[scale=0.5] |
| 7867 |
\DrawNotationBox; |
| 7868 |
\draw [thick,<-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7869 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7870 |
\draw [thick,<-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7871 |
\end{tikzpicture}% |
| 7872 |
} |
| 7873 |
\newcommand{\rrhRsp}{\raisebox{-0.333\height}{\@tlen\SquareRsp\@tlen}} |
| 7874 |
%% |
| 7875 |
\newcommand{\RubikRsp}{% |
| 7876 |
{\@rubikfont% |
| 7877 |
\begin{minipage}{0.6cm} |
| 7878 |
\centering% |
| 7879 |
\SquareRsp\\ |
| 7880 |
\rrRsp% |
| 7881 |
\end{minipage}% |
| 7882 |
}} |
| 7883 |
\newcommand{\textRubikRsp}{\rrRsp\,\rrhRsp} |
| 7884 |
% \end{macrocode} |
| 7885 |
% \end{macro} |
| 7886 |
% \end{macro} |
| 7887 |
% \end{macro} |
| 7888 |
% \end{macro} |
| 7889 |
% \end{macro} |
| 7890 |
% |
| 7891 |
% |
| 7892 |
% \subsubsection{\hspace{3mm}Rotation Ra} |
| 7893 |
% |
| 7894 |
% \begin{macro}{\rrRa} |
| 7895 |
% \begin{macro}{\SquareRa} |
| 7896 |
% \begin{macro}{\rrhRa} |
| 7897 |
% \begin{macro}{\RubikRa} |
| 7898 |
% \begin{macro}{\textRubikRa} |
| 7899 |
% These commands all draw forms which denote the Ra rotation. |
| 7900 |
% \begin{macrocode} |
| 7901 |
\newcommand{\rrRa}{\@rra{R}} |
| 7902 |
%% |
| 7903 |
\newcommand{\SquareRa}{% |
| 7904 |
\begin{tikzpicture}[scale=0.5] |
| 7905 |
\DrawNotationBox; |
| 7906 |
\draw [thick,<-] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7907 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7908 |
\draw [thick,->] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7909 |
\end{tikzpicture}% |
| 7910 |
} |
| 7911 |
\newcommand{\rrhRa}{\raisebox{-0.333\height}{\@tlen\SquareRa\@tlen}} |
| 7912 |
%% |
| 7913 |
\newcommand{\RubikRa}{% |
| 7914 |
{\@rubikfont% |
| 7915 |
\begin{minipage}{0.6cm} |
| 7916 |
\centering% |
| 7917 |
\SquareRa\\ |
| 7918 |
\rrRa% |
| 7919 |
\end{minipage}% |
| 7920 |
}} |
| 7921 |
\newcommand{\textRubikRa}{\rrRa\,\rrhRa} |
| 7922 |
% \end{macrocode} |
| 7923 |
% \end{macro} |
| 7924 |
% \end{macro} |
| 7925 |
% \end{macro} |
| 7926 |
% \end{macro} |
| 7927 |
% \end{macro} |
| 7928 |
% |
| 7929 |
% |
| 7930 |
% \subsubsection{\hspace{3mm}Rotation Rap} |
| 7931 |
% |
| 7932 |
% \begin{macro}{\rrRap} |
| 7933 |
% \begin{macro}{\SquareRap} |
| 7934 |
% \begin{macro}{\rrhRap} |
| 7935 |
% \begin{macro}{\RubikRap} |
| 7936 |
% \begin{macro}{\textRubikRap} |
| 7937 |
% These commands all draw forms which denote the Rap rotation. |
| 7938 |
% \begin{macrocode} |
| 7939 |
\newcommand{\rrRap}{\@rrap{R}} |
| 7940 |
%% |
| 7941 |
\newcommand{\SquareRap}{% |
| 7942 |
\begin{tikzpicture}[scale=0.5] |
| 7943 |
\DrawNotationBox; |
| 7944 |
\draw [thick,->] (\@sd, \@sb) -- (\@sd, \@sbh); |
| 7945 |
\draw [thick] (\@sdd,\@sb) -- (\@sdd, \@sbh); |
| 7946 |
\draw [thick,<-] (\@sddd, \@sb) -- (\@sddd, \@sbh); |
| 7947 |
\end{tikzpicture}% |
| 7948 |
} |
| 7949 |
\newcommand{\rrhRap}{\raisebox{-0.333\height}{\@tlen\SquareRap\@tlen}} |
| 7950 |
%% |
| 7951 |
\newcommand{\RubikRap}{% |
| 7952 |
{\@rubikfont% |
| 7953 |
\begin{minipage}{0.6cm} |
| 7954 |
\centering% |
| 7955 |
\SquareRap\\ |
| 7956 |
\rrRap% |
| 7957 |
\end{minipage}% |
| 7958 |
}} |
| 7959 |
\newcommand{\textRubikRap}{\rrRap\,\rrhRap} |
| 7960 |
% \end{macrocode} |
| 7961 |
% \end{macro} |
| 7962 |
% \end{macro} |
| 7963 |
% \end{macro} |
| 7964 |
% \end{macro} |
| 7965 |
% \end{macro} |
| 7966 |
% |
| 7967 |
% |
| 7968 |
% \subsubsection{\hspace{3mm}Rotation S} |
| 7969 |
% |
| 7970 |
% \begin{macro}{\rrS} |
| 7971 |
% \begin{macro}{\SquareS} |
| 7972 |
% \begin{macro}{\rrhS} |
| 7973 |
% \begin{macro}{\RubikS} |
| 7974 |
% \begin{macro}{\textRubikS} |
| 7975 |
% These commands all draw forms which denote the S rotation. |
| 7976 |
% Not visible from the front. |
| 7977 |
% \begin{macrocode} |
| 7978 |
\newcommand{\rrS}{\@rr{S}} |
| 7979 |
\newcommand{\SquareS}{\@tlen\@SquareLetter{\rrS}\@tlen} |
| 7980 |
\newcommand{\rrhS}{\raisebox{-0.25mm}{\SquareS}} |
| 7981 |
\newcommand{\RubikS}{\raisebox{\@hRubik}{\SquareS}} |
| 7982 |
\newcommand{\textRubikS}{\rrhS} |
| 7983 |
% \end{macrocode} |
| 7984 |
% \end{macro} |
| 7985 |
% \end{macro} |
| 7986 |
% \end{macro} |
| 7987 |
% \end{macro} |
| 7988 |
% \end{macro} |
| 7989 |
% |
| 7990 |
% |
| 7991 |
% \subsubsection{\hspace{3mm}Rotation Sp} |
| 7992 |
% |
| 7993 |
% \begin{macro}{\rrSp} |
| 7994 |
% \begin{macro}{\SquareSp} |
| 7995 |
% \begin{macro}{\rrhSp} |
| 7996 |
% \begin{macro}{\RubikSp} |
| 7997 |
% \begin{macro}{\textRubikSp} |
| 7998 |
% These commands all draw forms which denote the Sp rotation. |
| 7999 |
% Not visible from the front. |
| 8000 |
% \begin{macrocode} |
| 8001 |
\newcommand{\rrSp}{\@rrp{S}} |
| 8002 |
\newcommand{\SquareSp}{\@tlen\@SquareLetter{\rrSp}\@tlen} |
| 8003 |
\newcommand{\rrhSp}{\raisebox{-0.25mm}{\SquareSp}} |
| 8004 |
\newcommand{\RubikSp}{\raisebox{\@hRubik}{\SquareSp}} |
| 8005 |
\newcommand{\textRubikSp}{\rrhSp} |
| 8006 |
% \end{macrocode} |
| 8007 |
% \end{macro} |
| 8008 |
% \end{macro} |
| 8009 |
% \end{macro} |
| 8010 |
% \end{macro} |
| 8011 |
% \end{macro} |
| 8012 |
% |
| 8013 |
% |
| 8014 |
% \subsubsection{\hspace{3mm}Rotation Su} |
| 8015 |
% |
| 8016 |
% \begin{macro}{\rrSu} |
| 8017 |
% \begin{macro}{\rrhSu} |
| 8018 |
% \begin{macro}{\RubikSu} |
| 8019 |
% \begin{macro}{\textRubikSu} |
| 8020 |
% These commands draw forms of the Singmaster Su slice rotation. |
| 8021 |
% We also need to fine-tune the spacing |
| 8022 |
% between these `slice' hieroglyphs (especially Fs and Bs). |
| 8023 |
% \begin{macrocode} |
| 8024 |
\newcommand{\rrSu}{\@rru{S}} |
| 8025 |
\newcommand{\rrhSu}{\rrhEp}% |
| 8026 |
\newcommand{\RubikSu}{% |
| 8027 |
{\@rubikfont% |
| 8028 |
\begin{minipage}{0.6cm} |
| 8029 |
\centering% |
| 8030 |
\SquareEp\\ |
| 8031 |
\rrSu% |
| 8032 |
\end{minipage}% |
| 8033 |
}} |
| 8034 |
\newcommand{\textRubikSu}{\rrSu\,\rrhEp} |
| 8035 |
% \end{macrocode} |
| 8036 |
% \end{macro} |
| 8037 |
% \end{macro} |
| 8038 |
% \end{macro} |
| 8039 |
% \end{macro} |
| 8040 |
% |
| 8041 |
% |
| 8042 |
% \subsubsection{\hspace{3mm}Rotation Sup} |
| 8043 |
% |
| 8044 |
% \begin{macro}{\rrSup} |
| 8045 |
% \begin{macro}{\rrhSup} |
| 8046 |
% \begin{macro}{\RubikSup} |
| 8047 |
% \begin{macro}{\textRubikSup} |
| 8048 |
% These commands draw forms of the Singmaster Sup slice rotation. |
| 8049 |
% We also need to fine-tune the spacing |
| 8050 |
% between these `slice' hieroglyphs (especially Fs and Bs). |
| 8051 |
% \begin{macrocode} |
| 8052 |
\newcommand{\rrSup}{\@rrup{S}} |
| 8053 |
\newcommand{\rrhSup}{\rrhE}% |
| 8054 |
\newcommand{\RubikSup}{% |
| 8055 |
{\@rubikfont% |
| 8056 |
\begin{minipage}{0.6cm} |
| 8057 |
\centering% |
| 8058 |
\SquareE\\ |
| 8059 |
\rrSup% |
| 8060 |
\end{minipage}% |
| 8061 |
}} |
| 8062 |
\newcommand{\textRubikSup}{\rrSup\,\rrhE} |
| 8063 |
% \end{macrocode} |
| 8064 |
% \end{macro} |
| 8065 |
% \end{macro} |
| 8066 |
% \end{macro} |
| 8067 |
% \end{macro} |
| 8068 |
% |
| 8069 |
% |
| 8070 |
% \subsubsection{\hspace{3mm}Rotation Sd} |
| 8071 |
% |
| 8072 |
% \begin{macro}{\rrSd} |
| 8073 |
% \begin{macro}{\rrhSd} |
| 8074 |
% \begin{macro}{\RubikSd} |
| 8075 |
% \begin{macro}{\textRubikSd} |
| 8076 |
% These commands draw forms of the Singmaster Sd slice rotation. |
| 8077 |
% \begin{macrocode} |
| 8078 |
\newcommand{\rrSd}{\@rrd{S}} |
| 8079 |
\newcommand{\rrhSd}{\rrhE}% |
| 8080 |
\newcommand{\RubikSd}{% |
| 8081 |
{\@rubikfont% |
| 8082 |
\begin{minipage}{0.6cm} |
| 8083 |
\centering% |
| 8084 |
\SquareE\\ |
| 8085 |
\rrSd% |
| 8086 |
\end{minipage}% |
| 8087 |
}} |
| 8088 |
\newcommand{\textRubikSd}{\rrSd\,\rrhE} |
| 8089 |
% \end{macrocode} |
| 8090 |
% \end{macro} |
| 8091 |
% \end{macro} |
| 8092 |
% \end{macro} |
| 8093 |
% \end{macro} |
| 8094 |
% |
| 8095 |
% |
| 8096 |
% \subsubsection{\hspace{3mm}Rotation Sdp} |
| 8097 |
% |
| 8098 |
% \begin{macro}{\rrSdp} |
| 8099 |
% \begin{macro}{\rrhSdp} |
| 8100 |
% \begin{macro}{\RubikSdp} |
| 8101 |
% \begin{macro}{\textRubikSdp} |
| 8102 |
% These commands draw forms of the Singmaster Sdp slice rotation. |
| 8103 |
% \begin{macrocode} |
| 8104 |
\newcommand{\rrSdp}{\@rrdp{S}} |
| 8105 |
\newcommand{\rrhSdp}{\rrhEp}% |
| 8106 |
\newcommand{\RubikSdp}{% |
| 8107 |
{\@rubikfont% |
| 8108 |
\begin{minipage}{0.6cm} |
| 8109 |
\centering% |
| 8110 |
\SquareEp\\ |
| 8111 |
\rrSdp% |
| 8112 |
\end{minipage}% |
| 8113 |
}} |
| 8114 |
\newcommand{\textRubikSdp}{\rrSdp\,\rrhEp} |
| 8115 |
% \end{macrocode} |
| 8116 |
% \end{macro} |
| 8117 |
% \end{macro} |
| 8118 |
% \end{macro} |
| 8119 |
% \end{macro} |
| 8120 |
% |
| 8121 |
% |
| 8122 |
% \subsubsection{\hspace{3mm}Rotation Sl} |
| 8123 |
% |
| 8124 |
% \begin{macro}{\rrSl} |
| 8125 |
% \begin{macro}{\rrhSl} |
| 8126 |
% \begin{macro}{\RubikSl} |
| 8127 |
% \begin{macro}{\textRubikSl} |
| 8128 |
% These commands draw forms of the Singmaster Sl slice rotation. |
| 8129 |
% \begin{macrocode} |
| 8130 |
\newcommand{\rrSl}{\@rrl{S}} |
| 8131 |
\newcommand{\rrhSl}{\rrhM}% |
| 8132 |
\newcommand{\RubikSl}{% |
| 8133 |
{\@rubikfont% |
| 8134 |
\begin{minipage}{0.6cm} |
| 8135 |
\centering% |
| 8136 |
\SquareM\\ |
| 8137 |
\rrSl% |
| 8138 |
\end{minipage}% |
| 8139 |
}} |
| 8140 |
\newcommand{\textRubikSl}{\rrSl\,\rrhM} |
| 8141 |
% \end{macrocode} |
| 8142 |
% \end{macro} |
| 8143 |
% \end{macro} |
| 8144 |
% \end{macro} |
| 8145 |
% \end{macro} |
| 8146 |
% |
| 8147 |
% |
| 8148 |
% \subsubsection{\hspace{3mm}Rotation Slp} |
| 8149 |
% |
| 8150 |
% \begin{macro}{\rrSlp} |
| 8151 |
% \begin{macro}{\rrhSlp} |
| 8152 |
% \begin{macro}{\RubikSlp} |
| 8153 |
% \begin{macro}{\textRubikSlp} |
| 8154 |
% These commands draw forms of the Singmaster Slp slice rotation. |
| 8155 |
% \begin{macrocode} |
| 8156 |
\newcommand{\rrSlp}{\@rrlp{S}} |
| 8157 |
\newcommand{\rrhSlp}{\rrhMp}% |
| 8158 |
\newcommand{\RubikSlp}{% |
| 8159 |
{\@rubikfont% |
| 8160 |
\begin{minipage}{0.6cm} |
| 8161 |
\centering% |
| 8162 |
\SquareMp\\ |
| 8163 |
\rrSlp% |
| 8164 |
\end{minipage}% |
| 8165 |
}} |
| 8166 |
\newcommand{\textRubikSlp}{\rrSlp\,\rrhMp} |
| 8167 |
% \end{macrocode} |
| 8168 |
% \end{macro} |
| 8169 |
% \end{macro} |
| 8170 |
% \end{macro} |
| 8171 |
% \end{macro} |
| 8172 |
% |
| 8173 |
% |
| 8174 |
% \subsubsection{\hspace{3mm}Rotation Sr} |
| 8175 |
% |
| 8176 |
% \begin{macro}{\rrSr} |
| 8177 |
% \begin{macro}{\rrhSr} |
| 8178 |
% \begin{macro}{\RubikSr} |
| 8179 |
% \begin{macro}{\textRubikSr} |
| 8180 |
% These commands draw forms of the Singmaster Sr slice rotation. |
| 8181 |
% \begin{macrocode} |
| 8182 |
\newcommand{\rrSr}{\@rrr{S}} |
| 8183 |
\newcommand{\rrhSr}{\rrhMp}% |
| 8184 |
\newcommand{\RubikSr}{% |
| 8185 |
{\@rubikfont% |
| 8186 |
\begin{minipage}{0.6cm} |
| 8187 |
\centering% |
| 8188 |
\SquareMp\\ |
| 8189 |
\rrSr% |
| 8190 |
\end{minipage}% |
| 8191 |
}} |
| 8192 |
\newcommand{\textRubikSr}{\rrSr\,\rrhMp} |
| 8193 |
% \end{macrocode} |
| 8194 |
% \end{macro} |
| 8195 |
% \end{macro} |
| 8196 |
% \end{macro} |
| 8197 |
% \end{macro} |
| 8198 |
% |
| 8199 |
% |
| 8200 |
% \subsubsection{\hspace{3mm}Rotation Srp} |
| 8201 |
% |
| 8202 |
% \begin{macro}{\rrSrp} |
| 8203 |
% \begin{macro}{\rrhSrp} |
| 8204 |
% \begin{macro}{\RubikSrp} |
| 8205 |
% \begin{macro}{\textRubikSrp} |
| 8206 |
% These commands draw forms of the Singmaster Srp slice rotation. |
| 8207 |
% \begin{macrocode} |
| 8208 |
\newcommand{\rrSrp}{\@rrrp{S}} |
| 8209 |
\newcommand{\rrhSrp}{\rrhM}% |
| 8210 |
\newcommand{\RubikSrp}{% |
| 8211 |
{\@rubikfont% |
| 8212 |
\begin{minipage}{0.6cm} |
| 8213 |
\centering% |
| 8214 |
\SquareM\\ |
| 8215 |
\rrSrp% |
| 8216 |
\end{minipage}% |
| 8217 |
}} |
| 8218 |
\newcommand{\textRubikSrp}{\rrSrp\,\rrhM} |
| 8219 |
% \end{macrocode} |
| 8220 |
% \end{macro} |
| 8221 |
% \end{macro} |
| 8222 |
% \end{macro} |
| 8223 |
% \end{macro} |
| 8224 |
% |
| 8225 |
% |
| 8226 |
% \subsubsection{\hspace{3mm}Rotation Sf} |
| 8227 |
% |
| 8228 |
% \begin{macro}{\rrSf} |
| 8229 |
% \begin{macro}{\rrhSf} |
| 8230 |
% \begin{macro}{\RubikSf} |
| 8231 |
% \begin{macro}{\textRubikSf} |
| 8232 |
% These commands draw forms of the Singmaster Sf slice rotation. |
| 8233 |
% We need to just make square with Sf in square; |
| 8234 |
% adjust box height using a \cmd{\rule}; |
| 8235 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 8236 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 8237 |
% bounded by \{\} so no need to reset to defaults. |
| 8238 |
% Not visible from the front. |
| 8239 |
% \begin{macrocode} |
| 8240 |
\newcommand{\rrSf}{\@rrf{S}} |
| 8241 |
\newcommand{\SquareSf}{\@tlen\@SquareLetter{\rrSf}\@tlen} |
| 8242 |
\newcommand{\rrhSf}{\raisebox{-0.25mm}{\SquareSf}} |
| 8243 |
\newcommand{\RubikSf}{\raisebox{\@hRubik}{\SquareSf}} |
| 8244 |
\newcommand{\textRubikSf}{\rrhSf} |
| 8245 |
% \end{macrocode} |
| 8246 |
% \end{macro} |
| 8247 |
% \end{macro} |
| 8248 |
% \end{macro} |
| 8249 |
% \end{macro} |
| 8250 |
% |
| 8251 |
% |
| 8252 |
% \subsubsection{\hspace{3mm}Rotation Sfp} |
| 8253 |
% |
| 8254 |
% \begin{macro}{\rrSfp} |
| 8255 |
% \begin{macro}{\rrhSfp} |
| 8256 |
% \begin{macro}{\RubikSfp} |
| 8257 |
% \begin{macro}{\textRubikSfp} |
| 8258 |
% These commands draw forms of the Singmaster Sfp slice rotation. |
| 8259 |
% We need to just make square with Sfp in square; |
| 8260 |
% adjust box height using a \cmd{\rule}; |
| 8261 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 8262 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 8263 |
% bounded by \{\} so no need to reset to defaults. |
| 8264 |
% Not visible from the front. |
| 8265 |
% \begin{macrocode} |
| 8266 |
\newcommand{\rrSfp}{\@rrfp{S}} |
| 8267 |
\newcommand{\SquareSfp}{\@tlen\@SquareLetter{\rrSfp}\@tlen} |
| 8268 |
\newcommand{\rrhSfp}{\raisebox{-0.25mm}{\SquareSfp}} |
| 8269 |
\newcommand{\RubikSfp}{\raisebox{\@hRubik}{\SquareSfp}} |
| 8270 |
\newcommand{\textRubikSfp}{\rrhSfp} |
| 8271 |
% \end{macrocode} |
| 8272 |
% \end{macro} |
| 8273 |
% \end{macro} |
| 8274 |
% \end{macro} |
| 8275 |
% \end{macro} |
| 8276 |
% |
| 8277 |
% |
| 8278 |
% \subsubsection{\hspace{3mm}Rotation Sb} |
| 8279 |
% |
| 8280 |
% \begin{macro}{\rrSb} |
| 8281 |
% \begin{macro}{\rrhSb} |
| 8282 |
% \begin{macro}{\RubikSb} |
| 8283 |
% \begin{macro}{\textRubikSb} |
| 8284 |
% These commands draw forms of the Singmaster Sb slice rotation. |
| 8285 |
% We need to just make square with Sb in square; |
| 8286 |
% adjust box height using a \cmd{\rule}; |
| 8287 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 8288 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 8289 |
% bounded by \{\} so no need to reset to defaults. |
| 8290 |
% Not visible from the front. |
| 8291 |
% \begin{macrocode} |
| 8292 |
\newcommand{\rrSb}{\@rrb{S}} |
| 8293 |
\newcommand{\SquareSb}{\@tlen\@SquareLetter{\rrSb}\@tlen} |
| 8294 |
\newcommand{\rrhSb}{\raisebox{-0.25mm}{\SquareSb}} |
| 8295 |
\newcommand{\RubikSb}{\raisebox{\@hRubik}{\SquareSb}} |
| 8296 |
\newcommand{\textRubikSb}{\rrhSb} |
| 8297 |
% \end{macrocode} |
| 8298 |
% \end{macro} |
| 8299 |
% \end{macro} |
| 8300 |
% \end{macro} |
| 8301 |
% \end{macro} |
| 8302 |
% |
| 8303 |
% |
| 8304 |
% \subsubsection{\hspace{3mm}Rotation Sbp} |
| 8305 |
% |
| 8306 |
% \begin{macro}{\rrSbp} |
| 8307 |
% \begin{macro}{\rrhSbp} |
| 8308 |
% \begin{macro}{\RubikSbp} |
| 8309 |
% \begin{macro}{\textRubikSbp} |
| 8310 |
% These commands draw forms of the Singmaster Sbp slice rotation. |
| 8311 |
% We need to just make square with Sbp in square; |
| 8312 |
% adjust box height using a \cmd{\rule}; |
| 8313 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 8314 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 8315 |
% bounded by \{\} so no need to reset to defaults. |
| 8316 |
% Not visible from th front. |
| 8317 |
% \begin{macrocode} |
| 8318 |
\newcommand{\rrSbp}{\@rrbp{S}} |
| 8319 |
\newcommand{\SquareSbp}{\@tlen\@SquareLetter{\rrSbp}\@tlen} |
| 8320 |
\newcommand{\rrhSbp}{\raisebox{-0.25mm}{\SquareSbp}} |
| 8321 |
\newcommand{\RubikSbp}{\raisebox{\@hRubik}{\SquareSbp}} |
| 8322 |
\newcommand{\textRubikSbp}{\rrhSbp} |
| 8323 |
% \end{macrocode} |
| 8324 |
% \end{macro} |
| 8325 |
% \end{macro} |
| 8326 |
% \end{macro} |
| 8327 |
% \end{macro} |
| 8328 |
% |
| 8329 |
% |
| 8330 |
% \subsubsection{\hspace{3mm}Rotation U} |
| 8331 |
% |
| 8332 |
% \begin{macro}{\rrU} |
| 8333 |
% \begin{macro}{\SquareU} |
| 8334 |
% \begin{macro}{\rrhU} |
| 8335 |
% \begin{macro}{\RubikU} |
| 8336 |
% \begin{macro}{\textRubikU} |
| 8337 |
% These commands all draw forms which denote the U rotation. |
| 8338 |
% \begin{macrocode} |
| 8339 |
\newcommand{\rrU}{\@rr{U}} |
| 8340 |
%% |
| 8341 |
\newcommand{\SquareU}{% |
| 8342 |
\begin{tikzpicture}[scale=0.5] |
| 8343 |
\DrawNotationBox; |
| 8344 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8345 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8346 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8347 |
\end{tikzpicture}% |
| 8348 |
} |
| 8349 |
\newcommand{\rrhU}{\raisebox{-0.333\height}{\@tlen\SquareU\@tlen}} |
| 8350 |
%% |
| 8351 |
\newcommand{\RubikU}{% |
| 8352 |
{\@rubikfont% |
| 8353 |
\begin{minipage}{0.6cm} |
| 8354 |
\centering% |
| 8355 |
\SquareU\\ |
| 8356 |
\rrU% |
| 8357 |
\end{minipage}%% |
| 8358 |
}} |
| 8359 |
\newcommand{\textRubikU}{\rrU\,\rrhU} |
| 8360 |
% \end{macrocode} |
| 8361 |
% \end{macro} |
| 8362 |
% \end{macro} |
| 8363 |
% \end{macro} |
| 8364 |
% \end{macro} |
| 8365 |
% \end{macro} |
| 8366 |
% |
| 8367 |
% |
| 8368 |
% \subsubsection{\hspace{3mm}Rotation Uw} |
| 8369 |
% |
| 8370 |
% \begin{macro}{\rrUw} |
| 8371 |
% \begin{macro}{\SquareUw} |
| 8372 |
% \begin{macro}{\rrhUw} |
| 8373 |
% \begin{macro}{\RubikUw} |
| 8374 |
% \begin{macro}{\textRubikUw} |
| 8375 |
% These commands all draw forms which denote the Uw rotation. |
| 8376 |
% \begin{macrocode} |
| 8377 |
\newcommand{\rrUw}{\@rrw{U}} |
| 8378 |
%% |
| 8379 |
\newcommand{\SquareUw}{% |
| 8380 |
\begin{tikzpicture}[scale=0.5] |
| 8381 |
\DrawNotationBox; |
| 8382 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8383 |
\draw [thick, <-] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8384 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8385 |
\end{tikzpicture}% |
| 8386 |
} |
| 8387 |
% |
| 8388 |
\newcommand{\rrhUw}{\raisebox{-0.333\height}{\@tlen\SquareUw\@tlen}} |
| 8389 |
%% |
| 8390 |
\newcommand{\RubikUw}{% |
| 8391 |
{\@rubikfont% |
| 8392 |
\begin{minipage}{0.6cm} |
| 8393 |
\centering% |
| 8394 |
\SquareUw\\ |
| 8395 |
\rrUw% |
| 8396 |
\end{minipage}%% |
| 8397 |
}} |
| 8398 |
%% |
| 8399 |
\newcommand{\textRubikUw}{\rrUw\,\rrhUw} |
| 8400 |
% \end{macrocode} |
| 8401 |
% \end{macro} |
| 8402 |
% \end{macro} |
| 8403 |
% \end{macro} |
| 8404 |
% \end{macro} |
| 8405 |
% \end{macro} |
| 8406 |
% |
| 8407 |
% |
| 8408 |
% \subsubsection{\hspace{3mm}Rotation Up} |
| 8409 |
% |
| 8410 |
% \begin{macro}{\rrUp} |
| 8411 |
% \begin{macro}{\SquareUp} |
| 8412 |
% \begin{macro}{\rrhUp} |
| 8413 |
% \begin{macro}{\RubikUp} |
| 8414 |
% \begin{macro}{\textRubikUp} |
| 8415 |
% These commands all draw forms which denote the Up rotation. |
| 8416 |
% \begin{macrocode} |
| 8417 |
\newcommand{\rrUp}{\@rrp{U}} |
| 8418 |
%% |
| 8419 |
\newcommand{\SquareUp}{% |
| 8420 |
\begin{tikzpicture}[scale=0.5] |
| 8421 |
\DrawNotationBox; |
| 8422 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8423 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8424 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8425 |
\end{tikzpicture}% |
| 8426 |
} |
| 8427 |
\newcommand{\rrhUp}{\raisebox{-0.333\height}{\@tlen\SquareUp\@tlen}} |
| 8428 |
%% |
| 8429 |
\newcommand{\RubikUp}{% |
| 8430 |
{\@rubikfont% |
| 8431 |
\begin{minipage}{0.6cm} |
| 8432 |
\centering% |
| 8433 |
\SquareUp\\ |
| 8434 |
\rrUp% |
| 8435 |
\end{minipage}%% |
| 8436 |
}} |
| 8437 |
\newcommand{\textRubikUp}{\rrUp\,\rrhUp} |
| 8438 |
% \end{macrocode} |
| 8439 |
% \end{macro} |
| 8440 |
% \end{macro} |
| 8441 |
% \end{macro} |
| 8442 |
% \end{macro} |
| 8443 |
% \end{macro} |
| 8444 |
% |
| 8445 |
% |
| 8446 |
% \subsubsection{\hspace{3mm}Rotation Uwp} |
| 8447 |
% |
| 8448 |
% \begin{macro}{\rrUwp} |
| 8449 |
% \begin{macro}{\SquareUwp} |
| 8450 |
% \begin{macro}{\rrhUwp} |
| 8451 |
% \begin{macro}{\RubikUwp} |
| 8452 |
% \begin{macro}{\textRubikUwp} |
| 8453 |
% These commands all draw forms which denote the Uwp rotation. |
| 8454 |
% \begin{macrocode} |
| 8455 |
\newcommand{\rrUwp}{\@rrwp{U}} |
| 8456 |
%% |
| 8457 |
\newcommand{\SquareUwp}{% |
| 8458 |
\begin{tikzpicture}[scale=0.5] |
| 8459 |
\DrawNotationBox; |
| 8460 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8461 |
\draw [thick, ->] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8462 |
\draw [thick] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8463 |
\end{tikzpicture}% |
| 8464 |
} |
| 8465 |
\newcommand{\rrhUwp}{\raisebox{-0.333\height}{\@tlen\SquareUwp\@tlen}} |
| 8466 |
%% |
| 8467 |
\newcommand{\RubikUwp}{% |
| 8468 |
{\@rubikfont% |
| 8469 |
\begin{minipage}{0.6cm} |
| 8470 |
\centering% |
| 8471 |
\SquareUwp\\ |
| 8472 |
\rrUwp% |
| 8473 |
\end{minipage}%% |
| 8474 |
}} |
| 8475 |
\newcommand{\textRubikUwp}{\rrUwp\,\rrhUwp} |
| 8476 |
% \end{macrocode} |
| 8477 |
% \end{macro} |
| 8478 |
% \end{macro} |
| 8479 |
% \end{macro} |
| 8480 |
% \end{macro} |
| 8481 |
% \end{macro} |
| 8482 |
% |
| 8483 |
% |
| 8484 |
% \subsubsection{\hspace{3mm}Rotation Us} |
| 8485 |
% |
| 8486 |
% \begin{macro}{\rrUs} |
| 8487 |
% \begin{macro}{\SquareUs} |
| 8488 |
% \begin{macro}{\rrhUs} |
| 8489 |
% \begin{macro}{\RubikUs} |
| 8490 |
% \begin{macro}{\textRubikUs} |
| 8491 |
% These commands all draw forms which denote the Us rotation. |
| 8492 |
% \begin{macrocode} |
| 8493 |
\newcommand{\rrUs}{\@rrs{U}} |
| 8494 |
%% |
| 8495 |
\newcommand{\SquareUs}{% |
| 8496 |
\begin{tikzpicture}[scale=0.5] |
| 8497 |
\DrawNotationBox; |
| 8498 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8499 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8500 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8501 |
\end{tikzpicture}% |
| 8502 |
} |
| 8503 |
\newcommand{\rrhUs}{\raisebox{-0.333\height}{\@tlen\SquareUs\@tlen}} |
| 8504 |
%% |
| 8505 |
\newcommand{\RubikUs}{% |
| 8506 |
{\@rubikfont% |
| 8507 |
\begin{minipage}{0.6cm} |
| 8508 |
\centering% |
| 8509 |
\SquareUs\\ |
| 8510 |
\rrUs% |
| 8511 |
\end{minipage}% |
| 8512 |
}} |
| 8513 |
\newcommand{\textRubikUs}{\rrUs\,\rrhUs} |
| 8514 |
% \end{macrocode} |
| 8515 |
% \end{macro} |
| 8516 |
% \end{macro} |
| 8517 |
% \end{macro} |
| 8518 |
% \end{macro} |
| 8519 |
% \end{macro} |
| 8520 |
% |
| 8521 |
% |
| 8522 |
% \subsubsection{\hspace{3mm}Rotation Usp} |
| 8523 |
% |
| 8524 |
% \begin{macro}{\rrUsp} |
| 8525 |
% \begin{macro}{\SquareUsp} |
| 8526 |
% \begin{macro}{\rrhUs} |
| 8527 |
% \begin{macro}{\RubikUs} |
| 8528 |
% \begin{macro}{\textRubikUsp} |
| 8529 |
% These commands all draw forms which denote the Usp rotation. |
| 8530 |
% \begin{macrocode} |
| 8531 |
\newcommand{\rrUsp}{\@rrsp{U}} |
| 8532 |
%% |
| 8533 |
\newcommand{\SquareUsp}{% |
| 8534 |
\begin{tikzpicture}[scale=0.5] |
| 8535 |
\DrawNotationBox; |
| 8536 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8537 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8538 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8539 |
\end{tikzpicture}% |
| 8540 |
} |
| 8541 |
\newcommand{\rrhUsp}{\raisebox{-0.333\height}{\@tlen\SquareUsp\@tlen}} |
| 8542 |
%% |
| 8543 |
\newcommand{\RubikUsp}{% |
| 8544 |
{\@rubikfont% |
| 8545 |
\begin{minipage}{0.6cm} |
| 8546 |
\centering% |
| 8547 |
\SquareUsp\\ |
| 8548 |
\rrUsp% |
| 8549 |
\end{minipage}% |
| 8550 |
}} |
| 8551 |
\newcommand{\textRubikUsp}{\rrUsp\,\rrhUsp} |
| 8552 |
% \end{macrocode} |
| 8553 |
% \end{macro} |
| 8554 |
% \end{macro} |
| 8555 |
% \end{macro} |
| 8556 |
% \end{macro} |
| 8557 |
% \end{macro} |
| 8558 |
% |
| 8559 |
% |
| 8560 |
% \subsubsection{\hspace{3mm}Rotation Ua} |
| 8561 |
% |
| 8562 |
% \begin{macro}{\rrUa} |
| 8563 |
% \begin{macro}{\SquareUa} |
| 8564 |
% \begin{macro}{\rrhUa} |
| 8565 |
% \begin{macro}{\RubikUa} |
| 8566 |
% \begin{macro}{\textRubikUa} |
| 8567 |
% These commands all draw forms which denote the Ua rotation. |
| 8568 |
% \begin{macrocode} |
| 8569 |
\newcommand{\rrUa}{\@rra{U}} |
| 8570 |
%% |
| 8571 |
\newcommand{\SquareUa}{% |
| 8572 |
\begin{tikzpicture}[scale=0.5] |
| 8573 |
\DrawNotationBox; |
| 8574 |
\draw [thick, <-] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8575 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8576 |
\draw [thick, ->] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8577 |
\end{tikzpicture}% |
| 8578 |
} |
| 8579 |
\newcommand{\rrhUa}{\raisebox{-0.333\height}{\@tlen\SquareUa\@tlen}} |
| 8580 |
%% |
| 8581 |
\newcommand{\RubikUa}{% |
| 8582 |
{\@rubikfont% |
| 8583 |
\begin{minipage}{0.6cm} |
| 8584 |
\centering% |
| 8585 |
\SquareUa\\ |
| 8586 |
\rrUa% |
| 8587 |
\end{minipage}% |
| 8588 |
}} |
| 8589 |
\newcommand{\textRubikUa}{\rrUa\,\rrhUa} |
| 8590 |
% \end{macrocode} |
| 8591 |
% \end{macro} |
| 8592 |
% \end{macro} |
| 8593 |
% \end{macro} |
| 8594 |
% \end{macro} |
| 8595 |
% \end{macro} |
| 8596 |
% |
| 8597 |
% |
| 8598 |
% \subsubsection{\hspace{3mm}Rotation Uap} |
| 8599 |
% |
| 8600 |
% \begin{macro}{\rrUap} |
| 8601 |
% \begin{macro}{\SquareUap} |
| 8602 |
% \begin{macro}{\rrhUap} |
| 8603 |
% \begin{macro}{\RubikUap} |
| 8604 |
% \begin{macro}{\textRubikUap} |
| 8605 |
% These commands all draw forms which denote the Uap rotation. |
| 8606 |
% \begin{macrocode} |
| 8607 |
\newcommand{\rrUap}{\@rrap{U}} |
| 8608 |
%% |
| 8609 |
\newcommand{\SquareUap}{% |
| 8610 |
\begin{tikzpicture}[scale=0.5] |
| 8611 |
\DrawNotationBox; |
| 8612 |
\draw [thick, ->] (\@sb,\@sddd) -- (\@sbh, \@sddd); |
| 8613 |
\draw [thick] (\@sb,\@sdd) -- (\@sbh, \@sdd); |
| 8614 |
\draw [thick, <-] (\@sb,\@sd) -- (\@sbh, \@sd); |
| 8615 |
\end{tikzpicture}% |
| 8616 |
} |
| 8617 |
\newcommand{\rrhUap}{\raisebox{-0.333\height}{\@tlen\SquareUap\@tlen}} |
| 8618 |
%% |
| 8619 |
\newcommand{\RubikUap}{% |
| 8620 |
{\@rubikfont% |
| 8621 |
\begin{minipage}{0.6cm} |
| 8622 |
\centering% |
| 8623 |
\SquareUap\\ |
| 8624 |
\rrUap% |
| 8625 |
\end{minipage}% |
| 8626 |
}} |
| 8627 |
\newcommand{\textRubikUap}{\rrUap\,\rrhUap} |
| 8628 |
% \end{macrocode} |
| 8629 |
% \end{macro} |
| 8630 |
% \end{macro} |
| 8631 |
% \end{macro} |
| 8632 |
% \end{macro} |
| 8633 |
% \end{macro} |
| 8634 |
% |
| 8635 |
% |
| 8636 |
% |
| 8637 |
% \subsubsection{\hspace{3mm}Rotations x and xp} |
| 8638 |
% |
| 8639 |
% \begin{macro}{\rrx} |
| 8640 |
% \begin{macro}{\rrhx} |
| 8641 |
% \begin{macro}{\Rubikx} |
| 8642 |
% These commands all draw forms which denote the x rotation. |
| 8643 |
% \begin{macrocode} |
| 8644 |
\newcommand{\rrx}{\@rr{x}} |
| 8645 |
\newcommand{\Rubikx}{\@xyzRubik{x}} |
| 8646 |
\newcommand{\rrhx}{\@xyzh{x}} |
| 8647 |
% \end{macrocode} |
| 8648 |
% \end{macro} |
| 8649 |
% \end{macro} |
| 8650 |
% \end{macro} |
| 8651 |
% \begin{macro}{\rrxp} |
| 8652 |
% \begin{macro}{\rrhxp} |
| 8653 |
% \begin{macro}{\Rubikxp} |
| 8654 |
% These commands all draw forms which denote the xp rotation. |
| 8655 |
% \begin{macrocode} |
| 8656 |
\newcommand{\rrxp}{\@rrp{x}} |
| 8657 |
\newcommand{\Rubikxp}{\@xyzRubikp{x}} |
| 8658 |
\newcommand{\rrhxp}{\@xyzhp{x}} |
| 8659 |
% \end{macrocode} |
| 8660 |
% \end{macro} |
| 8661 |
% \end{macro} |
| 8662 |
% \end{macro} |
| 8663 |
% |
| 8664 |
% |
| 8665 |
% \subsubsection{\hspace{3mm}Rotations y and yp} |
| 8666 |
% |
| 8667 |
% \begin{macro}{\rry} |
| 8668 |
% \begin{macro}{\rrhy} |
| 8669 |
% \begin{macro}{\Rubiky} |
| 8670 |
% These commands all draw forms which denote the y rotation. |
| 8671 |
% \begin{macrocode} |
| 8672 |
\newcommand{\rry}{\@rr{y}} |
| 8673 |
\newcommand{\Rubiky}{\@xyzRubik{y}} |
| 8674 |
\newcommand{\rrhy}{\@xyzh{y}} |
| 8675 |
% \end{macrocode} |
| 8676 |
% \end{macro} |
| 8677 |
% \end{macro} |
| 8678 |
% \end{macro} |
| 8679 |
% \begin{macro}{\rryp} |
| 8680 |
% \begin{macro}{\rrhyp} |
| 8681 |
% \begin{macro}{\Rubikyp} |
| 8682 |
% These commands all draw forms which denote the yp rotation. |
| 8683 |
% \begin{macrocode} |
| 8684 |
\newcommand{\rryp}{\@rrp{y}} |
| 8685 |
\newcommand{\Rubikyp}{\@xyzRubikp{y}} |
| 8686 |
\newcommand{\rrhyp}{\@xyzhp{y}} |
| 8687 |
% \end{macrocode} |
| 8688 |
% \end{macro} |
| 8689 |
% \end{macro} |
| 8690 |
% \end{macro} |
| 8691 |
% |
| 8692 |
% |
| 8693 |
% \subsubsection{\hspace{3mm}Rotations z and zp} |
| 8694 |
% |
| 8695 |
% \begin{macro}{\rrz} |
| 8696 |
% \begin{macro}{\rrhz} |
| 8697 |
% \begin{macro}{\Rubikz} |
| 8698 |
% These commands all draw forms which denote the z rotation. |
| 8699 |
% \begin{macrocode} |
| 8700 |
\newcommand{\rrz}{\@rr{z}} |
| 8701 |
\newcommand{\Rubikz}{\@xyzRubik{z}} |
| 8702 |
\newcommand{\rrhz}{\@xyzh{z}} |
| 8703 |
% \end{macrocode} |
| 8704 |
% \end{macro} |
| 8705 |
% \end{macro} |
| 8706 |
% \end{macro} |
| 8707 |
% \begin{macro}{\rrzp} |
| 8708 |
% \begin{macro}{\rrhzp} |
| 8709 |
% \begin{macro}{\Rubikzp} |
| 8710 |
% These commands all draw forms which denote the zp rotation. |
| 8711 |
% \begin{macrocode} |
| 8712 |
\newcommand{\rrzp}{\@rrp{z}} |
| 8713 |
\newcommand{\Rubikzp}{\@xyzRubikp{z}} |
| 8714 |
\newcommand{\rrhzp}{\@xyzhp{z}} |
| 8715 |
% \end{macrocode} |
| 8716 |
% \end{macro} |
| 8717 |
% \end{macro} |
| 8718 |
% \end{macro} |
| 8719 |
% |
| 8720 |
% |
| 8721 |
% \subsubsection{\hspace{3mm}Rotations u and d} |
| 8722 |
% |
| 8723 |
% \begin{macro}{\rru} |
| 8724 |
% \begin{macro}{\rrhu} |
| 8725 |
% \begin{macro}{\Rubiku} |
| 8726 |
% These commands all draw forms which denote the u and up cube rotation. |
| 8727 |
% \begin{macrocode} |
| 8728 |
\newcommand{\rru}{\@rr{u}} |
| 8729 |
\newcommand{\rrup}{\@rrp{u}} |
| 8730 |
\newcommand{\rrhu}{\@xyzh{u}} |
| 8731 |
\newcommand{\rrhup}{\@xyzhp{u}} |
| 8732 |
\newcommand{\Rubiku}{\@xyzRubik{u}} |
| 8733 |
\newcommand{\Rubikup}{\@xyzRubikp{u}} |
| 8734 |
% \end{macrocode} |
| 8735 |
% \end{macro} |
| 8736 |
% \end{macro} |
| 8737 |
% \end{macro} |
| 8738 |
% \begin{macro}{\rrd} |
| 8739 |
% \begin{macro}{\rrhd} |
| 8740 |
% \begin{macro}{\Rubikd} |
| 8741 |
% These commands all draw forms which denote the d and dp cube rotation. |
| 8742 |
% \begin{macrocode} |
| 8743 |
\newcommand{\rrd}{\@rr{d}} |
| 8744 |
\newcommand{\rrdp}{\@rrp{d}} |
| 8745 |
\newcommand{\rrhd}{\@xyzhbdfl{d}} |
| 8746 |
\newcommand{\rrhdp}{\@xyzhbdflp{d}} |
| 8747 |
\newcommand{\Rubikd}{\@xyzbdflRubik{d}} |
| 8748 |
\newcommand{\Rubikdp}{\@xyzbdflRubikp{d}} |
| 8749 |
% \end{macrocode} |
| 8750 |
% \end{macro} |
| 8751 |
% \end{macro} |
| 8752 |
% \end{macro} |
| 8753 |
% |
| 8754 |
% |
| 8755 |
% \subsubsection{\hspace{3mm}Rotations l and r} |
| 8756 |
% |
| 8757 |
% \begin{macro}{\rrl} |
| 8758 |
% \begin{macro}{\rrhl} |
| 8759 |
% \begin{macro}{\Rubikl} |
| 8760 |
% These commands all draw forms which denote the l and lp cube rotation. |
| 8761 |
% \begin{macrocode} |
| 8762 |
\newcommand{\rrl}{\@rr{l}} |
| 8763 |
\newcommand{\rrlp}{\@rrp{l}} |
| 8764 |
\newcommand{\rrhl}{\@xyzhbdfl{l}} |
| 8765 |
\newcommand{\rrhlp}{\@xyzhbdflp{l}} |
| 8766 |
\newcommand{\Rubikl}{\@xyzbdflRubik{l}} |
| 8767 |
\newcommand{\Rubiklp}{\@xyzbdflRubikp{l}} |
| 8768 |
% \end{macrocode} |
| 8769 |
% \end{macro} |
| 8770 |
% \end{macro} |
| 8771 |
% \end{macro} |
| 8772 |
% \begin{macro}{\rrr} |
| 8773 |
% \begin{macro}{\rrhr} |
| 8774 |
% \begin{macro}{\Rubikr} |
| 8775 |
% These commands all draw forms which denote the r and rp cube rotation. |
| 8776 |
% \begin{macrocode} |
| 8777 |
\newcommand{\rrr}{\@rr{r}} |
| 8778 |
\newcommand{\rrrp}{\@rrp{r}} |
| 8779 |
\newcommand{\rrhr}{\@xyzh{r}} |
| 8780 |
\newcommand{\rrhrp}{\@xyzhp{r}} |
| 8781 |
\newcommand{\Rubikr}{\@xyzRubik{r}} |
| 8782 |
\newcommand{\Rubikrp}{\@xyzRubikp{r}} |
| 8783 |
% \end{macrocode} |
| 8784 |
% \end{macro} |
| 8785 |
% \end{macro} |
| 8786 |
% \end{macro} |
| 8787 |
% |
| 8788 |
% |
| 8789 |
% \subsubsection{\hspace{3mm}Rotations f and b} |
| 8790 |
% |
| 8791 |
% \begin{macro}{\rrf} |
| 8792 |
% \begin{macro}{\rrhf} |
| 8793 |
% \begin{macro}{\Rubikf} |
| 8794 |
% These commands all draw forms which denote the f and fp cube rotation. |
| 8795 |
% \begin{macrocode} |
| 8796 |
\newcommand{\rrf}{\@rr{f}} |
| 8797 |
\newcommand{\rrfp}{\@rrp{f}} |
| 8798 |
\newcommand{\rrhf}{\@xyzhbdfl{f}} |
| 8799 |
\newcommand{\rrhfp}{\@xyzhbdflp{f}} |
| 8800 |
\newcommand{\Rubikf}{\@xyzbdflRubik{f}} |
| 8801 |
\newcommand{\Rubikfp}{\@xyzbdflRubikp{f}} |
| 8802 |
% \end{macrocode} |
| 8803 |
% \end{macro} |
| 8804 |
% \end{macro} |
| 8805 |
% \end{macro} |
| 8806 |
% \begin{macro}{\rrb} |
| 8807 |
% \begin{macro}{\rrhb} |
| 8808 |
% \begin{macro}{\Rubikb} |
| 8809 |
% These commands all draw forms which denote the b and bp cube rotation. |
| 8810 |
% \begin{macrocode} |
| 8811 |
\newcommand{\rrb}{\@rr{b}} |
| 8812 |
\newcommand{\rrbp}{\@rrp{b}} |
| 8813 |
\newcommand{\rrhb}{\@xyzhbdfl{b}} |
| 8814 |
\newcommand{\rrhbp}{\@xyzhbdflp{b}} |
| 8815 |
\newcommand{\Rubikb}{\@xyzbdflRubik{b}} |
| 8816 |
\newcommand{\Rubikbp}{\@xyzbdflRubikp{b}} |
| 8817 |
% \end{macrocode} |
| 8818 |
% \end{macro} |
| 8819 |
% \end{macro} |
| 8820 |
% \end{macro} |
| 8821 |
% |
| 8822 |
% |
| 8823 |
% \subsection{\hspace{3mm}Face(c) and Face(m) rotations} |
| 8824 |
% \label{sec:codeJaap} |
| 8825 |
% |
| 8826 |
% This subsection (added Nov 2016) is to accommodate some additional notation, |
| 8827 |
% much used on the Jaap Puzzles website (Scherphius J), which, although quite |
| 8828 |
% convenient, is technically `non-standard'. This additional notation |
| 8829 |
% makes available the (middle slice) rotations of the form Rm, Rmp, Lm, Lmp, ... and |
| 8830 |
% also the (whole cube) rotations Rc, Lc, ... (referenced to a face) as used on the |
| 8831 |
% Cube Lovers usenet group (1981--1997). This notation was probably invented by Singmaster |
| 8832 |
% (see Scherphius J). |
| 8833 |
% |
| 8834 |
% \begin{macro}{\@xyzhc} |
| 8835 |
% \begin{macro}{\@xyzhcp} |
| 8836 |
% \begin{macro}{\@xyzRubikc} |
| 8837 |
% \begin{macro}{\@xyzRubikcp} |
| 8838 |
% First we have some useful facilitating commands we shall make use of in |
| 8839 |
% conjunction with the Face(c) and Face(cp) notation. |
| 8840 |
% \begin{macrocode} |
| 8841 |
\newcommand{\@xyzhc}[1]{[\raisebox{-1.2pt}% |
| 8842 |
{{\@rubikfont #1\@rubikfontFNS c}}]} |
| 8843 |
\newcommand{\@xyzhcp}[1]{[\raisebox{-1.2pt}% |
| 8844 |
{{\@rubikfont #1{\@rubikfontFNS c}\@rubikprime}}]} |
| 8845 |
\newcommand{\@xyzRubikc}[1]{\raisebox{3.45pt}% |
| 8846 |
{[\raisebox{-1.2pt}{{\@rubikfont #1\@rubikfontFNS c}}]}} |
| 8847 |
\newcommand{\@xyzRubikcp}[1]{\raisebox{3.45pt}% |
| 8848 |
{[\raisebox{-1.2pt}{{\@rubikfont #1{\@rubikfontFNS c}\@rubikprime}}]}} |
| 8849 |
% \end{macrocode} |
| 8850 |
% \end{macro} |
| 8851 |
% \end{macro} |
| 8852 |
% \end{macro} |
| 8853 |
% \end{macro} |
| 8854 |
% |
| 8855 |
% |
| 8856 |
% \subsubsection{\hspace{3mm}Rotations Rc and Rcp} |
| 8857 |
% |
| 8858 |
% Whole cube rotations Rc = x, Rcp = xp. |
| 8859 |
% |
| 8860 |
% \begin{macro}{\rrRc} |
| 8861 |
% \begin{macro}{\rrhRc} |
| 8862 |
% \begin{macro}{\RubikRc} |
| 8863 |
% These commands all draw forms which denote the Rc rotation. |
| 8864 |
% \begin{macrocode} |
| 8865 |
\newcommand{\rrRc}{\@rrc{R}} |
| 8866 |
\newcommand{\RubikRc}{\@xyzRubikc{R}} |
| 8867 |
\newcommand{\rrhRc}{\@xyzhc{R}} |
| 8868 |
% \end{macrocode} |
| 8869 |
% \end{macro} |
| 8870 |
% \end{macro} |
| 8871 |
% \end{macro} |
| 8872 |
% \begin{macro}{\rrRcp} |
| 8873 |
% \begin{macro}{\rrhRcp} |
| 8874 |
% \begin{macro}{\RubikRcp} |
| 8875 |
% These commands all draw forms which denote the Rcp rotation. |
| 8876 |
% \begin{macrocode} |
| 8877 |
\newcommand{\rrRcp}{\@rrcp{R}} |
| 8878 |
\newcommand{\RubikRcp}{\@xyzRubikcp{R}} |
| 8879 |
\newcommand{\rrhRcp}{\@xyzhcp{R}} |
| 8880 |
% \end{macrocode} |
| 8881 |
% \end{macro} |
| 8882 |
% \end{macro} |
| 8883 |
% \end{macro} |
| 8884 |
% |
| 8885 |
% |
| 8886 |
% \subsubsection{\hspace{3mm}Rotations Lc and Lcp} |
| 8887 |
% |
| 8888 |
% Whole cube rotations Lc = xp, Lcp = x. |
| 8889 |
% |
| 8890 |
% \begin{macro}{\rrLc} |
| 8891 |
% \begin{macro}{\rrhLc} |
| 8892 |
% \begin{macro}{\RubikLc} |
| 8893 |
% These commands all draw forms which denote the Lc rotation. |
| 8894 |
% \begin{macrocode} |
| 8895 |
\newcommand{\rrLc}{\@rrc{L}} |
| 8896 |
\newcommand{\RubikLc}{\@xyzRubikc{L}} |
| 8897 |
\newcommand{\rrhLc}{\@xyzhc{L}} |
| 8898 |
% \end{macrocode} |
| 8899 |
% \end{macro} |
| 8900 |
% \end{macro} |
| 8901 |
% \end{macro} |
| 8902 |
% \begin{macro}{\rrLcp} |
| 8903 |
% \begin{macro}{\rrhLcp} |
| 8904 |
% \begin{macro}{\RubikLcp} |
| 8905 |
% These commands all draw forms which denote the Lcp rotation. |
| 8906 |
% \begin{macrocode} |
| 8907 |
\newcommand{\rrLcp}{\@rrcp{L}} |
| 8908 |
\newcommand{\RubikLcp}{\@xyzRubikcp{L}} |
| 8909 |
\newcommand{\rrhLcp}{\@xyzhcp{L}} |
| 8910 |
% \end{macrocode} |
| 8911 |
% \end{macro} |
| 8912 |
% \end{macro} |
| 8913 |
% \end{macro} |
| 8914 |
% |
| 8915 |
% |
| 8916 |
% \subsubsection{\hspace{3mm}Rotations Uc and Ucp} |
| 8917 |
% |
| 8918 |
% Whole cube rotation Uc = y, Ucp=yp. |
| 8919 |
% |
| 8920 |
% \begin{macro}{\rrUc} |
| 8921 |
% \begin{macro}{\rrhUc} |
| 8922 |
% \begin{macro}{\RubikUc} |
| 8923 |
% These commands all draw forms which denote the Uc rotation. |
| 8924 |
% \begin{macrocode} |
| 8925 |
\newcommand{\rrUc}{\@rrc{U}} |
| 8926 |
\newcommand{\RubikUc}{\@xyzRubikc{U}} |
| 8927 |
\newcommand{\rrhUc}{\@xyzhc{U}} |
| 8928 |
% \end{macrocode} |
| 8929 |
% \end{macro} |
| 8930 |
% \end{macro} |
| 8931 |
% \end{macro} |
| 8932 |
% \begin{macro}{\rrUcp} |
| 8933 |
% \begin{macro}{\rrhUcp} |
| 8934 |
% \begin{macro}{\RubikUcp} |
| 8935 |
% These commands all draw forms which denote the Ucp rotation. |
| 8936 |
% \begin{macrocode} |
| 8937 |
\newcommand{\rrUcp}{\@rrcp{U}} |
| 8938 |
\newcommand{\RubikUcp}{\@xyzRubikcp{U}} |
| 8939 |
\newcommand{\rrhUcp}{\@xyzhcp{U}} |
| 8940 |
% \end{macrocode} |
| 8941 |
% \end{macro} |
| 8942 |
% \end{macro} |
| 8943 |
% \end{macro} |
| 8944 |
% |
| 8945 |
% |
| 8946 |
% \subsubsection{\hspace{3mm}Rotations Dc and Dcp} |
| 8947 |
% |
| 8948 |
% Whole cube rotations Dc = yp, Dcp = y. |
| 8949 |
% |
| 8950 |
% \begin{macro}{\rrDc} |
| 8951 |
% \begin{macro}{\rrhDc} |
| 8952 |
% \begin{macro}{\RubikDc} |
| 8953 |
% These commands all draw forms which denote the Dc rotation. |
| 8954 |
% \begin{macrocode} |
| 8955 |
\newcommand{\rrDc}{\@rrc{D}} |
| 8956 |
\newcommand{\RubikDc}{\@xyzRubikc{D}} |
| 8957 |
\newcommand{\rrhDc}{\@xyzhc{D}} |
| 8958 |
% \end{macrocode} |
| 8959 |
% \end{macro} |
| 8960 |
% \end{macro} |
| 8961 |
% \end{macro} |
| 8962 |
% \begin{macro}{\rrDcp} |
| 8963 |
% \begin{macro}{\rrhDcp} |
| 8964 |
% \begin{macro}{\RubikDcp} |
| 8965 |
% These commands all draw forms which denote the Dcp rotation. |
| 8966 |
% \begin{macrocode} |
| 8967 |
\newcommand{\rrDcp}{\@rrcp{D}} |
| 8968 |
\newcommand{\RubikDcp}{\@xyzRubikcp{D}} |
| 8969 |
\newcommand{\rrhDcp}{\@xyzhcp{D}} |
| 8970 |
% \end{macrocode} |
| 8971 |
% \end{macro} |
| 8972 |
% \end{macro} |
| 8973 |
% \end{macro} |
| 8974 |
% |
| 8975 |
% |
| 8976 |
% \subsubsection{\hspace{3mm}Rotations Fc and Fcp} |
| 8977 |
% |
| 8978 |
% Whole cube rotations Fc = z, Fcp = zp. |
| 8979 |
% |
| 8980 |
% \begin{macro}{\rrFc} |
| 8981 |
% \begin{macro}{\rrhFc} |
| 8982 |
% \begin{macro}{\RubikFc} |
| 8983 |
% These commands all draw forms which denote the Fc rotation. |
| 8984 |
% \begin{macrocode} |
| 8985 |
\newcommand{\rrFc}{\@rrc{F}} |
| 8986 |
\newcommand{\RubikFc}{\@xyzRubikc{F}} |
| 8987 |
\newcommand{\rrhFc}{\@xyzhc{F}} |
| 8988 |
% \end{macrocode} |
| 8989 |
% \end{macro} |
| 8990 |
% \end{macro} |
| 8991 |
% \end{macro} |
| 8992 |
% \begin{macro}{\rrFcp} |
| 8993 |
% \begin{macro}{\rrhFcp} |
| 8994 |
% \begin{macro}{\RubikFcp} |
| 8995 |
% These commands all draw forms which denote the Fcp rotation. |
| 8996 |
% \begin{macrocode} |
| 8997 |
\newcommand{\rrFcp}{\@rrcp{F}} |
| 8998 |
\newcommand{\RubikFcp}{\@xyzRubikcp{F}} |
| 8999 |
\newcommand{\rrhFcp}{\@xyzhcp{F}} |
| 9000 |
% \end{macrocode} |
| 9001 |
% \end{macro} |
| 9002 |
% \end{macro} |
| 9003 |
% \end{macro} |
| 9004 |
% |
| 9005 |
% |
| 9006 |
% \subsubsection{\hspace{3mm}Rotations Bc and Bcp} |
| 9007 |
% |
| 9008 |
% Whole cube rotation Bc = zp, Bcp = z. |
| 9009 |
% |
| 9010 |
% \begin{macro}{\rrBc} |
| 9011 |
% \begin{macro}{\rrhBc} |
| 9012 |
% \begin{macro}{\RubikBc} |
| 9013 |
% These commands all draw forms which denote the Bc rotation. |
| 9014 |
% \begin{macrocode} |
| 9015 |
\newcommand{\rrBc}{\@rrc{B}} |
| 9016 |
\newcommand{\RubikBc}{\@xyzRubikc{B}} |
| 9017 |
\newcommand{\rrhBc}{\@xyzhc{B}} |
| 9018 |
% \end{macrocode} |
| 9019 |
% \end{macro} |
| 9020 |
% \end{macro} |
| 9021 |
% \end{macro} |
| 9022 |
% \begin{macro}{\rrBcp} |
| 9023 |
% \begin{macro}{\rrhBcp} |
| 9024 |
% \begin{macro}{\RubikBcp} |
| 9025 |
% These commands all draw forms which denote the Bcp rotation. |
| 9026 |
% \begin{macrocode} |
| 9027 |
\newcommand{\rrBcp}{\@rrcp{B}} |
| 9028 |
\newcommand{\RubikBcp}{\@xyzRubikcp{B}} |
| 9029 |
\newcommand{\rrhBcp}{\@xyzhcp{B}} |
| 9030 |
% \end{macrocode} |
| 9031 |
% \end{macro} |
| 9032 |
% \end{macro} |
| 9033 |
% \end{macro} |
| 9034 |
% |
| 9035 |
% |
| 9036 |
% \subsubsection{\hspace{3mm}Rotations Rm and Rmp} |
| 9037 |
% |
| 9038 |
% Rm = Mp= Sr (M follows Left). We use Sr and Srp as the templates. |
| 9039 |
% |
| 9040 |
% \begin{macro}{\rrRm} |
| 9041 |
% \begin{macro}{\rrhRm} |
| 9042 |
% \begin{macro}{\RubikRm} |
| 9043 |
% \begin{macro}{\textRubikRm} |
| 9044 |
% These commands draw forms of the Rm slice rotation. |
| 9045 |
% \begin{macrocode} |
| 9046 |
\newcommand{\rrRm}{\@rrm{R}} |
| 9047 |
\newcommand{\rrhRm}{\rrhMp}% |
| 9048 |
\newcommand{\RubikRm}{% |
| 9049 |
{\@rubikfont% |
| 9050 |
\begin{minipage}{0.6cm} |
| 9051 |
\centering% |
| 9052 |
\SquareMp\\ |
| 9053 |
\rrRm% |
| 9054 |
\end{minipage}% |
| 9055 |
}} |
| 9056 |
\newcommand{\textRubikRm}{\rrRm\,\rrhMp} |
| 9057 |
% \end{macrocode} |
| 9058 |
% \end{macro} |
| 9059 |
% \end{macro} |
| 9060 |
% \end{macro} |
| 9061 |
% \end{macro} |
| 9062 |
% |
| 9063 |
% |
| 9064 |
% \begin{macro}{\rrRmp} |
| 9065 |
% \begin{macro}{\rrhRmp} |
| 9066 |
% \begin{macro}{\RubikRmp} |
| 9067 |
% \begin{macro}{\textRubikRmp} |
| 9068 |
% These commands draw forms of the Rmp slice rotation. |
| 9069 |
% \begin{macrocode} |
| 9070 |
\newcommand{\rrRmp}{\@rrmp{R}} |
| 9071 |
\newcommand{\rrhRmp}{\rrhM}% |
| 9072 |
\newcommand{\RubikRmp}{% |
| 9073 |
{\@rubikfont% |
| 9074 |
\begin{minipage}{0.6cm} |
| 9075 |
\centering% |
| 9076 |
\SquareM\\ |
| 9077 |
\rrRmp% |
| 9078 |
\end{minipage}% |
| 9079 |
}} |
| 9080 |
\newcommand{\textRubikRmp}{\rrRmp\,\rrhM} |
| 9081 |
% \end{macrocode} |
| 9082 |
% \end{macro} |
| 9083 |
% \end{macro} |
| 9084 |
% \end{macro} |
| 9085 |
% \end{macro} |
| 9086 |
% |
| 9087 |
% |
| 9088 |
% \subsubsection{\hspace{3mm}Rotations Lm and Lmp} |
| 9089 |
% |
| 9090 |
% Lm = M = Sl (M follows Left). We use Sl and Slp as the templates. |
| 9091 |
% |
| 9092 |
% \begin{macro}{\rrLm} |
| 9093 |
% \begin{macro}{\rrhLm} |
| 9094 |
% \begin{macro}{\RubikLm} |
| 9095 |
% \begin{macro}{\textRubikLm} |
| 9096 |
% These commands draw forms of the Lm slice rotation. |
| 9097 |
% \begin{macrocode} |
| 9098 |
\newcommand{\rrLm}{\@rrm{L}} |
| 9099 |
\newcommand{\rrhLm}{\rrhM}% |
| 9100 |
\newcommand{\RubikLm}{% |
| 9101 |
{\@rubikfont% |
| 9102 |
\begin{minipage}{0.6cm} |
| 9103 |
\centering% |
| 9104 |
\SquareM\\ |
| 9105 |
\rrLm% |
| 9106 |
\end{minipage}% |
| 9107 |
}} |
| 9108 |
\newcommand{\textRubikLm}{\rrLm\,\rrhM} |
| 9109 |
% \end{macrocode} |
| 9110 |
% \end{macro} |
| 9111 |
% \end{macro} |
| 9112 |
% \end{macro} |
| 9113 |
% \end{macro} |
| 9114 |
% |
| 9115 |
% |
| 9116 |
% \begin{macro}{\rrLmp} |
| 9117 |
% \begin{macro}{\rrhLmp} |
| 9118 |
% \begin{macro}{\RubikLmp} |
| 9119 |
% \begin{macro}{\textRubikLmp} |
| 9120 |
% These commands draw forms of the Lmp slice rotation. |
| 9121 |
% \begin{macrocode} |
| 9122 |
\newcommand{\rrLmp}{\@rrmp{L}} |
| 9123 |
\newcommand{\rrhLmp}{\rrhMp}% |
| 9124 |
\newcommand{\RubikLmp}{% |
| 9125 |
{\@rubikfont% |
| 9126 |
\begin{minipage}{0.6cm} |
| 9127 |
\centering% |
| 9128 |
\SquareMp\\ |
| 9129 |
\rrLmp% |
| 9130 |
\end{minipage}% |
| 9131 |
}} |
| 9132 |
\newcommand{\textRubikLmp}{\rrLmp\,\rrhMp} |
| 9133 |
% \end{macrocode} |
| 9134 |
% \end{macro} |
| 9135 |
% \end{macro} |
| 9136 |
% \end{macro} |
| 9137 |
% \end{macro} |
| 9138 |
% |
| 9139 |
% |
| 9140 |
% \subsubsection{\hspace{3mm}Rotations Um and Ump} |
| 9141 |
% |
| 9142 |
% Um = Ep = Su (E follows Down). We use Su and Sup as the templates. |
| 9143 |
% |
| 9144 |
% \begin{macro}{\rrUm} |
| 9145 |
% \begin{macro}{\rrhUm} |
| 9146 |
% \begin{macro}{\RubikUm} |
| 9147 |
% \begin{macro}{\textRubikUm} |
| 9148 |
% These commands draw forms of the Um slice rotation. |
| 9149 |
% We also need to fine-tune the spacing |
| 9150 |
% between these `slice' hieroglyphs (especially Fs and Bs). |
| 9151 |
% \begin{macrocode} |
| 9152 |
\newcommand{\rrUm}{\@rrm{U}} |
| 9153 |
\newcommand{\rrhUm}{\rrhEp}% |
| 9154 |
\newcommand{\RubikUm}{% |
| 9155 |
{\@rubikfont% |
| 9156 |
\begin{minipage}{0.6cm} |
| 9157 |
\centering% |
| 9158 |
\SquareEp\\ |
| 9159 |
\rrUm% |
| 9160 |
\end{minipage}% |
| 9161 |
}} |
| 9162 |
\newcommand{\textRubikUm}{\rrUm\,\rrhEp} |
| 9163 |
% \end{macrocode} |
| 9164 |
% \end{macro} |
| 9165 |
% \end{macro} |
| 9166 |
% \end{macro} |
| 9167 |
% \end{macro} |
| 9168 |
% |
| 9169 |
% |
| 9170 |
% \begin{macro}{\rrUmp} |
| 9171 |
% \begin{macro}{\rrhUmp} |
| 9172 |
% \begin{macro}{\RubikUmp} |
| 9173 |
% \begin{macro}{\textRubikUmp} |
| 9174 |
% These commands draw forms of the Ump slice rotation. |
| 9175 |
% We also need to fine-tune the spacing |
| 9176 |
% between these `slice' hieroglyphs (especially Fs and Bs). |
| 9177 |
% \begin{macrocode} |
| 9178 |
\newcommand{\rrUmp}{\@rrmp{U}} |
| 9179 |
\newcommand{\rrhUmp}{\rrhE}% |
| 9180 |
\newcommand{\RubikUmp}{% |
| 9181 |
{\@rubikfont% |
| 9182 |
\begin{minipage}{0.6cm} |
| 9183 |
\centering% |
| 9184 |
\SquareE\\ |
| 9185 |
\rrUmp% |
| 9186 |
\end{minipage}% |
| 9187 |
}} |
| 9188 |
\newcommand{\textRubikUmp}{\rrUmp\,\rrhE} |
| 9189 |
% \end{macrocode} |
| 9190 |
% \end{macro} |
| 9191 |
% \end{macro} |
| 9192 |
% \end{macro} |
| 9193 |
% \end{macro} |
| 9194 |
% |
| 9195 |
% |
| 9196 |
% \subsubsection{\hspace{3mm}Rotations Dm and Dmp} |
| 9197 |
% |
| 9198 |
% Dm = E = Sd (E follows Down). We use Sd and Sdp as the templates. |
| 9199 |
% |
| 9200 |
% \begin{macro}{\rrDm} |
| 9201 |
% \begin{macro}{\rrhDm} |
| 9202 |
% \begin{macro}{\RubikDm} |
| 9203 |
% \begin{macro}{\textRubikDm} |
| 9204 |
% These commands draw forms of the Singmaster Dm slice rotation. |
| 9205 |
% \begin{macrocode} |
| 9206 |
\newcommand{\rrDm}{\@rrm{D}} |
| 9207 |
\newcommand{\rrhDm}{\rrhE}% |
| 9208 |
\newcommand{\RubikDm}{% |
| 9209 |
{\@rubikfont% |
| 9210 |
\begin{minipage}{0.6cm} |
| 9211 |
\centering% |
| 9212 |
\SquareE\\ |
| 9213 |
\rrDm% |
| 9214 |
\end{minipage}% |
| 9215 |
}} |
| 9216 |
\newcommand{\textRubikDm}{\rrDm\,\rrhE} |
| 9217 |
% \end{macrocode} |
| 9218 |
% \end{macro} |
| 9219 |
% \end{macro} |
| 9220 |
% \end{macro} |
| 9221 |
% \end{macro} |
| 9222 |
% |
| 9223 |
% |
| 9224 |
% \begin{macro}{\rrDmp} |
| 9225 |
% \begin{macro}{\rrhDmp} |
| 9226 |
% \begin{macro}{\RubikDmp} |
| 9227 |
% \begin{macro}{\textRubikDmp} |
| 9228 |
% These commands draw forms of the Singmaster Dmp slice rotation. |
| 9229 |
% \begin{macrocode} |
| 9230 |
\newcommand{\rrDmp}{\@rrmp{D}} |
| 9231 |
\newcommand{\rrhDmp}{\rrhEp}% |
| 9232 |
\newcommand{\RubikDmp}{% |
| 9233 |
{\@rubikfont% |
| 9234 |
\begin{minipage}{0.6cm} |
| 9235 |
\centering% |
| 9236 |
\SquareEp\\ |
| 9237 |
\rrDmp% |
| 9238 |
\end{minipage}% |
| 9239 |
}} |
| 9240 |
\newcommand{\textRubikDmp}{\rrDmp\,\rrhEp} |
| 9241 |
% \end{macrocode} |
| 9242 |
% \end{macro} |
| 9243 |
% \end{macro} |
| 9244 |
% \end{macro} |
| 9245 |
% \end{macro} |
| 9246 |
% |
| 9247 |
% |
| 9248 |
% \subsubsection{\hspace{3mm}Rotations Fm and Fmp} |
| 9249 |
% |
| 9250 |
% Fm = S = Sf (S follows Front). |
| 9251 |
% S is not visible from the front, so is represented in a square box. |
| 9252 |
% We use Sf and Sfp as the templates. |
| 9253 |
% |
| 9254 |
% \begin{macro}{\rrFm} |
| 9255 |
% \begin{macro}{\rrhFm} |
| 9256 |
% \begin{macro}{\RubikFm} |
| 9257 |
% \begin{macro}{\textRubikFm} |
| 9258 |
% These commands draw forms of the Fm slice rotation. |
| 9259 |
% We need to just make square with Fm in square; |
| 9260 |
% adjust box height using a \cmd{\rule}; |
| 9261 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9262 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9263 |
% bounded by \{\} so no need to reset to defaults. |
| 9264 |
% Not visible from the front. |
| 9265 |
% \begin{macrocode} |
| 9266 |
\newcommand{\rrFm}{\@rrm{F}} |
| 9267 |
\newcommand{\SquareFm}{\@tlen\@SquareLetter{\rrFm}\@tlen} |
| 9268 |
\newcommand{\rrhFm}{\raisebox{-0.25mm}{\SquareFm}} |
| 9269 |
\newcommand{\RubikFm}{\raisebox{\@hRubik}{\SquareFm}} |
| 9270 |
\newcommand{\textRubikFm}{\rrhFm} |
| 9271 |
% \end{macrocode} |
| 9272 |
% \end{macro} |
| 9273 |
% \end{macro} |
| 9274 |
% \end{macro} |
| 9275 |
% \end{macro} |
| 9276 |
% |
| 9277 |
% |
| 9278 |
% \begin{macro}{\rrFmp} |
| 9279 |
% \begin{macro}{\rrhFmp} |
| 9280 |
% \begin{macro}{\RubikFmp} |
| 9281 |
% \begin{macro}{\textRubikFmp} |
| 9282 |
% These commands draw forms of the Fmp slice rotation. |
| 9283 |
% We need to just make square with Fmp in square; |
| 9284 |
% adjust box height using a \cmd{\rule}; |
| 9285 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9286 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9287 |
% bounded by \{\} so no need to reset to defaults. |
| 9288 |
% Not visible from the front. |
| 9289 |
% \begin{macrocode} |
| 9290 |
\newcommand{\rrFmp}{\@rrmp{F}} |
| 9291 |
\newcommand{\SquareFmp}{\@tlen\@SquareLetter{\rrFmp}\@tlen} |
| 9292 |
\newcommand{\rrhFmp}{\raisebox{-0.25mm}{\SquareFmp}} |
| 9293 |
\newcommand{\RubikFmp}{\raisebox{\@hRubik}{\SquareFmp}} |
| 9294 |
\newcommand{\textRubikFmp}{\rrhFmp} |
| 9295 |
% \end{macrocode} |
| 9296 |
% \end{macro} |
| 9297 |
% \end{macro} |
| 9298 |
% \end{macro} |
| 9299 |
% \end{macro} |
| 9300 |
% |
| 9301 |
% |
| 9302 |
% \subsubsection{\hspace{3mm}Rotations Bm and Bmp} |
| 9303 |
% |
| 9304 |
% Bm = Sp = Sb. We use Sb and Sbp as the templates. |
| 9305 |
% |
| 9306 |
% \begin{macro}{\rrBm} |
| 9307 |
% \begin{macro}{\rrhBm} |
| 9308 |
% \begin{macro}{\RubikBm} |
| 9309 |
% \begin{macro}{\textRubikBm} |
| 9310 |
% These commands draw forms of the Bm slice rotation. |
| 9311 |
% We need to just make square with Bm in square; |
| 9312 |
% adjust box height using a \cmd{\rule}; |
| 9313 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9314 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9315 |
% bounded by \{\} so no need to reset to defaults. |
| 9316 |
% Not visible from the front. |
| 9317 |
% \begin{macrocode} |
| 9318 |
\newcommand{\rrBm}{\@rrm{B}} |
| 9319 |
\newcommand{\SquareBm}{\@tlen\@SquareLetter{\rrBm}\@tlen} |
| 9320 |
\newcommand{\rrhBm}{\raisebox{-0.25mm}{\SquareBm}} |
| 9321 |
\newcommand{\RubikBm}{\raisebox{\@hRubik}{\SquareBm}} |
| 9322 |
\newcommand{\textRubikBm}{\rrhBm} |
| 9323 |
% \end{macrocode} |
| 9324 |
% \end{macro} |
| 9325 |
% \end{macro} |
| 9326 |
% \end{macro} |
| 9327 |
% \end{macro} |
| 9328 |
% |
| 9329 |
% |
| 9330 |
% \begin{macro}{\rrBmp} |
| 9331 |
% \begin{macro}{\rrhBmp} |
| 9332 |
% \begin{macro}{\RubikBmp} |
| 9333 |
% \begin{macro}{\textRubikBmp} |
| 9334 |
% These commands draw forms of the Bmp slice rotation. |
| 9335 |
% We need to just make square with Bmp in square; |
| 9336 |
% adjust box height using a \cmd{\rule}; |
| 9337 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9338 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9339 |
% bounded by \{\} so no need to reset to defaults. |
| 9340 |
% Not visible from the front. |
| 9341 |
% \begin{macrocode} |
| 9342 |
\newcommand{\rrBmp}{\@rrmp{B}} |
| 9343 |
\newcommand{\SquareBmp}{\@tlen\@SquareLetter{\rrBmp}\@tlen} |
| 9344 |
\newcommand{\rrhBmp}{\raisebox{-0.25mm}{\SquareBmp}} |
| 9345 |
\newcommand{\RubikBmp}{\raisebox{\@hRubik}{\SquareBmp}} |
| 9346 |
\newcommand{\textRubikBmp}{\rrhBmp} |
| 9347 |
% \end{macrocode} |
| 9348 |
% \end{macro} |
| 9349 |
% \end{macro} |
| 9350 |
% \end{macro} |
| 9351 |
% \end{macro} |
| 9352 |
% |
| 9353 |
% |
| 9354 |
% |
| 9355 |
% |
| 9356 |
% \subsection{\hspace{3mm}Randelshofer superset ENG rotations (CMST)} |
| 9357 |
% \label{sec:codeRandelshofer} |
| 9358 |
% |
| 9359 |
% (see webpage: \verb!Randelshofer.ch/rubik/patterns/doc/supersetENG_3x3.html!) |
| 9360 |
% |
| 9361 |
% This section relates to the recent Rubik notation developed |
| 9362 |
% by Randelshofer (see URL above), known as the ``superset ENG rotations'' |
| 9363 |
% (see Sections~\ref{sec:RubikCommands} and \ref{sec:listofRandelshofercommands} |
| 9364 |
% for details). |
| 9365 |
% |
| 9366 |
% I denote this notation as ``CMST'' (i.e.,~his C, M, S and T notation). |
| 9367 |
% Although this notation replicates previously existing World Cube Association notation, |
| 9368 |
% we include it here for completeness. Fortunately the Randelshofer notation does |
| 9369 |
% not conflict with existing notation. |
| 9370 |
% |
| 9371 |
% Briefly, the CMST letters denote whole Cube, Middle, outer-Slice and wide (T) |
| 9372 |
% rotations associated with named faces. For~example, the rotation-code MR |
| 9373 |
% indicates a rotation of the middle slice parallel to the \textsc{right} face, |
| 9374 |
% and in the same sense (direction) as \rr{R}\ (see Section~\ref{sec:RubikCommands} for details). |
| 9375 |
% |
| 9376 |
% |
| 9377 |
% First we make some useful facilitating commands for the CX1 and CX1p forms |
| 9378 |
% as these are handled with raised square brackets. |
| 9379 |
% We model these four macros on the equivalent |
| 9380 |
% \verb!\@xyzh!, \verb!\@xyzhp!,\verb!\@xyzRubik!,\verb!\@xyzRubikp! macros defined above. |
| 9381 |
% \begin{macrocode} |
| 9382 |
\newcommand{\@randhc}[1]{[\raisebox{-1.2pt}{{\@rubikfont C#1}}]} |
| 9383 |
\newcommand{\@randhcp}[1]{[\raisebox{-1.2pt}{{\@rubikfont C#1\@rubikprime}}]} |
| 9384 |
\newcommand{\@randRubikc}[1]% |
| 9385 |
{\raisebox{3.45pt}{[\raisebox{-1.2pt}{{\@rubikfont C#1}}]}} |
| 9386 |
\newcommand{\@randRubikcp}[1]% |
| 9387 |
{\raisebox{3.45pt}{[\raisebox{-1.2pt}{{\@rubikfont C#1\@rubikprime}}]}} |
| 9388 |
% \end{macrocode} |
| 9389 |
% |
| 9390 |
% |
| 9391 |
% In the following we create the base form of a rotation code, eg \rrhCR\ and then |
| 9392 |
% the user typesets this rotation using CR as the argument for \verb!\rrh{}!. |
| 9393 |
% This works because the macro \verb!\@join{}{}! is used to join \cmd{\rrh} |
| 9394 |
% and CR $\rightarrow$ \cmd{\rrhCR} etc. |
| 9395 |
% |
| 9396 |
% The = signs at the beginning of each new section indicate the equivalence |
| 9397 |
% between the Randelshofer notation and the current (World Cube Association) |
| 9398 |
% notation. |
| 9399 |
% |
| 9400 |
% |
| 9401 |
% \subsubsection{\hspace{3mm}Rotations CR and CRp} |
| 9402 |
% |
| 9403 |
% Whole cube rotations CR = Rc = x, CRp = Rcp = xp. |
| 9404 |
% |
| 9405 |
% \begin{macro}{\rrCR} |
| 9406 |
% \begin{macro}{\rrhCR} |
| 9407 |
% \begin{macro}{\RubikCR} |
| 9408 |
% These commands all draw forms which denote the CR = Rc rotation. |
| 9409 |
% \begin{macrocode} |
| 9410 |
\newcommand{\rrCR}{\@rr{CR}} |
| 9411 |
\newcommand{\RubikCR}{\@randRubikc{R}} |
| 9412 |
\newcommand{\rrhCR}{\@randhc{R}} |
| 9413 |
% \end{macrocode} |
| 9414 |
% \end{macro} |
| 9415 |
% \end{macro} |
| 9416 |
% \end{macro} |
| 9417 |
% \begin{macro}{\rrCRp} |
| 9418 |
% \begin{macro}{\rrhCRp} |
| 9419 |
% \begin{macro}{\RubikCRp} |
| 9420 |
% These commands all draw forms which denote the CRp = Rcp rotation. |
| 9421 |
% \begin{macrocode} |
| 9422 |
\newcommand{\rrCRp}{\@rrp{CR}} |
| 9423 |
\newcommand{\RubikCRp}{\@randRubikcp{R}} |
| 9424 |
\newcommand{\rrhCRp}{\@randhcp{R}} |
| 9425 |
% \end{macrocode} |
| 9426 |
% \end{macro} |
| 9427 |
% \end{macro} |
| 9428 |
% \end{macro} |
| 9429 |
% |
| 9430 |
% |
| 9431 |
% \subsubsection{\hspace{3mm}Rotations CL and CLp} |
| 9432 |
% |
| 9433 |
% Whole cube rotations CL = Lc = xp, CLp = Lcp = x. |
| 9434 |
% |
| 9435 |
% \begin{macro}{\rrCL} |
| 9436 |
% \begin{macro}{\rrhCL} |
| 9437 |
% \begin{macro}{\RubikCL} |
| 9438 |
% These commands all draw forms which denote the CL rotation. |
| 9439 |
% \begin{macrocode} |
| 9440 |
\newcommand{\rrCL}{\@rr{CL}} |
| 9441 |
\newcommand{\RubikCL}{\@randRubikc{L}} |
| 9442 |
\newcommand{\rrhCL}{\@randhc{L}} |
| 9443 |
% \end{macrocode} |
| 9444 |
% \end{macro} |
| 9445 |
% \end{macro} |
| 9446 |
% \end{macro} |
| 9447 |
% \begin{macro}{\rrCLp} |
| 9448 |
% \begin{macro}{\rrhCLp} |
| 9449 |
% \begin{macro}{\RubikCLp} |
| 9450 |
% These commands all draw forms which denote the CLp rotation. |
| 9451 |
% \begin{macrocode} |
| 9452 |
\newcommand{\rrCLp}{\@rrp{CL}} |
| 9453 |
\newcommand{\RubikCLp}{\@randRubikcp{L}} |
| 9454 |
\newcommand{\rrhCLp}{\@randhcp{L}} |
| 9455 |
% \end{macrocode} |
| 9456 |
% \end{macro} |
| 9457 |
% \end{macro} |
| 9458 |
% \end{macro} |
| 9459 |
% |
| 9460 |
% |
| 9461 |
% \subsubsection{\hspace{3mm}Rotations CU and CUp} |
| 9462 |
% |
| 9463 |
% Whole cube rotation CU = Uc = y, CUp = Ucp=yp. |
| 9464 |
% |
| 9465 |
% \begin{macro}{\rrCU} |
| 9466 |
% \begin{macro}{\rrhCU} |
| 9467 |
% \begin{macro}{\RubikCU} |
| 9468 |
% These commands all draw forms which denote the CU rotation. |
| 9469 |
% \begin{macrocode} |
| 9470 |
\newcommand{\rrCU}{\@rr{CU}} |
| 9471 |
\newcommand{\RubikCU}{\@randRubikc{U}} |
| 9472 |
\newcommand{\rrhCU}{\@randhc{U}} |
| 9473 |
% \end{macrocode} |
| 9474 |
% \end{macro} |
| 9475 |
% \end{macro} |
| 9476 |
% \end{macro} |
| 9477 |
% \begin{macro}{\rrCUp} |
| 9478 |
% \begin{macro}{\rrhCUp} |
| 9479 |
% \begin{macro}{\RubikCUp} |
| 9480 |
% These commands all draw forms which denote the CUp rotation. |
| 9481 |
% \begin{macrocode} |
| 9482 |
\newcommand{\rrCUp}{\@rrp{CU}} |
| 9483 |
\newcommand{\RubikCUp}{\@randRubikcp{U}} |
| 9484 |
\newcommand{\rrhCUp}{\@randhcp{U}} |
| 9485 |
% \end{macrocode} |
| 9486 |
% \end{macro} |
| 9487 |
% \end{macro} |
| 9488 |
% \end{macro} |
| 9489 |
% |
| 9490 |
% |
| 9491 |
% \subsubsection{\hspace{3mm}Rotations CD and CDp} |
| 9492 |
% |
| 9493 |
% Whole cube rotations CD = Dc = yp, CDp = Dcp = y. |
| 9494 |
% |
| 9495 |
% \begin{macro}{\rrCD} |
| 9496 |
% \begin{macro}{\rrhCD} |
| 9497 |
% \begin{macro}{\RubikCD} |
| 9498 |
% These commands all draw forms which denote the CD rotation. |
| 9499 |
% \begin{macrocode} |
| 9500 |
\newcommand{\rrCD}{\@rr{CD}} |
| 9501 |
\newcommand{\RubikCD}{\@randRubikc{D}} |
| 9502 |
\newcommand{\rrhCD}{\@randhc{D}} |
| 9503 |
% \end{macrocode} |
| 9504 |
% \end{macro} |
| 9505 |
% \end{macro} |
| 9506 |
% \end{macro} |
| 9507 |
% \begin{macro}{\rrCDp} |
| 9508 |
% \begin{macro}{\rrhCDp} |
| 9509 |
% \begin{macro}{\RubikCDp} |
| 9510 |
% These commands all draw forms which denote the CDp rotation. |
| 9511 |
% \begin{macrocode} |
| 9512 |
\newcommand{\rrCDp}{\@rrp{CD}} |
| 9513 |
\newcommand{\RubikCDp}{\@randRubikcp{D}} |
| 9514 |
\newcommand{\rrhCDp}{\@randhcp{D}} |
| 9515 |
% \end{macrocode} |
| 9516 |
% \end{macro} |
| 9517 |
% \end{macro} |
| 9518 |
% \end{macro} |
| 9519 |
% |
| 9520 |
% |
| 9521 |
% \subsubsection{\hspace{3mm}Rotations CF and CFp} |
| 9522 |
% |
| 9523 |
% Whole cube rotations CF = Fc = z, CFp = Fcp = zp. |
| 9524 |
% |
| 9525 |
% \begin{macro}{\rrCF} |
| 9526 |
% \begin{macro}{\rrhCF} |
| 9527 |
% \begin{macro}{\RubikCF} |
| 9528 |
% These commands all draw forms which denote the CF rotation. |
| 9529 |
% \begin{macrocode} |
| 9530 |
\newcommand{\rrCF}{\@rr{CF}} |
| 9531 |
\newcommand{\RubikCF}{\@randRubikc{F}} |
| 9532 |
\newcommand{\rrhCF}{\@randhc{F}} |
| 9533 |
% \end{macrocode} |
| 9534 |
% \end{macro} |
| 9535 |
% \end{macro} |
| 9536 |
% \end{macro} |
| 9537 |
% \begin{macro}{\rrCFp} |
| 9538 |
% \begin{macro}{\rrhCFp} |
| 9539 |
% \begin{macro}{\RubikCFp} |
| 9540 |
% These commands all draw forms which denote the CFp rotation. |
| 9541 |
% \begin{macrocode} |
| 9542 |
\newcommand{\rrCFp}{\@rrp{CF}} |
| 9543 |
\newcommand{\RubikCFp}{\@randRubikcp{F}} |
| 9544 |
\newcommand{\rrhCFp}{\@randhcp{F}} |
| 9545 |
% \end{macrocode} |
| 9546 |
% \end{macro} |
| 9547 |
% \end{macro} |
| 9548 |
% \end{macro} |
| 9549 |
% |
| 9550 |
% |
| 9551 |
% \subsubsection{\hspace{3mm}Rotations CB and CBp} |
| 9552 |
% |
| 9553 |
% Whole cube rotation CB = Bc = zp, CBp = Bcp = z. |
| 9554 |
% |
| 9555 |
% \begin{macro}{\rrCB} |
| 9556 |
% \begin{macro}{\rrhCB} |
| 9557 |
% \begin{macro}{\RubikCB} |
| 9558 |
% These commands all draw forms which denote the CB rotation. |
| 9559 |
% \begin{macrocode} |
| 9560 |
\newcommand{\rrCB}{\@rr{CB}} |
| 9561 |
\newcommand{\RubikCB}{\@randRubikc{B}} |
| 9562 |
\newcommand{\rrhCB}{\@randhc{B}} |
| 9563 |
% \end{macrocode} |
| 9564 |
% \end{macro} |
| 9565 |
% \end{macro} |
| 9566 |
% \end{macro} |
| 9567 |
% \begin{macro}{\rrCBp} |
| 9568 |
% \begin{macro}{\rrhCBp} |
| 9569 |
% \begin{macro}{\RubikCBp} |
| 9570 |
% These commands all draw forms which denote the CBp rotation. |
| 9571 |
% \begin{macrocode} |
| 9572 |
\newcommand{\rrCBp}{\@rrp{CB}} |
| 9573 |
\newcommand{\RubikCBp}{\@randRubikcp{B}} |
| 9574 |
\newcommand{\rrhCBp}{\@randhcp{B}} |
| 9575 |
% \end{macrocode} |
| 9576 |
% \end{macro} |
| 9577 |
% \end{macro} |
| 9578 |
% \end{macro} |
| 9579 |
% |
| 9580 |
% |
| 9581 |
% |
| 9582 |
% \subsubsection{\hspace{3mm}Rotations MR and MRp} |
| 9583 |
% |
| 9584 |
% MR = Rm = Mp= Sr (M follows Left). We use Sr and Srp as the templates. |
| 9585 |
% |
| 9586 |
% \begin{macro}{\rrMR} |
| 9587 |
% \begin{macro}{\rrhMR} |
| 9588 |
% \begin{macro}{\RubikMR} |
| 9589 |
% \begin{macro}{\textRubikMR} |
| 9590 |
% These commands draw forms of the MR middle slice rotation. |
| 9591 |
% \begin{macrocode} |
| 9592 |
\newcommand{\rrMR}{\@rr{MR}} |
| 9593 |
\newcommand{\rrhMR}{\rrhMp}% |
| 9594 |
\newcommand{\RubikMR}{% |
| 9595 |
{\@rubikfont% |
| 9596 |
\begin{minipage}{0.6cm} |
| 9597 |
\centering% |
| 9598 |
\SquareMp\\ |
| 9599 |
\rrMR% |
| 9600 |
\end{minipage}% |
| 9601 |
}} |
| 9602 |
\newcommand{\textRubikMR}{\rrMR\,\rrhMp} |
| 9603 |
% \end{macrocode} |
| 9604 |
% \end{macro} |
| 9605 |
% \end{macro} |
| 9606 |
% \end{macro} |
| 9607 |
% \end{macro} |
| 9608 |
% |
| 9609 |
% |
| 9610 |
% \begin{macro}{\rrMRp} |
| 9611 |
% \begin{macro}{\rrhMRp} |
| 9612 |
% \begin{macro}{\RubikMRp} |
| 9613 |
% \begin{macro}{\textRubikMRp} |
| 9614 |
% These commands draw forms of the MRp slice rotation. |
| 9615 |
% \begin{macrocode} |
| 9616 |
\newcommand{\rrMRp}{\@rrp{MR}} |
| 9617 |
\newcommand{\rrhMRp}{\rrhM}% |
| 9618 |
\newcommand{\RubikMRp}{% |
| 9619 |
{\@rubikfont% |
| 9620 |
\begin{minipage}{0.6cm} |
| 9621 |
\centering% |
| 9622 |
\SquareM\\ |
| 9623 |
\rrMRp% |
| 9624 |
\end{minipage}% |
| 9625 |
}} |
| 9626 |
\newcommand{\textRubikMRp}{\rrMRp\,\rrhM} |
| 9627 |
% \end{macrocode} |
| 9628 |
% \end{macro} |
| 9629 |
% \end{macro} |
| 9630 |
% \end{macro} |
| 9631 |
% \end{macro} |
| 9632 |
% |
| 9633 |
% |
| 9634 |
% \subsubsection{\hspace{3mm}Rotations ML and MLp} |
| 9635 |
% |
| 9636 |
% ML = Lm = M = Sl (M follows Left). We use Sl and Slp as the templates. |
| 9637 |
% |
| 9638 |
% \begin{macro}{\rrML} |
| 9639 |
% \begin{macro}{\rrhML} |
| 9640 |
% \begin{macro}{\RubikML} |
| 9641 |
% \begin{macro}{\textRubikML} |
| 9642 |
% These commands draw forms of the ML slice rotation. |
| 9643 |
% \begin{macrocode} |
| 9644 |
\newcommand{\rrML}{\@rr{ML}} |
| 9645 |
\newcommand{\rrhML}{\rrhM}% |
| 9646 |
\newcommand{\RubikML}{% |
| 9647 |
{\@rubikfont% |
| 9648 |
\begin{minipage}{0.6cm} |
| 9649 |
\centering% |
| 9650 |
\SquareM\\ |
| 9651 |
\rrML% |
| 9652 |
\end{minipage}% |
| 9653 |
}} |
| 9654 |
\newcommand{\textRubikML}{\rrML\,\rrhM} |
| 9655 |
% \end{macrocode} |
| 9656 |
% \end{macro} |
| 9657 |
% \end{macro} |
| 9658 |
% \end{macro} |
| 9659 |
% \end{macro} |
| 9660 |
% |
| 9661 |
% |
| 9662 |
% \begin{macro}{\rrMLp} |
| 9663 |
% \begin{macro}{\rrhMLp} |
| 9664 |
% \begin{macro}{\RubikMLp} |
| 9665 |
% \begin{macro}{\textRubikMLp} |
| 9666 |
% These commands draw forms of the MLp slice rotation. |
| 9667 |
% \begin{macrocode} |
| 9668 |
\newcommand{\rrMLp}{\@rrp{ML}} |
| 9669 |
\newcommand{\rrhMLp}{\rrhMp}% |
| 9670 |
\newcommand{\RubikMLp}{% |
| 9671 |
{\@rubikfont% |
| 9672 |
\begin{minipage}{0.6cm} |
| 9673 |
\centering% |
| 9674 |
\SquareMp\\ |
| 9675 |
\rrMLp% |
| 9676 |
\end{minipage}% |
| 9677 |
}} |
| 9678 |
\newcommand{\textRubikMLp}{\rrMLp\,\rrhMp} |
| 9679 |
% \end{macrocode} |
| 9680 |
% \end{macro} |
| 9681 |
% \end{macro} |
| 9682 |
% \end{macro} |
| 9683 |
% \end{macro} |
| 9684 |
% |
| 9685 |
% |
| 9686 |
% \subsubsection{\hspace{3mm}Rotations MU and MUp} |
| 9687 |
% |
| 9688 |
% MU = Um = Ep = Su (E follows Down). We use Su and Sup as the templates. |
| 9689 |
% |
| 9690 |
% \begin{macro}{\rrMU} |
| 9691 |
% \begin{macro}{\rrhMU} |
| 9692 |
% \begin{macro}{\RubikMU} |
| 9693 |
% \begin{macro}{\textRubikMU} |
| 9694 |
% These commands draw forms of the MU slice rotation. |
| 9695 |
% \begin{macrocode} |
| 9696 |
\newcommand{\rrMU}{\@rr{MU}} |
| 9697 |
\newcommand{\rrhMU}{\rrhEp}% |
| 9698 |
\newcommand{\RubikMU}{% |
| 9699 |
{\@rubikfont% |
| 9700 |
\begin{minipage}{0.6cm} |
| 9701 |
\centering% |
| 9702 |
\SquareEp\\ |
| 9703 |
\rrMU% |
| 9704 |
\end{minipage}% |
| 9705 |
}} |
| 9706 |
\newcommand{\textRubikMU}{\rrMU\,\rrhEp} |
| 9707 |
% \end{macrocode} |
| 9708 |
% \end{macro} |
| 9709 |
% \end{macro} |
| 9710 |
% \end{macro} |
| 9711 |
% \end{macro} |
| 9712 |
% |
| 9713 |
% |
| 9714 |
% \begin{macro}{\rrMUp} |
| 9715 |
% \begin{macro}{\rrhMUp} |
| 9716 |
% \begin{macro}{\RubikMUp} |
| 9717 |
% \begin{macro}{\textRubikMUp} |
| 9718 |
% These commands draw forms of the MUp slice rotation. |
| 9719 |
% \begin{macrocode} |
| 9720 |
\newcommand{\rrMUp}{\@rrp{MU}} |
| 9721 |
\newcommand{\rrhMUp}{\rrhE}% |
| 9722 |
\newcommand{\RubikMUp}{% |
| 9723 |
{\@rubikfont% |
| 9724 |
\begin{minipage}{0.6cm} |
| 9725 |
\centering% |
| 9726 |
\SquareE\\ |
| 9727 |
\rrMUp% |
| 9728 |
\end{minipage}% |
| 9729 |
}} |
| 9730 |
\newcommand{\textRubikMUp}{\rrMUp\,\rrhE} |
| 9731 |
% \end{macrocode} |
| 9732 |
% \end{macro} |
| 9733 |
% \end{macro} |
| 9734 |
% \end{macro} |
| 9735 |
% \end{macro} |
| 9736 |
% |
| 9737 |
% |
| 9738 |
% \subsubsection{\hspace{3mm}Rotations MD and MDp} |
| 9739 |
% |
| 9740 |
% MD = Dm = E = Sd (E follows Down). We use Sd and Sdp as the templates. |
| 9741 |
% |
| 9742 |
% \begin{macro}{\rrMD} |
| 9743 |
% \begin{macro}{\rrhMD} |
| 9744 |
% \begin{macro}{\RubikMD} |
| 9745 |
% \begin{macro}{\textRubikMD} |
| 9746 |
% These commands draw forms of the Randelshofer MD slice rotation. |
| 9747 |
% \begin{macrocode} |
| 9748 |
\newcommand{\rrMD}{\@rr{MD}} |
| 9749 |
\newcommand{\rrhMD}{\rrhE}% |
| 9750 |
\newcommand{\RubikMD}{% |
| 9751 |
{\@rubikfont% |
| 9752 |
\begin{minipage}{0.6cm} |
| 9753 |
\centering% |
| 9754 |
\SquareE\\ |
| 9755 |
\rrMD% |
| 9756 |
\end{minipage}% |
| 9757 |
}} |
| 9758 |
\newcommand{\textRubikMD}{\rrMD\,\rrhE} |
| 9759 |
% \end{macrocode} |
| 9760 |
% \end{macro} |
| 9761 |
% \end{macro} |
| 9762 |
% \end{macro} |
| 9763 |
% \end{macro} |
| 9764 |
% |
| 9765 |
% |
| 9766 |
% \begin{macro}{\rrMDp} |
| 9767 |
% \begin{macro}{\rrhMDp} |
| 9768 |
% \begin{macro}{\RubikMDp} |
| 9769 |
% \begin{macro}{\textRubikMDp} |
| 9770 |
% These commands draw forms of the Randelshofer MDp slice rotation. |
| 9771 |
% \begin{macrocode} |
| 9772 |
\newcommand{\rrMDp}{\@rrp{MD}} |
| 9773 |
\newcommand{\rrhMDp}{\rrhEp}% |
| 9774 |
\newcommand{\RubikMDp}{% |
| 9775 |
{\@rubikfont% |
| 9776 |
\begin{minipage}{0.6cm} |
| 9777 |
\centering% |
| 9778 |
\SquareEp\\ |
| 9779 |
\rrMDp% |
| 9780 |
\end{minipage}% |
| 9781 |
}} |
| 9782 |
\newcommand{\textRubikMDp}{\rrMDp\,\rrhEp} |
| 9783 |
% \end{macrocode} |
| 9784 |
% \end{macro} |
| 9785 |
% \end{macro} |
| 9786 |
% \end{macro} |
| 9787 |
% \end{macro} |
| 9788 |
% |
| 9789 |
% |
| 9790 |
% \subsubsection{\hspace{3mm}Rotations MF and MFp} |
| 9791 |
% |
| 9792 |
% MF = Fm = S = Sf (S follows Front). |
| 9793 |
% MF = S is not visible from the front, so is represented in a square box. |
| 9794 |
% We use Sf and Sfp as the templates. |
| 9795 |
% |
| 9796 |
% \begin{macro}{\rrMF} |
| 9797 |
% \begin{macro}{\rrhMF} |
| 9798 |
% \begin{macro}{\RubikMF} |
| 9799 |
% \begin{macro}{\textRubikMF} |
| 9800 |
% These commands draw forms of the MF slice rotation. |
| 9801 |
% We need to just make square with MF in square; |
| 9802 |
% adjust box height using a \cmd{\rule}; |
| 9803 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9804 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9805 |
% bounded by \{\} so no need to reset to defaults. |
| 9806 |
% Not visible from the front. |
| 9807 |
% \begin{macrocode} |
| 9808 |
\newcommand{\rrMF}{\@rr{MF}} |
| 9809 |
\newcommand{\SquareMF}{\@tlen\@SquareLetter{\rrMF}\@tlen} |
| 9810 |
\newcommand{\rrhMF}{\raisebox{-0.25mm}{\SquareMF}} |
| 9811 |
\newcommand{\RubikMF}{\raisebox{\@hRubik}{\SquareMF}} |
| 9812 |
\newcommand{\textRubikMF}{\rrhMF} |
| 9813 |
% \end{macrocode} |
| 9814 |
% \end{macro} |
| 9815 |
% \end{macro} |
| 9816 |
% \end{macro} |
| 9817 |
% \end{macro} |
| 9818 |
% |
| 9819 |
% |
| 9820 |
% \begin{macro}{\rrMFp} |
| 9821 |
% \begin{macro}{\rrhMFp} |
| 9822 |
% \begin{macro}{\RubikMFp} |
| 9823 |
% \begin{macro}{\textRubikMFp} |
| 9824 |
% These commands draw forms of the MFp slice rotation. |
| 9825 |
% We need to just make square with MFp in square; |
| 9826 |
% adjust box height using a \cmd{\rule}; |
| 9827 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9828 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9829 |
% bounded by \{\} so no need to reset to defaults. |
| 9830 |
% Not visible from the front. |
| 9831 |
% \begin{macrocode} |
| 9832 |
\newcommand{\rrMFp}{\@rrp{MF}} |
| 9833 |
\newcommand{\SquareMFp}{\@tlen\@SquareLetter{\rrMFp}\@tlen} |
| 9834 |
\newcommand{\rrhMFp}{\raisebox{-0.25mm}{\SquareMFp}} |
| 9835 |
\newcommand{\RubikMFp}{\raisebox{\@hRubik}{\SquareMFp}} |
| 9836 |
\newcommand{\textRubikMFp}{\rrhMFp} |
| 9837 |
% \end{macrocode} |
| 9838 |
% \end{macro} |
| 9839 |
% \end{macro} |
| 9840 |
% \end{macro} |
| 9841 |
% \end{macro} |
| 9842 |
% |
| 9843 |
% |
| 9844 |
% \subsubsection{\hspace{3mm}Rotations MB and MBp} |
| 9845 |
% |
| 9846 |
% MB = Bm = Sp = Sb. We use Sb and Sbp as the templates. |
| 9847 |
% |
| 9848 |
% \begin{macro}{\rrMB} |
| 9849 |
% \begin{macro}{\rrhMB} |
| 9850 |
% \begin{macro}{\RubikMB} |
| 9851 |
% \begin{macro}{\textRubikMB} |
| 9852 |
% These commands draw forms of the MB slice rotation. |
| 9853 |
% We need to just make square with MB in square; |
| 9854 |
% adjust box height using a \cmd{\rule}; |
| 9855 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9856 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9857 |
% bounded by \{\} so no need to reset to defaults. |
| 9858 |
% Not visible from the front. |
| 9859 |
% \begin{macrocode} |
| 9860 |
\newcommand{\rrMB}{\@rr{MB}} |
| 9861 |
\newcommand{\SquareMB}{\@tlen\@SquareLetter{\rrMB}\@tlen} |
| 9862 |
\newcommand{\rrhMB}{\raisebox{-0.25mm}{\SquareMB}} |
| 9863 |
\newcommand{\RubikMB}{\raisebox{\@hRubik}{\SquareMB}} |
| 9864 |
\newcommand{\textRubikMB}{\rrhMB} |
| 9865 |
% \end{macrocode} |
| 9866 |
% \end{macro} |
| 9867 |
% \end{macro} |
| 9868 |
% \end{macro} |
| 9869 |
% \end{macro} |
| 9870 |
% |
| 9871 |
% |
| 9872 |
% \begin{macro}{\rrMBp} |
| 9873 |
% \begin{macro}{\rrhMBp} |
| 9874 |
% \begin{macro}{\RubikMBp} |
| 9875 |
% \begin{macro}{\textRubikMBp} |
| 9876 |
% These commands draw forms of the MBp slice rotation. |
| 9877 |
% We need to just make square with MBp in square; |
| 9878 |
% adjust box height using a \cmd{\rule}; |
| 9879 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 9880 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 9881 |
% bounded by \{\} so no need to reset to defaults. |
| 9882 |
% Not visible from the front. |
| 9883 |
% \begin{macrocode} |
| 9884 |
\newcommand{\rrMBp}{\@rrp{MB}} |
| 9885 |
\newcommand{\SquareMBp}{\@tlen\@SquareLetter{\rrMBp}\@tlen} |
| 9886 |
\newcommand{\rrhMBp}{\raisebox{-0.25mm}{\SquareMBp}} |
| 9887 |
\newcommand{\RubikMBp}{\raisebox{\@hRubik}{\SquareMBp}} |
| 9888 |
\newcommand{\textRubikMBp}{\rrhMBp} |
| 9889 |
% \end{macrocode} |
| 9890 |
% \end{macro} |
| 9891 |
% \end{macro} |
| 9892 |
% \end{macro} |
| 9893 |
% \end{macro} |
| 9894 |
% |
| 9895 |
% |
| 9896 |
% |
| 9897 |
% \subsubsection{\hspace{3mm}Rotations T (wide)} |
| 9898 |
% |
| 9899 |
% TR = Rw \ \ (We use Rw and Rwp as the templates). |
| 9900 |
% |
| 9901 |
% {\noindent}We first set up some useful T and Tp macros for use with (L,R,U,D,F,B) |
| 9902 |
% slightly more general than before. As before the rubikfont command needs to be |
| 9903 |
% delimited using two curly brackets to contain the font expression. |
| 9904 |
% \begin{macrocode} |
| 9905 |
\newcommand{\@rrT}[1]{{\@rubikfont T#1}} |
| 9906 |
\newcommand{\@rrhT}[1]{\@join{\rrh#1}{w}}% |
| 9907 |
\newcommand{\@textRubikT}[1]{\@rrT{#1}\,\@join{\rrh#1}{w}} |
| 9908 |
% |
| 9909 |
\newcommand{\@RubikT}[1]{% |
| 9910 |
{\@rubikfont% |
| 9911 |
\begin{minipage}{0.6cm} |
| 9912 |
\centering%% |
| 9913 |
\@join{\Square#1}{w}\\% |
| 9914 |
\@rrT{#1}%% |
| 9915 |
\end{minipage}% |
| 9916 |
}} |
| 9917 |
%% |
| 9918 |
\newcommand{\@rrTp}[1]{{\@rubikfont T#1\@rubikprime}} |
| 9919 |
\newcommand{\@rrhTp}[1]{\@join{\rrh#1}{wp}}% |
| 9920 |
\newcommand{\@textRubikTp}[1]{\@rrTp{#1}\,\@join{\rrh#1}{wp}} |
| 9921 |
%% |
| 9922 |
\newcommand{\@RubikTp}[1]{% |
| 9923 |
{\@rubikfont% |
| 9924 |
\begin{minipage}{0.6cm} |
| 9925 |
\centering%% |
| 9926 |
\@join{\Square#1}{wp}\\% |
| 9927 |
\@rrTp{#1}%% |
| 9928 |
\end{minipage}% |
| 9929 |
}} |
| 9930 |
% \end{macrocode} |
| 9931 |
% |
| 9932 |
% |
| 9933 |
% |
| 9934 |
% \begin{macro}{\rrTL} |
| 9935 |
% \begin{macro}{\rrhTL} |
| 9936 |
% \begin{macro}{\RubikTL} |
| 9937 |
% \begin{macro}{\textRubikTL} |
| 9938 |
% These commands draw forms of the TL = Lw wide slice rotation. |
| 9939 |
% \begin{macrocode} |
| 9940 |
\newcommand{\rrTL}{\@rrT{L}}% = rrLw |
| 9941 |
\newcommand{\rrhTL}{\@rrhT{L}} |
| 9942 |
\newcommand{\textRubikTL}{\@textRubikT{L}} |
| 9943 |
\newcommand{\RubikTL}{\@RubikT{L}} |
| 9944 |
% \end{macrocode} |
| 9945 |
% \end{macro} |
| 9946 |
% \end{macro} |
| 9947 |
% \end{macro} |
| 9948 |
% \end{macro} |
| 9949 |
% |
| 9950 |
% \begin{macro}{\rrTLp} |
| 9951 |
% \begin{macro}{\rrhTLp} |
| 9952 |
% \begin{macro}{\RubikTLp} |
| 9953 |
% \begin{macro}{\textRubikTLp} |
| 9954 |
% These commands draw forms of the TLp = Lwp wide slice rotation. |
| 9955 |
% \begin{macrocode} |
| 9956 |
\newcommand{\rrTLp}{\@rrTp{L}} |
| 9957 |
\newcommand{\rrhTLp}{\@rrhTp{L}} |
| 9958 |
\newcommand{\textRubikTLp}{\@textRubikTp{L}} |
| 9959 |
\newcommand{\RubikTLp}{\@RubikTp{L}} |
| 9960 |
% \end{macrocode} |
| 9961 |
% \end{macro} |
| 9962 |
% \end{macro} |
| 9963 |
% \end{macro} |
| 9964 |
% \end{macro} |
| 9965 |
% |
| 9966 |
% |
| 9967 |
% |
| 9968 |
% \begin{macro}{\rrTR} |
| 9969 |
% \begin{macro}{\rrhTR} |
| 9970 |
% \begin{macro}{\RubikTR} |
| 9971 |
% \begin{macro}{\textRubikTR} |
| 9972 |
% These commands draw forms of the TR = Rw wide slice rotation. |
| 9973 |
% \begin{macrocode} |
| 9974 |
\newcommand{\rrTR}{\@rrT{R}} |
| 9975 |
\newcommand{\rrhTR}{\@rrhT{R}} |
| 9976 |
\newcommand{\textRubikTR}{\@textRubikT{R}} |
| 9977 |
\newcommand{\RubikTR}{\@RubikT{R}} |
| 9978 |
% \end{macrocode} |
| 9979 |
% \end{macro} |
| 9980 |
% \end{macro} |
| 9981 |
% \end{macro} |
| 9982 |
% \end{macro} |
| 9983 |
% |
| 9984 |
% \begin{macro}{\rrTRp} |
| 9985 |
% \begin{macro}{\rrhTRp} |
| 9986 |
% \begin{macro}{\RubikTRp} |
| 9987 |
% \begin{macro}{\textRubikTRp} |
| 9988 |
% These commands draw forms of the TRp = Rmp wide slice rotation. |
| 9989 |
% \begin{macrocode} |
| 9990 |
\newcommand{\rrTRp}{\@rrTp{R}} |
| 9991 |
\newcommand{\rrhTRp}{\@rrhTp{R}} |
| 9992 |
\newcommand{\textRubikTRp}{\@textRubikTp{R}} |
| 9993 |
\newcommand{\RubikTRp}{\@RubikTp{R}} |
| 9994 |
% \end{macrocode} |
| 9995 |
% \end{macro} |
| 9996 |
% \end{macro} |
| 9997 |
% \end{macro} |
| 9998 |
% \end{macro} |
| 9999 |
% |
| 10000 |
% |
| 10001 |
% |
| 10002 |
% \begin{macro}{\rrTU} |
| 10003 |
% \begin{macro}{\rrhTU} |
| 10004 |
% \begin{macro}{\RubikTU} |
| 10005 |
% \begin{macro}{\textRubikTU} |
| 10006 |
% These commands draw forms of the TU = Uw wide slice rotation. |
| 10007 |
% \begin{macrocode} |
| 10008 |
\newcommand{\rrTU}{\@rrT{U}} |
| 10009 |
\newcommand{\rrhTU}{\@rrhT{U}} |
| 10010 |
\newcommand{\textRubikTU}{\@textRubikT{U}} |
| 10011 |
\newcommand{\RubikTU}{\@RubikT{U}} |
| 10012 |
% \end{macrocode} |
| 10013 |
% \end{macro} |
| 10014 |
% \end{macro} |
| 10015 |
% \end{macro} |
| 10016 |
% \end{macro} |
| 10017 |
% |
| 10018 |
% \begin{macro}{\rrTUp} |
| 10019 |
% \begin{macro}{\rrhTUp} |
| 10020 |
% \begin{macro}{\RubikTUp} |
| 10021 |
% \begin{macro}{\textRubikTUp} |
| 10022 |
% These commands draw forms of the TUp = Uwp wide slice rotation. |
| 10023 |
% \begin{macrocode} |
| 10024 |
\newcommand{\rrTUp}{\@rrTp{U}} |
| 10025 |
\newcommand{\rrhTUp}{\@rrhTp{U}} |
| 10026 |
\newcommand{\textRubikTUp}{\@textRubikTp{U}} |
| 10027 |
\newcommand{\RubikTUp}{\@RubikTp{U}} |
| 10028 |
% \end{macrocode} |
| 10029 |
% \end{macro} |
| 10030 |
% \end{macro} |
| 10031 |
% \end{macro} |
| 10032 |
% \end{macro} |
| 10033 |
% |
| 10034 |
% |
| 10035 |
% |
| 10036 |
% \begin{macro}{\rrTD} |
| 10037 |
% \begin{macro}{\rrhTD} |
| 10038 |
% \begin{macro}{\RubikTD} |
| 10039 |
% \begin{macro}{\textRubikTD} |
| 10040 |
% These commands draw forms of the TD = Dw wide slice rotation. |
| 10041 |
% \begin{macrocode} |
| 10042 |
\newcommand{\rrTD}{\@rrT{D}} |
| 10043 |
\newcommand{\rrhTD}{\@rrhT{D}} |
| 10044 |
\newcommand{\textRubikTD}{\@textRubikT{D}} |
| 10045 |
\newcommand{\RubikTD}{\@RubikT{D}} |
| 10046 |
% \end{macrocode} |
| 10047 |
% \end{macro} |
| 10048 |
% \end{macro} |
| 10049 |
% \end{macro} |
| 10050 |
% \end{macro} |
| 10051 |
% |
| 10052 |
% \begin{macro}{\rrTDp} |
| 10053 |
% \begin{macro}{\rrhTDp} |
| 10054 |
% \begin{macro}{\RubikTDp} |
| 10055 |
% \begin{macro}{\textRubikTDp} |
| 10056 |
% These commands draw forms of the TDp = Dwp wide slice rotation. |
| 10057 |
% \begin{macrocode} |
| 10058 |
\newcommand{\rrTDp}{\@rrTp{D}} |
| 10059 |
\newcommand{\rrhTDp}{\@rrhTp{D}} |
| 10060 |
\newcommand{\textRubikTDp}{\@textRubikTp{D}} |
| 10061 |
\newcommand{\RubikTDp}{\@RubikTp{D}} |
| 10062 |
% \end{macrocode} |
| 10063 |
% \end{macro} |
| 10064 |
% \end{macro} |
| 10065 |
% \end{macro} |
| 10066 |
% \end{macro} |
| 10067 |
% |
| 10068 |
% |
| 10069 |
% \begin{macro}{\rrTF} |
| 10070 |
% \begin{macro}{\rrhTF} |
| 10071 |
% \begin{macro}{\RubikTF} |
| 10072 |
% \begin{macro}{\textRubikTF} |
| 10073 |
% These commands draw forms of the TF = Fw wide slice rotation. |
| 10074 |
% \begin{macrocode} |
| 10075 |
\newcommand{\rrTF}{\@rrT{F}} |
| 10076 |
\newcommand{\rrhTF}{\@rrhT{F}} |
| 10077 |
\newcommand{\textRubikTF}{\@textRubikT{F}} |
| 10078 |
\newcommand{\RubikTF}{\@RubikT{F}} |
| 10079 |
% \end{macrocode} |
| 10080 |
% \end{macro} |
| 10081 |
% \end{macro} |
| 10082 |
% \end{macro} |
| 10083 |
% \end{macro} |
| 10084 |
% |
| 10085 |
% \begin{macro}{\rrTFp} |
| 10086 |
% \begin{macro}{\rrhTFp} |
| 10087 |
% \begin{macro}{\RubikTFp} |
| 10088 |
% \begin{macro}{\textRubikTFp} |
| 10089 |
% These commands draw forms of the TFp = Fwp wide slice rotation. |
| 10090 |
% \begin{macrocode} |
| 10091 |
\newcommand{\rrTFp}{\@rrTp{F}} |
| 10092 |
\newcommand{\rrhTFp}{\@rrhTp{F}} |
| 10093 |
\newcommand{\textRubikTFp}{\@textRubikTp{F}} |
| 10094 |
\newcommand{\RubikTFp}{\@RubikTp{F}} |
| 10095 |
% \end{macrocode} |
| 10096 |
% \end{macro} |
| 10097 |
% \end{macro} |
| 10098 |
% \end{macro} |
| 10099 |
% \end{macro} |
| 10100 |
% |
| 10101 |
% |
| 10102 |
% |
| 10103 |
% \begin{macro}{\rrTB} |
| 10104 |
% \begin{macro}{\rrhTB} |
| 10105 |
% \begin{macro}{\RubikTB} |
| 10106 |
% \begin{macro}{\textRubikTB} |
| 10107 |
% These commands draw forms of the TB = Bw wide slice rotation. |
| 10108 |
% NOTE we just use the letters TB in a square |
| 10109 |
% \begin{macrocode} |
| 10110 |
\newcommand{\rrTB}{\@rrT{B}} |
| 10111 |
\newcommand{\SquareTB}{\@tlen\@SquareLetter{\rrTB}\@tlen} |
| 10112 |
\newcommand{\rrhTB}{\raisebox{-0.25mm}{\SquareTB}} |
| 10113 |
\newcommand{\textRubikTB}{\rrhTB} |
| 10114 |
\newcommand{\RubikTB}{\raisebox{\@hRubik}{\SquareTB}} |
| 10115 |
% \end{macrocode} |
| 10116 |
% \end{macro} |
| 10117 |
% \end{macro} |
| 10118 |
% \end{macro} |
| 10119 |
% \end{macro} |
| 10120 |
% |
| 10121 |
% \begin{macro}{\rrTBp} |
| 10122 |
% \begin{macro}{\rrhTBp} |
| 10123 |
% \begin{macro}{\RubikTBp} |
| 10124 |
% \begin{macro}{\textRubikTBp} |
| 10125 |
% These commands draw forms of the TBp = Bwp wide slice rotation. |
| 10126 |
% NOTE we just use the letters TB' in a square |
| 10127 |
% \begin{macrocode} |
| 10128 |
\newcommand{\rrTBp}{\@rrTp{B}} |
| 10129 |
\newcommand{\SquareTBp}{\@tlen\@SquareLetter{\rrTBp}\@tlen} |
| 10130 |
\newcommand{\rrhTBp}{\raisebox{-0.25mm}{\SquareTBp}} |
| 10131 |
\newcommand{\textRubikTBp}{\rrhTBp} |
| 10132 |
\newcommand{\RubikTBp}{\raisebox{\@hRubik}{\SquareTBp}} |
| 10133 |
% \end{macrocode} |
| 10134 |
% \end{macro} |
| 10135 |
% \end{macro} |
| 10136 |
% \end{macro} |
| 10137 |
% \end{macro} |
| 10138 |
% |
| 10139 |
% |
| 10140 |
% |
| 10141 |
% \subsubsection{\hspace{3mm}Rotations SR and SRp (opposite slices)} |
| 10142 |
% |
| 10143 |
% opposite slices in same direction |
| 10144 |
% SR = Rs (both rotating in R direction) |
| 10145 |
% |
| 10146 |
% \begin{macro}{\rrSR} |
| 10147 |
% \begin{macro}{\rrhSR} |
| 10148 |
% \begin{macro}{\RubikSR} |
| 10149 |
% \begin{macro}{\textRubikSR} |
| 10150 |
% These commands draw forms of the SR opposite slice rotation. |
| 10151 |
% \begin{macrocode} |
| 10152 |
\newcommand{\rrSR}{\@rr{SR}} |
| 10153 |
\newcommand{\rrhSR}{\rrhRs}% |
| 10154 |
\newcommand{\RubikSR}{% |
| 10155 |
{\@rubikfont% |
| 10156 |
\begin{minipage}{0.6cm} |
| 10157 |
\centering% |
| 10158 |
\SquareRs\\ |
| 10159 |
\rrSR% |
| 10160 |
\end{minipage}% |
| 10161 |
}} |
| 10162 |
\newcommand{\textRubikSR}{\rrSR\,\rrhRs} |
| 10163 |
% \end{macrocode} |
| 10164 |
% \end{macro} |
| 10165 |
% \end{macro} |
| 10166 |
% \end{macro} |
| 10167 |
% \end{macro} |
| 10168 |
% |
| 10169 |
% |
| 10170 |
% \begin{macro}{\rrSRp} |
| 10171 |
% \begin{macro}{\rrhSRp} |
| 10172 |
% \begin{macro}{\RubikSRp} |
| 10173 |
% \begin{macro}{\textRubikSRp} |
| 10174 |
% These commands draw forms of the SRp opposite slice rotation. |
| 10175 |
% \begin{macrocode} |
| 10176 |
\newcommand{\rrSRp}{\@rrp{SR}} |
| 10177 |
\newcommand{\rrhSRp}{\rrhRsp}% |
| 10178 |
\newcommand{\RubikSRp}{% |
| 10179 |
{\@rubikfont% |
| 10180 |
\begin{minipage}{0.6cm} |
| 10181 |
\centering% |
| 10182 |
\SquareRsp\\ |
| 10183 |
\rrSRp% |
| 10184 |
\end{minipage}% |
| 10185 |
}} |
| 10186 |
\newcommand{\textRubikSRp}{\rrSRp\,\rrhRsp} |
| 10187 |
% \end{macrocode} |
| 10188 |
% \end{macro} |
| 10189 |
% \end{macro} |
| 10190 |
% \end{macro} |
| 10191 |
% \end{macro} |
| 10192 |
% |
| 10193 |
% |
| 10194 |
% \subsubsection{\hspace{3mm}Rotations SL and SLp} |
| 10195 |
% |
| 10196 |
% SL = Ls (both rotating in L direction) |
| 10197 |
% |
| 10198 |
% \begin{macro}{\rrSL} |
| 10199 |
% \begin{macro}{\rrhSL} |
| 10200 |
% \begin{macro}{\RubikSL} |
| 10201 |
% \begin{macro}{\textRubikSL} |
| 10202 |
% These commands draw forms of the SL opposite slice rotation. |
| 10203 |
% \begin{macrocode} |
| 10204 |
\newcommand{\rrSL}{\@rr{SL}} |
| 10205 |
\newcommand{\rrhSL}{\rrhLs}% |
| 10206 |
\newcommand{\RubikSL}{% |
| 10207 |
{\@rubikfont% |
| 10208 |
\begin{minipage}{0.6cm} |
| 10209 |
\centering% |
| 10210 |
\SquareLs\\ |
| 10211 |
\rrSL% |
| 10212 |
\end{minipage}% |
| 10213 |
}} |
| 10214 |
\newcommand{\textRubikSL}{\rrSL\,\rrhLs} |
| 10215 |
% \end{macrocode} |
| 10216 |
% \end{macro} |
| 10217 |
% \end{macro} |
| 10218 |
% \end{macro} |
| 10219 |
% \end{macro} |
| 10220 |
% |
| 10221 |
% |
| 10222 |
% \begin{macro}{\rrSLp} |
| 10223 |
% \begin{macro}{\rrhSLp} |
| 10224 |
% \begin{macro}{\RubikSLp} |
| 10225 |
% \begin{macro}{\textRubikSLp} |
| 10226 |
% These commands draw forms of the SLp opposite slice rotation. |
| 10227 |
% \begin{macrocode} |
| 10228 |
\newcommand{\rrSLp}{\@rrp{SL}} |
| 10229 |
\newcommand{\rrhSLp}{\rrhLsp}% |
| 10230 |
\newcommand{\RubikSLp}{% |
| 10231 |
{\@rubikfont% |
| 10232 |
\begin{minipage}{0.6cm} |
| 10233 |
\centering% |
| 10234 |
\SquareLsp\\ |
| 10235 |
\rrSLp% |
| 10236 |
\end{minipage}% |
| 10237 |
}} |
| 10238 |
\newcommand{\textRubikSLp}{\rrSLp\,\rrhLsp} |
| 10239 |
% \end{macrocode} |
| 10240 |
% \end{macro} |
| 10241 |
% \end{macro} |
| 10242 |
% \end{macro} |
| 10243 |
% \end{macro} |
| 10244 |
% |
| 10245 |
% |
| 10246 |
% \subsubsection{\hspace{3mm}Rotations SU and SUp} |
| 10247 |
% |
| 10248 |
% SU = Us (both rotating in U direction) |
| 10249 |
% |
| 10250 |
% \begin{macro}{\rrSU} |
| 10251 |
% \begin{macro}{\rrhSU} |
| 10252 |
% \begin{macro}{\RubikSU} |
| 10253 |
% \begin{macro}{\textRubikSU} |
| 10254 |
% These commands draw forms of the SU opposite slice rotation. |
| 10255 |
% \begin{macrocode} |
| 10256 |
\newcommand{\rrSU}{\@rr{SU}} |
| 10257 |
\newcommand{\rrhSU}{\rrhUs}% |
| 10258 |
\newcommand{\RubikSU}{% |
| 10259 |
{\@rubikfont% |
| 10260 |
\begin{minipage}{0.6cm} |
| 10261 |
\centering% |
| 10262 |
\SquareUs\\ |
| 10263 |
\rrSU% |
| 10264 |
\end{minipage}% |
| 10265 |
}} |
| 10266 |
\newcommand{\textRubikSU}{\rrSU\,\rrhUs} |
| 10267 |
% \end{macrocode} |
| 10268 |
% \end{macro} |
| 10269 |
% \end{macro} |
| 10270 |
% \end{macro} |
| 10271 |
% \end{macro} |
| 10272 |
% |
| 10273 |
% |
| 10274 |
% \begin{macro}{\rrSUp} |
| 10275 |
% \begin{macro}{\rrhSUp} |
| 10276 |
% \begin{macro}{\RubikSUp} |
| 10277 |
% \begin{macro}{\textRubikSUp} |
| 10278 |
% These commands draw forms of the SUp opposite slice rotation. |
| 10279 |
% \begin{macrocode} |
| 10280 |
\newcommand{\rrSUp}{\@rrp{SU}} |
| 10281 |
\newcommand{\rrhSUp}{\rrhUsp}% |
| 10282 |
\newcommand{\RubikSUp}{% |
| 10283 |
{\@rubikfont% |
| 10284 |
\begin{minipage}{0.6cm} |
| 10285 |
\centering% |
| 10286 |
\SquareUsp\\ |
| 10287 |
\rrSUp% |
| 10288 |
\end{minipage}% |
| 10289 |
}} |
| 10290 |
\newcommand{\textRubikSUp}{\rrSUp\,\rrhUsp} |
| 10291 |
% \end{macrocode} |
| 10292 |
% \end{macro} |
| 10293 |
% \end{macro} |
| 10294 |
% \end{macro} |
| 10295 |
% \end{macro} |
| 10296 |
% |
| 10297 |
% |
| 10298 |
% \subsubsection{\hspace{3mm}Rotations SD and SDp} |
| 10299 |
% |
| 10300 |
% SD = Ds (both rotating in D direction) |
| 10301 |
% |
| 10302 |
% \begin{macro}{\rrSD} |
| 10303 |
% \begin{macro}{\rrhSD} |
| 10304 |
% \begin{macro}{\RubikSD} |
| 10305 |
% \begin{macro}{\textRubikSD} |
| 10306 |
% These commands draw forms of the SD opposite slice rotation. |
| 10307 |
% \begin{macrocode} |
| 10308 |
\newcommand{\rrSD}{\@rr{SD}} |
| 10309 |
\newcommand{\rrhSD}{\rrhDs}% |
| 10310 |
\newcommand{\RubikSD}{% |
| 10311 |
{\@rubikfont% |
| 10312 |
\begin{minipage}{0.6cm} |
| 10313 |
\centering% |
| 10314 |
\SquareDs\\ |
| 10315 |
\rrSD% |
| 10316 |
\end{minipage}% |
| 10317 |
}} |
| 10318 |
\newcommand{\textRubikSD}{\rrSD\,\rrhDs} |
| 10319 |
% \end{macrocode} |
| 10320 |
% \end{macro} |
| 10321 |
% \end{macro} |
| 10322 |
% \end{macro} |
| 10323 |
% \end{macro} |
| 10324 |
% |
| 10325 |
% |
| 10326 |
% \begin{macro}{\rrSDp} |
| 10327 |
% \begin{macro}{\rrhSDp} |
| 10328 |
% \begin{macro}{\RubikSDp} |
| 10329 |
% \begin{macro}{\textRubikSDp} |
| 10330 |
% These commands draw forms of the SDp opposite slice rotation. |
| 10331 |
% \begin{macrocode} |
| 10332 |
\newcommand{\rrSDp}{\@rrp{SD}} |
| 10333 |
\newcommand{\rrhSDp}{\rrhDsp}% |
| 10334 |
\newcommand{\RubikSDp}{% |
| 10335 |
{\@rubikfont% |
| 10336 |
\begin{minipage}{0.6cm} |
| 10337 |
\centering% |
| 10338 |
\SquareDsp\\ |
| 10339 |
\rrSDp% |
| 10340 |
\end{minipage}% |
| 10341 |
}} |
| 10342 |
\newcommand{\textRubikSDp}{\rrSDp\,\rrhDsp} |
| 10343 |
% \end{macrocode} |
| 10344 |
% \end{macro} |
| 10345 |
% \end{macro} |
| 10346 |
% \end{macro} |
| 10347 |
% \end{macro} |
| 10348 |
% |
| 10349 |
% |
| 10350 |
% \subsubsection{\hspace{3mm}Rotations SF and SFp} |
| 10351 |
% |
| 10352 |
% SF = Fs is not visible from the front, so is represented in a square box. |
| 10353 |
% Both rotating in the F direction |
| 10354 |
% We use Fs and Fsp as the templates. |
| 10355 |
% |
| 10356 |
% \begin{macro}{\rrSF} |
| 10357 |
% \begin{macro}{\rrhSF} |
| 10358 |
% \begin{macro}{\RubikSF} |
| 10359 |
% \begin{macro}{\textRubikSF} |
| 10360 |
% These commands draw forms of the SF opposite slice rotation. |
| 10361 |
% We need to just make square with SF in square; |
| 10362 |
% adjust box height using a \cmd{\rule}; |
| 10363 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 10364 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 10365 |
% bounded by \{\} so no need to reset to defaults. |
| 10366 |
% Not visible from the front. |
| 10367 |
% \begin{macrocode} |
| 10368 |
\newcommand{\rrSF}{\@rr{SF}} |
| 10369 |
\newcommand{\SquareSF}{\@tlen\@SquareLetter{\rrSF}\@tlen} |
| 10370 |
\newcommand{\rrhSF}{\raisebox{-0.25mm}{\SquareSF}} |
| 10371 |
\newcommand{\RubikSF}{\raisebox{\@hRubik}{\SquareSF}} |
| 10372 |
\newcommand{\textRubikSF}{\rrhSF} |
| 10373 |
% \end{macrocode} |
| 10374 |
% \end{macro} |
| 10375 |
% \end{macro} |
| 10376 |
% \end{macro} |
| 10377 |
% \end{macro} |
| 10378 |
% |
| 10379 |
% |
| 10380 |
% \begin{macro}{\rrSFp} |
| 10381 |
% \begin{macro}{\rrhSFp} |
| 10382 |
% \begin{macro}{\RubikSFp} |
| 10383 |
% \begin{macro}{\textRubikSFp} |
| 10384 |
% These commands draw forms of the SFp opposite slice rotation. |
| 10385 |
% We need to just make square with SFp in square; |
| 10386 |
% adjust box height using a \cmd{\rule}; |
| 10387 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 10388 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 10389 |
% bounded by \{\} so no need to reset to defaults. |
| 10390 |
% Not visible from the front. |
| 10391 |
% \begin{macrocode} |
| 10392 |
\newcommand{\rrSFp}{\@rrp{SF}} |
| 10393 |
\newcommand{\SquareSFp}{\@tlen\@SquareLetter{\rrSFp}\@tlen} |
| 10394 |
\newcommand{\rrhSFp}{\raisebox{-0.25mm}{\SquareSFp}} |
| 10395 |
\newcommand{\RubikSFp}{\raisebox{\@hRubik}{\SquareSFp}} |
| 10396 |
\newcommand{\textRubikSFp}{\rrhSFp} |
| 10397 |
% \end{macrocode} |
| 10398 |
% \end{macro} |
| 10399 |
% \end{macro} |
| 10400 |
% \end{macro} |
| 10401 |
% \end{macro} |
| 10402 |
% |
| 10403 |
% |
| 10404 |
% |
| 10405 |
% |
| 10406 |
% \subsubsection{\hspace{3mm}Rotations SB and SBp} |
| 10407 |
% |
| 10408 |
% SB = Bs is not visible from the front, so is represented in a square box. |
| 10409 |
% Both rotating in the B direction |
| 10410 |
% We use Bs and Bsp as the templates. |
| 10411 |
% |
| 10412 |
% \begin{macro}{\rrSB} |
| 10413 |
% \begin{macro}{\rrhSB} |
| 10414 |
% \begin{macro}{\RubikSB} |
| 10415 |
% \begin{macro}{\textRubikSB} |
| 10416 |
% These commands draw forms of the SB opposite slice rotation. |
| 10417 |
% We need to just make square with SB in square; |
| 10418 |
% adjust box height using a \cmd{\rule}; |
| 10419 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 10420 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 10421 |
% bounded by \{\} so no need to reset to defaults. |
| 10422 |
% Not visible from the front. |
| 10423 |
% \begin{macrocode} |
| 10424 |
\newcommand{\rrSB}{\@rr{SB}} |
| 10425 |
\newcommand{\SquareSB}{\@tlen\@SquareLetter{\rrSB}\@tlen} |
| 10426 |
\newcommand{\rrhSB}{\raisebox{-0.25mm}{\SquareSB}} |
| 10427 |
\newcommand{\RubikSB}{\raisebox{\@hRubik}{\SquareSB}} |
| 10428 |
\newcommand{\textRubikSB}{\rrhSB} |
| 10429 |
% \end{macrocode} |
| 10430 |
% \end{macro} |
| 10431 |
% \end{macro} |
| 10432 |
% \end{macro} |
| 10433 |
% \end{macro} |
| 10434 |
% |
| 10435 |
% |
| 10436 |
% \begin{macro}{\rrSBp} |
| 10437 |
% \begin{macro}{\rrhSBp} |
| 10438 |
% \begin{macro}{\RubikSBp} |
| 10439 |
% \begin{macro}{\textRubikSBp} |
| 10440 |
% These commands draw forms of the SBp opposite slice rotation. |
| 10441 |
% We need to just make square with SBp in square; |
| 10442 |
% adjust box height using a \cmd{\rule}; |
| 10443 |
% adjust \cmd{\fboxsep} (default=3pt); |
| 10444 |
% adjust \cmd{\fboxrule} (default=0.4pt); |
| 10445 |
% bounded by \{\} so no need to reset to defaults. |
| 10446 |
% Not visible from the front. |
| 10447 |
% \begin{macrocode} |
| 10448 |
\newcommand{\rrSBp}{\@rrp{SB}} |
| 10449 |
\newcommand{\SquareSBp}{\@tlen\@SquareLetter{\rrSBp}\@tlen} |
| 10450 |
\newcommand{\rrhSBp}{\raisebox{-0.25mm}{\SquareSBp}} |
| 10451 |
\newcommand{\RubikSBp}{\raisebox{\@hRubik}{\SquareSBp}} |
| 10452 |
\newcommand{\textRubikSBp}{\rrhSBp} |
| 10453 |
% \end{macrocode} |
| 10454 |
% \end{macro} |
| 10455 |
% \end{macro} |
| 10456 |
% \end{macro} |
| 10457 |
% \end{macro} |
| 10458 |
% |
| 10459 |
% |
| 10460 |
% |
| 10461 |
% \subsection{\hspace{3mm}Axis rotations (textRubik versions)} |
| 10462 |
% \label{sec:codetextrubikaxisversions} |
| 10463 |
% |
| 10464 |
% For completeness we include a \cmd{\textRubik} version of all the |
| 10465 |
% axis rotation codes (making them equal to their hieroglyphic \cmd{\rrh} version). |
| 10466 |
% Obviously this list must go at the end of this file. While these commands are perhaps |
| 10467 |
% strictly unnecessary, the motivation is to allow users to include them in |
| 10468 |
% a \cmd{\ShowSequence} command when using the \cmd{\textRubik} font argument. |
| 10469 |
% |
| 10470 |
% \begin{macrocode} |
| 10471 |
\newcommand{\textRubikx}{\rrhx} |
| 10472 |
\newcommand{\textRubikxp}{\rrhxp} |
| 10473 |
\newcommand{\textRubiky}{\rrhy} |
| 10474 |
\newcommand{\textRubikyp}{\rrhyp} |
| 10475 |
\newcommand{\textRubikz}{\rrhz} |
| 10476 |
\newcommand{\textRubikzp}{\rrhzp} |
| 10477 |
\newcommand{\textRubikl}{\rrhl} |
| 10478 |
\newcommand{\textRubiklp}{\rrhlp} |
| 10479 |
\newcommand{\textRubikr}{\rrhr} |
| 10480 |
\newcommand{\textRubikrp}{\rrhrp} |
| 10481 |
\newcommand{\textRubiku}{\rrhu} |
| 10482 |
\newcommand{\textRubikup}{\rrhup} |
| 10483 |
\newcommand{\textRubikd}{\rrhd} |
| 10484 |
\newcommand{\textRubikdp}{\rrhdp} |
| 10485 |
\newcommand{\textRubikf}{\rrhf} |
| 10486 |
\newcommand{\textRubikfp}{\rrhfp} |
| 10487 |
\newcommand{\textRubikb}{\rrhb} |
| 10488 |
\newcommand{\textRubikbp}{\rrhbp} |
| 10489 |
\newcommand{\textRubikLc}{\rrhLc} |
| 10490 |
\newcommand{\textRubikLcp}{\rrhLcp} |
| 10491 |
\newcommand{\textRubikRc}{\rrhRc} |
| 10492 |
\newcommand{\textRubikRcp}{\rrhRcp} |
| 10493 |
\newcommand{\textRubikUc}{\rrhUc} |
| 10494 |
\newcommand{\textRubikUcp}{\rrhUcp} |
| 10495 |
\newcommand{\textRubikDc}{\rrhDc} |
| 10496 |
\newcommand{\textRubikDcp}{\rrhDcp} |
| 10497 |
\newcommand{\textRubikFc}{\rrhFc} |
| 10498 |
\newcommand{\textRubikFcp}{\rrhFcp} |
| 10499 |
\newcommand{\textRubikBc}{\rrhBc} |
| 10500 |
\newcommand{\textRubikBcp}{\rrhBcp} |
| 10501 |
\newcommand{\textRubikCL}{\rrhCL} |
| 10502 |
\newcommand{\textRubikCLp}{\rrhCLp} |
| 10503 |
\newcommand{\textRubikCR}{\rrhCR} |
| 10504 |
\newcommand{\textRubikCRp}{\rrhCRp} |
| 10505 |
\newcommand{\textRubikCU}{\rrhCU} |
| 10506 |
\newcommand{\textRubikCUp}{\rrhCUp} |
| 10507 |
\newcommand{\textRubikCD}{\rrhCD} |
| 10508 |
\newcommand{\textRubikCDp}{\rrhCDp} |
| 10509 |
\newcommand{\textRubikCF}{\rrhCF} |
| 10510 |
\newcommand{\textRubikCFp}{\rrhCFp} |
| 10511 |
\newcommand{\textRubikCB}{\rrhCB} |
| 10512 |
\newcommand{\textRubikCBp}{\rrhCBp} |
| 10513 |
% \end{macrocode} |
| 10514 |
% |
| 10515 |
% |
| 10516 |
% |
| 10517 |
% -------------------------- |
| 10518 |
% End of this package |
| 10519 |
% -------------------------- |
| 10520 |
% \begin{macrocode} |
| 10521 |
%</rubikcube> |
| 10522 |
% \end{macrocode} |
| 10523 |
% |
| 10524 |
% |
| 10525 |
% |
| 10526 |
% |
| 10527 |
% \Finale |
| 10528 |
% |
| 10529 |
\endinput |