0

I want to decrease space between columns and display tcolorbox without frame.

My Minimal code:

\documentclass{article}
\usepackage[a4,landscape]{geometry}
\usepackage[absolute,overlay]{textpos}
\usepackage{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{poster}
\usepackage{tikz} 
\usetikzlibrary{positioning}
\usepackage{enumitem}
\usepackage{multicol}
\usepackage{microtype}
\begin{document}
\begin{tcbposter}
\posterbox[width=12.0cm,height=5.0cm]{xshift=1cm,yshift=1cm}
{
\addtolength{\leftmargini}{0.1cm}
{
\begin{tcolorbox}
\setlength\columnsep{-10pt}
%\setlength{\columnrulewidth}{1pt}
\begin{multicols*}{3}
\begin{enumerate}[itemsep=0.5mm]
\item  ............ 
\item  ............ 
\item  ............ 
\item  ............ 
\item  ............ 
\item  ............ 
\end{enumerate}
\end{multicols*}
\end{tcolorbox}
} 
}
\end{tcbposter}
\end{document}

enter image description here

1 Answer 1

1

First, \usepackage[a4,landscape]{geometry} is invalid: the option you want is called a4paper, not a4.

Second, you have an overfull \hbox of width \parindent due to the indentation box inserted when you do \begin{tcbposter}. Adding \noindent before \begin{tcbposter} fixes this problem.

Now, to the real questions. Since you didn't say what to do with the removed horizontal space, I had to guess: I'll assume you want to keep the whole overall width and completely fill it with the column contents (thus, I set \columnsep to 0pt).

  1. In order to remove the frame around the tcolorbox, you can use the tile option, which is a shortcut for skin=tile (this normally requires \tcbuselibrary{skins}).

  2. The horizontal space you are trying to squeeze does not come from multicol's \columnsep parameter—that is why your attempt with \setlength\columnsep{-10pt} doesn't work. It comes in part from the enumitem horizontal spacing parameters—mainly from labelwidth, but also a bit from the by default automatically-computed labelindent. Also, your dots don't necessary fill a whole line, since you are using an explicit ............ instead of \dotfill.

    By passing leftmargin=* to the enumerate environment, one tells enumitem 1) to set labelwidth to the width of 0. (this is due to the \arabic numbering of the enumeration) and 2) to compute the leftmargin parameter from the others. Since labelindent defaults to 0pt when it is not computed from the other parameters, which is the case when one uses leftmargin=*, the enumerate labels are then set to start at the left margin of the current column.

\documentclass{article}
\usepackage[a4paper,landscape]{geometry}
\usepackage[absolute,overlay]{textpos}
\usepackage{tcolorbox}
\tcbuselibrary{poster, skins}
\usepackage{enumitem}
\usepackage{multicol}

\begin{document}
\noindent     % Without this, you have an overfull \hbox (\parindent too much)
\begin{tcbposter}
\posterbox[width=12.0cm,height=5.0cm]{xshift=1cm,yshift=1cm}
{%
  \begin{tcolorbox}[tile]       % <---- 'tile' removes the frame
  \setlength{\columnsep}{0pt}%
  \begin{multicols}{3}
  \begin{enumerate}[itemsep=0.5mm, leftmargin=*]
  \item  \dotfill\\ abc def\dotfill
  \item  \dotfill\\\mbox{}\dotfill
  \item  \dotfill\\\mbox{}\dotfill
  \item  \dotfill\\\mbox{}\dotfill
  \item  \dotfill\\\mbox{}\dotfill
  \item  \dotfill\\\mbox{}\dotfill
  \end{enumerate}
  \end{multicols}
  \end{tcolorbox}
}%
\end{tcbposter}
\end{document}

screenshot

Note: it is not very clear why you need the tcolorbox here. Without it, you'd obtain the following (i.e., no more left, top, right and bottom margins from the tcolorbox):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .