%% Avatar icons courtesy of http://www.oxygenna.com/news/material-design-flat-avatar-set
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[dvipsnames,svgnames,x11names]{xcolor}
\usepackage[markup=underlined]{changes}
%% Use "final" option to remove all tracking markups
% \usepackage[final]{changes}
\title{Example: changes with avatars}
\author{Overleaf}
\newcommand{\JHavatar}{\protect\includegraphics[width=1.5cm]{jh}}
\newcommand{\JLMavatar}{\protect\includegraphics[width=1.5cm]{jlm}}
\definechangesauthor[color=BrickRed,name=\JLMavatar]{JLM}
\definechangesauthor[color=NavyBlue,name=\JHavatar]{JH}
%%% Alternative definition to have the remarks
%%% in the margins instead of footnotes
\usepackage{todonotes}
\setlength{\marginparwidth}{3cm}
\makeatletter
% \setcommentmarkup{\todo[color={authorcolor!10},size=\scriptsize]{#3: #1}}
\setcommentmarkup{%
\todo[
textcolor={authorcolor!70!black},
backgroundcolor={authorcolor!20!white},
linecolor={authorcolor!30!white},
size=\scriptsize]%
{\@nameuse{Changes@AuthorName#2}\\#1}
}
\makeatother
%% Rather hacky definition of a plain remark/note
%% by riding on \added
\newcommand{\note}[2][]{\added[#1,comment={#2}]{}}
\begin{document}
\maketitle
Lorem ipsum \added[id=JLM,comment={lipsum, lipsum}]{dolor sit amet}, consectetur adipiscing elit. Integer luctus molestie hendrerit. Nullam id consequat turpis. Curabitur vitae suscipit ipsum, et lobortis quam. Curabitur convallis scelerisque erat, a pellentesque eros luctus dapibus. \deleted[id=JH]{Suspendisse consectetur ligula in rutrum pellentesque.} Cras hendrerit vel nunc non consequat. Curabitur nec est dolor. Cras vulputate commodo augue, sit amet tempus diam posuere a. Cras eget libero placerat, consequat justo non, consequat diam. Fusce nisi turpis, dictum vel eros nec, egestas imperdiet tellus. Duis non ligula velit. Suspendisse nec tellus tellus.\note[id=JH]{Proin a lectus vestibulum, mollis eros id, vehicula mauris.}
Phasellus molestie accumsan rhoncus. Mauris eu turpis non leo rutrum tempus ut sed dolor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; \replaced[id=JLM]{Donec et massa in arcu sagittis posuere a a erat.}{Vivamus tincidunt nec purus vitae porttitor.} Pellentesque molestie dolor ultrices tincidunt mollis. In hac habitasse platea dictumst. Aliquam molestie, sem eu suscipit pharetra, odio turpis tristique odio, molestie egestas sapien massa in elit.\note[id=JLM]{Fusce eget sagittis eros. Donec a posuere elit, vitae congue augue.} Donec semper mi felis, id cursus turpis pretium in.
Donec lacinia dolor dui, rutrum tempus sapien adipiscing a. Proin at laoreet nisi. Phasellus elementum erat nisl, at consequat nisi pretium ullamcorper. Pellentesque in neque ligula. Mauris vitae aliquet enim. Phasellus lobortis velit in tortor condimentum porta. Proin aliquam consequat venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus condimentum urna in mauris venenatis congue. Integer non mi tincidunt, vestibulum leo in, consectetur leo.
\end{document}