\documentclass[ solutions, nowarning ]{../resources/ormc_handout} \NewDocumentCommand{\p}{ m m }{ \textbf{#1 #2:} \par {\color{gray}Difficulty:} {\color{cyan!50!gray} \bigstar \bigstar \bigstar}{\color{gray} \bigstar \bigstar} \vspace{3mm} \getproblem{#1}{#2} \vspace{2mm} \ifsolution{#1}{#2}{ \begin{solution} \getsolution{#1}{#2} \end{solution} }[ \ifanswer{#1}{#2}{% \vspace{2mm}% {\color{red}\textbf{Solution:}} \getanswer{#1}{#2} } ] \vspace{20mm} \vfill } \input{problem} %\makeatletter %\newcommand{\shoppinglist}[1]{Shopping list: #1\checknextarg} %\newcommand{\checknextarg}{\@ifnextchar\bgroup{\gobblenextarg}{ and that's all!}} %\newcommand{\gobblenextarg}[1]{ and also #1\@ifnextchar\bgroup%{\gobblenextarg}{ and that's all!}} %\makeatother \newcommand{\q}[1]{ \section{#1} \csname#1:all\endcsname \pagebreak } \begin{document} \maketitle {Mark's Problem Library} { This document lists all problems in this library. \\ Use it to find problems or debug \LaTeX{}. } \q{Algebra} \q{Combinatorics} \q{NumberTheory} \q{Pidgeonhole} \end{document}