Last active
August 9, 2020 10:03
-
-
Save zr-tex8r/cde380d9cde6ee6b6962af8623851739 to your computer and use it in GitHub Desktop.
LaTeX: Happy Snowman’s Day 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%#!pdflatex | |
\documentclass[margin=0pt]{standalone} | |
\usepackage[T1]{fontenc} | |
\usepackage{lmodern,pifont} | |
\usepackage{xcolor,scsnowman,tikzducks,pgfmath} | |
\newcommand*{\cLet}{\pgfmathsetmacro} | |
\setlength{\unitlength}{1bp} | |
\colorlet{bgcolor}{blue!30!green!10} | |
\pagecolor{bgcolor} | |
% | |
\cLet{\xCS}{80}\cLet{\yCS}{320} | |
\cLet{\vT}{\number\faStopTicks/\number\faAllTicks} | |
\cLet{\vST}{(\vT-0.5)*2} | |
\cLet{\yH}{\yCS-\xCS} | |
\cLet{\xT}{\xCS/2} | |
\cLet{\yT}{\yH+\xCS/2-\yH*\vST*\vST} | |
\cLet{\vEA}{exp(\vST*5)}\cLet{\vEB}{exp(\vST*(-5))} | |
\cLet{\vRA}{((\vEA-\vEB)/(\vEA+\vEB)*0.5+0.5)*4} | |
\cLet{\vRB}{mod(round(\vRA*1800)/5,360)} | |
% | |
\newcommand{\cTwo}{% | |
\makebox(0,0){\tikz[scale=0.24]{\duck[% | |
body=blue!50!green,bill=blue!50!green]}}} | |
\newcommand{\cZero}{% | |
\fontsize{16}{0}\selectfont | |
\makebox(0,1){\color{blue!50!green}\ding{108}}% | |
\makebox(1,0){\color{bgcolor}\scalebox{0.8}{\ding{93}}}} | |
% | |
\begin{document}% | |
\begin{picture}(400,360)(0,-20) | |
\put(120,\yT){\makebox(0,0){\rotatebox[origin=c]{-\vRB}{% | |
\scsnowman[hat=blue!80!green!75!black, | |
muffler=blue!50!green, | |
arms=green!30!black!50, | |
snow=blue!80!green!40, | |
scale=12]}}} | |
\put(280,\yT){\makebox(0,0){\rotatebox[origin=c]{\vRB}{% | |
\scsnowman[hat=blue!50!green, | |
muffler=blue!80!green!75!black, | |
arms=green!30!black!50, | |
snow=blue!80!green!40, | |
scale=12]}}} | |
\put(200,260){\makebox(0,0){\textcolor{blue!50!green!60}{% | |
\fontsize{48}{0}\sffamily\bfseries\ding{100}}}} | |
\put(200,200){\makebox(0,0){\textcolor{blue!85!black}{% | |
\fontsize{28}{40}\sffamily\bfseries\itshape | |
{Happy Snowman's Day}}}} | |
\put(200,144){\cTwo} | |
\put(200,112){\cZero} | |
\put(200,080){\cTwo} | |
\put(200,048){\cZero} | |
\end{picture} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get tcspingif.pl and run the following command.
(Requied: TeX Live, ImageMagick, Ghostscript, Perl)