1

First of all I am new to asking questions here.

Second, I am writing a document where I need to import an .eps file to have my scheme. My document is set to use Times New Roman at 12pt, but I want the labels of the schemes to be Times New Roman at 10pt. I was using bpchem to keep track of the numbering using chemstyle, however I need to have chapters and the structures in chapter one should be numbered as 1.XXX and for chapter two 2.XXX and so on for the next chapters, so I changed to chemnum. With chemstyle it was as easy as adding in the preamble \renewcommand*{\schemerefformat}{\fontsize{10}{12}}, but I have no idea how to do change the font type to Times New Roman 10pt only for the EPS files, while keeping Times New Roman 12pt in the rest of the document. Can anybody help me? This is the link for DA

https://www.dropbox.com/s/0nmvt84yuzke5rq/DA.eps

and this is the one for DA2

https://www.dropbox.com/s/sg2qwmrsaytsuqv/DA2.eps

Thanks in advance.

I hope this is a good minimal working example

\documentclass[onehalfspacing,12pt]{book}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage[margin=1in]{geometry}
\usepackage{tgtermes} %sets font to Times New Roman
\usepackage[format=hang,labelfont={bf},margin=1em,labelsep=period,textformat=period]{caption}
\usepackage{psfrag}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{bpchem}
\usepackage{chemnum}
\usepackage{chemstyle}
\usepackage[version=3]{mhchem}

\makeatletter
\newcmpdcounterformat{chapter}{\thechapter.\@arabic} %this adds the chapter number to the structure numbering
\makeatother
\setchemnum{
  replace-style = \rmfamily ,
  counter-within = chapter ,
  counter-format = chapter % use new counter format
}


\begin{document}

\chapter{Chapter1}

This is just an example of a Diels Alder (DA) rxn, you need a diene (\refcmpd{Diene}) and a dienophile (\refcmpd{Dienophile}) to produce a cyclohexene derivative such as \refcmpd{DAadduct}.

 \begin{scheme}[!h]
    \replacecmpd{Diene}
    \replacecmpd{Dienophile}
    \replacecmpd{DAadduct}
    \includegraphics{DA}
    \caption{A DA run not likely to take place}
    \label{fig:DA}
  \end{scheme}

  \chapeter{Chapter2}

  To have a successful DA rxn, one must have an electron deficient diene (\refcmpd{EDdiene}) and an electron rich dienophile (\refcmpd{ERdienophile}) to successfully generate a cyclohexene derivative, in this case \refcmpd{Daadduct.a}

   \begin{scheme}[!h]
    \replacecmpd{EDdiene}
    \replacecmpd{ERdienophile}
    \replacecmpd{DAadduct.a}
    \includegraphics{DA2}
    \caption{A DA run very likely to take place}
    \label{fig:DA2}
  \end{scheme}

  This was just an example.

  \end{document}
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – user11232 Apr 20 '14 at 1:14
  • 1
    Does replace-style = \fontsize{10}{12}\rmfamily, help? – user11232 Apr 20 '14 at 1:27
  • It worked like a charm, I was adding a comma between \fontsize{10} and \rmfamily!! Thank you so so much!!!!!! – amsterzone Apr 20 '14 at 2:01
3

You can use

replace-style = \fontsize{10}{12}\rmfamily,

Code:

\documentclass[onehalfspacing,12pt]{book}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage[margin=1in]{geometry}
\usepackage{tgtermes} %sets font to Times New Roman
\usepackage[format=hang,labelfont={bf},margin=1em,labelsep=period,textformat=period]{caption}
\usepackage{psfrag}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{bpchem}
\usepackage{chemnum}
\usepackage{chemstyle}
\usepackage[version=3]{mhchem}

\makeatletter
\newcmpdcounterformat{chapter}{\thechapter.\@arabic} %this adds the chapter number to the structure numbering
\makeatother
\setchemnum{
  replace-style = \fontsize{10}{12}\rmfamily,
  counter-within = chapter ,
  counter-format = chapter % use new counter format
}


\begin{document}

\chapter{Chapter1}

This is just an example of a Diels Alder (DA) rxn, you need a diene (\refcmpd{Diene}) and a dienophile (\refcmpd{Dienophile}) to produce a cyclohexene derivative such as \refcmpd{DAadduct}.

 \begin{scheme}[!h]
    \replacecmpd{Diene}
    \replacecmpd{Dienophile}
    \replacecmpd{DAadduct}
    \includegraphics{DA}
    \caption{A DA run not likely to take place}
    \label{fig:DA}
  \end{scheme}

  \chapter{Chapter2}

  To have a successful DA rxn, one must have an electron deficient diene (\refcmpd{EDdiene}) and an electron rich dienophile (\refcmpd{ERdienophile}) to successfully generate a cyclohexene derivative, in this case \refcmpd{Daadduct.a}

   \begin{scheme}[!h]
    \replacecmpd{EDdiene}
    \replacecmpd{ERdienophile}
    \replacecmpd{DAadduct.a}
    \includegraphics{DA2}
    \caption{A DA run very likely to take place}
    \label{fig:DA2}
  \end{scheme}

  This was just an example.

  \end{document}

enter image description here

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.