1

This question already has an answer here:

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

marked as duplicate by jon, Masroor, Paul Gessler, Jesse, Werner spacing Jan 23 '15 at 3:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 1: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 1: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 1:18
  • Ok. I just edited the post to include a working example. Thanks for the advice on \bf. – Owen Lincoln Jan 23 '15 at 2: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 2:20

Browse other questions tagged or ask your own question.