6

How does I create an image like the one shown under this text directly in the LaTeX document? I have tried with TikZ, but I can only make boxes with the arrows inside, and not exactly like the image. I have to draw how the electrons are distributed in an d-orbital and it has to be as the shown here.

electron configuration

6

As far as I understand, you dislike TikZ, but accept any LaTeX packages.

In the following solution all parameters are exemplary, as I don't know the proper usage of your orbital. You can certainly customize them.

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{ulem}
\usepackage{graphics}

\begin{document}

\def\orbud{\scalebox{3}{\sout{$\;\upharpoonleft \,\downharpoonright\;$}\quad } }

\def\orbu{\scalebox{3}{\sout{$\;\;\upharpoonleft \;\;$}\quad }}

All parameters are to customize

\bigskip

\begin{tabular}{c}
\orbud \orbu\\[2em]
 \orbu  \orbu  \orbu
\end{tabular}

\end{document}

enter image description here

  • Why not just a simple raised rule instead of striking out? – percusse Nov 13 '14 at 4:25
  • @percusse To make the code as simple, as possible, even if additional packages must be loaded. A simple version for a new user. – Przemysław Scherwentke Nov 13 '14 at 5:34
  • Thanks. I do not dislike the tikz, I just could not get it to be as I needed. This is simpel, and does not fill much, which is quite nice. I have been using LaTeX for a few years but simpel and easy and nothing fancy. But thanks again :) – Maria Nov 13 '14 at 9:04
  • rule doesn't need ulemso you can remove even that. – percusse Nov 13 '14 at 11:17
2

With tikz:

\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
  \begin{tikzpicture}[line width=0.2pt]
    \draw (0,0) -- (1.8ex,0);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (0.6ex,-0.6ex) -- (0.6ex,0.6ex);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (1.2ex,0.6ex) -- (1.2ex,-0.6ex);
    \begin{scope}[xshift=1cm]
    \draw (0,0) -- (1.8ex,0);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (0.9ex,-0.6ex) -- (0.9ex,0.6ex);
    \end{scope}
  \end{tikzpicture}
\end{document}

enter image description here

When used inline with text,

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
  Some text
  \begin{tikzpicture}[line width=0.3pt]
    \draw (0,0) -- (1.8ex,0);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (0.6ex,-0.6ex) -- (0.6ex,0.6ex);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (1.2ex,0.6ex) -- (1.2ex,-0.6ex);
    \begin{scope}[xshift=1cm]
    \draw (0,0) -- (1.8ex,0);
    \draw [arrows = {-Straight Barb[left,scale=0.5]}] (0.9ex,-0.6ex) -- (0.9ex,0.6ex);
    \end{scope}
  \end{tikzpicture}
\end{document}

enter image description here

Here you may adjust the baseline suitably if you want.

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.