# How can I make a Curriculum Vitae or Resume in *Tex with variable length?

I'd like to make a template of sorts for a Curriculum Vitae. While there seem to be plenty of examples online of CVs using TeX, I'm looking for an easy way to include everything in the file, but compile one of the following:

• Abbreviated (~1 pg) CV
• Annotated CV (includes longer descriptions of various tasks)
• Exhaustive CV (everything!)
• Resume (less academic, more job experiences and skills)

Essentially, I'd like to write all these things down once and not have to re-write everything whenever I need to submit a different kind of CV or resume.

It'd be neat to define either lists or entries of "publications," "hobbies," "academic_employment" and "nonacademic_employment", and output whatever things make sense given the type of CV or resume I want to make. Perhaps these entries could look like the following: (recognizing that underscores aren't great for command names :-) )

\cv_name{John Doe}
\cv_phone{777-777-7777}
\cv_email{JohnDoeIsCool@TheDoeDomain.com}
\cv_website{http://www.WebsiteOfJohnDoe.com}

\cv_degree{Big State University,Computer Science,Bachelors,1995}
\cv_degree{Big State University,Math,Bachelors,1995}   % double-major?
\cv_degree{University Of Big State,Math,PhD,1999}

\cv_job{Cashier,Joe's Bakery,01/01/1990,01/01/1995,555-555-5555,{I was a cashier but got tired of it.}}   % optional annotation?
\cv_current_job{CEO,BakeriesAreUs,01/01/1995,666-666-6666}  % no end date needed for current job

\cv_publication{My Autobiography,\cite{myBook}}         % incorporate with BibTex?

\cv_award{Some Scholarship,1993}                        % no annotation
\cv_award{Nobel Peace Prize,2005,{I love humanity!}}    % annotated


Output could perhaps use flags and if statements, e.g. (in pseudocode):

make_academic_cv = true

output_name()
output_position()
output_contact_info()
output_education_background()

if (make_exhaustive_cv) or (make_resume) or (make_academic_cv) then
endif

if (make_exhaustive_cv) or (make_resume) then
endif

endif

output_publications()
output_conferences_and_presentations()
endif

if (make_exhaustive_cv) then
output_hobbies()
output_social_media_contact_info()
endif


Has anyone done anything like this before?

One possible solution would be to adopt the BibTeX or glossaries model of having a "database" file of various kinds of entries, and then referencing the entries as needed in the main file. I haven't found a package to do this, but I'm definitely open to suggestions!

I am not skilled enough to know how to do this myself, but could work with somebody else's code, if it were similar enough to what I'm looking to do. Perhaps it would be easier to show how to do just one or two of those macros (e.g. "\cv_degree{}").

-
Use both: if everything is put into macros and you use conditional commands (\newif, etoolbox's booleans), it is easy to control output. Then a simple Makefile can set the switches: make long, make superlong, etc. I don't go quite that far, relying instead on separate template files (e.g., 'letterpaper' vs 'A4') and input files ('publications', 'conferences', 'teaching') in order to avoid overly complex including and excluding or environments. –  jon Feb 13 '14 at 18:29
@jon it is easy to control if the output is there or not, but it is not so easy to differently sort and group the output. –  StrongBad Feb 13 '14 at 19:10
@StrongBad -- How so? Just use etoolbox to process a CSV list where each item is a separate file name that gets \input-ted. Then run something like: pdflatex -jobname=csvlist-include "\RequirePackage{etoolbox}\forcsvlist{\listadd\mylist}{csvlist-include-c.tex, csvlist-include-b.tex}\input{csvlist-include.tex}". That way, you can arbitrarily change the order of what gets included (or not). You don't want to type that each time, however, which is why I suggested a Makefile. –  jon Feb 13 '14 at 20:06

I have a pretty automated way of managing the many versions of my CV. I use biblatex and biber to create my CV since the data model and filtering is much more powerful than bibtex. I create a new tex file for each version of my CV instead of using flags, since it lets me see what is going to be included in each CV, however, there is no reason I couldn't combine them all with flags. The key to my approach is the tex files have no personal information and basically consist of a bunch of \defbibfilter's and \printbibliography's. I don't have fully shareable code (although some day I would like to), but basically my CV looks like

\defbibfilter{grad}{type=teaching and subtype=graduate}
\section*{Teaching}


which lists my teaching sorted by graduate and undergraduate classes. If in another version of my cv I want to sort by where I taught them I define a different set of filters

\defbibfilter{UniversityA}{type=teaching and institution=UniversityA}
\defbibfilter{UniversityB}{type=teaching and institution=UniversityB}
\section*{Teaching}
\subsection*{UniversityA}
\printbibliography[filter=UniversityA]
\subsection*{UniversityB}
\printbibliography[filter=UniversityB]


In order to get this to work I need to define a data model in my *.dbx file that has a number of new fields. For example, for funding entries, I needed to define fields for the funder (who gave me the money) and amount (how much they gave me)

\DeclareDatamodelFields[type=field,datatype=literal]{funder}
\DeclareDatamodelFields[type=field,datatype=literal]{amount}


I also needed to define new bibliography drivers for the new data types. For example my *.bbx file includes things like

\DeclareBibliographyDriver{funding}{%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{year+duration+amount}%