I use tcolorbox to define a new environment as suggested by Gonzalo at Create a color box?. In that environment, I put the figure inside the frame as the code shown below. I want to adjust the space beetween the frame of table and the figure. In my case I want no space both sides: left and right; and no space for top and bottom. Can you tell me how to adjust it?
code is:
\documentclass[12pt]{book}
\usepackage{lettrine}
\usepackage[explicit]{titlesec}
\usepackage{xcolor}
\usepackage[many]{tcolorbox}
\usetikzlibrary{calc}
\usepackage[utf8]{vietnam}
\usepackage{fancyhdr}
\usepackage[explicit]{titlesec}
\usepackage[unicode]{hyperref}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tcolorbox}
\newtcolorbox[auto counter, number within = chapter]{bang}[1][]{
colframe = myblue,
colback = white,
coltitle = white,
outer arc=0pt,
arc=0pt,
title = {\bf Bảng ~\thetcbcounter} ,
#1,
}
\begin{document}
\begin{bang}
\includegraphics[scale=.78]{image/Chapter10/table10-1.png}
\end{bang}
\end{document}
Thanks!
Best Answer
You must set keys of
colorbox
:left
,right
,top
,bottom
to0pt
, and width of the inserted image to\linewidth