# Glossary style long but without the indentation before the notations

I want to do a nomenclature list using the glossaries package. I like the print style "long", however, I would prefer if it didn't have the large indentation to the left and it also would be great if it had three columns so I could have the first column for the notation, second column for units and third for description. Minimal example of my code:

\documentclass[12pt,a4paper]{report}

\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage[acronym,toc,nopostdot]{glossaries}

\hypersetup{
urlcolor     = black, %Colour for external hyperlinks
citecolor   = black %Colour of citations
}

\newglossaryentry{resonance_angular_frequency}{
name = $\omega_0$ ,
description = [rad/s] - The angular frequency at which the imaginary part of an impedance is zero
}
\newglossaryentry{coil}{
name = $W_i$ ,
description = The coils in the magnetic circuit where 1 denotes the primary side and 2 denotes the secondary side.
}
\newglossaryentry{electric_field}{
name = $\vec{E}$ ,
description = [V/m] - Electric field
}
\newglossaryentry{magnetic_flux_density}{
name = $\vec{B}$ ,
description = [T] - Magnetic flux density
}

\makeglossaries

\printglossary[nonumberlist, style = long, title=Nomenclature]

\end{document}


Is there a way of adjusting the glossary style "long" the way I want to?

EDIT: In case you want to see what it looks like right now using the "long" style:

• Does no one here know how to change the indentation? – ekmanch Feb 21 '14 at 7:24

You can simply increase the value of the length \glsdescwidth whose default value is 0.6\hsize. For example, add the line

\setlength{\glsdescwidth}{0.8\hsize}


in your preamble and you'll have

Complete code:

\documentclass[12pt,a4paper]{report}

\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage[acronym,toc,nopostdot]{glossaries}

\hypersetup{
urlcolor     = black, %Colour for external hyperlinks
citecolor   = black %Colour of citations
}

\newglossaryentry{resonance_angular_frequency}{
name = $\omega_0$ ,
description = [rad/s] - The angular frequency at which the imaginary part of an impedance is zero
}
\newglossaryentry{coil}{
name = $W_i$ ,
description = The coils in the magnetic circuit where 1 denotes the primary side and 2 denotes the secondary side.
}
\newglossaryentry{electric_field}{
name = $\vec{E}$ ,
description = [V/m] - Electric field
}
\newglossaryentry{magnetic_flux_density}{
name = $\vec{B}$ ,
description = [T] - Magnetic flux density
}

\makeglossaries

\setlength{\glsdescwidth}{0.8\hsize}

\begin{document}

\printglossary[nonumberlist, style = long, title=Nomenclature]

\end{document}


Instead, if you want a column for units you can define a new glossary style mystyle

\newglossarystyle{mylong}{%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{llp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrysymbol{##1} &
\glossentrydesc{##1} &
##2\tabularnewline
}%
\renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
\glossentrysymbol{##2} &
\glstarget{##2}{\strut}\glossentrydesc{##2} & ##3\tabularnewline
}%
\renewcommand*{\glsgroupskip}{%
\ifglsnogroupskip\else & & &\tabularnewline\fi}%
}


and define the units as symbols as in

\newglossaryentry{magnetic_flux_density}{
name = $\vec{B}$ ,
description =  Magnetic flux density,
symbol = [T]
}


The following MWE

\documentclass[12pt,a4paper]{report}

\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{longtable}
\usepackage[acronym,toc,nopostdot]{glossaries}

\hypersetup{
urlcolor     = black, %Colour for external hyperlinks
citecolor   = black %Colour of citations
}

\newglossaryentry{resonance_angular_frequency}{
name = $\omega_0$ ,
description = The angular frequency at which the imaginary part of an impedance is zero,
}
\newglossaryentry{coil}{
name = $W_i$ ,
description = The coils in the magnetic circuit where 1 denotes the primary side and 2 denotes the secondary side.
}
\newglossaryentry{electric_field}{
name = $\vec{E}$ ,
description = Electric field,
symbol = [V/m]
}
\newglossaryentry{magnetic_flux_density}{
name = $\vec{B}$ ,
description =  Magnetic flux density,
symbol = [T]
}

\makeglossaries

\newglossarystyle{mylong}{%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{llp{\glsdescwidth}p{\glspagelistwidth}}}%
{\end{longtable}}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glossentrysymbol{##1} &
\glossentrydesc{##1} &
##2\tabularnewline
}%
\renewcommand{\subglossentry}[3]{%
&
\glssubentryitem{##2}%
\glossentrysymbol{##2} &
\glstarget{##2}{\strut}\glossentrydesc{##2} & ##3\tabularnewline
}%
\renewcommand*{\glsgroupskip}{%
\ifglsnogroupskip\else & & &\tabularnewline\fi}%
}

\begin{document}


• @ekmanch Of course. It suffices to add the l specifier to the longtable. See the edited answer. – karlkoeller Feb 21 '14 at 15:18