Posts

Showing posts with the label Tcolorbox

Boxes Placement In Tcolorbox

Image
Answer : Obviously, you would use the \tcbox macro version for your boxes, rather than the environment form. Calculation of the stackgap is shown automated in this MWE. (Note: this example works starting with V2.30 of tcolorbox). \documentclass{article} \usepackage{stackengine} \usepackage{tcolorbox} \begin{document} \def\boxone{\tcbox[nobeforeafter]{This is a test}} \def\boxtwo{\tcbox[nobeforeafter]{Another test}} \def\boxthree{\tcbox[nobeforeafter,minipage,width=0.7in]{this is a very long box}} \stackon[\heightof{\boxthree}-\heightof{\boxone}-\heightof{\boxtwo}]% {\boxtwo}{\boxone}~\boxthree \end{document} Taking a similar tack to Steven Segletes's answer but using the xcoffins package, which allows us to pick points on the various boxes to line up: \documentclass{article} \usepackage{tcolorbox} \usepackage{xcoffins} \NewCoffin{\CoffinA} \NewCoffin{\CoffinB} \NewCoffin{\CoffinC} \begin{document} % Set up content in three coffins \SetHorizontalCoffin{\CoffinA}...