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 am working on a proposal for a class. I am using the documentclass nih. I put in figures of chemical structures using bpchem (see example). When I just use \documentclass{nih}, everything works fine, but the font is tiny. If I use \documentclass[11pt]{nih}, the structuctures are messed up (see screenshots). How can I fix this/ is there a workaround?

\documentclass[11pt]{nih} 
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{bpchem}
\usepackage[journal=rsc, tracking=bpchem]{chemstyle}
\usepackage[version=3]{mhchem}

\begin{document}

\begin{figure}
    \begin{center}
        \schemeref[TMP]{spermine}
        \schemeref[TMP2]{cb6}
        \includegraphics{structures.eps}
    \end{center}
\end{figure}

\CNlabelnoref{spermine}
\CNlabelnoref{cb6}

\end{document} 

What it looks like with [11pt]: 11pt

What it is supposed to look like/ looks like with only \documentclass{nih}: without 11pt

share|improve this question
1  
In the nih class the option 11pt is defined as \DeclareOption{11pt}{\AtEndOfClass{\RequirePackage{helvet}\renewcommand{\family‌​default}{\sfdefault}}}. A quick test shows that placing \renewcommand{\familydefault}{\rmdefault} in the preamble cures the problem. I have no idea why the EPS text is screwed otherwise, though. –  cgnieder Dec 13 '12 at 17:23
    
That fixes it. If you post this as an answer, I can accept. –  Helen Dec 13 '12 at 17:27

2 Answers 2

up vote 2 down vote accepted

The class nih has the (to me rather strange) definitions

\DeclareOption{12pt}{%
  \AtEndOfClass{\RequirePackage{helvet}\renewcommand{\familydefault}{\sfdefault}}}
\DeclareOption{11pt}{%
  \AtEndOfClass{\RequirePackage{helvet}\renewcommand{\familydefault}{\sfdefault}}}

It is kind of unexpected that specifying an option for the font size automatically changes the font family... but then the author also hard-coded his name into the class (\newcommand{\nih@PIname}{Donald, Bruce R.}, used in the header later) so it is probably meant for personal use anyway, and he shouldn't be suprised...

The option definitions suggest a way around. Placing

\renewcommand{\familydefault}{\rmdefault}

in the preamble or using different sans serif font solves the problem.

This leaves the question why the text in the EPS was messed up. I don't have an answer but found the following hints:

  • the font used in the EPS I tested this with (a ChemDraw figure) also was Helvetica; it looks like the EPS used by the OP does that, too
  • the changes only appeared when the Helvetica font was chosen, \sffamily was active, and \psfrag (either directly or hidden in \schemeref) was used to replace text in the EPS with another text.
share|improve this answer

I had a similar problem with .eps files, which use Helvetica. As soon as I use \usepackage{helvet} and \sffamily, the .eps images are screwed up. The problem seems to be the NimbusSans font, which is a free Helvetica replacement. I could solve this problem by doing:

updmap --setoption dvipsDownloadBase35 true --setoption LW35 ADOBEkb --force

(For some reason I had to do this twice: The first time updmap still used default settings, which are URWkb instead of ADOBEkb)

share|improve this answer

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.