1

Hi I am trying to fix the following piece of code. I would like the entry to tabular to extend to second line if it the sentences are too long. However, with this piece of code, the table entry extends beyond page width.

\begin{rSection}{IT and language}

    \begin{tabular}{ @{} >{\bfseries}l @{\hspace{3ex}} l }

        MATLAB & 6+ years of experience in signal processing, image analysis, image segmentation, noise removal and quantitative data analysis \\

        IT skills & Python (beginner), \LaTeX\ (advanced), MS Office (intermediate) \\


    \end{tabular}

\end{rSection}

So I have introduced {\tabular*}{\pagewidth}. However the problem still continues. I feel like there is a simple solution to this that I am missing.

\begin{rSection}{IT and language}

    \begin{tabular*}{\textwidth}{ @{} >{\bfseries}l @{\hspace{3ex}} l }

        MATLAB & 6+ years of experience in signal processing, image analysis, image segmentation, noise removal and quantitative data analysis \\

        IT skills & Python (beginner), \LaTeX\ (advanced), MS Office (intermediate) \\


    \end{tabular*}

\end{rSection}

I have seen few suggestions such as the following where table table and column width can be hardcoded into latex. However, I would like the first column to extend with the text and the second column to continue until \pagewidth is reached while the text remains \raggedright aligned (i.e. starting from top left hand corner of the cell).

\begin{tabular}{@{} L{3.5cm} L{9cm} @{}}
    Jun 2016--Aug 2016 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
\end{tabular}

The MWE with CLASS is provided below

\documentclass{resumeTechEngQuantLargeGap} % Use the custom resumeTechEngQuant.cls for style

\usepackage[left=0.4 in,top=0.4in,right=0.4 in,bottom=0.4in]{geometry} % Margins
\newcommand{\tab}[1]{\hspace{.2667\textwidth}\rlap{#1}} 
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}


%%% a square symbol
\usepackage{amssymb}

\makeatletter
\DeclareRobustCommand{\sqcdot}{\mathbin{\mathpalette\morphic@sqcdot\relax}}
\newcommand{\morphic@sqcdot}[2]{
    \sbox\z@{$\m@th#1\centerdot$}%
    \ht\z@=.3333\ht\z@
    \vcenter{\box\z@}%
}
\makeatother


%---------------------------
%   CV information
%---------------------------

\name{John Doe} % Your name
\address{124 Obsolete Street, Imagination Town. AB1 3ED \\ \underline{abc@def.com} \\ +01 (0)23 4567 8901} % Your address

%---------------------------
%   CV information
%---------------------------



\begin{document}

    \begin{rSection}{IT and language}

        \begin{tabular}{ @{} >{\bfseries}l @{\hspace{3ex}} l }

            MATLAB & 6+ years of experience in signal processing, image analysis, image segmentation, noise removal and quantitative data analysis \\

            IT skills & Python (beginner), \LaTeX\ (advanced), MS Office (intermediate) \\


        \end{tabular}

    \end{rSection}


\end{document}

Class File

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ProvidesClass{resumeTechEngQuantLargeGap}[2010/07/10 v0.9 Resume class]

\LoadClass[11pt,letterpaper]{article} % Font size and paper type
%\LoadClass[11pt,letterpaper,times]{article} % Font size and paper type

\usepackage[parfill]{parskip} % Remove paragraph indentation
\usepackage{array} % Required for boldface (\bf and \bfseries) tabular columns
\usepackage{ifthen} % Required for ifthenelse statements

\pagestyle{empty} % Suppress page numbers


%\usepackage{mathptmx}
\usepackage{Times}


%%% a square symbol
%\usepackage{amssymb}
%
%\makeatletter
%\DeclareRobustCommand{\sqcdot}{\mathbin{\mathpalette\morphic@sqcdot\relax}}
%\newcommand{\morphic@sqcdot}[2]{%
%   \sbox\z@{$\m@th#1\centerdot$}%
%   \ht\z@=.33333\ht\z@
%   \vcenter{\box\z@}%
%}
%\makeatother



%----------------------------------------------------------------------------------------
%   HEADINGS COMMANDS: Commands for printing name and address
%----------------------------------------------------------------------------------------

\def \name#1{\def\@name{#1}} % Defines the \name command to set name
\def \@name {} % Sets \@name to empty by default

\def \addressSep {$\mid$} % \Big| Set default address separator to a diamond

% One, two or three address lines can be specified 
\let \@addressone \relax
\let \@addresstwo \relax
\let \@addressthree \relax

% \address command can be used to set the first, second, and third address (last 2 optional)
\def \address #1{
  \@ifundefined{@addresstwo}{
    \def \@addresstwo {#1}
  }{
  \@ifundefined{@addressthree}{
  \def \@addressthree {#1}
  }{
     \def \@addressone {#1}
  }}
}

% \printaddress is used to style an address line (given as input)
\def \printaddress #1{
  \begingroup
    \def \\ {\addressSep\ }
    \centerline{#1}
  \endgroup
  \par
  \addressskip
}

% \printname is used to print the name as a page header
\def \printname {
  \begingroup
    \hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
    \nameskip % adds space between name and address
    \break
  \endgroup
}

%----------------------------------------------------------------------------------------
%   PRINT THE HEADING LINES
%----------------------------------------------------------------------------------------

\let\ori@document=\document
\renewcommand{\document}{
  \ori@document  % Begin document
  \printname % Print the name specified with \name
  \@ifundefined{@addressone}{}{ % Print the first address if specified
    \printaddress{\@addressone}}
  \@ifundefined{@addresstwo}{}{ % Print the second address if specified
    \printaddress{\@addresstwo}}
     \@ifundefined{@addressthree}{}{ % Print the third address if specified
    \printaddress{\@addressthree}}
}

%----------------------------------------------------------------------------------------
%   SECTION FORMATTING
%----------------------------------------------------------------------------------------

% Defines the rSection environment for the large sections within the CV
\newenvironment{rSection}[1]{ % 1 input argument - section name
  \sectionskip
  \MakeUppercase{\bf #1} % Section title
  \sectionlineskip
  \hrule % Horizontal line
  \begin{list}{}{ % List for each individual item in the section
    \setlength{\leftmargin}{1.5em} % Margin within the section
  }
  \item[]
}{
  \end{list}
}

%----------------------------------------------------------------------------------------
%   SUB-SECTION FORMATTING: WORK EXPERIENCE FORMATTING
%----------------------------------------------------------------------------------------

%% original rSubSection settings

% sub-section style 0: job and experience listing with bullet points
\newenvironment{rSubsection}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
 {\bf #1} \hfill {#2} % Bold company name and date on the right
 \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
  \\
  {\em #3} \hfill {\em #4} % Italic job title and location
  }\smallskip
  \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
   \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
  }{
  \end{list}
  \vspace{0.5em} % Some space after the list of bullet points
}


% sub-section style bkup: job and experience listing with bullet points
\newenvironment{rSubsection1}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
    {\bf #1} \hfill {#2} % Bold company name and date on the right
    \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
        \\
        {\em #3} \hfill {\em #4} % Italic job title and location
    }\smallskip
    \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
        \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
    }{
    \end{list}
    \vspace{0.5em} % Some space after the list of bullet points
}


% rSubsectionHeadingsTwoLineList : 4 input: displayed in two lines ONLY
\newenvironment{rSubsectionHeadingsTwoLine}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
    {\bf #3} \hfill {#4} % Bold company name and date on the right
    \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
        \\
        {\em #1} \hfill {\em #2} % Italic job title and location
    }\smallskip
    \itemsep -0.5em \vspace{-0.5em}

    %   \vspace{-0.5em} % Some space after the list of bullet points
}

% rSubsectionHeadingsTwoLineList : 4 input: displayed in two lines with Lists of items
\newenvironment{rSubsectionHeadingsTwoLineList}[4]{ % 4 input arguments - company name, year(s) employed, job title and location
    {\bf #3} \hfill {\em #4} % Bold company name and date on the right
    \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
        \\
        {\bf #1} \hfill {\em #2} % Italic job title and location
    }\smallskip
    \begin{list}{$\sqcdot$}{\leftmargin=1.0em} 
        % \cdot used for bullets, no indentation;
        % \sqcdot used for to make centerdot in the centre to produce squarebullets
        % \bullet used for bullet points
        % \textbullet for text mode bullets
        \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
    }{
    \end{list}
    \vspace{0.5em} % Some space after the list of bullet points
    }


% sub-section style 1: job and experience listing without bullet points
\newenvironment{rSubsectionHeadingsOneLine}[3]{ % 4 input arguments - company name, year(s) employed, job title and location
    {\bf #1} {$\ \mid $} {\bf #3} \hfill {#2} % Bold company name and date on the right
    \smallskip
    \itemsep -0.5em \vspace{-0.5em}
}


% sub-section style 1: job and experience listing without bullet points
\newenvironment{rSubsectionHeadingsOneLineList}[3]{ % 4 input arguments - company name, year(s) employed, job title and location
    {\bf #1} {$\ \mid $} {\bf #3} \hfill {#2} %\hfill {#2} % Bold company name and date on the right
%   \ifthenelse{\equal{#3}{}}{}{ % If the third argument is not specified, don't print the job title and location line
%       \\
%       {\em #3} \hfill {\em #4} % Italic job title and location
%   }\smallskip
    \begin{list}{$\cdot$}{\leftmargin=0em} % \cdot used for bullets, no indentation
        \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
    }{
    \end{list}
    \vspace{0.5em} % Some space after the list of bullet points
}


% rSubsectionHeadingsMultiJobLists: one job multi position experience listings with List
\newenvironment{rSubsectionHeadingsMultiJobLists}[2]{ % 4 input arguments - company name, year(s) employed
    {\bf #1} \hfill {\em #2} % Bold company name and date on the right
    \smallskip
    \begin{list}{}{ % List for each individual item in the section
        \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
            \setlength{\leftmargin}{1.0em} % Margin within the section
    }
        \item[]
    }{
    \end{list}
}


% rSubSubsection: one job multi position experience listings with List
\newenvironment{rSubSubsection}[2]{ % 4 input arguments - company name, year(s) employed
    {\bf #1} \hfill {\em #2} % Bold company name and date on the right
    \smallskip
    \begin{list}{$\sqcdot$}{\leftmargin=1em} % \cdot used for bullets, no indentation
        \itemsep -0.5em \vspace{-0.5em} % Compress items in list together for aesthetics
    }{
    \end{list}
%   \vspace{-0.25em} % Some space after the list of bullet points
}



%----------------------------------------------------------------------------------------
%   DEFINES WHITESPACE WITHIN THE DOCUMENT
%----------------------------------------------------------------------------------------

% The below commands define the whitespace after certain things in the document - they can be \smallskip, \medskip or \bigskip
\def\namesize{\huge} % Size of the name at the top of the document
\def\addressskip{\smallskip} % The space between the two address (or phone/email) lines
%\def\nameskip{\bigskip} % The space after your name at the top

%\def\sectionlineskip{\medskip} % The space above the horizontal line for each section 
%\def\sectionskip{\medskip} % The space after the heading section

\def\sectionskip{\vspace{1pt}}
\def\sectionlineskip{\vspace{2pt}}
\def\nameskip{\vspace{2pt}}

\def\tempskip{\vspace{20pt}}

Any suggestions?

@leandriis suggestions

\begin{document}
    \begin{rSection}{IT and language}
        \begin{tabularx}{\textwidth}{lX}%{ @{} >{\bfseries}l @{\hspace{3ex}} l }

            MATLAB & 6+ years of experience in signal processing, image analysis, image segmentation, noise removal and quantitative data analysis \\

            IT skills & Python (beginner), \LaTeX\ (advanced), MS Office (intermediate) \\
        \end{tabularx}
    \end{rSection}  
\end{document}

Output

Mensch
  • 65,388
J. Doe
  • 137

1 Answers1

3

With the help of tabularx and \linewidth: (Red lines indicate margins)

enter image description here

\documentclass{resumeTechEngQuantLargeGap} % Use the custom resumeTechEngQuant.cls for style

\usepackage[left=0.4 in,top=0.4in,right=0.4 in,bottom=0.4in]{geometry} % Margins
\newcommand{\tab}[1]{\hspace{.2667\textwidth}\rlap{#1}} 
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}


%%% a square symbol
\usepackage{amssymb}

\makeatletter
\DeclareRobustCommand{\sqcdot}{\mathbin{\mathpalette\morphic@sqcdot\relax}}
\newcommand{\morphic@sqcdot}[2]{
    \sbox\z@{$\m@th#1\centerdot$}%
    \ht\z@=.3333\ht\z@
    \vcenter{\box\z@}%
}
\makeatother


%---------------------------
%   CV information
%---------------------------

\name{John Doe} % Your name
\address{124 Obsolete Street, Imagination Town. AB1 3ED \\ \underline{abc@def.com} \\ +01 (0)23 4567 8901} % Your address

%---------------------------
%   CV information
%---------------------------

\usepackage{tabularx}

\begin{document}
    \begin{rSection}{IT and language}
        \begin{tabularx}{\linewidth}{lX}%{ @{} >{\bfseries}l @{\hspace{3ex}} l }

            MATLAB & 6+ years of experience in signal processing, image analysis, image segmentation, noise removal and quantitative data analysis \\

            IT skills & Python (beginner), \LaTeX\ (advanced), MS Office (intermediate) \\
        \end{tabularx}
    \end{rSection}  
\end{document}
leandriis
  • 62,593