Created
January 1, 2021 02:02
-
-
Save zr-tex8r/f6cd53cd5fc093df31091678a1496766 to your computer and use it in GitHub Desktop.
LaTeX: New year post card of the year 2021
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
\documentclass{article} | |
\usepackage[papersize={100mm,148mm},margin=0cm, | |
noheadfoot]{geometry} | |
\usepackage{luatexja-fontspec} | |
\usepackage{amsmath,tikz,graphicx,xcolor,xparse} | |
\usetikzlibrary{calc,positioning} | |
\newfontface{\fRobo}{RobotoSlab-Bold.otf} | |
\newfontface{\fChicago}{QTChicagoland.otf} | |
\newfontface{\fNishiki}{Nishiki-teki.ttf} | |
\newjfontface{\jNishiki}{Nishiki-teki.ttf} | |
\newfontface{\fAoyagi}{AoyagiKouzanFontT.ttf} | |
\newjfontface{\jAoyagi}{AoyagiKouzanFontT.ttf} | |
\newfontface{\fVLG}{VL-Gothic-Regular.ttf} | |
\newfontface{\fSHSans}{HaranoAjiGothic-Medium.otf}[ | |
BoldFont=HaranoAjiGothic-Bold.otf] | |
\newjfontface{\jSHSans}{HaranoAjiGothic-Medium.otf}[ | |
BoldFont=HaranoAjiGothic-Bold.otf] | |
\definecolor{mygray}{rgb}{0.3,0.3,0.3} | |
\definecolor{myred}{rgb}{1,0,0} | |
\definecolor{myblue}{rgb}{0,0.2,1} | |
\definecolor{mygreen}{rgb}{0,0.6,0.1} | |
\definecolor{mycgreen}{rgb}{0,0.45,0.05} | |
\NewDocumentCommand{\xZ}{}{\hspace*{0pt}} | |
\newcommand*{\?}[1]{% | |
{\fSHSans\hspace{.04em}\raisebox{.08ex}{#1}\hspace{.04em}}} | |
\NewDocumentEnvironment{xPar}{}{% | |
\par}{\par} | |
\NewDocumentCommand\xSize{O{0}m}{% | |
\fontsize{#2}{#1}\selectfont} | |
\begin{document} | |
%================================================= | |
\begin{xPar}\centering | |
\fRobo\xSize{36}\color{myred} | |
\raisebox{0pt}[18mm][0mm]{% | |
Hapi Niu Yia} | |
\end{xPar} | |
%================================================= | |
\vspace{6mm} | |
%================================================= | |
\begin{xPar}\centering | |
% | |
\colorlet{mcgreen}{green!40!black} | |
\colorlet{mcbblue}{blue!25!cyan} | |
\colorlet{mcbgreen}{blue!25!green} | |
\colorlet{mcbyellow}{red!10!yellow} | |
\colorlet{mcbred}{red!60!yellow} | |
\colorlet{mcdblue}{blue!60!black} | |
\colorlet{mcdgreen}{mcgreen!60!black} | |
\colorlet{mcdred}{red!90!black} | |
\newcommand{\xOneBlock}[3]{% | |
\fill[#3,fill opacity=1.0] | |
(#1,#2+200)--+(200,0)--+(200,-200)--+(160,-200)-- | |
+(160,-40)--+(0,-40)--cycle; | |
\fill[#3,fill opacity=0.75] | |
(#1,#2+160)--+(160,0)--+(160,-160)--+(120,-160)-- | |
+(120,-40)--+(0,-40)--cycle; | |
\fill[#3,fill opacity=0.5] | |
(#1,#2+120)--+(120,0)--+(120,-120)--+(80,-120)-- | |
+(80,-40)--+(0,-40)--cycle; | |
\fill[#3,fill opacity=0.25] | |
(#1,#2+80)--+(80,0)--+(80,-80)--+(40,-80)-- | |
+(40,-40)--+(0,-40)--cycle; | |
} | |
% | |
\begin{tikzpicture}[x=0.01cm,y=0.01cm, | |
scale=1.2963] | |
\fill[black, use as bounding box] (-20,-20) rectangle (520,520); | |
%\node[transform shape] at (460,-10) | |
% {\includegraphics[width=8.8mm]{yato.png}}; | |
% | |
\shade[left color=mcbblue, right color=mcbgreen, clip] | |
(0,0) rectangle (500,500); | |
\node[above right=0pt, inner sep=2pt, | |
text=black, font={\fChicago\xSize{22}}] at (0,400) | |
{2021}; | |
% | |
\xOneBlock {0}{200}{mcdblue} | |
\xOneBlock{200}{200}{mcdgreen} | |
\xOneBlock {0} {0}{mcdgreen} | |
\xOneBlock{400} {0}{mcdgreen} | |
% | |
\clip (200,0) rectangle (400,200); | |
% | |
\shade[left color=mcbyellow, right color=mcbred] | |
(0,0) rectangle (500,500); | |
\xOneBlock{200} {0}{mcdred} | |
% | |
\end{tikzpicture} | |
\end{xPar} | |
%================================================= | |
\vspace{1mm} | |
\begin{xPar}\centering | |
\fAoyagi\jAoyagi\xSize[13]{12}% | |
\ltjsetparameter{kanjiskip=-.14\zw,xkanjiskip=-.08\zw} | |
皆様のご健康とご多幸を\\ | |
お祈り申し上げます | |
\end{xPar} | |
\vspace{2mm} | |
\begin{xPar}\centering\begin{minipage}{90mm} | |
\begin{xPar} | |
\fNishiki\jNishiki\xSize{16}\color{myred} | |
New Year Puzzle% | |
\hfill | |
{\xSize{14}\color{myred}% | |
2021}% | |
{\xSize{9}\color{mygreen!75!black}% | |
\,年(令和\,}% | |
{\xSize{14}\color{myred}% | |
3}% | |
{\xSize{9}\color{mygreen!75!black}% | |
\,年)}% | |
\end{xPar} | |
\begin{xPar} | |
\fNishiki\jNishiki\xSize{9}\color{myblue!75!black}% | |
~年賀パズル~ | |
\end{xPar} | |
\par\vspace{-2.5mm} | |
\begin{minipage}[b]{50mm} | |
\fSHSans\jSHSans\xSize[9.0]{7.4} | |
\setlength\leftmargini{2\zw} | |
\setlength\leftmargin{2\zw} | |
\setlength\parskip{-\baselineskip} | |
以下の条件に従って割り算の虫食い算を解きなさい。 | |
\par\vspace{0.2\baselineskip} | |
\begin{itemize} | |
\setlength{\itemsep}{0pt} | |
\item 横に並ぶ一連の数字を全体で一つの整数と考えたとき、 | |
それが\textcolor{myred}{\bfseries 3}の倍数または | |
\textcolor{myred}{\bfseries 3}のつく数である場合は | |
\textcolor{myred}{赤色}のマス、そうでない場合は | |
\textcolor{mygreen}{緑色}のマスに入れなければならない。 | |
\end{itemize} | |
\par\vspace{0.2\baselineskip} | |
※例えば、\textcolor{myred}{\fVLG □□}には | |
\textcolor{myred}{35}や | |
\textcolor{myred}{24}は入るが、 | |
\textcolor{mygreen}{25}は入らない。 | |
\par | |
\end{minipage}% | |
\begin{minipage}[b]{40mm}\raggedleft | |
\DeclareDocumentCommand{\crB}{r()}{% | |
\node at (#1) {}; | |
} | |
\DeclareDocumentCommand{\crA}{r()}{% | |
\node[craho] at (#1) {}; | |
} | |
% | |
\vspace{-1mm} | |
\scalebox{0.40}{\begin{tikzpicture}[x=1mm,y=1mm, | |
crline/.style={draw=myblue, line width=1.8pt}, | |
craho/.style={draw=myred}, | |
every node/.style={draw=mygreen, rectangle, line width=1.8pt, | |
minimum width=7.5mm, minimum height=7.5mm}] | |
%\fill[myred!30] (55,61) rectangle (95,71); | |
\crA(90, 0)\crB(80,12)\crB(90,12)\crB(70,22)\crB(80,22)\crB(90,22) | |
\crB(70,34)\crB(80,34)\crA(60,44)\crA(70,44)\crA(80,44) | |
\crB(40,56)\crB(50,56)\crB(60,56)\crA(12,66)\crA(22,66) | |
\crA(40,66)\crA(50,66)\crA(60,66)\crA(70,66)\crA(80,66)\crA(90,66) | |
\crA(60,78)\crA(70,78)\crA(80,78)\crA(90,78) | |
\draw[crline] (73,6)--(97,6); | |
\draw[crline] (63,28)--(97,28); | |
\draw[crline] (33,50)--(87,50); | |
\draw[crline] (97,72)--(30,72) to[out=-45,in=45] (30,60); | |
%\draw[crline] (-7,48)--(97,48); | |
%\draw[crline] (-2,56)--(2,52) (-2,52)--(2,56); | |
\end{tikzpicture}}% | |
\end{minipage}% | |
\par\vspace{-1mm} | |
\end{minipage}\end{xPar} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment