TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why does latex gzip the synctex file, and no other aux files? Ungzipping the file reveals it is around 40kb, which isn't much. Is this "legacy" behaviour (when computers did not have much storage) or is there a benefit to gzipping that file?

share|improve this question
You can stop it from gzipping though with the synctex=-1 option if I'm not mistaken. – marczellm May 28 '13 at 19:11
@marczellm right synctex=positive number--> file.synctex.gz, synctex=negative number--> file.synctex and synctex=0 no synctex – texenthusiast May 28 '13 at 19:14
For a 64 page 262 KiB PDF file obtained from a 248 KiB LaTeX file I'm working on, the .synctex.gz file weighs 336 KiB, while the uncompressed file is 1.5 MiB. A 5:1 ratio. – egreg May 28 '13 at 19:38
up vote 20 down vote accepted

It's true that gzipping the .synctex file saves space on disk. For a 500 page book, the size is

-rw-r--r-- user group   3.9M May 29 01:16 foo.synctex.gz

while the unzipped file is

-rw-r--r-- user group    18M May 29 01:16 foo.synctex

The PDF file turns out to be only 2.2 MiB; the figures speak by themselves: the size grows very fast. Unzipping the file on the fly when requested by the software that does the synchronization between editor and PDF viewer is fast and doesn't create a noticeable overhead.

Modern computers don't have big space constraints on disk, but a 4.5 to 1 ratio should not be neglected, if it's reasonable to compress the file.

A similar thing happens with the .odt format used by word processors: it's just a ZIP compressed file under cover. The Unix program gzip may have less good performances on certain files, but has the advantage that decompression is fast.

share|improve this answer

Most probably the .synctex file is gzipped by default simply to save disk space.

Other auxiliary files are not gzipped as they are smaller in size and need to be read quickly during compilation (the .synctex file doesn't play a role during compilation, but is used by PDF readers to link back to your TeX code).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.