编译 pdf 时出错 - chemmacros 存在问题

编译 pdf 时出错 - chemmacros 存在问题

似乎 chemmacros 已被卸载或出现了其他异常。运行此命令时最小示例

   \documentclass[12pt,twoside
]{report}
\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{enumitem} 
\usepackage[justification=centering]{caption}
\usepackage[hypcap=false]{caption}
\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}
\usepackage{amssymb} 
\usepackage{amsfonts}
\usepackage{nccmath}
\usepackage{chemmacros}
\chemsetup{
  formula = chemformula ,
  modules = all
}


\begin{document}
\begin{reactions}
A &<=> B\label{reaccio6} \\
C &<=> D \label{reaccionRef5}\\
A + C &<=> B + D  \label{reaccion_neta5}
\end{reactions}
donde la \ref{reaccio6} tiene asociado $\Delta G^\circ_{\textrm{desc}}$, \ref{reaccionRef5} $\Delta G^\circ_{\textrm{ref}}$
y la reacción neta, $\Delta G^\circ_{\textrm{neto}}$. El valor de la energía libre de referencia puede ser experimental o estimado.
\end{document}

Latex 报告错误

 ! Undefined control sequence.
<argument> r@reaccio\chemformula
_subscript:n {6}
l.31 ...cript:n {6}}{{1}{1}{}{equation.R.0.0.1}{}}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

文档已chemmacros上传在前言中。我的Linux系统是Debian。

有什么帮助吗?

答案1

chemmacros正如第 44 页所示的手册,您应将\label{...}其附上"..."

在此处输入图片描述

该问题已在此网站上讨论过几次,最后一次是在这里:chemformula 中箭头下方包含 siunitx 语法的标签出现错误

chemmacros还提供了吉布斯焓和很多的宏……

\documentclass[12pt,twoside]{report}

\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 

\usepackage{chemmacros}
\chemsetup{
  formula = chemformula ,
  modules = all
}

\begin{document}

\begin{reactions}
A &<=> B "\label{reaccio6}" \\
C &<=> D "\label{reaccionRef5}" \\
A + C &<=> B + D "\label{reaccion_neta5}"
\end{reactions}

donde la \ref{reaccio6} tiene asociado \gibbs*[subscript-right=desc]{},
\ref{reaccionRef5} \gibbs*[subscript-right=ref]{} y la reacción neta,
\gibbs*[subscript-right=neto]{}. El valor de la energía libre de referencia
puede ser experimental o estimado.

\end{document}

在此处输入图片描述

相关内容