1

based on the accepted answer in this thread I did a few modifications. With one modifcation I'm running into problems:

I did this: image

But I want to omit the linebreak between the two items.

I took a part of the accepted answer and created a new command:

\newcommand*{\mycvdescriptiontabularwithitemize}[2]{\begin{tabularx}{\linewidth}{p{\mycolwidthtobedescribed} p{1em} X} %
    \begin{itemize}%
        \item %
        #1%
    \end{itemize}
    & & #2%
\end{tabularx}}%

I'm using this command here:

\newcommand*{\mycvdescriptionwithitemize}[3][.25em]{%
    \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
        \raggedleft\hintstyle{} &{\mycvdescriptiontabularwithitemize{#2}{#3}}%
    \end{tabular}%
    \par}

this is a modification of the command \cvitem provided by moderncv.

Where is the additional linebreak coming from and how can it be omitted?

The whole code:

%% start of file `template.tex'.
%% Copyright 2006-2015 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
% available at http://www.latex-project.org/lppl/.


\documentclass[11pt,a4paper,sans]{moderncv}        % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')

% moderncv themes
\moderncvstyle{classic}                             % style options are 'casual' (default), 'classic', 'banking', 'oldstyle' and 'fancy'
\moderncvcolor{blue}                               % color options 'black', 'blue' (default), 'burgundy', 'green', 'grey', 'orange', 'purple' and 'red'
%\renewcommand{\familydefault}{\sfdefault}         % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
%\nopagenumbers{}                                  % uncomment to suppress automatic page numbering for CVs longer than one page







% character encoding
%\usepackage[utf8]{inputenc}                       % if you are not using xelatex ou lualatex, replace by the encoding you are using
%\usepackage{CJKutf8}                              % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean

% adjust the page margins
\usepackage[scale=0.75]{geometry}

\usepackage{tabularx}
%\setlength{\hintscolumnwidth}{3cm}                % if you want to change the width of the column with the dates
%\setlength{\makecvheadnamewidth}{10cm}            % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...

% personal data
\name{John}{Doe}
\title{Resumé title}                               % optional, remove / comment the line if not wanted
\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and "country" arguments can be omitted or provided empty
\phone[mobile]{+1~(234)~567~890}                   % optional, remove / comment the line if not wanted; the optional "type" of the phone can be "mobile" (default), "fixed" or "fax"
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}                               % optional, remove / comment the line if not wanted
\homepage{www.johndoe.com}                         % optional, remove / comment the line if not wanted
\social[linkedin]{john.doe}                        % optional, remove / comment the line if not wanted
\social[xing]{john\_doe}                           % optional, remove / comment the line if not wanted
\social[twitter]{jdoe}                             % optional, remove / comment the line if not wanted
\social[github]{jdoe}                              % optional, remove / comment the line if not wanted
\social[gitlab]{jdoe}                              % optional, remove / comment the line if not wanted
\social[skype]{jdoe}                               % optional, remove / comment the line if not wanted
\extrainfo{additional information}                 % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{picture}                       % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
\quote{Some quote}                                 % optional, remove / comment the line if not wanted

% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
%   to show numerical labels in the bibliography (default is to show no labels)
%\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
%   to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}
    \newcommand{\mycolwidthtobedescribed}{2.7cm}

    \newcommand*{\mycvdescriptiontabularwithitemize}[2]{\begin{tabularx}{\linewidth}{p{\mycolwidthtobedescribed} p{1em} X} %
        \begin{itemize}%
            \item %
            #1%
        \end{itemize}
        & & #2%
    \end{tabularx}}%

        \newcommand*{\mycvdescriptionwithitemize}[3][.25em]{%
        \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
            \raggedleft\hintstyle{} &{\mycvdescriptiontabularwithitemize{#2}{#3}}%
        \end{tabular}%
        \par}   

% bibliography with mutiple entries
%\usepackage{multibib}
%\newcites{book,misc}{{Books},{Others}}
%----------------------------------------------------------------------------------
%            content
%----------------------------------------------------------------------------------
\begin{document}
%\begin{CJK*}{UTF8}{gbsn}                          % to typeset your resume in Chinese using CJK
%-----       resume       ---------------------------------------------------------
\makecvtitle

%\moderncvstyle{fancy}
\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be 
\subsection{Suff}
    \mycvdescriptionwithitemize{one item}{item is a thing}
    \mycvdescriptionwithitemize{another itme}{this item is interesting}


\end{document}


%% end of file `template.tex'.
0

1 Answer 1

1

For me it is not very clear what you want, but let's see if my guess can help ...

The following solution works if the added "item" is not too long. Your question does not make clear how to react if the included item is (very) long like:

\mycvdescriptionwithitemize{third item, which can be a problem}{this item is more interesting}

A workarround can be the following code (please see I deleted environment itemize):

\newcommand*{\mycvdescriptiontabularwithitemize}[2]{%
  \begin{tabularx}{\linewidth}{p{\mycolwidthtobedescribed} p{1em} X} %
    \listitemsymbol \quad #1% % <===========================================
     & & #2%
  \end{tabularx}}%

Now--depending on the value of \mycolwidthtobedescribed---you can create a itemize-like layout. But please see that this solution fails, if the text to be itemize-like is too long.

So we need to know, how long a item can be and how excactly do you want it to be layouted ...

With the following MWE

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

\moderncvstyle{classic}
\moderncvcolor{blue}
%\renewcommand{\familydefault}{\sfdefault}
%\nopagenumbers{}

\usepackage[scale=0.75]{geometry}

\usepackage{tabularx}
%\setlength{\hintscolumnwidth}{3cm}
%\setlength{\makecvheadnamewidth}{10cm}

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[xing]{john\_doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\social[gitlab]{jdoe}
\social[skype]{jdoe}
\extrainfo{additional information}
\photo[64pt][0.4pt]{example-image-a}
\quote{Some quote}


\newcommand{\mycolwidthtobedescribed}{2.7cm}

\newcommand*{\mycvdescriptiontabularwithitemize}[2]{%
  \begin{tabularx}{\linewidth}{p{\mycolwidthtobedescribed} p{1em} X} %
    \listitemsymbol \quad #1% % <===========================================
     & & #2%
  \end{tabularx}}%

\newcommand*{\mycvdescriptionwithitemize}[3][.25em]{%
  \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
    \raggedleft\hintstyle{} &{\mycvdescriptiontabularwithitemize{#2}{#3}}%
  \end{tabular}%
  \par}   


\begin{document}

\makecvtitle

%\moderncvstyle{fancy}
\section{Education}
\cventry{year--year}%
  {Degree}%
  {Institution}%
  {City}%
  {\textit{Grade}}%
  {Description}  % arguments 3 to 6 can be 

\subsection{Subsection}
\mycvdescriptionwithitemize{one item}{item is a thing}
\mycvdescriptionwithitemize{another item}{this item is interesting}
\mycvdescriptionwithitemize{third item, which can be a problem}{this item is more interesting}

\end{document}

you get the following result:

resulting pdf

2
  • Hello again :) Thank you for your guess. You gussed right. Basicly \listitemsymbol was the command i didn't know. Your solution works but do you know the exact distance betweeen the \listitemsymbol and the following text in itemize? On a other place i already used itemize and i'd like to make it look the same. i looked in the enumitem-doc. It seems i have to define a variable for this spacing, haven't i? (pg. 5)
    – himynameis
    Commented Nov 27, 2017 at 0:34
  • update: i think with removing of the \quad it is the same distance as in itemize.
    – himynameis
    Commented Nov 27, 2017 at 0:45

You must log in to answer this question.

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