# Align itemize bullet to first line of cventry

I'm using moderncv with the banking style. I have itemized lists containing \cventry and other lists of regular text. My problem is that the bulletpoints for \cventry are vertically aligned between its two lines of text, whereas for regular text it's aligned to the first line. I'd like it to consistently align to the first line, including for \cventry.

I've tried raising the bullet height globally as suggested here but of course that misaligns the non-cventry bullets.

MWE:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}

% from https://tex.stackexchange.com/questions/588/how-can-i-change-the-margins-for-only-part-of-the-text
% change margins on the fly
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist

\name{John C.}{Lilly}

\begin{document}
\makecvtitle

\vspace{5pt}

\begin{itemize}
\item{
\cventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{}
\vspace{-1.5\baselineskip}
\begin{changemargin}{0cm}{2.5cm}
Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.
\end{changemargin}
}
\end{itemize}

\vspace{5pt}
\section{Publications}
\vspace{5pt}

\begin{itemize}
\item{
\textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.
}
\end{itemize}

\end{document}


Output:

Note also the horizontal misalignment of the right margins. How can I fix that, besides manually realigning the margins of the plain text list to a negative value?

The problem you have has two parts.

For the first part (text overlapping in right margin) please have a look to my answer to question. There you find the explaination for the in the following MWE used code:

\newcommand*{\mycventry}[7][.25em]{
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}% <=============
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&#7&%
\else{\\%
\begin{minipage}{\linewidth}% <=====================================
\small#7%
\end{minipage}}\fi%


For the second part, the possition of the bullet, you can use the line

\renewcommand\labelitemi{\raisebox{0.8em}{\oldlbi}}


to correct the possition of the bullet. Because you do not know what is comming after that code it is important to use

\renewcommand\labelitemi{\raisebox{.15em}{\oldlbi}}


afterwards to get the standard position back.

So the best would be to create a new command \mycventrya:

\newcommand{\mycventrya}[4]{%
\renewcommand\labelitemi{\raisebox{0.8em}{\oldlbi}}
\begin{itemize}
\item{%
\mycventry{#1}{}{#2}{#3}{}{}
\vspace{-1.5\baselineskip}
\begin{changemargin}{0cm}{2.5cm}
#4
\end{changemargin}
}
\end{itemize}
\renewcommand\labelitemi{\raisebox{.15em}{\oldlbi}}
}


\mycventrya{1963--1967}{PhD Dolphinology}{University of Atlantis}{Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.}


With the following MWE

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}

% from https://tex.stackexchange.com/questions/588/how-can-i-change-the-margins-for-only-part-of-the-text
% change margins on the fly
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist

% https://tex.stackexchange.com/questions/392811/moderncv-extend-hrule/392894#392894
\newcommand*{\mycventry}[7][.25em]{
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}% <=============
{\bfseries #4} & {\bfseries #5}\\%
{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&#7&%
\else{\\%
\begin{minipage}{\linewidth}% <=====================================
\small#7%
\end{minipage}}\fi%

% https://tex.stackexchange.com/questions/351295/bullet-items-vertically-misaligned-if-moderncvstylecasual-is-used
\let\oldlbi\labelitemi
\renewcommand\labelitemi{\raisebox{.15em}{\oldlbi}}

\newcommand{\mycventrya}[4]{%
\renewcommand\labelitemi{\raisebox{0.8em}{\oldlbi}}
\begin{itemize}
\item{%
\mycventry{#1}{}{#2}{#3}{}{}
\vspace{-1.5\baselineskip}
\begin{changemargin}{0cm}{2.5cm}
#4
\end{changemargin}
}
\end{itemize}
\renewcommand\labelitemi{\raisebox{.15em}{\oldlbi}}
}

\name{John C.}{Lilly}

\begin{document}

\makecvtitle

\vspace{5pt}

\begin{itemize}
\item{
\cventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{}
\vspace{-1.5\baselineskip}
\begin{changemargin}{0cm}{2.5cm}
Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.
\end{changemargin}
}
\end{itemize}

\vspace{5pt}
\section{Publications}
\vspace{5pt}

\begin{itemize}
\item{
\textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.
}
\end{itemize}

\renewcommand\labelitemi{\raisebox{0.8em}{\oldlbi}} % <=================
\begin{itemize}
\item{
\cventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.}
}
\end{itemize}
\renewcommand\labelitemi{\raisebox{.15em}{\oldlbi}} % <=================

\mycventrya{1963--1967}{PhD Dolphinology}{University of Atlantis}{Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.}

\begin{itemize}
\item{
\textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.
}
\end{itemize}

\end{document}


you get the wished result:

• Nice, thanks for taking me through the different components. Your solution to the margin problem is elegant and works right, and thanks for integrating that extra bit of text into the new command. I think I prefer @Bernard's solution to the bulletpoint problem though (hopefully I can combine them) - though I'm accepting this answer for its explanations.
– Igid
Mar 5 '18 at 22:03

The problem (as far as I understood by trying to fix it) is that cventry makes the years and the other items of \cventry command to seem like one line item. (didn't check the code but just guessed by playing around).

The real answer has to fix other things in your code too (See PS) and I just providing a fix since didn't show any answer yet.

My temporayy fix with minipages and \vspace:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}

% from https://tex.stackexchange.com/questions/588/how-can-i-change-the-margins-for-only-part-of-the-text
% change margins on the fly
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist

\name{John C.}{Lilly}

\begin{document}
\makecvtitle

\vspace{5pt}
\begin{minipage}[t]{4mm}
\begin{itemize}
\item
\end{itemize}
\end{minipage}
\begin{minipage}[t]{\dimexpr\textwidth-4mm}
\vspace{1mm}\vspace{-3.9mm}
\cventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{}
\vspace{-1.9\baselineskip}
\begin{changemargin}{0cm}{2.5cm}
Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.
\end{changemargin}
\end{minipage}

\vspace{5pt}
\section{Publications}
\vspace{5pt}

\begin{itemize}
\item{
\textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.
}
\end{itemize}

\end{document}


Output:

PS: As you can see your approach had more problems than the vertical align because the entry from \cventry command has a width that doesn't respect changes like a decreased minipage by {\textwidth-4mm}. (Not in your code too)

In fact I would do something like this:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage{tikz}
\newcounter{bullcount}
\begin{tikzpicture}[overlay,remember picture]\node[text width=4mm] at ([xshift=-2mm,yshift=#1]TheB\thebullcount){\begin{itemize}\item\end{itemize}};\end{tikzpicture}%
}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}

% from https://tex.stackexchange.com/questions/588/how-can-i-change-the-margins-for-only-part-of-the-text
% change margins on the fly
%\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
%\let\endchangemargin=\endlist

\name{John C.}{Lilly}

\begin{document}

\makecvtitle

\vspace{5pt}
\bullcventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{}
\vspace{-1\baselineskip}
\begin{minipage}{\dimexpr\linewidth-2cm}
Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.
\end{minipage}

\vspace{5pt}
\section{Publications}
\vspace{5pt}

\textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.

\end{document}


Output:

Here I have the disadvantage that I have the bullet in the left margin... but I prefer this way than have the text out of the right.

Also I like it this way and my next step to solve this issue ... would be to read the \cventry code...

• Thanks for the suggestion. I'm not sure how you're achieving it with tikzpicture etc. but it seems quite hacky. I prefer the bullets not being off to the side, and the other answers involving editing the \cventry command strike me as cleaner. However, thank you for changing my hacked margins to a minipage, that's something I needed to know about.
– Igid
Mar 5 '18 at 21:40

Is this what you want? I patched \cventry.

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage{changepage, calc}
\usepackage{enumitem, makecell}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\usepackage{import}

\name{John C.}{Lilly}

\renewcommand*{\cventry}[7][.25em]{\smallskip
\begin{tabular*}{\maincolumnwidth}[t]{@{}l@{\hskip\labelsep}l @{\extracolsep{\fill}}r@{}}%
\listitemsymbol & {\bfseries #4} & {\bfseries #5}\\%
& {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&#7&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#7%
\end{minipage}}\fi%
\begin{document}
\makecvtitle

\vspace{5pt}
Some text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

\cventry{1963--1967}{}{PhD Dolphinology}{University of Atlantis}{}{}
\vspace{-\dimexpr\baselineskip}
Over the course of my research I became fluent in dolphin communication, developing a transcription method which I subsequently used in the writing of my thesis.

\section{Publications}
\vspace{5pt}

\begin{itemize}
\item \textbf{Cetacean brains and higher-dimensional thought.}

My PhD thesis primarily outlines the contributions to the fields of multidimensional topology and geometry that can be gleaned from studying the latest discourses in dolphin mathematics.

\end{itemize}

\end{document}


• This is almost spot-on. I like that you just insert a \listitemsymbol into the table. However, I can't help noticing that the right margin of the \cventry now slightly overshoots that of the rest of the document. Is it that \labelsep is the wrong value in this context? I could always tweak it by a few points, but isn't there some other value defined by the environment that could be used?
– Igid
Mar 5 '18 at 21:47
• I've updated my code, because the right-hand text was not exactly at the right margin. I don't see any overshooting (you mean one the right, I suppose), and I've added a small piece of text to show it. The use of \labelsep is here just to mimick the layout of a real itemize environment. I don't see how it could have a side effect: I just added it in a new first column. Let me know whether the updated code fully fits what you want. Mar 5 '18 at 22:11
• Aha, well 'not exactly at the right margin' is what I meant by overshooting (that is, overshooting leftwards). So you fixed it! I was referring to your use of \labelsep in the \dimexpr in the 2nd argument to tabular - which it looks like you've removed, so it must've been the offender.
– Igid
Mar 5 '18 at 22:28
• I see. I don't think \dimexpr` has whatever to do with this, but anyway, I don't need it: it's the remnant of a previous attempt which I found too complex, and I simplified it. I've removed it from the code . Mar 5 '18 at 22:39