如何使用 tcolorbox 将框标题设置为圆角,请参阅下面的我的 MWE 文件:
\documentclass{book}
\usepackage[most]{tcolorbox}
\makeatletter
\definecolor{algborder}{cmyk}{0.85,0.38,0,0}
\definecolor{algtitlebgcolor}{cmyk}{0.33,0.16,0,0}
\definecolor{algbgcolor}{cmyk}{0.09,0.06,0,0}
\newenvironment{boxone}[1][]{
\begin{tcolorbox}[enhanced,
breakable,rounded corners=southeast,%%
titlerule=1pt,toptitle=6pt,bottomtitle=7pt,
title=#1,%titlerule style={algborder,line width=1pt,arc=8pt},
coltitle=black,colbacktitle=algtitlebgcolor,
boxed title style={arc=8pt,outer arc=20pt,boxrule=0.5pt,boxsep=0pt,top=6pt,left=6pt,right=6pt,bottom=6pt,},
before skip=10pt,boxrule=1pt,boxsep=0pt,left=12pt,right=12pt,top=6.5pt,bottom=12pt,arc=8pt, %%
colframe=algborder,colback=algbgcolor,%
]}{\end{tcolorbox}}
\makeatother
\begin{document}
\begin{boxone}[Box Title: There exist two main approaches to optimal
control [36] and dynamic games and dynamic gamesand dynamic games ]
There exist two main approaches to optimal
control [36] and dynamic games: the calculus of variations
(making use of the maximum principle) and
dynamic programming (making use of the principle of optimality) [37], [38]. In this section, it is shown how to
use RL, which is basically an approximate dynamic programing
approach, to solve different multiplayer games
arising from the regulation of dynamical systems. RL
allows optimal solutions to be learned using measured
data online and without requiring complete knowledge
of the system dynamics.
\end{boxone}
\end{document}
答案1
欢迎! 存在太多这样的问题[
,]
解析器不知道哪个是哪个。因此您需要添加括号来帮助解析器。我建议使用\newtcolorbox
,并使用attach boxed title to top
。(当然,我希望您不要[36]
在实际文档中使用,而是使用\cite
或bibtex
类似的工具。)
\documentclass{book}
\usepackage[most]{tcolorbox}
\definecolor{algborder}{cmyk}{0.85,0.38,0,0}
\definecolor{algtitlebgcolor}{cmyk}{0.33,0.16,0,0}
\definecolor{algbgcolor}{cmyk}{0.09,0.06,0,0}
\newtcolorbox{boxone}[1][]{enhanced, breakable,rounded corners=southeast,%%
toptitle=6pt,bottomtitle=7pt,title=#1,
attach boxed title to top,
boxed title style={colframe=algborder,rounded corners},
titlerule style={algborder,line width=1pt,rounded corners=8pt},
coltitle=black,colbacktitle=algtitlebgcolor,
before skip=10pt,boxrule=1pt,boxsep=0pt,left=12pt,right=12pt,top=6.5pt,
bottom=12pt,arc=8pt, %% colframe=algborder,colback=algbgcolor,%
}
\begin{document}
\begin{boxone}[{{Box Title: There exist two main approaches to optimal control
[36] and dynamic games and dynamic gamesand dynamic games }}]
There exist two main
approaches to optimal control [36] and dynamic games: the calculus of variations
(making use of the maximum principle) and dynamic programming (making use of the
principle of optimality) [37], [38]. In this section, it is shown how to use RL,
which is basically an approximate dynamic programing approach, to solve
different multiplayer games arising from the regulation of dynamical systems. RL
allows optimal solutions to be learned using measured data online and without
requiring complete knowledge of the system dynamics.
\end{boxone}
\end{document}