我想消除图形和边缘之间的空间,这是我的代码,或者我如何消除空间?
如何消除右侧的空格?
\documentclass[a0paper,portrait]{article}
\usepackage[most]{tcolorbox}
\usepackage{copyrightbox}
\usepackage{float}
\makeatletter
\renewcommand{\CRB@setcopyrightfont}{%
\footnotesize %footnotesize normalsize
\color{black} % <--- you can select black because
}
\makeatother
\begin{document}
\title{Test}
\begin{figure}[H]
\centering
\caption{Proceso }
\label{normalizacionFiguraCopia}
\copyrightbox[b]{\begin{tcolorbox}[
enhanced,clip upper,%<------------
colframe=gray,colback=white,boxrule=2pt,arc=10pt,
boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt]
\includegraphics[scale=0.8]{example-image}
\end{tcolorbox}}
{source: asd }
\end{figure}
\end{document}
如果我使用 \frame,如何使角变圆?并使边缘线变大?
\begin{figure}[H]
\centering
\caption{Process}
\label{copia}
\copyrightbox[b]{\frame{
\includegraphics[scale=0.8]{example-image}}}
{source: asd }
\end{figure}
答案1
您的框比图片更宽。以下是适当设置宽度的一种可能方法。
\documentclass[a0paper,portrait]{article}
\usepackage[most]{tcolorbox}
\usepackage{copyrightbox}
\usepackage{float}
\makeatletter
\renewcommand{\CRB@setcopyrightfont}{%
\footnotesize %footnotesize normalsize
\color{black} % <--- you can select black because
}
\makeatother
\newsavebox\mybox
\newlength\mywd
\sbox\mybox{\includegraphics[scale=0.8]{example-image}}
\mywd=\wd\mybox
\begin{document}
\title{Test}
\begin{figure}[H]
\centering
\caption{Proceso}
\label{normalizacionFiguraCopia}
\copyrightbox[b]{
\begin{tcolorbox}[width=\mywd,
enhanced,clip upper,%<------------
colframe=gray,colback=white,boxrule=2pt,arc=10pt,
boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt]
\includegraphics[scale=0.8]{example-image}
\end{tcolorbox}}{source: asd }
\end{figure}
\end{document}
当然,您可以将其打包成宏。
\documentclass[a0paper,portrait]{article}
\usepackage[most]{tcolorbox}
\usepackage{copyrightbox}
\usepackage{float}
\makeatletter
\renewcommand{\CRB@setcopyrightfont}{%
\footnotesize %footnotesize normalsize
\color{black} % <--- you can select black because
}
\makeatother
\newsavebox\mybox
\newlength\mywd
\newcommand{\TightColorbox}[2][]{%
\savebox\mybox{#2}%
\mywd=\wd\mybox%
\begin{tcolorbox}[width=\mywd,
enhanced,clip upper,%<------------
colframe=gray,colback=white,boxrule=2pt,arc=10pt,
boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt,#1]
#2
\end{tcolorbox}
}
\begin{document}
\title{Test}
\begin{figure}[H]
\centering
\caption{Proceso}
\label{normalizacionFiguraCopia}
\copyrightbox[b]{\TightColorbox{\includegraphics[scale=0.8]{example-image}}
}{source: asd }
\end{figure}
\end{document}\documentclass[a0paper,portrait]{article}
\usepackage[most]{tcolorbox}
\usepackage{copyrightbox}
\usepackage{float}
\makeatletter
\renewcommand{\CRB@setcopyrightfont}{%
\footnotesize %footnotesize normalsize
\color{black} % <--- you can select black because
}
\makeatother
\newlength\mywd
\newcommand{\TightColorbox}[2][]{%
\settowidth\mywd{#2}%
\begin{tcolorbox}[width=\mywd,
enhanced,clip upper,%<------------
colframe=gray,colback=white,boxrule=2pt,arc=10pt,
boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt,#1]
#2
\end{tcolorbox}
}
\begin{document}
\title{Test}
\begin{figure}[H]
\centering
\caption{Proceso}
\label{normalizacionFiguraCopia}
\copyrightbox[b]{\TightColorbox{\includegraphics[scale=0.8]{example-image}}
}{source: asd }
\end{figure}
\end{document}
tcolorbox
如果有可以达到相同效果的选项,我不会感到惊讶。