- Improve dark mode.
- Pass options to book class.
This commit is contained in:
32
Color.sty
32
Color.sty
@@ -1,8 +1,32 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesPackage{PrimeTeX/Color}[2025-07-09]
|
\ProvidesPackage{PrimeTeX/Color}[2025-07-09]
|
||||||
|
|
||||||
|
\RequirePackage{ifthen}
|
||||||
|
|
||||||
|
\newboolean{colorIsDarkMode}
|
||||||
|
\setboolean{colorIsDarkMode}{false}
|
||||||
|
|
||||||
|
\DeclareOption{darkmode}{
|
||||||
|
\setboolean{colorIsDarkMode}{true}
|
||||||
|
}
|
||||||
|
\ProcessOptions\relax
|
||||||
|
|
||||||
% Color import and definition
|
% Color import and definition
|
||||||
%#region
|
\RequirePackage{xcolor}
|
||||||
\RequirePackage{xcolor}
|
|
||||||
\definecolor{PrimeBlue}{RGB}{192,224,255}%{25,45,145}
|
\ifthenelse{\boolean{colorIsDarkMode}}{
|
||||||
%#endregion
|
\pagecolor[rgb]{0.2,0.2,0.2}
|
||||||
|
\color[rgb]{0.9,0.9,0.9}
|
||||||
|
|
||||||
|
\definecolor{pageColor}{rgb}{0.2,0.2,0.2}
|
||||||
|
\definecolor{paleGray}{rgb}{0.3,0.3,0.3}
|
||||||
|
|
||||||
|
\definecolor{PrimeBlue}{RGB}{149, 164, 237}
|
||||||
|
\definecolor{PrimePaleBlue}{RGB}{35, 39, 56}
|
||||||
|
}{
|
||||||
|
\colorlet{pageColor}{white}
|
||||||
|
\colorlet{paleGray}{gray!10}
|
||||||
|
|
||||||
|
\definecolor{PrimeBlue}{RGB}{25,45,145}
|
||||||
|
\definecolor{PrimePaleBlue}{RGB}{233,236,251}
|
||||||
|
}
|
||||||
34
Graphics.sty
34
Graphics.sty
@@ -1,46 +1,42 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesPackage{PrimeTeX/Graphics}[2025-07-09]
|
\ProvidesPackage{PrimeTeX/Graphics}[2025-07-09]
|
||||||
|
|
||||||
\RequirePackage{PrimeTeX/Layout}
|
\RequirePackage{PrimeTeX/Layout}
|
||||||
|
|
||||||
% Graphics package for including images
|
% Graphics package for including images
|
||||||
\RequirePackage{graphicx}
|
\RequirePackage{graphicx}
|
||||||
\RequirePackage[hypcap=true]{caption}
|
\RequirePackage[hypcap=true]{caption}
|
||||||
\RequirePackage{calc}
|
\RequirePackage{calc}
|
||||||
|
|
||||||
\newcommand{\ig}[2][0.5in]{
|
\newcommand{\ig}[2][0.5in]{
|
||||||
\includegraphics[keepaspectratio,width=#1]{#2}
|
\includegraphics[keepaspectratio,width=#1]{#2}
|
||||||
}
|
}
|
||||||
|
|
||||||
\newcommand{\cfig}[4]{%
|
\newcommand{\cfig}[4]{%
|
||||||
\begin{figure}[ht]%
|
\begin{figure}[ht]%
|
||||||
\centering%
|
\centering%
|
||||||
#4{#1}%
|
#4{#1}%
|
||||||
\caption{#3}%
|
\caption{#3}%
|
||||||
\label{fig:#2}%
|
\label{fig:#2}%
|
||||||
\end{figure}%
|
\end{figure}%
|
||||||
}
|
}
|
||||||
\newcommand{\centerfig}[3]{\cfig{#1}{#2}{#3}{\includegraphics}}
|
\newcommand{\centerfig}[3]{\cfig{#1}{#2}{#3}{\includegraphics}}
|
||||||
\newcommand{\centerfigw}[4][\textwidth]{
|
\newcommand{\centerfigw}[4][\textwidth]{
|
||||||
\cfig{#2}{#3}{#4}{
|
\cfig{#2}{#3}{#4}{
|
||||||
\includegraphics[keepaspectratio,width=#1]
|
\includegraphics[keepaspectratio,width=#1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
\newcommand{\bigfig}[4][\twoscreenshotmaxwidth]{%
|
\newcommand{\bigfig}[4][\twoscreenshotmaxwidth]{%
|
||||||
\bigfloat[#1]{figure}{htp}{%
|
\bigfloat[#1]{figure}{htp}{%
|
||||||
\captionsetup{type=figure}%
|
\captionsetup{type=figure}%
|
||||||
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
|
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
|
||||||
\centering\captionof{figure}{#4}\par%
|
\centering\captionof{figure}{#4}\par%
|
||||||
\label{fig:#3}%
|
\label{fig:#3}%
|
||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
|
|
||||||
% \RequirePackage{float}
|
\newcommand{\doublebigfig}[7][\twoscreenshotmaxwidth]{%
|
||||||
% \newfloat{fullpage}{htpb}{dbf}[chapter]
|
|
||||||
% \floatname{fullpage}{Figure}
|
|
||||||
|
|
||||||
\newcommand{\doublebigfig}[7][\twoscreenshotmaxwidth]{%
|
|
||||||
\bigfloat[#1]{figure}{p}{%
|
\bigfloat[#1]{figure}{p}{%
|
||||||
\captionsetup{type=figure}%
|
\captionsetup{type=figure}%
|
||||||
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
|
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
|
||||||
@@ -52,5 +48,5 @@
|
|||||||
\centering\captionof{figure}{#7}\par%
|
\centering\captionof{figure}{#7}\par%
|
||||||
\label{fig:#6}%
|
\label{fig:#6}%
|
||||||
}%
|
}%
|
||||||
}
|
}
|
||||||
%#endregion
|
%#endregion
|
||||||
|
|||||||
27
Manual.cls
27
Manual.cls
@@ -1,9 +1,30 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{PrimeTeX/Manual}[2025-07-09]
|
\ProvidesClass{PrimeTeX/Manual}[2025-07-09]
|
||||||
|
|
||||||
\LoadClass[letterpaper,openany,]{book}
|
\RequirePackage{ifthen}
|
||||||
|
|
||||||
\RequirePackage{PrimeTeX/Color}
|
\newboolean{isDarkMode}
|
||||||
|
\setboolean{isDarkMode}{false}
|
||||||
|
|
||||||
|
\DeclareOption{darkmode}{
|
||||||
|
\setboolean{isDarkMode}{true}
|
||||||
|
}
|
||||||
|
|
||||||
|
\DeclareOption{draft}{
|
||||||
|
\overfullrule = 1in
|
||||||
|
}
|
||||||
|
|
||||||
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
|
||||||
|
|
||||||
|
\ProcessOptions\relax
|
||||||
|
|
||||||
|
\LoadClass{book}
|
||||||
|
|
||||||
|
\ifthenelse{\boolean{isDarkMode}}{
|
||||||
|
\RequirePackage[darkmode]{PrimeTeX/Color}
|
||||||
|
}{
|
||||||
|
\RequirePackage{PrimeTeX/Color}
|
||||||
|
}
|
||||||
|
|
||||||
\RequirePackage{PrimeTeX/CrossRef}
|
\RequirePackage{PrimeTeX/CrossRef}
|
||||||
|
|
||||||
@@ -28,5 +49,3 @@
|
|||||||
\RequirePackage{PrimeTeX/Tables}
|
\RequirePackage{PrimeTeX/Tables}
|
||||||
|
|
||||||
\RequirePackage{PrimeTeX/TitlePage}
|
\RequirePackage{PrimeTeX/TitlePage}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user