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.

So I finally got everything working after having to add several packages I never thought I'd have to. Live preview shows a perfect manuscript, but for some reason, when I go to export, I get this error:

/usr/local/texlive/2012/texmf-dist/tex/latex/chemstyle/chemstyle.sty:441: LaTeX Error: Command \c@scheme already defined.
           Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.441 ...\@nameuse{cst@float@make@\cst@float@pkg}}

When I click on the link (I'm using LaTeXian) it brings me to the chemstyle.sty file, highlighting this line of code:

\cst@float@execute{\@nameuse{cst@float@make@\cst@float@pkg}}

I'm not sure what to do, as I don't want to ruin the .sty file.

Here's also a typical scheme formatting:

\begin{scheme}[htb]
    \schemeref[TMP6]{cmpd:cyclenam}
    \schemeref[TMP7]{cmpd:cyclylide}
    \schemeref[TMP8]{cmpd:cyclindole}
    \schemeref[TMP9]{cmpd:cyclinter}

    \begin{center}
    \includegraphics[scale=0.7]{Figures/photolysis.eps}
    \end{center}

\caption{Proposed mechanism of photochemical cyclization}
\label{sch:photolysis}
\end{scheme}

Here is my document header:

\documentclass[super,compress]{proposalnsf} %super=superscript citations, compress=compressed citations
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[version=3]{mhchem}
\usepackage{amsmath}
\usepackage{chngcntr}
\usepackage{chemscheme}
\usepackage[runs=2]{auto-pst-pdf}
\usepackage{chemnum,chemstyle} %chemnum,
\usepackage{setspace}
\usepackage[nottoc]{tocbibind}
\settocbibname{References}


\DeclareFontFamily{OT1}{psyr}{}
\DeclareFontShape{OT1}{psyr}{m}{n}{<-> psyr}{}
\def\times{{\fontfamily{psyr}\selectfont\char180}}


%Chemical Equation Formatting

\newcounter{reaction}
\renewcommand\thereaction{\arabic{reaction}}

\renewcommand{\thereaction}{\arabic{reaction}}
\newcommand{\thealignedreaction}{\arabic{equation}}

%changing the equation tag appereance when amsmath has been loaded
\makeatletter
  \def\tagform@#1{\maketag@@@{[#1]\@@italiccorr}}
\makeatother

\makeatletter
\newenvironment{reactionalign}{%
    \mathchardef\c@mainequation\c@equation
    \protected@edef\themainequation{\theequation}%
    \let\theequation\thealignedreaction
    \global\c@equation\c@reaction
    }%
    {
    \global\c@equation\c@mainequation
    \global\@ignoretrue
    }
\makeatother


\newcommand{\thesubreaction}{\themainreaction\alph{equation}}

\makeatletter   
\newenvironment{subreactions}{%
    \refstepcounter{reaction}%
    \mathchardef\c@mainequation\c@equation
    \protected@edef\themainequation{\theequation}%
    \mathchardef\c@mainreaction\c@reaction
    \protected@edef\themainreaction{\thereaction}%
    \let\theequation\thesubreaction
    \global\c@equation\z@
    }{%
    \global\c@reaction\c@mainreaction
    \global\c@equation\c@mainequation
    \global\@ignoretrue
    }
\makeatother

%figure counting rules
%\counterwithin{figure}{section}

% this handles hanging indents for publications
\def\rrr#1\\{\par
\medskip\hbox{\vbox{\parindent=2em\hsize=6.12in
\hangindent=4em\hangafter=1#1}}}

\def\baselinestretch{1}

Any help is much appreciated.

share|improve this question

closed as too localized by cgnieder, barbara beeton, Kurt, Paul Gaborit, Werner Dec 5 '12 at 22:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. –  Kurt Dec 4 '12 at 20:01
    
A few remarks: I believe you should use \centering inside the {scheme} environment instead of adding an additional {center} environment. chemstyle loads chemscheme (=no need to load it explicitly). Your use of \schemeref suggests you use chemcompounds (loaded by chemstyle) for the compound numbering. Why do you load chemnum, too? –  cgnieder Dec 4 '12 at 20:08
    
You need to load chemscheme after chemstyle if you want to load it explicitly (then the error should disappear). –  cgnieder Dec 4 '12 at 20:15
1  
Ah okay, there is my error. I just got rid of the explicit call for chemscheme and everything is resolved. –  Nucleophilicrxn Dec 4 '12 at 20:31
1  
@Nucleophilicrxn In that case, probably 'too localized' a question –  Joseph Wright Dec 4 '12 at 20:40

Browse other questions tagged or ask your own question.