调整大小的页面上的大 tikzpicture 会创建空白页

调整大小的页面上的大 tikzpicture 会创建空白页

我正在尝试将两张大的 tikz 图片放到一个调整大小的页面上。如果图片太大,则 latex 将插入一张空白页并将图片移动到第二张页面上。我该如何摆脱这张空白页?据我所知,问题在于 vbox 过满。

这是一个最小的(非)工作环境:

\documentclass{article}
\usepackage{tikz}
\usepackage[]{geometry}

\begin{document}
    
    \pdfpagewidth=1000mm \pdfpageheight=800mm
    
        \newgeometry{left=0cm, top=0cm, textwidth=21.5cm} %textwidth was set until linebreaks were as wanted
        
            \begin{tikzpicture}
                \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-68.544) node (v1) {};
            \end{tikzpicture}
        
        \restoregeometry
        
    \newpage
    \pdfpagewidth=700mm \pdfpageheight=400mm
    
        \begin{tikzpicture}
            \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-20.544) node (v1) {};
        \end{tikzpicture}

    \newpage
    \pdfpagewidth=210mm \pdfpageheight=297mm
    
    Normal pages here

\end{document}

第一页是空的,tikzpicture 在第二页。

在 \geometry 中设置第一页(按照 Ivan 的建议)解决了该问题,但是导致普通 A4 页面上的文本看起来很糟糕。

\documentclass{article}
\usepackage{tikz}
\usepackage{geometry}
\geometry{left=0cm, top=0cm,textwidth=21.5cm,paperwidth=1000mm,paperheight=800mm}

\begin{document}
    \begin{tikzpicture}
        \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-68.544) node (v1) {};
    \end{tikzpicture}
    
    \restoregeometry
    \pdfpagewidth=700mm \pdfpageheight=400mm
    
    \begin{tikzpicture}
        \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-20.544) node (v1) {};
    \end{tikzpicture}
    
    \newpage
    \pdfpagewidth=210mm \pdfpageheight=297mm \textwidth=150mm
    
    Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
    

\end{document}

答案1

\documentclass{article}
\usepackage{tikz}
\usepackage{geometry}
\geometry{left=0cm, top=0cm,textwidth=21.5cm}

\begin{document}

 \pdfpagewidth=1000mm \pdfpageheight=800mm
  
 \begin{tikzpicture}[overlay]
 \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-68.544) node (v1) {};
 \end{tikzpicture}
 
 \restoregeometry
 \pdfpagewidth=700mm \pdfpageheight=400mm
 
 \begin{tikzpicture}
 \draw [thick] (-23.392,-16.32) node {} rectangle (26.112,-20.544) node (v1) {};
 \end{tikzpicture}

\newgeometry{textwidth=150mm} 
 \pdfpagewidth=210mm \pdfpageheight=297mm 
 
 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.   
 
\end{document}

在此处输入图片描述

相关内容