1

I have seen some other postings about related electron configurations, but nothing that matched what I was looking for. I'm wanting to create the following image:

enter image description here

  • 5
    Welcome to TeX.SE! It is straightforward to draw this, e.g. using the matrix library of TikZ or using tikzmark and an ordinary table. Note, however, that generally users here are not too eager to punch in the texts from a screen shot. – marmot Feb 20 at 20:26
  • 2
    Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – dexteritas Feb 20 at 20:39
9

One out of many ways to do something of this sort.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{matrix,intersections,calc}
\begin{document}
\begin{tikzpicture}[font=\sffamily] 
\matrix (mat) [matrix of nodes,column sep=0.2cm,row sep=2mm,
 nodes={align=left},nodes in empty cells,
 row 1/.append style={nodes={font=\footnotesize\sffamily}},
 ]{
 & 1 & 6 & 10 & 14 \\
 & 1s & & & \\
 & 2s & 2p & & \\
 & 3s & 3p & 3d & \\
 & 4s & 4p & 4d & 4f\\
 & 5s & 5p & 5d & 5f\\
 & 6s & 6p & 6d & \\
 & 7s & 7p & 7d & \\
 };
 \path[name path=boundary] (mat-1-1.south) -- (mat-1-3.south)
 to[bend right] (mat-2-4.south) -- ([xshift=15mm]mat-5-5.south)
  -- (mat.south east);
 \foreach \X [remember=\X as \LastX] in {2,...,10}
 {\ifnum\X<8
    \path[overlay,name path=\X-line] (mat-\X-1.south west) coordinate(\X-start) 
    -- ++ ($5*($(mat-2-5.south west)- (mat-6-1.south west)$)$);
  \else
    \pgfmathtruncatemacro{\Xprime}{\X-7}
    \path[overlay,name path=\X-line] 
    ([xshift={-ifthenelse(\X==10,2,1)*1mm}]mat-8-\Xprime.south east) 
    coordinate(\X-start) -- ++ ($5*($(mat-2-5.south west)- (mat-6-1.south west)$)$);
  \fi   
  \draw[blue!50,latex-,shorten <=2pt,name intersections={of=\X-line and boundary,by=i-\X}]
  (\X-start)--(i-\X);
  \ifnum\X>2
   \draw[blue!50,dashed] (i-\X) to[out=160+3*\X,in=5] (\LastX-start);
  \fi
  }
\end{tikzpicture}
\end{document}

enter image description here

Or with somewhat more compelling arrows.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{matrix,intersections,calc}
\begin{document}
\begin{tikzpicture}[font=\sffamily] 
\matrix (mat) [matrix of nodes,column sep=0.2cm,row sep=2mm,
 nodes={align=left},nodes in empty cells,
 row 1/.append style={nodes={font=\footnotesize\sffamily}},
 ]{
 & 1 & 6 & 10 & 14 \\
 & 1s & & & \\
 & 2s & 2p & & \\
 & 3s & 3p & 3d & \\
 & 4s & 4p & 4d & 4f\\
 & 5s & 5p & 5d & 5f\\
 & 6s & 6p & 6d & \\
 & 7s & 7p & 7d & \\
 };
 \path[name path=boundary] (mat-1-1.south) -- (mat-1-3.south)
 to[bend right] (mat-2-4.south) to[bend left] ([xshift=6mm]mat-5-5.south)
  -- (mat.south east);
 \foreach \X [remember=\X as \LastX] in {2,...,10}
 {\ifnum\X<8
    \path[overlay,name path=\X-line] 
    ($(mat-\X-2.south west)-0.1*($(mat-2-5.south west)- (mat-6-1.south west)$)$) coordinate(\X-start) 
    -- ++ ($5*($(mat-2-5.south west)- (mat-6-1.south west)$)$);
  \else
    \pgfmathtruncatemacro{\Xprime}{\X-6}
    \path[overlay,name path=\X-line] 
    ($(mat-8-\Xprime.south west)-0.1*($(mat-2-5.south west)- (mat-6-1.south west)$)$) 
    coordinate(\X-start) -- ++ ($5*($(mat-2-5.south west)- (mat-6-1.south west)$)$);
  \fi   
  \draw[blue!50,latex-,shorten <=2pt,name intersections={of=\X-line and boundary,by=i-\X}]
  (\X-start)--(i-\X);
  \ifnum\X>2
   \draw[blue!50,dashed,overlay] 
   let \p1=($(mat-2-5.south west)- (mat-6-1.south west)$),\n1={atan2(\y1,\x1)} in
   (i-\X) to[out=\n1,in=180+\n1] (\LastX-start);
  \fi
  }
\end{tikzpicture}
\end{document}

enter image description here

  • 3
    I should remember remember=\X as \LastX. – Sigur Feb 20 at 22:21

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.