I want to draw a triangular prism that should from the formatting point of view look like the following oktaeder
My starting point is this
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[dashed,thick] (-1,0) -- (0,0.5) edge (0,2.5) -- (1,0) coordinate(BR);
\draw[thick] (-1,0) coordinate(BL) rectangle (1,2) coordinate(TR)
-- (0,2.5) coordinate(T) -- (-1,2) coordinate(TL);
\foreach \X [remember=\X as \Y (initially TL),count=\Z] in {BL,BR,TR,T,TL}
{\path (\Y) -- (\X) node[midway,anchor={90*\Z-90-ifthenelse(\Z==4,45,0)-ifthenelse(\Z==5,45,0)}]{label \Z}; }
\end{tikzpicture}
\end{document}