3

How can I type my text between two tikzpicture environments? When I type my text, the second tikzpicture go to next page! What I should to do?

Thanks so much

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

2 Answers 2

3

The package ornaments are inserted as a node in the tikzpicture environment with the remember picture and overlay options. These two options allow you to memorize the different images and make, for example, an arrow that goes from one figure to another. That's why there are two compilations.

As you have inserted these images as a node, their placement is governed by the options available on these nodes (see section 17.5 Positioning Nodes in TikZ manual 3.1.4). Its color color =LimeGreen is governed by the color options of the nodes.

TikZ predefines a node that corresponds exactly to the entire page (see section 17.13.2 Referencing the Current Page Node - Absolute Positioning in TikZ manual 3.1.4). Here, I positioned this node at the bottom left of the page (i.e. at its South West: at (current page.south west)) and anchored it to the South West, i.e. the image is hung on the page from its southwest corner: anchor=south west.

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

Translated with www.DeepL.com/Translatorscreenshot

\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
  • Thanks. no I want first tikzpicture place in top, my text same place and second tikzpicture at bottom and left Aug 8, 2019 at 14:01
  • 1
    Like this one ?
    – AndréC
    Aug 8, 2019 at 14:06
2

There are packages especially for such purposes, with one of them being eso-pic. On benefit is that they help to avoid spurious spaces, another benefit is that you can have these ornaments on all pages of the document. If you only want them on one specific page, use \AddToShipoutPictureBG*{...} on that page (and drop the \AddToShipoutPictureBG in the preamble).

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

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .