yochju / latex-makefile

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

Problem with glossaries package #156

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I tried using the latex-makefile with a document that uses the glossaries 
package (with xindy). It works great, but only on a clean working directory. If 
I make a change to the document the .gls file isn't regenerated, and the 
document is rendered with the previous version's glossary. After doing a 'make 
clean' it works fine again.

Original issue reported on code.google.com by haggai.e...@gmail.com on 16 Apr 2012 at 9:30

GoogleCodeExporter commented 9 years ago
I have the same problem with makeidx and indexes. The index file is not 
regenereated after first run. When there are changes that touch also the index 
I have to do a make clean.

Original comment by TimMel...@gmail.com on 5 Jun 2012 at 8:17

GoogleCodeExporter commented 9 years ago
I have also run into this problem. I think this might even be a duplicate of 
#158.

So, I have figured out that the .gls is only generated when it shows up in the 
.log. This means that when something updates the glossary (e.g. when I change 
something in \newglossaryentry in my case), the .glo is rebuilt but the .gls is 
not, because the .gls already exists. Since there is no new dependency on the 
.gls, it never gets rebuilt.

I've looked at a few possible solutions.

(1) This Makefile copies the .glo before running latex. If the new and old 
files are different, then it runs makeindex again.
http://etherlabmaster.hg.sourceforge.net/hgweb/etherlabmaster/etherlabmaster/raw
-file/7920ca086e5c/doc/Makefile

(2) I did a hack myself to to ensure the .gls was rebuilt. Simply remove any 
existing .gls at the top of the 1st.make rule:
%.$(build_target_extension).1st.make %.d %.aux %.aux.make %.fls: %.tex
    $(QUIET)$(RM) -f '$*.gls'

Of course, it now always builds the .gls, but that may not be so bad.

As an aside, I just discovered this project, and I like the approach. I was 
using latexmk, but I also couldn't get it to rebuild the .gls.

Original comment by sean.lea...@gmail.com on 14 Jul 2012 at 5:46