Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Chemfig Latex compile program

211 views
Skip to first unread message

lina

unread,
Oct 8, 2021, 10:10:04 AM10/8/21
to
Hi,

When I updated the system, the following .tex code does not work, it shows the error likes this:

(/usr/share/texlive/texmf-dist/tex/latex/chemformula/chemformula.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty))
(/usr/share/texlive/texmf-dist/tex/latex/units/nicefrac.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)))
! Undefined control sequence.
l.24 \setdoublesep
                  {0.2 em}  % 'Bond Spacing'



\NeedsTeXFormat{LaTeX2e}[1997/12/01]
\documentclass[
    journal=jacsat,
    manuscript=article
    ]{achemso}

\usepackage[version=3]{mhchem}
\usepackage{wrapfig}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{threeparttable}
\usepackage{longtable,booktabs}
\usepackage[table, svgnames, dvipsnames]{xcolor}
\usepackage[first=0,last=9]{lcg}


\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig,chemmacros}
%\chemsetup[chemformula]{format=\sffamily}
\usepackage{chemformula}
\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}

\setdoublesep{0.2 em}  % 'Bond Spacing'
\setatomsep{1.45 em}    % 'Fixed Length'
\setbondoffset{0.1 em} % 'Margin Width'
\newcommand{\bondwidth}{0.08 em} % 'Line Width'
\setbondstyle{line width = \bondwidth}
\setcrambond{2pt}{}{}

\usetikzlibrary{decorations}
\pgfdeclaredecoration{ddbond}{initial}{
  \state{initial}[width=4pt]{
    \pgfpathlineto{\pgfpoint{4pt}{0pt}}
    %\pgfpathmoveto{\pgfpoint{2pt}{2pt}}
    \pgfpathmoveto{\pgfpoint{1pt}{2pt}}
    \pgfpathlineto{\pgfpoint{2pt}{2pt}}
   \pgfpathmoveto{\pgfpoint{3pt}{2pt}}
    \pgfpathlineto{\pgfpoint{4pt}{2pt}}
    \pgfpathmoveto{\pgfpoint{4pt}{0pt}}
  }
  \state{final}{
    \pgfpathlineto{\pgfpointdecoratedpathlast}
  }
}


\begin{document}

\end{document}

Jerome BENOIT

unread,
Oct 8, 2021, 11:10:03 AM10/8/21
to
Hello Lina, can you provide a more minimal sample that reproduce the error ?
Best wishes,
Jerome

On 08/10/2021 15:59, lina wrote:
> Hi,
>
> When I updated the system, the following .tex code does not work, it shows the error likes this:
>
> (/usr/share/texlive/texmf-dist/tex/latex/chemformula/chemformula.sty
> (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty
> (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty)
> (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty))
> (/usr/share/texlive/texmf-dist/tex/latex/units/nicefrac.sty
> (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)))
> ! Undefined control sequence.
> *l.24 \setdoublesep
>                   {0.2 em}  % 'Bond Spacing'*

Curt

unread,
Oct 8, 2021, 11:40:04 AM10/8/21
to
On 2021-10-08, lina <lina.l...@gmail.com> wrote:
>
> *l.24 \setdoublesep {0.2 em} % 'Bond Spacing'*
>
>

I'm reading that the '\setdoublesep' macro is obsolete and has been
replaced by '\setchemfig{}'. Maybe this has something to do with the
error being thrown.


https://ctan.org/ctan-ann/id/mailman.2235.15206...@ctan.org?lang=en

http://tug.ctan.org/macros/generic/chemfig/chemfig-en.pdf

lina

unread,
Oct 11, 2021, 4:30:04 AM10/11/21
to
Hi Jerome,
Hi Curt,

Thanks for the input, I changed the

\setdoublesep{0.2 em}  % 'Bond Spacing'
\setatomsep{1.45 em}    % 'Fixed Length'
\setbondoffset{0.1 em} % 'Margin Width'
\newcommand{\bondwidth}{0.08 em} % 'Line Width'
\setbondstyle{line width = \bondwidth}
\setcrambond{2pt}{}{}

to
\setchemfig{bond style={line width=0.08 em,red!70}}
\setchemfig{chemfig style=red}
\setchemfig{double bond sep = 0.2 em, atom sep = 1.45 em, bond offset = 0.1 em, cram width=2pt}

It gets closer to what I want,

Thanks again, lina

0 new messages