| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2026 by Professor Naam Mohamed (الأستاذ ناعم محمد) |
| 4 |
% --------------------------------------------------------------------------- |
| 5 |
% This work may be distributed and/or modified under the conditions of the |
| 6 |
% LaTeX Project Public License, either version 1.3c of this license. |
| 7 |
% حقوق الملكية الفكرية محفوظة للأستاذ ناعم محمد - الجزائر. |
| 8 |
% --------------------------------------------------------------------------- |
| 9 |
% \fi |
| 10 |
% |
| 11 |
% \iffalse |
| 12 |
%<*driver> |
| 13 |
\ProvidesFile{na-cover.dtx} |
| 14 |
\documentclass{ltxdoc} |
| 15 |
\usepackage{na-cover} |
| 16 |
\usepackage[explicit]{titlesec} |
| 17 |
\usepackage{xcolor,tikz,geometry,eso-pic,polyglossia} |
| 18 |
\usetikzlibrary{calc,backgrounds,positioning,decorations.markings,shapes.geometric} |
| 19 |
\geometry{left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm} |
| 20 |
\setmainlanguage[numerals=maghrib,locale=algeria]{arabic} |
| 21 |
\setotherlanguage{english} |
| 22 |
\newfontfamily\arabicfont[Script=Arabic,Scale=1.2]{Arial} |
| 23 |
\newfontfamily\na[Script=Arabic,Scale=1.2]{Arial} |
| 24 |
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.2]{Arial} |
| 25 |
\renewcommand{\thesection}{\arabic{section}} |
| 26 |
\titleformat{\section} |
| 27 |
{\bf\Large\sffamily} |
| 28 |
{\begin{tikzpicture}[baseline=(a.base)] |
| 29 |
\node[text=white,scale=1,anchor=east,draw=blue!50!black, |
| 30 |
fill=red!50!black,rounded corners=1pt] (a) {\thesection}; |
| 31 |
\node [text=black,anchor=east] at (a.west) (2){\large\textarabic{\bf\sffamily #1}}; |
| 32 |
\end{tikzpicture}} |
| 33 |
{0pt}{} |
| 34 |
\titleformat{\subsection} |
| 35 |
{\bf} |
| 36 |
{\begin{tikzpicture}[baseline=(a.base)] |
| 37 |
\node[text=white,scale=1,anchor=east,draw=blue!50!black, |
| 38 |
fill=blue!50!black,rounded corners=1pt] (a) {\thesubsection}; |
| 39 |
\node [text=black,anchor=east] at (a.west) (2){\large\textarabic{\bf\sffamily #1}}; |
| 40 |
\end{tikzpicture}} |
| 41 |
{0pt}{} |
| 42 |
\setnonlatin |
| 43 |
\definecolor{Navy}{RGB}{0,0,128} |
| 44 |
\EnableCrossrefs |
| 45 |
\CodelineIndex |
| 46 |
\RecordChanges |
| 47 |
\AddToShipoutPictureBG{ |
| 48 |
\begin{tikzpicture}[remember picture,overlay] |
| 49 |
\ifodd\value{page} |
| 50 |
\fill[Navy!40] (current page.north east) rectangle ([xshift=-1.5cm]current page.south east); |
| 51 |
\draw[Navy!40, line width=1pt] ([xshift=-1.5cm]current page.north east) -- ([xshift=-1.5cm]current page.south east); |
| 52 |
\node[rotate=-90, text=white, font=\sffamily\bfseries\Large] |
| 53 |
at ([xshift=-0.75cm]current page.east) {na-cover package \quad --- \quad v1.0}; |
| 54 |
\else |
| 55 |
\fill[Navy!40] (current page.north west) rectangle ([xshift=1.5cm]current page.south west); |
| 56 |
\draw[Navy!40, line width=1pt] ([xshift=1.5cm]current page.north west) -- ([xshift=1.5cm]current page.south west); |
| 57 |
\node[rotate=90, text=white, font=\sffamily\bfseries\Large] |
| 58 |
at ([xshift=0.75cm]current page.west) {na-cover package \quad --- \quad v1.0}; |
| 59 |
\fi |
| 60 |
\end{tikzpicture}} |
| 61 |
\tikzstyle{a}=[text width=\textwidth-1cm, rectangle,draw,line width=1pt,fill=white,minimum width=\textwidth, align=center,inner ysep=1cm,rounded corners=2pt] |
| 62 |
\newcommand\boxtitle[1]{% |
| 63 |
\begin{center} |
| 64 |
\begin{tikzpicture} |
| 65 |
\scoped[on background layer]{\node[a](1){#1};} |
| 66 |
\node[inner xsep=4mm,anchor=south east,text=black] (2) at ([shift={(-0.7cm,0mm)}]1.south east) {\small\textarabic{الأستاذ ناعم محمد}}; |
| 67 |
\scoped[on background layer]{% |
| 68 |
\path[draw=black,fill=gray] ([yshift=0mm,xshift=-3mm]2.south west) arc(180:360:1mm) ([yshift=0mm,xshift=1mm]2.south east) arc(180:360:1mm); |
| 69 |
\path[draw=black,fill=white] ([xshift=-2mm,yshift=-1mm]2.south west) -- ([xshift=2mm,yshift=-1mm]2.south east) [rounded corners=1.5mm]-- ([xshift=1mm,yshift=-1mm]2.south east) -- (2.north east) -- (2.north west) -- ([xshift=-1mm,yshift=-1mm]2.south west) [sharp corners]-- cycle;} |
| 70 |
\node[inner xsep=4mm,anchor=south west,text=black] (3) at ([shift={(0.7cm,0mm)}]1.south west) |
| 71 |
{\small\textarabic{ حزمة لصناعة واجهات مذكرات تخرج}}; |
| 72 |
\scoped[on background layer]{% |
| 73 |
\path[draw=black,fill=gray] ([yshift=0mm,xshift=-3mm]3.south west) arc(180:360:1mm) ([yshift=0mm,xshift=1mm]3.south east) arc(180:360:1mm); |
| 74 |
\path[draw=black,fill=white] ([xshift=-2mm,yshift=-1mm]3.south west) -- ([xshift=2mm,yshift=-1mm]3.south east) [rounded corners=1.5mm]-- ([xshift=1mm,yshift=-1mm]3.south east) -- (3.north east) -- (3.north west) -- ([xshift=-1mm,yshift=-1mm]3.south west) [sharp corners]-- cycle;} |
| 75 |
\end{tikzpicture} |
| 76 |
\end{center}} |
| 77 |
\newcommand{\previewcover}[2]{% |
| 78 |
\noindent |
| 79 |
\begin{tikzpicture}[baseline=(char.base)] |
| 80 |
\node(char) [draw=#2, line width=1pt, inner sep=15pt, text width=8.5cm, align=center, rounded corners=2pt] |
| 81 |
{\Large \texttt{\textbackslash nacover\{#1\}\{#2\}}}; |
| 82 |
\begin{scope}[color=#2, scale=0.22] |
| 83 |
\csname na\ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\fi\endcsname{([shift={(0.8,0.8)}]char.south west)}{1} |
| 84 |
\csname na\ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\fi\endcsname{([shift={(-0.8,0.8)}]char.south east)}{1} |
| 85 |
\csname na\ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\fi\endcsname{([shift={(0.8,-0.8)}]char.north west)}{1} |
| 86 |
\csname na\ifcase#1\or A\or B\or C\or D\or E\or F\or G\or H\or I\or J\or K\or L\fi\endcsname{([shift={(-0.8,-0.8)}]char.north east)}{1} |
| 87 |
\end{scope} |
| 88 |
\end{tikzpicture}\\[0.6cm]} |
| 89 |
\begin{document} |
| 90 |
\OnlyDescription % <--- هذا السطر هو التعديل الوحيد: يمنع ظهور صفحة الأكواد الأخيرة |
| 91 |
\DocInput{na-cover.dtx} |
| 92 |
\end{document} |
| 93 |
%</driver> |
| 94 |
% \fi |
| 95 |
% |
| 96 |
%\title{\boxtitle{\Huge\bfseries na-cover\\[0.4cm]\large\textarabic{ حزمة لتنسيق المجلات التربوية}}} |
| 97 |
%\author{} \date{} |
| 98 |
%\maketitle |
| 99 |
% |
| 100 |
%\section{مقدمة وتوافقية المعالجة} |
| 101 |
%\selectlanguage{arabic} |
| 102 |
%بسم الله الرحمن الرحيم. نضع بين أيدي الأساتذة الكرام هذه الحزمة لتسهيل تصميم المجلات.\\ |
| 103 |
%\textbf{ملاحظة هامة:}\\ |
| 104 |
%هذه الحزمة متوافقة تماماً مع جميع المعالجات: \texttt{pdfLaTeX}, \texttt{XeLaTeX}, و \texttt{LuaLaTeX}. |
| 105 |
% |
| 106 |
%\section{كيفية الاستخدام وتغيير الواجهة} |
| 107 |
%\noindent\textbf{ملاحظة هامة:} \\ |
| 108 |
%للحصول على واجهة مختلفة في كل صفحة، يجب استخدام الأمر التالي لمسح الواجهة السابقة: |
| 109 |
% |
| 110 |
%\texttt{\textbackslash ClearShipoutPictureBG} |
| 111 |
% |
| 112 |
%\section{تعليمات الواجهات المتاحة} |
| 113 |
%\selectlanguage{english} |
| 114 |
% |
| 115 |
%\previewcover{1}{red} |
| 116 |
%\previewcover{2}{blue} |
| 117 |
%\previewcover{3}{OliveGreen} |
| 118 |
%\previewcover{4}{Orange} |
| 119 |
%\previewcover{5}{Purple} |
| 120 |
%\previewcover{6}{Cyan} |
| 121 |
%\previewcover{7}{Magenta} |
| 122 |
%\previewcover{8}{Brown} |
| 123 |
%\previewcover{9}{Teal} |
| 124 |
%\previewcover{10}{NavyBlue} |
| 125 |
%\previewcover{11}{Violet} |
| 126 |
%\previewcover{12}{ForestGreen} |
| 127 |
% |
| 128 |
% \StopEventually{\PrintIndex \PrintChanges} |
| 129 |
% |
| 130 |
% \iffalse |
| 131 |
%<*package> |
| 132 |
% \fi |
| 133 |
% \begin{macrocode} |
| 134 |
\NeedsTeXFormat{LaTeX2e} |
| 135 |
\ProvidesPackage{na-cover}[2026/05/11 Custom Artistic Page] |
| 136 |
\RequirePackage[dvipsnames]{xcolor} |
| 137 |
\RequirePackage{tikz} |
| 138 |
\RequirePackage{eso-pic} |
| 139 |
\usetikzlibrary{calc,shapes.geometric,backgrounds} |
| 140 |
\newcommand{\naA}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \r in {0, 22.5, 45, 67.5} {\draw[line width=0.8pt, rotate=\r] (-1.1,-1.1) rectangle (1.1,1.1);} \draw[line width=1.2pt, fill=white] (0,0) circle (0.55); \fill (0,0) circle (0.2); \end{scope}} |
| 141 |
\newcommand{\naB}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 45, ..., 315} { \begin{scope}[rotate=\a] \draw[line width=1.1pt] (0.2,0) to[out=45, in=135] (1.5,0) to[out=-135, in=-45] (0.2,0); \fill (1.5,0) circle (1.8pt); \end{scope} } \draw[line width=1.3pt] (0,0) circle (0.5); \end{scope}} |
| 142 |
\newcommand{\naC}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 60, ..., 300} { \begin{scope}[rotate=\a] \draw[line width=1.1pt] (0.2,0) -- (0.8,0.35) -- (1.5,0) -- (0.8,-0.35) -- cycle; \fill (1.5,0) circle (2pt); \end{scope} } \draw[line width=1.2pt] (0,0) circle (0.5); \end{scope}} |
| 143 |
\newcommand{\naD}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 30, ..., 330} {\draw[line width=1pt] (\a:1.2) -- (\a+30:1.2); \fill (\a:1.2) circle (1.5pt);} \foreach \a in {0, 45, ..., 315} {\draw[line width=0.8pt, opacity=0.7, rotate=\a] (0.6,0) circle (0.6);} \fill (0,0) circle (0.3); \end{scope}} |
| 144 |
\newcommand{\naE}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 10, ..., 350} {\draw[line width=0.2pt, opacity=0.2] (0,0) -- (\a:1.6);} \foreach \a in {0, 60, ..., 300} { \begin{scope}[rotate=\a] \draw[line width=1.1pt] (0.2,0) -- (0.8,0.35) -- (1.5,0) -- (0.8,-0.35) -- cycle; \draw[line width=0.5pt, opacity=0.7] (0.3,0) -- (0.8,0.2) -- (1.3,0) -- (0.8,-0.2) -- cycle; \fill (1.5,0) circle (2pt); \end{scope} } \draw[line width=1.2pt] (0,0) circle (0.5); \fill (0,0) circle (0.3); \end{scope}} |
| 145 |
\newcommand{\naF}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \r in {0, 45, ..., 135} {\draw[line width=1pt, rotate=\r, opacity=0.7] (0,0) ellipse (1.5 and 0.4);} \foreach \s in {0.3, 0.6} {\draw[line width=1.2pt] (0,0) circle (\s);} \foreach \a in {0, 60, ..., 300} {\fill (\a:1) circle (2pt); \draw[white, line width=0.5pt] (\a:1) circle (2pt);} \fill (0,0) circle (0.15); \end{scope}} |
| 146 |
\newcommand{\naG}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 15, ..., 345} { \draw[line width=0.2pt, opacity=0.3] (0,0) -- (\a:1.8); \fill (\a:1.8) circle (0.7pt); } \foreach \r in {0, 45} { \draw[line width=1.2pt, rotate=\r, rounded corners=2pt] (-1.2,-1.2) rectangle (1.2,1.2); } \foreach \a in {22.5, 67.5, ..., 337.5} { \begin{scope}[rotate=\a] \draw[line width=1pt] (0.4,0) -- (1,0.4) -- (1.6,0) -- (1,-0.4) -- cycle; \fill (1.6,0) circle (2.2pt); \fill[white] (1.6,0) circle (1pt); \end{scope} } \draw[line width=1.5pt, fill=white] (0,0) circle (0.7); \node[regular polygon, regular polygon sides=6, draw, line width=1pt, minimum size=0.8cm] at (0,0) {}; \fill (0,0) circle (0.15); \end{scope}} |
| 147 |
\newcommand{\naH}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \r in {0, 45} { \draw[line width=1.3pt, rotate=\r] (-1,-1) rectangle (1,1); \draw[line width=0.5pt, opacity=0.5, rotate=\r] (-0.7,-0.7) rectangle (0.7,0.7); } \draw[line width=1pt] (0,0) circle (0.4); \foreach \a in {0, 90, 180, 270} { \draw[line width=1.5pt] (\a:0.4) -- (\a:0.6); } \foreach \x in {-1, 1} { \foreach \y in {-1, 1} { \fill (\x,\y) circle (2.5pt); \draw[white, line width=0.6pt] (\x,\y) circle (2.5pt); } } \end{scope}} |
| 148 |
\newcommand{\naI}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 15, ..., 345} { \draw[line width=0.4pt, opacity=0.4] (0,0) -- (\a:1.4); } \foreach \r in {0, 45} { \draw[line width=1.2pt, rotate=\r] (-1,-1) rectangle (1,1); \draw[line width=0.5pt, opacity=0.6, rotate=\r] (-1.1,-1.1) rectangle (1.1,1.1); } \foreach \a in {0, 90, 180, 270} { \draw[line width=0.8pt, rotate=\a] (1,1) arc (0:180:0.3); \draw[line width=0.8pt, rotate=\a] (1,-1) arc (0:-180:0.3); } \draw[line width=1.5pt, fill=white] (0,0) circle (0.6); \fill (0,0) circle (0.15); \end{scope}} |
| 149 |
\newcommand{\naJ}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 30, ..., 330} { \draw[line width=0.2pt, opacity=0.3] (0,0) -- (\a:1.8); } \foreach \a in {0, 45, ..., 315} { \begin{scope}[rotate=\a] \draw[line width=1.1pt] (0.2,0) to[out=45, in=135] (1.5,0) to[out=-135, in=-45] (0.2,0); \draw[line width=0.5pt, opacity=0.6] (0.4,0) to[out=30, in=150] (1.2,0); \fill (1.5,0) circle (2pt); \fill[white] (1.5,0) circle (0.8pt); \end{scope} } \foreach \a in {22.5, 67.5, ..., 337.5} { \draw[line width=0.8pt, opacity=0.7] (\a:0.6) -- (\a:1.1) -- (\a+22.5:0.8) -- cycle; } \draw[line width=1.3pt] (0,0) circle (0.5); \fill[white] (0,0) circle (0.05); \end{scope}} |
| 150 |
\newcommand{\naK}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \a in {0, 10, ..., 350} { \draw[line width=0.3pt, opacity=0.3] (0,0) -- (\a:1.6); \fill (\a:1.6) circle (0.6pt); } \foreach \r in {0, 22.5, 45, 67.5} { \draw[line width=1pt, rotate=\r] (-1.2,-1.2) rectangle (1.2,1.2); \draw[line width=0.4pt, opacity=0.5, rotate=\r] (-1.3,-1.3) rectangle (1.3,1.3); } \foreach \a in {0, 45, ..., 315} { \draw[line width=0.7pt, opacity=0.8, rotate=\a] (0.7,0) circle (0.5); \fill (\a:1.2) circle (2pt); \fill[white] (\a:1.2) circle (1pt); } \draw[line width=1.5pt, fill=white] (0,0) circle (0.65); \foreach \a in {0, 30, ..., 330} { \draw[line width=0.6pt] (0,0) -- (\a:0.65); \node[regular polygon, regular polygon sides=6, draw, scale=0.4, rotate=\a] at (\a:0.45) {}; } \fill (0,0) circle (0.25); \draw[white, line width=0.8pt] (0,0) circle (0.12); \end{scope}} |
| 151 |
\newcommand{\naL}[2]{\begin{scope}[shift={#1}, scale=#2] \foreach \r in {0.5, 1.0, 1.5} { \draw[line width=0.2pt, opacity=0.3] (0,0) circle (\r); } \foreach \r in {0, 22.5} { \draw[line width=1.3pt, rotate=\r] (0:1.6) -- (45:1.6) -- (90:1.6) -- (135:1.6) -- (180:1.6) -- (225:1.6) -- (270:1.6) -- (315:1.6) -- cycle; } \foreach \a in {0, 45, ..., 315} { \begin{scope}[rotate=\a] \draw[line width=0.8pt] (0.3,0) -- (1.1,0.2) -- (1.5,0) -- (1.1,-0.2) -- cycle; \foreach \x in {0.5, 0.7, 0.9} { \draw[line width=0.2pt, opacity=0.5] (\x, 0.1) -- (\x+0.2, -0.1); } \fill (1.5,0) circle (1.8pt); \fill[white] (1.5,0) circle (0.8pt); \end{scope} } \draw[line width=1.5pt, fill=white] (0,0) circle (0.55); \foreach \a in {0, 15, ..., 345} { \draw[line width=0.5pt] (\a:0.45) -- (\a:0.55); } \node[star, star points=6, star point ratio=0.5, draw, fill=., scale=0.6] at (0,0) {}; \fill[white] (0,0) circle (0.08); \end{scope}} |
| 152 |
\newcommand{\naname}[1]{\ifcase#1\or naA\or naB\or naC\or naD\or naE\or naF\or naG\or naH\or naI\or naJ\or naK\or naL\fi} |
| 153 |
\newcommand{\nacover}[2]{% |
| 154 |
\AddToShipoutPictureBG*{% |
| 155 |
\begin{tikzpicture}[remember picture,overlay] |
| 156 |
\draw[line width=2.5pt, #2] ([shift={(0.75cm,-0.75cm)}]current page.north west) rectangle ([shift={(-0.75cm,0.75cm)}]current page.south east); |
| 157 |
\expandafter\let\expandafter\tempna\csname\naname{#1}\endcsname |
| 158 |
\begin{scope}[color=#2] |
| 159 |
\tempna{([shift={(1.25cm,-1.65cm)}]current page.north west)}{0.28} |
| 160 |
\tempna{([shift={(-1.25cm,-1.65cm)}]current page.north east)}{0.28} |
| 161 |
\tempna{([shift={(1.25cm,1.45cm)}]current page.south west)}{0.28} |
| 162 |
\tempna{([shift={(-1.25cm,1.45cm)}]current page.south east)}{0.28} |
| 163 |
\end{scope} |
| 164 |
\foreach \i in {0, 0.28cm} { |
| 165 |
\draw[line width=1pt, #2] ([shift={(1.55cm+\i, -1.45cm-\i)}]current page.north west) -- ([shift={(-1.55cm-\i, -1.45cm-\i)}]current page.north east); |
| 166 |
\draw[line width=1pt, #2] ([shift={(1.55cm+\i, 1.25cm+\i)}]current page.south west) -- ([shift={(-1.55cm-\i, 1.25cm+\i)}]current page.south east); |
| 167 |
\draw[line width=1pt, #2] ([shift={(1.05cm+\i, -1.95cm-\i)}]current page.north west) -- ([shift={(1.05cm+\i, 1.75cm+\i)}]current page.south west); |
| 168 |
\draw[line width=1pt, #2] ([shift={(-1.05cm-\i, -1.95cm-\i)}]current page.north east) -- ([shift={(-1.05cm-\i, 1.75cm+\i)}]current page.south east);} |
| 169 |
\foreach \x in {0.2, 0.4, 0.6, 0.8} { |
| 170 |
\fill[#2, opacity=0.6] ($(current page.north west)!\x!(current page.north east) + (0,-1.05cm)$) circle (1.5pt); |
| 171 |
\fill[#2, opacity=0.6] ($(current page.south west)!\x!(current page.south east) + (0,0.95cm)$) circle (1.5pt);} |
| 172 |
\end{tikzpicture}}} |
| 173 |
% \end{macrocode} |
| 174 |
% \iffalse |
| 175 |
%</package> |
| 176 |
% \fi |
| 177 |
% \Finale |
| 178 |
\endinput |