1

I use textpost, textblock to put two tcbpost in one page: 2 tcbposter in one page and set absolute position

But \pagebreak, \newpage don't work when I insert another posterbox (BOX C).

Please help; don't remove textblock.

Minimal code:

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[poster]{tcolorbox}
\usepackage[absolute%,showboxes
]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}

\pagestyle{empty}
\begin{document}
\begin{textblock}{6}(1,2)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = red,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-a}}

\end{tcbposter}

\end{textblock}

\begin{textblock}{6}(7,5)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = blue,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-b}}

\end{tcbposter}
\end{textblock}
%%%BOX C
    \clearpage
\pagebreak
\newpage

\begin{textblock}{6}(2,5)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = yellow,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-c}}

\end{tcbposter}
\end{textblock}

\end{document}

enter image description here

3

You can only use \newpage when there is already content on the page, but \textblock does not add content to the page (it rather puts something on top of the page). To cure this, add something invisible like ~ before the \newpage.

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[poster]{tcolorbox}
\usepackage[absolute%,showboxes
]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}

\pagestyle{empty}
\begin{document}
\begin{textblock}{6}(1,2)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = red,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-a}}

\end{tcbposter}

\end{textblock}

\begin{textblock}{6}(7,5)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = blue,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-b}}

\end{tcbposter}
\end{textblock}

~\newpage

\begin{textblock}{6}(2,5)
\begin{tcbposter}[
coverage = {left=0pt,right=0pt,top=0pt,bottom=0pt},
  poster = {
    columns=1,
    rows=2,
    spacing=3mm,
    height=14cm,
    width=6cm,
  },
  ]
  \posterbox[
  colframe = yellow,
  width=5cm, height= 10cm
  ]{ }{\includegraphics[width=3cm]{example-image-c}}

\end{tcbposter}
\end{textblock}

\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.