forked from UCL/ucl-letter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ucl.lco
executable file
·89 lines (74 loc) · 2.76 KB
/
ucl.lco
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\ProvidesFile{ucl.lco}[2020/12/21 UCL A4 template (Updated Brooks Paige)] % 2013/05/06 UCL letter template (Simon Byrne)]
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{parskip}
\RequirePackage{tikz}
\RequirePackage{helvet}
\RequirePackage[UKenglish]{babel}
\renewcommand{\familydefault}{\sfdefault}
\KOMAoptions{fontsize=10pt}
\KOMAoptions{foldmarks=false}
% Use larger DIV for full-width body text
%\KOMAoptions{DIV=15,BCOR=-1.8mm}
%\KOMAoptions{DIV=27,BCOR=-1.8mm}
\@setplength{toaddrhpos}{1cm}
\@setplength{toaddrvpos}{3.3cm}
\@setplength{refvpos}{7cm}
% this needs to be set to a value < \paperwidth to avoid centering
\@setplength{firstheadvpos}{0cm}
\@setplength{firstheadhpos}{0cm}
\@setplength{firstheadwidth}{\paperwidth}
\@addtoplength{firstheadwidth}{2cm}
\@setplength{firstfootvpos}{\paperheight}
\@addtoplength{firstfootvpos}{-1cm}
\@setplength{firstfoothpos}{1cm}
\@setplength{firstfootwidth}{\paperwidth}
\@addtoplength{firstfootwidth}{-2cm}
\AtBeginLetter{%
\settoheight{\@tempdima}{\usekomavar{firstfoot}}%
\@addtoplength[-]{firstfootvpos}{\@tempdima}}
\newkomafont{headtitle}{\fontsize{10pt}{11pt}\color{white}\sffamily\bfseries}
\newkomafont{headsubtitle}{\color{white}\sffamily}
\setkomafont{fromaddress}{\fontsize{9pt}{10pt}\sffamily}
\newkomavar{headtitle}
\newkomavar{headsubtitle}
\setkomavar{firsthead}{%
\begin{tikzpicture}%
\node[anchor=north east, inner sep=0] (X) at (0,0){\includegraphics[width=21.03cm]{uclbanner-black.pdf}};%
\node[text width=80mm, anchor=north east, inner sep=0] (T) at (-12,-1){{\usekomafont{headtitle}{\usekomavar{headtitle}\\ \usekomavar{headsubtitle}}}};%
\end{tikzpicture}
% {\usekomafont{headtitle}\usekomavar{headtitle}\\}
% {\usekomafont{headsubtitle}\usekomavar{headsubtitle}\\}
% \noindent\hspace*{-\useplength{firstheadhpos}}%
% \includegraphics[width=\paperwidth]{uclbanner-outline.pdf}%
}
\setkomavar{firstfoot}{%
\parbox[b]{\useplength{firstfootwidth}}{
\raggedright
{\usekomafont{fromaddress}\usekomavar{fromaddress}
\ifkomavarempty{fromphone}{%
\ifkomavarempty{fromfax}{}{%
\\\usekomavar*{fromfax}\usekomavar{fromfax}%
}
}{%
\\\usekomavar*{fromphone}\usekomavar{fromphone}%
\ifkomavarempty{fromfax}{}{%
\quad\usekomavar*{fromfax}\usekomavar{fromfax}%
}
}%
\ifkomavarempty{fromemail}{}{%
\\\usekomavar{fromemail}%
}
\ifkomavarempty{fromurl}{}{%
\\\usekomavar{fromurl}%
}\\}}%
\ifkomavarempty{fromlogo}{}{\llap{\usekomavar{fromlogo}}}
}
%%% Change "Phone: " to "Tel: "
\providecaptionname{english}\phonename{Tel}%
\providecaptionname{british}\phonename{Tel}%
\providecaptionname{UKenglish}\phonename{Tel}%
%%% disable return address above recipient address
\KOMAoptions{backaddress=false}
%%% left-align signature
\renewcommand*{\raggedsignature}{\raggedright}