大家好,LaTeX 一直给我错误“缺少插入的 $”和“额外的 },或忘记了 $”
\Def{Convergenza uniforme}
{Si dice che $f_n$ converge uniformemente a $f$ se $\displaystyle\forall
\epsilon>0,\exists\bar{n};\forall n\geq\bar{n}\quad\sup_{x\in X}\vert
f_{n}(x)-f(x)\vert<\epsilon$ cioè se $\displaystyle\lim_{n\to+\infty}
d_{\infty}(f_{n}(x),f(x))=0$ indicheremo con $f_{n}\cu f$}
我的文档标题是:
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage{xparse}
\usepackage{scrextend}
\usepackage[latin1]{inputenc}
使用这些自定义命令:
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\NewDocumentCommand{\Ex}{g}{\textbf{Esempio:}\begin{addmargin}[0.8cm]{0cm}#1\end{addmargin}}
\NewDocumentCommand{\Dim}{g}{\textbf{Dim:}\begin{addmargin}[0.8cm]{0cm}#1\end{addmargin}}
\NewDocumentCommand{\Def}{gg}{\textcolor{red}{\textbf{Definizione}} #1:\begin{addmargin}[0.8cm]{0cm}#2\end{addmargin}}
\NewDocumentCommand{\Oss}{mg}{\textbf{Osservazione:}\begin{addmargin}[0.8cm]{0cm}#1\IfNoValueTF{#2}{}{\\ \Dim{#2}}\end{addmargin}}
\NewDocumentCommand{\Teo}{gmm}{\textbf{Teorema\IfNoValueTF{#1}{}{ #1}:}\begin{addmargin}[0.8cm]{0cm}#2\\ \Dim{#3}\end{addmargin}}
\NewDocumentCommand{\Prop}{mg}{\textbf{Proprietà:}\begin{addmargin}[0.8cm]{0cm}#1\IfNoValueTF{#2}{}{\\ \Dim{#2}}\end{addmargin}}
\newcommand{\cu}{\stackrel{\mathclap{\tiny\mbox{\Vert\quad\Vert_\infty}}}{\to}}
答案1
你的错误是\mbox{\Vert\quad\Vert_\infty}
因为内容\mbox
是文本所以不能有数学模式命令除非你嵌套\mbox{$\Vert\quad\Vert_\infty$}
但最好不要有框