如何在 LaTeX 中绘制美观的边框。示例图像如下:
答案1
评论
我使用提供的位图进行跟踪Inkscape并使用inkscape2tikz插入。
然后我调整了坐标的偏移,使其具有指定的原点(这里是装饰品的右上角)。并将所有内容包装到宏中\ornament
。
为了将其放置在页面上,我使用了tikzpicture
带有remember picture
和overlay
选项的。有关这些选项的更多信息,请参阅第 199 页的 16.13 节“引用当前图片之外的节点”TikZ 2.10 手册。
执行
你至少需要两次通过排版。请参阅此 GitHub Gist 了解inkscape.tex
文件。
\documentclass{article}
\usepackage{tikz,blindtext}
\input{inkscape.tex}
\title{Ornaments}
\author{Subham Soni}
\begin{document}
\maketitle
\begin{tikzpicture}[remember picture,overlay]
\node[below left] at ([xshift=-1cm,yshift=-1cm]current page.north east) {\ornament{scale=1}};
\end{tikzpicture}
\blindtext
\end{document}
输出
答案2
使用 Tikz 和 pgfornament 的后期解决方案......有很多可能性可以放置装饰品,采用 tikz 的风格......
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\usepackage[object=vectorian]{pgfornament}
\title{Ornaments}
\author{Alain Matthes}
\begin{document}
\maketitle
\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}]
\draw[help lines] (-6,-6) grid (6,6);
\node[minimum size=12cm](vecbox){};
\node[anchor=north west] at (vecbox.north west)
{\pgfornament[width=5cm]{61}};
\node[anchor=north east] at (vecbox.north east)
{\pgfornament[width=5cm,symmetry=v]{61}};
\node[anchor=south west] at (vecbox.south west)
{\pgfornament[width=5cm,symmetry=h]{61}};
\node[anchor=south east] at (vecbox.south east)
{\pgfornament[width=5cm,symmetry=c]{61}};
\end{tikzpicture}
\end{document}