Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % arara: lualatex: { options: [ '-synctex=1', '-shell-escape' ]}
- % arara: makeglossaries
- % arara: lualatex: { options: [ '-synctex=1', '-shell-escape' ]}
- \documentclass{elsarticle}
- \usepackage{booktabs}
- \usepackage{calc,siunitx}
- \sisetup{load-configurations = abbreviations}
- \usepackage[xindy,automake,stylemods,nonumberlist]{glossaries-extra}
- \makeglossaries
- \newlength\glsnamewidth
- \newlength\glsunitwidth
- \settowidth{\glsnamewidth}{\textbf{sign}}
- \settowidth{\glsunitwidth}{\textbf{unit}}
- \newglossarystyle{nameunitdesc}{%
- \setlength{\glsdescwidth}{\linewidth-\glsnamewidth-\glsunitwidth-6\tabcolsep}%
- \renewenvironment{theglossary}%
- {\begin{supertabular}{@{}p{\glsnamewidth}p{\glsunitwidth}p{\glsdescwidth}@{}}\toprule\addlinespace[5pt]}%
- {\bottomrule\end{supertabular}}%
- \renewcommand*{\glossaryheader}{}%
- \renewcommand*{\glsgroupheading}[1]{}%
- \renewcommand{\glossentry}[2]{%
- \raggedright\glstarget{##1}{\glossentryname{##1}} &
- \centering\glossentrysymbol{##1} &
- \glossentrydesc{##1}\tabularnewline
- }%
- \renewcommand{\subglossentry}[3]{\glossentry{##2}{##3}}%
- \renewcommand*{\glsgroupskip}{}%
- }
- \glsnoexpandfields
- \newglossaryentry{L}{name={L},description={some text},symbol={---}}
- \newglossaryentry{Cp}{name={Cp},description={specific heat}, symbol={[\si{\J\per\kg\per\K}]}}
- \newglossaryentry{Gamma_l}{name={$\Gamma_l$},description={Laser-irradiated boundary}}
- \newglossaryentry{Delta}{name={$\Delta$},description={Nodal spacing},symbol={[\si{\um}]}}
- \journal{Applied Mathematics and Computation}
- \glsaddall
- \begin{document}
- \section{Introduction}
- \glsFindWidestUsedAnyNameSymbol{\glsunitwidth}
- \settowidth{\dimen0}{\glsgetwidestname}
- \ifdim\dimen0>\glsnamewidth
- \glsnamewidth=\dimen0
- \fi
- \printglossary[style=nameunitdesc,title=Nomenclature]
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement