Today, Marco Daniel proudly showed his Tux cup in the TeX.SX chat, which is available at Lehmann’s bookshop:

I thought, how long would it take to draw the Tux image using TikZ? I browsed and took the Tux SVG image from Wikipedia, downloaded the SVG to TikZ converter which has been programmed by Kjell Magne Fauske, run it at the command prompt by

python tikz_export.py penguin.svg -o tux.tex

and voila, got the file tux.tex - just click this file name to download and compile.

Is this useful? Well, once you converted an SVG image to TikZ, you got the full power of TikZ for annotating, manipulating, and integrating with LaTeX. Next time, it might be a technical drawing which is converted and worked on with TikZ.

What TikZ can for you - see it in the TikZ example gallery.

Code preview:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\begin{document}
\definecolor{c666666}{RGB}{102,102,102}
\definecolor{c6d6d6d}{RGB}{109,109,109}
...
\begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\path[fill=black] (281.0820,246.6060) .. controls (276.3300,266.1900) and
(252.2100,307.0860) .. (239.3940,325.0860) .. controls (226.5780,343.1580) and
(228.1620,359.4300) .. (204.4740,353.0940) .. controls (180.8580,346.7580) and
(174.2340,347.9100) .. (149.8260,349.3500) .. controls (125.5620,350.7900) and
(130.8180,348.6300) .. (115.6260,355.4700) .. controls (100.5060,362.3100) and
(49.7461,272.5260) .. (45.6421,255.8220) .. controls (41.6101,239.1180) and
(39.6661,241.1340) .. (50.1781,223.0620) .. controls (60.6901,204.9900) and
(62.2021,187.1340) .. (76.0981,165.2460) .. controls (89.9941,143.2860) and
(106.0500,132.1260) .. (104.8980,115.3500) .. controls (100.3620,53.0705) and
(96.7621,21.9665) .. (124.4100,7.5665) .. controls (150.7620,-6.1136) and
(172.7940,2.0225) .. (181.5060,6.7024) .. controls (185.2500,8.7184) and
(192.8820,12.6064) .. (198.5700,19.4464) .. controls (204.2580,26.1425) and
(209.3700,36.2945) .. (212.2500,49.1104) .. controls (218.1540,74.8145) and
(209.8020,66.3185) .. (216.4980,95.7664) .. controls (223.1220,125.1420) and
(236.5860,139.5420) .. (253.0020,162.7980) .. controls (269.4180,186.0540) and
(286.5540,224.4300) .. (281.0820,246.6060) -- cycle;
\path[fill=c666666] (126.0660,95.0464) .. controls (130.3860,93.3185) and
(130.5300,93.4625) .. (133.4100,87.1985) .. controls (135.7140,82.3745) and
(136.8660,79.9265) .. (136.7940,72.5825) .. controls (136.7940,65.3824) and
(134.5620,62.9344) .. (131.1780,58.2545) .. controls (127.9380,53.7905) and
(122.7540,53.5745) .. (119.5140,54.1505) .. controls (117.6420,54.4384) and
(115.1940,56.8145) .. (113.5380,60.3424) .. controls (112.4580,62.7184) and
(111.5940,65.7425) .. (111.5220,68.9105) .. controls (111.3060,77.4065) and
(112.0260,80.6465) .. (113.9700,86.4065) .. controls (116.2740,93.1744) and
(121.8900,96.7025) .. (126.0660,95.0464) -- cycle;
\end{tikzpicture}

Download tux.tex to get the real Tux.
\end{document}


A lot of color definitions and a lot of paths. No additional libraries needed. Download complete code.

• #1 Moss the TeXie, May 8, 2012 at 12:31 a.m.

Hi, I’d like to put that TikZ-Tux ;-) along with at least a portion of it’s code on a poster for our TeX and DANTE booth at the LinuxTag Berlin, if I may. May I?

• #2 Massinissa TINOUCHE, May 11, 2012 at 6:14 p.m.

Thank you, It's a hard work!!!

• #3 Stefan Kottwitz, May 13, 2012 at 3:56 p.m.

Hi Moss! Of course you may use it, as I wrote in my message earlier. Have fun at the LinuxTag!

• #4 Mads, June 22, 2012 at 8:34 a.m.

That is officially awesome! :-)

• #5 John Stasko, June 23, 2012 at 12:18 a.m.

This is cool! Thanks!

• #6 Bob Ornida, November 9, 2012 at 6:53 p.m.

Can you draw Beastie too?

Tux is nice, but it would be nice to get the BSD mascot too!

• #7 Moss the TeXie, November 24, 2012 at 3:12 p.m.

@Bob: Should be no problem at all, if there is a SVG image of Beastie somewhere. If someone provides me with one, I could make another poster featuring Beastie as well …

@all: The poster I announced above was finally printed (a few months later ;-) and shown at FrOSCon 7 in Bonn/St. Augustin, earlier this year. The complete source code, being about 99.9% identical with Stefans tux.tex above, can be downloaded here, and there is the DIN-A0 PDF file.

• #8 esso, May 14, 2013 at 5:02 p.m.

This is cool! Thanks!