| 1 |
% \iffalse meta-comment |
| 2 |
% rubiktwocube.dtx |
| 3 |
% |
| 4 |
% version v5.0 |
| 5 |
% February 25, 2018 |
| 6 |
% |
| 7 |
% |
| 8 |
% Copyright 2018 |
| 9 |
% RWD Nickalls ([email protected]) and |
| 10 |
% A Syropoulos ([email protected]) |
| 11 |
% |
| 12 |
% This work may be distributed and/or modified under the |
| 13 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 14 |
% of this license or (at your option) any later version. |
| 15 |
% The latest version of this license is in |
| 16 |
% http://www.latex-project.org/lppl.txt |
| 17 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 18 |
% version 2005/12/01 or later. |
| 19 |
% |
| 20 |
% |
| 21 |
% This work consists of the files rubiktwocube.dtx and rubiktwocube.ins |
| 22 |
% and the derived file rubiktwocube.sty. |
| 23 |
% |
| 24 |
%<*readme> |
| 25 |
% |
| 26 |
% The rubikcube package provides a collection of LaTeX commands and macros |
| 27 |
% for the typesetting of Rubik cube configurations and rotation |
| 28 |
% sequences using the TikZ graphic language. |
| 29 |
% |
| 30 |
% Please report errors or suggestions for improvement to |
| 31 |
% |
| 32 |
% Dick Nickalls or Apostolos Syropoulos |
| 33 |
% |
| 34 |
% This package requires the basic TikZ package to be loaded already |
| 35 |
%</readme> |
| 36 |
% |
| 37 |
%<*driver> |
| 38 |
\listfiles |
| 39 |
\documentclass{ltxdoc} |
| 40 |
\IfFileExists{rubiktwocube.sty}{\usepackage{rubiktwocube}}{% |
| 41 |
\GenericWarning{rubiktwocube.dtx}{Package file rubiktwocube.sty not found. |
| 42 |
Documentation will be messed up!^^J |
| 43 |
(Generate rubiktwocube.sty by (La)TeXing rubiktwocube.ins, and then^^J |
| 44 |
process rubiktwocube.dtx again)^^J}\stop |
| 45 |
}% |
| 46 |
\pagestyle{myheadings} |
| 47 |
\markright{\texttt{rubiktwocube} \ \ (Rubik bundle v5.0, 2018) \ \ \texttt{www.ctan.org/pkg/rubik}} |
| 48 |
\usepackage{rubikcube} %% we require macros @join and rubikfont |
| 49 |
\usepackage{ifpdf} |
| 50 |
\usepackage{url,path} %% for references |
| 51 |
\usepackage{supertabular} %% for Notation table |
| 52 |
\usepackage{hypdoc} %% for hyperref documenting of LaTeX packages |
| 53 |
%%\OnlyDescription |
| 54 |
\EnableCrossrefs |
| 55 |
\PageIndex |
| 56 |
\CodelineIndex |
| 57 |
\CodelineNumbered |
| 58 |
\RecordChanges |
| 59 |
\setcounter{StandardModuleDepth}{1} |
| 60 |
\begin{document} |
| 61 |
\DocInput{rubiktwocube.dtx} |
| 62 |
\PrintChanges |
| 63 |
\PrintIndex |
| 64 |
\end{document} |
| 65 |
%</driver> |
| 66 |
% \fi |
| 67 |
% |
| 68 |
% |
| 69 |
% |
| 70 |
%%% \CheckSum{2308} |
| 71 |
% |
| 72 |
%%% \CharacterTable |
| 73 |
%% {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 |
| 74 |
%% 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 |
| 75 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 76 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 77 |
%% Dollar \$ Percent \% Ampersand \& |
| 78 |
%% Acute accent \' Left paren \( Right paren \) |
| 79 |
%% Asterisk \* Plus \+ Comma \, |
| 80 |
%% Minus \- Point \. Solidus \/ |
| 81 |
%% Colon \: Semicolon \; Less than \< |
| 82 |
%% Equals \= Greater than \> Question mark \? |
| 83 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 84 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 85 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 86 |
%% Right brace \} Tilde \~} |
| 87 |
% |
| 88 |
% |
| 89 |
% \title{% |
| 90 |
% \ifpdf\pdfbookmark[1]{Title}{Title}\else\fi% |
| 91 |
% The \rubiktwocube\ package} |
| 92 |
% |
| 93 |
% \author{ |
| 94 |
% RWD Nickalls ([email protected]) \\ |
| 95 |
% A Syropoulos ([email protected]) |
| 96 |
% } |
| 97 |
% \date{This file describes version \RTCfileversion\ (\RTCfiledate)\\ |
| 98 |
% \texttt{www.ctan.org/pkg/rubik}} |
| 99 |
% \maketitle |
| 100 |
% |
| 101 |
% \begin{abstract} |
| 102 |
% The \rubiktwocube\ package provides LaTeX commands and macros |
| 103 |
% for typesetting TwoCube (2x2x2) notation, configurations, and |
| 104 |
% rotation sequences using the TikZ graphic language. It is part of the |
| 105 |
% Rubik `bundle'. |
| 106 |
% \end{abstract} |
| 107 |
% |
| 108 |
% |
| 109 |
% \begin{minipage}{12cm} |
| 110 |
% \centering |
| 111 |
% \ifpdf |
| 112 |
% \strut\hspace{5mm}\includegraphics[width=12cm]{rubiktwo-doc-figA.pdf} |
| 113 |
% \else |
| 114 |
% \fi |
| 115 |
% \end{minipage} |
| 116 |
% |
| 117 |
% |
| 118 |
% \tableofcontents |
| 119 |
% |
| 120 |
% \pagebreak |
| 121 |
% |
| 122 |
% \section{Introduction} |
| 123 |
% |
| 124 |
% The \rubiktwocube\ package (part of the \textsc{rubik} `bundle') provides a |
| 125 |
% collection of \LaTeX\ commands |
| 126 |
% and macros for typesetting Rubik 2x2x2 cube configurations using the |
| 127 |
% PGF/TikZ graphic languages. |
| 128 |
% This package is a minor extension of the \textsc{rubikcube} package, and users are |
| 129 |
% therefore assumed to be familiar with both the \textsc{rubikcube} and \textsc{rubikrotation} |
| 130 |
% packages. For examples of use see the file \texttt{rubikexamples.pdf}. |
| 131 |
% |
| 132 |
% |
| 133 |
% \subsection{Requirements} |
| 134 |
% |
| 135 |
% The \rubiktwocube\ package requires the TikZ package (since it makes |
| 136 |
% use of the TikZ picture environment), and also the |
| 137 |
% \textsc{rubikcube} package. |
| 138 |
% |
| 139 |
% For full functionality the complementary packages \textsc{rubikrotation} and |
| 140 |
% \textsc{rubikpatterns} also need to be loaded. |
| 141 |
% Note that the \textsc{rubikrotation} package requires Perl to be installed. |
| 142 |
% See the `Installation' section in the \textsc{rubikcube} package documentation |
| 143 |
% (\texttt{rubikcube.pdf}) for more details. |
| 144 |
|
| 145 |
% |
| 146 |
% |
| 147 |
% |
| 148 |
% \subsection{Copyright} |
| 149 |
% Copyright 2014--2018 RWD Nickalls and A Syropoulos. |
| 150 |
% |
| 151 |
% \medskip |
| 152 |
% {\noindent}This work may be distributed and/or modified under the |
| 153 |
% conditions of the LaTeX Project Public License, either |
| 154 |
% version 1.3c of this license or any |
| 155 |
% later version. The latest version of this licence is in |
| 156 |
% |www.latex-project.org/lppl.txt| |
| 157 |
% |
| 158 |
% |
| 159 |
% \section{Installation} |
| 160 |
% |
| 161 |
% The Rubik bundle consists of the four packages \textsc{rubikcube}, \textsc{rubikrotation}, |
| 162 |
% \textsc{rubikpatterns} and \textsc{rubiktwocube}. |
| 163 |
% |
| 164 |
% Here we describe only the installation of the \textsc{rubiktwocube} package, |
| 165 |
% which consists of the following files: |
| 166 |
%\begin{verbatim} |
| 167 |
% rubiktwocube.ins |
| 168 |
% rubiktwocube.dtx |
| 169 |
% rubiktwocube.pdf --documentation of the rubiktwocube package |
| 170 |
% rubiktwo-doc-figA.pdf |
| 171 |
%\end{verbatim} |
| 172 |
% Before installing the \textsc{rubiktwocube} package make sure the following packages |
| 173 |
% are already installed (TikZ graphics system and the \textsc{rubikcube} package). |
| 174 |
% |
| 175 |
% |
| 176 |
% \subsection{\texttt{rubiktwocube.sty}} |
| 177 |
% |
| 178 |
% The style option \texttt{rubiktwocube.sty} is generated by running (pdf)\LaTeX\ on |
| 179 |
% the file \texttt{rubiktwocube.ins} as follows: |
| 180 |
%\begin{verbatim} |
| 181 |
% pdflatex rubiktwocube.ins |
| 182 |
%\end{verbatim} |
| 183 |
% |
| 184 |
% |
| 185 |
% \subsection{\texttt{rubiktwocube.pdf}} |
| 186 |
% |
| 187 |
% The documentation file (\texttt{rubiktwocube.pdf}) is then generated using the following |
| 188 |
% steps\,\footnote{Several pdflatex runs are required, since the documentation includes |
| 189 |
% an index as well as hyperef links (the package \texttt{hypdoc} |
| 190 |
% is used). Prior to the first run it is |
| 191 |
% a good idea to delete any relevant \texttt{.toc}, \texttt{.aux}, \texttt{.out} files.}: |
| 192 |
%\begin{verbatim} |
| 193 |
% pdflatex rubiktwocube.dtx |
| 194 |
% pdflatex rubiktwocube.dtx |
| 195 |
% makeindex -s gind.ist rubiktwocube |
| 196 |
% makeindex -s gglo.ist -o rubiktwocube.gls rubiktwocube.glo |
| 197 |
% pdflatex rubiktwocube.dtx |
| 198 |
% pdflatex rubiktwocube.dtx |
| 199 |
%\end{verbatim} |
| 200 |
% |
| 201 |
% |
| 202 |
% \subsection{Placing the files} |
| 203 |
% |
| 204 |
% Place the files either in the local working directory, or where your system |
| 205 |
% will find them. For a Linux system with a standard \TeX\ Directory Structure (TDS), then: |
| 206 |
% |
| 207 |
%\medskip |
| 208 |
%{\noindent}*.sty $\rightarrow$ |
| 209 |
% \texttt{/usr/local/texlive/texmf-local/tex/latex/rubik/} |
| 210 |
%{\newline}*.pdf $\rightarrow$ \texttt{/usr/local/texlive/texmf-local/doc/rubik/} |
| 211 |
% |
| 212 |
% \medskip |
| 213 |
% {\noindent}Finally, (depending on your system) update the \TeX\ file database. |
| 214 |
% For~example, on a Linux system one uses the \texttt{texhash} command. |
| 215 |
% |
| 216 |
% |
| 217 |
% \subsection{Usage} |
| 218 |
% |
| 219 |
% Load the package by using the command \cmd{\usepackage\{rubiktwocube\}}. |
| 220 |
% Note that the \rubiktwocube\ package requires the TikZ package, and so always load TikZ |
| 221 |
% before \rubiktwocube\ as follows: |
| 222 |
% \begin{quote} |
| 223 |
%\begin{verbatim} |
| 224 |
% \usepackage{tikz} |
| 225 |
% \usepackage{rubikcube,rubikrotation,rubikpatterns,rubiktwocube} |
| 226 |
%\end{verbatim} |
| 227 |
% \end{quote} |
| 228 |
% |
| 229 |
% |
| 230 |
% |
| 231 |
% \subsection{\texttt{rubikexamples.pdf}} |
| 232 |
% |
| 233 |
% The Rubik bundle includes a `RubikExamples' file (\texttt{rubikexamples.pdf}) |
| 234 |
% as well as associated \texttt{.sh} (Linux) and \texttt{.bat} (Microsoft) batch |
| 235 |
% files which can be used to facilitate processing the source file (\texttt{rubikexamples.tex}). |
| 236 |
% See the `Installation' section in the \textsc{rubikcube} package documentation |
| 237 |
% (\texttt{rubikcube.pdf}) for details regarding processing the examples source file. |
| 238 |
% |
| 239 |
% |
| 240 |
% |
| 241 |
% \pagebreak |
| 242 |
% |
| 243 |
% \section{Command conventions} |
| 244 |
% \label{sec:conventions} |
| 245 |
% |
| 246 |
% The examples given in the file \texttt{rubikexamples.pdf} present a good overview of |
| 247 |
% the commands and how to use them. |
| 248 |
% |
| 249 |
% |
| 250 |
% |
| 251 |
% \subsection[Keywords Two and Rubik]{The keywords Two and Rubik in commands} |
| 252 |
% |
| 253 |
% In order to try and keep commands intuitive\,\footnote{This is a tricky problem |
| 254 |
% given the large number of commands, so any feedback or ideas on how to avoid ambiguity, |
| 255 |
% including pruning or revising `bad' commands, is always welcome.} |
| 256 |
% we adopt the convention that the word `Two' in a command reflects the fact that |
| 257 |
% the command relates to a 2x2x2 cube (a `Two' cube). Similarly, commands which relate |
| 258 |
% to a 3x3x3 cube (a `Rubik' cube) ---see the \textsc{rubikcube} package--- |
| 259 |
% use instead the word `Rubik'. |
| 260 |
% |
| 261 |
% |
| 262 |
% |
| 263 |
% It is assumed that users are familiar with the \textsc{rubikcube} |
| 264 |
% and \textsc{rubikrotation} packages, since virtually all \rubiktwocube\ |
| 265 |
% commands mirror the Rubik (3x3x3) cube commands, such that the word `Rubik' |
| 266 |
% is replaced by the word `Two' (exceptions are highlighted). |
| 267 |
% For example, the commands for drawing a 2x2x2 cube and a 3x3x3 cube from a RU viewpoint |
| 268 |
% are respectively \cmd{\DrawTwoCubeRU} and \cmd{\DrawRubikCubeRU}. |
| 269 |
% The examples given in the file \texttt{rubikexamples.pdf} present a good overview of |
| 270 |
% the commands and how to use them. |
| 271 |
% |
| 272 |
% For more detailed information see (a)~the `code' section (Section~\ref{sec:thecode}), |
| 273 |
% or (b)~see the equivalent 3x3x3 commands in the \textsc{rubikcube} package. |
| 274 |
% |
| 275 |
% |
| 276 |
% |
| 277 |
% |
| 278 |
% |
| 279 |
% \section{Colour commands} |
| 280 |
% \label{sec:listofcolourcommands} |
| 281 |
% |
| 282 |
% The following list shows the \rubiktwocube\ colour commands paired |
| 283 |
% (for convenience) with the equivalent 3x3x3 version from the |
| 284 |
% \textsc{rubikcube} package. The \texttt{..} indicates that mandatory arguments are required. |
| 285 |
% |
| 286 |
% |
| 287 |
%\begin{verbatim} |
| 288 |
% RubikCube TwoCube |
| 289 |
% 3x3x3 2x2x2 |
| 290 |
% |
| 291 |
% \RubikCubeSolved \TwoCubeSolved |
| 292 |
% \RubikCubeSolvedWY \TwoCubeSolvedWY |
| 293 |
% \RubikCubeSolvedWB \TwoCubeSolvedWB |
| 294 |
% \RubikCubeGrey \TwoCubeGrey |
| 295 |
% \RubikCubeGray \TwoCubeGray |
| 296 |
% \RubikCubeGreyWY |
| 297 |
% \RubikCubeGrayWY |
| 298 |
% \RubikCubeGreyWB |
| 299 |
% \RubikCubeGrayWB |
| 300 |
% \RubikCubeGreyAll \TwoCubeGreyAll |
| 301 |
% \RubikCubeGrayAll \TwoCubeGrayAll |
| 302 |
% \RubikSolvedConfig.. \TwoSolvedConfig.. |
| 303 |
% |
| 304 |
% \RubikFaceUp.. \TwoFaceUp.. |
| 305 |
% \RubikFaceDown.. \TwoFaceDown.. |
| 306 |
% \RubikFaceLeft.. \TwoFaceLeft.. |
| 307 |
% \RubikFaceRight.. \TwoFaceRight.. |
| 308 |
% \RubikFaceFront.. \TwoFaceFront.. |
| 309 |
% \RubikFaceBack.. \TwoFaceBack.. |
| 310 |
% \RubikFaceUpAll.. \TwoFaceUpAll.. |
| 311 |
% \RubikFaceDownAll.. \TwoFaceDownAll.. |
| 312 |
% \RubikFaceLeftAll.. \TwoFaceLeftAll.. |
| 313 |
% \RubikFaceRightAl.. \TwoFaceRightAll.. |
| 314 |
% \RubikFaceFrontAl.. \TwoFaceFrontAll.. |
| 315 |
% \RubikFaceBackAll.. \TwoFaceBackAll.. |
| 316 |
% |
| 317 |
% \RubikSidebarWidth.. \TwoSidebarWidth.. |
| 318 |
% \RubikSidebarLength.. \TwoSidebarLength.. |
| 319 |
% \RubikSidebarSep.. \TwoSidebarSep.. |
| 320 |
% |
| 321 |
% \RubikSliceTopL.. \TwoSliceTopL.. |
| 322 |
% \RubikSliceTopR.. \TwoSliceTopR.. |
| 323 |
% \RubikSliceBottomL.. \TwoSliceBottomL.. |
| 324 |
% \RubikSliceBottomR.. \TwoSliceBottomR.. |
| 325 |
%\end{verbatim} |
| 326 |
% |
| 327 |
% |
| 328 |
% |
| 329 |
% \section{Draw commands} |
| 330 |
% \label{sec:listofdrawcommands} |
| 331 |
% |
| 332 |
% The following list shows the \rubiktwocube\ Draw commands paired |
| 333 |
% (for convenience) with the equivalent 3x3x3 version from the |
| 334 |
% \textsc{rubikcube} package. Commands in round brackets show short-hand |
| 335 |
% equivalents. |
| 336 |
% |
| 337 |
% |
| 338 |
%\begin{verbatim} |
| 339 |
% RubikCube TwoCube |
| 340 |
% 3x3x3 2x2x2 |
| 341 |
% |
| 342 |
% \DrawRubikCubeRU \DrawTwoCubeRU |
| 343 |
% \DrawRubikCubeRD \DrawTwoCubeRD |
| 344 |
% \DrawRubikCubeLU \DrawTwoCubeLU |
| 345 |
% \DrawRubikCubeLD \DrawTwoCubeLD |
| 346 |
% \DrawRubikCubeF \DrawTwoCubeF |
| 347 |
% \DrawRubikCubeSF \DrawTwoCubeSF |
| 348 |
% |
| 349 |
% \DrawRubikCubeSidebarFL.. \DrawTwoCubeSidebarFL.. |
| 350 |
% \DrawRubikCubeSidebarFR.. \DrawTwoCubeSidebarFR.. |
| 351 |
% \DrawRubikCubeSidebarFU.. \DrawTwoCubeSidebarFU.. |
| 352 |
% \DrawRubikCubeSidebarFD.. \DrawTwoCubeSidebarFD.. |
| 353 |
% \DrawRubikCubeSidebarBL.. \DrawTwoCubeSidebarBL.. |
| 354 |
% \DrawRubikCubeSidebarBR.. \DrawTwoCubeSidebarBR.. |
| 355 |
% \DrawRubikCubeSidebarBU.. \DrawTwoCubeSidebarBU.. |
| 356 |
% \DrawRubikCubeSidebarBD.. \DrawTwoCubeSidebarBD.. |
| 357 |
% |
| 358 |
% \DrawRubikFaceUp \DrawTwoFaceUp (= \DrawTwoFaceU ) |
| 359 |
% \DrawRubikFaceDown \DrawTwoFaceDown (= \DrawTwoFaceD ) |
| 360 |
% \DrawRubikFaceLeft \DrawTwoFaceLeft (= \DrawTwoFaceL ) |
| 361 |
% \DrawRubikFaceRight \DrawTwoFaceRight (= \DrawTwoFaceR ) |
| 362 |
% \DrawRubikFaceFront \DrawTwoFaceFront (= \DrawTwoFaceF ) |
| 363 |
% \DrawRubikFaceBack \DrawTwoFaceBack (= \DrawTwoFaceB ) |
| 364 |
% |
| 365 |
% \DrawRubikFaceUpSide \DrawTwoFaceUpSide (= \DrawTwoFaceUS ) |
| 366 |
% \DrawRubikFaceDownSide \DrawTwoFaceDownSide (= \DrawTwoFaceDS ) |
| 367 |
% \DrawRubikFaceLeftSide \DrawTwoFaceLeftSide (= \DrawTwoFaceLS ) |
| 368 |
% \DrawRubikFaceRightSide \DrawTwoFaceRightSide (= \DrawTwoFaceRS ) |
| 369 |
% \DrawRubikFaceFrontSide \DrawTwoFaceFrontSide (= \DrawTwoFaceFS ) |
| 370 |
% \DrawRubikFaceBackSide \DrawTwoFaceBackSide (= \DrawTwoFaceBS ) |
| 371 |
% |
| 372 |
% \DrawRubikFlatUp.. \DrawTwoFlatUp.. |
| 373 |
% \DrawRubikFlatDown.. \DrawTwoFlatDown.. |
| 374 |
% \DrawRubikFlatLeft.. \DrawTwoFlatLeft.. |
| 375 |
% \DrawRubikFlatRight.. \DrawTwoFlatRight.. |
| 376 |
% \DrawRubikFlatFront.. \DrawTwoFlatFront.. |
| 377 |
% \DrawRubikFlatBack.. \DrawTwoFlatBack.. |
| 378 |
% |
| 379 |
%\end{verbatim} |
| 380 |
% |
| 381 |
% |
| 382 |
% |
| 383 |
% |
| 384 |
% \section{Rotation commands} |
| 385 |
% \label{sec:rotationcommands} |
| 386 |
% |
| 387 |
% \bigskip |
| 388 |
% |
| 389 |
% |
| 390 |
%\begin{verbatim} |
| 391 |
% RubikCube TwoCube |
| 392 |
% 3x3x3 2x2x2 |
| 393 |
% |
| 394 |
% \RubikRotation.. \TwoRotation.. |
| 395 |
% \SaveRubikState.. \SaveTwoState.. |
| 396 |
% \ShowErrors \ShowErrors |
| 397 |
% \CheckState \CheckState |
| 398 |
%\end{verbatim} |
| 399 |
% |
| 400 |
% |
| 401 |
% \subsection{List of rotation commands} |
| 402 |
% \label{sec:listofrotationcommands} |
| 403 |
% |
| 404 |
% |
| 405 |
% All the commands presented here also have a \cmd{\Two\{\}} equivalent form which |
| 406 |
% typesets both the hieroglyph and its lettercode in a vertical format. |
| 407 |
% These have been omitted here owing to the difficulty of including this form easily |
| 408 |
% in the following table. |
| 409 |
% |
| 410 |
% 2x2x2 \textsc{changes}: Note that all these command names mirror their 3x3x3 equivalents in |
| 411 |
% the \textsc{rubikcube} package; the changes in the command prefixes |
| 412 |
% are as follows: |
| 413 |
% |
| 414 |
% \cmd{\tr} $\leftarrow$ \cmd{\rr} |
| 415 |
% |
| 416 |
% \cmd{\trh} $\leftarrow$ \cmd{\rrh} |
| 417 |
% |
| 418 |
% \cmd{\Two} $\leftarrow$ \cmd{\Rubik} |
| 419 |
% |
| 420 |
% \cmd{\textTwo} $\leftarrow$ \cmd{\textRubik} |
| 421 |
% |
| 422 |
% \pagebreak |
| 423 |
% |
| 424 |
% \subsubsection{Face rotations} |
| 425 |
% \label{sec:facerotations} |
| 426 |
% |
| 427 |
% |
| 428 |
% \newcommand{\dnstrut}{\rule{0pt}{17pt}} |
| 429 |
% \newcommand{\dns}{\hspace{2mm}} |
| 430 |
% \newcommand{\dnsp}{\hspace{2mm}} |
| 431 |
% |
| 432 |
% \newcommand{\dnTwo}[1]{% |
| 433 |
% \dnstrut\tr{#1}\dns\cmd{\tr\{#1\}}% |
| 434 |
% & \trh{#1}\dns\cmd{\trh\{#1\}}% |
| 435 |
% & \Two{#1}\dns\cmd{\Two\{#1\}} \nonumber\\% |
| 436 |
% }% |
| 437 |
% |
| 438 |
% \newcommand{\dntextTwo}[1]{% |
| 439 |
% \dnstrut\tr{#1}\dns\cmd{\tr\{#1\}}% |
| 440 |
% & \trh{#1}\dns\cmd{\trh\{#1\}}% |
| 441 |
% & \textTwo{#1}\dns\cmd{\textTwo\{#1\}} \nonumber\\% |
| 442 |
% }% |
| 443 |
% |
| 444 |
% |
| 445 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 446 |
% \dntextTwo{U} |
| 447 |
% \dntextTwo{Up} |
| 448 |
% \dntextTwo{D} |
| 449 |
% \dntextTwo{Dp} |
| 450 |
% \dntextTwo{L} |
| 451 |
% \dntextTwo{Lp} |
| 452 |
% \dntextTwo{R} |
| 453 |
% \dntextTwo{Rp} |
| 454 |
% \dntextTwo{F} |
| 455 |
% \dntextTwo{Fp} |
| 456 |
% \dntextTwo{B} |
| 457 |
% \dntextTwo{Bp} |
| 458 |
% \end{supertabular} |
| 459 |
% |
| 460 |
% |
| 461 |
% |
| 462 |
% \subsubsection{Axis rotations} |
| 463 |
% \label{sec:listofaxisrotations} |
| 464 |
% |
| 465 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 466 |
% \dnTwo{x} |
| 467 |
% \dnTwo{xp} |
| 468 |
% \dnTwo{y} |
| 469 |
% \dnTwo{yp} |
| 470 |
% \dnTwo{z} |
| 471 |
% \dnTwo{zp} |
| 472 |
% \end{supertabular} |
| 473 |
% |
| 474 |
% |
| 475 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 476 |
% \dnTwo{u} |
| 477 |
% \dnTwo{up} |
| 478 |
% \dnTwo{d} |
| 479 |
% \dnTwo{dp} |
| 480 |
% \dnTwo{l} |
| 481 |
% \dnTwo{lp} |
| 482 |
% \dnTwo{r} |
| 483 |
% \dnTwo{rp} |
| 484 |
% \dnTwo{f} |
| 485 |
% \dnTwo{fp} |
| 486 |
% \dnTwo{b} |
| 487 |
% \dnTwo{bp} |
| 488 |
% \end{supertabular} |
| 489 |
% |
| 490 |
% |
| 491 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 492 |
% \dnTwo{Uc} |
| 493 |
% \dnTwo{Ucp} |
| 494 |
% \dnTwo{Dc} |
| 495 |
% \dnTwo{Dcp} |
| 496 |
% \dnTwo{Lc} |
| 497 |
% \dnTwo{Lcp} |
| 498 |
% \dnTwo{Rc} |
| 499 |
% \dnTwo{Rcp} |
| 500 |
% \dnTwo{Fc} |
| 501 |
% \dnTwo{Fcp} |
| 502 |
% \dnTwo{Bc} |
| 503 |
% \dnTwo{Bcp} |
| 504 |
% \end{supertabular} |
| 505 |
% |
| 506 |
% |
| 507 |
% \begin{supertabular}[lll]{p{3cm} p{3cm} p{4.5cm}} |
| 508 |
% \dnTwo{CR} |
| 509 |
% \dnTwo{CRp} |
| 510 |
% \dnTwo{CL} |
| 511 |
% \dnTwo{CLp} |
| 512 |
% \dnTwo{CU} |
| 513 |
% \dnTwo{CUp} |
| 514 |
% \dnTwo{CD} |
| 515 |
% \dnTwo{CDp} |
| 516 |
% \dnTwo{CF} |
| 517 |
% \dnTwo{CFp} |
| 518 |
% \dnTwo{CB} |
| 519 |
% \dnTwo{CBp} |
| 520 |
% \end{supertabular} |
| 521 |
% |
| 522 |
% |
| 523 |
% |
| 524 |
% \section{References} |
| 525 |
% |
| 526 |
% See the \textsc{rubikcube} package documentation for a full list of references. |
| 527 |
% |
| 528 |
% |
| 529 |
% \section{Change history} |
| 530 |
% |
| 531 |
% \begin{itemize} |
| 532 |
% |
| 533 |
% \item Version 5.0 (February 2018) |
| 534 |
% |
| 535 |
% ---First release. |
| 536 |
% |
| 537 |
% \end{itemize} |
| 538 |
% |
| 539 |
% |
| 540 |
% |
| 541 |
% |
| 542 |
% ^^A ======================= |
| 543 |
% \StopEventually{\PrintIndex} |
| 544 |
% |
| 545 |
% \bigskip\bigskip\bigskip\bigskip |
| 546 |
% |
| 547 |
% \section{The code} |
| 548 |
% \label{sec:thecode} |
| 549 |
% |
| 550 |
% All the 2x2x2 code here is essentially a cut-down version of the |
| 551 |
% 3x3x3 code (\textsc{rubikcube} package); i.e.,~we have mostly just |
| 552 |
% removed the 3x3x3 code relating to middle columns and rows, exchanged the |
| 553 |
% word `Rubik' for the word `Two' in command names, and refashioned some of the commands |
| 554 |
% involved in writing the temporary file \texttt{rubikstate.dat}. |
| 555 |
% We assume that users are familiar with the \textsc{rubikcube} and |
| 556 |
% \textsc{rubikrotation} package documentation. |
| 557 |
% |
| 558 |
% In order to avoid much repetition, we describe here only the |
| 559 |
% essential details for understanding the relatively minor changes made in order to |
| 560 |
% transform the earlier 3x3x3 \textsc{rubikcube} package code into |
| 561 |
% working 2x2x2 code. In the following, the various instances of the |
| 562 |
% heading `\textsc{changes:}' imply that more extensive details will be found |
| 563 |
% with the equivalent `Rubik' commands in the \textsc{rubikcube} or \textsc{rubikrotation} |
| 564 |
% package documentation. |
| 565 |
% |
| 566 |
% Relatively few 2x2x2 square hieroglyphs are required; some needed |
| 567 |
% reformulating from their 3x3x3 cousins, ie those associated |
| 568 |
% with \texttt{L,\,Lp,\,R,\,Rp,\,U,\,Up,\,D,\,Dp}. |
| 569 |
% The axis rotations and the rotations \texttt{F,\,Fp,\,B,\,Bp} simply required |
| 570 |
% renaming; for~example, as a `TwoRotationHieroglyph' (\cmd{\trh..}) instead of |
| 571 |
% the 3x3x3 `RubikRotationHieroglyph (\cmd{\rrh..}). |
| 572 |
% |
| 573 |
% |
| 574 |
% |
| 575 |
% |
| 576 |
% \subsection{Package heading} |
| 577 |
% |
| 578 |
% The `RTC' in the following refers to the package name RubikTwoCube. |
| 579 |
% |
| 580 |
% \begin{macrocode} |
| 581 |
%<*rubiktwocube> |
| 582 |
\def\RTCfileversion{5.0}% |
| 583 |
\def\RTCfiledate{2018/02/25}% February 25, 2018 |
| 584 |
\NeedsTeXFormat{LaTeX2e} |
| 585 |
\ProvidesPackage{rubiktwocube}[\RTCfiledate\space (v\RTCfileversion)] |
| 586 |
% \end{macrocode} |
| 587 |
% The package requires TikZ (we use the pgfmathsetmacro command) |
| 588 |
% ---so we load it if not already loaded. |
| 589 |
% \begin{macrocode} |
| 590 |
\@ifpackageloaded{tikz}{}{% |
| 591 |
\typeout{---rubiktwocube requires the TikZ package.}% |
| 592 |
\RequirePackage{tikz}}% |
| 593 |
% \end{macrocode} |
| 594 |
% |
| 595 |
% |
| 596 |
% |
| 597 |
% {\noindent}The package requires \texttt{rubikcube.sty}. However \texttt{rubikcube.sty} |
| 598 |
% is not automatically loaded (for the moment at least) since this makes it difficult |
| 599 |
% to errorcheck new versions, so we just write a message. |
| 600 |
% \begin{macrocode} |
| 601 |
\@ifpackageloaded{rubikcube}{}{% |
| 602 |
\typeout{---rubiktwocube requires the rubikcube package.}% |
| 603 |
}% |
| 604 |
\@ifpackageloaded{rubikrotation}{}{% |
| 605 |
\typeout{---rubiktwocube requires the rubikrotation package.}% |
| 606 |
}% |
| 607 |
% \end{macrocode} |
| 608 |
% |
| 609 |
% \begin{macro}{\rubiktwocube} |
| 610 |
% First we create a suitable logo |
| 611 |
% \begin{macrocode} |
| 612 |
\newcommand{\rubiktwocube}{\textsc{rubiktwocube}}% |
| 613 |
% \end{macrocode} |
| 614 |
% \end{macro} |
| 615 |
% |
| 616 |
% |
| 617 |
% |
| 618 |
% |
| 619 |
% \subsection{Saving the Two-cube state} |
| 620 |
% \label{sec:codesavingtwostate} |
| 621 |
% |
| 622 |
% Note that this package writes this state data to the same `output' file |
| 623 |
% (\texttt{rubikstate.dat}) as used by the 3x3x3 \textsc{rubikrotation} package, |
| 624 |
% since there is no need to change this (since the TwoCube corners will be processed in |
| 625 |
% exactly the same way as for 3x3x3 cube corners). |
| 626 |
% |
| 627 |
% \begin{macro}{\@printTWOstate} |
| 628 |
% This internal command writes the TwoCube state data to |
| 629 |
% the `output' file \texttt{rubikstate.dat}, and is used by the \cmd{\TwoRotation} command |
| 630 |
% (see also \textsc{rubikrotation} package documentation Sections on \textit{save rubikstate} |
| 631 |
% and \textit{general overview} for further details). |
| 632 |
% The file \texttt{rubikstate.dat} is read by the Perl script, and represents |
| 633 |
% the state on which the \cmd{\TwoRotation} command acts. |
| 634 |
% |
| 635 |
% \textsc{changes}: Since this is a TwoCube all the non-corner facelets |
| 636 |
% (ie those in middle rows \& columns) are filled with X (grey). |
| 637 |
% We have also introduced a new line in the output file (\texttt{rubikstate.dat}) |
| 638 |
% namely \texttt{cubesize,two} which is used to inform the Perl program that we |
| 639 |
% are dealing with a TwoCube. |
| 640 |
% \begin{macrocode} |
| 641 |
\newcommand{\@printTWOstate}{% |
| 642 |
\@print{cubesize,two}% |
| 643 |
\@print{\space \space up,\Ult,\Umt,\Urt,\Ulm,\Umm,\Urm,\Ulb,\Umb,\Urb}% |
| 644 |
\@print{down,\Dlt,\Dmt,\Drt,\Dlm,\Dmm,\Drm,\Dlb,\Dmb,\Drb}% |
| 645 |
\@print{left,\Llt,\Lmt,\Lrt,\Llm,\Lmm,\Lrm,\Llb,\Lmb,\Lrb}% |
| 646 |
\@print{right,\Rlt,\Rmt,\Rrt,\Rlm,\Rmm,\Rrm,\Rlb,\Rmb,\Rrb}% |
| 647 |
\@print{front,\Flt,\Fmt,\Frt,\Flm,\Fmm,\Frm,\Flb,\Fmb,\Frb}% |
| 648 |
\@print{back,\Blt,\Bmt,\Brt,\Blm,\Bmm,\Brm,\Blb,\Bmb,\Brb}% |
| 649 |
} |
| 650 |
% \end{macrocode} |
| 651 |
% \end{macro} |
| 652 |
% |
| 653 |
% |
| 654 |
% |
| 655 |
% |
| 656 |
% \subsection{SaveTwoState command} |
| 657 |
% \label{sec:codesavetwostate} |
| 658 |
% |
| 659 |
% \begin{macro}{\SaveTwoState} |
| 660 |
% We create a TwoCube version of the existing \cmd{\SaveRubikState} command |
| 661 |
% (\textsc{rubikrotation} package), simply for symmetry and convenience. |
| 662 |
% This command is identical to the `Rubik' version, and will require |
| 663 |
% the \textsc{rubikrotation} package to be loaded already (as does the following |
| 664 |
% \cmd{\TwoRotation} command. |
| 665 |
% \begin{macrocode} |
| 666 |
\newcommand{\SaveTwoState}{\SaveRubikState} |
| 667 |
% \end{macrocode} |
| 668 |
% \end{macro} |
| 669 |
% |
| 670 |
% |
| 671 |
% |
| 672 |
% |
| 673 |
% \subsection{TwoRotation command} |
| 674 |
% \label{sec:codetworotation} |
| 675 |
% |
| 676 |
% Note that this command writes the data to the same file |
| 677 |
% (\texttt{rubikstate.dat}) as that output by the equivalent 3x3x3 |
| 678 |
% \cmd{\RubikRotation} command, since there is no need to change this. |
| 679 |
% |
| 680 |
% Note that although the system works perfectly well even if we just continue to use the |
| 681 |
% 3x3x3 \cmd{\RubikRotation} command, it was felt appropriate to implement a special |
| 682 |
% TwoCube version of this command, since this allows the Perl script to be aware |
| 683 |
% (via the \texttt{cubesize,two} line written to the \texttt{rubikstate.dat} file) |
| 684 |
% which sort of cube it is dealing with, and hence allows the option for the program to |
| 685 |
% adjust its action accordingly (for example, with regard to the randomisation procedure |
| 686 |
% which is different for different cubes). |
| 687 |
% |
| 688 |
% |
| 689 |
% \begin{macro}{\TwoRotation} |
| 690 |
% The \cmd{\TwoRotation}\oarg{integer}\marg{comma separated sequence} |
| 691 |
% command (a)~writes the current TwoCube state to the file \texttt{rubikstate.dat}, |
| 692 |
% (b)~writes the rotation sequence (either once or multiple times depending |
| 693 |
% on the value of the optional integer argument), and then (c)~CALLs the |
| 694 |
% Perl script \texttt{rubikrotation.pl}. It~also writes comments to the |
| 695 |
% data file and also to the log file. |
| 696 |
% |
| 697 |
% The way we allow the user to (optionally) process the main argument multiple |
| 698 |
% times is simply by writing the associated output command multiple |
| 699 |
% times to the output data-file. Consequently, we require the \cmd{\TwoRotation} |
| 700 |
% command to allow a square-bracket optional |
| 701 |
% argument (a non-negative integer) to specify the number of such repeats. |
| 702 |
% |
| 703 |
% \textsc{2x2x2 changes}: (1)~We have replaced `Rubik' by `Two' in the command-name |
| 704 |
% (2)~we use the command \cmd{\@printTWOstate} (see above) to write the current state data, |
| 705 |
% (3)~the \texttt{RTC} in the fileversion and filedate names denotes `RubikTwoCube'. |
| 706 |
% \begin{macrocode} |
| 707 |
\newcommand{\TwoRotation}[2][1]{% |
| 708 |
\typeout{---TeX process}% |
| 709 |
\typeout{---script = TwoRotation cmd (rubiktwocube.sty)% |
| 710 |
v\RTCfileversion\space (\RTCfiledate)}% |
| 711 |
\typeout{---NEW rotation command}% |
| 712 |
\typeout{---command = TwoRotation[#1]{#2}}% |
| 713 |
\typeout{---writing current TWOcube state to file rubikstate.dat}% |
| 714 |
\@openstatefile% open data file |
| 715 |
\@print{\@comment filename: rubikstate.dat}% |
| 716 |
\@print{\@comment written by TwoRotation cmd (rubiktwocube.sty)% |
| 717 |
v\RTCfileversion\space (\RTCfiledate)}% |
| 718 |
\@printTWOstate% |
| 719 |
%% countingloop code from Feuersaenger (2015) |
| 720 |
\newcount\ourRRcounter% |
| 721 |
\@countingloop{\ourRRcounter} in 1:{#1}{% |
| 722 |
\immediate\write\outfile{rotation,#2}}% |
| 723 |
\@closestatefile% close data file |
| 724 |
\typeout{---CALLing Perl script (rubikrotation.pl)}% |
| 725 |
\immediate\write18{\rubikperlcmd}% |
| 726 |
\typeout{---inputting NEW datafile (data written by Perl script)}% |
| 727 |
\input{rubikstateNEW.dat}% |
| 728 |
\typeout{-----------------------------------------}% |
| 729 |
} |
| 730 |
% \end{macrocode} |
| 731 |
% \end{macro} |
| 732 |
% As usual we require the \texttt{--shell-escape} command-line option to be used. |
| 733 |
% This is provided by the \textsf{shellesc} package, and is equivalent |
| 734 |
% to \cmd{\immediate}\cmd{\write18}. |
| 735 |
% In the future we may need to replace the \verb!\immediate\write18! with \verb!\ShellEscape! |
| 736 |
% ---see the \textsf{shellesc} package documentation. |
| 737 |
% |
| 738 |
% |
| 739 |
% |
| 740 |
% |
| 741 |
% \subsection{TwoFaceX macros} |
| 742 |
% \label{sec:codetwoface} |
| 743 |
% |
| 744 |
% Allocate the four facelet colours to each face |
| 745 |
% (only four facelets now). |
| 746 |
% \begin{macrocode} |
| 747 |
\newcommand{\TwoFaceUp}[4]{% |
| 748 |
\def\Ult{#1}\def\Urt{#2}\def\Ulb{#3}\def\Urb{#4}} |
| 749 |
\newcommand{\TwoFaceFront}[4]{% |
| 750 |
\def\Flt{#1}\def\Frt{#2}\def\Flb{#3}\def\Frb{#4}} |
| 751 |
\newcommand{\TwoFaceRight}[4]{% |
| 752 |
\def\Rlt{#1}\def\Rrt{#2}\def\Rlb{#3}\def\Rrb{#4}} |
| 753 |
\newcommand{\TwoFaceDown}[4]{% |
| 754 |
\def\Dlt{#1}\def\Drt{#2}\def\Dlb{#3}\def\Drb{#4}} |
| 755 |
\newcommand{\TwoFaceLeft}[4]{% |
| 756 |
\def\Llt{#1}\def\Lrt{#2}\def\Llb{#3}\def\Lrb{#4}} |
| 757 |
\newcommand{\TwoFaceBack}[4]{% |
| 758 |
\def\Blt{#1}\def\Brt{#2}\def\Blb{#3}\def\Brb{#4}} |
| 759 |
\newcommand{\TwoFaceUpAll}[1]{% |
| 760 |
\def\Ult{#1}\def\Urt{#1}\def\Ulb{#1}\def\Urb{#1}} |
| 761 |
\newcommand{\TwoFaceFrontAll}[1]{% |
| 762 |
\def\Flt{#1}\def\Frt{#1}\def\Flb{#1}\def\Frb{#1}} |
| 763 |
\newcommand{\TwoFaceRightAll}[1]{% |
| 764 |
\def\Rlt{#1}\def\Rrt{#1}\def\Rlb{#1}\def\Rrb{#1}} |
| 765 |
\newcommand{\TwoFaceLeftAll}[1]{% |
| 766 |
\def\Llt{#1}\def\Lrt{#1}\def\Llb{#1}\def\Lrb{#1}} |
| 767 |
\newcommand{\TwoFaceDownAll}[1]{% |
| 768 |
\def\Dlt{#1}\def\Drt{#1}\def\Dlb{#1}\def\Drb{#1}} |
| 769 |
\newcommand{\TwoFaceBackAll}[1]{% |
| 770 |
\def\Blt{#1}\def\Brt{#1}\def\Blb{#1}\def\Brb{#1}} |
| 771 |
% \end{macrocode} |
| 772 |
% |
| 773 |
%% set the default colour = grey = X |
| 774 |
% \begin{macrocode} |
| 775 |
\TwoFaceUpAll{X}% |
| 776 |
\TwoFaceDownAll{X}% |
| 777 |
\TwoFaceLeftAll{X}% |
| 778 |
\TwoFaceRightAll{X}% |
| 779 |
\TwoFaceFrontAll{X}% |
| 780 |
\TwoFaceBackAll{X}% |
| 781 |
% \end{macrocode} |
| 782 |
% |
| 783 |
% |
| 784 |
% \begin{macrocode} |
| 785 |
\newcommand{\TwoSolvedConfig}[6]{% |
| 786 |
\TwoFaceRightAll{#1}% |
| 787 |
\TwoFaceLeftAll{#2}% |
| 788 |
\TwoFaceUpAll{#3}% |
| 789 |
\TwoFaceDownAll{#4}% |
| 790 |
\TwoFaceFrontAll{#5}% |
| 791 |
\TwoFaceBackAll{#6}% |
| 792 |
} |
| 793 |
% \end{macrocode} |
| 794 |
% |
| 795 |
% |
| 796 |
% |
| 797 |
% |
| 798 |
% \subsection{Grey cube} |
| 799 |
% \label{sec:greycube} |
| 800 |
% |
| 801 |
% |
| 802 |
% \begin{macro}{\TwoCubeGrey} |
| 803 |
% \begin{macro}{\TwoCubeGreyAll} |
| 804 |
% This command sets up an all-grey Twocube. We accommodate both spellings |
| 805 |
% `grey' and `gray' (as used by TikZ). We include \cmd{\TwoCubeGreyAll} |
| 806 |
% (exactly the same) to complement the 3x3x3 version just for convenience. |
| 807 |
% |
| 808 |
% Note that we include the \cmd{\RubikCubeGreyAll} command immediately before |
| 809 |
% the \cmd{\TwoSolvedConfig} in order to first initialise all facelets to grey (X), |
| 810 |
% (since the \cmd{..Config..} command only sets the corner cubies) |
| 811 |
% \begin{macrocode} |
| 812 |
\newcommand{\TwoCubeGrey}{\RubikCubeGreyAll\TwoSolvedConfig{X}{X}{X}{X}{X}{X}}% |
| 813 |
\newcommand{\TwoCubeGreyAll}{\TwoCubeGrey} |
| 814 |
\newcommand{\TwoCubeGray}{\TwoCubeGrey} |
| 815 |
\newcommand{\TwoCubeGrayAll}{\TwoCubeGrey} |
| 816 |
% \end{macrocode} |
| 817 |
% \end{macro} |
| 818 |
% \end{macro} |
| 819 |
% |
| 820 |
% |
| 821 |
% Note that we include the \cmd{\RubikCubeGreyAll} command immediately before |
| 822 |
% the \cmd{\TwoSolvedConfig} in order to first initialise all facelets to grey (X), |
| 823 |
% (since the \cmd{..Config..} command only sets the corner cubies) |
| 824 |
% \begin{macrocode} |
| 825 |
\newcommand{\TwoCubeSolvedWY}{\RubikCubeGreyAll\TwoSolvedConfig{G}{B}{W}{Y}{O}{R}}% |
| 826 |
\newcommand{\TwoCubeSolved}{\TwoCubeSolvedWY}% |
| 827 |
\newcommand{\TwoCubeSolvedWB}{\RubikCubeGreyAll\TwoSolvedConfig{R}{O}{W}{B}{G}{Y}}% |
| 828 |
% \end{macrocode} |
| 829 |
% |
| 830 |
% |
| 831 |
% |
| 832 |
% \subsection{Slice macros} |
| 833 |
% \label{sec:slice} |
| 834 |
% |
| 835 |
% |
| 836 |
% |
| 837 |
% Only top and bottom horizontal slices, |
| 838 |
% as viewed from TopR, TopL,BottomR,BottomL. |
| 839 |
% \begin{macrocode} |
| 840 |
\newcommand{\TwoSliceTopR}[4]{% |
| 841 |
\def\Flt{#1}\def\Frt{#2}\def\Rlt{#3}\def\Rrt{#4}} |
| 842 |
\newcommand{\TwoSliceTopL}[4]{% |
| 843 |
\def\Llt{#1}\def\Lrt{#2}\def\Flt{#3}\def\Frt{#4}} |
| 844 |
\newcommand{\TwoSliceBottomR}[4]{% |
| 845 |
\def\Flb{#1}\def\Frb{#2}\def\Rlb{#3}\def\Rrb{#4}} |
| 846 |
\newcommand{\TwoSliceBottomL}[4]{% |
| 847 |
\def\Llb{#1}\def\Lrb{#2}\def\Flb{#3}\def\Frb{#4}} |
| 848 |
%%--------------------- |
| 849 |
\newcommand{\DrawTwoCubeFrontFace}{% |
| 850 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% |
| 851 |
(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; |
| 852 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% |
| 853 |
(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; |
| 854 |
%% |
| 855 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% |
| 856 |
(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; |
| 857 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% |
| 858 |
(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; |
| 859 |
} |
| 860 |
% \end{macrocode} |
| 861 |
% |
| 862 |
% |
| 863 |
% |
| 864 |
% |
| 865 |
% \subsection{DrawTwoCube.. macros} |
| 866 |
% \label{sec:drawtwocube} |
| 867 |
% |
| 868 |
% |
| 869 |
% |
| 870 |
% \begin{macrocode} |
| 871 |
\newcommand{\DrawTwoCubeRU}{% |
| 872 |
%%-----------Front face---------- |
| 873 |
\DrawTwoCubeFrontFace %% frontface |
| 874 |
%%-----------Up face---------- |
| 875 |
%%---top row |
| 876 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 877 |
(0.33,2.33) -- (0.66,2.66) -- (1.66,2.66) -- (1.33,2.33) -- cycle; |
| 878 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 879 |
(1.33,2.33) -- (1.66,2.66) -- (2.66,2.66) -- (2.33,2.33) -- cycle; |
| 880 |
%%---bottom row |
| 881 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 882 |
(0,2) -- (0.33,2.33) -- (1.33,2.33) -- (1,2) -- cycle; |
| 883 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 884 |
(1,2) -- (1.33,2.33) -- (2.33,2.33) -- (2,2) -- cycle; |
| 885 |
%%-----------Right face---------- |
| 886 |
%%---top row |
| 887 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 888 |
(2,1) -- (2, 2) -- (2.33,2.33) -- (2.33,1.33) -- cycle; |
| 889 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 890 |
(2.33,1.33) -- (2.33, 2.33) -- (2.66,2.66) -- (2.66,1.66) -- cycle; |
| 891 |
%%---bottom row |
| 892 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 893 |
(2,0) -- (2, 1) -- (2.33,1.33) -- (2.33,0.33) -- cycle; |
| 894 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 895 |
(2.33,0.33) -- (2.33, 1.33) -- (2.66,1.66) -- (2.66,0.66) -- cycle; |
| 896 |
} |
| 897 |
%% |
| 898 |
\newcommand{\DrawTwoCube}{\DrawTwoCubeRU} |
| 899 |
%% |
| 900 |
\newcommand{\DrawTwoCubeRD}{% |
| 901 |
\DrawTwoCubeFrontFace %% frontface |
| 902 |
%%----------Right face-------- |
| 903 |
%%---top row |
| 904 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 905 |
(2,1) -- (2, 2) -- (2.33,1.66) -- (2.33,0.66) -- cycle; |
| 906 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 907 |
(2.33,0.66) -- (2.33, 1.66) -- (2.66,1.33) -- (2.66,0.33) -- cycle; |
| 908 |
%%---bottom row |
| 909 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 910 |
(2,0) -- (2, 1) -- (2.33,0.66) -- (2.33,-0.33) -- cycle; |
| 911 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 912 |
(2.33,-0.33) -- (2.33, 0.66) -- (2.66,0.33) -- (2.66,-0.66) -- cycle; |
| 913 |
%%-----------Down face--------- |
| 914 |
%%---top row |
| 915 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 916 |
(0.33,-0.33) -- (0, 0) -- (1,0) -- (1.33,-0.33) -- cycle; |
| 917 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 918 |
(1.33,-0.33) -- (1, 0) -- (2,0) -- (2.33,-0.33) -- cycle; |
| 919 |
%%---bottom row |
| 920 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 921 |
(0.66,-0.66) -- (0.33, -0.33) -- (1.33,-0.33) -- (1.66,-0.66) -- cycle; |
| 922 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 923 |
(1.66,-0.66) -- (1.33, -0.33) -- (2.33,-0.33) -- (2.66,-0.66) -- cycle; |
| 924 |
} |
| 925 |
%% |
| 926 |
\newcommand{\DrawTwoCubeLD}{% |
| 927 |
\DrawTwoCubeFrontFace %% frontface |
| 928 |
%%------------Left face-------- |
| 929 |
%%---top row |
| 930 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 931 |
(-0.66,0.33) -- (-0.66, 1.33) -- (-0.33,1.66) -- (-0.33,0.66) -- cycle; |
| 932 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 933 |
(-0.33,0.66) -- (-0.33, 1.66) -- (0,2) -- (0,1) -- cycle; |
| 934 |
%%---bottom row |
| 935 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 936 |
(-0.66,-0.66) -- (-0.66, 0.33) -- (-0.33,0.66) -- (-0.33,-0.33) -- cycle; |
| 937 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 938 |
(-0.33,-0.33) -- (-0.33, 0.66) -- (0,1) -- (0,0) -- cycle; |
| 939 |
%%------------Down face---------- |
| 940 |
%%---top row |
| 941 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 942 |
(-0.33,-0.33) -- (0, 0) -- (1,0) -- (0.66,-0.33) -- cycle; |
| 943 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 944 |
(0.66,-0.33) -- (1, 0) -- (2,0) -- (1.66,-0.33) -- cycle; |
| 945 |
%%---bottom row |
| 946 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 947 |
(-0.66,-0.66) -- (-0.33, -0.33) -- (0.66,-0.33) -- (0.33,-0.66) -- cycle; |
| 948 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 949 |
(0.33,-0.66) -- (0.66, -0.33) -- (1.66,-0.33) -- (1.33,-0.66) -- cycle; |
| 950 |
} |
| 951 |
%% |
| 952 |
\newcommand{\DrawTwoCubeLU}{% |
| 953 |
\DrawTwoCubeFrontFace %% frontface |
| 954 |
%%-----------Left face----------- |
| 955 |
%%------top row |
| 956 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 957 |
(-0.66,1.66) -- (-0.66, 2.66) -- (-0.33,2.33) -- (-0.33,1.33) -- cycle; |
| 958 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 959 |
(-0.33,1.33) -- (-0.33, 2.33) -- (0,2) -- (0,1) -- cycle; |
| 960 |
%%---bottom row |
| 961 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 962 |
(-0.66,0.66) -- (-0.66, 1.66) -- (-0.33,1.33) -- (-0.33,0.33) -- cycle; |
| 963 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 964 |
(-0.33,0.33) -- (-0.33, 1.33) -- (0,1) -- (0,0) -- cycle; |
| 965 |
%%-----------Up face--------- |
| 966 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 967 |
(-0.33,2.33) -- (-0.66, 2.66) -- (0.33,2.66) -- (0.66,2.33) -- cycle; |
| 968 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 969 |
(0.66,2.33) -- (0.33, 2.66) -- (1.33,2.66) -- (1.66,2.33) -- cycle; |
| 970 |
%%---bottom row |
| 971 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 972 |
(0,2) -- (-0.33, 2.33) -- (0.66,2.33) -- (1,2) -- cycle; |
| 973 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 974 |
(1,2) -- (0.66, 2.33) -- (1.66,2.33) -- (2,2) -- cycle; |
| 975 |
} |
| 976 |
% \end{macrocode} |
| 977 |
% |
| 978 |
% |
| 979 |
% \subsection{DrawTwoFlat.. macros} |
| 980 |
% \label{sec:drawtwoflat} |
| 981 |
% |
| 982 |
% These `Flat' macros draw a specified face with its origin |
| 983 |
% (left bottom corner of the face) at a specified $(x,y)$ coordinate. |
| 984 |
% They allow USERS to place the image of a face at a specific location. |
| 985 |
% |
| 986 |
% |
| 987 |
% \begin{macrocode} |
| 988 |
%%---------------------- |
| 989 |
\newcommand{\DrawTwoFlatUp}[2]{% |
| 990 |
\pgfmathsetmacro{\ux}{#1}% |
| 991 |
\pgfmathsetmacro{\uy}{#2}% |
| 992 |
%%-----top row |
| 993 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ult]% |
| 994 |
(\ux + 0,\uy + 1) -- (\ux + 0,\uy + 2) -- (\ux + 1,\uy + 2)% |
| 995 |
-- (\ux + 1,\uy + 1) -- cycle; |
| 996 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urt]% |
| 997 |
(\ux + 1,\uy + 1) -- (\ux + 1,\uy + 2) -- (\ux + 2,\uy + 2)% |
| 998 |
-- (\ux + 2,\uy + 1) -- cycle; |
| 999 |
%%----bottom row |
| 1000 |
\draw[line join=round,line cap=round,ultra thick,fill=\Ulb]% |
| 1001 |
(\ux + 0,\uy + 0) -- (\ux + 0,\uy + 1) -- (\ux + 1,\uy + 1)% |
| 1002 |
-- (\ux + 1,\uy + 0) -- cycle; |
| 1003 |
\draw[line join=round,line cap=round,ultra thick,fill=\Urb]% |
| 1004 |
(\ux + 1,\uy + 0) -- (\ux + 1,\uy + 1) -- (\ux + 2,\uy + 1)% |
| 1005 |
-- (\ux + 2,\uy + 0) -- cycle; |
| 1006 |
} |
| 1007 |
%%------------------------- |
| 1008 |
\newcommand{\DrawTwoFlatDown}[2]{% |
| 1009 |
\pgfmathsetmacro{\ddx}{#1}% |
| 1010 |
\pgfmathsetmacro{\ddy}{#2}% |
| 1011 |
%%---top row |
| 1012 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlt]% |
| 1013 |
(\ddx + 0,\ddy + 1) -- (\ddx + 0,\ddy + 2) -- (\ddx + 1,\ddy + 2)% |
| 1014 |
-- (\ddx + 1,\ddy + 1) -- cycle; |
| 1015 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drt]% |
| 1016 |
(\ddx + 1,\ddy + 1) -- (\ddx + 1,\ddy + 2) -- (\ddx + 2,\ddy + 2)% |
| 1017 |
-- (\ddx + 2,\ddy + 1) -- cycle; |
| 1018 |
%%----bottom row |
| 1019 |
\draw[line join=round,line cap=round,ultra thick,fill=\Dlb]% |
| 1020 |
(\ddx + 0,\ddy + 0) -- (\ddx + 0,\ddy + 1) -- (\ddx + 1,\ddy + 1)% |
| 1021 |
-- (\ddx + 1,\ddy + 0) -- cycle; |
| 1022 |
\draw[line join=round,line cap=round,ultra thick,fill=\Drb]% |
| 1023 |
(\ddx + 1,\ddy + 0) -- (\ddx + 1,\ddy + 1) -- (\ddx + 2,\ddy + 1)% |
| 1024 |
-- (\ddx + 2,\ddy + 0) -- cycle; |
| 1025 |
} |
| 1026 |
%%------------------------- |
| 1027 |
\newcommand{\DrawTwoFlatLeft}[2]{% |
| 1028 |
\pgfmathsetmacro{\lx}{#1}% |
| 1029 |
\pgfmathsetmacro{\ly}{#2}% |
| 1030 |
%%---top row |
| 1031 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llt]% |
| 1032 |
(\lx + 0, \ly + 1) -- (\lx + 0, \ly + 2) -- (\lx + 1, \ly + 2)% |
| 1033 |
-- (\lx + 1, \ly + 1) -- cycle; |
| 1034 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrt]% |
| 1035 |
(\lx + 1, \ly + 1) -- (\lx + 1, \ly + 2) -- (\lx + 2, \ly + 2)% |
| 1036 |
-- (\lx + 2, \ly + 1) -- cycle; |
| 1037 |
%%----bottom row |
| 1038 |
\draw[line join=round,line cap=round,ultra thick,fill=\Llb]% |
| 1039 |
(\lx + 0, \ly + 0) -- (\lx + 0, \ly + 1) -- (\lx + 1, \ly + 1)% |
| 1040 |
-- (\lx + 1, \ly + 0) -- cycle; |
| 1041 |
\draw[line join=round,line cap=round,ultra thick,fill=\Lrb]% |
| 1042 |
(\lx + 1, \ly + 0) -- (\lx + 1, \ly + 1) -- (\lx + 2, \ly + 1)% |
| 1043 |
-- (\lx + 2, \ly + 0) -- cycle; |
| 1044 |
} |
| 1045 |
%%-------------------------- |
| 1046 |
\newcommand{\DrawTwoFlatRight}[2]{% |
| 1047 |
\pgfmathsetmacro{\rx}{#1}% |
| 1048 |
\pgfmathsetmacro{\ry}{#2}% |
| 1049 |
%%---top row |
| 1050 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlt]% |
| 1051 |
(\rx + 0, \ry + 1) -- (\rx + 0, \ry + 2) -- (\rx + 1, \ry + 2)% |
| 1052 |
-- (\rx + 1, \ry + 1) -- cycle; |
| 1053 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrt]% |
| 1054 |
(\rx + 1, \ry + 1) -- (\rx + 1, \ry + 2) -- (\rx + 2, \ry + 2)% |
| 1055 |
-- (\rx + 2, \ry + 1) -- cycle; |
| 1056 |
%%----bottom row |
| 1057 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rlb]% |
| 1058 |
(\rx + 0, \ry + 0) -- (\rx + 0, \ry + 1) -- (\rx + 1, \ry + 1)% |
| 1059 |
-- (\rx + 1, \ry + 0) -- cycle; |
| 1060 |
\draw[line join=round,line cap=round,ultra thick,fill=\Rrb]% |
| 1061 |
(\rx + 1, \ry + 0) -- (\rx + 1, \ry + 1) -- (\rx + 2, \ry + 1)% |
| 1062 |
-- (\rx + 2, \ry + 0) -- cycle; |
| 1063 |
} |
| 1064 |
%%-------------- |
| 1065 |
\newcommand{\DrawTwoFlatFront}{% |
| 1066 |
%% This command is used /only/ by the \cmd{\DrawRubikFlat} command. |
| 1067 |
%% NOTE: x, y variables not implemented as not required here |
| 1068 |
%%---top row |
| 1069 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flt]% |
| 1070 |
(0,1) -- (0, 2) -- (1,2) -- (1,1) -- cycle; |
| 1071 |
%% |
| 1072 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frt]% |
| 1073 |
(1,1) -- (1, 2) -- (2,2) -- (2,1) -- cycle; |
| 1074 |
%%----bottom row |
| 1075 |
\draw[line join=round,line cap=round,ultra thick,fill=\Flb]% |
| 1076 |
(0,0) -- (0, 1) -- (1,1) -- (1,0) -- cycle; |
| 1077 |
%% |
| 1078 |
\draw[line join=round,line cap=round,ultra thick,fill=\Frb]% |
| 1079 |
(1,0) -- (1, 1) -- (2,1) -- (2,0) -- cycle; |
| 1080 |
} |
| 1081 |
%%-------------------------- |
| 1082 |
\newcommand{\DrawTwoFlatBack}[2]{% |
| 1083 |
\pgfmathsetmacro{\bx}{#1}% |
| 1084 |
\pgfmathsetmacro{\by}{#2}% |
| 1085 |
%%---top row |
| 1086 |
\draw[line join=round,line cap=round,ultra thick,fill=\Blt]% |
| 1087 |
(\bx + 0,\by + 1) -- (\bx + 0,\by + 2) -- (\bx + 1,\by + 2)% |
| 1088 |
-- (\bx + 1,\by + 1) -- cycle; |
| 1089 |
\draw[line join=round,line cap=round,ultra thick,fill=\Brt]% |
| 1090 |
(\bx + 1,\by + 1) -- (\bx + 1,\by + 2) -- (\bx + 2,\by + 2)% |
| 1091 |
-- (\bx + 2,\by + 1) -- cycle; |
| 1092 |
%%----bottom row |
| 1093 |
\draw[line join=round,line cap=round,ultra thick,fill=\Blb]% |
| 1094 |
(\bx + 0,\by + 0) -- (\bx + 0,\by + 1) -- (\bx + 1,\by + 1)% |
| 1095 |
-- (\bx + 1,\by + 0) -- cycle; |
| 1096 |
\draw[line join=round,line cap=round,ultra thick,fill=\Brb]% |
| 1097 |
(\bx + 1,\by + 0) -- (\bx + 1,\by + 1) -- (\bx + 2,\by + 1)% |
| 1098 |
-- (\bx + 2,\by + 0) -- cycle; |
| 1099 |
} |
| 1100 |
%%------------------------------ |
| 1101 |
\newcommand{\DrawTwoCubeF}{% |
| 1102 |
\DrawTwoFlatUp{0}{2}% |
| 1103 |
\DrawTwoFlatDown{0}{-2}% |
| 1104 |
\DrawTwoFlatLeft{-2}{0}% |
| 1105 |
\DrawTwoFlatFront% |
| 1106 |
\DrawTwoFlatRight{2}{0}% |
| 1107 |
\DrawTwoFlatBack{4}{0}% |
| 1108 |
} |
| 1109 |
%% |
| 1110 |
\newcommand{\DrawTwoCubeSF}{% |
| 1111 |
\DrawTwoCubeRU% RU |
| 1112 |
\DrawTwoFlatDown{0}{-2}% |
| 1113 |
\DrawTwoFlatLeft{-2}{0}% |
| 1114 |
\DrawTwoFlatBack{2.666}{0.66}% |
| 1115 |
} |
| 1116 |
% \end{macrocode} |
| 1117 |
% |
| 1118 |
% |
| 1119 |
% |
| 1120 |
% |
| 1121 |
% |
| 1122 |
% |
| 1123 |
% \subsection{Sidebars (Face)} |
| 1124 |
% \label{sec:sidebarsfacecode} |
| 1125 |
% |
| 1126 |
% |
| 1127 |
% Making sidebar macros for a TwoCube (converting the 3x3x3x versions |
| 1128 |
% to the 2x2x2 versions). |
| 1129 |
% {\newline} (1) change name $\rightarrow$ \verb!TWOside@barX! |
| 1130 |
% {\newline} (2) change the value \verb!(3 + \bs)! $\rightarrow$ \verb!(2 + \tbs)! |
| 1131 |
% (as only two squares on a side). |
| 1132 |
% {\newline} (3) change the Sidebar length parameter names by adding a \cmd{\t} prefix |
| 1133 |
% to distinguish the TwoCube parameters from those of the RubikCube. Thus we change |
| 1134 |
% the Rubik names (\cmd{\dx}, \cmd{\dy}, \cmd{\bw}, \cmd{\bl}, \cmd{\blh}, \cmd{\bs}) |
| 1135 |
% to their equivalent Two names (\cmd{\tdx}, \cmd{\tdy}, \cmd{\tbw}, \cmd{\tbl}, |
| 1136 |
% \cmd{\tblh}, \cmd{\tbs}). |
| 1137 |
% |
| 1138 |
% The coordinates of the bottom left corner of a TwoSidebar are (\cmd{\tdx}, \cmd{\tdy}). |
| 1139 |
% The other parameters are width (\cmd{\tbw}), length (\cmd{\tbl}), |
| 1140 |
% half length (\cmd{\tblh}), separation (\cmd{\tbs}). |
| 1141 |
% |
| 1142 |
% \begin{macro}{\TwoSidebarWidth} |
| 1143 |
% \begin{macro}{\TwoSidebarLength} |
| 1144 |
% \begin{macro}{\TwoSidebarSep} |
| 1145 |
% These commands set the width, length and separation of the Sidebars. |
| 1146 |
% Each takes a single scalar argument (no units). |
| 1147 |
% \newline\textsc{usage}: \cmd{\TwoSidebarWidth}\marg{0.5} |
| 1148 |
% \end{macro} |
| 1149 |
% \end{macro} |
| 1150 |
% \end{macro} |
| 1151 |
% |
| 1152 |
% \begin{macrocode} |
| 1153 |
\newcommand{\TwoSidebarWidth}[1]{\pgfmathsetmacro{\tbw}{#1}} |
| 1154 |
\newcommand{\TwoSidebarLength}[1]{\pgfmathsetmacro{\tbl}{#1}} |
| 1155 |
\newcommand{\TwoSidebarSep}[1]{\pgfmathsetmacro{\tbs}{#1}} |
| 1156 |
% \end{macrocode} |
| 1157 |
% We first set some default values. We have set the Sidebar |
| 1158 |
% width and separation to 2/3 those of the Rubik 3x3x3 values |
| 1159 |
% (so that when a 3x3x3 cube and a 2x2x2 cube |
| 1160 |
% are scaled to be the same size, then the Sidebar width and sep will be the same) |
| 1161 |
% These also seem to look good generally as well. |
| 1162 |
% Of course, users can adjust these as they wish anyway. Any new values will |
| 1163 |
% will of course act globally unless constrained (either by using curley brackets, or |
| 1164 |
% by writing them into a \TeX\ environment). |
| 1165 |
% \begin{macrocode} |
| 1166 |
\TwoSidebarWidth{0.2} |
| 1167 |
\TwoSidebarLength{1.0} |
| 1168 |
\TwoSidebarSep{0.2} |
| 1169 |
% \end{macrocode} |
| 1170 |
% |
| 1171 |
% |
| 1172 |
% \begin{macro}{\NoSidebar} |
| 1173 |
% This command \cmd{\NoSidebar}\marg{colour code} (defined in the \textsc{rubikcube} package) |
| 1174 |
% defines the colour for which sidebars should \textit{not} be drawn |
| 1175 |
% (particularly useful when drawing OLL configurations). |
| 1176 |
% This idea was suggested by Robert Ma\v{r}\'{\i}k (May 2017). |
| 1177 |
% {\newline}The principle is that we let the command \cmd{\NoSidebar} define a face colour, |
| 1178 |
% and then we use the \verb!\ifthenelse{\equal{#2}{\no@sidebar}}{}{...}! structure to either |
| 1179 |
% (a)~draw all sidebars as usual (if \cmd{\NoSidebar} is undefined), |
| 1180 |
% or (b)~draw all sidebars \textit{except} those having the \cmd{\NoSidebar} colour |
| 1181 |
% (if \cmd{\NoSidebar} colour = \verb!#2!). |
| 1182 |
% \newline\textsc{usage}: \verb!\NoSidebar{X}! \ If this command in \textit{not} inside |
| 1183 |
% an environment, then its action will continue until it is cancelled (undefined) |
| 1184 |
% as follows: \verb!\NoSidebar{}!. |
| 1185 |
% \end{macro} |
| 1186 |
% |
| 1187 |
% \medskip |
| 1188 |
% |
| 1189 |
% \begin{macro}{\TWOside@barL} |
| 1190 |
% \begin{macro}{\TWOside@barR} |
| 1191 |
% \begin{macro}{\TWOside@barT} |
| 1192 |
% \begin{macro}{\TWOside@barB} |
| 1193 |
|
| 1194 |
% These commands \cmd{\TWOside@barX}\marg{position no}\marg{facelet location} (where |
| 1195 |
% X is one of L~(Left), R~(Right), T~(Top), B~(Bottom), which denote the side of the |
| 1196 |
% 2x2 square representing a face), draw a single small bar in a position (1, or 2), |
| 1197 |
% having the colour of a specified facelet. The integers 1, 2 denote the facelet number |
| 1198 |
% (measured from the grid origin = bottom left corner of the face) |
| 1199 |
% adjacent to which the bar is positioned. |
| 1200 |
% |
| 1201 |
% These macros are used in the various `Sidebar' commands which draw pairs of |
| 1202 |
% these small bars adjacent to specified faces. |
| 1203 |
% \newline\textsc{changes}: Rubik $\rightarrow$ Two, \cmd{\bw} $\rightarrow$ \cmd{\tbw}, |
| 1204 |
% \cmd{\bl} $\rightarrow$ \cmd{\tbl}, \cmd{\bs} $\rightarrow$ \cmd{\tbs}, |
| 1205 |
% \cmd{\dx} $\rightarrow$ \cmd{\tdx}, \cmd{\dy} $\rightarrow$ \cmd{\tdy} |
| 1206 |
% (see Section~\ref{sec:sidebarscode} for details of these variables). |
| 1207 |
% \newline\textsc{usage}: \verb!\TWOside@barL{2}{\Lrt}! |
| 1208 |
% \end{macro} |
| 1209 |
% \end{macro} |
| 1210 |
% \end{macro} |
| 1211 |
% \end{macro} |
| 1212 |
% |
| 1213 |
% \begin{macrocode} |
| 1214 |
\newcommand{\TWOside@barL}[2]{% |
| 1215 |
%% #1 = cubie possn no, #2 = colour |
| 1216 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1217 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1218 |
\pgfmathsetmacro{\tdx}{0 - \tbs - \tbw}% |
| 1219 |
\pgfmathsetmacro{\tdy}{#1-1+0.5-\tblh}% |
| 1220 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1221 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; |
| 1222 |
}} |
| 1223 |
%% changed Rubik value (3 + \bs) --> (2 + \tbs) (as only TWO squares) |
| 1224 |
\newcommand{\TWOside@barR}[2]{% |
| 1225 |
%% #1 = cubie possn no, #2 = colour |
| 1226 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1227 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1228 |
\pgfmathsetmacro{\tdx}{2 + \tbs}% |
| 1229 |
\pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh}% |
| 1230 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1231 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; |
| 1232 |
}} |
| 1233 |
%% changed Rubik value (3 + \bs) --> (2 + \tbs) (as only TWO squares) |
| 1234 |
\newcommand{\TWOside@barT}[2]{% |
| 1235 |
%% #1 = cubie possn no, #2 = colour |
| 1236 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1237 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1238 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh}% |
| 1239 |
\pgfmathsetmacro{\tdy}{2 +\tbs}% |
| 1240 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1241 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1242 |
}} |
| 1243 |
\newcommand{\TWOside@barB}[2]{% |
| 1244 |
%% #1 = cubie possn no, #2 = colour |
| 1245 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1246 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1247 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh}% |
| 1248 |
\pgfmathsetmacro{\tdy}{0 -\tbs-\tbw}% |
| 1249 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1250 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1251 |
}} |
| 1252 |
% \end{macrocode} |
| 1253 |
% |
| 1254 |
|
| 1255 |
|
| 1256 |
% |
| 1257 |
% \subsubsection{DrawTwoFaceXSide macros} |
| 1258 |
% \label{sec:drawtwofacexside} |
| 1259 |
% |
| 1260 |
% Only 2 bars on each side for a TwoCube. |
| 1261 |
% Change from 3x3x3: we remove the middle cols \& row sections |
| 1262 |
% change name DrawRubikLayerSide --> DrawTwoLayerSide |
| 1263 |
% |
| 1264 |
% RWDN 16 Feb 2018 |
| 1265 |
% v5: removed many (duplicated and unnecessary) macros, and replaced them |
| 1266 |
% with these TwoFace.. macros using just the basic \cmd{\TWOside@bar..} macros |
| 1267 |
% for drawing small single bars. |
| 1268 |
% |
| 1269 |
% These new macros draw a specified face (using the ..Flat.. commands) |
| 1270 |
% as well as all the associated sidebars. |
| 1271 |
% Note we continue to use the key-word `Side' here to indicate we are |
| 1272 |
% drawing all the sidebars, since we are drawing a face. |
| 1273 |
% (only for 3D cubes do we use the word `SidebarXX' for denoting a particular |
| 1274 |
% Sidebar to be drawn etc.) |
| 1275 |
% |
| 1276 |
% \begin{macrocode} |
| 1277 |
\newcommand{\DrawTwoFaceUpSide}{% |
| 1278 |
\DrawTwoFlatUp{0}{0}% |
| 1279 |
\TWOside@barT{1}{\Brt}% |
| 1280 |
\TWOside@barT{2}{\Blt}% |
| 1281 |
\TWOside@barL{2}{\Llt}% |
| 1282 |
\TWOside@barL{1}{\Lrt}% |
| 1283 |
\TWOside@barR{2}{\Rrt}% |
| 1284 |
\TWOside@barR{1}{\Rlt}% |
| 1285 |
\TWOside@barB{1}{\Flt}% |
| 1286 |
\TWOside@barB{2}{\Frt}% |
| 1287 |
} |
| 1288 |
\newcommand{\DrawTwoFaceFrontSide}{% |
| 1289 |
\DrawTwoFlatFront{0}{0}% |
| 1290 |
\TWOside@barT{1}{\Ulb}% |
| 1291 |
\TWOside@barT{2}{\Urb}% |
| 1292 |
\TWOside@barL{2}{\Lrt}% |
| 1293 |
\TWOside@barL{1}{\Lrb}% |
| 1294 |
\TWOside@barR{2}{\Rlt}% |
| 1295 |
\TWOside@barR{1}{\Rlb}% |
| 1296 |
\TWOside@barB{1}{\Dlt}% |
| 1297 |
\TWOside@barB{2}{\Drt}% |
| 1298 |
} |
| 1299 |
\newcommand{\DrawTwoFaceRightSide}{% |
| 1300 |
\DrawTwoFlatRight{0}{0}% |
| 1301 |
\TWOside@barT{1}{\Urb}% |
| 1302 |
\TWOside@barT{2}{\Urt}% |
| 1303 |
\TWOside@barL{2}{\Frt}% |
| 1304 |
\TWOside@barL{1}{\Frb}% |
| 1305 |
\TWOside@barR{2}{\Blt}% |
| 1306 |
\TWOside@barR{1}{\Blb}% |
| 1307 |
\TWOside@barB{1}{\Drt}% |
| 1308 |
\TWOside@barB{2}{\Drb}% |
| 1309 |
} |
| 1310 |
\newcommand{\DrawTwoFaceLeftSide}{% |
| 1311 |
\DrawTwoFlatLeft{0}{0}% |
| 1312 |
\TWOside@barT{1}{\Ult}% |
| 1313 |
\TWOside@barT{2}{\Ulb}% |
| 1314 |
\TWOside@barL{2}{\Brt}% |
| 1315 |
\TWOside@barL{1}{\Brb}% |
| 1316 |
\TWOside@barR{2}{\Flt}% |
| 1317 |
\TWOside@barR{1}{\Flb}% |
| 1318 |
\TWOside@barB{1}{\Dlb}% |
| 1319 |
\TWOside@barB{2}{\Dlt}% |
| 1320 |
} |
| 1321 |
\newcommand{\DrawTwoFaceBackSide}{% |
| 1322 |
\DrawTwoFlatBack{0}{0}% |
| 1323 |
\TWOside@barT{1}{\Urt}% |
| 1324 |
\TWOside@barT{2}{\Ult}% |
| 1325 |
\TWOside@barL{2}{\Rrt}% |
| 1326 |
\TWOside@barL{1}{\Rrb}% |
| 1327 |
\TWOside@barR{2}{\Llt}% |
| 1328 |
\TWOside@barR{1}{\Llb}% |
| 1329 |
\TWOside@barB{1}{\Drb}% |
| 1330 |
\TWOside@barB{2}{\Dlb}% |
| 1331 |
} |
| 1332 |
\newcommand{\DrawTwoFaceDownSide}{% |
| 1333 |
\DrawTwoFlatDown{0}{0}% |
| 1334 |
\TWOside@barT{1}{\Flb}% |
| 1335 |
\TWOside@barT{2}{\Frb}% |
| 1336 |
\TWOside@barL{2}{\Lrb}% |
| 1337 |
\TWOside@barL{1}{\Llb}% |
| 1338 |
\TWOside@barR{2}{\Rlb}% |
| 1339 |
\TWOside@barR{1}{\Rrb}% |
| 1340 |
\TWOside@barB{1}{\Brb}% |
| 1341 |
\TWOside@barB{2}{\Blb}% |
| 1342 |
} |
| 1343 |
%% |
| 1344 |
%% v5: made Face versions (for USER) without the (x,y) coordinates |
| 1345 |
\newcommand{\DrawTwoFaceUp}{\DrawTwoFlatUp{0}{0}} |
| 1346 |
\newcommand{\DrawTwoFaceDown}{\DrawTwoFlatDown{0}{0}} |
| 1347 |
\newcommand{\DrawTwoFaceLeft}{\DrawTwoFlatLeft{0}{0}} |
| 1348 |
\newcommand{\DrawTwoFaceRight}{\DrawTwoFlatRight{0}{0}} |
| 1349 |
\newcommand{\DrawTwoFaceFront}{\DrawTwoFlatFront{0}{0}} |
| 1350 |
\newcommand{\DrawTwoFaceBack}{\DrawTwoFlatBack{0}{0}} |
| 1351 |
%% |
| 1352 |
%% v5: made short forms --> abbreviations |
| 1353 |
\newcommand{\DrawTwoFaceU}{\DrawTwoFlatUp{0}{0}} |
| 1354 |
\newcommand{\DrawTwoFaceD}{\DrawTwoFlatDown{0}{0}} |
| 1355 |
\newcommand{\DrawTwoFaceL}{\DrawTwoFlatLeft{0}{0}} |
| 1356 |
\newcommand{\DrawTwoFaceR}{\DrawTwoFlatRight{0}{0}} |
| 1357 |
\newcommand{\DrawTwoFaceF}{\DrawTwoFlatFront{0}{0}} |
| 1358 |
\newcommand{\DrawTwoFaceB}{\DrawTwoFlatBack{0}{0}} |
| 1359 |
%% |
| 1360 |
%% v5: made short forms --> abbreviations |
| 1361 |
\newcommand{\DrawTwoFaceUS}{\DrawTwoFaceUpSide} |
| 1362 |
\newcommand{\DrawTwoFaceDS}{\DrawTwoFaceDownSide} |
| 1363 |
\newcommand{\DrawTwoFaceLS}{\DrawTwoFaceLeftSide} |
| 1364 |
\newcommand{\DrawTwoFaceRS}{\DrawTwoFaceRightSide} |
| 1365 |
\newcommand{\DrawTwoFaceFS}{\DrawTwoFaceFrontSide} |
| 1366 |
\newcommand{\DrawTwoFaceBS}{\DrawTwoFaceBackSide} |
| 1367 |
% \end{macrocode} |
| 1368 |
% |
| 1369 |
% |
| 1370 |
% |
| 1371 |
% |
| 1372 |
% |
| 1373 |
% \subsection{Sidebars (Cube)} |
| 1374 |
% \label{sec:sidebarscubecode} |
| 1375 |
% |
| 1376 |
% |
| 1377 |
% In order to position sidebars adjacent to a TwoCube (ie in 3D) |
| 1378 |
% requires that we first make some new \cmd{\TWOside@bar..} |
| 1379 |
% commands which draw sidebars adjacent to the \textsc{back} face |
| 1380 |
% (we have already made the macros for the front |
| 1381 |
% face sidebars---see Section~\ref{sec:sidebarsfacecode}). |
| 1382 |
% Furthermore, these new macros need to be tailored to each of the |
| 1383 |
% four standard cube viewing directions RU, LU, RD, LD. |
| 1384 |
% |
| 1385 |
% Finally, the USER commands for drawing these sidebars need |
| 1386 |
% to accommodate (a)~some code for identifying each set of sidebars, |
| 1387 |
% and (b)~the viewing direction. So, for example, a USER command for |
| 1388 |
% drawing the sidebars associated with the cube edge formed |
| 1389 |
% by the \textsc{right} face and the \textsc{back} face |
| 1390 |
% (lets define this as the RB sidebar) as viewed from the RU direction, |
| 1391 |
% might be something like \cmd{\DrawTwoCubeSidebarRBRU}. |
| 1392 |
% Since this is not particularly user-friendly, |
| 1393 |
% we can improve on this slightly for the USER by |
| 1394 |
% (a)~defining the sidebar as \texttt{SidebarRB}, and |
| 1395 |
% (b)~appending the view direction in a curly bracket, say as \verb!{RU}!. |
| 1396 |
% This allows a more intuitive command structure for the USER, |
| 1397 |
% as follows: \verb!\DrawTwoCubeSidebarRB{RU}!. |
| 1398 |
% We then use the \cmd{\@join} command to append the string \verb!RU! to the string |
| 1399 |
% \verb!DrawTwoCubeSidebarRB! forming the (internal) |
| 1400 |
% command \cmd{\DrawTwoCubeSidebarRBRU}. |
| 1401 |
% |
| 1402 |
% In the following we will group the development according to to the view direction. |
| 1403 |
% |
| 1404 |
% |
| 1405 |
% |
| 1406 |
% \subsubsection{Sidebars: RU view} |
| 1407 |
% |
| 1408 |
% \subsubsection*{Right-Back vert sidebar (RU view)} |
| 1409 |
% |
| 1410 |
% Need to write a new \cmd{\TWOside@barR..} command |
| 1411 |
% (see Section~\ref{sec:sidebarsfacecode}). |
| 1412 |
% This draws only a single small bar. |
| 1413 |
% Each of the two small bars has a numbered position (1,2); |
| 1414 |
% (dx,dy) = bottom Left corner of single bar |
| 1415 |
% |
| 1416 |
% \begin{macrocode} |
| 1417 |
\newcommand{\TWOside@barRbackRU}[2]{% |
| 1418 |
%% #1 = cubie possn no, #2 = colour |
| 1419 |
%% tdx --> tdx + (2/3) |
| 1420 |
%% tdy --> tdy + (2/3) |
| 1421 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1422 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1423 |
\pgfmathsetmacro{\tdx}{2 + \tbs +0.666}% |
| 1424 |
\pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh +0.666}% |
| 1425 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1426 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle;% |
| 1427 |
}} |
| 1428 |
% \end{macrocode} |
| 1429 |
% Now make the RB (RightBack) vertical sidebar command; |
| 1430 |
% ie bar~1 is at the bottom; bar~2 is at the top. |
| 1431 |
% |
| 1432 |
% \begin{macrocode} |
| 1433 |
\newcommand{\DrawTwoCubeSidebarRBRU}{% |
| 1434 |
\TWOside@barRbackRU{2}{\Blt}% |
| 1435 |
\TWOside@barRbackRU{1}{\Blb}% |
| 1436 |
} |
| 1437 |
% \end{macrocode} |
| 1438 |
% Now make the reverse command (BR) = RB |
| 1439 |
% \begin{macrocode} |
| 1440 |
\newcommand{\DrawTwoCubeSidebarBRRU}{\DrawTwoCubeSidebarRBRU} |
| 1441 |
% \end{macrocode} |
| 1442 |
% Finally, make the join commands |
| 1443 |
% \begin{macrocode} |
| 1444 |
\newcommand{\DrawTwoCubeSidebarRB}[1]{\@join{\DrawTwoCubeSidebarRB}{#1}} |
| 1445 |
\newcommand{\DrawTwoCubeSidebarBR}[1]{\@join{\DrawTwoCubeSidebarBR}{#1}} |
| 1446 |
% \end{macrocode} |
| 1447 |
% |
| 1448 |
% |
| 1449 |
% |
| 1450 |
% \medskip |
| 1451 |
% |
| 1452 |
% \subsubsection*{Up-Back horiz sidebar (RU view)} |
| 1453 |
% |
| 1454 |
% |
| 1455 |
% \begin{macrocode} |
| 1456 |
\newcommand{\TWOside@barTbackRU}[2]{% |
| 1457 |
%% #1 = cubie possn no; #2 = colour |
| 1458 |
%% tdx --> tdx + (2/3) |
| 1459 |
%% tdy --> tdy + (2/3) |
| 1460 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1461 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1462 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh +0.666}% |
| 1463 |
\pgfmathsetmacro{\tdy}{2 +\tbs +0.666}% |
| 1464 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1465 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1466 |
}} |
| 1467 |
% \end{macrocode} |
| 1468 |
% Now make the UB (Up-Back) horizontal sidebar command; |
| 1469 |
% ie bar~1 is on the left, bar~2 is on the right (as we look at the cube). |
| 1470 |
% \begin{macrocode} |
| 1471 |
\newcommand{\DrawTwoCubeSidebarUBRU}{% |
| 1472 |
\TWOside@barTbackRU{1}{\Brt}% |
| 1473 |
\TWOside@barTbackRU{2}{\Blt}% |
| 1474 |
} |
| 1475 |
% \end{macrocode} |
| 1476 |
% Now make the reverse command (BU) = UB |
| 1477 |
% \begin{macrocode} |
| 1478 |
\newcommand{\DrawTwoCubeSidebarBURU}{\DrawTwoCubeSidebarUBRU} |
| 1479 |
% \end{macrocode} |
| 1480 |
% Now make the join commands |
| 1481 |
% \begin{macrocode} |
| 1482 |
\newcommand{\DrawTwoCubeSidebarUB}[1]{\@join{\DrawTwoCubeSidebarUB}{#1}} |
| 1483 |
\newcommand{\DrawTwoCubeSidebarBU}[1]{\@join{\DrawTwoCubeSidebarBU}{#1}} |
| 1484 |
% \end{macrocode} |
| 1485 |
% |
| 1486 |
% |
| 1487 |
% |
| 1488 |
% \medskip |
| 1489 |
% |
| 1490 |
% \subsubsection*{Front-Left vert sidebar (RU view)} |
| 1491 |
% |
| 1492 |
% Since this is a front-face sidebar we can use the regular |
| 1493 |
% \cmd{TWOside@barL..} command. |
| 1494 |
% Now make the FL (Front-Left) vertical sidebar command; |
| 1495 |
% ie bar~1 is at the bottom; bar~2 is at the top. |
| 1496 |
% \begin{macrocode} |
| 1497 |
\newcommand{\DrawTwoCubeSidebarFLRU}{% |
| 1498 |
\TWOside@barL{2}{\Lrt}% |
| 1499 |
\TWOside@barL{1}{\Lrb}% |
| 1500 |
} |
| 1501 |
% \end{macrocode} |
| 1502 |
% Now do the reverse (LF) |
| 1503 |
% \begin{macrocode} |
| 1504 |
\newcommand{\DrawTwoCubeSidebarLFRU}{\DrawTwoCubeSidebarFLRU} |
| 1505 |
% \end{macrocode} |
| 1506 |
% Now do the two join commands |
| 1507 |
% \begin{macrocode} |
| 1508 |
\newcommand{\DrawTwoCubeSidebarFL}[1]{\@join{\DrawTwoCubeSidebarFL}{#1}} |
| 1509 |
\newcommand{\DrawTwoCubeSidebarLF}[1]{\@join{\DrawTwoCubeSidebarLF}{#1}} |
| 1510 |
% \end{macrocode} |
| 1511 |
% |
| 1512 |
% |
| 1513 |
% |
| 1514 |
% \medskip |
| 1515 |
% |
| 1516 |
% \subsubsection*{Front-Down horiz sidebar (RU view)} |
| 1517 |
% |
| 1518 |
% Since this is a front face sidebar we can use the regular |
| 1519 |
% \cmd{TWOside@barL..} command. |
| 1520 |
% |
| 1521 |
% \begin{macrocode} |
| 1522 |
\newcommand{\DrawTwoCubeSidebarFDRU}{% |
| 1523 |
\TWOside@barB{1}{\Dlt}% |
| 1524 |
\TWOside@barB{2}{\Drt}% |
| 1525 |
} |
| 1526 |
% \end{macrocode} |
| 1527 |
% Now do the reverse (DF) = FD |
| 1528 |
% \begin{macrocode} |
| 1529 |
\newcommand{\DrawTwoCubeSidebarDFRU}{\DrawTwoCubeSidebarFDRU} |
| 1530 |
% \end{macrocode} |
| 1531 |
% Now do the two join commands |
| 1532 |
% \begin{macrocode} |
| 1533 |
\newcommand{\DrawTwoCubeSidebarFD}[1]{\@join{\DrawTwoCubeSidebarFD}{#1}} |
| 1534 |
\newcommand{\DrawTwoCubeSidebarDF}[1]{\@join{\DrawTwoCubeSidebarDF}{#1}} |
| 1535 |
% \end{macrocode} |
| 1536 |
% But FD-LU is the same as FD-RU, so we need to make copies of each. |
| 1537 |
% \begin{macrocode} |
| 1538 |
\newcommand{\DrawTwoCubeSidebarDFLU}{\DrawTwoCubeSidebarDFRU} |
| 1539 |
\newcommand{\DrawTwoCubeSidebarFDLU}{\DrawTwoCubeSidebarFDRU} |
| 1540 |
% \end{macrocode} |
| 1541 |
% |
| 1542 |
% |
| 1543 |
% |
| 1544 |
% \medskip |
| 1545 |
% |
| 1546 |
% \subsubsection{Sidebars: LU view} |
| 1547 |
% |
| 1548 |
% |
| 1549 |
% \subsubsection*{Left-Back vert sidebar (LU view)} |
| 1550 |
% |
| 1551 |
% \begin{macrocode} |
| 1552 |
\newcommand{\TWOside@barLbackLU}[2]{% |
| 1553 |
%% #1 = cubie possn no, #2 = colour |
| 1554 |
%% tdx --> tdx - 2/3 |
| 1555 |
%% tdy --> tdy + 2/3 |
| 1556 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1557 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1558 |
\pgfmathsetmacro{\tdx}{0 - \tbs -\tbw -0.666}% |
| 1559 |
\pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh +0.666}% |
| 1560 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1561 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; |
| 1562 |
}} |
| 1563 |
% \end{macrocode} |
| 1564 |
% Now make the LB (LeftBack) vertical sidebar command; |
| 1565 |
% bar~1 is at the bottom |
| 1566 |
% \begin{macrocode} |
| 1567 |
\newcommand{\DrawTwoCubeSidebarLBLU}{% |
| 1568 |
\TWOside@barLbackLU{2}{\Brt}% |
| 1569 |
\TWOside@barLbackLU{1}{\Brb}% |
| 1570 |
} |
| 1571 |
% \end{macrocode} |
| 1572 |
% Now do the reverse (BL) = LB |
| 1573 |
% \begin{macrocode} |
| 1574 |
\newcommand{\DrawTwoCubeSidebarBLLU}{\DrawTwoCubeSidebarLBLU} |
| 1575 |
% \end{macrocode} |
| 1576 |
% Now make the join commands |
| 1577 |
% \begin{macrocode} |
| 1578 |
\newcommand{\DrawTwoCubeSidebarLB}[1]{\@join{\DrawTwoCubeSidebarLB}{#1}} |
| 1579 |
\newcommand{\DrawTwoCubeSidebarBL}[1]{\@join{\DrawTwoCubeSidebarBL}{#1}} |
| 1580 |
% \end{macrocode} |
| 1581 |
% |
| 1582 |
% |
| 1583 |
% \medskip |
| 1584 |
% |
| 1585 |
% \subsubsection*{Up-Back horizontal sidebar (LU view)} |
| 1586 |
% |
| 1587 |
% \begin{macrocode} |
| 1588 |
\newcommand{\TWOside@barTbackLU}[2]{% |
| 1589 |
%% #1 = cubie possn no; #2 = colour |
| 1590 |
%% tdx --> tdx-2/3 |
| 1591 |
%% tdy --> tdy+2/3 |
| 1592 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1593 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1594 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh -0.666}% |
| 1595 |
\pgfmathsetmacro{\tdy}{2 +\tbs +0.666}% |
| 1596 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1597 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1598 |
}} |
| 1599 |
% \end{macrocode} |
| 1600 |
% Now make the UB (Up-Back) version |
| 1601 |
% bar~1 is at the left, 2 on the right. |
| 1602 |
% |
| 1603 |
% \begin{macrocode} |
| 1604 |
\newcommand{\DrawTwoCubeSidebarUBLU}{% |
| 1605 |
\TWOside@barTbackLU{1}{\Brt}% |
| 1606 |
\TWOside@barTbackLU{2}{\Blt}% |
| 1607 |
} |
| 1608 |
% \end{macrocode} |
| 1609 |
% Now do the reverse (BU) = UB |
| 1610 |
% \begin{macrocode} |
| 1611 |
\newcommand{\DrawTwoCubeSidebarBULU}{\DrawTwoCubeSidebarUBLU} |
| 1612 |
% \end{macrocode} |
| 1613 |
% We do NOT need to make the join commands here |
| 1614 |
% as the USER commands for BU and UB are the same as for the RU |
| 1615 |
% |
| 1616 |
% |
| 1617 |
% |
| 1618 |
% \medskip |
| 1619 |
% |
| 1620 |
% \subsubsection*{Front-Right vertical sidebar (LU view)} |
| 1621 |
% |
| 1622 |
% |
| 1623 |
% \begin{macrocode} |
| 1624 |
\newcommand{\DrawTwoCubeSidebarFRLU}{% |
| 1625 |
\TWOside@barR{2}{\Rlt}% |
| 1626 |
\TWOside@barR{1}{\Rlb}% |
| 1627 |
} |
| 1628 |
% \end{macrocode} |
| 1629 |
% Now do the reverse (RF) |
| 1630 |
% \begin{macrocode} |
| 1631 |
\newcommand{\DrawTwoCubeSidebarRFLU}{\DrawTwoCubeSidebarFRLU} |
| 1632 |
% \end{macrocode} |
| 1633 |
% Now do the two join commands |
| 1634 |
% \begin{macrocode} |
| 1635 |
\newcommand{\DrawTwoCubeSidebarFR}[1]{\@join{\DrawTwoCubeSidebarFR}{#1}} |
| 1636 |
\newcommand{\DrawTwoCubeSidebarRF}[1]{\@join{\DrawTwoCubeSidebarRF}{#1}} |
| 1637 |
% \end{macrocode} |
| 1638 |
% |
| 1639 |
% |
| 1640 |
% \subsubsection{Sidebars: RD view} |
| 1641 |
% |
| 1642 |
% \medskip |
| 1643 |
% |
| 1644 |
% \subsubsection*{Front-Up horizontal sidebar (RD view)} |
| 1645 |
% |
| 1646 |
% |
| 1647 |
% \begin{macrocode} |
| 1648 |
\newcommand{\DrawTwoCubeSidebarFURD}{% |
| 1649 |
\TWOside@barT{1}{\Ulb}% |
| 1650 |
\TWOside@barT{2}{\Urb}% |
| 1651 |
} |
| 1652 |
% \end{macrocode} |
| 1653 |
% Now do the reverse (UF) = FU |
| 1654 |
% \begin{macrocode} |
| 1655 |
\newcommand{\DrawTwoCubeSidebarUFRD}{\DrawTwoCubeSidebarFURD} |
| 1656 |
% \end{macrocode} |
| 1657 |
% Now do the two join commands |
| 1658 |
% \begin{macrocode} |
| 1659 |
\newcommand{\DrawTwoCubeSidebarFU}[1]{\@join{\DrawTwoCubeSidebarFU}{#1}} |
| 1660 |
\newcommand{\DrawTwoCubeSidebarUF}[1]{\@join{\DrawTwoCubeSidebarUF}{#1}} |
| 1661 |
% \end{macrocode} |
| 1662 |
% |
| 1663 |
% |
| 1664 |
% \medskip |
| 1665 |
% |
| 1666 |
% \subsubsection*{Front-Left vertical sidebar (RD view)} |
| 1667 |
% |
| 1668 |
% |
| 1669 |
% Only need to copy an earlier command here since FL, RD view = same as for RU view. |
| 1670 |
% \begin{macrocode} |
| 1671 |
\newcommand{\DrawTwoCubeSidebarFLRD}{\DrawTwoCubeSidebarFLRU} |
| 1672 |
\newcommand{\DrawTwoCubeSidebarLFRD}{\DrawTwoCubeSidebarLFRU} |
| 1673 |
% \end{macrocode} |
| 1674 |
% |
| 1675 |
% |
| 1676 |
% |
| 1677 |
% |
| 1678 |
% \medskip |
| 1679 |
% |
| 1680 |
% \subsubsection*{Right-Back vertical sidebar (RD view)} |
| 1681 |
% |
| 1682 |
% |
| 1683 |
% \begin{macrocode} |
| 1684 |
\newcommand{\TWOside@barRbackRD}[2]{% |
| 1685 |
%% #1 = cubie possn no, #2 = colour |
| 1686 |
%% tdx --> tdx + (2/3) |
| 1687 |
%% tdy --> tdy - (2/3) |
| 1688 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1689 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1690 |
\pgfmathsetmacro{\tdx}{2 + \tbs +0.666}% |
| 1691 |
\pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh -0.666}% |
| 1692 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1693 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; |
| 1694 |
}} |
| 1695 |
% \end{macrocode} |
| 1696 |
% Now make the RB (RightBack) version |
| 1697 |
% bar~1 is at the bottom |
| 1698 |
% \begin{macrocode} |
| 1699 |
\newcommand{\DrawTwoCubeSidebarRBRD}{% |
| 1700 |
\TWOside@barRbackRD{2}{\Blt}% |
| 1701 |
\TWOside@barRbackRD{1}{\Blb}% |
| 1702 |
} |
| 1703 |
% \end{macrocode} |
| 1704 |
% now do the reverse (BR) = RB |
| 1705 |
% \begin{macrocode} |
| 1706 |
\newcommand{\DrawTwoCubeSidebarBRRD}{\DrawTwoCubeSidebarRBRD} |
| 1707 |
% \end{macrocode} |
| 1708 |
% Do NOT need to make the join commands (as same as for the RU view) |
| 1709 |
% |
| 1710 |
% |
| 1711 |
% |
| 1712 |
% |
| 1713 |
% \medskip |
| 1714 |
% |
| 1715 |
% \subsubsection*{Down-Back horizotal sidebar (RD view)} |
| 1716 |
% |
| 1717 |
% |
| 1718 |
% \begin{macrocode} |
| 1719 |
\newcommand{\TWOside@barBbackRD}[2]{% |
| 1720 |
%% #1 = cubie possn no; #2 = colour |
| 1721 |
%% tdx --> tdx+2/3 |
| 1722 |
%% tdy --> tdy-2/3 |
| 1723 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1724 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1725 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh +0.666}% |
| 1726 |
\pgfmathsetmacro{\tdy}{0 -\tbs - \tbw -0.666}% |
| 1727 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1728 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1729 |
}} |
| 1730 |
% \end{macrocode} |
| 1731 |
% Now make the DB (Down-Back) version |
| 1732 |
% bar~1 is at the left, 2 on the right (as we look at the cube) |
| 1733 |
% |
| 1734 |
% \begin{macrocode} |
| 1735 |
\newcommand{\DrawTwoCubeSidebarDBRD}{% |
| 1736 |
\TWOside@barBbackRD{1}{\Brb}% |
| 1737 |
\TWOside@barBbackRD{2}{\Blb}% |
| 1738 |
} |
| 1739 |
% \end{macrocode} |
| 1740 |
% Now do the reverse (BD) = DB |
| 1741 |
% \begin{macrocode} |
| 1742 |
\newcommand{\DrawTwoCubeSidebarBDRD}{\DrawTwoCubeSidebarDBRD} |
| 1743 |
% \end{macrocode} |
| 1744 |
%% Now make the join commands |
| 1745 |
% \begin{macrocode} |
| 1746 |
\newcommand{\DrawTwoCubeSidebarDB}[1]{\@join{\DrawTwoCubeSidebarDB}{#1}} |
| 1747 |
\newcommand{\DrawTwoCubeSidebarBD}[1]{\@join{\DrawTwoCubeSidebarBD}{#1}} |
| 1748 |
% \end{macrocode} |
| 1749 |
% |
| 1750 |
% |
| 1751 |
% \subsubsection{Sidebars: LD view} |
| 1752 |
% |
| 1753 |
% |
| 1754 |
% \medskip |
| 1755 |
% |
| 1756 |
% \subsubsection*{Front-Up horizotal sidebar (LD view)} |
| 1757 |
% |
| 1758 |
% But FU (LD view) is the same as for (RU view), (see above) |
| 1759 |
% \begin{macrocode} |
| 1760 |
\newcommand{\DrawTwoCubeSidebarFULD}{\DrawTwoCubeSidebarFURD} |
| 1761 |
\newcommand{\DrawTwoCubeSidebarUFLD}{\DrawTwoCubeSidebarUFRD} |
| 1762 |
% \end{macrocode} |
| 1763 |
% |
| 1764 |
% \medskip |
| 1765 |
% |
| 1766 |
% \subsubsection*{Front-Right vertical sidebar (LD view)} |
| 1767 |
% |
| 1768 |
% But FR (LDview) is the same as for (LU view), (see above) |
| 1769 |
% \begin{macrocode} |
| 1770 |
\newcommand{\DrawTwoCubeSidebarFRLD}{\DrawTwoCubeSidebarFRLU} |
| 1771 |
\newcommand{\DrawTwoCubeSidebarRFLD}{\DrawTwoCubeSidebarRFLU} |
| 1772 |
% \end{macrocode} |
| 1773 |
% |
| 1774 |
% |
| 1775 |
% |
| 1776 |
% \medskip |
| 1777 |
% |
| 1778 |
% \subsubsection*{Left-Back vertical sidebar (LD view)} |
| 1779 |
% |
| 1780 |
% \begin{macrocode} |
| 1781 |
\newcommand{\TWOside@barLbackLD}[2]{% |
| 1782 |
%% #1 = cubie possn no, #2 = colour |
| 1783 |
%% tdx --> tdx-2/3 |
| 1784 |
%% tdy --> tdy-2/3 |
| 1785 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1786 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1787 |
\pgfmathsetmacro{\tdx}{0 - \tbs -\tbw -0.666}% |
| 1788 |
\pgfmathsetmacro{\tdy}{#1 -1+0.5-\tblh -0.666}% |
| 1789 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbl) |
| 1790 |
-- (\tdx+\tbw,\tdy+\tbl) -- (\tdx+\tbw,\tdy) -- cycle; |
| 1791 |
}} |
| 1792 |
% \end{macrocode} |
| 1793 |
% Now make the LB (LeftBack) version |
| 1794 |
% bar~1 is at the bottom |
| 1795 |
% \begin{macrocode} |
| 1796 |
\newcommand{\DrawTwoCubeSidebarLBLD}{% |
| 1797 |
\TWOside@barLbackLD{2}{\Brt}% |
| 1798 |
\TWOside@barLbackLD{1}{\Brb}% |
| 1799 |
} |
| 1800 |
% \end{macrocode} |
| 1801 |
% Now do the reverse (BL) = LB |
| 1802 |
% \begin{macrocode} |
| 1803 |
\newcommand{\DrawTwoCubeSidebarBLLD}{\DrawTwoCubeSidebarLBLD} |
| 1804 |
% \end{macrocode} |
| 1805 |
% Do NOT need to make the join commands (same as for the LU view) |
| 1806 |
% |
| 1807 |
% |
| 1808 |
% |
| 1809 |
% \medskip |
| 1810 |
% |
| 1811 |
% \subsubsection*{Down-Back horizontal sidebar (LD view)} |
| 1812 |
% |
| 1813 |
% |
| 1814 |
% |
| 1815 |
% \begin{macrocode} |
| 1816 |
\newcommand{\TWOside@barBbackLD}[2]{% |
| 1817 |
%% #1 = cubie possn no; #2 = colour |
| 1818 |
%% tdx --> tdx-2/3 |
| 1819 |
%% tdy --> tdy-2/3 |
| 1820 |
\ifthenelse{\equal{#2}{\no@sidebar}}{}{% |
| 1821 |
\pgfmathsetmacro{\tblh}{\tbl*(0.5)}% |
| 1822 |
\pgfmathsetmacro{\tdx}{#1 -1+0.5-\tblh -0.666}% |
| 1823 |
\pgfmathsetmacro{\tdy}{0 -\tbs - \tbw -0.666}% |
| 1824 |
\draw[fill=#2] (\tdx,\tdy) -- (\tdx,\tdy + \tbw) |
| 1825 |
-- (\tdx+\tbl,\tdy+\tbw) -- (\tdx+\tbl,\tdy) -- cycle; |
| 1826 |
}} |
| 1827 |
% \end{macrocode} |
| 1828 |
% Now make the DB (Down-Back) version |
| 1829 |
% bar~1 is at the left, 2 on the right (as we look at the cube) |
| 1830 |
% \begin{macrocode} |
| 1831 |
\newcommand{\DrawTwoCubeSidebarDBLD}{% |
| 1832 |
\TWOside@barBbackLD{1}{\Brb}% |
| 1833 |
\TWOside@barBbackLD{2}{\Blb}% |
| 1834 |
} |
| 1835 |
% \end{macrocode} |
| 1836 |
% Now do the reverse (BD) = DB |
| 1837 |
% \begin{macrocode} |
| 1838 |
\newcommand{\DrawTwoCubeSidebarBDLD}{\DrawTwoCubeSidebarDBLD} |
| 1839 |
% \end{macrocode} |
| 1840 |
% Do NOT need to make any join commands (same as for the RD view) |
| 1841 |
% |
| 1842 |
% |
| 1843 |
% |
| 1844 |
% |
| 1845 |
% \subsection{\hspace{3mm}Hieroglyphs} |
| 1846 |
% \label{sec:codehieroglyphs} |
| 1847 |
% |
| 1848 |
% Not many changes to make (from rubikcube sty). In general we try to |
| 1849 |
% keep things fairly intuitive by changing Rubik $\rightarrow$ Two, |
| 1850 |
% and changing r $\rightarrow$ t. |
| 1851 |
% Note that since this package uses a lot of commands defined in the |
| 1852 |
% \texttt{rubikcube} package, eg the `join' utility and the rubikfont, |
| 1853 |
% consequently rubikcube sty needs to be loaded when running this package. |
| 1854 |
% |
| 1855 |
% We only need to make significant changes to the |
| 1856 |
% following hieroglyphs: L,R,U,D,Lp,Rp,Up,Dp. |
| 1857 |
% |
| 1858 |
% Unchanged are: axis rotations (eg Rc) and letter rotations (eg B), |
| 1859 |
% so these hieroglyphs just need newdefs making for them; |
| 1860 |
% eg trF $\leftarrow$ rrF, etc |
| 1861 |
% |
| 1862 |
% We need to rename some of the `square' furniture associated with the L,R,U,D etc face |
| 1863 |
% rotation hieroglyphs: for example, the D heiroglyph requires the following: |
| 1864 |
%{\newline} change rr $\rightarrow$ tr |
| 1865 |
%{\newline} change SquareD $\rightarrow$ SquaretD |
| 1866 |
%{\newline} change RubikD $\rightarrow$ TwoD |
| 1867 |
%{\newline} change textRubikD $\rightarrow$ textTwoD |
| 1868 |
% |
| 1869 |
% For a TWOcube we only need to make two lines in a square; |
| 1870 |
% ie we want to shift the top line down/sideways |
| 1871 |
% and shift the bottom line up/sideways by |
| 1872 |
% an amount which makes the final position = 1/3 of the square. |
| 1873 |
% Since the top and bottom lines (and also the left and right lines) |
| 1874 |
% are at 0.25 unit, |
| 1875 |
% then the extra distance = 0.25/3 = 0.0833; |
| 1876 |
% so for horiz lines we add/subtract @ty, and |
| 1877 |
% for vertical lines we add/subtract @tx. |
| 1878 |
% |
| 1879 |
% \begin{macro}{\@tx} |
| 1880 |
% \begin{macro}{\@ty} |
| 1881 |
%\begin{macrocode} |
| 1882 |
\pgfmathsetmacro{\@tx}{0.0833} |
| 1883 |
\pgfmathsetmacro{\@ty}{0.0833} |
| 1884 |
% \end{macrocode} |
| 1885 |
% \end{macro} |
| 1886 |
% \end{macro} |
| 1887 |
% |
| 1888 |
% We continue to use the rubikfont. |
| 1889 |
% |
| 1890 |
% \begin{macro}{\@tr} |
| 1891 |
% \begin{macro}{\@trp} |
| 1892 |
% \begin{macrocode} |
| 1893 |
\newcommand{\@tr}[1]{{\@rubikfont #1}} |
| 1894 |
\newcommand{\@trp}[1]{{\@rubikfont #1\@rubikprime}} |
| 1895 |
% \end{macrocode} |
| 1896 |
% \end{macro} |
| 1897 |
% \end{macro} |
| 1898 |
% |
| 1899 |
% We need to rename the basic `join' commands: ie change Rubik $\rightarrow$ Two, and |
| 1900 |
% change r $\rightarrow$ t, as follows: |
| 1901 |
% |
| 1902 |
% \begin{macro}{\tr} |
| 1903 |
% \begin{macro}{\trh} |
| 1904 |
% \begin{macro}{\Two} |
| 1905 |
% \begin{macro}{\textTwo} |
| 1906 |
% \begin{macrocode} |
| 1907 |
\newcommand*{\tr}[1]{\@join{\tr}{#1}} |
| 1908 |
\newcommand*{\trh}[1]{\@join{\trh}{#1}} |
| 1909 |
\newcommand*{\Two}[1]{\@join{\Two}{#1}} |
| 1910 |
\newcommand*{\textTwo}[1]{\@join{\textTwo}{#1}} |
| 1911 |
% \end{macrocode} |
| 1912 |
% \end{macro} |
| 1913 |
% \end{macro} |
| 1914 |
% \end{macro} |
| 1915 |
% \end{macro} |
| 1916 |
% |
| 1917 |
% |
| 1918 |
% |
| 1919 |
% \subsubsection{\hspace{3mm}Rotation B} |
| 1920 |
% \label{sec:coderotationB} |
| 1921 |
% |
| 1922 |
% \begin{macro}{\trB} |
| 1923 |
% \begin{macro}{\trhB} |
| 1924 |
% \begin{macro}{\TwoB} |
| 1925 |
% \begin{macro}{\textTwoB} |
| 1926 |
% \begin{macrocode} |
| 1927 |
\newcommand{\trB}{\rrB} |
| 1928 |
\newcommand{\trBp}{\rrBp} |
| 1929 |
\newcommand{\trhB}{\rrhB} |
| 1930 |
\newcommand{\trhBp}{\rrhBp} |
| 1931 |
\newcommand{\TwoB}{\RubikB} |
| 1932 |
\newcommand{\TwoBp}{\RubikBp} |
| 1933 |
\newcommand{\textTwoB}{\textRubikB} |
| 1934 |
\newcommand{\textTwoBp}{\textRubikBp} |
| 1935 |
% \end{macrocode} |
| 1936 |
% \end{macro} |
| 1937 |
% \end{macro} |
| 1938 |
% \end{macro} |
| 1939 |
% \end{macro} |
| 1940 |
% |
| 1941 |
% |
| 1942 |
% |
| 1943 |
% \subsubsection{\hspace{3mm}Rotation D} |
| 1944 |
% \label{sec:coderotationD} |
| 1945 |
% |
| 1946 |
% We need to rename some of the items as follows: |
| 1947 |
%{\newline} change rr $\rightarrow$ tr |
| 1948 |
%{\newline} change SquareD $\rightarrow$ SquaretD |
| 1949 |
%{\newline} change RubikD $\rightarrow$ TwoD |
| 1950 |
%{\newline} change textRubikD $\rightarrow$ textTwoD |
| 1951 |
% |
| 1952 |
% \begin{macro}{\trD} |
| 1953 |
% \begin{macro}{\SquaretD} |
| 1954 |
% \begin{macro}{\trhD} |
| 1955 |
% \begin{macro}{\TwoD} |
| 1956 |
% \begin{macro}{\textTwoD} |
| 1957 |
% These commands all draw forms which denote the D rotation. |
| 1958 |
% |
| 1959 |
% Feb 2017 (RWDN): \ added the \cmd{\@tlen} length to the \cmd{\trhD} command to improve the |
| 1960 |
% spacing between two `arrow' square hieroglyphs; and also removed the terminal \cmd{\,} |
| 1961 |
% space. The same changes were made to all the `arrow' hieroglyphs. |
| 1962 |
% \begin{macrocode} |
| 1963 |
%% |
| 1964 |
\newcommand{\trD}{\@tr{D}} |
| 1965 |
%% |
| 1966 |
\newcommand{\SquaretD}{% |
| 1967 |
\begin{tikzpicture}[scale=0.5] |
| 1968 |
\DrawNotationBox; |
| 1969 |
\draw [thick] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); |
| 1970 |
\draw [thick, ->] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); |
| 1971 |
\end{tikzpicture}% |
| 1972 |
} |
| 1973 |
\newcommand{\trhD}{\raisebox{-0.333\height}{\@tlen\SquaretD\@tlen}} |
| 1974 |
%% |
| 1975 |
\newcommand{\TwoD}{% |
| 1976 |
{\@rubikfont% |
| 1977 |
\begin{minipage}{0.6cm} |
| 1978 |
\centering% |
| 1979 |
\SquaretD\\ |
| 1980 |
\trD% |
| 1981 |
\end{minipage}% |
| 1982 |
}} |
| 1983 |
\newcommand{\textTwoD}{\trD\,\trhD} |
| 1984 |
% \end{macrocode} |
| 1985 |
% \end{macro} |
| 1986 |
% \end{macro} |
| 1987 |
% \end{macro} |
| 1988 |
% \end{macro} |
| 1989 |
% \end{macro} |
| 1990 |
% |
| 1991 |
% |
| 1992 |
% \subsubsection{\hspace{3mm}Rotation Dp} |
| 1993 |
% |
| 1994 |
% \begin{macro}{\trDp} |
| 1995 |
% \begin{macro}{\SquaretDp} |
| 1996 |
% \begin{macro}{\trhDp} |
| 1997 |
% \begin{macro}{\TwoDp} |
| 1998 |
% \begin{macro}{\textTwoDp} |
| 1999 |
% These commands all draw forms which denote the Dp rotation. |
| 2000 |
% \begin{macrocode} |
| 2001 |
\newcommand{\trDp}{\@trp{D}} |
| 2002 |
%% |
| 2003 |
\newcommand{\SquaretDp}{% |
| 2004 |
\begin{tikzpicture}[scale=0.5] |
| 2005 |
\DrawNotationBox; |
| 2006 |
\draw [thick] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); |
| 2007 |
\draw [thick, <-] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); |
| 2008 |
\end{tikzpicture}% |
| 2009 |
} |
| 2010 |
\newcommand{\trhDp}{\raisebox{-0.333\height}{\@tlen\SquaretDp\@tlen}} |
| 2011 |
%% |
| 2012 |
\newcommand{\TwoDp}{% |
| 2013 |
{\@rubikfont% |
| 2014 |
\begin{minipage}{0.6cm} |
| 2015 |
\centering% |
| 2016 |
\SquaretDp\\ |
| 2017 |
\trDp% |
| 2018 |
\end{minipage}% |
| 2019 |
}} |
| 2020 |
\newcommand{\textTwoDp}{\trDp\,\trhDp} |
| 2021 |
% \end{macrocode} |
| 2022 |
% \end{macro} |
| 2023 |
% \end{macro} |
| 2024 |
% \end{macro} |
| 2025 |
% \end{macro} |
| 2026 |
% \end{macro} |
| 2027 |
% |
| 2028 |
% \subsubsection{\hspace{3mm}Rotation F} |
| 2029 |
% |
| 2030 |
% \begin{macro}{\trF} |
| 2031 |
% \begin{macro}{\trhF} |
| 2032 |
% \begin{macro}{\TwoF} |
| 2033 |
% \begin{macro}{\textTwoF} |
| 2034 |
% \begin{macrocode} |
| 2035 |
\newcommand{\trF}{\rrF} |
| 2036 |
\newcommand{\trFp}{\rrFp} |
| 2037 |
\newcommand{\trhF}{\rrhF} |
| 2038 |
\newcommand{\trhFp}{\rrhFp} |
| 2039 |
\newcommand{\TwoF}{\RubikF} |
| 2040 |
\newcommand{\TwoFp}{\RubikFp} |
| 2041 |
\newcommand{\textTwoF}{\textRubikF} |
| 2042 |
\newcommand{\textTwoFp}{\textRubikFp} |
| 2043 |
% \end{macrocode} |
| 2044 |
% \end{macro} |
| 2045 |
% \end{macro} |
| 2046 |
% \end{macro} |
| 2047 |
% \end{macro} |
| 2048 |
% |
| 2049 |
% |
| 2050 |
% \subsubsection{\hspace{3mm}Rotation L} |
| 2051 |
% |
| 2052 |
% \begin{macro}{\trL} |
| 2053 |
% \begin{macro}{\SquaretL} |
| 2054 |
% \begin{macro}{\trhL} |
| 2055 |
% \begin{macro}{\TwoL} |
| 2056 |
% \begin{macro}{\textTwoL} |
| 2057 |
% These commands all draw forms which denote the L rotation. |
| 2058 |
% \begin{macrocode} |
| 2059 |
\newcommand{\trL}{\@tr{L}} |
| 2060 |
%% |
| 2061 |
\newcommand{\SquaretL}{% |
| 2062 |
\begin{tikzpicture}[scale=0.5] |
| 2063 |
\DrawNotationBox; |
| 2064 |
\draw [thick, <-] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); |
| 2065 |
\draw [thick] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); |
| 2066 |
\end{tikzpicture}% |
| 2067 |
} |
| 2068 |
\newcommand{\trhL}{\raisebox{-0.333\height}{\@tlen\SquaretL\@tlen}} |
| 2069 |
%% |
| 2070 |
\newcommand{\TwoL}{% |
| 2071 |
{\@rubikfont% |
| 2072 |
\begin{minipage}{0.6cm} |
| 2073 |
\centering% |
| 2074 |
\SquaretL\\ |
| 2075 |
\trL% |
| 2076 |
\end{minipage}% |
| 2077 |
}} |
| 2078 |
\newcommand{\textTwoL}{\trL\,\trhL} |
| 2079 |
% \end{macrocode} |
| 2080 |
% \end{macro} |
| 2081 |
% \end{macro} |
| 2082 |
% \end{macro} |
| 2083 |
% \end{macro} |
| 2084 |
% \end{macro} |
| 2085 |
% |
| 2086 |
% |
| 2087 |
% \subsubsection{\hspace{3mm}Rotation Lp} |
| 2088 |
% |
| 2089 |
% \begin{macro}{\trLp} |
| 2090 |
% \begin{macro}{\SquaretLp} |
| 2091 |
% \begin{macro}{\trhLp} |
| 2092 |
% \begin{macro}{\TwoLp} |
| 2093 |
% \begin{macro}{\textTwoLp} |
| 2094 |
% These commands all draw forms which denote the Lp rotation. |
| 2095 |
% \begin{macrocode} |
| 2096 |
\newcommand{\trLp}{\@trp{L}} |
| 2097 |
%% |
| 2098 |
\newcommand{\SquaretLp}{% |
| 2099 |
\begin{tikzpicture}[scale=0.5] |
| 2100 |
\DrawNotationBox; |
| 2101 |
\draw [thick,->] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); |
| 2102 |
\draw [thick] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); |
| 2103 |
\end{tikzpicture}% |
| 2104 |
} |
| 2105 |
\newcommand{\trhLp}{\raisebox{-0.333\height}{\@tlen\SquaretLp\@tlen}} |
| 2106 |
%% |
| 2107 |
\newcommand{\TwoLp}{% |
| 2108 |
{\@rubikfont% |
| 2109 |
\begin{minipage}{0.6cm} |
| 2110 |
\centering% |
| 2111 |
\SquaretLp\\ |
| 2112 |
\trLp% |
| 2113 |
\end{minipage}% |
| 2114 |
}} |
| 2115 |
\newcommand{\textTwoLp}{\trLp\,\trhLp} |
| 2116 |
% \end{macrocode} |
| 2117 |
% \end{macro} |
| 2118 |
% \end{macro} |
| 2119 |
% \end{macro} |
| 2120 |
% \end{macro} |
| 2121 |
% \end{macro} |
| 2122 |
% |
| 2123 |
% |
| 2124 |
% |
| 2125 |
% \subsubsection{\hspace{3mm}Rotation R} |
| 2126 |
% |
| 2127 |
% \begin{macro}{\trR} |
| 2128 |
% \begin{macro}{\SquaretR} |
| 2129 |
% \begin{macro}{\trhR} |
| 2130 |
% \begin{macro}{\TwoR} |
| 2131 |
% \begin{macro}{\textTwoR} |
| 2132 |
% These commands all draw forms which denote the R rotation. |
| 2133 |
% \begin{macrocode} |
| 2134 |
\newcommand{\trR}{\@tr{R}} |
| 2135 |
%% |
| 2136 |
\newcommand{\SquaretR}{% |
| 2137 |
\begin{tikzpicture}[scale=0.5] |
| 2138 |
\DrawNotationBox; |
| 2139 |
%% draw three lines in the square, one with an arrow |
| 2140 |
\draw [thick] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); |
| 2141 |
\draw [thick, ->] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); |
| 2142 |
\end{tikzpicture}% |
| 2143 |
} |
| 2144 |
\newcommand{\trhR}{\raisebox{-0.333\height}{\@tlen\SquaretR\@tlen}} |
| 2145 |
%% |
| 2146 |
\newcommand{\TwoR}{% |
| 2147 |
{\@rubikfont% |
| 2148 |
\begin{minipage}{0.6cm} |
| 2149 |
\centering% |
| 2150 |
\SquaretR\\ |
| 2151 |
\trR% |
| 2152 |
\end{minipage}% |
| 2153 |
}} |
| 2154 |
\newcommand{\textTwoR}{\trR\,\trhR} |
| 2155 |
% \end{macrocode} |
| 2156 |
% \end{macro} |
| 2157 |
% \end{macro} |
| 2158 |
% \end{macro} |
| 2159 |
% \end{macro} |
| 2160 |
% \end{macro} |
| 2161 |
% |
| 2162 |
% |
| 2163 |
% \subsubsection{\hspace{3mm}Rotation Rp} |
| 2164 |
% |
| 2165 |
% \begin{macro}{\trRp} |
| 2166 |
% \begin{macro}{\SquaretRp} |
| 2167 |
% \begin{macro}{\trhRp} |
| 2168 |
% \begin{macro}{\TwoRp} |
| 2169 |
% \begin{macro}{\textTwoRp} |
| 2170 |
% These commands all draw forms which denote the Rp rotation. |
| 2171 |
% \begin{macrocode} |
| 2172 |
\newcommand{\trRp}{\@trp{R}} |
| 2173 |
%% |
| 2174 |
\newcommand{\SquaretRp}{% |
| 2175 |
\begin{tikzpicture}[scale=0.5] |
| 2176 |
\DrawNotationBox; |
| 2177 |
\draw [thick] (\@sd + \@tx, \@sb) -- (\@sd + \@tx, \@sbh); |
| 2178 |
\draw [thick, <-] (\@sddd - \@tx, \@sb) -- (\@sddd - \@tx, \@sbh); |
| 2179 |
\end{tikzpicture}% |
| 2180 |
} |
| 2181 |
\newcommand{\trhRp}{\raisebox{-0.333\height}{\@tlen\SquaretRp\@tlen}} |
| 2182 |
%% |
| 2183 |
\newcommand{\TwoRp}{% |
| 2184 |
{\@rubikfont% |
| 2185 |
\begin{minipage}{0.6cm} |
| 2186 |
\centering% |
| 2187 |
\SquaretRp\\ |
| 2188 |
\trRp% |
| 2189 |
\end{minipage}% |
| 2190 |
}} |
| 2191 |
\newcommand{\textTwoRp}{\trRp\,\trhRp} |
| 2192 |
% \end{macrocode} |
| 2193 |
% \end{macro} |
| 2194 |
% \end{macro} |
| 2195 |
% \end{macro} |
| 2196 |
% \end{macro} |
| 2197 |
% \end{macro} |
| 2198 |
% |
| 2199 |
% |
| 2200 |
% \subsubsection{\hspace{3mm}Rotation U} |
| 2201 |
% |
| 2202 |
% \begin{macro}{\trU} |
| 2203 |
% \begin{macro}{\SquaretU} |
| 2204 |
% \begin{macro}{\trhU} |
| 2205 |
% \begin{macro}{\TwoU} |
| 2206 |
% \begin{macro}{\textTwoU} |
| 2207 |
% These commands all draw forms which denote the U rotation. |
| 2208 |
% \begin{macrocode} |
| 2209 |
\newcommand{\trU}{\@tr{U}} |
| 2210 |
%% |
| 2211 |
\newcommand{\SquaretU}{% |
| 2212 |
\begin{tikzpicture}[scale=0.5] |
| 2213 |
\DrawNotationBox; |
| 2214 |
\draw [thick, <-] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); |
| 2215 |
\draw [thick] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); |
| 2216 |
\end{tikzpicture}% |
| 2217 |
} |
| 2218 |
\newcommand{\trhU}{\raisebox{-0.333\height}{\@tlen\SquaretU\@tlen}} |
| 2219 |
%% |
| 2220 |
\newcommand{\TwoU}{% |
| 2221 |
{\@rubikfont% |
| 2222 |
\begin{minipage}{0.6cm} |
| 2223 |
\centering% |
| 2224 |
\SquaretU\\ |
| 2225 |
\trU% |
| 2226 |
\end{minipage}%% |
| 2227 |
}} |
| 2228 |
\newcommand{\textTwoU}{\trU\,\trhU} |
| 2229 |
% \end{macrocode} |
| 2230 |
% \end{macro} |
| 2231 |
% \end{macro} |
| 2232 |
% \end{macro} |
| 2233 |
% \end{macro} |
| 2234 |
% \end{macro} |
| 2235 |
% |
| 2236 |
% |
| 2237 |
% |
| 2238 |
% \subsubsection{\hspace{3mm}Rotation Up} |
| 2239 |
% |
| 2240 |
% \begin{macro}{\trUp} |
| 2241 |
% \begin{macro}{\SquaretUp} |
| 2242 |
% \begin{macro}{\trhUp} |
| 2243 |
% \begin{macro}{\TwoUp} |
| 2244 |
% \begin{macro}{\textTwoUp} |
| 2245 |
% These commands all draw forms which denote the Up rotation. |
| 2246 |
% \begin{macrocode} |
| 2247 |
\newcommand{\trUp}{\@trp{U}} |
| 2248 |
%% |
| 2249 |
\newcommand{\SquaretUp}{% |
| 2250 |
\begin{tikzpicture}[scale=0.5] |
| 2251 |
\DrawNotationBox; |
| 2252 |
\draw [thick, ->] (\@sb,\@sddd - \@ty) -- (\@sbh, \@sddd - \@ty); |
| 2253 |
\draw [thick] (\@sb,\@sd + \@ty) -- (\@sbh, \@sd + \@ty); |
| 2254 |
\end{tikzpicture}% |
| 2255 |
} |
| 2256 |
\newcommand{\trhUp}{\raisebox{-0.333\height}{\@tlen\SquaretUp\@tlen}} |
| 2257 |
%% |
| 2258 |
\newcommand{\TwoUp}{% |
| 2259 |
{\@rubikfont% |
| 2260 |
\begin{minipage}{0.6cm} |
| 2261 |
\centering% |
| 2262 |
\SquaretUp\\ |
| 2263 |
\trUp% |
| 2264 |
\end{minipage}%% |
| 2265 |
}} |
| 2266 |
\newcommand{\textTwoUp}{\trUp\,\trhUp} |
| 2267 |
% \end{macrocode} |
| 2268 |
% \end{macro} |
| 2269 |
% \end{macro} |
| 2270 |
% \end{macro} |
| 2271 |
% \end{macro} |
| 2272 |
% \end{macro} |
| 2273 |
% |
| 2274 |
% |
| 2275 |
% \subsection{\hspace{3mm}Axis rotations} |
| 2276 |
% \label{sec:codeaxisversions} |
| 2277 |
% |
| 2278 |
% For completeness we include a \cmd{\textTwo} version of all the |
| 2279 |
% axis rotation codes (making them equal to their hieroglyphic \cmd{\rrh} version). |
| 2280 |
% Obviously this list must go at the end of this file. While these commands are perhaps |
| 2281 |
% strictly unnecessary, the motivation is to allow users to include them in |
| 2282 |
% a \cmd{\ShowSequence} command when using the \cmd{\textTwo} font argument. |
| 2283 |
% |
| 2284 |
% |
| 2285 |
% \begin{macrocode} |
| 2286 |
\newcommand{\trx}{\rrx} |
| 2287 |
\newcommand{\trxp}{\rrxp} |
| 2288 |
\newcommand{\try}{\rry} |
| 2289 |
\newcommand{\tryp}{\rryp} |
| 2290 |
\newcommand{\trz}{\rrz} |
| 2291 |
\newcommand{\trzp}{\rrzp} |
| 2292 |
\newcommand{\trl}{\rrl} |
| 2293 |
\newcommand{\trlp}{\rrlp} %%new |
| 2294 |
\newcommand{\trr}{\rrr} |
| 2295 |
\newcommand{\trrp}{\rrrp} %%new |
| 2296 |
\newcommand{\tru}{\rru} |
| 2297 |
\newcommand{\trup}{\rrup} %%new |
| 2298 |
\newcommand{\trd}{\rrd} |
| 2299 |
\newcommand{\trdp}{\rrdp} %%new |
| 2300 |
\newcommand{\trf}{\rrf} |
| 2301 |
\newcommand{\trfp}{\rrfp} %%new |
| 2302 |
\newcommand{\trb}{\rrb} |
| 2303 |
\newcommand{\trbp}{\rrbp} %%new |
| 2304 |
% |
| 2305 |
\newcommand{\trLc}{\rrLc} |
| 2306 |
\newcommand{\trLcp}{\rrLcp} |
| 2307 |
\newcommand{\trRc}{\rrRc} |
| 2308 |
\newcommand{\trRcp}{\rrRcp} |
| 2309 |
\newcommand{\trUc}{\rrUc} |
| 2310 |
\newcommand{\trUcp}{\rrUcp} |
| 2311 |
\newcommand{\trDc}{\rrDc} |
| 2312 |
\newcommand{\trDcp}{\rrDcp} |
| 2313 |
\newcommand{\trFc}{\rrFc} |
| 2314 |
\newcommand{\trFcp}{\rrFcp} |
| 2315 |
\newcommand{\trBc}{\rrBc} |
| 2316 |
\newcommand{\trBcp}{\rrBcp} |
| 2317 |
\newcommand{\trCL}{\rrCL} |
| 2318 |
\newcommand{\trCLp}{\rrCLp} |
| 2319 |
\newcommand{\trCR}{\rrCR} |
| 2320 |
\newcommand{\trCRp}{\rrCRp} |
| 2321 |
\newcommand{\trCU}{\rrCU} |
| 2322 |
\newcommand{\trCUp}{\rrCUp} |
| 2323 |
\newcommand{\trCD}{\rrCD} |
| 2324 |
\newcommand{\trCDp}{\rrCDp} |
| 2325 |
\newcommand{\trCF}{\rrCF} |
| 2326 |
\newcommand{\trCFp}{\rrCFp} |
| 2327 |
\newcommand{\trCB}{\rrCB} |
| 2328 |
\newcommand{\trCBp}{\rrCBp} |
| 2329 |
% \end{macrocode} |
| 2330 |
% |
| 2331 |
% |
| 2332 |
% \begin{macrocode} |
| 2333 |
\newcommand{\trhx}{\rrhx} |
| 2334 |
\newcommand{\trhxp}{\rrhxp} |
| 2335 |
\newcommand{\trhy}{\rrhy} |
| 2336 |
\newcommand{\trhyp}{\rrhyp} |
| 2337 |
\newcommand{\trhz}{\rrhz} |
| 2338 |
\newcommand{\trhzp}{\rrhzp} |
| 2339 |
\newcommand{\trhl}{\rrhl} |
| 2340 |
\newcommand{\trhlp}{\rrhlp} % new |
| 2341 |
\newcommand{\trhr}{\rrhr} |
| 2342 |
\newcommand{\trhrp}{\rrhrp} % new |
| 2343 |
\newcommand{\trhu}{\rrhu} |
| 2344 |
\newcommand{\trhup}{\rrhup} % new |
| 2345 |
\newcommand{\trhd}{\rrhd} |
| 2346 |
\newcommand{\trhdp}{\rrhdp} % new |
| 2347 |
\newcommand{\trhf}{\rrhf} |
| 2348 |
\newcommand{\trhfp}{\rrhfp} % new |
| 2349 |
\newcommand{\trhb}{\rrhb} |
| 2350 |
\newcommand{\trhbp}{\rrhbp} % new |
| 2351 |
\newcommand{\trhLc}{\rrhLc} |
| 2352 |
\newcommand{\trhLcp}{\rrhLcp} |
| 2353 |
\newcommand{\trhRc}{\rrhRc} |
| 2354 |
\newcommand{\trhRcp}{\rrhRcp} |
| 2355 |
\newcommand{\trhUc}{\rrhUc} |
| 2356 |
\newcommand{\trhUcp}{\rrhUcp} |
| 2357 |
\newcommand{\trhDc}{\rrhDc} |
| 2358 |
\newcommand{\trhDcp}{\rrhDcp} |
| 2359 |
\newcommand{\trhFc}{\rrhFc} |
| 2360 |
\newcommand{\trhFcp}{\rrhFcp} |
| 2361 |
\newcommand{\trhBc}{\rrhBc} |
| 2362 |
\newcommand{\trhBcp}{\rrhBcp} |
| 2363 |
\newcommand{\trhCL}{\rrhCL} |
| 2364 |
\newcommand{\trhCLp}{\rrhCLp} |
| 2365 |
\newcommand{\trhCR}{\rrhCR} |
| 2366 |
\newcommand{\trhCRp}{\rrhCRp} |
| 2367 |
\newcommand{\trhCU}{\rrhCU} |
| 2368 |
\newcommand{\trhCUp}{\rrhCUp} |
| 2369 |
\newcommand{\trhCD}{\rrhCD} |
| 2370 |
\newcommand{\trhCDp}{\rrhCDp} |
| 2371 |
\newcommand{\trhCF}{\rrhCF} |
| 2372 |
\newcommand{\trhCFp}{\rrhCFp} |
| 2373 |
\newcommand{\trhCB}{\rrhCB} |
| 2374 |
\newcommand{\trhCBp}{\rrhCBp} |
| 2375 |
% \end{macrocode} |
| 2376 |
% |
| 2377 |
% |
| 2378 |
% \begin{macrocode} |
| 2379 |
\newcommand{\Twox}{\Rubikx} |
| 2380 |
\newcommand{\Twoxp}{\Rubikxp} |
| 2381 |
\newcommand{\Twoy}{\Rubiky} |
| 2382 |
\newcommand{\Twoyp}{\Rubikyp} |
| 2383 |
\newcommand{\Twoz}{\Rubikz} |
| 2384 |
\newcommand{\Twozp}{\Rubikzp} |
| 2385 |
\newcommand{\Twol}{\Rubikl} |
| 2386 |
\newcommand{\Twolp}{\Rubiklp} % new |
| 2387 |
\newcommand{\Twor}{\Rubikr} |
| 2388 |
\newcommand{\Tworp}{\Rubikrp} % new |
| 2389 |
\newcommand{\Twou}{\Rubiku} |
| 2390 |
\newcommand{\Twoup}{\Rubikup} % new |
| 2391 |
\newcommand{\Twod}{\Rubikd} |
| 2392 |
\newcommand{\Twodp}{\Rubikdp} % new |
| 2393 |
\newcommand{\Twof}{\Rubikf} |
| 2394 |
\newcommand{\Twofp}{\Rubikfp} % new |
| 2395 |
\newcommand{\Twob}{\Rubikb} |
| 2396 |
\newcommand{\Twobp}{\Rubikbp} % new |
| 2397 |
\newcommand{\TwoLc}{\RubikLc} |
| 2398 |
\newcommand{\TwoLcp}{\RubikLcp} |
| 2399 |
\newcommand{\TwoRc}{\RubikRc} |
| 2400 |
\newcommand{\TwoRcp}{\RubikRcp} |
| 2401 |
\newcommand{\TwoUc}{\RubikUc} |
| 2402 |
\newcommand{\TwoUcp}{\RubikUcp} |
| 2403 |
\newcommand{\TwoDc}{\RubikDc} |
| 2404 |
\newcommand{\TwoDcp}{\RubikDcp} |
| 2405 |
\newcommand{\TwoFc}{\RubikFc} |
| 2406 |
\newcommand{\TwoFcp}{\RubikFcp} |
| 2407 |
\newcommand{\TwoBc}{\RubikBc} |
| 2408 |
\newcommand{\TwoBcp}{\RubikBcp} |
| 2409 |
\newcommand{\TwoCL}{\RubikCL} |
| 2410 |
\newcommand{\TwoCLp}{\RubikCLp} |
| 2411 |
\newcommand{\TwoCR}{\RubikCR} |
| 2412 |
\newcommand{\TwoCRp}{\RubikCRp} |
| 2413 |
\newcommand{\TwoCU}{\RubikCU} |
| 2414 |
\newcommand{\TwoCUp}{\RubikCUp} |
| 2415 |
\newcommand{\TwoCD}{\RubikCD} |
| 2416 |
\newcommand{\TwoCDp}{\RubikCDp} |
| 2417 |
\newcommand{\TwoCF}{\RubikCF} |
| 2418 |
\newcommand{\TwoCFp}{\RubikCFp} |
| 2419 |
\newcommand{\TwoCB}{\RubikCB} |
| 2420 |
\newcommand{\TwoCBp}{\RubikCBp} |
| 2421 |
% \end{macrocode} |
| 2422 |
% |
| 2423 |
% \begin{macrocode} |
| 2424 |
\newcommand{\textTwox}{\rrhx} |
| 2425 |
\newcommand{\textTwoxp}{\rrhxp} |
| 2426 |
\newcommand{\textTwoy}{\rrhy} |
| 2427 |
\newcommand{\textTwoyp}{\rrhyp} |
| 2428 |
\newcommand{\textTwoz}{\rrhz} |
| 2429 |
\newcommand{\textTwozp}{\rrhzp} |
| 2430 |
\newcommand{\textTwol}{\rrhl} |
| 2431 |
\newcommand{\textTwolp}{\rrhlp} %new |
| 2432 |
\newcommand{\textTwor}{\rrhr} |
| 2433 |
\newcommand{\textTworp}{\rrhrp} %new |
| 2434 |
\newcommand{\textTwou}{\rrhu} |
| 2435 |
\newcommand{\textTwoup}{\rrhup} %new |
| 2436 |
\newcommand{\textTwod}{\rrhd} |
| 2437 |
\newcommand{\textTwodp}{\rrhdp} %new |
| 2438 |
\newcommand{\textTwof}{\rrhf} |
| 2439 |
\newcommand{\textTwofp}{\rrhfp} %new |
| 2440 |
\newcommand{\textTwob}{\rrhb} |
| 2441 |
\newcommand{\textTwobp}{\rrhbp} %new |
| 2442 |
\newcommand{\textTwoLc}{\rrhLc} |
| 2443 |
\newcommand{\textTwoLcp}{\rrhLcp} |
| 2444 |
\newcommand{\textTwoRc}{\rrhRc} |
| 2445 |
\newcommand{\textTwoRcp}{\rrhRcp} |
| 2446 |
\newcommand{\textTwoUc}{\rrhUc} |
| 2447 |
\newcommand{\textTwoUcp}{\rrhUcp} |
| 2448 |
\newcommand{\textTwoDc}{\rrhDc} |
| 2449 |
\newcommand{\textTwoDcp}{\rrhDcp} |
| 2450 |
\newcommand{\textTwoFc}{\rrhFc} |
| 2451 |
\newcommand{\textTwoFcp}{\rrhFcp} |
| 2452 |
\newcommand{\textTwoBc}{\rrhBc} |
| 2453 |
\newcommand{\textTwoBcp}{\rrhBcp} |
| 2454 |
\newcommand{\textTwoCL}{\rrhCL} |
| 2455 |
\newcommand{\textTwoCLp}{\rrhCLp} |
| 2456 |
\newcommand{\textTwoCR}{\rrhCR} |
| 2457 |
\newcommand{\textTwoCRp}{\rrhCRp} |
| 2458 |
\newcommand{\textTwoCU}{\rrhCU} |
| 2459 |
\newcommand{\textTwoCUp}{\rrhCUp} |
| 2460 |
\newcommand{\textTwoCD}{\rrhCD} |
| 2461 |
\newcommand{\textTwoCDp}{\rrhCDp} |
| 2462 |
\newcommand{\textTwoCF}{\rrhCF} |
| 2463 |
\newcommand{\textTwoCFp}{\rrhCFp} |
| 2464 |
\newcommand{\textTwoCB}{\rrhCB} |
| 2465 |
\newcommand{\textTwoCBp}{\rrhCBp} |
| 2466 |
% \end{macrocode} |
| 2467 |
% |
| 2468 |
% -------------------------- |
| 2469 |
% End of this package |
| 2470 |
% -------------------------- |
| 2471 |
% \begin{macrocode} |
| 2472 |
%</rubiktwocube> |
| 2473 |
% \end{macrocode} |
| 2474 |
% |
| 2475 |
% |
| 2476 |
% \Finale |
| 2477 |
% |
| 2478 |
\endinput |