Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Joseph Wright Jul 24 '12 at 20:42
    
I'll do it next time, Thanks. –  Thomas C Jul 24 '12 at 20:44
    
Can you add an example of usage? With a \documentclass command and the necessary packages. –  egreg Jul 24 '12 at 20:58

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer
    
It works fine, thanks –  Thomas C Jul 24 '12 at 21:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.