Moved a few macros
This commit is contained in:
parent
044e7aa0a3
commit
c9d2e8672c
@ -7,54 +7,6 @@
|
||||
\usepackage{../../resources/macros}
|
||||
|
||||
\usepackage{mdframed}
|
||||
\usepackage{pgf}
|
||||
|
||||
% Ruble symbol with tweaks
|
||||
\DeclareRobustCommand*{\Rub}{%
|
||||
\begingroup
|
||||
\dimendef\H=0 %
|
||||
\settoheight\H{P}%
|
||||
\begin{pgfpicture}%
|
||||
\pgfsetlinewidth{.1\H}%
|
||||
\pgfsetrectcap
|
||||
\pgfsetmiterjoin
|
||||
\pgfmoveto{\pgfpoint{0pt}{0.07\H}}% Move to bottom of main line
|
||||
\pgflineto{\pgfpoint{0pt}{.90\H}}% P main line
|
||||
\pgflineto{\pgfpoint{.3\H}{.90\H}}% P top line
|
||||
\pgfpatharc{90}{-90}{.21\H}% P circle
|
||||
\pgflineto{\pgfpoint{-.08\H}{.48\H}}% P bottom line
|
||||
\pgfmoveto{\pgfpoint{-.08\H}{.31\H}}% Bonus line move
|
||||
\pgflineto{\pgfpoint{.34\H}{.31\H}}% Bonus line draw
|
||||
\pgfusepath{stroke}%
|
||||
\pgfmoveto{\pgfpoint{-.23\H}{0pt}}% Before space
|
||||
\pgfmoveto{\pgfpoint{0.55\H}{0pt}}% After space
|
||||
\end{pgfpicture}%
|
||||
\endgroup
|
||||
}
|
||||
|
||||
% Ruble symbol, per official Kremlin specification
|
||||
%
|
||||
%\DeclareRobustCommand*{\Rub}{%
|
||||
% \begingroup
|
||||
% \dimendef\H=0 %
|
||||
% \settoheight\H{P}%
|
||||
% \begin{pgfpicture}%
|
||||
% \pgfsetlinewidth{.1\H}%
|
||||
% \pgfsetrectcap
|
||||
% \pgfsetmiterjoin
|
||||
% \pgfmoveto{\pgfpoint{0pt}{0.05\H}}%
|
||||
% \pgflineto{\pgfpoint{0pt}{.95\H}}%
|
||||
% \pgflineto{\pgfpoint{.35\H}{.95\H}}%
|
||||
% \pgfpatharc{90}{-90}{.225\H}%
|
||||
% \pgflineto{\pgfpoint{-.05\H}{.5\H}}%
|
||||
% \pgfmoveto{\pgfpoint{-.05\H}{.34\H}}%
|
||||
% \pgflineto{\pgfpoint{.38\H}{.34\H}}%
|
||||
% \pgfusepath{stroke}%
|
||||
% \pgfmoveto{\pgfpoint{-.175\H}{0pt}}%
|
||||
% \pgfmoveto{\pgfpoint{.7\H}{0pt}}%
|
||||
% \end{pgfpicture}%
|
||||
% \endgroup
|
||||
%}
|
||||
|
||||
\newmdenv[
|
||||
topline=false,
|
||||
|
@ -15,7 +15,10 @@
|
||||
\uptitlel{Advanced 2}
|
||||
\uptitler{Fall 2023}
|
||||
\title{Random Walks and Resistance}
|
||||
\subtitle{Prepared by \githref{Mark} on \today{} \\ Based on a handout by Aaron Anderson}
|
||||
\subtitle{
|
||||
Prepared by \githref{Mark} on \today{} \\
|
||||
Based on a handout by Aaron Anderson
|
||||
}
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
@ -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}
|
||||
|
@ -2,4 +2,93 @@
|
||||
\ProvidesPackage{macros}[2023/10/16 ORMC Macros]
|
||||
|
||||
\RequirePackage{hyperref}
|
||||
\newcommand{\githref}[1]{\href{https://git.betalupi.com/Mark/ormc-handouts}{#1}}
|
||||
\RequirePackage{pgf}
|
||||
\RequirePackage{xcolor}
|
||||
|
||||
|
||||
% Link to this repo, used in titles
|
||||
\newcommand{\githref}[1]{\href{https://git.betalupi.com/Mark/ormc-handouts}{#1}}
|
||||
|
||||
|
||||
|
||||
% A row of stars, for showing difficulty
|
||||
% first arg: filled stars
|
||||
% second arg: total stars
|
||||
\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%
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
% Ruble symbol with tweaks
|
||||
\DeclareRobustCommand*{\Rub}{%
|
||||
\begingroup
|
||||
\dimendef\H=0 %
|
||||
\settoheight\H{P}%
|
||||
\begin{pgfpicture}%
|
||||
\pgfsetlinewidth{.1\H}%
|
||||
\pgfsetrectcap
|
||||
\pgfsetmiterjoin
|
||||
\pgfmoveto{\pgfpoint{0pt}{0.07\H}}% Move to bottom of main line
|
||||
\pgflineto{\pgfpoint{0pt}{.90\H}}% P main line
|
||||
\pgflineto{\pgfpoint{.3\H}{.90\H}}% P top line
|
||||
\pgfpatharc{90}{-90}{.21\H}% P circle
|
||||
\pgflineto{\pgfpoint{-.08\H}{.48\H}}% P bottom line
|
||||
\pgfmoveto{\pgfpoint{-.08\H}{.31\H}}% Bonus line move
|
||||
\pgflineto{\pgfpoint{.34\H}{.31\H}}% Bonus line draw
|
||||
\pgfusepath{stroke}%
|
||||
\pgfmoveto{\pgfpoint{-.23\H}{0pt}}% Before space
|
||||
\pgfmoveto{\pgfpoint{0.55\H}{0pt}}% After space
|
||||
\end{pgfpicture}%
|
||||
\endgroup
|
||||
}
|
||||
|
||||
% Ruble symbol, per official Kremlin specification
|
||||
%
|
||||
%\DeclareRobustCommand*{\Rub}{%
|
||||
% \begingroup
|
||||
% \dimendef\H=0 %
|
||||
% \settoheight\H{P}%
|
||||
% \begin{pgfpicture}%
|
||||
% \pgfsetlinewidth{.1\H}%
|
||||
% \pgfsetrectcap
|
||||
% \pgfsetmiterjoin
|
||||
% \pgfmoveto{\pgfpoint{0pt}{0.05\H}}%
|
||||
% \pgflineto{\pgfpoint{0pt}{.95\H}}%
|
||||
% \pgflineto{\pgfpoint{.35\H}{.95\H}}%
|
||||
% \pgfpatharc{90}{-90}{.225\H}%
|
||||
% \pgflineto{\pgfpoint{-.05\H}{.5\H}}%
|
||||
% \pgfmoveto{\pgfpoint{-.05\H}{.34\H}}%
|
||||
% \pgflineto{\pgfpoint{.38\H}{.34\H}}%
|
||||
% \pgfusepath{stroke}%
|
||||
% \pgfmoveto{\pgfpoint{-.175\H}{0pt}}%
|
||||
% \pgfmoveto{\pgfpoint{.7\H}{0pt}}%
|
||||
% \end{pgfpicture}%
|
||||
% \endgroup
|
||||
%}
|
Loading…
x
Reference in New Issue
Block a user