Skip to content

Commit

Permalink
Update template colors and font
Browse files Browse the repository at this point in the history
  • Loading branch information
AisjaThijssen committed Apr 28, 2023
1 parent 4cd0826 commit 57801a3
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 36 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ following command to install this format:
quarto install extension AisjaThijssen/uvt-quarto-letter
```

## Adding Lato font to your LateX distribution

Download the font from google https://fonts.google.com/specimen/Lato and
add the folder to the fonts folder in your local latex distribution.

## Example

<div>
Expand Down
8 changes: 6 additions & 2 deletions README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ library(quarto)
library(magick)
# Render template
fs::dir_copy("_extensions/letter", "_extensions/numbats/letter")
fs::dir_copy("_extensions/letter", "_extensions/AisjaThijssen/letter")
quarto_render(input = "template.qmd")
fs::dir_delete("_extensions/numbats")
fs::dir_delete("_extensions/AisjaThijssen")
# Convert rendered PDF to PNG
image_read_pdf("template.pdf", pages = 1) |>
image_montage(geometry = "x500+25+35", tile = 1, bg = "grey92", shadow = TRUE) |>
Expand Down Expand Up @@ -48,6 +48,10 @@ From the quarto project or document directory, run the following command to inst
quarto install extension AisjaThijssen/uvt-quarto-letter
```

## Adding Lato font to your LateX distribution

Download the font from google https://fonts.google.com/specimen/Lato and add the folder to the fonts folder in your local latex distribution.

## Example

[![](examples/template.png)](examples/template.pdf)
Binary file modified _extensions/letter/uvt2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 17 additions & 34 deletions _extensions/letter/uvtletter.tex
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
\documentclass[$if(fontsize)$$fontsize$$else$11pt$endif$,a4paper,$for(classoption)$$classoption$$sep$,$endfor$]{letter}
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
\usepackage{bera}
$endif$
$if(linestretch)$
\usepackage{setspace}
\setstretch{$linestretch$}
$endif$

\usepackage[default]{lato}

\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
Expand Down Expand Up @@ -170,7 +163,7 @@
\fi
$endif$

\usepackage{color,hyperref,url,fontawesome}
\usepackage{color,xcolor,hyperref,url,fontawesome}
\urlstyle{same} % don't use monospace font for urls
\usepackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
Expand All @@ -179,36 +172,26 @@
\makeatletter
\def\ps@uvt{%
\begin{textblock}{5}(2,1)
\includegraphics[height=1.5cm]{_extensions/numbats/letter/uvt2}
\includegraphics[height=2cm]{$logo$}
\end{textblock}%
%\begin{textblock}{4}(17,1)
%\includegraphics[height=1.5cm]{_extensions/numbats/letter/MBSportrait}
%\end{textblock}%
\begin{textblock}{10}(1.2,26.4)
{\fontsize{9}{8}\selectfont\sffamily\color[gray]{0.4}%
\begin{tabular}{@{}l@{}}
\begin{textblock}{8}(11,1.5)
{\fontsize{9}{8}\selectfont\sffamily\color[HTML]{003466}%
\begin{flushright}
\textbf{$fromname$}, $fromqualifications$\\
$fromtitle$\\
$fromdepartment$\\[0.15cm]
\faicon{envelope} $fromemail$\quad\faicon{phone} $fromphone$\quad
\faicon{home} $fromWWW$\\[0.1cm]

\faicon{envelope} $fromemail$\\
\faicon{phone} $fromphone$\\
\faicon{home} $fromWWW$\\
\end{flushright}}
\end{textblock}%
\begin{textblock}{18}(1.5,27)
{\fontsize{9}{8}\selectfont\sffamily\color[gray]{0.4}%
\centering
P.O. Box 90153 \textbullet 5000 LE Tilburg \textbullet The Netherlands \textbullet Visiting address \textbullet Warandelaan 2 \textbullet Tilburg \textbullet Telephone +31 13 466 91 11\\
IBAN NL74ABNA0602142539 \textbullet BIC ABNANL2A \textbullet VAT NL002791250B01\\
www.tilburguniversity.edu\\

\end{tabular}}
www.tilburguniversity.edu\\}
\end{textblock}%
%\begin{textblock}{\textwidth}(0,0)
%{\fontsize{9}{8}\selectfont\sffamily\color[gray]{0.4}%
%\begin{center}
%P.O. Box 90153 \textbullet 5000 LE Tilburg \textbullet The Netherlands \textbullet Visiting address \textbullet Warandelaan 2 \textbullet Tilburg \textbullet %Telephone +31 13 466 91 11

%IBAN NL74ABNA0602142539 \textbullet BIC ABNANL2A \textbullet VAT NL002791250B01

%www.tilburguniversity.edu
%\end{center}
%\end{textblock}%
\def\thepage{}}


Expand Down Expand Up @@ -239,7 +222,7 @@

% Find signature file
% Other images include full path in case user sets graphicspath
\graphicspath{{_extensions/numbats/letter/}}
\graphicspath{{_extensions/AisjaThijssen/letter/}}

$for(header-includes)$
$header-includes$
Expand Down
Binary file modified examples/template.pdf
Binary file not shown.
Binary file modified examples/template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions template.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ fromemail: [email protected]
fromphone: +61 3 9905 5555
fromdepartment: Department of Econometrics \& Business Statistics
fromsignature: sigfile.png
logo: uvt2.png
toname: Helen of Troy
toaddress:
- University of Greece
Expand All @@ -17,6 +18,8 @@ spacing: 1.4
ps: |
PS: Lorem ipsum dolor sit amet, *consectetur* adipiscing elit.
format: letter-pdf
#fontsize: 11pt

---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin mollis dolor vitae tristique eleifend. Quisque non ipsum sit amet velit malesuada consectetur. Praesent vel facilisis leo. Sed facilisis varius orci, ut aliquam lorem malesuada in. Morbi nec purus at nisi fringilla varius non ut dui. Pellentesque bibendum sapien velit. Nulla purus justo, congue eget enim a, elementum sollicitudin eros. Cras porta augue ligula, vel adipiscing odio ullamcorper eu. In tincidunt nisi sit amet tincidunt tincidunt. Maecenas elementum neque eget dolor [egestas fringilla](http://example.com):
Expand Down

0 comments on commit 57801a3

Please sign in to comment.