当我使用以下代码生成两个彩色框时:
\documentclass[border={0pt 0pt 0pt 0pt}]{standalone} % left bottom right top
\usepackage{varwidth}
\usepackage{xcolor}
\usepackage[xparse]{tcolorbox}
\begin{document}
\tcbset{left skip=0pt, boxrule=0pt,
size=fbox, sharp corners,
colframe=black, width=0.75\linewidth}
\begin{varwidth}{0.5\linewidth}
\begin{tcolorbox}[colback=red!30]
Some random text
\end{tcolorbox}
\begin{tcolorbox}[colback=blue!30]
Some more random text...
With a line skip!
\end{tcolorbox}
\end{varwidth}
\end{document}
我得到以下结果:
无论我做什么,都无法摆脱左边的白色边框。
任何帮助,将不胜感激。
答案1
\documentclass[border={0pt 0pt 0pt 0pt}]{standalone} % left bottom right top
\usepackage{varwidth}
\usepackage{xcolor}
\usepackage[xparse]{tcolorbox}
\begin{document}
\tcbset{left skip=0pt, boxrule=0pt,
size=fbox, sharp corners,
colframe=black, width=0.75\linewidth}% <-- hide this space
\begin{varwidth}{0.5\linewidth}
\begin{tcolorbox}[colback=red!30]
Some random text
\end{tcolorbox}
\begin{tcolorbox}[colback=blue!30]
Some more random text...
With a line skip!
\end{tcolorbox}
\end{varwidth}
\end{document}