diff --git a/README.md b/README.md index dcc9d78..ded48c2 100644 --- a/README.md +++ b/README.md @@ -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
diff --git a/README.qmd b/README.qmd index 5619308..4c4541f 100644 --- a/README.qmd +++ b/README.qmd @@ -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) |> @@ -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) diff --git a/_extensions/letter/uvt2.png b/_extensions/letter/uvt2.png index b406253..2cf7a35 100644 Binary files a/_extensions/letter/uvt2.png and b/_extensions/letter/uvt2.png differ diff --git a/_extensions/letter/uvtletter.tex b/_extensions/letter/uvtletter.tex index ef926b0..d2b90ba 100644 --- a/_extensions/letter/uvtletter.tex +++ b/_extensions/letter/uvtletter.tex @@ -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 @@ -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} @@ -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{}} @@ -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$ diff --git a/examples/template.pdf b/examples/template.pdf index 298dc58..32ea5a2 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template.png b/examples/template.png index 26a1458..3475073 100644 Binary files a/examples/template.png and b/examples/template.png differ diff --git a/template.qmd b/template.qmd index 3270ffa..ccca4b5 100644 --- a/template.qmd +++ b/template.qmd @@ -7,6 +7,7 @@ fromemail: Pierre.Curie@monash.edu 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 @@ -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):