This question is related to a question I asked here:

How to reproduce typesetting of coupling constant in chemmacros

There I was using libertine with newtxmath and beramono together with the chammacros package to typeset data for a report. When doing so, I noticed that different equal (=) signs appear. I found that this comes from an equal sign being either used in math mode or in normal mode. But how do I get rid of this, in general and in the particular context of chemmacros.

Here is a MWE:


\usepackage{chemmacros}[2014/01/29] % use version 4
  delta = (ppm) ,
  pos-number = side ,
  format = \bfseries,
  list=true ,
  coupling-pos-cs = \ensuremath ,
  atom-number-cs = \ensuremath    
  separate-uncertainty ,
  per-mode = symbol ,
  range-phrase = -- ,
  detect-mode = false ,
  detect-weight = true ,
  mode = text ,
  text-rm = \libertineLF % use libertine with lining figures


First with `chemmacros`

\NMR(400)[C6D6] \val{2.01} (d, \J(1;CH)[Hz]{25.0}, \#{24}, \pos{5})

Then without:

This is an equal = and this too $ = $.


As one can see, the signs are equal in size and shape.


  • 1
    This is clearly an error in chemmacros: it should use math mode. I'll fix it with the next update. (Actually it is a bad design decision of me: I shouldn't have added the possibility of adding an equal sign automatically in the first place but, well, here we are...) – cgnieder Mar 11 '14 at 22:39

Your document produces

$ grep "=$" eq11.log
....\T1/LinuxLibertineT-TLF/m/n/10 =
....\U/ntxmia/m/it/10 =
....\T1/LinuxLibertineT-TLF/m/n/10 =
....\U/ntxmia/m/it/10 =

that is tow = in one font and two in another, so there is no particular reason why the glyphs should be alike at all. In general you should always use $=$ to get the math equals, just as discussed recently on a question you should use $123$ to get digits. With the default computer modern font setup = and digits are the same in text and math as thy come from the text roman font, but as you see here if you set up text and math fonts to be different, then differences become noticeable.

You could configure chemmacros to use the math font (I assume) or alternatively:

If you want them all to be the same without changing all the fonts it's probably easiest to change the math = to use the text font so restore the default definition: Add


after loading newtxmath then you get

$ grep "=$" eq11.log
....\T1/LinuxLibertineT-TLF/m/n/10 =
....\T1/LinuxLibertineT-TLF/m/n/10 =
....\T1/LinuxLibertineT-TLF/m/n/10 =
....\T1/LinuxLibertineT-TLF/m/n/10 =
  • 2
    This would ruin symbol built with repeated equals sign, such as \Longrightarrow. Just to make it known; in case they're needed one has to change their definition. – egreg Mar 11 '14 at 21:12
  • Thank you. I have just checked the documentation of chemmacros where I believe the author is using the same settings as I am for my report. The same issues are visible there, for example on page 38, link – Vlad030691 Mar 11 '14 at 21:25

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.