11

I'm making a CV. I use the tabbing environment so that my sections start with a 1cm indent, and I can also right-justify dates. For example:

Education
    University of Coolness                                          2005
    Bachelor of Amazingness
    A relatively short description of what I did there......

The problem that I run into is that some of my lines go further than the page-width, and in the tabbing environment, there doesn't seem to be linewrapping, according to a quick google search.

For completeness, the exact code that I use is:

\mysectitle{Education}

\begin{mysec}
    \bold{my degree} \`expected 2015 \\
\end{mysec}

where my environments are defined as:

\newcommand{\mysectitle}[1]{\vspace{1cm}\textsc{\Large \bold{#1}}

\myline\vspace{0.3cm}}
\newcommand\mytabs{\hspace*{1cm}\=\hspace{1cm}\=\hspace{2cm}}
\newenvironment{mysec}
  {\begin{tabbing}\mytabs\+\kill}
  {\end{tabbing}}

Would you recommend using the tabular environment instead? If so, how could I right-justify a date in tabular environment, in the same fashion as \' does in tabbing environment?

Thanks!

1
  • 1
    You could skip the tabbing environment altogether based on the above description. Why not University X \hfill 2005? For design consistency, I'd create a (say) \university macro that formats all information in one go: university, date, degree, description. In the long run, this will make editing your document easier (assuming more than one degree is involved).
    – jon
    Jun 17, 2013 at 4:38

1 Answer 1

10

The \tabfill command described below works quite well inside the tabbing environment to wrap text. The one drawback is that the text is inside an unbreakable box so that it will not break across pages. If you keep the description short it will not be a problem.

\documentclass{article}
\makeatletter

\newlength\tdima
\newcommand\tabfill[1]{%
      \setlength\tdima{\linewidth}%
      \addtolength\tdima{\@totalleftmargin}%
      \addtolength\tdima{-\dimen\@curtab}%
      \parbox[t]{\tdima}{#1\ifhmode\strut\fi}}

\newcommand\mytabs{\hspace*{1cm}\=\hspace{1cm}\=\hspace{2cm}}
\newenvironment{mysec}[1][\mytabs]
  {\begin{tabbing}#1\kill\ignorespaces}
  {\end{tabbing}}

\makeatother

\begin{document}

\noindent\textsc{Education}
\begin{mysec}
    \>University of Coolness    \>\` 2005\\
    \>\textbf{Bachelor of Amazingness}\>\` expected 2015\\
    \>\tabfill{A relatively short description of what I did there and it
       goes on and it goes on and it goes on and it goes on and it goes
       on and it goes on and it goes on ...}
\end{mysec}

\end{document}

enter image description here

2
  • 6
    10 years for a Bachelor of Amazingness. Must be an intense program.
    – dustin
    Jun 17, 2013 at 3:54
  • 5
    Yep man, no need to rush it :-)
    – Danie Els
    Jun 17, 2013 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .