wrong page numering in TOC

Dear all,

I am having problems with the page numbering in the TOC. I think the problems has something to do with this. I have a lot of displayed figures and I have used the  \addcontentsline{lof}{figure} for the list of figures.

I fixed some of the wrong pages in the TOC inserting an encapsulated tex \setcounter{page}{} and it has worked in some pages but not in some cases I can not fix the problem

Thank you in advance for your help

 

If you use floating graphics

If you use floating graphics then the caption is automatically added to the LOF. Typically, page numbering problems mean that enough LaTeX passes were not done when compiling the document. It can help to use Typeset, General Settings and turn on "Use old .aux files if possible".

If you are using displayed graphics and the \addcontentsline macro, then consider the order in the file and when things are processed. If you have \addcontentsline before the graphics, but the graphics causes a page break, then the \addcontentsline will point to the page before the graphics. Moving the \addcontentsline to be immediately after the graphics may be enough to solve your problem. Changing the page counter should not be necessary.

That's as much as I can say without seeing a document that causes the problem.

Thank you george. I

Thank you george.

I have turned on "Use old .aux files if possible" and the problem is fixed