2

In a section I want to describe some aspects with their respective time and place via the format below, ie with a bold heading, some (italic) text below and on the RHS of the doc the time and place.

My problem: The text I need to insert is too long to fit on one line and would need a line break. However, doing this via eg // causes problems and I suspect I've to adjust the actual command but don't know how. Atm the text flows over the RHS of the page and makes the TIME and PLACE information disappear.

MRE:

Command implementation:

\newcommand{\resumeSubheading}[4]{
  \vspace{-1pt}\item[]
    \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
      \textbf{#1} & #2 \\
      \textit{#3} & \textit{#4} \\
    \end{tabular*}\vspace{-5pt}
}

\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]} 
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}

In-text implementation:

\section{Some section name}
\resumeSubHeadingListStart
\resumeSubheading
{Some heading name}{Somewhere PLACE}
{long description of something and something else, so long that it does not fit on one line and would need a line break but that does not work unfortunately}{YEAR1-YEAR2}
\resumeSubHeadingListEnd 

Reference to older question on this: This has been already asked here but without an answer: resumeSubHeadingListStart - Split into new line inside resumeSubheading

1

1 Answer 1

1

You can use a fixed-width column (p column doesn't need additional package but I think you might prefer m column from the array package) instead of the l column.

\documentclass{article}

\usepackage{array}
\usepackage{enumitem}

\newcommand{\resumeSubheading}[4]{
  \vspace{-1pt}\item[]
    \begin{tabular*}{0.97\textwidth}{m{7cm}@{\extracolsep{\fill}}r}
      \textbf{#1} & #2 \\
      \textit{#3} & \textit{#4} \\
    \end{tabular*}\vspace{-5pt}
}

\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]} 
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}
\begin{document}

\section{Some section name}
    \resumeSubHeadingListStart
        \resumeSubheading
            {Some heading name}{Somewhere PLACE}
            {long description of something and something else, so long that it does not fit on one line and would need a line break but that does not work unfortunately}{YEAR1-YEAR2}
    \resumeSubHeadingListEnd 

\end{document}

output

You must log in to answer this question.

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