Menu

#434 cairolatex: add support for raster images

None
closed-accepted
nobody
cairolatex (2)
5
2019-01-12
2016-01-21
No

Please consider adding a raster image format (e.g. PNG) as an output option to cairolatex.

That would allow to have the text (axis labels etc) be typeset by latex, but the graphics to be rasterized. This is of special importance for e.g. surface plots employing pm3d. The current vector-only output leads to huge PDFs when compiled by pdflatex. These can often hardly be displayed.

Discussion

  • Lars O. Grobe

    Lars O. Grobe - 2016-01-22

    For those looking for a work-around. I included the package epstopdf for now, and added a rule to trigger automatic conversion of any pdf to png. As latex by defaults prefers png over pdf, this leads to a pdf containing rasterized images, much faster to display.

    % rasterize all pdf's to png, resoltion 300dpi, using Imagemagick
    \usepackage{epstopdf}
    \epstopdfDeclareGraphicsRule{.pdf}{png}{.png}{convert -density 300 #1 \OutputFile}
    

    Having this done by gnuplot would still be cleaner, as I could transparently choose the output for each graph then. Besides that, having less redundant files (now I have a tex, pdf and png for each plot) is always a plus...

    Cheers, Lars.

     

    Last edit: Lars O. Grobe 2016-01-22
  • Bastian Märkisch

    • labels: --> cairolatex
    • status: open --> closed-accepted
    • Group: -->
     
  • Bastian Märkisch

    Thanks to Henri Menke this is possible since last August using the 5.3 git version [ed9a1b] .

     

    Related

    Commit: [ed9a1b]


Log in to post a comment.