Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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: "Levels" is overflowing into the next line

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}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\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}\\
Adviser: Dr. ABC

\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!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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}%
\phantomsection\addcontentsline{toc}{section}{#1}%
\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}\\
Adviser: Dr. ABC

\end{document}
share|improve this answer
    
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
1  
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
    
henrique,I expanded my answer just before you made your comment. I completely agree. –  Fran Aug 24 '12 at 18:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.