I'm starting to manipulate \newcommand, so far everything is okay except for connecting two commands made with tikz. As shown on the picture below, there's a gap between the lines. How to fix that ?
\usepackage{tikz}
\newcommand{\motor}{
\begin{tikzpicture}
\node [circle,draw,inner sep=0.5cm] at (0,0) (a) {M};
\draw (a.north) -- (0,1.5);
\end{tikzpicture}
}
\begin{document}
\begin{tikzpicture}
\node at (0,0) (m1) {\motor};
\node at (4,0) (m2) {\motor};
\draw (m1.east) -- (m2.west);
\draw [red] (m1.north) -- (0,2) -- (4,2) -- (m2.north);
\end{tikzpicture}
\end{document}


tikzpictures... https://tex.stackexchange.com/questions/47377/proper-nesting-of-tikzpicture-environments-reset-all-pgf-values-to-their-defaul. Better learn how to usepic: https://tex.stackexchange.com/questions/241719/name-tikz-pic-as-if-it-was-a-node – Rmano May 31 '20 at 09:44\documentclass{article}makes it a quite nice minimal working example (MWE)... – Rmano May 31 '20 at 10:02