<filename>en-2016-07-17-latex-template-for-responses-to-referees-reports/statement.tex
% Title:    A LaTeX Template For Responses To a Referees' Reports
% Author:   <NAME> <<EMAIL>>
% Homepage: https://blog.petrzemek.net/2016/07/17/latex-template-for-responses-to-referees-reports/
% License:  CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
\documentclass[10pt]{article}

% Allow Unicode input (alternatively, you can use XeLaTeX or LuaLaTeX)
\usepackage[utf8]{inputenc}

\usepackage{microtype,xparse,tcolorbox}
\newenvironment{reviewer-comment }{}{}
\tcbuselibrary{skins}
\tcolorboxenvironment{reviewer-comment }{empty,
  left = 1em, top = 1ex, bottom = 1ex,
  borderline west = {2pt} {0pt} {black!20},
}
\ExplSyntaxOn
\NewDocumentEnvironment {response} { +m O{black!20} } {
  \IfValueT {#1} {
    \begin{reviewer-comment~}
      \setlength\parindent{2em}
      \noindent
      \ttfamily #1
    \end{reviewer-comment~}
  }
  \par\noindent\ignorespaces
} { \bigskip\par }

\NewDocumentCommand \Reviewer { m } {
  \section*{Comments~by~Reviewer~#1}
}
\ExplSyntaxOff
\AtBeginDocument{\maketitle\thispagestyle{empty}\noindent}

% You can get probably get rid of these definitions:
\newcommand\meta[1]{$\langle\hbox{#1}\rangle$}
\newcommand\PaperTitle[1]{``\textit{#1}''}

\title{Statement on the Revision of \meta{Paper ID} \\
  Based on the Referees' Report}
\author{Author1 \and Author2 \and Author3}
\date{\today}

\begin{document}
This statement concerns our revision of the \meta{Paper ID} paper,
entitled \PaperTitle{\meta{Paper Title}}, based on the referees'
report.

\Reviewer{\#1}
\begin{response}{First comment.}
  Response to the first comment.
\end{response}
\begin{response}{Second comment.}
  Response to the second comment.
\end{response}

\Reviewer{\#2}
\begin{response}{First comment.}
  Response to the first comment.
\end{response}
\end{document}
