Code Monkey home page Code Monkey logo

graphicscache's Introduction

graphicscache

This LaTeX package provides caching of \includegraphics calls, with several useful effects:

  • Recompilations are much faster (10x speedup observed)
  • Images can be postprocessed with ghostscript before inclusion, thus:
    • Automatic downscaling to specified DPI
    • Automatic JPEG compression with configurable quality
    • Much smaller files (e.g. 10MB instead of 150MB)!

Note: Due to the one-by-one invocation of pdflatex and ghostscript for each graphics element, the first compilation is typically slower than usual.

Note: graphicscache needs the \write18 call (also called shell escape). This is a security risk if you have untrusted TeX sources.

Quickstart

Compile the package using

latex graphicscache.ins

to generate the file graphicscache.sty, which you should place in your TeX input path. On Unix systems, this can be done by:

mkdir -p ~/texmf/tex/latex/graphicscache
cp graphicscache.sty ~/texmf/tex/latex/graphicscache/
texhash

Or just drop the graphicscache.sty next to your TeX document.

Activate caching with

\usepackage{graphicscache}

and you are finished. Remember to compile your document with -shell-escape, like

pdflatex -shell-escape paper.tex

Most LaTeX editors allow you to enable shell escape in their settings.

Releasing

Another feature is creating a "release" tarball containing your TeX sources and the downscaled images. Just use the release.sh shell script in your source directory. In this case it is recommended to place the graphicscache.sty file in your source tree, since your release target will probably not have it.

Documentation

For more information, check the package documentation, which you can generate with:

pdflatex graphicscache.dtx

graphicscache's People

Contributors

xqms avatar

Watchers

James Cloos avatar Matthias Nieuwenhuisen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.