Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LaTeX:2019年の年賀状
\documentclass{article}
\usepackage[papersize={100mm,148mm},margin=0cm,
noheadfoot]{geometry}
\usepackage{luatexja-fontspec}
\usepackage{amsmath,tikz,graphicx,xcolor,xparse}
\usetikzlibrary{calc}
\newfontface{\fSegoe}{segoeuiz.ttf}
\newfontface{\fUniv}{UniversalisADFStd-BoldCond.otf}
\newfontface{\fNishiki}{Nishiki-teki.ttf}
\newjfontface{\jNishiki}{Nishiki-teki.ttf}
\newfontface{\fAoyagi}{AoyagiKouzanFontT.ttf}
\newjfontface{\jAoyagi}{AoyagiKouzanFontT.ttf}
\newfontface{\fSHSX}{SourceHanSans-Bold.ttc}
\newfontface{\fSHSans}[BoldFont=GenShinGothic-Bold.ttf]{GenShinGothic-Medium.ttf}
\newjfontface{\jSHSans}[BoldFont=GenShinGothic-Bold.ttf]{GenShinGothic-Medium.ttf}
\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}
\NewDocumentCommand{\xZ}{}{\hspace*{0pt}}
\NewDocumentEnvironment{xPar}{}{%
\par}{\par}
\NewDocumentCommand\xSize{O{0}m}{%
\fontsize{#2}{#1}\selectfont}
\begin{document}
%=================================================
\begin{xPar}\centering
\fSegoe\xSize{30}\color{myred}
\raisebox{4pt}[18mm][0mm]{%
\scalebox{0.75}[1]{გილოცავთ ახალ წელს}}
\end{xPar}
%=================================================
\vspace{6mm}
%=================================================
\begin{xPar}\centering
\definecolor{cA}{rgb}{0.85,0.00,0.00}
\definecolor{cB}{rgb}{1.00,0.15,0.15}
\definecolor{cC}{rgb}{0.00,0.60,0.10}
\definecolor{cD}{rgb}{0.45,0.60,0.10}
\definecolor{cE}{rgb}{0.00,0.45,0.05}
\definecolor{cF}{rgb}{0.50,0.80,0.55}
\definecolor{cG}{rgb}{0.00,0.60,0.10}
\definecolor{cH}{rgb}{0.15,0.15,1.00}
\definecolor{cK}{rgb}{0.15,0.00,0.75}
\definecolor{cL}{rgb}{0.15,1.00,1.00}
\definecolor{cM}{rgb}{0.20,0.20,0.20}
\definecolor{cN}{rgb}{0.30,0.30,0.30}
\definecolor{cP}{rgb}{0.80,0.80,0.00}
\definecolor{cQ}{rgb}{0.80,0.50,0.00}
%
\DeclareDocumentCommand\FULL{r()m}{%
\filldraw[#2](#1)--+(1,0)--+(1,1)--+(0,1)--cycle;
}
\DeclareDocumentCommand\ADIV{r()mm}{%
\filldraw[#2](#1)--+(1,1)--+(0,1)--cycle;
\filldraw[#3](#1)--+(1,0)--+(1,1)--cycle;
}
\DeclareDocumentCommand\DDIV{r()mm}{%
\filldraw[#2](#1)--+(1,0)--+(0,1)--cycle;
\filldraw[#3]($(#1)+(1,0)$)--+(0,1)--+(-1,1)--cycle;
}
%
\begin{tikzpicture}[x=1cm,y=1cm,
scale=1.2963,
every path/.style={thin,line cap=rect}]
\fill[black,use as bounding box]
(-.2,-.2) rectangle (5.2,5.2);
%
\DDIV(0,4){cA}{cA!70!cB}
\ADIV(1,4){cA!30!cB}{cB}
\DDIV(2,4){cF}{cF!80!cG}
\DDIV(3,4){cF!60!cG}{cF!40!cG}
\ADIV(4,4){cF!20!cG}{cG}
%
\DDIV(0,3){cC}{cC!75!cD}
\DDIV(1,3){cC!50!cD}{cC!25!cD}
\ADIV(2,3){cD}{cH!60!cK}
\ADIV(3,3){cH!45!cK}{cH!35!cK}
\DDIV(4,3){cH!20!cK}{cH!5!cK}
%
\ADIV(0,2){cC!70!cE}{cC!70!cE!75!cD!}
\ADIV(1,2){cC!70!cE!50!cD}{cH!90!cK}
\ADIV(2,2){cH!75!cK}{cH!65!cK}
\ADIV(3,2){cH!50!cK}{cH!20!cK!60!cL}
\ADIV(4,2){cH!20!cK!75!cL}{cP}
%
\DDIV(0,1){cC!30!cE}{cC!30!cE!75!cD}
\DDIV(1,1){cC!30!cE!50!cD}{cH}
\ADIV(2,1){cH!80!cK}{cH!20!cK!30!cL}
\ADIV(3,1){cH!20!cK!45!cL}{cP!40!cQ}
\DDIV(4,1){cP!55!cQ}{cP!70!cQ}
%
\DDIV(0,0){cE}{cE!75!cD}
\ADIV(1,0){cE!50!cD}{cL}
\ADIV(2,0){cH!20!cK!15!cL}{cM}
\DDIV(3,0){cN}{cQ}
\DDIV(4,0){cP!15!cQ}{cP!30!cQ}
%
\node[transform shape, text=white, font={\xSize{12}}] at (1.55,4.2)
{\fUniv 2019};
%\node[transform shape] at (4.6,-.1)
% {\includegraphics[width=8.8mm]{yato.png}};
\end{tikzpicture}
\end{xPar}
%=================================================
\vspace{1mm}
\begin{xPar}\centering
\fAoyagi\jAoyagi\xSize[13]{12}%
\ltjsetparameter{kanjiskip=-.14\zw,xkanjiskip=-.08\zw}
皆様のご健康とご多幸を\\
お祈り申し上げます
\end{xPar}
\vspace{3mm}
\begin{xPar}\centering\begin{minipage}{90mm}
\begin{xPar}
\fNishiki\jNishiki\xSize{16}\color{myred}
New Year Puzzle%
\hfill
{\xSize{12}\color{myred}%
2019}%
{\xSize{8}\color{mygreen!75!black}%
\,年}%
\end{xPar}
\begin{xPar}
\fNishiki\jNishiki\xSize{12}\color{myblue!75!black}%
~年賀パズル~
\end{xPar}
\par\vspace{-3.5mm}
\begin{minipage}[b]{50mm}
\fSHSans\jSHSans\xSize{9}
以下の条件に従って、乗算の虫食い算を解きなさい。
\par\smallskip\xSize{8}
「縦または横に隣り合う2つのマスの間の線は、その2つのマスに
入る数字どうしの関係を示す。
\textcolor{myred}{二重線}の場合は\textcolor{myred}{同じ}数字、
\textcolor{mygreen}{一重線}の場合は\textcolor{mygreen}{隣り合う}(差が1)数字、
\textcolor{myblue}{線なし}の場合は\textcolor{myblue}{離れた}(差が2以上)数字が入る。
\end{minipage}%
\begin{minipage}[b]{40mm}\raggedleft
\DeclareDocumentCommand{\crBB}{r()m}{%
\node[draw=myblue] at (#1) (#2) {};
}
\DeclareDocumentCommand{\crBG}{r()m}{%
\node[draw=mygreen] at (#1) (#2) {};
}
\DeclareDocumentCommand{\crD}{mm}{%
\draw[crdlink] (#1)--(#2);
}
\DeclareDocumentCommand{\crS}{mm}{%
\draw[crslink] (#1)--(#2);
}
\scalebox{0.42}{\begin{tikzpicture}[x=1mm,y=1mm,
crline/.style={draw=myblue, line width=1.5pt},
crdlink/.style={myred, line width=1.8pt, double distance=3pt},
crslink/.style={mygreen, line width=2.4pt},
every node/.style={crline, rectangle,
minimum width=7.5mm, minimum height=7.5mm}]
\crBB(40,64){A3}\crBB(50,64){A2}\crBB(60,64){A1}\crBB(70,64){A0}
\crBB(40,54){B3}\crBB(50,54){B2}\crBB(60,54){B1}\crBB(70,54){B0}
\crBB(30,42){C4}\crBB(40,42){C3}\crBB(50,42){C2}\crBB(60,42){C1}\crBB(70,42){C0}
\crBB(20,32){D5}\crBB(30,32){D4}\crBB(40,32){D3}\crBB(50,32){D2}\crBB(60,32){D1}
\crBB(10,22){E6}\crBB(20,22){E5}\crBB(30,22){E4}\crBB(40,22){E3}\crBB(50,22){E2}
\crBB(00,12){F7}\crBB(10,12){F6}\crBB(20,12){F5}\crBB(30,12){F4}\crBB(40,12){F3}
\crBG(00,00){G7}\crBG(10,00){G6}\crBG(20,00){G5}\crBG(30,00){G4}
\crBB(40,00){G3}\crBB(50,00){G2}\crBB(60,00){G1}\crBB(70,00){G0}
\crD{A1}{A2}\crD{A0}{B0}
\crS{B1}{B2}\crS{B2}{B3}\crD{B1}{C1}
\crS{C0}{C1}\crS{C3}{C4}\crD{C4}{D4}
\crD{D2}{D3}\crD{E3}{E4}
\crD{F4}{F5}\crS{F7}{G7}
\crS{G0}{G1}\crS{G1}{G2}\crS{G2}{G3}\crS{G5}{G6}
\draw[crline] (-7,48)--(77,48);
\draw[crline] (-7,6)--(77,6);
\draw[crline] (-2,56)--(2,52) (-2,52)--(2,56);
\end{tikzpicture}}%
\end{minipage}%
\par\vspace{-1mm}
\end{minipage}\end{xPar}
\end{document}
@zr-tex8r

This comment has been minimized.

Copy link
Owner Author

commented Jan 3, 2019

出力はこちらを参照。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.