用語集に下付き文字付きのシンボルをパラメータとして追加する

用語集に下付き文字付きのシンボルをパラメータとして追加する

下付き文字に関係なく、同じシンボルにリンクするシンボルを追加しようとしています。したがって、\tau_{x} と \tau_{2300} は両方ともシンボルのリスト内の \tau にリンクする必要があります。

\glsarg オプションを見つけましたが、どういうわけか、それを指定してもテキストに下付き文字が表示されません。一方、用語集で通常の下付き文字に変更すると、テキストに下付き文字として表示されます。どうすればこれを修正できますか?

MWE:

\documentclass[12pt]{book}
\usepackage{natbib}
\usepackage{float}
\usepackage{tabularx}
\usepackage{paralist}
\usepackage{adjustbox}
\usepackage{amsmath}
\usepackage[acronyms,nonumberlist,nopostdot]{glossaries}

\BeforeBeginEnvironment{tabularx}{\begin{center}\small}
\AfterEndEnvironment{tabularx}{\end{center}}

\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}  

\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
\begin{longtable}{lp{1.35\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}%
{\end{longtable}}%
 %
\renewcommand*{\glossaryheader}{%  Change the table header
\bfseries Symbol & \bfseries Description & \bfseries Unit \\
\hline
\endhead}
\renewcommand*{\glossentry}[2]{%  Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1}  \tabularnewline}}

\makeglossaries

% Allow for subscripts

\glsnoexpandfields 
\newcommand*{\glsarg}{}

% syntax: \newgreeksymbol[options]{label}{name}{description}{unit}
\newcommand{\newgreeksymbol}[6][]{%
  \newglossaryentry{#2}{name={#3},text={#6},sort={>#2},description={#4},unit={#5},#1}%
}

\newgreeksymbol{tau}{\ensuremath{\tau}}{Shear modulus}{\ensuremath{Pa}}{\ensuremath{\tau_{\glsarg}}}

\begin{document}  

\setglossarysection{section}
\setglossarystyle{super}
\renewcommand*{\glsgroupskip}{}
\printglossary[style=symbunitlong,title=List of Symbols]
\printglossary[type=\acronymtype,title={List of Abbreviations}]
\glsaddall

Testing \gls{tau}[op]. "op" should show up as a subscript.

\end{document}

関連情報