Simply put, the nomencl package sees | as a special character (as mentioned here). I am interested in inserting a table with vertical lines. If I use | to denote a vertical line, the entry wouldn't show in the nomenclature list.
The ideas that I can think of to overcome this is generating the table as a standalone and importing the pdf in the entry or generate the entire table using TikZ, as shown here.
Is there a simpler approach to adapt to?
Here is a minimal example:
%pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex
%makeindex %.nlo -s nomencl.ist -o %.nls
%pdflatex -synctex=1 -interaction=nonstopmode --shell-escape %.tex
\documentclass[12pt]{article}
\usepackage{nomencl}
\makenomenclature
\makeindex
\begin{document}
\printnomenclature[1in]
\nomenclature{Entry 1}{
\begin{tabular}{ccc}
a & a & a \\
a & a & a \\
a & a & a
\end{tabular}
}
\nomenclature{Entry 2}{
\begin{tabular}{|ccc|}
b & b & b \\
b & b & b \\
b & b & b
\end{tabular}
}
\end{document}

!{\vrule}instead of|in the preamble of the tabular. – F. Pantigny Jul 05 '20 at 17:07Illegal character in array argexception. – M. Al Jumaily Jul 05 '20 at 17:08arraypackage for!– David Carlisle Jul 05 '20 at 17:08! Package array Error: Illegal pream-token (\subitem): ``c'used is what I get. – M. Al Jumaily Jul 05 '20 at 17:15Illegal pream-token (\subitem):error when runningPDFLaTeX. – M. Al Jumaily Jul 06 '20 at 13:10[001]argument passed. I updated my question. – M. Al Jumaily Jul 06 '20 at 14:35