I defined my self some macros for l- and L-spaces, to be specific some \l1, \L2, and so one. Now Latex throws errors while compiling, always exactly at the first \lx I defined:
! Use of \l doesn't match its definition. l.31 \item[(v)] Für $f \in \l1 $ oder $f \in \L1$ heißt $f$ \emph{summierba... If you say, e.g.,
\def\a1{...}', then you must always put1' after `\a', since control sequence names are made up of letters only. The macro here has not been followed by the required stuff, so I'm ignoring it.
It seems to ignore the numbers I put behind the \l or \L. I worked around it with using \lone, \Ltwo, and so on - so the matter is definitely not urgent. But I'm interested, why it behaves like that.
\documentclass{report}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\DeclareMathOperator{\l1}{\ell^1(\mathbb{Z})}
\DeclareMathOperator{\L1}{L^1(\mathbb{R})}
\DeclareMathOperator{\l2}{\ell^2(\mathbb{Z})}
\DeclareMathOperator{\L2}{L^2(\mathbb{R})}
\DeclareMathOperator{\linf}{\ell^\infty(\mathbb{Z})}
\DeclareMathOperator{\Linf}{L^\infty(\mathbb{R})}
\begin{document}
Für $f \in \l1$ oder $f \in \L1$ heißt $f$ \emph{summierbar} oder \emph{integrierbar}.
Für $f \in \l2$ oder $f \in \L2$ heißt $f$ \emph{Signal von endlicher Energie}.
Für $f \in \linf$ oder $f \in \Linf$ heißt $f$ \emph{beschränkt}.
\end{document}

l), what follows can be part of the name only if it's a letter. So, either you name your commands\li,\lii, etc. (using roman numbering), or you define a command that takes an argument: the figure (digit). – frougon Jul 29 '19 at 07:46\newcommand{\ppp}{\ensuremath{\mathfrak p}\xspace}and using it in a math environment as\ppp_i. It gives perfect results for the first few times (inside anequationenvironment, but suddenly shows this error when used inside$$. Is this a bug? I'm using overleaf. – Pagol Aug 03 '22 at 22:24