What I have so far (and thanks to the folks who got me this far) is:
Code: Select all
\documentclass{article}
\usepackage{ntheorem}
\usepackage{glossaries}
\makeglossaries
\newtheoremstyle{mydefinition}%
{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]}%
{\item[\hskip\labelsep {\theorem@headerfont ##1\ ##2}\ ##3
\theorem@separator]}
\newtheorem{definition}{Definition}
\newsavebox{\wordbox}
\newsavebox{\defbox}
\newenvironment{glossdef}[1]{%
\savebox{\wordbox}{#1}%
\begin{lrbox}{\defbox}}{\end{lrbox}%
\begin{definition}[\usebox{\wordbox}]%
\usebox{\defbox}%
\newglossaryentry{word}{name={word},description={This is a definition.}}%
\end{definition}%
}
\begin{document}
\begin{glossdef}{snafu}
A snafu is is \ldots
\end{glossdef}
This is \gls{word}, used in a sentence.
\printglossary
\end{document}
Something like this:
Code: Select all
\newenvironment{glossdef}[1]{%
\savebox{\wordbox}{#1}%
\begin{lrbox}{\defbox}}{\end{lrbox}%
\begin{definition}[\gls{\usebox{\wordbox}}]%
\usebox{\defbox}%
\newglossaryentry{\usebox{\wordbox}}{name={\usebox{\wordbox}},description={\usebox{\defbox}}}%
\end{definition}%
}
Code: Select all
! Missing \endcsname inserted.
<to be read again>
\unhbox
l.29 \end{glossdef}