2

It would be really helpful if someone could tell me how to write this electronic configuration in LaTeX.enter image description here

Stefan Pinnow
  • 29,535

2 Answers2

6

enter image description here

\documentclass{article}
\usepackage{modiagram}
\usetikzlibrary{positioning}

\newcommand{\annotation}[3][Cl]{\draw[<-,shorten >=5pt, latex-, thick] (#2.-90) -- ++ (0,-0.75) node {\bfseries #1};\node[above=-12pt of #2] {#3};} \newcommand{\orbitaltitle}[2]{\node[above=5pt of #1] {\bfseries #2};}

\begin{document}

\begin{modiagram}[style=square] \AOA{p}{0;pair, pair,pair} \AOB{s}{0;up} \AOC{s}{0;up} \orbitaltitle{Az}{3d\textsuperscript{8}}

\AOD{s}{0;} \annotation{D}{:} \orbitaltitle{D}{4s}

\AOE{p}{0;, ,} \annotation{Ex}{:} \annotation{Ey}{:} \annotation{Ez}{:} \orbitaltitle{Ey}{4p}

\end{modiagram}

\end{document}


Here is a modified version without horizontal gaps between the individual orbitals of a set:

enter image description here

\documentclass{article}
\usepackage{modiagram}
\usetikzlibrary{positioning}

\newcommand{\annotation}[3][Cl]{\draw[<-,shorten >=5pt, latex-, thick] (#2.-90) -- ++ (0,-0.75) node {\bfseries #1};\node[above=-12pt of #2] {#3};} \newcommand{\orbitaltitle}[2]{\node[above=5pt of #1] {\bfseries #2};}

\begin{document}

\begin{modiagram}[style=square] \AOA1{s}{0;pair} \AOA2{s}{0;pair} \AOA3{s}{0;pair} \AOA4{s}{0;up} \AOA5{s}{0;up} \orbitaltitle{A3}{3d\textsuperscript{8}}

\AOB{s}{0;} \annotation{B}{:} \orbitaltitle{B}{4s}

\AOC1{s}{0;} \AOC2{s}{0;} \AOC3{s}{0;} \annotation{C1}{:} \annotation{C2}{:} \annotation{C3}{:} \orbitaltitle{C2}{4p}

\end{modiagram}

\end{document}

leandriis
  • 62,593
3

Looks like the answer is "yes", you can write this bond diagram in Latex. Problem is to find the one most suitable to you.

I suggest scanning ctan.org, perhaps best via google, like this: ctan valence bond . Also switch to the image-search, which sometimes better narrows down to what you are after.

If you search directly at CTAN e.g. for chemistry, it can be a bit overwhelming: https://ctan.org/topic/chemistry?lang=en .

Searching for bond at CTAN directly yields the bondgraph package, which might provide, what you want: please check its documentation. https://ctan.org/pkg/bondgraph Or bondgraphs: https://ctan.org/pkg/bondgraphs .

Expanding the google search term above into ctan latex valence bond electrons resulted in chemfig, https://mirror.marwan.ma/ctan/macros/generic/chemfig/chemfig-en.pdf . It also may appear overwhelming, but to me looks like it provides the building blocks you need.

If all this turns out to bee too much, you still can fall back to package tikz and just draw it. Or you do an old layout-trick, use a table for positioning and hide all its rules ... which might not be the best way to do it.

From a tactical point of view perhaps it's good to start with a bad solution, e.g. even as plain text in ugly presentation, just to continue, and replace later by a much better representation.

P.S.: Also try entering 'chem' into the tag-search ... it might give you further hints.

MS-SPO
  • 11,519