I am having increasing success with XyMTeX - but keep running into the same problem with specifying lone pair locations using either \lonepairA
or \lonepairB
.
When ever I add optional locations for less than four lone pairs, the compiler hangs and I have to stop it with errors.
Without the optional specification I get four lone pairs that overlap with bonds.
\documentclass[varwidth]{standalone}
\usepackage{xymtexpdf}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{unicode-math}
\setmainfont{Source Sans Pro}
%\setmathfont{Latin Modern Math}% default setting
\setmathfont{latinmodern-math.otf}
\setmathfont[range={up,it}]{Source Sans Pro}
% fix the issue with \smash
\def\dotnodimension{\hbox{\smash{\hbox to0pt{\hss.\hss}}}}
%%
\begin{document}
% I only want / need lonepairs at two positions.
%This crashes the compiler
% \begin{XyMcompd}(800,500)(-150,50){}{}
% \Ltrigonal{0==C;1D==\lonepairB[12]{O};2==A;3==B}
% \end{XyMcompd}
%This works, but produces lonepairs that are unwanted
\begin{XyMcompd}(800,500)(-150,50){}{}
\Ltrigonal{0==C;1D==\lonepairB{O};2==A;3==B}
\end{XyMcompd}
\end{document}