如何更改 chemnum 1.0 中 \replacecmpd 的字体大小和类型

如何更改 chemnum 1.0 中 \replacecmpd 的字体大小和类型

首先,我是第一次在这里提问。

其次,我正在编写一个文档,需要导入一个.eps文件来保存我的方案。我的文档设置为使用Times New Roman12pt但我希望方案的标签位于Times New Roman10pt我使用bpchem来跟踪编号chemstyle,但我需要使用 ,chapter并且第一章的结构应该编号为1.XXX,第二章2.XXX也是如此,接下来的章节也是如此,所以我改成了chemnum。使用chemstyle它就像在序言中添加 一样简单\renewcommand*{\schemerefformat}{\fontsize{10}{12}},但我不知道如何将字体类型更改为Times New Roman 10pt仅适用于 EPS 文件,同时保留Times New Roman 12pt文档的其余部分。有人能帮帮我吗?这是 DA 的链接

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

这是 DA2 的

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

提前致谢。

我希望这是一个很好的最小工作示例

\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}

答案1

您可以使用

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

代码:

\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}

在此处输入图片描述

相关内容