3

I want to keep my acronym environment in a separate file and avoid printing out the whole acronym list. Still the option [nolist] of the acronym package seems not to work when the acronym environment is included into the main document.

Please consider the following MWE

\documentclass{article}

\usepackage[nolist]{acronym}
\usepackage{filecontents}

\begin{filecontents}{acronym.tex}

\begin{acronym}
  \acro{NLP}{Natural Language Processing}
\end{acronym}

\end{filecontents}


\begin{document}

First use of \ac{NLP}. Second use of \ac{NLP}.

\include{acronym}

\end{document}

which gives

enter image description here

Yet when I take the option [nolist] out I get the correct

enter image description here

0

1 Answer 1

4

I get the expected result if I use \input instead of \include.

\documentclass{article}

\usepackage[nolist]{acronym}
\usepackage{filecontents}

\begin{filecontents}{acronym.tex}

\begin{acronym}
  \acro{NLP}{Natural Language Processing}
\end{acronym}

\end{filecontents}


\begin{document}

First use of \ac{NLP}. Second use of \ac{NLP}.

\input{acronym}

\end{document}

enter image description here

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.