5

Problem

I am now updating my resume and I found tasks package is a good choice to list my research interests in the same line (which could save a lot of space). Even though I basically got what I want, it seems that three items I list did not have same horizontal space and this makes it a little unsatisfactory.

enter image description here

What I Have Done

I checked the doc of the tasks package and especially the figure shown below, but it seems that we could not restrict the text width of each bullet point. enter image description here

Did I miss something? Any input is appreciated.

MWE

\documentclass{article}
% EDIT
\usepackage[margin=0.5in, nohead]{geometry}
\usepackage{tasks}
\settasks{item-indent=3em, label-offset=0em, column-sep=2em}

\begin{document}
\begin{tasks}[style=itemize](3)
\task Gaussian process machine learning \task Statistical learning theory  \task (Non)-convex optimization
\end{tasks}
\end{document}
5
  • @marmot I tried tabular when I didn't know tasks package exist, but I find it pretty ugly.
    – Mr.Robot
    Commented Mar 30, 2019 at 1:08
  • @marmot Sorry for the confusion, the code is just taken from my resume and I forgot to add margin setting. Already added it.
    – Mr.Robot
    Commented Mar 30, 2019 at 2:27
  • 1
    Thanks for your MWE! Do you want something like \hspace{1em}\textbullet~~Gaussian process machine learning\hfill \textbullet~~Statistical learning theory\hfill \textbullet~~(Non)-convex optimization\hspace{1em}\par ?
    – user121799
    Commented Mar 30, 2019 at 2:34
  • Thank you so much, this is exactly what I want :-).
    – Mr.Robot
    Commented Mar 30, 2019 at 3:33
  • 2
    You're welcome! (Please let me know if you think I should write an official answer.)
    – user121799
    Commented Mar 30, 2019 at 3:36

1 Answer 1

3

The tasks are equal width, but Gaussian process machine learning is too wide and there's no feasible line break point. Indeed you get a warning about

Overfull \hbox (11.3392pt too wide) in paragraph at lines 34--34
[]|\OT1/cmr/m/n/10 Gaussian pro-cess ma-chine learning| 

Fix: use \raggedright. In the code below, the first part sets rules to visually check the spacing.

\documentclass{article}
% EDIT
\usepackage[margin=0.5in, nohead]{geometry}
\usepackage{tasks}
\settasks{
  item-indent=3em,
  label-offset=0em,
  column-sep=2em,
}

\begin{document}

\noindent
\makebox[\textwidth][s]{%
\smash{\vrule height 0pt depth 10cm}%
\leaders\hrule\hfill
\smash{\vrule height 0pt depth 10cm}%
\leaders\hrule\hfill
\smash{\vrule height 0pt depth 10cm}%
\leaders\hrule\hfill
\smash{\vrule height 0pt depth 10cm}%
}

\subsection*{Bad}

\begin{tasks}[style=itemize](3)
\task Gaussian process machine learning 
\task Statistical learning theory  
\task (Non)-convex optimization
%
\task (Non)-convex optimization
\task Statistical learning theory  
\task Gaussian process machine learning 
\end{tasks}

\subsection*{Better}

\begin{tasks}[style=itemize,item-format=\raggedright](3)
\task Gaussian process machine learning 
\task Statistical learning theory  
\task (Non)-convex optimization
%
\task (Non)-convex optimization
\task Statistical learning theory  
\task Gaussian process machine learning 
\end{tasks}

\end{document}

You may want to add item-format=\raggedright to the \settasks initialization.

enter image description here

You must log in to answer this question.

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