In my preamble I have loaded the amsmath and geometry package and many others that I read are useful when using \mathclap. This is my preamble


%\usepackage[latin1]{inputenc}               %Zeichencodierung Text
\usepackage[T1]{fontenc}                     %Schriftsatz Dokument

%%Language settings
\usepackage[english]{babel}                  %ngerman for German
\usepackage{csquotes}                        %[babel,quotes=english]
\addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
%\renewcommand{\contentsname}{Table of Contents}   % only works when not using babel

%%Math, astro, chemical packages and options
\usepackage{wasysym}                        %astronomical symbols
%\usepackage[version=3]{mhchem}             %Chemie-Package
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}


%%Paper adjustments
\usepackage{epstopdf}                        %if problems with importing .eps graphics
%\usepackage{a4wide}                         %obsolete and replaced by geometry
\usepackage[a4paper,bottom=3.1cm]{geometry}  %also with command \geometry{options}
%\usepackage{subfigure}                      %obsolete
\usepackage{subcaption}                      %cannot be used with subfigure
\usepackage{textcomp, gensymb}               %textcomp before gensymb gets rid of the warnings "not defining \micro and \perthousand
\usepackage{soul}                            %for customised working with the text 
\setcounter{secnumdepth}{4}                  %sets the section number depth
\setcounter{tocdepth}{4}                     %sets the ToC depth
%\usepackage{verbatim}                       %for multiline comments using\begin or \end
\usepackage{xcolor}                          %colour e.g. parts of equations

%% Control the fonts and formatting used in the table of contents.

%% Aesthetic spacing redefined
\setlength{\parindent}{0pt}                  %kein Einrücken von neuen Abschnitten
\usepackage{afterpage}                       %to avoid space before landscape-environment

I still get errors for


First I had only "align" instead of "aligned". Those undefined control sequences vanished, but are replaced by undefined control sequences for this \mathclap (which was already before a non recognised command...I'm wondering why). Unfortunately, my document has too many errors to be displayed with the recent necessary changes that were necessary.

  • I'm not sure what you want to accomplish with \stackrel{\mathclap}{\rightarrow}; you probably want something like \xrightarrow{f} to have a label over an (extensible) arrow. – egreg Feb 10 '15 at 13:49

The macro \mathclap is defined in package mathtools:


The macro takes an optional argument for the math style and a mandatory argument for the math stuff, which is put in a zero-width box and centered there. Therefore,


does not make sense, since the mandatory argument for \mathclap is missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.