yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

Glossaries change number of pages but indices are not rebuilt #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Included is a document whose page references in the index and in the glossary 
are off by two (exactly the number of pages added by the glossary after it 
appeared in the document).

PROBLEM:

  Page references are not recalculated once the glossary appears.

WHAT TO DO?

  Rerun glossary and index regeneration after the glossaries appear.

  \makeindex
  \makeglossaries

Original issue reported on code.google.com by matej.ur...@gmail.com on 1 May 2012 at 5:24

Attachments:

GoogleCodeExporter commented 9 years ago
I have tried it with the following versions (both didn't work):

    2.2.0 (release)
    2.2.1-alpha8

Also, here is the workaround I currently employ:

    make && makeglossaries thesis && makeindex thesis && pdflatex thesis.tex

Original comment by matej.ur...@gmail.com on 1 May 2012 at 10:03

GoogleCodeExporter commented 9 years ago
There is a way to do this, but I'd have to look at details.

Typically these kinds of things are triggered by log file parse rules in the 
makefile, but in this case it looks like we'll have to fiddle with 
dependencies, too.

We have to do this sort of thing all the time, it turns out, because latex 
likes to recalculate things.  What we need is basically this (and I'm afraid I 
won't be able to do much digging here for a while yet)

- some indicator in the files that signals to us that it's time to run 
makeindex and makeglossaries.
- a rule that does the actual building (with log parsing so we can display 
errors - there are lots of these in the makefile)
- the right dependency order to ensure that things are run.

This last part might be easy or difficult, depending on when *exactly* the 
makeindex and makeglossaries commands need to be run.  It looks from the above 
like you can run them almost at the end, kind of like bibtex.  If that's the 
case, this shouldn't be too hard, since we already do that in the case of 
annotated bibtex (see the rules starting on line 2921 in 2.2.1-alpha8).

Overall, this looks doable.  It is always the details that get you.  :-)

Original comment by shiblon on 7 May 2012 at 12:58

GoogleCodeExporter commented 9 years ago
The fix I have given for issue #145 is a first step in fixing this.

The pages can still be slightly off and a little bit more work has to be done 
to have a perfect solution. The problem is that "nobody" will tell us that it 
is time to recompute the glossaries. So similarly to the rule creating 
auxbbl.make we will have to figure out if there is some change. AFAICT the only 
way is to rerun makeglossaries and comparing the `.acr` files.

While trying to do that I ran into problems if the document did not have a 
glossaries.

Original comment by nicolas....@gmail.com on 13 Dec 2013 at 5:35