Skip to content
Snippets Groups Projects
Commit 001e2649 authored by GARION Christophe's avatar GARION Christophe
Browse files

my-env: refactor \stardif command

parent e87d2a7f
No related branches found
No related tags found
No related merge requests found
......@@ -128,10 +128,27 @@
\usepackage{forloop}
\usepackage{marginnote}
\newcounter{starcounter}
\newcommand{\stardif}[1]{%
\marginnote{($\forloop{starcounter}{0}{\value{starcounter} < #1}{{\star}})$}
\newcommand{\stardif}[2][black]{%
\marginnote{\textcolor{#1}{($\forloop{starcounter}{0}{\value{starcounter} < #2}{\star}$)}}
}%
\def\mygreensol{black!30!green}
\newcommand{\stardifsol}[1]{
\ifdef{\sol}{
\stardif[\mygreensol]{#1}
\undef{\sol}
}{
\stardif{#1}
}
}
\newcommand{\sstardif}[2][black]{%
\textcolor{#1}{$\forloop{starcounter}{0}{\value{starcounter} < #2}{\star}$}
}%
\newcommand{\sstardifsol}[1]{\sstardif[\mygreensol]{#1}}
% set marks if not already defined
\newcommand{\setmark}[2]{%
\ifundef{#1}{\def#1{#2}}{}%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment