1

I'm trying to put simple figures made with Tikz into a blogger blog, which seems to require images to be in png or jpg, not pdf. I've tried using Snip and TikzEdt, but my final images are blurry.

Is there a simple way to copy paste the figures, or even compile the tex tikz code right on the blog? How do LaTeX bloggers usually handle this? Do I need to learn HTML to do this?

  • 1
    Welcome! Use the standalone class. See e.g. https://tex.stackexchange.com/a/13361 and https://tex.stackexchange.com/a/11880. –  Jan 26 '20 at 19:35
  • There are scripts which can convert your PDF output to other formats, e.g., pdftocairo, convert (from ImageMagick), sam2p, etc. Also Inkscape and Gimp have converters built in. – Skillmon Jan 26 '20 at 19:41
  • Okay, I made it this far, I can see where I can increase the image file size for better quality. But what is pdflatex -shell-escape file? \documentclass[convert={density=300,size=1080x800,outext=.png}]{standalone} \usepackage{tikz}

    \begin{document} \begin{tikzpicture} \draw [step=0.5] (-1.4,-1.4) grid (1.4,1.4); \end{tikzpicture} \end{document}

    – AnonBlogger Jan 26 '20 at 20:01
  • Just increase the density (I am not sure you need the size). –  Jan 26 '20 at 20:27

0 Answers0