[Tex/LaTex] Misplaced alignment tab character &

errorslongtablenomenclaturetables

Get that error when i use \listofnomenclature{ll}
it is defined as so in the Thesis.cls file

 }
\newcommand\listnomenclature{Symbols}
\usepackage{longtable}
\newcommand\listofnomenclature[2]{
\btypeout{\listnomenclature}
\addtotoc{\listnomenclature}
\chapter*{\listnomenclature
  \@mkboth{
      \MakeUppercase\listnomenclature}    {\MakeUppercase\listnomenclature}}
\begin{longtable}[c]{#1}#2\end{longtable}\par
\cleardoublepage
}

use case:

\listofnomenclature{ll}

{

\textbf{AC} & \textbf{A}lternating \textbf{C}urrent\\
}

A minimal example can be found here: https://www.dropbox.com/sh/crwqkoiqr8crldj/AACGzMkXZEOViP0pnO1zhTs1a?dl=0

i have used this in a previous project and it worked fine..

Best Answer

for some weird reason, it works by removing the spaces.

\listofnomenclature{ll}
{\textbf{AC} & \textbf{A}lternating \textbf{C}urrent\\}

interesting though, the text output is always centered, even when using \raggedright..why is it always centered?