Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm getting some strange warnings when I build my latex files with pdftex (texlipse). I have defined an acronym list like this:

\chapter*{Acronyms}
\addcontentsline{toc}{chapter}{Acronyms}

\begin{acronym}

\acro{AL} {Authentication List}
\acro{AM} {Authentication Module}

...

\end{acronym}

And I when I refer to these acronyms (everyone in the list, but didn't include all here) like this:

... of the \ac{AL} periodically ...

I get lots of warnings like this in texlipse:

Acronym `AL' is not defined on input line 117

However, the PDF file is produced correctly. My only issue is that I want to go through the warnings to find things that actually needs attention (like overfull /hboxes) but with hundreds of these errors that gets quite tedious.

Does anyone know how to get around this problem? Is there maybe some settings in my texlipse that is wrong? I know texlipse don't automatically recognize the acronyms package as when I press ctrl+space I never get the 'ac' option, while other latex commands such as 'begin' will show up.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I am not familiar with texlipse but, if you have not yet got to the bottom of this I would expect a second compile run should resolve the warnings. For the second run to be effective you need to keep the output files from the first run (especially the .aux file, see below).

1) I assume the package declaration \usepackage{acronym} is in your .tex file preamble.

[If not then it would still work (sort of) in that there would be lots of errors (e.g. '! Undefined control sequence. l.8 the \ac{AL} periodically and the \ac{AM} once.') but the acronyms appear in the text (all unexpanded of course) and the acronym list appears in the acronyms list.]

2) With the acronym package then the following compiles without error but with lots of warnings of the type you report (e.g. 'Package acronym Warning: Acronym `AL' is not defined on input line 8'.):

\documentclass{book}
\usepackage{acronym}
\begin{document}
\chapter{Text sample}
\addcontentsline{toc}{chapter}{Text sample}

Not much to be said here other than to note 
the \ac{AL} periodically and the \ac{AM} once.

The second \ac{AL} occurrence, as discussed.

\chapter*{Acronyms}
\addcontentsline{toc}{chapter}{Acronyms}

\begin{acronym}
\acro{AL} {Authentication List}

\acro{AM} {Authentication Module} 
\end{acronym}

\end{document}

However, the PDF file does not look correct as the acronyms are rendered as, for example, 'the AM! (AM!)'. The reason for this is that on the first pass of the compiler it cannot resolve the acronyms but by the end of the pass it has written the details into a .aux file with the same name as the .tex file. e.g., for the simple .tex above the .aux file generated by pdflatex was:

\relax 
\reset@newl@bel
\@writefile{toc}{\contentsline {chapter}{\numberline {1}Text sample}{1}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\@writefile{toc}{\contentsline {chapter}{Text sample}{1}}
\undonewlabel{acro:AL}
\newlabel{acro:AL}{{1}{1}}
\acronymused{AL}
\undonewlabel{acro:AM}
\newlabel{acro:AM}{{1}{1}}
\acronymused{AM}
\acronymused{AL}
\@writefile{toc}{\contentsline {chapter}{Acronyms}{3}}
\newacro{AL}[\AC@hyperlink{AL}{AL}]{Authentication List}
\newacro{AM}[\AC@hyperlink{AM}{AM}]{Authentication Module}

A second pass of the compiler can then use the information in the .aux file as it parses the .tex file to generate a complete .pdf file, including, by default, the expansion of the acronym on the first occurrence. On my system this generated the .pdf file as expected and with no errors or warning from pdflatex.

share|improve this answer
    
Yes, a second compile run cleared the warnings. I've always made eclipse clear previous builds before compiling a new one, seems this is not a good strategy with latex and texlipse. –  ephrack Sep 5 '11 at 6:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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