\documentclass{article}
\usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage{xcolor}
%\usepackage[dvipsnames]{xcolor} % extended named colors
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage[nameinlink]{cleveref}
% \usepackage{soul} % provides \hl{} for highlighting text
% Uncomment as needed
% \usepackage{graphicx}
% \usepackage{amsmath,amsfonts,amssymb,amsthm}
% \usepackage{array}
% \usepackage{booktabs}
% \usepackage{natbib}
% \usepackage{url}
% \usepackage{marginnote}
\definecolor{mygray}{HTML}{EBEBEB}
\definecolor{mygreen}{HTML}{75D279}
\definecolor{mycyan}{HTML}{00C6F5}
\definecolor{myorange}{HTML}{FFB300}
% \definecolor{myred}{rgb}{.8, 0.3, 0.3}
% --- Counters for automatic numbering and cross-referencing ---
\newcounter{reviewer}
\newcounter{question}[reviewer] % resets with each new reviewer
\renewcommand{\thequestion}{R\arabic{reviewer}-Q\arabic{question}}
\newcommand{\currentlabel}{\thequestion}
% cleveref: \cref{R1-Q2} prints "R1-Q2" (no prefix needed)
\crefformat{question}{#2R\arabic{reviewer}-Q#1#3}
\Crefformat{question}{#2R\arabic{reviewer}-Q#1#3}
% \reviewer increments automatically, \reviewer[N] sets explicit number
\newcommand{\reviewer}[1][]{%
\ifx\\#1\\%
\stepcounter{reviewer}%
\else%
\setcounter{reviewer}{#1}%
\fi%
\setcounter{question}{0}%
\section*{Reviewer \arabic{reviewer}}%
}
% Shared tcolorbox style
\tcbset{
rebuttalbox/.style={
boxrule=0pt,
breakable,
before skip=0.5em,
}
}
\newcommand{\issue}[1]{%
\refstepcounter{question}%
\label{\currentlabel}%
\begin{tcolorbox}[rebuttalbox, colback=white, before upper={\emergencystretch=3em},
title={\textbf{\currentlabel}}, fonttitle=\small, coltitle=black,
attach title to upper={\par\medskip}]
#1
\end{tcolorbox}
}
\newcommand{\answer}[1]{%
\begin{tcolorbox}[rebuttalbox, colback=mygray]
{\it\footnotesize \currentlabel{}: Response}\\[.5em]
#1
\end{tcolorbox}
}
\newcommand{\changed}[1]{%
\begin{tcolorbox}[rebuttalbox, colback=mygreen]
\hfill{\it\footnotesize Quote from new version of manuscript}\\[.5em]
#1
\end{tcolorbox}
}
\newcommand{\issuetodo}[1]{%
\begin{tcolorbox}[rebuttalbox, colback=mycyan]
\hfill{\it\footnotesize TODO (main author)}\\[.5em]
#1
\end{tcolorbox}
}
\newcommand{\issueothers}[1]{%
\begin{tcolorbox}[rebuttalbox, colback=myorange]
\hfill{\it\footnotesize TODO (co-authors)}\\[.5em]
#1
\end{tcolorbox}
}
\title{
Point-by-point reply to the reviewer comments\\[5mm]
\large{Manuscript ID: LOREM-IPSUM-1234569}\\
\large{Title: A Paper about Things and Stuff}
}
\begin{document}
\maketitle
% % just in case editor has written something and we want to reply or we want to address editor + reviewers together
% \section*{Associate Editor}
% \issue{Dear Dr. NAME,
% }
% \newpage
\reviewer[1]
\issue{The thing is bad in ways because of stuff}
\answer{
We fixed the thing about the stuff.
As the reviewer noted, \enquote{the thing is bad}, and we have addressed this.
\changed{
Our stuff has a variety of things, and also stuff.
}
}
% If you want to separate reviewers cleanly
% \newpage
\reviewer[2]
\issue{I don't like your face}
\answer{
Oh no
\issuetodo{
Get face replacements
}
}
\issue{I don't like everyone elses's face}
\answer{
Oh no as well (see also our response to \cref{R1-Q1}).
\issueothers{
Move to Guatemala and become sheep herders
}
}
% Include if you need citations
% \bibliographystyle{abbrvnat}
% \bibliography{reference.bib}
\end{document}

PDF Preview
Create an account to compile and preview