我有多个框架框。如何枚举这些框架框?
梅威瑟:
\documentclass{article}
\usepackage{a4wide}
\usepackage{url}
\usepackage{amsmath,mathtools,amssymb}
% Allow Unicode input (alternatively, you can use XeLaTeX or LuaLaTeX)
\usepackage{framed}
\usepackage{xcolor}
\usepackage{soul}
\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}
\newcommand\meta[1]{$\langle\hbox{#1}\rangle$}
\newcommand\PaperTitle[1]{``\textit{#1}''}
\title{Response of review comments }
\author{Rudresh \and Somnath }
\date{\today}
\begin{document}
\begin{framed}
{\color{blue} the goal of this article}
\end{framed}
Text description for frame 1.
\begin{framed}
{\color{blue} the goal of this article}
\end{framed}
Text description for frame 2.
\end{document}
答案1
一条建议:
一种可能的方法是使用\newtcolorbox
命令来定义一个goal
框架:
\newtcolorbox[auto counter]{someframedbox}[1][]{some tcolorbox options, title={Goal \thetcbcounter}, #1}
这提供了一个具有常用tcolorbox
功能的枚举框。
environment
reviewer-comment
先定义一个正则然后围绕它没有任何意义tcolorbox
。
这些陈述\begin{reviewer-comment~}
是错误的,它们~
不可能存在。
\documentclass{article}
\usepackage{framed}
\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},
}
\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 }
\newtcolorbox[auto counter]{someframedbox}[1][]{%
colupper=blue,
enhanced jigsaw,
sharp corners,
coltitle=white,
colbacktitle=blue,
colback=white,
%attach boxed title to top left={yshift=1pt},
%boxed title style={boxrule=0pt,sharp corners},
title={Goal \thetcbcounter},
#1
}
\NewDocumentCommand \Reviewer { m } {
\section*{Comments~by~Reviewer~#1}
}
\title{How to annoy people by not providing a MWE}
\author{Mr. Gumby}
\AtBeginDocument{\maketitle\thispagestyle{empty}\noindent}
\begin{document}
\begin{response}{Stuff}
Foo
\end{response}
\begin{someframedbox}
The goal of this article
\end{someframedbox}
Text description for frame 1.
\begin{someframedbox}
The goal of this article
\end{someframedbox}
Text description for frame 2.
\end{document}