0

I have tried many solutions from this site but none solve my issue, hence I decided to ask another question. Disclaimer: I know nothing about LaTex.

In my list, there is weird spacing after which the list starts which is really messing up, and induces confusion while reading.

Here is a picture

enter image description here

I want the bulleting to start from where is arrow is present.

Here is my code .tex part.

\twentyitemshort{Test}
{
\begin{itemize}[leftmargin=*]
\item test 1
\item test 2
\item test 3
\end{itemize}
}

Here is the .cls portion

\newcommand{\twentyitemshort}[2]{%
    #1&\parbox[t]{0.70\textwidth}{%
        \textbf{#2}%
    }\\
}

PS. I am using the twentyseconds resume template which can be found here. I have added \usepackage{enumitem} in my code apart from the original source code.

Here is my source code.

template.tex file
twentysecondcv.cls file

EDIT 1
I am attaching pictures of how it looks on my resume without using list and with list

Without list enter image description here

With list enter image description here

EDIT 2
I have attached the Minimal Working Code

  1. template.tex
  2. resume.cls

EDIT 3
Please try using overleaf latex compiler, for some reason this code won't compile on some other latex compilers.

1
  • The comments conversation has been successfully finished it seems, accepted answer below, so I moved it to chat for archiving.
    – Stefan Kottwitz
    Jul 27, 2020 at 0:05

1 Answer 1

3
+50

The problem you are creating with the parbox is, that you change the baseline calculation after you started it. Therefore the alignment fails within the expansion. The simplest solution I can think of is using the attempt of @UlrikeFischer and move the \bfseries before starting the parbox, I also changed the width a bit. Put it somewhere before your \begin{document}:

\makeatletter
\renewcommand{\twentyitemshort}[2]{#1&\bfseries\parbox[t]{0.68\textwidth}{\csname @minipagetrue\endcsname #2}\\}
\makeatother

As a result, the text will move up and will be properly aligned: enter image description here

3
  • Thank you so much TobiBS. This did solve my problem. But I have a doubt. Are \makeatother and \makeatletter necessary, because my code is compiling even if it is removed. Jul 15, 2020 at 19:12
  • @AbhayPatik Did you put it in the tex or in the cls file? In a class file it is not needed. And maybe it is not needed due to the csname/endcsname. But it does not hurt to keep them, neither does removing them has negative side effects.
    – TobiBS
    Jul 15, 2020 at 19:15
  • I put them in the .tex file. In both the cases there is no difference. So I decided to keep them where they are. I think you tagged me wrong in your comment. It should be AbhayPatil and not AbhayPatik Jul 15, 2020 at 19:17

You must log in to answer this question.

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