When writing chemical formula I use both \chemfig{}
and \ce{}
commands but I noticed that the two bring outputs having different font style as shown below.
Currently working with these codes:
\documentclass[12pt,openany,twoside,fleqn]{book}
\usepackage{amsmath,chemfig}
\usepackage[version=3,arrows=pgf-filled]{mhchem}
\usepackage{mathspec}
\setmainfont{ITC Berkeley Oldstyle Std}
\setmathsfont(Digits,Greek,Latin){ITC Berkeley Oldstyle Std}
\begin{document}
\chemfig{CH_3CH_2CH_3} different font from \ce{CH3CH2CH3}
\end{document}
Kind help of how change the chemfig
font to ITC Berkeley Oldstyle Std.
\setmathrm{ITC Berkeley Oldstyle Std}
.\ce{}
uses the current text font. This is particularly useful for chemistry in section titles, where the text gets repeated in page headers and table of contents, each using another text font.