Skip to content

Instantly share code, notes, and snippets.

@iliyang
iliyang / latexmkrc
Created June 23, 2024 21:43
A latexmkrc file to compress PDFs with non-JPEG images on Overleaf after compilation
#!/usr/bin/perl
## Put this (Perl) file in the root of your Overleaf project. It overrides the
## `pdflatex` compilation command to run GhostScript as a post-process which will
## compress non-JPEG images to JPEG in the output PDF file. The JPEG quality
## settings are set to high to minimize the loss of image quality. This should
## work well even for images that contain a lot of high-frequency noise.
## To disable, simply rename the file to something other than latexmkrc.
##
## Created by Iliyan Georgiev.