\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sed_changes}[2024/05/24 Changes for SED]

\RequirePackage{selinput}
\RequirePackage{ulem}
\RequirePackage{xifthen}
\RequirePackage{etoolbox}

% Changes from vX to vX+1:
% percent sign at the end of the line makes latex not interpret the new line as space

% Inserts some new content in blue:
\newcommand{\change}[2][2]{%
    \ifthenelse{\equal{#1}{2}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{3}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{4}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{5}}{\textcolor{blue}{#2}}{}%
}

% Crosses out some old content and highlights it in blue:
\newcommand{\deleted}[2][2]{%
    \ifthenelse{\equal{#1}{2}}{}{}%
    \ifthenelse{\equal{#1}{3}}{}{}%
    \ifthenelse{\equal{#1}{4}}{}{}%
    \ifthenelse{\equal{#1}{5}}{\textcolor{blue}{\sout{#2}}}{}%
}
\newcommand{\replaced}[3][2]{%
    \ifthenelse{\equal{#1}{2}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{3}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{4}}{\textcolor{black}{#2}}{}%
    \ifthenelse{\equal{#1}{5}}{\textcolor{blue}{#2}\:\textcolor{blue}{\sout{#3}}}{}%
}