如何在文档的某些部分周围添加框架?

如何在文档的某些部分周围添加框架?

我想在文档的某些部分周围添加框架。示例来自 (https://hobsonresearch.com/wp-content/uploads/2018/01/responseletter_hacks.pdf) 在第 5 页:

在此处输入图片描述

我该如何做类似的例子?我无法弄清楚他们使用的是哪documentclass一个font


原始代码取自https://zenkelab.org/resources/latex-rebuttal-response-to-reviewers-template/

\documentclass[11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{lipsum} % to generate some filler text
\usepackage{fullpage}
\usepackage{xifthen}
\newcounter{reviewer}
\setcounter{reviewer}{0}
\newcounter{point}[reviewer]
\setcounter{point}{0}

% This refines the format of how the reviewer/point reference will appear.
\renewcommand{\thepoint}{P\,\thereviewer.\arabic{point}}

% command declarations for reviewer points and our responses
\newcommand{\reviewersection}{\stepcounter{reviewer} \bigskip \hrule
    \section*{Reviewer \thereviewer}}

\newenvironment{reply}
{\medskip \noindent \begin{sf}\textbf{Reply}:\  }
    {\medskip \end{sf}}

\begin{document}

\section*{Response to the reviewers}
% General intro text goes here
We thank the reviewers for their critical assessment of our work.
In the following we address their concerns point by point.

% Let's start point-by-point with Reviewer 1
\reviewersection

% Point one description
\begin{quote}
    \lipsum[1]
    \label{pt:foo}
\end{quote}

% Our reply
\begin{reply}
    We agree with the reviewer on this important point. This is what we did to
    fix it.
    \lipsum[2]
\end{reply}

\begin{quote}
    Reviewer \thereviewer's second point.
    \label{pt:bar}
\end{quote}

\begin{reply}
    And our reply to it.
\end{reply}

\reviewersection

\begin{quote}
    This is the first point of Reviewer \thereviewer. With some more words foo
    bar foo bar ...
\end{quote}

\begin{reply}
    Our reply to it with reference to one of our points above using the \LaTeX's
    label/ref system (see also \ref{pt:foo}).
\end{reply}

\end{document}

输出,其中不显示框:

在此处输入图片描述

答案1

您可以使用该tcolorbox包来重新定义quote环境(您已经使用的)或定义新的环境。

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{lipsum} % to generate some filler text
\usepackage{fullpage}

\usepackage{xifthen}
\newcounter{reviewer}
\setcounter{reviewer}{0}
\newcounter{point}[reviewer]
\setcounter{point}{0}

% This refines the format of how the reviewer/point reference will appear.
\renewcommand{\thepoint}{P\,\thereviewer.\arabic{point}}

% command declarations for reviewer points and our responses
\newcommand{\reviewersection}{\stepcounter{reviewer} \bigskip \hrule
    \section*{Reviewer \thereviewer}}

\newcommand{\shortpoint}[1]{\refstepcounter{point}  \bigskip \noindent
    {\textbf{Reviewer~Point~\thepoint} } ---~#1\par }

\newenvironment{reply}
{\medskip \noindent \begin{sf}\textbf{Reply}:\  }
    {\medskip \end{sf}}

\newcommand{\shortreply}[2][]{\medskip \noindent \begin{sf}\textbf{Reply}:\  #2
        \ifthenelse{\equal{#1}{}}{}{ \hfill \footnotesize (#1)}%
        \medskip \end{sf}}
        
\usepackage{tcolorbox}
\renewtcolorbox{quote}{sharp corners,colback=white}

\begin{document}

\section*{Response to the reviewers}
% General intro text goes here
We thank the reviewers for their critical assessment of our work.
In the following we address their concerns point by point.

% Let's start point-by-point with Reviewer 1
\reviewersection

% Point one description
\begin{quote}
%    \begin{point}
        \lipsum[1]
        \label{pt:foo}
%    \end{point}
\end{quote}

% Our reply
\begin{reply}
    We agree with the reviewer on this important point. This is what we did to
    fix it.
    \lipsum[2]
\end{reply}

\begin{quote}
%    \begin{point}
        Reviewer \thereviewer's second point.
        \label{pt:bar}
%    \end{point}
\end{quote}

\begin{reply}
    And our reply to it.
\end{reply}

\reviewersection

\begin{quote}
%    \begin{point}
        This is the first point of Reviewer \thereviewer. With some more words foo
        bar foo bar ...
%    \end{point}
\end{quote}

\begin{reply}
    Our reply to it with reference to one of our points above using the \LaTeX's
    label/ref system (see also \ref{pt:foo}).
\end{reply}

\end{document}

在此处输入图片描述

相关内容