Moved a few macros

This commit is contained in:
2023-10-26 08:14:55 -07:00
parent 044e7aa0a3
commit c9d2e8672c
4 changed files with 95 additions and 81 deletions

View File

@ -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}