TeX - LaTeX Asked on July 5, 2021
I need three boxes on a page such that two of them are next to each other and the next one should be placed below one of them. I could only provide those two boxes which are next to each other. However, when I want to put the third box below one of them, it is placed on the next page. In fact, I need something like .
Here is my code:
documentclass{article}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{amssymb}
usepackage[margin = 0.1 in, a5paper]{geometry}
usepackage{tcolorbox}
usepackage{enumitem,array}
begin{document}
pagestyle{empty}
begin{minipage}[t][textheight][t]{0.45textwidth}
begin{tcolorbox}[title=box 1]
end{tcolorbox}
end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{minipage}[t][0.45paperheight][t]{0.45paperwidth}
begin{tcolorbox}[title=box 2]
end{tcolorbox}
end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
begin{minipage}[t][0.45paperheight][t]{0.45paperwidth}
begin{tcolorbox}[title=box 3]
end{tcolorbox}
end{minipage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end{document}
Like this:
documentclass{article}
usepackage[showframe, % <--- in real document delete tis option
margin = 0.1 in, a5paper]{geometry}
usepackage{tcolorbox}
usepackage{enumitem,array}
begin{document}
pagestyle{empty}
{
tcbset{width=0.45linewidth, height=0.4linewidth,
before=,after=hfill}
begin{tcolorbox}[title=box 1]
end{tcolorbox}
begin{tcolorbox}[title=box 2]
end{tcolorbox}
bigskip
begin{tcolorbox}[title=box 3]
end{tcolorbox}
}
end{document}
Correct answer by Zarko on July 5, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP