Moved a few macros
This commit is contained in:
@ -9,41 +9,11 @@
|
||||
|
||||
\usepackage{chessfss}
|
||||
\usepackage{chessboard}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{anyfontsize}
|
||||
\usepackage{anyfontsize} % Silences some chess warnings
|
||||
\usepackage{afterpage}
|
||||
\usepackage[hang]{footmisc}
|
||||
|
||||
|
||||
\def\stars#1#2{%
|
||||
\def\oncolor{\color{purple}}%
|
||||
\def\offcolor{\color{black!40!white}}%
|
||||
%
|
||||
\count255=1%
|
||||
\count254=#2%
|
||||
\advance\count254 by -1%
|
||||
\ifnum #1 > 0
|
||||
% The $$ are required around \bigstar.
|
||||
% the special \odot chess piece breaks
|
||||
% star sizing if they are ommited.
|
||||
\loop
|
||||
{\oncolor $\bigstar$}%
|
||||
\ifnum\count255 < #1
|
||||
\advance\count255 by 1
|
||||
\repeat%
|
||||
\else%
|
||||
{\oncolor $\bigstar$}%
|
||||
\fi%
|
||||
%
|
||||
\ifnum \count255 < #2%
|
||||
\loop
|
||||
{\offcolor $\bigstar$}%
|
||||
\ifnum\count255 < \count254
|
||||
\advance\count255 by 1
|
||||
\repeat%
|
||||
\fi%
|
||||
}
|
||||
|
||||
\def\difficulty#1#2{
|
||||
\textbf{Difficulty:} \stars{#1}{#2} \par
|
||||
\vspace{1mm}
|
||||
|
Reference in New Issue
Block a user