Fri, 20 Oct 2023 14:59:15 -0500
Some unit tests
5 | 1 | \NeedsTeXFormat{LaTeX2e} |
2 | \ProvidesClass{changes-simple}[2020/04/20 v0.1 simple alternative to changes that doesn't blow up with weird journal classes] | |
3 | ||
4 | \newif\ifchangessimple@final | |
5 | \changessimple@finalfalse | |
6 | \DeclareOption{final}{\changessimple@finaltrue} | |
7 | \DeclareOption{draft}{\changessimple@finalfalse} | |
8 | \ProcessOptions | |
9 | ||
10 | \RequirePackage[normalem]{ulem} | |
11 | \RequirePackage[svgnames]{xcolor} | |
12 | ||
13 | \ifchangessimple@final | |
14 | \newcommand{\added}[1]{#1} | |
15 | \newcommand{\deleted}[1]{} | |
16 | \newcommand{\replaced}[2]{#1} | |
17 | \else | |
18 | \newcommand{\added}[1]{{\color{blue}#1}} | |
19 | \newcommand{\deleted}[1]{{\color{red}\sout{#1}}} | |
20 | \newcommand{\replaced}[2]{\added{#1}\deleted{#2}} | |
21 | \fi | |
22 |