1

I'm trying to vertically align these two but the itemized list seems to start from the next line. How could I make them look in the same line?

\newcommand{\mhead}[1]{\leavevmode\marginpar{\sffamily\footnotesize #1}}
\bigskip
\mhead{Professional \newline Experiences}%
\begin{itemize}[label=$\diamond$]
\item item1
\item item2
\item item3
\end{itemize}

here is what it looks like now: enter image description here

6
  • what about \item\mhead{Professional \newline Experiences} item1? – touhami Aug 23 '15 at 5:31
  • and do you realy want to use \marginpar? – touhami Aug 23 '15 at 5:32
  • You should do this: \documentclass{article} \usepackage{lipsum} \usepackage{marginnote} \usepackage{enumitem} \newcommand{\mhead}[1]{\marginnote{\sffamily\footnotesize #1}} \reversemarginpar \begin{document} \lipsum \begin{itemize}[label=$\diamond$] \item item1 \mhead{Professional \\ Experiences}% \item item2 \item item3 \end{itemize} \end{document} – user11232 Aug 23 '15 at 5:38
  • 1
    \item\mhead{...}item1 (without space after the macro) – Fran Aug 23 '15 at 5:39
  • @Fran Thnx, it did work. – DevilMayCry Aug 23 '15 at 7:34
1

enter image description here

As stated in the comments,\mhead{} should be inside the first item. Any place within the item is good as long it remains in the first line. Therefore the safest place is just after \item, but note that space after the macro is not ignored, i.e., use \item\mhead{}xxx or \item \mhead{}xxx but not \item\mhead{} xxx

\documentclass[twoside]{article}
\usepackage{enumitem,xcolor,libertine}
\usepackage[lmargin=3in]{geometry}  
\newcommand{\mhead}[1]{%
\leavevmode\marginpar{\footnotesize\textsc{\textcolor{red!50!black}{#1}}}}
\def\mrule{\marginpar{\color{gray!40}\rule{6cm}{1pt}}}
\reversemarginpar

\begin{document}

\mrule

\begin{itemize}[label=$\diamond$, leftmargin=-4em]
\item \mhead{Professional \newline Experiences}item1
\item item2
\item item3
\end{itemize}

\mrule

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.