將文字放置在兩個 tikzpicture 環境之間

將文字放置在兩個 tikzpicture 環境之間

如何在兩個 tikzpicture 環境之間輸入文字?當我輸入文字時,第二張 tikzpicture 轉到下一頁!我該做什麼?

非常感謝

\documentclass{article}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor} 
\usepackage[object=vectorian]{pgfornament}
\begin{document}
    \begin{tikzpicture}[remember picture,overlay]
    \node[below left] at ([xshift=-2cm,yshift=-1cm]current page.north east) {\pgfornament[width = .8cm,
        color = MidnightBlue]{15}
        \hspace{-6pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h]{15}
        \hspace{-8pt}\pgfornament[width = 2.4cm,
        color = MidnightBlue]{15}};

    \node[below right,rotate=270] at ([xshift=-1cm,yshift=-2cm]current page.north east) {\pgfornament[width = 2.4cm, color = MidnightBlue,symmetry=v]{15}
        \hspace{-8pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h,symmetry=v]{15}
        \hspace{-6pt}\pgfornament[width = 0.8cm,
        color = MidnightBlue,
        symmetry=v]{15}
    };
    \end{tikzpicture}

    I want to type my text here but the second tikzpicture go to next page! What I should to do?

    \begin{tikzpicture}[color=Maroon,
    every node/.style={inner sep=0pt}]
    \node[minimum size=\linewidth](vecbox){}; 
    \node[anchor=north west] at (vecbox.south west)
    {\pgfornament[width=5cm]{9}};
    \end{tikzpicture} 
\end{document}

答案1

包裝飾物作為和選項插入到環境node中。這兩個選項可讓您記住不同的圖像,並製作例如從一個圖形到另一個圖形的箭頭。這就是為什麼有兩個彙編。tikzpictureremember pictureoverlay

當您將這些圖像作為 插入時node,它們的位置由這些節點上可用的選項控制Positioning Nodes(請參閱TikZ 手冊 3.1.4 中的17.5 節)。它的顏色color =LimeGreen由節點的顏色選項控制。

TikZ 預先定義了一個node與整個頁面完全對應的a(請參閱Referencing the Current Page Node - Absolute PositioningTikZ 手冊 3.1.4 中的 17.13.2 節)。在這裡,我將其定位node左下方頁面的(即在其西南:)at (current page.south west)並將其錨定到South West,即圖像從其southwest角落掛在頁面上:anchor=south west

 \node[anchor=south west,color =LimeGreen] at (current page.south west)
    {\pgfornament[width=5cm]{9}};

由 www.DeepL.com/Translator 翻譯螢幕截圖

\documentclass{article}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor} 
\usepackage[object=vectorian]{pgfornament}
\begin{document}
    \begin{tikzpicture}[remember picture,overlay]
    \node[below left] at ([xshift=-2cm,yshift=-1cm]current page.north east) {\pgfornament[width = .8cm,
        color = MidnightBlue]{15}
        \hspace{-6pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h]{15}
        \hspace{-8pt}\pgfornament[width = 2.4cm,
        color = MidnightBlue]{15}};

    \node[below right,rotate=270] at ([xshift=-1cm,yshift=-2cm]current page.north east) {\pgfornament[width = 2.4cm, color = MidnightBlue,symmetry=v]{15}
        \hspace{-8pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h,symmetry=v]{15}
        \hspace{-6pt}\pgfornament[width = 0.8cm,
        color = MidnightBlue,
        symmetry=v]{15}
    };
%    \end{tikzpicture}



%    \begin{tikzpicture}[color=Maroon,
%    every node/.style={inner sep=0pt}]
%    \node[minimum size=\linewidth](vecbox){}; 
    \node[anchor=south west,color =LimeGreen] at (current page.south west)
    {\pgfornament[width=5cm]{9}};
    \end{tikzpicture} 

        I want to type my text here but the second tikzpicture go to next page! What I should to do?
\end{document}

答案2

有一些專門用於此類目的的軟體包,其中之一是eso-pic.一個好處是它們有助於避免虛假空格,另一個好處是您可以在文件的所有頁面上使用這些裝飾。如果您只想將它們放在一個特定頁面上,請\AddToShipoutPictureBG*{...}在該頁面上使用(並將 放在\AddToShipoutPictureBG序言中)。

\documentclass{article}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor} 
\usepackage[object=vectorian]{pgfornament}
\usepackage{eso-pic}
\AddToShipoutPictureBG{%
    \begin{tikzpicture}[remember picture,overlay]
    \node[below left] at ([xshift=-2cm,yshift=-1cm]current page.north east) {\pgfornament[width = .8cm,
        color = MidnightBlue]{15}
        \hspace{-6pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h]{15}
        \hspace{-8pt}\pgfornament[width = 2.4cm,
        color = MidnightBlue]{15}};

    \node[below right,rotate=270] at ([xshift=-1cm,yshift=-2cm]current page.north east) {\pgfornament[width = 2.4cm, color = MidnightBlue,symmetry=v]{15}
        \hspace{-8pt}\pgfornament[width = 1.6cm,
        color = MidnightBlue,
        symmetry=h,symmetry=v]{15}
        \hspace{-6pt}\pgfornament[width = 0.8cm,
        color = MidnightBlue,
        symmetry=v]{15}
    };
    \node[anchor=south west,color = MidnightBlue] at 
    (current page.south west)    {\pgfornament[width=5cm]{9}};
\end{tikzpicture}}%
\begin{document}
I want to type my text here but the second tikzpicture go to next page! What I
should to do?
\end{document}

在此輸入影像描述

相關內容