4

I am currently writing my thesis in the field of chemistry. In my experimental part I present some schemes and I would like to know if and how it is possible to customize the numbering of these schemes. To be more specific: I'd like to number these schemes as 'Scheme E.x', with x the number of the scheme (starting at 1; so Scheme E.1, Scheme E.2, Scheme E.3, ...). This customized numbering should only start from the experimental part, so schemes in the previous parts of the LaTeX document schould be numbered in a normal way.

This is how my rudimental document looks like:

    \documentclass[a4paper]{report}

    \usepackage{a4wide}                         
    \usepackage[pdftex]{graphicx}                   
    \usepackage[small,bf,hang]{caption}     
    \usepackage[latin1]{inputenc}                           
    \usepackage{fancyhdr}                   
    \usepackage{titlesec}                   
    \usepackage{subfig}                     
    \usepackage[superscript,biblabel]{cite} 
    \usepackage{chngcntr}                   
    \usepackage[nottoc,notlot,notlof]{tocbibind}    
    \usepackage{fixltx2e}                   
    \usepackage{wrapfig}                    
    \usepackage{arevtext,arevmath}          
    \usepackage{enumitem}                   
    \usepackage[Gray,squaren,thinqspace,thinspace]{SIunits} 

    \usepackage[version=3]{mhchem}              
    \usepackage{chemscheme}
    \usepackage{epstopdf}                   
    \usepackage[varioref=true,journal=jcp]{chemstyle}  
    \usepackage{float}

    \setlength{\parindent}{0cm}             
    \renewcommand{\baselinestretch}{1.3}    
    \pagenumbering{arabic}                  
    \fancyhead[L]{\nouppercase{\leftmark}}
    \fancyhead[R]{\thepage}

    \usepackage[scaled=.95]{helvet}         
    \usepackage{sectsty}
    \allsectionsfont{\sffamily}
    \renewcommand{\familydefault}{\sfdefault}   

    \usepackage{titlesec}
    \titleformat{\chapter}[display]
      {\sffamily\huge\raggedleft}    
      {\MakeUppercase{\chaptertitlename}
        \rlap{ \resizebox{!}{1.4cm}{\thechapter} \rule{5cm}{1.45cm}}} 
      {10pt}{\Huge}  % Chaptertitelgrootte
    \titlespacing*{\chapter}{0pt}{2pt}{90pt}

    \captionsetup{
    margin=1ex,
    font={small, sf},
    labelfont={bf, sf},
    labelsep= endash}

    \makeatletter 
    \def\@seccntformat#1{\llap{\csname the#1\endcsname\quad}}
    \makeatother

    \setcounter{secnumdepth}{3}
    \setcounter{tocdepth}{3}
    \newcommand{\Schemeref}[1]{\textbf{Scheme\,\ref{scheme:#1}}}

    \title{This is the title}
    \author{Machaeri}
    \date{}
    \pagenumbering{arabic}

\begin{document}

\maketitle
\tableofcontents
\listoffigures
\setlength{\parindent}{0pt}

\chapter{Chapter one}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    \begin{scheme}
        \includegraphics[scale=1]{Test.eps}
        \caption{Caption text}
        \label{Test}
    \end{scheme}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}
  • What do you have so far? How are you preparing those schemes? Please provide a minimal working example, that way we all have the same base of knowledge. – Johannes_B Mar 9 '14 at 21:00
  • Do you know mychemistry.eu by Clemens Niederberger?You can find many chemistr and LaTeX information there – Johannes_B Mar 9 '14 at 21:02
  • I have added my preamble and also a general example of how I introduce a scheme in my body text. – Machaeri Mar 9 '14 at 21:05
  • Please make your example (1) Minimal e.g. I doubt helvet is relevant, (2) Working i.e. complete it with \documentclass..., \begin{document}... \end{document} etc., and (3) Complete e.g. don't split the code up with comments. You want to ensure that somebody can copy and paste your code easily and compile it to play with it and test solutions. That makes it easy to help and so makes it more likely you'll get useful answers. – cfr Mar 9 '14 at 21:37
  • OK, I have done this now and tested for myself that is generates a rudimental version of my document. I have not omitted the packages, because I do not know if one of these might cause problems or not. Thanks in advance for the help. – Machaeri Mar 9 '14 at 21:48
3

As chemstyle loads chemscheme automatically, I have commented chemscheme. chemscheme uses a counter scheme for the schemes.

You can do this

\chapter{Experimental part}
\renewcommand*{\thescheme}{E.\arabic{scheme}}%
\setcounter{scheme}{0}

right where the experimental part starts.

    \documentclass[a4paper]{report}

    \usepackage{a4wide}
    \usepackage[pdftex]{graphicx}
    \usepackage[small,bf,hang]{caption}
    \usepackage[latin1]{inputenc}
    \usepackage{fancyhdr}
    \usepackage{titlesec}
    \usepackage{subfig}
    \usepackage[superscript,biblabel]{cite}
    \usepackage{chngcntr}
    \usepackage[nottoc,notlot,notlof]{tocbibind}
    \usepackage{fixltx2e}
    \usepackage{wrapfig}
    \usepackage{arevtext,arevmath}
    \usepackage{enumitem}
    \usepackage[Gray,squaren,thinqspace,thinspace]{SIunits}

    \usepackage[version=3]{mhchem}
    %\usepackage{chemscheme}     %% this is loaded by chemstyle
    \usepackage{epstopdf}
    \usepackage[varioref=true,journal=jcp]{chemstyle}
    \usepackage{float}

    \setlength{\parindent}{0cm}
    \renewcommand{\baselinestretch}{1.3}
    \pagenumbering{arabic}
    \fancyhead[L]{\nouppercase{\leftmark}}
    \fancyhead[R]{\thepage}

    \usepackage[scaled=.95]{helvet}
    \usepackage{sectsty}
    \allsectionsfont{\sffamily}
    \renewcommand{\familydefault}{\sfdefault}

    \usepackage{titlesec}
    \titleformat{\chapter}[display]
      {\sffamily\huge\raggedleft}
      {\MakeUppercase{\chaptertitlename}
        \rlap{ \resizebox{!}{1.4cm}{\thechapter} \rule{5cm}{1.45cm}}}
      {10pt}{\Huge}  % Chaptertitelgrootte
    \titlespacing*{\chapter}{0pt}{2pt}{90pt}

    \captionsetup{
    margin=1ex,
    font={small, sf},
    labelfont={bf, sf},
    labelsep= endash}

    \makeatletter
    \def\@seccntformat#1{\llap{\csname the#1\endcsname\quad}}
    \makeatother

    \setcounter{secnumdepth}{3}
    \setcounter{tocdepth}{3}
    \newcommand{\Schemeref}[1]{\textbf{Scheme\,\ref{scheme:#1}}}

    \title{This is the title}
    \author{Machaeri}
    \date{}
    \pagenumbering{arabic}

\begin{document}

\maketitle
\tableofcontents
\listoffigures
\listofschemes
\setlength{\parindent}{0pt}

\chapter{Chapter one}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    \begin{scheme}
        \includegraphics[scale=0.3]{example-image-a}    %% change back
        \caption{Caption text}
        \label{Test}
    \end{scheme}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\chapter{Experimental part}
\renewcommand*{\thescheme}{E.\arabic{scheme}}%
\setcounter{scheme}{0}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    \begin{scheme}
        \includegraphics[scale=0.3]{example-image-a}    %% change back
        \caption{Caption text}
        \label{Test}
    \end{scheme}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


\end{document}

enter image description here

And the list of scheme will be

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.