Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbol glossary suggestion with longtabu does not work anymore #67

Closed
Pratched opened this issue Jul 12, 2021 · 2 comments
Closed

symbol glossary suggestion with longtabu does not work anymore #67

Pratched opened this issue Jul 12, 2021 · 2 comments

Comments

@Pratched
Copy link

Pratched commented Jul 12, 2021

I am referring to the user guideline for this package from the 29th of March 2017, specifically page 21.

Within this document there was an alternative symbol glossary introduced which worked fine for me before.
Unfortunately this does not work any longer with adaptations made by exemplary #58.

The following MWE yield an error about Missing }, but only when printing the glossary with the predefined style symblongtabu and I cannot figure out what is causing this.

\documentclass[%
twoside=true,%	
open=right,%
]{tudscrreprt}
\usepackage[T1]{fontenc}
\usepackage{siunitx}

\usepackage[%
acronym,% 
symbols,%
toc,%
sanitizesort,%
translate=babel,%
xindy={language=german-din},%
section=chapter,%
]{glossaries}

\makenoidxglossaries

\usepackage{tabu}

\newglossarystyle{symblongtabu}{%
	\renewenvironment{theglossary}{%
		\begin{longtabu}spread 0pt[l]{ccX<{\strut}l}%
		}{%
		\end{longtabu}%
	}%
	\renewcommand*{\glsgroupheading}[1]{}%
	\renewcommand*{\glsgroupskip}{}%
	\renewcommand*{\glossaryheader}{%
		\toprule
		\bfseries Formelzeichen & \bfseries Einheit &
		\bfseries Bezeichnung & \bfseries Seite(n)
		\tabularnewline\midrule\endhead%
		\bottomrule\endfoot%
	}%
	\renewcommand*{\glossentry}[2]{%
		\glsentryitem{##1}% Entry number if required
		\glstarget{##1}{\glossentrysymbol{##1}} &
		\glsentryuseri{##1} &
		\glossentryname{##1} &
		##2\tabularnewline%
	}%
}

\defglsentryfmt[symbols]{%
	\ifmmode%
	\glssymbol{\glslabel}%
	\else%
	\glsgenentryfmt~\glsentrysymbol{\glslabel}%
	\fi%
}

\newcommand*{\nsymbol}[5][]{%
	\newglossaryentry{#2}{%
		type=symbols,%
		name={#3},%
		description={\nopostdesc},%
		symbol={\ensuremath{#4}},%
		sort={#2},%
		#1,%
	}%
}

\nsymbol{ipv}{Strom}{I_{pv}}{\ampere}

\begin{document}
	\tableofcontents
	\printnoidxglossary[type=symbols, style=symblongtabu]
	
	\chapter{test}
	\gls{ipv}
\end{document}

Am i missing something or is this just due to changes made within the package(s) and therefore incompatible?

@mrpiggi
Copy link
Member

mrpiggi commented Jul 14, 2021

The package tabu is officially declared broken since 2019-01-12 and will probably never be fixed. But you can easily switch to xltabular instead. Package tabularray would be an alternative, too.

\usepackage{xltabular}
\usepackage{booktabs}
%\usepackage{tabu}

\newglossarystyle{symblongtabu}{%
  \renewenvironment{theglossary}{%
%    \begin{longtabu}[l]{ccX<{\strut}l}% ’spread 0pt’ defekt in v2.9
    \xltabular[l]{\linewidth}{ccXl}%
    }{%
%    \end{longtabu}%
    \endxltabular%
  }%
  ...
}

@Pratched
Copy link
Author

Thanks for the easy fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants