这个有机化学 .tex 文件用于编译。使用当前版本的 TeXliv2 2020,这在第 75 行失败。我看不到错误

这个有机化学 .tex 文件用于编译。使用当前版本的 TeXliv2 2020,这在第 75 行失败。我看不到错误
\documentclass[12pt]{book} 
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{amsmath}
\usepackage{array} 
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{booktabs} 
\usepackage{chemfig}
\usepackage{fancyhdr} 
\usepackage{graphicx} 
\usepackage{mathabx}
\usepackage{mathexam}
\usepackage{mathrsfs}
\usepackage{mhchem}
\usepackage{multicol}
\usepackage{paralist} 
\usepackage{sectsty}
\usepackage{subfigure}
\usepackage{tabu}
\usepackage[utf8]{inputenc} 
\usepackage{verbatim} 
\usepackage{wrapfig}
\geometry{letterpaper} 
\pagestyle{fancy} 
\renewcommand{\headrulewidth}{0pt} 
\lhead{Chemistry 2018-2019}\chead{Chapter 20 Organic Functional Groups}\rhead{\thepage}
\lfoot{}\cfoot{}\rfoot{}
\allsectionsfont{\sffamily\mdseries\upshape}

\title{Chapter 20}
\author{Organic Functional Groups}

\begin{document}
\maketitle

\normalsize
\noindent\textbf{Overhead 20 \# 1 Organic Functional Groups}\\
\textbullet{ A functional group is a specific arrangement of atoms in an organic compound that is capable of characteristic chemical reactions.\\


{\tabulinesep=1.5mm
   \begin{tabu} {| l | l | l | c |}
\hline
\multicolumn{4}{| c |}{\textbf{Table R: Organic Functional Groups}}\\\hline
\multicolumn{1}{| c }{\textbf{Class of}}    &\multicolumn{1}{| c }{\textbf{Functional}} &\multicolumn{1}{| c |}{\textbf{General}}       &\\
\multicolumn{1}{| c }{\textbf{Compound}}    &\multicolumn{1}{| c }{\textbf{Group}}  &\multicolumn{1}{| c |}{\textbf{Formula}}   &\multicolumn{1}{ c |}{\textbf{Example}}\\\hline\hline

alcohol     &$-$OH          &\chemfig{R-OH}     &\chemfig{CH_3CH_2CH_2OH}\\
            &               &                   &1-propanol\\\hline
aldehyde        &\chemfig{-C(=[2]O)-[8]H}       &\chemfig{R-C(=[2]O)-[8]H}      &\chemfig{CH_3CH_2-C(=[2]O)-[8]H}\\
            &               &                   &propanal\\\hline
amide       &\chemfig{-C(=[2]O)-N(-[2])-H}      &\chemfig{-C(=[2]O)-N(-[2]R^\prime)-H}  &\chemfig{CH_3CH_2-C(=[2]O)-NH_2}   \\
            &               &                   &propanamide\\\hline
amine       &\chemfig{-N(-[2])-}        &\chemfig{R-N(-[2]R^\prime)-R^{\prime\prime}}   &\chemfig{CH_3CH_2CH_2NH_2} \\
            &               &                   &1-propanamine\\\hline
ether       &$-$O$-$        &\chemfig{R-O-R^\prime} &\chemfig{CH_3OCH_2CH_3}\\
            &               &                   &methyl ethyl ether\\\hline
ester       &\chemfig{-C(=[2]O)-O-}     &\chemfig{R-C(=[2]O)-O-R^\prime}    &\chemfig{CH_3CH_2-C(=[2]O)-O-CH_3} \\
            &               &                   &methyl propanoate\\\hline
            &$-$F (fluoro-) &\chemfig{R-X}      &\\
halide      &$-$Cl (chloro-)    &(X represents      &\chemfig{CH_3CHClCH_3}\\
(halocarbon)    &$-$Br (bromo-) &any halogen)       &{2-chloropropane}\\    
            &$-$I (iodo-)       &                   &\\\hline
ketone      &\chemfig{-C(=[2]O)-}       &\chemfig{R-C(=[2]O)-R^\prime}  &\chemfig{CH_3-C(=[2]O)-CH_2CH_2CH_3}   \\
            &               &                   &2-pentanone\\\hline
organic acid    &\chemfig{-C(=[2]O)-OH}     &\chemfig{R-C(=[2]O)-OH}    &\chemfig{CH_3CH_2-C(=[2]O)-OH} \\
            &               &                   &2-propanoic acid\\\hline
\end{tabu}}
\newpage


%Page 2
\Large
\begin{multicols}{2} % 2 columns
\noindent \chemfig[][scale=0.8]{CH_3-CH(-[2]{Br})-CH_2-CH_3} \vspace{5cm}\\
\noindent \chemfig[][scale=0.8]{CH_3CH_2CH_2CHO}\vspace{5cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]OH)-C(-[2]H)(-[6]CH_3)-H} \vspace{5cm}\\
\noindent \chemfig[][scale=0.8]{*6(-(-NO_2)=-(-NO_2)=(-CH_3)-(-O_2N)=)}
\columnbreak\\
\chemfig[][scale=0.8]{CH_3-C(=[2]O)-CH_2-CH_3}\vspace{5cm}\\
\chemfig[][scale=0.8]{CH_3CH_2CH_2-O-CH_2CH_3} \vspace{5cm}\\
\noindent \chemfig[][scale=0.8]{CH_3CH_2CH_2CH_2CH_2CONH_2} \vspace{5cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-C(=[1]O)(-[7]OH)} 
\end{multicols}\newpage

%Page 3
\Large
\noindent\textbf{Overhead 20 \# 1 Organic Functional Groups, con't}\\
\noindent Name the following organic compounds.\\
\begin{multicols}{2} % 2 columns
\noindent \chemfig[][scale=0.8]{C(-[3]H)(-[5]H)=C(-[1]{Cl})(-[7]H)} \vspace{3.75cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-O-C(-[2]H)(-[6]H)-H} \vspace{2cm}\\
\noindent \chemfig[][scale=0.8]{CH_3-C(=[2]O)-NH_2} \vspace{4.2cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]{Cl})-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H}
\columnbreak\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]{N(-[5]H)(-[7]H)})-C(=[1]O)(-[7]OH)} \vspace{2cm}\\
\chemfig[][scale=0.8]{CH_3-CH_2-C(=[2]O)-O-CH_2-CH_3} \vspace{2.5cm}\\
\indent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-OH} \vspace{3cm}\\
\indent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(=[1]O)(-[7]H)}
\end{multicols}\newpage

%Page 4
\Large
\noindent\textbf{Overhead 20 \# 1 Organic Functional Groups, con't}\\
\noindent Name the following organic compounds.\\
\begin{multicols}{2} % 2 columns
\noindent \chemfig[][scale=0.8]{N(-[3]H)(-[5]H)-C(-[2]H)(-[6]H)-H} \vspace{2cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]OH)(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]H)(-[6]H)-H} \vspace{3cm}\\
\noindent \chemfig[][scale=0.8]{H_3C-[:-30]CH_2-[:30]CH_2-[:-30]CH_2-[:30]\lewis{2:, N}H_2} \vspace{2.75cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(=[1]O)(-[7]OH)}
\columnbreak\\
\indent\chemfig[][scale=0.8]{*6(-=-=-(-Cl)=)}\vspace{2.05cm}\\
\indent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]{CH_3})(-[6]H)-C(-[2]H)(-[6]H)-C(-[2]OH)(-[6]{CH_3})-H} \vspace{2cm}\\
\indent \chemfig[][scale=0.8]{CH_3CH_2CH_2CH_2-C(=[2]O)-OCH_3} \vspace{3cm}\\
\indent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]H)-C(-[2]{CH_3})(-[6]I)-C(-[2]H)(-[6]H)-H}
\end{multicols}\newpage

%Page 5
\Large
\noindent\textbf{Overhead 20 \# 1 Organic Functional Groups, con't}\\
\noindent Name the following organic compounds.\\
\begin{multicols}{2} % 2 columns
\noindent \chemfig[][scale=0.8]{H-C(=[1]O)(-[7]OH)} \vspace{2cm}\\
\noindent \chemfig[][scale=0.8]{H-C(=[1]O)(-[7]NH_2)} \vspace{3.38cm}\\
\noindent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-O-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]H)-H} \vspace{2cm}\\
\noindent \chemfig[][scale=0.75]{H-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(=[1]O)(-[7]H)} 
\columnbreak\\
\indent \chemfig[][scale=0.8]{CH_3CH_2-C(=[2]O)-CH_2CH_3}\vspace{2.05cm}\\
\indent \chemfig[][scale=0.8]{H-C(-[2]H)(-[6]{Br})-C(-[2]Br)(-[6]{Br})-C(-[2]Br)(-[6]H)-H} \vspace{3cm}\\
\indent \hspace{4cm}\chemfig[][scale=0.8]{H-C(=[2]O)-H} \vspace{3.35cm}\\
\indent \chemfig[][scale=0.75]{H-C(-[2]H)(-[6]{H})-C(-[2]H)(-[6]{H})-C(=[2]O)-O-C(-[2]H)(-[6]H)-H} 
\end{multicols}\newpage

%Page 6
\Large
\noindent\textbf{Overhead 20 \# 1 Organic Functional Groups, con't}\\
\noindent Draw structural formulas of the following organic compounds.\\
\begin{multicols}{3} % 3 columns
\noindent 4-iodo-2-hexene\vspace{6cm}\\
\noindent ethyl methanoate\vspace{6cm}\\
\noindent pentyl methyl ether
\columnbreak\\
\noindent pentanamine\vspace{6cm}\\
\noindent 2-methyl-2-propanol\vspace{6cm}\\
\noindent diethyl ether
\columnbreak\\
\noindent hexanoic acid\vspace{6cm}\\
\noindent pentanamide\vspace{6cm}\\
\noindent 3-hexanone
\end{multicols}\newpage

%Page 7
\Large
\noindent\textbf{Overhead 20 \# 2 Isomers}\\
\textbullet{ Structural isomers have the same functional group in a different position.\\
\noindent Draw the structural formula of the following compounds then its\\structural isomer.
\begin{multicols}{2} % 2 columns
\noindent 2-butanol\vspace{2.3cm}\\
\noindent 3-pentanone\vspace{2.3cm}\\
\columnbreak\\
\noindent Isomer\vspace{2.3cm}\\
\noindent Isomer\vspace{2.3cm}\\
\end{multicols}
\noindent\textbullet{ Functional isomers have the same chemical formula but different functional groups.\\\noindent Draw the structural formula of the following compounds then its\\functional isomer.\\
\begin{multicols}{2} % 2 columns
\noindent methyl ethyl ether\vspace{2.3cm}\\
\noindent propanal\vspace{2.3cm}\\
\columnbreak\\
\noindent Isomer\vspace{2.3cm}\\
\noindent Isomer
\end{multicols}

\end{document}

答案1

在 2018-2019 年,的语法\chemfig发生了两次变化。最近一次发生在 2019 年 2 月,v1.4(参见CTAN 上 v1.4 的公告文本)。现在\chemfig只接受一个可选参数,如\chemfig[<key-value option list>]{<molecule code>}

相关的源代码更改,旧语法

\chemfig[][scale=0.8]{...}

相当于设置

every node/.style={scale=0.8}

用新语法来说,可以通过以下方式实现

\chemfig[atom style={scale=0.8}]{...}

在下面的例子中,我定义了一个新chemfig选项scale,其作用与旧scale选项相同。

\documentclass{article}
\usepackage{chemfig}

\ExplSyntaxOn % not equivalent to what "chemfig.tex" does, but suffient
\makeatletter
\defKV[chemfig]{
  scale = \g@addto@macro\CF_atomstyle{scale=#1}
}
\makeatother
\ExplSyntaxOff

\begin{document}
\begin{tabular}{rl}
  Normal size: 
    & \chemfig{CH_3CH_2CH_2-CHO} \\
  New syntax with \verb|atom style|: 
    & \chemfig[atom style={scale=0.8}]{CH_3CH_2CH_2-CHO} \\
  New syntax with new option \verb|scale|: 
    & \chemfig[scale=0.8]{CH_3CH_2CH_2-CHO}
\end{tabular}
\end{document}

在此处输入图片描述

相关内容