Chemscheme 方案编号

Chemscheme 方案编号

我对乳胶还很陌生,我正在尝试使用 chemscheme 包来帮助我对化合物进行编号(到目前为止似乎运行正常)但我在章节中的实际方案编号方面遇到了麻烦。

我希望我的方案在整个文档中连续编号,以便从方案 1、方案 2 等开始(而不是目前的方案 1.1、方案 1.2 等)。我确信可能有一个非常简单的方法可以做到这一点,但我的搜索到目前为止没有帮助。我在另一篇文章中读到关于使用 chngcntr 包,然后使用 counterwithout 命令(请参阅:这里) - 然而,当我尝试这个时,它告诉我方案不是一个计数器并且实际上不起作用。

这是一个测试文件,它重现了我下面所说的内容(我意识到很多包含的包可能对您重现该问题并不重要,但似乎每次我更改序言时都会出现一些让我烦恼的新内容)。

\documentclass[11 pt]{report}
%-----------------------------------------
%                  Packages
%-----------------------------------------

\usepackage{titlesec}
\usepackage[a4paper, scale=1.0, textwidth=145mm, textheight=237mm, layoutvoffset=0pt,   layouthoffset=0pt, ignoremp, includehead, marginparsep=0pt, bottom=4cm, top=2cm, left=4cm, right=2.5cm, verbose=true, bindingoffset=0pt]{geometry} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[english]{babel} 
\usepackage{setspace} 
\usepackage[toc, page, header]{appendix} 
\usepackage{fancyhdr} 
\usepackage[super,sort&compress,comma]{natbib} 
\usepackage[plain]{fancyref} 
\usepackage[version=3]{mhchem}
\usepackage{times,mathptmx}
\usepackage{textcomp} 
\usepackage{sectsty}
\usepackage{balance} 
\usepackage{graphicx} 
\usepackage{lastpage}
 \usepackage[format=plain,justification=centering,singlelinecheck=false,font=small,labelfont=bf,labelsep=space]{caption} 

\usepackage[runs=2]{auto-pst-pdf}
\usepackage[journal=rsc]{chemstyle}

\begin{document}

\onehalfspace
\chapter[Introduction]{Introduction}
\chaptermark{Introduction}
\label{ch:introduction} % label for referring to chapter in other parts of the thesis
\section[Importance]{Importance}\label{C1:Intro}
Filling in later

\section[Synthesis]{Synthesis}
Ketone \compound{cmpd:ketone} blah blah to acid chloride \compound{cmpd:acid}.

\begin{scheme}[ht]
\begin{center}
\schemeref[TMP1]{cmpd:ketone}   
\schemeref[TMP2]{cmpd:acid}
\includegraphics[scale=0.8]{Schemes/synthesis}
\end{center}
\caption{}
\end{scheme}

\end{document}

最后看起来像这样

谢谢。

答案1

你需要做两件事

  1. 更改方案编号的显示
  2. 停止使用章节重置方案编号

第一项只需要一个\renewcommand,第二项最好使用chngcntr包来完成:

\documentclass{report}
\usepackage{chemstyle}
\usepackage{chngcntr}

\AtBeginDocument{%
  \renewcommand\thescheme{\arabic{scheme}}%
  \counterwithout{scheme}{chapter}%
}
\begin{document}

\chapter{Introduction}

\begin{scheme}[ht]
  CONTENT
  \caption{A scheme}
\end{scheme}

\chapter{Second chapter}

\begin{scheme}[ht]
  CONTENT
  \caption{A scheme}
\end{scheme}

\end{document}

(这同样适用于“标准”浮点类型。)

相关内容