ambevar-dotfiles/.emacs.d/plugins/yas/snippets/text-mode/latex-mode/letter.yasnippet

290 lines
7.5 KiB
Plaintext

# -*- mode: snippet -*-
# contributor : Xavier Danaux <xdanaux@gmail.com>
# contributor : Pierre Neidhardt <ambrevar@gmail.com> 2012-04-27
# key: let
# group: skeleton
# name: \documentclass{article} ...
# --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% \usepackage{lmodern}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%==============================================================================
%% Localization
%%==============================================================================
%% Each language has 2 entries.
%% The one with an argument activates the text, the other one disables it.
% \renewcommand{\locale}{en}
\def\locale{${1:en}}
%%==============================================================================
%% Personal Information
%%==============================================================================
\def\firstname{Pierre}
\def\familyname{Neidhardt}
\def\street{77 rue Bellecombe}
\def\postcode{69006}
\def\city{Lyon}
\def\country{France}
\def\phone{\en{(+33) }09 52 92 86 07}
\def\mobile{\en{(+33) }07 61 08 55 94}
\def\mail{pe.neidhardt@gmail.com}
\def\institute{INSA Lyon}
%%==============================================================================
%% Recipient Information
%%==============================================================================
%% Recipient gender
\def\gender{${2:male}}
%% Recipient
\def\recipientfirstname{${3:Firstname}}
\def\recipientfamilyname{${4:Familyname}}
\def\recipientinstitute{${5:Institute}}
\def\recipientstreet{${6:Street}}
\def\recipientcity{${7:City}}
\def\recipientpostcode{${8:Postcode}}
%%==============================================================================
%% PDF Metadata
%%==============================================================================
\def\FileAuthor{\firstname{} \familyname}
\def\FileTitle{\firstname{} \familyname{}'s cover letter}
\def\FileSubject{Cover letter}
\def\FileKeyWords{\firstname{} \familyname, Cover letter}
%%==============================================================================
%% Aliases
%%==============================================================================
\let\latextemp\LaTeX
\renewcommand{\LaTeX}{{\rm \latextemp}}
%%==============================================================================
%% General options
%%==============================================================================
\usepackage{lmodern}
\usepackage{eukdate}
\usepackage{lipsum}
\usepackage{marvosym}
\usepackage{ifthen}
\usepackage[svgname]{xcolor}
%% Language
\newcommand{\en}[1]{}
\newcommand{\fr}[1]{}
\ifthenelse{\equal{\locale}{en}}{
\renewcommand{\en}[1]{#1}}{}
\ifthenelse{\equal{\locale}{fr}}{
\renewcommand{\fr}[1]{#1}}{}
%% Gender commands.
\newcommand{\male}[1]{}
\newcommand{\female}[1]{}
\ifthenelse{\equal{\gender}{male}}{
\renewcommand{\male}[1]{#1}
}{}
\ifthenelse{\equal{\gender}{female}}{
\renewcommand{\female}[1]{#1}
}
\def\civility{%
\en{\male{M.}\female{Ms.}}%
\fr{\male{Monsieur}\female{Madame}}%
}
%% Greetings toggle.
\newcommand{\greetings}[1]{}
\ifthenelse{\equal{\gender}{}}{}
{\renewcommand{\greetings}[1]{#1}}
%% Compilation options
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex]{graphicx}
\else
\usepackage[dvips]{graphicx}
\fi
%% Babel
\fr{\usepackage[frenchb]{babel}}
%% Day-of-week translation
\makeatletter
\fr{
\renewcommand\weekday{%
\ifcase\theeuk@date Samedi\or Dimanche\or Lundi\or
Mardi\or Mercredi\or Jeudi\or Vendredi\fi}
}
\newcommand\weekdaylower{%
\ifcase\theeuk@date samedi\or dimanche\or lundi\or
mardi\or mercredi\or jeudi\or vendredi\fi}
\makeatother
%% Layout
\usepackage[scale=0.8]{geometry}
% \en{\setlength{\parindent}{0pt}}
\fr{
\setlength{\parindent}{4ex}
}
\addtolength{\parskip}{6pt}
%% Width of the minipage used to display parts of text on the right.
\newlength{\mpwidth}
\addtolength{\mpwidth}{0.4\textwidth}
\pagestyle{empty}
%% Fonts
\renewcommand{\familydefault}{\sfdefault}
\let\emphtemp\emph
\renewcommand{\emph}{{\rm\emphtemp}}
%% PDF Metadata
\ifpdf
\usepackage[]{hyperref}
\hypersetup{
pdfauthor = \FileAuthor,
pdftitle = \FileTitle,
pdfsubject = \FileSubject,
pdfkeywords = \FileKeyWords,
pdfcreator = \LaTeX,
pdfproducer = \LaTeX,
pdftex,
pdfborder=0,
breaklinks,
baseurl=http://,
pdfpagemode=None,
pdfstartview=XYZ,
pdfstartpage=1,
colorlinks=true,
urlcolor=black
}
\else
\usepackage[dvips]{hyperref}
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%==============================================================================
%% Personal particulars
%%==============================================================================
\en{\hfill}
\begin{minipage}{\mpwidth}
%~ \en{\raggedleft}%
%~ \fr{\raggedright}%
{\bfseries \firstname{} \familyname}
\vspace{0.5em}\newline
\small\itshape%
\street \newline
\postcode\ \city\ -- \country{}
\vspace{0.5em}\newline
\Mobilefone~\mobile \newline
\Telefon~\phone \newline
\Letter~\href{mailto:\mail}{\mail}
\end{minipage}
\vspace{\baselineskip}
%%==============================================================================
%% Recipient particulars
%%==============================================================================
\en{}
\fr{\hfill}
\begin{minipage}{\mpwidth}
{\bfseries \civility{} \recipientfirstname{} \recipientfamilyname}
\vspace{0.5em}\newline
\recipientinstitute{}
\vspace{0.5em}\newline
{\small\itshape
\recipientstreet{} \newline
\recipientpostcode{} \recipientcity{} \newline
}
\end{minipage}
%%==============================================================================
%% Date
%%==============================================================================
\vspace{1em}
\hfill
\begin{minipage}{\mpwidth}
\en{\today}
\fr{\city, le \weekdaylower\ \today}
\end{minipage}\newline%[2em]
%%==============================================================================
%% Object
%%==============================================================================
% \noindent
% \textbf{\en{Object}\fr{Objet}~:}
% This is my object.\newline\vspace{\baselineskip}
%%==============================================================================
%% Content
%%==============================================================================
\greetings{
\en{Dear}\fr{\male{Cher}\female{Chère}} \civility{} \recipientfamilyname,\newline
}
\lipsum[1]
Thanks for your consideration; I am looking forward to hearing from you soon!
%%==============================================================================
%% Closing
%%==============================================================================
\vfill
\en{
Yours sincerely,
}
\fr{
%~ Cordialement,
Veuillez agréer, \civility{}, l'expression de mes sentiments les meilleurs.
}
\vspace{1em}
\hfill
\begin{minipage}{\mpwidth}
\textbf{\firstname\ \familyname}\newline
%\includegraphics[scale=0.75]{signature_blue}
\end{minipage}
%%==============================================================================
%% P.S. & Attachment
%%==============================================================================
\vfill
\noindent\em
\fr{Ci-joint~: Curriculum Vit\ae}
\en{Attachment: Curriculum Vit\ae}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%