1

I am writing a resume using the scrartcl,currvita, and classicthesis packages. Everything else is fine but I have run into a problem correctly justifying some dates along the right side of the page. When I use the command '\NewEntry', as defined below, it leaves a small white space of about 0.5em at the right side of the page, even though I have used /hfill. If I add the line manually instead of using a function, it does not do this, as shown in the picture. I have attached all of the code that I think is relevant. Can someone explain to me why it is doing this? Obviously I could just hand code it every time or correct it with /hspace(-0.5em) but I would much prefer to use a function.

\documentclass[11pt]{scrartcl}
\reversemarginpar % Move the margin to the left of the page 

\usepackage[nochapters]{classicthesis} 
\usepackage[LabelsAligned, NoDate]{currvita}
\usepackage{marginnote}
\usepackage{color}

\usepackage[letterpaper,top=0.35in, bottom=0.15in, left=1.5in, right=0.5in,marginparwidth=1in,marginparsep=0.25in]{geometry}

\newcommand{\NewEntry}[2]{\raggedright\noindent\hangindent=2em\hangafter=0 \textsc{\bf#1}  {\hfill\small\textit{#2}}
 % Define a command for each new block - change spacing and font sizes here
\vspace{0.15em}} % Add some white space after each new entry

\begin{document}


\pdfpageheight 11in 
\pdfpagewidth 8.5in

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

\begin{cv}{}

---------------

\NewEntry{University of the Pacific}{Expected May 2016}

\raggedright\noindent\hangindent=2em\hangafter=0 \textsc{\bf University of the Pacific} \hfill {\small\textit{Expected May 2016}}

\end{cv}

\end{document}

enter image description here

  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please, always post a complete minimal working example (MWE) people can compile to reproduce the problem. Much more useful than fragments of code. – cfr Jan 23 '15 at 01:13
  • Off-topic: don't use \bf - it was deprecated 20+ years ago. More on topic: usually, you would use \raggedleft or the flushright environment (from ragged2e?) to set text right, rather than forcing it with \hfill. – cfr Jan 23 '15 at 01:15
  • Your curly brackets in your macro definition don't add up. You have 4 left and 3 right. Probably the last one is after a line break which will insert a space. But, really, without an MWE, it is all guesswork. – cfr Jan 23 '15 at 01:18
  • Ok. I just edited the post to include a working example. Thanks for the advice on \bf. – Owen Lincoln Jan 23 '15 at 02:08
  • You have {\hfill\small\textit{#2}}, which is adding space at the end of the line; change it to {\hfill\small\textit{#2}}%. (This is surely a duplicate of some more general question. This question seems to link to several.) – jon Jan 23 '15 at 02:20
  • Thank you Jon, that fixed it. Is there a reason it is necessary in the function and not when it is just written out? – Owen Lincoln Jan 23 '15 at 02:26
  • Yes: In the 'manual' version, the series of commands is immediately closed by the second brace (i.e., the }) so there's no space in the input. In your macro, however, you have {\hfill\small\textit{#2}}˽\vspace{0.15em} (where the ˽ marks an explicit space in the macro definition). So in your definition, you are (accidentally) asking for a space before your \vspace command, while in the 'manual' version you are not. Hopefully, the linked-to question (and answers) above provide more detail. – jon Jan 23 '15 at 02:35
  • Off-topic, but you should also consider switching from "TeX" font-switching commands to "LaTeX" ones (e.g., from \bf to \bfseries). See this question. – jon Jan 23 '15 at 02:40
  • @jon See discussion above ;). – cfr Jan 23 '15 at 04:21
  • @cfr -- Hmm, my memory is fading fast! I did see your comment about the \bf, but then forgot about it while 'answering' the main problem (which I figured was justified since there was now an example on display and it was a duplicate question/issue anyway -- even though your suspicion turned out to be correct). – jon Jan 23 '15 at 04:29

0 Answers0