%% Copyright 2006 Torsten Blum % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License version 1.3c, % available at http://www.latex-project.org/lppl/. \NeedsTeXFormat{LaTeX2e} \ProvidesClass{tbresume}[2006/11/01 v0.1 torstenb resume document class] \LoadClassWithOptions{article} \reversemarginpar \addtolength{\oddsidemargin}{-0.5cm} \addtolength{\topmargin}{-3cm} \addtolength{\textheight}{5.2cm} \addtolength{\textwidth}{2cm} \RequirePackage{color} \RequirePackage{ifthen} \RequirePackage{ifpdf} % graphics \ifpdf \RequirePackage[pdftex]{graphicx} \else \RequirePackage[dvips]{graphicx} \fi \RequirePackage[T1]{fontenc} \RequirePackage{marvosym} \AtEndOfClass{% \RequirePackage{lmodern}% } \newif\if@roman\@romanfalse \DeclareOption{roman}{\@romantrue} % process given options \ProcessOptions\relax % colors \definecolor{firstnamecolor}{rgb}{0,0,0} \definecolor{familynamecolor}{rgb}{0,0,0} \definecolor{titlecolor}{rgb}{0.35,0.35,0.35} \definecolor{addresscolor}{rgb}{0.25,0.5,0.75} \definecolor{sectiontitlecolor}{rgb}{0.2,0.4,0.65} % fonts \providecommand*{\firstnamefont}{} \providecommand*{\familynamefont}{} \providecommand*{\titlefont}{} \providecommand*{\addressfont}{} % styles \providecommand*{\firstnamestyle}[1]{{\firstnamefont\color{firstnamecolor}#1}} \providecommand*{\familynamestyle}[1]{{\familynamefont\color{familynamecolor}#1}} %% Real fonts - not just defaults Fonts \if@roman \AtBeginDocument{\rmfamily} \else \AtBeginDocument{\sffamily} \fi %\renewcommand*{\ttdefault}{pcr} \renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape} \renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape} \renewcommand*{\addressfont}{\rmfamily\mdseries\slshape} \renewcommand*{\familynamefont}{\firstnamefont} %------------------------------------------------------------------------------- % structure commands definitions %------------------------------------------------------------------------------- \newcommand*{\firstname}[1]{\def\@firstname{#1}} \newcommand*{\familyname}[1]{\def\@familyname{#1}} \renewcommand*{\title}[1]{\def\@title{#1}} \newcommand*{\address}[1]{\def\@address{#1}} \newcommand*{\phone}[1]{\def\@phone{#1}} \newcommand*{\email}[1]{\def\@email{#1}} \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}} \newcommand*{\photo}[2][84pt]{\def\@photoheight{#1}\def\@photo{#2}} \renewcommand*{\quote}[1]{\def\@quote{#1}} \firstname{} \familyname{} \title{} \address{} \phone{} \email{} \extrainfo{} \photo{}{} \quote{} % usage: \emaillink[optional text]{link} \newcommand*{\emaillink}[2][]{% \ifthenelse{\equal{#1}{}}% {\def\@linktext{#2}}% {\def\@linktext{#1}}% \href{mailto:#2}{\@linktext{}} } \renewcommand*{\maketitle}{% \begin{minipage}[b]{.5\textwidth}% \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}% \ifthenelse{\equal{\@title}{}}% {}% {\\[1.25em]\titlestyle{\@title}}% \end{minipage} \hfill% \begin{minipage}[b]{.35\textwidth}% \raggedleft\addressfont\color{addresscolor}\@address\\[0.2em]% \Telefon~\@phone\\[.2em]% \Letter~\emaillink{\@email}% \ifthenelse{\equal{\@extrainfo}{}}% {}% {\\[0.2em]\@extrainfo} \end{minipage}% \ifthenelse{\equal{\@photo}{}}% {}% {\hspace*{1em}\color{firstnamecolor}\framebox{\includegraphics[height=\@photoheight]{\@photo}}}\\[3em]} \newlength{\headerbuffer} \setlength{\headerbuffer}{15pt} \newlength{\secskip} \setlength{\secskip}{6pt} \newcommand{\mrule}[2]{{\color{sectiontitlecolor}\rule{#1}{#2}}} \renewcommand{\section}[1]{% \vspace{\headerbuffer}% \mbox{}\marginpar{\mbox{}\mrule{\marginparwidth}{6pt}}% {\noindent\color{sectiontitlecolor}\LARGE\scshape\hspace{-\parindent}\noindent#1}% \par\noindent% } \newenvironment{years}[3]% { \par\noindent% \mbox{}\marginpar{\centering#1\\{\footnotesize to}\\#2}% \mbox{}% {\bf #3}\par% } % redefining itemize in order to reduce item separation \let\olditemize=\itemize \let\endolditemize=\enditemize \renewenvironment{itemize}{% \vspace*{-1.5\parsep}% \begin{olditemize}% \setlength{\parskip}{0.1\parskip}% \setlength{\itemsep}{0.1\itemsep}% }% {% \end{olditemize}% } % redefining description in order to reduce item separation \let\olddescription=\description \let\endolddescription=\enddescription \renewenvironment{description}{% \vspace*{-1.3\parsep}% \begin{olddescription}% \setlength{\parskip}{0.1\parskip}% \setlength{\itemsep}{0.1\itemsep}% }% {% \end{olddescription}% } \endinput