1
    \documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{pgfplots,tikz,enumerate,array,fancyhdr,enumitem,fancybox,graphicx,amsfonts,amsmath,amssymb,amsthm,mathrsfs}
\usepackage{showexpl}
\usepackage{float}
\usetikzlibrary{positioning,arrows,shapes}
\usepackage{caption}

\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{float}
\usepackage{esvect}
\usepackage{wrapfig}



\usepackage{graphicx}

\usepackage[left=2cm,right=3cm,top=2cm,bottom=2.5cm]{geometry} 


\thispagestyle{empty}

%===============================


\usepackage{fancybox}
%======================================================== 
% languages & fonts===========================================

%%
%=========================================================



\usepackage[outline]{contour}
\def\z~#1~#2~#3~#4~#5~{
\node [rotate=#1]at (#2:#3){\pgfornament[width=#4cm,color=red]{#5}};
}
\def\s{%
\tikz{
\draw [line width=2pt](-4,0)-|(0,4);
\draw [line width=1pt](-4,0.14)-|(-0.14,4);
\draw [line width=2pt](-4,0.48)-|(-3.2,1.2)arc(-90:0:1)arc(-90:0:1)-|(-0.48,4);
\draw [line width=1pt](-4,0.38)-|(-3.08,1.1)arc(-90:0:1)arc(-90:0:1)-|(-0.38,4);
\draw[line width=6mm,color=white](135:2.8)+(-0.5,-0.5)--+(.5,.5);
\z~90~135~2.1~2.5~54~
\z~180~102~2.93~.8~55~
\z~-90~168~2.93~.8~56~
\z~0~94.5~5~1~67~
\z~90~178.5~5~1~67~
\z~90~91~16~15~83~
\z~90~92~7.5~6~85~
}
}
\def\r{%
\tikz{
\draw [line width=2pt](-4,0)-|(0,4);
\draw [line width=1pt](-4,0.14)-|(-0.14,4);
\draw [line width=2pt](-4,0.48)-|(-3.2,1.2)arc(-90:0:1)arc(-90:0:1)-|(-0.48,4);
\draw [line width=1pt](-4,0.38)-|(-3.08,1.1)arc(-90:0:1)arc(-90:0:1)-|(-0.38,4);
\draw[line width=6mm,color=white](135:2.8)+(-0.5,-0.5)--+(.5,.5);
\z~90~135~2.1~2.5~54~
\z~180~102~2.93~.8~55~
\z~-90~168~2.93~.8~56~
\z~0~94.5~5~1~67~
\z~90~178.5~5~1~67~
}
}
\def\t{
\tikz{\filldraw[rounded corners=5mm,draw=black!50!white,inner color=white,outer color=black](-4.5,-0.1)to[bend right=5](-2,0.5)--(2,.5)to[bend right=5,sharp corners](4.3,0)to[bend left=5](2,-.5)--(-2,-.5)to[bend left=5]cycle;
\filldraw[rounded corners=5mm,draw=red!50!white,inner color=black,outer color=black](4.5,-0.1)to[bend right=5](2,0.5)--(-2,.5)to[bend left=5,sharp corners](-4.3,0)to[bend left=5](-2,-.5)--(2,-.5)to[bend left=5]cycle;}
}

\parindent=0mm

\begin{document}

\begin{tikzpicture}[overlay,remember picture]
\node at ([shift={(-3.6,12.3)}]current page.south east){\s};
\node [rotate=180]at ([shift={(3.6,-12.3)}]current page.north west){\s};
\node [rotate=90]at ([shift={(-3.6,-3.6)}]current page.north east){\r};
\node [rotate=-90]at ([shift={(3.6,3.6)}]current page.south west){\r};
\node [yscale=0.6,scale=0.8]at ([yshift=-1cm]current page.north){\t};
\node [yscale=0.6,scale=0.8]at ([yshift=1cm]current page.south){\t};
\node at ([shift={(0,-5.2cm)}]current page.north);
\end{tikzpicture}

\end{document}
Vrouvrou
  • 541
  • "Improve" is somewhat vague, and opinion based, which doesn't make for a good TeX.SE question. Is there a specific aspect of the file that you'd like to improve? – Teepeemm Jun 02 '21 at 22:01
  • I want to draw a frame for a page but it gives me an error at the first \node I don't know how to correct it you can try to compile it and you will see thank you for the help – Vrouvrou Jun 02 '21 at 22:22
  • @Teepeemm I edit the question I do a more precise tex files – Vrouvrou Jun 02 '21 at 22:25
  • 1
    @Vrouvrou your last line of code was missing the braces \node at ([shift={(0,-5.2cm)}]current page.north){}; --additionally your corner offsets were off so I have corrected as per my perception -- I have a doubt which ornament you want in the north since you are not using the def\z so I have not fiddled with it -- I think you will be able to carry the solution from here – js bibra Jun 03 '21 at 00:06
  • would you like to accept the answer if it met your requirement – js bibra Jun 03 '21 at 00:56
  • 1
    @Vrouvrou would you like to accept the answer if it met your requirement – js bibra Feb 02 '22 at 00:39

1 Answers1

3

enter image description here

 \documentclass[12pt,a4paper]{report}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{pgfplots,tikz,enumerate,array,fancyhdr,enumitem,fancybox,graphicx,amsfonts,amsmath,amssymb,amsthm,mathrsfs} \usepackage{showexpl} \usepackage{float} \usetikzlibrary{positioning,arrows,shapes} \usepackage{caption}

\usepackage{xcolor} \usepackage{titlesec} \usepackage{float} \usepackage{esvect} \usepackage{wrapfig}

\usepackage{graphicx}

\usepackage[left=2cm,right=3cm,top=2cm,bottom=2.5cm]{geometry}

\thispagestyle{empty}

%===============================

\usepackage{fancybox} %======================================================== % languages & fonts===========================================

%% %=========================================================

\usepackage[outline]{contour} \def\z~#1~#2~#3~#4~#5~{ \node [rotate=#1]at (#2:#3){\pgfornament[width=#4cm,color=red]{#5}}; } \def\s{% \tikz{ \draw line width=2pt-|(0,4); \draw line width=1pt-|(-0.14,4); \draw line width=2pt-|(-3.2,1.2)arc(-90:0:1)arc(-90:0:1)-|(-0.48,4); \draw line width=1pt-|(-3.08,1.1)arc(-90:0:1)arc(-90:0:1)-|(-0.38,4); \drawline width=6mm,color=white+(-0.5,-0.5)--+(.5,.5); % \z~90~135~2.1~2.5~54~ % \z~180~102~2.93~.8~55~ % \z~-90~168~2.93~.8~56~ % \z~0~94.5~5~1~67~ % \z~90~178.5~5~1~67~ % \z~90~91~16~15~83~ % \z~90~92~7.5~6~85~ } } \def\r{% \tikz{ \draw line width=2pt-|(0,4); \draw line width=1pt-|(-0.14,4); \draw line width=2pt-|(-3.2,1.2)arc(-90:0:1)arc(-90:0:1)-|(-0.48,4); \draw line width=1pt-|(-3.08,1.1)arc(-90:0:1)arc(-90:0:1)-|(-0.38,4); \drawline width=6mm,color=white+(-0.5,-0.5)--+(.5,.5); % \z~90~135~2.1~2.5~54~ % \z~180~102~2.93~.8~55~ % \z~-90~168~2.93~.8~56~ % \z~0~94.5~5~1~67~ % \z~90~178.5~5~1~67~ } } \def\t{ \tikz{\filldraw[rounded corners=5mm,draw=black!50!white,inner color=white,outer color=black] (-4.5,-0.1)tobend right=5--(2,.5)tobend right=5,sharp cornerstobend left=5--(-2,-.5)to[bend left=5]cycle; \filldraw[rounded corners=5mm,draw=red!50!white,inner color=black,outer color=black] (4.5,-0.1)tobend right=5--(-2,.5)tobend left=5,sharp cornerstobend left=5--(2,-.5)to[bend left=5]cycle;} }

% \parindent=0mm

\begin{document}

\begin{tikzpicture}[overlay,remember picture] \node at ([shift={(-3,3)}]current page.south east){\s}; \node [rotate=180]at ([shift={(3,-3)}]current page.north west){\s}; \node [rotate=90]at ([shift={(-3,-3)}]current page.north east){\r}; \node [rotate=-90]at ([shift={(3,3)}]current page.south west){\r}; \node [yscale=0.6,scale=0.8]at ([yshift=-1cm]current page.north){\t}; \node [yscale=0.6,scale=0.8]at ([yshift=1cm]current page.south){\t}; \node at ([shift={(0,-5.2cm)}]current page.north){}; \end{tikzpicture}

\end{document}

js bibra
  • 21,280