Link to home
Start Free TrialLog in
Avatar of tunheim
tunheimFlag for Norway

asked on

LaTeX/dvipdfm error (Can't begin an annotation when one is pending.)

Running dvipdfm on Windows XP I get the following error

(snip)[9][10
Can't begin an annotation when one is pending.

Unparsed material at end of special ignored...
Current input buffer is --><< /Type /Annot /Subtype /Link /Border [0 0 0] /C ...
<--

Tried to end an annotation without starting one!

Can't begin an annotation when one is pending.

Unparsed material at end of special ignored...
Current input buffer is --><< /Type /Annot /Subtype /Link /Border [0 0 0] /C ...
<--

Tried to end an annotation without starting one!
][11] (snip)

As can be seen from the error message, the error appearantly happens on page ten. Seen below is the source code that generates this part of my document. Page ten starts with the chapter "Introduction".


\listoffigures{}
\mainmatter
\chapter{Introduction}
Utlilzation of agricultural (snip)

Do anyone have an idea what is going on here? Any advice is nice.
Avatar of Jose Parrot
Jose Parrot
Flag of Brazil image

Hi,

The error message is typical of a trying to nest comments, which isn't allowed.
Take a look at the TeX source if there is a    /*"   in the text. This is a begin of  annotation. This is a special case of comment. This second isn't processed by TeX, but annotation is parsed by.

Jose

Check syntax, as per this template:

\pdfannot width 5.0in height 36pt
{/Type /Annot /Subtype /Text
/Contents (This  /Text is an annotation.)}

Jose
Avatar of tunheim

ASKER

So I should look for the string  /*"  in my source files?

I don't really understand what you ment by the second comment. Should I insert that code into my latex source?
No and no.

If you don't have a   /*"   in your source, lets delete this possible cause.
If the problem isn't a syntax error, then delete this other one.

Take a look if the source has similar sequence as per below:
\addcontentsline{toc}{chapter}
\listoffigures (or \listoftable or \listof....  anything else)
The error message can start here. This is a listof... inside a toc.

Also, the error message sounds to be different to what we are understanding.
The sentence "Unparsed material at end of special ignored..." suggests a tag like
\special{pdf: ann width 3.0in height 36pt
<< /Type /Annot /Subtype /Text /Contents (This is a /Text Annotation.) >>}
If it is the case, there is a syntax error in the "special" command.

If there are no "/Type /Annot..." in your source, then some package is puting such command in it. Take a look at the packages inserted at the begin of your TeX source.

Jose

Jose
Avatar of tunheim

ASKER

Pardon for my untimely responce.

Using your advice as guidance I managed to track down to source of the problem. It arises when I use the command \ac{} inside a figure caption. The ac-command is part of the acronym package (http://turl.no/1cp).

Exaple of problematic use:
(...)
\caption{Change of ac{HHV} of biooil})
(...)

This has solved my problem. However, in the interest of learning, would you be able to share with me any additional thoughts you have on the topic. Why does this problem arise in the first place? Would you consider it a bug? If so, how can it be fixed?
ASKER CERTIFIED SOLUTION
Avatar of Jose Parrot
Jose Parrot
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tunheim

ASKER

Thank you for helping me trough finding a solution :)