| 1 |
%% |
| 2 |
%% This is file `na-fancyborders.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% na-fancyborders.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Copyright (C) 2026 by NAAM MOAMED (الأستاذ ناعم محمد) |
| 12 |
%% |
| 13 |
%% This work may be distributed and/or modified under the |
| 14 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 15 |
%% of this license or (at your option) any later version. |
| 16 |
%% |
| 17 |
\NeedsTeXFormat{LaTeX2e} |
| 18 |
\ProvidesPackage{na-fancyborders}[2026/05/09 Custom Artistic Page Frames] |
| 19 |
|
| 20 |
\RequirePackage{tikz} |
| 21 |
\RequirePackage{eso-pic} |
| 22 |
\usetikzlibrary{calc} |
| 23 |
|
| 24 |
\parindent=0pt |
| 25 |
|
| 26 |
|
| 27 |
\newcommand{\pageline}[1]{ |
| 28 |
\draw[black,line width=1pt] ([xshift=#1pt+1cm,yshift=5pt+1cm]current page.south west) -- ([xshift=#1pt+1cm,yshift=-5pt-1cm]current page.north west) arc [start angle=180, end angle=90, radius=5pt]; |
| 29 |
\draw[black,line width=1pt] ([xshift=#1pt+1cm,yshift=5pt+1cm]current page.south west) arc [start angle=180, end angle=270, radius=5pt]; |
| 30 |
\draw[black,line width=1pt] ([xshift=-#1pt-1cm,yshift=5pt+1cm]current page.south east) -- ([xshift=-#1pt-1cm,yshift=-5pt-1cm]current page.north east) arc [start angle=0, end angle=90, radius=5pt]; |
| 31 |
\draw[black,line width=1pt] ([xshift=-#1pt-1cm,yshift=5pt+1cm]current page.south east) arc [start angle=360, end angle=270, radius=5pt]; |
| 32 |
} |
| 33 |
|
| 34 |
\newcommand{\rosolle}[3]{ |
| 35 |
\foreach \i in {0.3,0.6,0.9}{ |
| 36 |
\fill[black!30!gray] ([xshift=-5pt,yshift=#1pt]$ (#2)!\i!(#3) $) -- ++ (19pt,-1.5pt) circle (4pt); |
| 37 |
\fill[black] ([xshift=-5pt,yshift=#1pt]$ (#2)!\i!(#3) $) -- ++ (20pt,-1.5pt) circle (4pt); |
| 38 |
\fill[black!30!gray] ([xshift=-25pt,yshift=#1pt]$ (#2)!\i!(#3) $) -- ++ (21pt,-1.5pt) circle (4pt); |
| 39 |
\fill[black] ([xshift=-25pt,yshift=#1pt]$ (#2)!\i!(#3) $) -- ++ (20pt,-1.5pt) circle (4pt); |
| 40 |
\fill[left color=black!70!white,right color=white] ([xshift=-5pt,yshift=#1pt]$ (#2)!\i!(#3) $) arc [start angle=90, end angle=180, radius=1pt] -- ++ (0pt,-1pt) arc [start angle=180, end angle=270, radius=1pt] -- ++ (10pt,0pt) -- ++ (0pt,3pt) -- cycle; |
| 41 |
\fill[left color=white,right color=black!70!white] ([xshift=5pt,yshift=#1pt]$ (#2)!\i!(#3) $) -- ++ (0pt,-3pt) -- ++ (10pt,0pt) arc [start angle=270, end angle=360, radius=1pt] -- ++ (0pt,1pt) arc [start angle=0, end angle=90, radius=1pt] -- cycle; |
| 42 |
} |
| 43 |
} |
| 44 |
|
| 45 |
\newcommand{\narosolle}[2][B]{\rosolle{12}{#2}{#1}\rosolle{0}{#2}{#1}\rosolle{-12}{#2}{#1}} |
| 46 |
|
| 47 |
\newcommand{\rosol}[3]{ |
| 48 |
\fill[black!30!gray] ([xshift=-13pt,yshift=#1pt]$ (#2)!.5!(#3) $) circle (4pt); |
| 49 |
\fill[left color=black!70!white,right color=white] ([xshift=-15pt,yshift=1pt+#1pt]$ (#2)!.5!(#3) $) arc [start angle=90, end angle=180, radius=1pt] -- ++ (0pt,-1pt) arc [start angle=180, end angle=270, radius=1pt] -- ++ (10pt,0pt) -- ++ (0pt,3pt) -- cycle; |
| 50 |
\fill[left color=white,right color=black!70!white] ([xshift=-5pt,yshift=1pt+#1pt]$ (#2)!.5!(#3) $) -- ++ (0pt,-3pt) -- ++ (10pt,0pt) arc [start angle=270, end angle=360, radius=1pt] -- ++ (0pt,1pt) arc [start angle=0, end angle=90, radius=1pt] -- cycle; |
| 51 |
} |
| 52 |
|
| 53 |
\newcommand{\narosol}[2][B]{\rosol{12}{#2}{#1}\rosol{0}{#2}{#1}\rosol{-12}{#2}{#1}} |
| 54 |
|
| 55 |
|
| 56 |
\newcommand\activateBGdefault{\AddToShipoutPictureBG{\tikzpicture[overlay,remember picture] |
| 57 |
\coordinate (A) at ([yshift=-1cm]current page.north); |
| 58 |
\coordinate (B) at([yshift=-1cm,xshift=-1cm]current page.north east); |
| 59 |
\coordinate (C) at([yshift=-1cm,xshift=1cm]current page.north west); |
| 60 |
\coordinate (D) at([yshift=1cm,xshift=1cm]current page.south west); |
| 61 |
\coordinate (E) at([yshift=1cm,xshift=-1cm]current page.south east); |
| 62 |
\draw[line width=2pt](B)rectangle(D); |
| 63 |
\fill[black] ([xshift=2pt,yshift=-2pt]C) -- ++ (0pt,-8pt) arc [start angle=270, end angle=360, radius=8pt] -- cycle; |
| 64 |
\fill[black] ([xshift=-2pt,yshift=-2pt]B) -- ++ (-8pt,0pt) arc [start angle=180, end angle=270, radius=8pt] -- cycle; |
| 65 |
\fill[black] ([xshift=-2pt,yshift=2pt]E) -- ++ (0pt,8pt) arc [start angle=90, end angle=180, radius=8pt] -- cycle; |
| 66 |
\fill[black] ([xshift=2pt,yshift=2pt]D) -- ++ (8pt,0pt) arc [start angle=0, end angle=90, radius=8pt] -- cycle; |
| 67 |
\draw[black!50,line width=.5pt] ([yshift=-4pt]A|-B) -- ([xshift=-12pt,yshift=-4pt]B) arc [start angle=180, end angle=270, radius=8pt] -- ([xshift=-4pt,yshift=12pt]E) arc [start angle=90, end angle=180, radius=8pt] -- ([xshift=12pt,yshift=4pt]D) arc [start angle=0, end angle=90, radius=8pt] -- ([xshift=4pt,yshift=-12pt]C) arc [start angle=270, end angle=360, radius=8pt] -- ([yshift=-4pt]C-|A) ; |
| 68 |
\endtikzpicture}} |
| 69 |
|
| 70 |
\newcommand\activateBGone{\AddToShipoutPictureBG{\tikzpicture[overlay,remember picture] |
| 71 |
\coordinate (A) at ([yshift=-1cm]current page.north); |
| 72 |
\coordinate (B) at([yshift=-1cm,xshift=-1cm]current page.north east); |
| 73 |
\coordinate (C) at([yshift=-1cm,xshift=1cm]current page.north west); |
| 74 |
\coordinate (D) at([yshift=1cm,xshift=1cm]current page.south west); |
| 75 |
\coordinate (E) at([yshift=1cm,xshift=-1cm]current page.south east); |
| 76 |
\draw[fill=black, draw=black] (B) -- ++ (-10mm,0mm) -- ++ (.5mm,-.5mm) -- ++ (9mm,0mm) -- ++ (0mm, -9mm) -- ++ (.5mm,-.5mm) -- cycle; |
| 77 |
\draw[fill=black, draw=black] (D) -- ++ (10mm,0mm) -- ++ (-.5mm,.5mm) -- ++ (-9mm,0mm) -- ++ (0mm, 9mm) -- ++ (-.5mm,.5mm) -- cycle; |
| 78 |
\draw[thick] (A) -- (C) -- ([yshift=11mm]D)-- ++ (1.2mm,-1.2mm) -- ([xshift=1.2mm,yshift=1.2mm]D) -- ++ (8.6mm,0mm) -- ++ (1.2mm,-1.2mm) -- (E) -- ([yshift=-11mm]B)-- ++ (-1.2mm,1.2mm) -- ([xshift=-1.2mm,yshift=-1.2mm]B) -- ++ (-8.6mm,0mm) -- ++ (-1.2mm,1.2mm) -- (A); |
| 79 |
\endtikzpicture}} |
| 80 |
|
| 81 |
\newcommand\activateBGtwo{\AddToShipoutPictureBG{\tikzpicture[overlay,remember picture] |
| 82 |
\coordinate (A) at ([yshift=-1cm]current page.north); |
| 83 |
\coordinate (B) at([yshift=-1cm,xshift=-1cm]current page.north east); |
| 84 |
\coordinate (C) at([yshift=-1cm,xshift=1cm]current page.north west); |
| 85 |
\coordinate (D) at([yshift=1cm,xshift=1cm]current page.south west); |
| 86 |
\coordinate (E) at([yshift=1cm,xshift=-1cm]current page.south east); |
| 87 |
\draw[black!40!white,line width=.5pt] (A|-B)--([xshift=-3pt]B) -- ++ (0,-3pt); |
| 88 |
\draw[black!40!white,line width=.5pt] ([xshift=-3*4.5pt]B) -- ++ (0,-3*3.5pt) -- ++ (3pt,0); |
| 89 |
\draw[black!40!white,line width=.5pt] ([yshift=-3pt]A|-B)--([yshift=-3pt,xshift=-3*6pt]B); |
| 90 |
\draw[black!40!white,line width=.5pt] (A|-C)--([xshift=3pt]C) -- ([xshift=3pt,yshift=3*6pt]D); |
| 91 |
\draw[black!40!white,line width=.5pt] ([yshift=-3pt]A|-C)--([yshift=-3pt]C) -- ([yshift=3pt]D) -- ++ (3pt,0); |
| 92 |
\draw[black!40!white,line width=.5pt] ([yshift=3*4.5pt]D) -- ++ (3*3.5pt,0) -- ++ (0,-3pt); |
| 93 |
\draw[black,line width=.5pt] ([xshift=-3pt,yshift=-3pt]B) -- ++ (3pt,0) -- ([yshift=3pt]E) -- ([xshift=3*6pt,yshift=3pt]D); |
| 94 |
\draw[black,line width=.5pt] ([xshift=-3*3.5pt,yshift=-3*3.5pt]B) -- ++ (0,-3pt) -- ++ (3*3.5pt,0); |
| 95 |
\draw[black,line width=.5pt] ([xshift=-3pt,yshift=-3*6pt]B) -- ([xshift=-3pt]E) -- ([xshift=3pt]D) -- ++ (0,3pt); |
| 96 |
\draw[black,line width=.5pt] ([xshift=3*4.5pt]D) -- ++ (0,3*3.5pt) -- ++ (-3pt,0); |
| 97 |
\fill[black!70!white,line width=.5pt] ([xshift=-3pt,yshift=-3pt]B) -- ++ (0,-3*2.5pt) -- ++ (-3*2.5pt,0) -- ++ (0,3*2.5pt) -- cycle; |
| 98 |
\fill[black!70!white,line width=.5pt] ([xshift=3pt,yshift=3pt]D) -- ++ (0,3*2.5pt) -- ++ (3*2.5pt,0) -- ++ (0,-3*2.5pt) -- cycle; |
| 99 |
\endtikzpicture}} |
| 100 |
|
| 101 |
\newcommand\activateBGthree{\AddToShipoutPictureBG{\tikzpicture[overlay,remember picture] |
| 102 |
\path[fill=black!50,thick,rounded corners=5pt]([yshift=0.85cm,xshift=0.83cm] current page.south west) rectangle([yshift=-0.85cm,xshift=-0.83cm] current page.north east); |
| 103 |
\path[draw=black,fill=white,thick]([yshift=5pt+1cm,xshift=1cm]current page.south west) -- ([yshift=-5pt-1cm,xshift=1cm]current page.north west) arc [start angle=180, end angle=90, radius=5pt] -- ([xshift=-5pt-1cm,yshift=-1cm]current page.north east) arc [start angle=90, end angle=0, radius=5pt] -- ([yshift=5pt+1cm,xshift=-1cm]current page.south east) arc [start angle=360, end angle=270, radius=5pt] -- ([xshift=5pt+1cm,yshift=1cm]current page.south west) arc [start angle=270, end angle=180, radius=5pt] -- cycle; |
| 104 |
\draw[line width=3pt]([yshift=-1cm]current page.north)--([yshift=1cm]current page.south); |
| 105 |
\pageline{1.5} \pageline{3} \pageline{4.5} |
| 106 |
\coordinate (A) at ([xshift=-0.15cm,yshift=-1cm]current page.north); |
| 107 |
\coordinate (C) at ([xshift=-0.15cm,yshift=1cm]current page.south); |
| 108 |
\coordinate (B) at ($(A)!.5!(C)$); |
| 109 |
\narosolle{A} \narosolle{C} |
| 110 |
\endtikzpicture}} |
| 111 |
|
| 112 |
\newcommand\activateBGfour{\AddToShipoutPictureBG{\tikzpicture[overlay,remember picture] |
| 113 |
\coordinate (M) at([yshift=-1cm,xshift=-1cm]current page.north east); |
| 114 |
\coordinate (N) at([yshift=1cm,xshift=1cm]current page.south west); |
| 115 |
\path[fill=black!50,thick,rounded corners=5pt](M) rectangle(N); |
| 116 |
\path[fill=white,draw,thick,rounded corners=5pt]([xshift=-1mm,yshift=-1mm]M) rectangle([xshift=3mm,yshift=1mm] N); |
| 117 |
\coordinate (A) at ([yshift=-1cm,xshift=-1cm]current page.north east); |
| 118 |
\coordinate (B) at ([xshift=-1cm]current page.east); |
| 119 |
\coordinate (C) at([yshift=1cm,xshift=-1cm]current page.south east); |
| 120 |
\path ([yshift=1cm,xshift=1cm]current page.south west)--([yshift=1cm,xshift=-1cm]current page.south east); |
| 121 |
\narosol{A} \narosol{C} |
| 122 |
\endtikzpicture}} |
| 123 |
\endinput |
| 124 |
%% |
| 125 |
%% End of file `na-fancyborders.sty'. |