2

I would like to write a chemical formula, either using \ce{} from the mhchem package or without. It contains a dot like the multiplication sign \cdot from math. It means that for example Li is coordinated by O.

At the moment I am using Li\textperiodcentered OEt, the horizontal space around the dot is massive, is there a way to get rid of it and make it behave like a normal character?

One alternative solution would be to get rid of the horizontal space around $\cdot$.

Thanks for your help!

1 Answer 1

3

I'd use the chemformula package – it allows to control the spacing:

\documentclass{article}
\usepackage[version=4]{mhchem}
\usepackage{chemformula}
\begin{document}

\texttt{mhchem}: \ce{Li.O}

\texttt{chemformula}: \ch{Li.O}

\setchemformula{
  adduct-space = 0.1em % default setting is 0.1333em
}

\texttt{chemformula}: \ch{Li.O}

\end{document}

enter image description here

4
  • Thanks for helping, but I would like to get them closer together, still...
    – dabozz
    Commented Mar 6, 2018 at 10:19
  • 1
    @dabozz well, then use less then 0.1em (that's just an example I used , you can even use 0pt or negative spacing!)
    – cgnieder
    Commented Mar 6, 2018 at 10:31
  • Oh, I was not aware of that. In the end I used -0.2em. Thanks!
    – dabozz
    Commented Mar 7, 2018 at 12:48
  • This is really useful for adding the extra space lmodern and newcomputermodern add around the cdot (outlined in tex.stackexchange.com/a/294268/7880 )
    – Canageek
    Commented Dec 30, 2020 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .