0

I want to make a tcolorbox with no space between the 2 part but I don't manage by using middle key. I would like the A and the B to be glue the red line. It seems that middle do not have any effect.

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage[table,x11names]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{skins}

\begin{document}
\begin{tcolorbox}[enhanced,  title=test 1,
  colframe=black!50, sidebyside=true,
  boxsep=0pt, right=0mm, left=0pt, toptitle=1mm, bottomtitle=1mm,
  top=0mm, bottom=0mm, left=0mm, lefttitle=4mm, middle=0mm,
  segmentation style={solid, red},]

  \hfill A
  \tcblower
  B
\end{tcolorbox}
\begin{tcolorbox}[enhanced,  title=test 1,
  colframe=black!50, sidebyside=true,
  boxsep=0pt, right=0mm, left=0pt, toptitle=1mm, bottomtitle=1mm,
  top=0mm, bottom=0mm, left=0mm, lefttitle=4mm, middle=10mm,
  segmentation style={solid, red},]

  \hfill A
  \tcblower
  B
\end{tcolorbox}
\begin{tcolorbox}[enhanced,  title=test 1,
  colframe=black!50, sidebyside=true,
  boxsep=0pt, right=0mm, left=0pt, toptitle=1mm, bottomtitle=1mm,
  top=0mm, bottom=0mm, left=0mm, lefttitle=4mm, middle=40mm,
  segmentation style={solid, red},]

  \hfill A
  \tcblower
  B
\end{tcolorbox}

\end{document}

enter image description here

  • 2
    Are you looking for sidebyside gap=0mm? – Ulrike Fischer Mar 26 '18 at 15:04
  • @UlrikeFischer perfect ! – flav Mar 26 '18 at 15:16
2

You are looking for sidebyside gap=0mm:

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage[table,x11names]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{skins}

\begin{document}
\begin{tcolorbox}[enhanced,  title=test 1,
  colframe=black!50, sidebyside=true,
  boxsep=0pt, right=0mm, left=0pt, toptitle=1mm, bottomtitle=1mm,
  top=0mm, bottom=0mm, left=0mm, lefttitle=4mm,sidebyside gap=0mm,
  segmentation style={solid, red},]

  \hfill A
  \tcblower
  B
\end{tcolorbox}


\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.