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 am writing a resume. I have a line with my email, ph etc below my name. I want this line to start at same margin as the Objective below and similarly stop where the text below stops. I figured i will need some command that changes textwidth for my address line, but i am not able to find the same. Pls let me know the solution for this.

\documentclass[margin]{res}
\usepackage{amsmath}
\setlength{\textwidth}{6in} % set width of text portion
\addtolength{\textheight}{1.8in}
\addtolength{\voffset}{-0.75in}
\addtolength{\hoffset}{-0.5in}
\setlength{\parskip}{0.1in }
\usepackage[hidelinks]{hyperref}
\begin{document}

% Center the name over the entire width of resume:
\moveleft.6\hoffset\centerline{\Large\bf Ajjhjghf Dkjggi}
\smallskip
%address line
\moveleft.6\hoffset\centerline{\underline{\href{mailto:blahblah.edu}{blahblha.edu} $\bullet$ Ph.:+kjhghjkjhg $\bullet$ \href{www.blahblah.com}{blahblha.com} $\bullet $bhak bhak bahkrd rd, \#poi, bibibi xxxxx}}

\begin{resume}

\section{OBJECTIVE}  Seeking an jkhasjkdh jhasd ah jlkahds lalkhkljahd kjahd akjh dalkjh lakjh kjhda ajklhsd ajkshd alkjdsh aljkhd ajkshd ajkshd lajkdh alkjshd alskjdh alkjshd lakjsdh.

\section{EDUCATION} 
    {\bf University of XXXXXX} \hfill   (2012 - 2014) \\
    {\sl blbl, blblbl Engineering  {\bf GPA: } }


\end{resume}
\end{document}
share|improve this question
1  
Welcome to TeX.sx! –  texenthusiast Mar 5 '13 at 4:46

2 Answers 2

As an aside, I think you should rather use package geometry for setting the page layout dimensions.

Anyway, according to res.cls the length \sectionwidth is used for the stuff in the margin. So:

\documentclass[margin]{res}
\usepackage{amsmath}
\setlength{\textwidth}{6in} % set width of text portion
\addtolength{\textheight}{1.8in}
\addtolength{\voffset}{-0.75in}
\addtolength{\hoffset}{-0.5in}
\setlength{\parskip}{0.1in }
\usepackage[hidelinks]{hyperref}
\begin{document}

\newcommand*{\desicenteredline}[1]{%
    \ifhmode\expandafter\\\else\noindent\fi
    \hspace*{-\sectionwidth}%
    \hbox to \dimexpr\sectionwidth+\linewidth\relax{\hss #1\hss}\hskip0pt\relax}

% Center the name over the entire width of resume:
%\moveleft.6\hoffset\centerline{\Large\bf Ajjhjghf Dkjggi}

\desicenteredline{\Large\bf Ajjhjghf Dkjggi}

\smallskip
%address line
%\moveleft.6\hoffset\centerline{\underline{\href{mailto:blahblah.edu}{blahblha.edu} $\bullet$ Ph.:+kjhghjkjhg $\bullet$ \href{www.blahblah.com}{blahblha.com} $\bullet $bhak bhak bahkrd rd, \#poi, bibibi xxxxx}}

remove me (test)\desicenteredline{\underline{\href{mailto:blahblah.edu}{blahblha.edu} $\bullet$ Ph.:+kjhghjkjhg $\bullet$ \href{www.blahblah.com}{blahblha.com} $\bullet $bhak bhak bahkrd rd, \#poi, bibibi xxxxx}}remove me (test)


% adding a line accross the full page
\desicenteredline{\hrulefill}


\begin{resume}

\section{OBJECTIVE}  Seeking an jkhasjkdh jhasd ah jlkahds lalkhkljahd kjahd akjh dalkjh lakjh kjhda ajklhsd ajkshd alkjdsh aljkhd ajkshd ajkshd lajkdh alkjshd alskjdh alkjshd lakjsdh.

\section{EDUCATION} 
    {\bf University of XXXXXX} \hfill   (2012 - 2014) \\
    {\sl blbl, blblbl Engineering  {\bf GPA: } }


\end{resume}
\end{document}

centered stuff

share|improve this answer
    
either i didnt get your solution or you didnt get my question. I dont want the line to match, i want the text above the line to be evenly spread across the whole width of the text in the page. –  desi_amba Mar 6 '13 at 4:16
up vote 0 down vote accepted

taking some cues from you, i think i found a solution. not elegant though.

\hspace*{-\sectionwidth}{\href{mailto:blahblah.edu}{blahblha.edu}\hfill $\bullet$ Ph.:+kjhghjkjhg\hfill $\bullet$ \href{www.blahblah.com}{blahblha.com} \hfill $\bullet $bhak bhak bahkrd rd, \#poi, bibibi xxxxx}
\vspace{-4mm}

\hspace*{-\sectionwidth}\hrulefill
share|improve this answer

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.