6

How to draw attractive Borders in LaTeX. A Sample image like this: enter image description here

subham soni
  • 9,673

2 Answers2

12

Late solution with Tikz and pgfornament... There are a lot of possibilities to place the ornaments Something in tikz's style ...

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

enter image description here

Alain Matthes
  • 95,075
11

Remarks

I traced the bitmap provided using Inkscape and exported the vector paths to TikZ using the inkscape2tikz plugin.

Then I adjusted the shift of coordinates, to have a specified origin (here in the top right corner of the ornament). And wrapped everything into a macro \ornament.

To place it on the page I used a tikzpicture with the remember picture and overlay options. For more on these options review section 16.13 "Referencing Nodes Outside the Current Pictures" on page 199 of the TikZ 2.10 manual.

Implementation

You need at least two passes of typesetting. See this GitHub Gist for the inkscape.tex file.

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

Output

enter image description here

Henri Menke
  • 109,596