templates/latex/letter/main.tex.erb
% =============================================================================
% File: <%= config[:name] %>.tex --
% Author(s): <%= config[:author] %> (<%= config[:mail] %>)
% Time-stamp: <Sat 2016-10-15 23:57 svarrette>
%
% Copyright (c) <%= Time.now.year %> <%= config[:author] %><Sebastien.Varrette@uni.lu>
%
% For more information:
% - LaTeX: http://www.latex-project.org/
% - LaTeX symbol list:
% http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
% =============================================================================
\documentclass[11pt,a4paper]{letter}
\usepackage{_style}
\usepackage{microtype} % Improves typography
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{fontawesome}
\graphicspath{{images/}} % Add this directory to the searched paths for graphics
% Create a new command for the horizontal rule in the document which allows thickness specification
\makeatletter
\def\vhrulefill#1{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
\makeatother
% ----------------------------------------------------------------------------------------
% DOCUMENT MARGINS
% ----------------------------------------------------------------------------------------
\textwidth 6.7in
\textheight 9.75in
\oddsidemargin -.25in
\evensidemargin -.25in
\topmargin -1in
\rightmargin 1in
\longindentation 0.50\textwidth
\parindent 0.4in
% ----------------------------------------------------------------------------------------
% SENDER INFORMATION
% ----------------------------------------------------------------------------------------
\def\Location{<%= config[:location] %>} % Location
\def\Who{<%= config[:author] %>} % Your name
\def\What{<%= config[:author_title] %>} % Your title
\def\Where{<%= config[:department] %> (<%= config[:department_acro] %>)} % Your department/institution
\def\Address{<%= config[:address] %>} % Your address
\def\CityZip{<%= config[:zipcode] %>, <%= config[:location] %>} % Your city, zip code, country, etc
\def\Email{\faEnvelopeO\ \texttt{\href{mailto:<%= config[:mail] %>}{<%= config[:mail] %>}}} % Your email address
\def\TEL{\faPhone\ <%= config[:phone] %>} % Your phone number
\def\URL{\faGlobe\ <%= config[:url] %>} % Your url
\def\LinkedIN{\href{https://www.linkedin.com/in/<%= config[:linkedin] %>}{\faLinkedin}}
\def\Twitter{\href{https://twitter.com/<%= config[:twitter] %>}{\faTwitter}}
\def\GoogleScholar{\href{https://scholar.google.com/citations?user=<%= config[:scholar] %>&hl=en}{\faGraduationCap}}
\def\Skype{\href{skype:<%= config[:skype] %>?chat}{\faSkype}}
% ----------------------------------------------------------------------------------------
% HEADER AND FROM ADDRESS STRUCTURE
% ----------------------------------------------------------------------------------------
\address{
\includegraphics[width=1in]{<%= config[:logo] %>} % Include the logo of your institution
\hspace{5.1in} % Position of the institution logo, increase to move left, decrease to move right
\vskip -1.07in~\\ % Position of the text in relation to the institution logo, increase to move down, decrease to move up
\Large\hspace{1.5in}\hfill ~\\[0.05in] % First line of institution name, adjust hspace if your logo is wide
\hspace{1.5in}\hfill \normalsize % Second line of institution name, adjust hspace if your logo is wide
\makebox[0ex][r]{\bf \Who, \What }\hspace{0.08in} % Print your name and title with a little whitespace to the right
~\\[-0.11in] % Reduce the whitespace above the horizontal rule
\hspace{1.5in}\vhrulefill{1pt} \\ % Horizontal rule, adjust hspace if your logo is wide and \vhrulefill for the thickness of the rule
\hspace{\fill}\parbox[t]{4.35in}{ % Create a box for your details underneath the horizontal rule on the right
\footnotesize % Use a smaller font size for the details
%\Who \\ \em % Your name, all text after this will be italicized
\Where\\ % Your department
\Address\\ % Your address
\CityZip\\ % Your city and zip code
\TEL\hspace{8em}\LinkedIN\ \ \Twitter\ \ \Skype\ \ \GoogleScholar \\ % Your phone number
\Email\\% Your email address
\URL\\[2em] % Your URL
\Location, \today
}
\hspace{-1.4in} % Horizontal position of this block, increase to move left, decrease to move right
\vspace{-0.5in} % Move the letter content up for a more compact look
}
% ----------------------------------------------------------------------------------------
% TO ADDRESS STRUCTURE
% ----------------------------------------------------------------------------------------
\def\opening#1{\thispagestyle{empty}
%\hfill \Location, \today
{\centering\fromaddress \vspace{0.6in} \\ % Print the header and from address here, add whitespace to move date down
%\hspace*{\longindentation}\today\hspace*{\fill}
\par} % Print today's date, remove \today to not display it
{\raggedright \toname \\ \toaddress \par} % Print the to name and address
\vspace{0.4in} % White space after the to address
\noindent #1 % Print the opening line
% Uncomment the 4 lines below to print a footnote with custom text
% \def\thefootnote{}
% \def\footnoterule{\hrule}
% \footnotetext{\hspace*{\fill}{\footnotesize\em Footnote text}}
% \def\thefootnote{\arabic{footnote}}
}
% ----------------------------------------------------------------------------------------
% SIGNATURE STRUCTURE
% ----------------------------------------------------------------------------------------
\signature{\Who, \What} % The signature is a combination of your name and title
\long\def\closing#1{
\vspace{0.1in} % Some whitespace after the letter content and before the signature
\noindent % Stop paragraph indentation
\hspace*{\longindentation} % Move the signature right
\parbox{\indentedwidth}{\raggedright
#1 % Print the signature text
\vskip 0.65in % Whitespace between the signature text and your name
\fromsig}} % Print your name and title
% ----------------------------------------------------------------------------------------
\begin{document}
% ----------------------------------------------------------------------------------------
% TO ADDRESS
% ----------------------------------------------------------------------------------------
\begin{letter}
{
% To
}
% ----------------------------------------------------------------------------------------
% LETTER CONTENT
% ----------------------------------------------------------------------------------------
\opening{To whom it may concern,}
\input{_content.md}
\closing{Sincerely,}
% ----------------------------------------------------------------------------------------
\end{letter}
%\bibliography{biblio.bib}
\end{document}
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% eof
%
% Local Variables:
% mode: latex
% mode: flyspell
% mode: visual-line
% TeX-master: "<%= config[:name] %>.tex"
% End: