我花了很长时间查看屏幕,但还是找不到错误来源。下面是最小代码:
\documentclass[aspectratio=169, hyperref={pdfpagelabels=false}]{beamer}
%\documentclass[handout, hyperref={pdfpagelabels=false}]{beamer}
\usetheme{Madrid}
\let\Tiny=\tiny
\usepackage{multimedia}
%\usepackage[backend=bibtex,style=authoryear]{biblatex}
\usecolortheme{whale}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[spanish,es-tabla]{babel}
\usefonttheme{professionalfonts}
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}[frame number]
\setbeamertemplate{frametitle}[default][center]
\setbeamersize{text margin left=2em,text margin right=2em}
\begin{document}
\begin{frame}{Estrategias de cálculo}
Puede escribirse:
$\Delta G^\circ_{\textrm{neto}} = \Delta G_{\textrm{r}}^\circ{(\textrm{AH})} + \Delta G_{\textrm{r}}^\circ{(\textrm{B^-})}$
Se calcula $\Delta G^\circ_{\textrm{neto}}$ y se despeja $\Delta G_{\textrm{r}}^\circ{(\textrm{AH})}$ . El valor restante se toma de cálculos o experimental.
\end{frame}
\end{document}
输出:
! Extra }, or forgotten $.
\textdef@ ...h {#1}\let \f@size #2\selectfont #3}}
l.29 \end{frame}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.
! Extra }, or forgotten $.
你觉得数学公式中有什么错误吗?
答案1
这个字符^
和其他一些字符在 Latex 中具有特殊含义。要在文本中打印这些特殊字符,您需要在它们前面加上反斜杠(即\^
)。在数学模式下,您可以直接使用它来对变量进行幂运算,例如代码中的情况。如果您在文本模式中添加它(\textrm{B^-})
而不使用转义字符,则会产生错误。因此,要获得所需的输出,您需要将其移出文本模式,例如(\textrm{B}^-)
。