# Use of derivative of physical quantities with glossary package

I reviewed several ways to manage my set of symbols for my master's thesis. The most common seems to use the glossaries package (or similiar) or do a manual version. As this the latter is not really in the sense of a TeX document workflow, i gave the glossaries package a try. A positive side-effect is that I don't have to specify the symbol for a physical quantity in the beginning of the writing which seems beneficial to me. It turned out that the package provides a nice functionality suiting my needs, despite some specific stuff which I am stuck with right now.

I am using several indices and superscripts to distinguish between different additional attributes of a given variable, e.g. the speed in x and in y direction of the coordinate system. For several of these variables i need to specify the derivatives. And here the problem starts: It becomes ugly if one uses the glossary package, as it is not possible to place the dot directly on the variable. I don't want to add all derivatives to the list of symbols.

Do you have any suggestions on how to handle this issue nicely in a general way being able to deal with greek letters, multipe indices and superscripts? If there is advice on how to handle this problem in general, i am pleased to get your feedback. Attached you find a MWE showing the variant using glossaries and the manual variant. The glossaries variant places the derivative dot in the middle of the complete object, while the other variant only refers to the main symbol.

\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\newglossaryentry{x_speed}{%
name={\ensuremath{v_x}},
description={x-Direction speed},
}
\newglossaryentry{y_speed}{%
name={\ensuremath{v_y}},
description={y-Direction speed},
}

\begin{document}
\section{Content}
The speed in the x-coordinate \gls{x_speed} and the speed in y-coordinate \gls{y_speed} are scalar quantities. Their derivatives are given by:
$\dot{\gls{x_speed}} = a_1(t)$
$\dot{\gls{y_speed}} = a_2(t)$
A second variant to display the derivatives is:
$\dot{v}_x = a_1(t)$
$\dot{v}_y = a_2(t)$
\printglossary[type=main, title=List of symbols, nonumberlist=true, nopostdot]
\end{document}

• Welcome to TeX.SX! Thank you for providing a good minimal working example. :-) – Nicola Talbot Sep 17 '17 at 22:15

I think the simplest thing to do is to supply the derivative form when you define the term. You can store it in one of the user keys. For example:

\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\newglossaryentry{x_speed}{%
name={\ensuremath{v_x}},
description={x-Direction speed},
user1={\dot{v}_x}
}
\newglossaryentry{y_speed}{%
name={\ensuremath{v_y}},
description={y-Direction speed},
user1={\dot{v}_y}
}

\begin{document}
\section{Content}
The speed in the x-coordinate \gls{x_speed} and the speed in y-coordinate \gls{y_speed} are scalar quantities. Their derivatives are given by:
$\dot{\gls{x_speed}} = a_1(t)$
$\dot{\gls{y_speed}} = a_2(t)$
User1 key:
$\glsuseri{x_speed} = a_1(t)$
$\glsuseri{y_speed} = a_2(t)$
A second variant to display the derivatives is:
$\dot{v}_x = a_1(t)$
$\dot{v}_y = a_2(t)$
\printglossary[type=main, title=List of symbols, nonumberlist=true, nopostdot]
\end{document}


(Alternatively you could provide your own custom key with \glsaddkey. It depends on what other variations you might have.)

If you want a parameter (for example, varying a subscript or function argument) see Symbols with optional parameter in glossaries with \newglossary.