1

How to decrease gap of dashed line in borderline option using tcolorbox, please find my MWE file:

\documentclass{book}
\RequirePackage[breakable,hooks]{tcolorbox}
\tcbuselibrary{breakable,skins}

\makeatletter
\newtcolorbox{Boxone}[1][]{%
enhanced,
breakable,
sharp corners,arc=0pt,outer arc=0pt,
boxrule=2pt,boxsep=0pt,top=9pt,left=9pt,right=9pt,bottom=6.5pt,middle=0pt,
colback=gray, 
colframe=gray,
boxed title style={arc=0pt,outer arc=0pt,boxrule=0.5pt,boxsep=0pt,top=0pt,left=0pt,right=6pt,bottom=0pt,colframe=red,colback=gray},
title={\textcolor{green}{#1}},
toptitle=7.5pt,bottomtitle=3.5pt,
fonttitle=\sffamily,
pad at break=12pt,bottomrule at break=0pt,toprule at break=0pt,
borderline east={0.3pt}{-0.25pt}{blue,dashed},
borderline west={0.3pt}{-0.25pt}{blue,dashed},
borderline south={0.3pt}{-0.25pt}{blue,dashed},
borderline north={0.3pt}{-0.25pt}{blue,dashed},
%borderline={0.3pt}{-0.25pt}{boxonerulecolor,dashed},
}%
\makeatother

\begin{document}


\begin{Boxone}[VOICES FROM THE SECTOR]
\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}

\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}


\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}


\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}


\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}

\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}

\textit{“Digitalisation can increase consumer trust by ensuring transparency along the whole agri-food
value chain.” – Founder of a company developing innovative technologies for food processing}

\end{Boxone}
\end{document} 

1 Answer 1

2

There are various dash patterns available. To make the dashes more dense, you can use densely dashed, see the TikZ/PGF manual section Graphic Parameters: Dash Pattern (section 15.3.2, page 170 in the version currently on CTAN, which is 3.1.2).

MWE:

\documentclass{book}
\RequirePackage[breakable,hooks]{tcolorbox}
\tcbuselibrary{breakable,skins}

\makeatletter
\newtcolorbox{Boxone}[1][]{%
enhanced,
breakable,
sharp corners,arc=0pt,outer arc=0pt,
boxrule=2pt,boxsep=0pt,top=9pt,left=9pt,right=9pt,bottom=6.5pt,middle=0pt,
colback=gray, 
colframe=gray,
boxed title style={arc=0pt,outer arc=0pt,boxrule=0.5pt,boxsep=0pt,top=0pt,left=0pt,right=6pt,bottom=0pt,colframe=red,colback=gray},
title={\textcolor{green}{#1}},
toptitle=7.5pt,bottomtitle=3.5pt,
fonttitle=\sffamily,
pad at break=12pt,bottomrule at break=0pt,toprule at break=0pt,
borderline east={0.3pt}{-0.25pt}{blue,dashed},
borderline west={0.3pt}{-0.25pt}{blue,densely dashed},
borderline south={0.3pt}{-0.25pt}{blue,loosely dashed},
borderline north={0.3pt}{-0.25pt}{blue,dotted},
%borderline={0.3pt}{-0.25pt}{boxonerulecolor,dashed},
}%
\makeatother

\begin{document}


\begin{Boxone}[VOICES FROM THE SECTOR]
\textit{“For our business, seasonality in terms of harvest cycles and consumer demand is a major factor.
Our customers have to pay for our services early in the season, but mostly generate profit only at
the end of the season.” – CEO of a company offering digital technologies for integration along
the value chain}

\textit{“Farmers are quite conservative. In our experience, they do not invest much per year and are quite
risk-averse. Hence, it is key to convince the farmer of the added value. Furthermore, data handling
is crucial.” – CEO of an innovative agri-tech company}
\end{Boxone}
\end{document}

Result:

enter image description here

You can also define a custom dash pattern if none of the predefined styles are suitable, which is described at the start of the manual section.

3
  • Thank you Marijn, the answer very helpful to us.
    – Rajesh N
    Apr 30, 2019 at 6:12
  • My client require to change small adjacent line in both and horizontal and vertical line in all four edges, is that possible to change in my existing MWE file:
    – Rajesh N
    May 2, 2019 at 6:10
  • @RajeshN that is probably possible - can you make a mock-up illustration (in a graphics program such as Paint on Windows or Kolourpaint on Linux/KDE or similar) to show what you need? It is probably best to ask a separate question about that, and not modify the current question too much.
    – Marijn
    May 2, 2019 at 7:58

You must log in to answer this question.

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