# Positioning \NewEntry elements in a CV

I need to write a CV that is attached to my thesis. Because I wrote my thesis in latex (classic thesis), I would like to set my CV in latex as well so it fits the layout of the thesis.

I use this code so far to produce my CV:

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[a4paper,ngerman]{scrartcl}

\reversemarginpar % Move the margin to the left of the page

\newcommand{\MarginText}[1]{\marginpar{\raggedleft\itshape\small#1}} % New command defining the margin text style

\usepackage[nochapters]{classicthesis} % Use the classicthesis style for the style of the document
\usepackage[LabelsAligned]{currvita} % Use the currvita style for the layout of the document

\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,

\newlength{\datebox}\settowidth{\datebox}{Spring 2011} % Set the width of the date box in each block

\newcommand{\NewEntry}[3]{\noindent\hangindent=2em\hangafter=0 \parbox{\datebox}{\small \textit{#1}}\hspace{1.5em} #2 #3 % Define a command for each new block - change spacing and font sizes here: #1 is the left margin, #2 is the italic date field and #3 is the position/employer/location field
\vspace{0.5em}} % Add some white space after each new entry

\newcommand{\Description}[1]{\hangindent=2em\hangafter=0\noindent\raggedright\footnotesize{#1}\par\normalsize\vspace{1em}} % Define a command for descriptions of each entry - change spacing and font sizes here

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage[LabelsAligned]{currvita}% nice cv style

%----------------------------------------------------------------------------------------

\begin{document}

\thispagestyle{empty} % Stop the page count at the bottom of the first page

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

\noindent\spacedlowsmallcaps{Personal Information}\vspace{0.5em} % Personal information heading

\NewEntry{}{Some Name} % Birthplace and date

\NewEntry{}{Geboren am 14. Januar 2050 in Village} % Birthplace and date

\NewEntry{Address}{Some Streetname 11\\* 12345 City} % Phone number(s)

\NewEntry{Phone}{+49 344 1234567} % Phone number(s)

\NewEntry{Website}{http://www.name.com} % Personal website

\vspace{1em} % Extra white space between the personal information section and goal

%----------------------------------------------------------------------------------------
%   EDUCATION
%----------------------------------------------------------------------------------------

\noindent\spacedlowsmallcaps{Education}\vspace{1em}

\NewEntry{2000-2005}{A very long University title with a lot of names an so on}

\Description{\MarginText{Masters in TeX}Masters in Life, Party Informatics and some other stuff}

\vspace{1em} % Extra space between major sections

%----------------------------------------------------------------------------------------
%   WORK EXPERIENCE
%----------------------------------------------------------------------------------------

\spacedlowsmallcaps{Work Experience}\vspace{1em}

\NewEntry{January 2010 - March 2012}{Some Company}

\Description{\MarginText{Researcher}Brief description of what I've done.}

%----------------------------------------------------------------------------------------
%   PUBLICATIONS
%----------------------------------------------------------------------------------------

\spacedlowsmallcaps{Publications}\vspace{1em}

\Description{Some, A., Other, B., Third, C. (2011). Title of the Article with some fancy subtitle. In: A famous journal. pages 123–133.}

\vspace{1em} % Extra space between major sections

\end{cv}

\end{document}


With this result:

That works so far (I compile it with pdflatex in texmaker). The only warning I get is: Underfull \hbox (badness 10000) in paragraph at lines 86--86

There are just a few things I cannot figure out:

1. The code \NewEntry{Address}{Some Streetname 11\\* 12345 City} produces the address with a line break. The problem is, that "12345 City" should be under "Some Streetname" and not under "Address"

2. Something similar happens with the line \NewEntry{2000-2005}{A very long University title with a lot of names an so on} Here the line break is not set manually but because the line is to long. But here also the break should also not be under the first "Date" element.

3. Is there also a way to set the University entry to the top, so that the first line of the date entry is in the same line with the university?

4. Right now, I put the publications manually in there. I tried to use \printbibliography with a \nocite{*} statement before, but this did not work. Is there a way to do this as well?

I think the points 1-3 are the same problem but I can't figure it out how to solve it. Does someone has a solution for this?

-
Does it work for you? – Marco Daniel Jun 9 '13 at 18:00
Yes, it worked so far but I still get the warning message. Why is that? – Dominik Jun 9 '13 at 18:06
Which warning message? I got none. – Marco Daniel Jun 9 '13 at 18:14
This one here: \hbox (badness 10000) in paragraph at lines XXX--XXX – Dominik Jun 9 '13 at 18:25
This badbox depends on the break of "January 2010 - March 2012". You can increase the width \datebox or use \raggedright in the definition of the \parbox. – Marco Daniel Jun 9 '13 at 18:41

There are some flaws in your code.

• You defining the command \NewEntry with three mandatory arguments. Inside your document you are always call it with two arguments.
• The justification of the second argument fails. If you have a line break in your second argument the next line always starts left.
• Using the command printbibliography requires loading the package biblatex. I can't see this.

However I suggest the following definition of \NewEntry:

\newcommand{\NewEntry}[2]{%
\noindent\hspace*{2em}%
\parbox[t]{\datebox}{\strut\small\itshape #1}%
\hspace*{1.5em}%
\parbox[t]{\dimexpr\textwidth-2em-\datebox-1.5em}{\strut #2}%

This example works, but I still can't get the bibliography to work. I added \usepackage[style=authortitle]{biblatex} and \bibliography{myPublicationsDiss.bib} to the preamble and \nocite{*} and \printbibliography[] before \end{cv} and \end{document} but it still doesn't work... :-/ Any suggestions? – Dominik Jun 9 '13 at 18:23
@Dominik: What do you mean it doesn't work? Do you get any errors/warnings? Did you compile with biber? – Marco Daniel Jun 9 '13 at 18:42
@Dominik to get the bibliography to work you need to run an additional program over your source. If you are using \usepackage[style=authortitle,backend=biber]{biblatex} (as suggested) then you need to run: pdflatex, then biber, then pdflatex again. It's possible that TeXmaker does this automatically once you setup backend=biber, however – ach Jun 9 '13 at 20:32