<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\batchmode
\documentclass{beamer}

\usepackage{glossaries}

%\glsnoexpandfields

\makeglossaries

\newglossaryentry{sample}{name=sample,first={\textit{sample}},
  description={an example}}

\begin{document}

\begin{frame}
\gls{sample}
\end{frame}

\begin{frame}
\printglossary
\end{frame}

\end{document}
</pre></body></html>