0

I am trying to work with the modiagram package, and it doesn't work. It isn't even running the code that I copied directly from the package documentation. This is the code that I copied:

\begin{modiagram}
 \atom{left}{
    1s = {   0; pair} ,
    2s = {   1; pair} ,
    2p = {1.5; up, down }
 }
\end{modiagram}

It results in the following error:

> \l__modiagram_atom_two_s_dim=28.45274pt.
<recently read> }
2
2

For some reason, a \dim_show:N instruction found its way in the .sty file.

Until the package is updated one can fix the issue by injecting code that makes LaTeX to ignore the wrong tokens.

\documentclass{article}
\usepackage{modiagram}

\ExplSyntaxOn
\cs_set:Nx \__modiagram_two_s:
 {
  \exp_not:N \use_none:nn
  \exp_not:o { \__modiagram_two_s: }
 }
\ExplSyntaxOff

\begin{document}

\begin{modiagram}
 \atom{left}{
    1s = {   0; pair} ,
    2s = {   1; pair} ,
    2p = {1.5; up, down }
 }
\end{modiagram}

\end{document}

Remove the code from \ExplSyntaxOn up to \ExplSyntaxOff (both included) when the package is updated to fix the bug.

This holds for modiagram 2019/10/31 v0.3.

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.