Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • cis-templates/latex-letter
1 result
Show changes
Commits on Source (2)
\documentclass[11pt]{letter} \documentclass{strath-letter}
\usepackage{graphicx}
\usepackage[top=1.5cm]{geometry}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{roboto}% Font for departmental banner
% For draft watermarks
\usepackage[nostamp]{draftwatermark}%
\SetWatermarkText{Draft}
\SetWatermarkScale{8}
\signature{\vspace{-1.5cm}NAME HERE}
\address{\vspace{2cm} \\ Computer \& Information Sciences \\ University of Strathclyde \\ Livingstone Tower \\ 26 Richmond Street \\ Glasgow \\ G1 1XH}
%\date{DATE}
\begin{document} \usepackage{lipsum}
\begin{letter}{} % Correct faculty
\setkomavar{fromlogo}{\includegraphics[width=4cm]{strath_tab_sci.pdf}}
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}] % Change faculty colour here
\node[anchor=north east,xshift=-3cm,yshift=0.2cm]{\includegraphics[width=4cm]{strath_tab_sci.pdf}}; % \colorlet{fromdepartmentheader}{strath-faculty-hass}
\end{tikzpicture} % See the cls file for more.
\definecolor{scigreen}{RGB}{93,151,50}% Colours for departmental banner
\definecolor{strathgrey}{HTML}{6c757d}
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[anchor=north east,xshift=-8.5cm,yshift=-3.85cm]{\small\textsf{\color{white}\colorbox{strathgrey}{DEPARTMENT OF }\colorbox{scigreen}{ COMPUTER \& INFORMATION SCIENCES}}};
\end{tikzpicture}
\begin{tikzpicture}[remember picture,overlay,shift={(current page.south west)}]
\node[anchor=south west,xshift=3cm,yshift=1cm,align=left,text width=\textwidth]{\footnotesize{\color{darkgray}\textbf{The place of useful learning}\\ The University of Strathclyde is a charitable body, registered in Scotland, number SC015263.}};
\end{tikzpicture}
\setkomavar{fromdepartment}{Computer \& Information Sciences}
\setkomavar{fromdepartmentheader}{COMPUTER \& INFORMATION SCIENCES}
% This duplication is because komavar cannot be used with \uppercase{}
\opening{Dear X,} % \setkomavar{fromaddress}{...} f
% change for a different address
\setkomavar{fromname}{Dr. Joeseph Baggins}
\closing{Yours sincerely, }% \\\vspace{1cm} \includegraphics[width=2cm]{signature.jpg}} \setkomavar{fromjobtitle}{Lecturer}
\setkomavar{fromemail}{\email{Joeseph.Baggins@strath.ac.uk}}
% \setkomavar{fromphone}{...}
% if you want that available
%\setkomavar{photosig}{%
% \includegraphics[width=0.3\textwidth]{signature.pdf}%
%}
\end{letter}
\setkomavar{date}{\printdate{2022-02-15}}
\begin{document}
\begin{letter}
{%
\textbf{first line}\\
second \\
third
}
\setkomavar{subject}{Subject}
\opening{To whom it may concern;}
\lipsum[1-5]
\closing{Sincerely}
%\encl{}
\end{letter}
\end{document} \end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{strath-letter}[2023/09/08 v2023.09.08 strath-letter]
\LoadClass[a4paper]{scrlttr2}
\ProcessOptions{}
\RequirePackage[protrusion=true, expansion=true]{microtype}
\RequirePackage[british]{isodate}
\RequirePackage{scrlayer-scrpage}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage[british]{babel}
\RequirePackage{csquotes}
\RequirePackage{graphicx}
\RequirePackage{url}
\RequirePackage{xcolor}
\RequirePackage{relsize}
\RequirePackage{tabularx}
\RequirePackage{comment}
\RequirePackage{hyperref}
\RequirePackage{tgpagella}
\RequirePackage{helvet}
\RequirePackage{inconsolata}
\RequirePackage{tikz}
\RequirePackage{tikzpagenodes}
\RequirePackage{roboto}% Font for departmental banner
\definecolor{strath-corporate-main}{RGB/cmyk}{0,43,92/1.0,0.64,0,0.6}
\colorlet{strath-blue}{strath-corporate-main}
\definecolor{strath-corporate-secondary}{RGB/cmyk}{167,169,172/0.0,0.0,0.0,0.4}
\colorlet{strath-grey}{strath-corporate-secondary}
\definecolor{strath-faculty-engineering}{RGB/cmyk}{0,120,174/1.0,0.16,0.0,0.27}
\colorlet{strath-blue-light}{strath-faculty-engineering}
\definecolor{strath-faculty-science}{RGB/cmyk}{93,151,50/0.56,0.0,1.0,0.27}
\colorlet{strath-green}{strath-faculty-science}
\definecolor{strath-faculty-hass}{RGB/cmyk}{244,123,32/0.0,0.64,1.0,0}
\colorlet{strath-orange}{strath-faculty-hass}
\definecolor{strath-faculty-business}{RGB/cmyk}{238,50,36/0.0,0.95,1.0,0.0}
\colorlet{strath-red}{strath-faculty-business}
\definecolor{strath-web}{RGB/cmyk}{1,132,147/0.86,0.31,0.44,0.6}
\colorlet{strath-red}{strath-faculty-business}
\colorlet{fromdepartmentheader}{strath-green}
\newcommand{\email}[1]{\href{mailto:#1}{#1}}
\newkomavar[Computer Science \& Information Sciences]{fromdepartment}
\newkomavar[Computer Science \& Information Sciences]{fromdepartmentheader}
\newkomafont{fromdepartment}{\sffamily}
\newkomavar[Lecturer]{fromjobtitle}
\newkomafont{fromjobtitle}{\sffamily}
\newkomavar{strapline}
\setkomavar{strapline}{the place of useful learning}
\newkomafont{strapline}{\bfseries\sffamily}
\newkomavar{charityline}
\setkomavar{charityline}{The University of Strathclyde is a charitable body, registered in Scotland, charity number SC015263.}
\newkomafont{charityline}{\sffamily}
\setkomavar{fromaddress}{University of Strathclyde,\\ Glasgow, \\G1 1XH}
\newkomavar{photosig}
\setkomavar{photosig}{}
\newkomafont{sigfont}{\sffamily\bfseries}
% define the signature
\setkomavar{signature}
{%
\Ifkomavar{photosig}{%
\usekomavar{photosig}
\\%
}{}
\usekomafont{sigfont}\usekomavar{fromname}
}
\hypersetup{%
colorlinks=true
,linkcolor=strath-blue
,urlcolor=strath-blue
,citecolor=strath-blue
}
\linespread{1.05}
\renewcommand*{\raggedsignature}{\raggedright}
\@setplength{sigindent}{\parindent}
\@setplength{toaddrvpos}{0.2\paperheight}
\@setplength{refvpos}{\useplength{toaddrvpos}}
\@addtoplength{refvpos}{0.5\useplength{toaddrheight}}%
% \@setplength{refvpos}{\useplength{toaddrvpos}}
\@setplength{sigbeforevskip}{.2\baselineskip}
\@setplength{subjectbeforevskip}{1em}
\@setplength{subjectaftervskip}{0em}
\@setplength{firstfootvpos}{\paperheight}
\@addtoplength[-]{firstfootvpos}{30mm}
\addtokomafont{fromname}{\LARGE}
\setkomafont{fromaddress}{\sffamily}
\addtokomafont{subject}{\sffamily}
\addtokomafont{toname}{\sffamily}
\addtokomafont{toaddress}{\sffamily}
\cfoot{\thepage\ of \letterlastpage}
\KOMAoptions{%
fromphone=false,
fromfax=false,
fromemail=false,
subject=afteropening,
foldmarks=false,
backaddress=false,
fromlogo=on,
firstfoot=on,
firsthead=on,
addrfield=topaligned,
parskip=full,
fromemail=on,
fontsize=11pt,
pagenumber=false,
parskip=half-,
enlargefirstpage=true
}
\setkomavar*{enclseparator}{Attached}
\setkomavar{firsthead}{%
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[anchor=north east,xshift=-3cm,yshift=0.2cm]{\usekomavar{fromlogo}};
\end{tikzpicture}
\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[anchor=north east,xshift=-8.5cm,yshift=-3.85cm]
{\small%
\textsf{%
\color{white}%
\colorbox{strath-grey}{DEPARTMENT OF }%
\colorbox{fromdepartmentheader}{ {\usekomavar{fromdepartmentheader}}}%
}
};
\end{tikzpicture}
}%
\setkomavar{firstfoot}
{%
\hrule
\begin{center}
\smaller
\begin{minipage}[c]{0.33\linewidth}
\raggedright
\begin{tabular}{l}
\usekomafont{fromdepartment}\usekomavar{fromdepartment}
\\
\usekomafont{fromaddress}\usekomavar{fromaddress}
\\
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[c]{0.33\linewidth}
\raggedright
\begin{tabular}{l}
\usekomafont{sigfont}\usekomavar{fromname}
\\
\usekomafont{fromjobtitle}\usekomavar{fromjobtitle}
\\
\Ifkomavarempty{fromphone}{}{{\usekomavar{fromphone}}\\}%
\Ifkomavarempty{fromemail}{}{{\usekomavar{fromemail}}\\}
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[c]{0.33\linewidth}
\smaller
\raggedleft%
\noindent{\larger\usekomafont{strapline}\usekomavar{strapline}}\\[1em]
\noindent{\usekomafont{charityline}\usekomavar{charityline}}
\end{minipage}
\end{center}
}
\endinput