4

I am trying to achieve the same in the attached image. Following is my attemptenter image description here

\documentclass[conference]{IEEEtran}
\usepackage[demo]{graphicx}
\usepackage{tikz,pgfplots,pgfplotstable}
\usepackage{xparse}

\NewDocumentCommand\DownArrow{O{2.0ex} O{black}}{%
\mathrel{\tikz[baseline] \draw [<-, line width=0.5pt, #2] (0,0) -- ++(0,#1);}
}
\begin{document}

\begin{enumerate}
\item This is the fist point

\begin{minipage}{.2\textwidth}
    \begin{itemize}
        \item Component 1
        \item Component 2
        \item Component 3
        \item Component 4
    \end{itemize}
\end{minipage}
\begin{minipage}{.2\textwidth}
    $\DownArrow[60pt][>=latex,red, ultra thick] minimum weight$
\end{minipage}

\item This is the second point. 

\end{enumerate}

\end{document}

To obtain downarrow, code give in the following link is used How to elongate down arrow?

Given picture will be a part of a list as shown in the code (enumerate).

6

I would take a different route, using tikzmark and pgf keys. This allows you to add options as much as you want without changing the syntax. You only need to make the items \tikzmarknodes and then use the \DownArrow as illustrated in the MWE:

\documentclass[conference]{IEEEtran}
\usepackage[demo]{graphicx}
\usepackage{tikz}
\usetikzlibrary{tikzmark,fit,positioning}
\tikzset{DownArrow/.cd,x sep/.initial=1em,arrow/.style={-latex,red, ultra
thick},label sep/.initial=0em and 0.5em,label/.style={}}
\newcommand{\DownArrow}[5][]{%
\begin{tikzpicture}[overlay,remember picture,DownArrow/.cd,#1]
\def\pv##1{\pgfkeysvalueof{/tikz/DownArrow/##1}}
\node[fit=(#2)(#3),inner sep=0pt] (Faux){};
\draw[/tikz/DownArrow/arrow] ([xshift=\pv{x sep}]Faux.north east) 
node[below right=\pv{label sep},/tikz/DownArrow/label] {#4}
 -- ([xshift=\pv{x sep}]Faux.south east) 
 node[above right=\pv{label sep},/tikz/DownArrow/label] {#5};
\end{tikzpicture}}
\begin{document}

\begin{enumerate}
\item This is the fist point

 \begin{itemize}
        \item \tikzmarknode{1}{Component 1}
        \item Component 2
        \item Component 3
        \item \tikzmarknode{4}{Component 4}%
        \DownArrow[label/.style={text=blue}]{1}{4}{First}{Last}
 \end{itemize}




\item This is the second point. 

 \begin{itemize}
        \item \tikzmarknode{1'}{Component 1}
        \item Component 2
        \item Component 3
        \item \tikzmarknode{4'}{Component 4}%
        \DownArrow[x sep=2em,arrow/.style={-stealth,very thick,blue}]{1'}{4'}{First}{Last}
 \end{itemize}

\end{enumerate}

\end{document}

enter image description here

| improve this answer | |
  • Very nice code and output! – manooooh Dec 15 '19 at 0:53

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.