I would like to add a header ("Symbol", "Description", "Unit") to my nomenclature using nomentbl. I have read through several posts on the internet and it seems possible, but I have to change the .ist file. Can anyone provide me further help?

The preamble looks like this:

\usepackage{nomentbl}
\usepackage{ifthen}
\newcommand{\abk}{\nomenclature}
\renewcommand{\nomname}{Nomenklatur}
\renewcommand\nomgroup[1]{%
\ifx#1A\relax
\large \bfseries Abkürzungsverzeichnis
\fi
\ifx#1P\relax
\large \bfseries Physikalische Größen
\fi
}
\makenomenclature

And I add new symbols using this code:

\abk[A]{$m$}{mass}{kg}{}
\abk[P]{$\alpha$}{acceleration}{m/s$^2$}{}

EDIT: Thanks to Mr. Swann, my initial problem has been solved. But now I'm interested in further customization of my nomenclature. Therefore I attached two files, which show the current nomenclature and a nomenclature which I would like to achieve. Is it possible to make the changes I marked in the file of my current nomenclature?

Current: Goal:

• Welcome to TeX - LaTeX! It is best to collect code snippets in to one small compilable document that demonstrates the problem. – Andrew Swann Jun 13 '17 at 13:15
• Well, I don't really have a problem while compiling it. I just don't know how to do it. So there isn't any "not-working-code" :) – Freeriderz Jun 13 '17 at 14:26
• The request is to help those who wish to work on the problem and future visitors, so one can just download a single piece of code and try to compile that. – Andrew Swann Jun 13 '17 at 14:28

This is not so obvious. The first idea, as you hint at, is to modify the .ist file, to print these headers, but that does not play well with the \nomgroup's: using a standard longtable set-up would mean the three column headings come before the \nomgroup headings, which does not look good.

Instead you can add code to the latex file writing the \nomgroup command as

\renewcommand\nomgroup[1]{%
\ifx#1A\relax
\large \bfseries Abkürzungsverzeichnis
\fi
\ifx#1P\relax
\large \bfseries Physikalische Größen
\fi
\hfill \endgroup \\ \\
Symbol&Beschreibung&Einheit \begingroup
}

The change to your current version is to add the final two lines of code.

\documentclass[german]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{nomentbl}

\newcommand{\abk}{\nomenclature}
\renewcommand{\nomname}{Nomenklatur}
\renewcommand\nomgroup[1]{%
\ifx#1A\relax
\large \bfseries Abkürzungsverzeichnis
\fi
\ifx#1P\relax
\large \bfseries Physikalische Größen
\fi
\hfill \endgroup \\ \\
Symbol&Beschreibung&Einheit \begingroup
}
\makenomenclature

\begin{document}

Etwas\dots

\nomenclature[A]{$m$}{mass}{kg}{}
\nomenclature[P]{$\alpha$}{acceleration}{m/s$^2$}{}

\printnomenclature
\end{document}

This relies on the details of what is written in the .nls file at each \nomgroup. There you find

\multicolumn{3}{l}{\nomgroup{A}} \\
\nopagebreak\\*[\parskip]

The new \nomgroup code above closes the the \multicolumn group after providing the section formatting, inserts some new lines and the three column headings, and finally reopens a group to match the remaining } at the end of the original \multicolumn invocation. This means that what is effectively called is

\multicolumn{3}{l}{ \large \bfseries Title \hfill } \\ \\
Symbol&Bechreibung&Einheit {} \\
\nopagebreak\\*[\parskip]

providing a title row followed by the three column headings. The \hfill prevents unwanted wide spacing in titles consisting of several words.

You may wish to add \nopagebreak at the insert line breaks, if you find the page breaking is bad.

Update In response to your comment, if you wish to have different headings in subsection that you can essentially moving the heading code inside the conditional statements, but you next extra macros. Here is a reasonably modular approach:

\documentclass[german]{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{nomentbl}

\newcommand{\abk}{\nomenclature}
\renewcommand{\nomname}{Nomenklatur}
#2 \begingroup}
\renewcommand\nomgroup[1]{%
\ifx#1A\relax
\nomgroupX{Abkürzungsverzeichnis}{Symbol&Beschreibung&Einheit}
\fi
\ifx#1P\relax
\nomgroupX{Physikalische Größen}{Buchstaben&Namen&Einheit}
\fi
}
\makenomenclature

\begin{document}

Etwas\dots

\nomenclature[A]{$m$}{mass}{kg}{}
\nomenclature[P]{$\alpha$}{acceleration}{m/s$^2$}{}

\printnomenclature
\end{document}
• Hello Andrew, unfortunately it doesn't work with my code. Since the answer is too long for a comment on you answer, I added another answer to my question with my code. – Freeriderz Jun 14 '17 at 11:44
• The problem was the package "colortbl", without it, everything works perfect! Thank you! One more thing, do you know if it is possible to change the header within the groups? For example: List of Abbreviations: -> Abbreviation -> Description and in the List of Symbols: -> Symbol -> Unit -> Description – Freeriderz Jun 14 '17 at 12:53
• Thank you Andrew, works perfect! I edited my first post in this topic, because I am looking for further customizations (edit vspace, leftflush instead of centered etc.). Maybe you can take a look on it as well? – Freeriderz Jun 14 '17 at 14:30
• I think it would be better to ask a separate question with these new requirements. Some of the spacing you are seeing is due to other packages you are loading, not currently specified, you need provide further details. – Andrew Swann Jun 14 '17 at 15:16
• ok, I will do so! :) – Freeriderz Jun 14 '17 at 16:32