1

Is it possible to have an acronym shown in e.g. \texit inside the text but normally formatted in the list?

MWE:

\documentclass[
    fontsize=11pt,
    paper=a4,
    ]{scrartcl}

\usepackage[
    acronym,
    automake,
    nopostdot,
    toc,
    nomain,
    shortcuts,
    nogroupskip,
    ]{glossaries}

\makeglossaries

\newacronym[
    longplural={\textit{Alternating current}},
    shortplural={\textit{AC}},
    sort={AC},
    ]{AC}{\textit{AC}}{\textit{Alternating current}}
\newacronym[
    ]{BAU}{BAU}{Business as usual}

\begin{document}

\printglossary[
    type=\acronymtype,
    nonumberlist,
    style=super,
]

\bigskip

\noindent Textit: \gls{AC}\\
Normal text: \gls{BAU}.

\end{document}

Result:

MWE Result

But what I want is that AC and Alternating current should be italic in the text but not in the list.

Thanks in advance!

1
  • 1
    I updated the answer with a simpler code and no problems with parenthesis. Thank you for your feedback! Apr 18, 2021 at 23:23

1 Answer 1

1

UPDATED With a much simpler answer than the previous one.

z

\documentclass[
fontsize=11pt,
paper=a4,
]{scrartcl}

\usepackage[
acronym,
automake,
nopostdot,
toc,
nomain,
shortcuts,
nogroupskip,
]{glossaries}


\makeglossaries

\newcommand{\glsi}[1]{\textit{\gls{#1}}} % <<<< added

\newacronym[
longplural={Alternating current},
shortplural={AC},
sort={AC},
]{AC}{AC}{Alternating current} 

\newacronym[sort={BAU},
]{BAU}{BAU}{Business as usual} 

\begin{document}
    
    \printglossary[
    type=\acronymtype,
    nonumberlist,
    style= super, 
    ]
    
    \bigskip
    
    \noindent Textit: \glsi{AC}\\  % using  glsi here <<<<
    Normal text: \gls{BAU}.
    
    \bigskip
    
    \noindent   \textit{AC and Alternating current} are italic in the text but not in the list.
    
\end{document}
1
  • Thanks, that's way better already! :) Do you have any idea how to write the parenthesis around BAU in \textnormal as well? Apr 18, 2021 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.