# Define \norm command and work in long table

## Edit: Solution

\norm requires an argument. Thanks to the commenters for pointing that out to me.

## Orig question:

I have a \norm command defined that is simply the \lVert and \rVert symbols put on either side of something. This works completely fine in paragraphs, equations, and other general math mode usages.

However, for whatever reason, attempting to use it in longtable just outputs Undefined control sequence. Even defining the command two different ways (as shown in MWE) still results in the error. Any ideas why it isn't working?

### MWE:

\documentclass{article}
\usepackage{longtable}

%% Define \norm using amsmath and mathtools
\usepackage{amsmath}
\usepackage{mathtools}

\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

%% Define \norm using normal command definition
% \newcommand{\norm}[1]{\lVert#1\rVert} %for making the magnitude (norm) of velocity vectors

\begin{document}
% \doublespacing

{\renewcommand\arraystretch{1.0}
$$A$$ & area \\

\multicolumn{2}{l}{\Large{\textbf{Operators}}}\\
$$\norm$$ & vector magnitude\\
\end{longtable}}

\end{document}


Also, note that the long table settings were simply grabbed from the AIAA example format as this is for the nomenclature section.

• \norm requires one argument, e.g. \norm{x}. – Henri Menke Jul 2 at 3:46
• Have you tried $$\norm A$$ instead $$\norm$$? – Mensch Jul 2 at 3:46
• The issue you're encountering is in no way related to \norm being used inside a longtable environment. Instead, it's linked to the fact that \norm takes an argument. I believe that what you would (or should?) want to typeset is either \norm{{}\cdot{}} or -- not quite as good -- \norm{\;} (\; inserts "thickspace".) – Mico Jul 2 at 4:10
• You can easily define norm such that given an empty argument {} , then it inserts an argument marker instead (as Mico mentions, but simpler) – daleif Jul 2 at 5:31
• Apparantly your aim could be to display the command name \norm and not the result with the double bars. In such case, \string\norm will typeset the word "norm" with its prefixed backslash. – Jhor Jul 2 at 8:02