我们使用 caption 包定义了标题样式,标题样式未在 中更新tcolorbox
,请帮助我们解决。
请查找 MWE 文件:
\documentclass{book}
\usepackage{tabu}
\usepackage{caption}
\usepackage[most]{tcolorbox}
\usepackage{color}
\let\tabuprocesstable\relax
\definecolor{tblboxcolor}{cmyk}{0.18,0.14,0.13,0}
\definecolor{colhdcolor}{cmyk}{0.70,0.55,0.50,0}
\newlength\caphang
% Set length as wanted
\setlength\caphang{60pt}
\newbox\tabcapwidth
\newbox\tabwidth
\newdimen\tabdimen
\renewcommand\tablename{TABLE}
\DeclareCaptionFormat{hangit}{%
\hangindent=\caphang\hangafter=1%
\makebox[\caphang][l]%\fboxsep10pt
{\fboxrule0pt\fboxsep6pt\fcolorbox{tblboxcolor}{tblboxcolor}{\textcolor{colhdcolor}{\MakeUppercase{#1}}}\sffamily#2\ignorespaces\hskip6.0pt\ignorespaces%
\raisebox{-10pt}{\parbox[b]{\dimexpr\linewidth-\caphang}{#3\vphantom{yg}\vskip-1.6pt}\par}}}
\DeclareCaptionLabelSeparator{colon}{}
\def\fnum@table{\tablename\ignorespaces{\hskip2.5\p@}\ignorespaces\thetable}
\DeclareCaptionFont{tablebodyfont}{#1}
\captionsetup[table]{singlelinecheck=no,format=hangit,font=tablebodyfont,labelsep={none},belowskip=-5pt,
justification=justified,}
\def\colhead#1{#1}
\def\tstrut{}
\def\bstrut{}
\begin{document}
\def\tablename{Table}
\def\thetable{2.15:}
\begin{table}
\tabuprocesstable{\caption{\textbf{Guidance for managing non-compliance}}}
{\begin{tabu}{p{235.00pt}p{235.00pt}}
\colhead{Steps for Audits}
&
\colhead{Steps for professional services other than audits}
\\
{\tstrut}1) Obtain an understanding of the matter
&
{\tstrut}1) Obtain an understanding of the matter
\\
2) Address the matter
&
2) Address with management and those charged with governance
\\
3) Determine if further action is needed
&
3) Communicate with the entity’s external auditor
\\
4) Document the steps and outcomes
&
4) Determine if further action is needed
\\
~{\bstrut}
&
5) Document the steps and outcomes{\bstrut}
\\
\tabucline{-}
\end{tabu}}
{}
\end{table}
\begin{tcolorbox}
\makeatletter
\@namedef{table}{\def\@captype{table}\begingroup\vskip\baselineskip}
\@namedef{endtable}{\vskip\baselineskip\endgroup}
\makeatother
\def\tablename{Table}
\def\thetable{2.15:}
\begin{table}
\tabuprocesstable{\caption{\textbf{Guidance for managing non-compliance}}}
{\begin{tabu}{p{235.00pt}p{235.00pt}}
\colhead{Steps for Audits}
&
\colhead{Steps for professional services other than audits}
\\
{\tstrut}1) Obtain an understanding of the matter
&
{\tstrut}1) Obtain an understanding of the matter
\\
2) Address the matter
&
2) Address with management and those charged with governance
\\
3) Determine if further action is needed
&
3) Communicate with the entity’s external auditor
\\
4) Document the steps and outcomes
&
4) Determine if further action is needed
\\
~{\bstrut}
&
5) Document the steps and outcomes{\bstrut}
\\
\tabucline{-}
\end{tabu}}
{}
\end{table}
\end{tcolorbox}
\end{document}