如何在两个 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
中,tikzpicture
带有remember picture
和overlay
选项。这两个选项允许您记住不同的图像,并制作例如从一个图形指向另一个图形的箭头。这就是为什么有两个编译的原因。
由于您已将这些图像作为 插入node
,因此它们的位置由这些节点上可用的选项控制(参见Positioning Nodes
TikZ 手册 3.1.4 中的第 17.5 节)。其颜色color =LimeGreen
由节点的颜色选项决定。
TikZ 预定义了一个node
与整个页面完全对应的(参见Referencing the Current Page Node - Absolute Positioning
TikZ 手册 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}