TransWikia.com

How do I recreate these ornaments?

TeX - LaTeX Asked on May 14, 2021

I was referring the psvectorian package for attractive borders and styles. I came across this:

enter image description here

I badly know how to do this.The documentation doesn’t show much on how to achieve this.Please help me.

One Answer

I have defined two macros:

%% A macro with two arguments to change ornaments and colors easily
%% Syntax -- sectionlinetwo{<color>}{<ornament>}
newcommand{sectionline}[2]{%
  nointerlineskip vspace{.5baselineskip}hspace{fill}
  {resizebox{0.5linewidth}{1.2ex}
    {pgfornament[color = #1]{#2}
    }}%
    hspace{fill}
    parnointerlineskip vspace{.5baselineskip}
  }

Refer: This answer. This will draw the ornaments between the paragraphs. The other one is versatile and can be used elsewhere:

newcommandmyornament[3][black]{%
    resizebox{#2}{!}{pgfornament[color = #1]{#3}%
}%
}
%% syntax 
%% myornament[<color|optional, default is black>]{<width>}{<ornament number>}    

Now the full code:

PassOptionsToPackage{svgnames}{xcolor}
documentclass[11pt]{article}
usepackage[object=vectorian]{pgfornament} %%  http://altermundus.com/pages/tkz/ornament/index.html
usepackage{lipsum,tikz}

%% A macro with two arguments to change ornaments and colors easily
%% Syntax -- sectionlinetwo{<color>}{<ornament>}
newcommand{sectionline}[2]{%
  nointerlineskip vspace{.5baselineskip}hspace{fill}
  {resizebox{0.5linewidth}{1.2ex}
    {pgfornament[color = #1]{#2}
    }}%
    hspace{fill}
    parnointerlineskip vspace{.5baselineskip}
  }
newcommandmyornament[3][black]{%
resizebox{#2}{!}{pgfornament[color = #1]{#3}%
    }%
    }

begin{document}
noindent myornament[DarkRed]{0.3linewidth}{72} hfill%
LARGE Motifs d'ornaments hfill%
myornament[DarkRed]{0.3linewidth}{73}%
par
begin{center}
  myornament[DarkRed]{0.7linewidth}{85}
end{center}
lipsum[2]

sectionline{magenta}{84}

lipsum[3]

sectionline{DarkGreen}{88}
parnoindent
myornament[DarkRed]{linewidth}{60}
end{document}

enter image description here

How do you know which number represents which ornaments? I peeked in to the pgfornaments manual (pages 17-20). You can download pgfornament from here.

pgfornament is compatible with pdflatex.

Correct answer by user11232 on May 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP