2

I was using chemstyle package, but for some utilities I moved to chemnum. With chemstyle I used

\renewcommand*{\schemerefformat}{\fontsize{8pt}{8pt}\textbf{}}

in order to reduce the font size of numbers in schemes. I couldn't find this option or equal in chemnum which use \cmpdref{key} to label a molecule.

Is there a way reduce the font size in \cmpdref?

3

For versions prior to version 1.0

In the chemnum package the format is controlled by three options: cmpd-style and ref-style which control the standard form and the form placed with \cmpdref and cmpd-weight which sets the labels bold or normal for both. All of them can be set with \cmpdsetup:

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemnum}
\usepackage{relsize}

\cmpdsetup{
  cmpd-style=\textsmaller,
  ref-style=\sffamily\textsmaller,
  cmpd-weight=normal}

\begin{document}

Text \cmpd{blah} Text

\cmpdref{test}
\cmpdref{blub}
\includegraphics{./scheme-tmp.ps}

\end{document}

enter image description here


For version 1.0

With version 1.0 (released 2014/03/12) there have been a number of changes both to commands and options. Here is a solution for version 1.0:

% arara: pdflatex: { shell: on }
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemnum}
\usepackage{relsize}

\setchemnum{
  format = \smaller ,
  replace-style = \sffamily , % this acts /additionally/ to format!
}

\begin{document}

Text \cmpd{blah} Text

\replacecmpd{test}
\replacecmpd{blub}
\includegraphics{./scheme-tmp.ps}

\end{document}

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.