In a document, I would like to vertically align cell text. The only problem is that my array is contained in a begin {circuitikz} so the few tests I was able to do (with begin {center} in particular) don't work.
Can you help me ?
\documentclass[border=2mm]{standalone}
usepackage{multirow}
\usepackage[utf8]{inputenc}
\usepackage[siunitx, european, straightvoltages, RPvoltages]{circuitikz}
\begin {document}
\begin{circuitikz}
\node at (0,0)
{\begin{tabular}{|c|c|c|c|}
\hline
Type & Composant & Code & Image résultant\
\hline
\multirow{7}{*}{Alimentation} & pile & to[battery1] & \begin{circuitikz} \draw (0,0) to[battery1] (2,0);\end{circuitikz} \
\cline{2-4}
& source de courant & to[isource] & \begin{circuitikz} \draw (0,0) to[isource] (2,0);\end{circuitikz} \
\cline{2-4}
& source de tension & to[vsource] & \begin{circuitikz} \draw (0,0) to[vsource] (2,0);\end{circuitikz} \
\cline{2-4}
& source sinusoidale & to[sV] ou to[vsourcesin] & \begin{circuitikz} \draw (0,0) to[sV] (2,0);\end{circuitikz} \
\cline{2-4}
& source sinusoidale & to[sV] ou to[vsourcesin] & \begin{circuitikz} \draw (0,0) to[sV] (2,0);\end{circuitikz} \
\cline{2-4}
& source créneau & to[sqV] ou to[vsourcesquare] & \begin{circuitikz} \draw (0,0) to[sqV] (2,0);\end{circuitikz} \
\cline{2-4}
& source triangulaire & to[tV] ou to[vsourcetri] & \begin{circuitikz} \draw (0,0) to[tV] (2,0);\end{circuitikz} \
\hline
\end{tabular}
};
\end{document}

\tikzset{ baseline=(current bounding box.center)}should help to vertically center the contents of the second column with respect to the third column. – leandriis Jan 25 '21 at 21:35tikzpictureand/orcircuitikzenvironments. – Skillmon Jan 25 '21 at 21:37tikzpicture(and circuitikz are the same as them) is going to explode before or later: https://tex.stackexchange.com/questions/47377/proper-nesting-of-tikzpicture-environments-reset-all-pgf-values-to-their-defaul – Rmano Jan 25 '21 at 21:39tabularin a node, but you can't put atikzpicturein that tabular. The form of having tabulated material in atikzpicureis to use amatrixelement. In this case, @Zarko answer is the correct one in my opinion. – Rmano Jan 26 '21 at 07:52