# Make the contents of a sentence fit to a line?

I have been working on a resume. However, some of the text is going beyond a line. For instance, the "Thesis topic" here exceeds the single line as seen:

Here is the code:

\documentclass[10pt]{article}
\usepackage{calc}

\reversemarginpar

\usepackage[paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1.2in,     % Length of section titles
marginparsep=.05in,       % Space between titles and text
margin=0.5in,               % 1 inch margins
includemp]{geometry}

\setlength{\parindent}{0in}

\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}

\begin{document}

\section{Education}
M.S., Civil Engineering, The University of Texas at Austin, Austin, TX\hfill\textbf{Dec 20XX}\\
Thesis: \emph{On Accommodating Spatial Dependence in Bicycle and Pedestrian Injury Counts by Severity Level}\\

\end{document}


If we were to compile this code the "Level" in Thesis topic overflows into the next line. That is the issue at hand. Is it possible to make the text fit to that one line in anyway?

Thanks for the inputs!

-

Use \resizebox and the package graphicx. Another recommended package is microtype. Put for example \usepackage[shrink=100]{microtype} in the preamble of the MWE and see the effect without \resizebox

\documentclass[10pt]{article}
\usepackage{graphicx}
\usepackage{calc}

\reversemarginpar

\usepackage[paper=letterpaper,
includefoot, % Uncomment to put page number above margin
marginparwidth=1.2in,     % Length of section titles
marginparsep=.05in,       % Space between titles and text
margin=0.5in,               % 1 inch margins
includemp]{geometry}

\setlength{\parindent}{0in}

\renewcommand{\section}[1]{\pagebreak[3]%
\vspace{1.3\baselineskip}%
\noindent\llap{\scshape\smash{\parbox[t]{\marginparwidth}{\hyphenpenalty=10000\raggedright #1}}}%
\vspace{-\baselineskip}\par}

\begin{document}

\section{Education}
M.S., Civil Engineering, The University of Texas at Austin, Austin, TX\hfill\textbf{Dec 20XX}\\
\resizebox{\textwidth}{!}{Thesis: \emph{On Accommodating Spatial
Dependence  in Bicycle and Pedestrian Injury
Counts by  Severity Level}\\
}

Thesis: \emph{On Accommodating Spatial Dependence in Bicycle and Pedestrian Injury Counts by Severity Level}\\

Thanks Fran. The suggestion worked very well. Can you please elaborate a little bit on the usage of this command (\resizebox') and also how it fit in this context? - the guidance would be very helpful indeed!! Thanks again for the solution! –  RazorXsr Aug 24 '12 at 16:48
Instead of resizing the whole line, you can just adjust the spacing between characters with microtype. Check this answer (and the first comment to it) to How to adjust font size or kerning to fit line width? –  henrique Aug 24 '12 at 17:05
RazorXsr, the command have three parameters: \resizebox{width}{height}{object} That's all. For example \resizebox{3cm}{4cm}{Hello!}. Very useful to fit to \textwidht some big table. A similar command is \scalebox{ratio}{object}`. –  Fran Aug 24 '12 at 17:07