bib2gls
bib2gls copied to clipboard
Fails to read large/many aux files
There seems to be a problem with large (or many) aux files/entries with some installations:
I have a large latex project consisting of a main tex file which includes one tex file for each chapter. Chapter 3 and 4 are quite long with a lot of abbreviations and symbols. If I run bib2gls on my linux machine with texlive installed all aux files are read and the glossaries are written as expected. If I run bib2gls on a windows 10 machine with miktex, bib2gls stops reading the aux files at the middle of chapter4.aux and all entries and page numbers after this point are missing.
Using the --debug option shows that in case of the windows machine the aux files after chapter 4 are not even touched. However, there is no error or something and apart from the missing entries bib2gls produces a correct glossary.
If I comment out the "\include{chapter3.tex}", All aux files are read even on the windows machine.
I use: bib2gls -g %.aux Both installations of bib2gls are version 1.8.
Is der any additional information I can provide?
It's possible Java could be running out of memory on the windows machine. Is chapter3.aux
significantly larger than the other aux files? I think the first thing to do is to find out if there's an OutOfMemoryError
runtime error. Can you try running bib2gls
from the MSDOS command prompt and see if any runtime errors show in the terminal (you may need --silent
to suppress bib2gls
's normal messages to make them easier to see).
I've created a test document with 5000 entries defined in the .bib
file and 10 \include
'd chapters that have between 200 and 500 instances of \gls
per chapter to try to simulate a large document. It works fine for me on Linux and Windows with bib2gls
version 1.9 and Java 8. You can find the test document (testlargedoc.tex
, testlargedoc.tex
and all the files testlargedoc-ch
n.tex
) in the performance
directory. Does this test document cause the issue for you?
Thank you. Yes, this test document fails as well if I run pdflatex and bib2gls on windows:
bib2gls version 1.8 (2018-11-30)
Reading testlargedoc.aux
Reading testlargedoc-ch1.aux
Reading testlargedoc-ch2.aux
TeX character encoding: UTF-8
Initialising resource testlargedoc.glstex.
Parsing bib files for resource testlargedoc.glstex.
Default encoding: not set
Reading testlargedoc.bib
Cross-resource references allowed.
Processing resource testlargedoc.glstex.
Selecting entries for resource testlargedoc.glstex.
...
I found out that running pdflatex on linux and bib2gls on windows works as expected. So I guess the difference is in the aux files created. The main difference is probably that windows uses LF CR line endings and linux LF only. Another difference is this:
< \@writefile{toc}{\contentsline {chapter}{Glossary}{410}{section*.2}}
---
> \@writefile{toc}{\contentsline {chapter}{Glossary}{410}{section*.2}\protected@file@percent }
Not sure if this has any effect on bib2gls. I have attached two aux files for you to compare. testlargedoc-ch2_linux.aux.txt testlargedoc-ch2_windows.aux.txt