[Tex/LaTex] Glossary column header

glossaries

I'm trying to add headers to the columns in the glossary, but I don't manage to make it work. Does anyone have any idea how to add column headers? The code below change the title of the glossary to "Main", but does not give me the column headers I expected.

\documentclass[12pt]{article}
\usepackage[]{glossaries}
\glossarystyle{tree}
\renewcommand*{\glossaryname}{Main}
\renewcommand*{\entryname}{Acronyms}
\renewcommand*{\descriptionname}{Description}
\renewcommand*{\pagelistname}{Page}

\newglossaryentry{test}{
name={test},
description={Description of test}
}

\newglossaryentry{test2}
{
name={test2},
description={Description of test2}
}

\makeglossary

\begin{document}
\printglossary
\vspace{5cm}
\gls{test}, \gls{test2}
\end{document}

Best Answer

You have to use a style that support headers, for example long3colheader. BTW, the command \glossarystyle has been superseded by \setglossarystyle.

MWE:

\documentclass[12pt]{article}
\usepackage[]{glossaries}
\setglossarystyle{long3colheader}
\renewcommand*{\glossaryname}{Main}
\renewcommand*{\entryname}{Acronyms}
\renewcommand*{\descriptionname}{Description}
\renewcommand*{\pagelistname}{Page}

\newglossaryentry{test}{
name={test},
description={Description of test}
}

\newglossaryentry{test2}
{
name={test2},
description={Description of test2}
}

\makeglossary

\begin{document}
\printglossary

\vspace{5cm}
\gls{test}, \gls{test2}
\end{document} 

Output

enter image description here