% This file is public domain. % If you want to use arara you need the following directives: % arara: pdflatex % arara: makeglossaries % arara: pdflatex % %http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-font-abbr \documentclass{article} \usepackage{glossaries} \makeglossaries \glsaddstoragekey{font}{}{\entryfont} \newacronymstyle{long-font-short} {% \GlsUseAcrEntryDispStyle{long-short}% } {% \GlsUseAcrStyleDefs{long-short}% \renewcommand*{\genacrfullformat}[2]{% \glsentrylong{##1}##2\space ({\entryfont{##1}\glsentryshort{##1}})% }% \renewcommand*{\Genacrfullformat}[2]{% \Glsentrylong{##1}##2\space ({\entryfont{##1}\glsentryshort{##1}})% }% \renewcommand*{\genplacrfullformat}[2]{% \glsentrylongpl{##1}##2\space ({\entryfont{##1}\glsentryshortpl{##1}})% }% \renewcommand*{\Genplacrfullformat}[2]{% \Glsentrylongpl{##1}##2\space ({\entryfont{##1}\glsentryshortpl{##1}})% }% \renewcommand*{\acronymfont}[1]{{\entryfont{\glslabel}##1}}% \renewcommand*{\acronymentry}[1]{{\entryfont{##1}\glsentryshort{##1}}}% } \setacronymstyle{long-font-short} \newcommand*{\newitabbr}[1][]{\newacronym[font=\em,#1]} \newcommand*{\newupabbr}{\newacronym} \newitabbr{eg}{e.g.}{exempli gratia} \newitabbr{ie}{i.e.}{id est} \newupabbr{bsc}{BSc}{Bachelor of Science} \newupabbr{ba}{BA}{Bachelor of Arts} \newupabbr{agm}{AGM}{annual general meeting} \begin{document} First use: \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm}. Next use: \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm}. Short: \acrshort{eg} \acrshort{ie} \acrshort{bsc} \acrshort{ba} \acrshort{agm}. Full: \acrfull{eg} \acrfull{ie} \acrfull{bsc} \acrfull{ba} \acrfull{agm}. \printglossaries \end{document}