latex-setup
My personal LaTeX setup 🦁️⚙️
Name | Size | Mode | |
.. | |||
xexercise.sty | 783B | -rw-r--r-- |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
\NeedsTeXFormat{LaTeX2e}[1994/06/01] \ProvidesPackage{xexercise}[2020/09/10 1.0.0 Usefull definitions for exercise solutions] \RequirePackage{enumitem} \RequirePackage{kvoptions} \SetupKeyvalOptions{ family=xexercise, prefix=xexercise@ } \DeclareStringOption[Exercise]{exerciselabel} \ProcessKeyvalOptions* \newcounter{exercise} \stepcounter{exercise} % Option to reset the exercise label \newcommand{\setexerciselabel}[1] {\renewcommand{\xexercise@exerciselabel}{#1}} % Exercise \newenvironment{exercise}[1][\theexercise] {\vspace{2mm}\noindent {\bfseries \xexercise@exerciselabel\, #1. }} {\stepcounter{exercise}} % Exercise items ((a), (b), (c), ...) \newenvironment{exerciseitems} {\begin{enumerate}[label={\bfseries(\alph*)}]} {\end{enumerate}} \endinput