In LaTeX, the way \begin{center}....\end{center} spaces the tcolorbox is different from how \centering does it. The center environment, provides enough space but the vertical spacing done with \centering isn't the same as with center environment. Now my question is, when using \centering, how do I achieve the same spacing of tcolorbox as done with center environment.
Here is the MWE:
\documentclass[12pt]{article}
\usepackage[many]{tcolorbox}
\usepackage{kantlipsum}
\newcommand{\unittcbox}[1]{%
\medskip \centering \tcbox{#1} \medskip
}%
\begin{document}
\kant[1]
\unittcbox{SI unit : Ampere. square metre ($A.m²$)}
\kant[2]
\begin{center}
\tcbox{SI unit : Ampere. square metre ($A.m²$)}
\end{center}
\kant[3]
\end{document}
I tried with \medskip but it didn't workout.
Using centering:

Using center environment:



\centering– d-cmst May 18 '14 at 16:50\par, tried it but no use :( – subham soni May 18 '14 at 16:54centeradds a\trivlist. See the definition of\center:\def\center{\trivlist \centering\item\relax}and\def\endcenter{\endtrivlist}– d-cmst May 18 '14 at 16:58\centeringdoesn't do any vertical spacing it just sets the paragraph alignment to center, the center environment does\centeringbut also adds vertical space. Your question isn't at all clear, but if you want the spacing of the center environment why not use that? – David Carlisle May 18 '14 at 20:28