template updated to 2026 latex

This commit is contained in:
Master 2026-06-09 23:44:35 +03:30
parent 66ab567227
commit 2f55473027
6 changed files with 29 additions and 15 deletions

BIN
Assets/Font/times.ttf Normal file

Binary file not shown.

BIN
Assets/Font/timesbd.ttf Normal file

Binary file not shown.

BIN
Assets/Font/timesbi.ttf Normal file

Binary file not shown.

BIN
Assets/Font/timesi.ttf Normal file

Binary file not shown.

View File

@ -8,7 +8,7 @@
\newcommand{\DocTitle}{عنوان اصلی و کامل برای مستندات پروژه}
\newcommand{\DocHeaderTitle}{عنوان کوتاه مستند}
\newcommand{\DocSubtitle}{توضیحات کوتاه یا زیرعنوان مستند}
\newcommand{\DocVersion}{1.0.3}
\newcommand{\DocVersion}{2.0.0}
\newcommand{\DocID}{\lr{[DOC-PRJ-01]}}
\newcommand{\DocDate}{\today} % می‌توانید تاریخ دستی بنویسید مثل: 1403/08/02

View File

@ -54,8 +54,8 @@
% --- Main Text Font ---
\settextfont[Path=Assets/Font/, Extension=.ttf, BoldFont=BNazanin-Bold]{BNazanin}
% --- Fix English Text ---
\setlatintextfont{Times New Roman} % You can also use Arial or Calibri
% --- Fix English Text (Local Font Bypass) ---
\setlatintextfont[Path=Assets/Font/, Extension=.ttf, BoldFont=timesbd, ItalicFont=timesi, BoldItalicFont=timesbi]{times}
% --- Custom Font Definitions ---
\defpersianfont\vazirfont[Path=Assets/Font/, Extension=.ttf, BoldFont=Vazirmatn-Bold]{Vazirmatn-Regular}
@ -190,21 +190,16 @@
% Using \AtBeginDocument ensures these headers can read variables (like \DocVersion) defined in main.tex
\AtBeginDocument{
\fancyhead[LO]{%
\hspace{1.8cm}%
\llap{\smash{\raisebox{-0.75cm}{\includegraphics[height=1.2cm]{logo.png}}}\hspace{0.3cm}}
\textcolor{primary}{\nazaninfont\textbf{\DocHeaderTitle}}
}
\fancyhead[RE]{%
\textcolor{primary}{\nazaninfont\textbf{\DocHeaderTitle}}
\rlap{\hspace{0.3cm}\smash{\raisebox{-0.75cm}{\includegraphics[height=1.2cm]{logo.png}}}}
\hspace{1.8cm}%
}
\fancyhead[RO]{\textcolor{gray}{نسخه \lr{\DocVersion}}}
\fancyhead[LE]{\textcolor{gray}{نسخه \lr{\DocVersion}}}
% Clear all default headers to prevent ghosting
\fancyhead[LO]{}
\fancyhead[RE]{}
\fancyhead[RO]{}
\fancyhead[LE]{}
\fancyfoot[C]{\textcolor{gray}{صفحه \thepage}}
\fancyhead[C]{%
% 1. Draw the Background Shapes
\ifModernShapes
\pgfmathtruncatemacro{\pagecycle}{mod(int((\value{page}-1)/2), 2)}
\ifnum\pagecycle=0
@ -213,6 +208,25 @@
\ifodd\value{page} \OddPageShapesB \else \EvenPageShapesB \fi
\fi
\fi
% 2. Draw the Text and Logo securely tied to the physical margins
\ifodd\value{page}%
% ODD PAGE: Shapes are on the RIGHT. Gap is on the RIGHT (1.8cm).
\makebox[\headwidth][s]{%
{\makebox[1.8cm][c]{\smash{\raisebox{-0.75cm}{\includegraphics[height=1.2cm]{logo.png}}}}%
\textcolor{primary}{\nazaninfont\textbf{\DocHeaderTitle}}}%
\hfill
{\textcolor{gray}{نسخه \lr{\DocVersion}}}%
}%
\else
% EVEN PAGE: Shapes are on the LEFT. Gap is on the LEFT (1.8cm).
\makebox[\headwidth][s]{%
{\textcolor{gray}{نسخه \lr{\DocVersion}}}%
\hfill
{\textcolor{primary}{\nazaninfont\textbf{\DocHeaderTitle}}%
\makebox[1.8cm][c]{\smash{\raisebox{-0.75cm}{\includegraphics[height=1.2cm]{logo.png}}}}}%
}%
\fi
}
}