forked from Dsek-LTH/dsekdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdsekpolicy.cls
34 lines (22 loc) · 845 Bytes
/
dsekpolicy.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%%% Document class for the policies of the D-guild
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{dsekpolicy}[2023/10/28]
\RequirePackage{expl3}
\ExplSyntaxOn
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{dsekparagraphed}}
\PassOptionsToClass{n}{dsekregdoc}
\ProcessOptions \relax
\LoadClass{dsekregdoc}
% Make the title of all policies start with "Policy för"
\RenewDocumentCommand \settitle { m } {
\tl_set:Nn \l_tmpa_tl { Policy~för~#1 }
\tl_set_eq:NN \g_dsek_title_tl \l_tmpa_tl
\hypersetup{pdftitle = { \tl_use:N \l_tmpa_tl }}
\title{ \tl_use:N \l_tmpa_tl }
}
% Since the redefined \settitle adds "Policy för", introduce a more intuitive,
% alternative command
\NewDocumentCommand \policyför { m } { \settitle{ #1 } }
\RenewDocumentCommand \maketitle {} {\section*{ \usetitle }}
\setshorttitle{Policy}
\ExplSyntaxOff