pagebreak、newpage 不适用于 textblock、textpos

pagebreak、newpage 不适用于 textblock、textpos

我使用textpost,textblock将两个放在tcbpost一页中:2 tcbposter 在一个页面中并设置绝对位置

但是\pagebreak,当我插入另一个(BOX C)\newpage时不起作用。posterbox

请帮忙;不要删除textblock

最小代码:

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

在此处输入图片描述

答案1

\newpage仅当页面上已有内容时才可以使用,但\textblock不会向页面添加内容(而是将某些内容放在页面顶部)。要解决此问题,请~在 之前添加一些不可见的内容\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}

在此处输入图片描述

相关内容