template updated to 2026 latex
This commit is contained in:
parent
66ab567227
commit
2f55473027
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -8,7 +8,7 @@
|
||||||
\newcommand{\DocTitle}{عنوان اصلی و کامل برای مستندات پروژه}
|
\newcommand{\DocTitle}{عنوان اصلی و کامل برای مستندات پروژه}
|
||||||
\newcommand{\DocHeaderTitle}{عنوان کوتاه مستند}
|
\newcommand{\DocHeaderTitle}{عنوان کوتاه مستند}
|
||||||
\newcommand{\DocSubtitle}{توضیحات کوتاه یا زیرعنوان مستند}
|
\newcommand{\DocSubtitle}{توضیحات کوتاه یا زیرعنوان مستند}
|
||||||
\newcommand{\DocVersion}{1.0.3}
|
\newcommand{\DocVersion}{2.0.0}
|
||||||
\newcommand{\DocID}{\lr{[DOC-PRJ-01]}}
|
\newcommand{\DocID}{\lr{[DOC-PRJ-01]}}
|
||||||
\newcommand{\DocDate}{\today} % میتوانید تاریخ دستی بنویسید مثل: 1403/08/02
|
\newcommand{\DocDate}{\today} % میتوانید تاریخ دستی بنویسید مثل: 1403/08/02
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,8 @@
|
||||||
|
|
||||||
% --- Main Text Font ---
|
% --- Main Text Font ---
|
||||||
\settextfont[Path=Assets/Font/, Extension=.ttf, BoldFont=BNazanin-Bold]{BNazanin}
|
\settextfont[Path=Assets/Font/, Extension=.ttf, BoldFont=BNazanin-Bold]{BNazanin}
|
||||||
% --- Fix English Text ---
|
% --- Fix English Text (Local Font Bypass) ---
|
||||||
\setlatintextfont{Times New Roman} % You can also use Arial or Calibri
|
\setlatintextfont[Path=Assets/Font/, Extension=.ttf, BoldFont=timesbd, ItalicFont=timesi, BoldItalicFont=timesbi]{times}
|
||||||
|
|
||||||
% --- Custom Font Definitions ---
|
% --- Custom Font Definitions ---
|
||||||
\defpersianfont\vazirfont[Path=Assets/Font/, Extension=.ttf, BoldFont=Vazirmatn-Bold]{Vazirmatn-Regular}
|
\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
|
% Using \AtBeginDocument ensures these headers can read variables (like \DocVersion) defined in main.tex
|
||||||
\AtBeginDocument{
|
\AtBeginDocument{
|
||||||
\fancyhead[LO]{%
|
% Clear all default headers to prevent ghosting
|
||||||
\hspace{1.8cm}%
|
\fancyhead[LO]{}
|
||||||
\llap{\smash{\raisebox{-0.75cm}{\includegraphics[height=1.2cm]{logo.png}}}\hspace{0.3cm}}
|
\fancyhead[RE]{}
|
||||||
\textcolor{primary}{\nazaninfont\textbf{\DocHeaderTitle}}
|
\fancyhead[RO]{}
|
||||||
}
|
\fancyhead[LE]{}
|
||||||
\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}}}
|
|
||||||
\fancyfoot[C]{\textcolor{gray}{صفحه \thepage}}
|
\fancyfoot[C]{\textcolor{gray}{صفحه \thepage}}
|
||||||
|
|
||||||
\fancyhead[C]{%
|
\fancyhead[C]{%
|
||||||
|
% 1. Draw the Background Shapes
|
||||||
\ifModernShapes
|
\ifModernShapes
|
||||||
\pgfmathtruncatemacro{\pagecycle}{mod(int((\value{page}-1)/2), 2)}
|
\pgfmathtruncatemacro{\pagecycle}{mod(int((\value{page}-1)/2), 2)}
|
||||||
\ifnum\pagecycle=0
|
\ifnum\pagecycle=0
|
||||||
|
|
@ -213,6 +208,25 @@
|
||||||
\ifodd\value{page} \OddPageShapesB \else \EvenPageShapesB \fi
|
\ifodd\value{page} \OddPageShapesB \else \EvenPageShapesB \fi
|
||||||
\fi
|
\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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue