1

I am creating my resume and I want to define a command for a job description. This is what I currently have:

\newcommand{\job}[4]{
\begin{tabbing}
\hspace{2cm} \= \kill
\textbf{#1} \> {#3} \\
\textbf{#2} \>
\begin{minipage}{\smallertextwidth}
\vspace{2mm}
{#4}
\end{minipage}
\end{tabbing}
\vspace{2mm}
}

The first and second arguments are dates, third arg is my job title and the fourth is my job description. For example, the usage would be:

\job
{Start Date-}{End Date}
{\textbf{My Job} - My Company}
{My Job Description}

With a single-lined job description, everything is fine:

\job
{Fall 2018-}{Fall 2019}
{\textbf{My company} - My country}
{Lorem ipsum dolor sit amet.}

Which compiles to:

enter image description here

This command works fine with single line descriptions, however, on multi-line descriptions, it somehow becomes center aligned and I want the second line of dates stick to the first line.

This is what happens when I have multiple lines for description: enter image description here

How can I fix this behavior?

2
  • Instead of tabbing, you could try using a tabularx environment to your advantage.
    – leandriis
    Commented Oct 31, 2020 at 22:19
  • @leandriis Thanks, however I'm super new to Latex and I couldn't figure out how I can achieve that with tabularx.
    – Ali Tou
    Commented Oct 31, 2020 at 22:58

1 Answer 1

1

This uses a different package to what you have (mdwlist) but it achieves what you're after (answer adapted from linebreak in description title):

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage{mdwlist}

\begin{document}
        
    \begin{basedescript}{%
        \desclabelstyle{\multilinelabel}
        \desclabelwidth{2cm}
    }
        \item[Fall 2018- Fall 2019] 
            \textbf{My company}
            
            \lipsum[1]
            
        \item[Another line] ...
    \end{basedescript}

\end{document}

You could alternatively use makecell to achieve this solution in a regular table environment, if you prefer.

\documentclass{article}
\usepackage{makecell}

\begin{document}
    
    \begin{tabular}{ll}
        \makecell[lt]{Fall 2018-\\Fall 2019} & \makecell[lt]{\textbf{My company} \\ \\ my country Lorem ipsum...}
    \end{tabular}
    
\end{document}
1
  • 1
    The mdwlist solution works like a charm. Thank you very much!
    – Ali Tou
    Commented Oct 31, 2020 at 23:29

You must log in to answer this question.

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