fix(latex): add draft watermark functionality with conditional loading
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
\documentclass{thesis}
|
\documentclass[draftmark]{thesis}
|
||||||
|
|
||||||
% Title Information
|
% Title Information
|
||||||
\setthesisinfo
|
\setthesisinfo
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class]
|
\ProvidesClass{thesis}[2025/05/10 Bachelor Thesis Class]
|
||||||
|
|
||||||
|
\newif\if@draftmark
|
||||||
|
\@draftmarkfalse
|
||||||
|
|
||||||
|
\DeclareOption{draftmark}{\@draftmarktrue}
|
||||||
|
\ProcessOptions \relax
|
||||||
\LoadClass[a4paper,12pt]{report}
|
\LoadClass[a4paper,12pt]{report}
|
||||||
|
|
||||||
% Load common packages
|
% Load common packages
|
||||||
@@ -15,6 +20,16 @@
|
|||||||
\RequirePackage{tocloft}
|
\RequirePackage{tocloft}
|
||||||
\RequirePackage{tocbibind}
|
\RequirePackage{tocbibind}
|
||||||
|
|
||||||
|
% Conditionally load the watermark package and settings
|
||||||
|
\if@draftmark
|
||||||
|
\RequirePackage{draftwatermark}
|
||||||
|
\SetWatermarkText{Draft: \today [wip]}
|
||||||
|
\SetWatermarkColor[gray]{0.7}
|
||||||
|
\SetWatermarkFontSize{2cm}
|
||||||
|
\SetWatermarkAngle{90}
|
||||||
|
\SetWatermarkHorCenter{1.5cm}
|
||||||
|
\fi
|
||||||
|
|
||||||
% Page layout
|
% Page layout
|
||||||
\geometry{left=3cm, top=3cm, right=3cm, bottom=3cm}
|
\geometry{left=3cm, top=3cm, right=3cm, bottom=3cm}
|
||||||
\setlength{\parskip}{0.5em}
|
\setlength{\parskip}{0.5em}
|
||||||
|
|||||||
Reference in New Issue
Block a user