How to make the below arrows in latex
The suggested duplicate is a vertical tree and I don't need that I just need a horizontal two arrows
How to make the below arrows in latex
The suggested duplicate is a vertical tree and I don't need that I just need a horizontal two arrows
You can use this as a starting point.
Adjust text size and type as you see fit. Read about different arrowheads by looking up arrows.meta for example in this question.
Here's the code.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\[
\begin{tikzpicture}
\draw[{Latex[length=2mm,width=2mm]}-{Latex[length=2mm,width=2mm]}]
(5,.75)node[right]{\Large\textsf{K-means}}
-- (0,0)node[left]{\Large\textsf{\begin{tabular}{c}Squared-\\error\end{tabular}}}
-- (5,-.75)node[right]{\Large\textsf{\begin{tabular}{c}Kernel\\K-means\end{tabular}}};
\end{tikzpicture}
\]
\end{document}
If you want to connect some elements of a text by arrows, you may want to do it this way.
\documentclass{article}
\usepackage{tikz}
\newcommand{\tikznode}[2]{%
\ifmmode%
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {$#2$};%
\else
\tikz[remember picture,baseline=(#1.base),inner sep=0pt] \node (#1) {#2};%
\fi}%from https://tex.stackexchange.com/questions/402462/tikz-equivalent-of-pstricks-commands-ncbar-and-rnode/402466#402466
\begin{document}
\begin{flushright}
\tikznode{km}{K--means}
\end{flushright}
\tikznode{se}{\begin{tabular}{c}
squared\\ error
\end{tabular}}
\begin{flushright}
\tikznode{ke}{\begin{tabular}{c}
Kernel\\ K--means
\end{tabular}}
\end{flushright}
\tikz[overlay,remember picture]{\draw[->] (se.east)--(km.west);
\draw[->] (se.east)--(ke.west);}
\end{document}
pure tikz solution. used is positioning library for positioning of nodes:
\documentclass[tikz, margin=3mm]{standalone}% very suitable for test of image drawings
\usetikzlibrary{arrows.meta, positioning}
\begin{document}
\begin{tikzpicture}[
node distance = 0mm and 22mm, % vertical and horizontal distances between nodes
mynode/.style = {align=center, font=\sffamily}
]
% nodes
\node (n1) [mynode] {Squared-\\error};
\node (n21) [mynode,above right=of n1] {K-means};
\node (n22) [mynode,below right=of n1] {Kernel\\ K-means};
% arrow
\draw[Triangle-Triangle] (n21.west) -- (n1.east) -- (n22.west);
\end{tikzpicture}
\end{document}
biblatex? – Bernard Dec 07 '17 at 22:44\documentclass, includes all relevant\usepackagecommands, ends with\end{document}and compiles without errors, even if it does not produce your desired output. – Sandy G Dec 07 '17 at 22:48\nodecommand. Undoubtedly someone will soon post a complete solution, but in the future it's much better for you and the site if you make an effort to solve as much of the problem yourself as possible. – Sandy G Dec 07 '17 at 22:53