% +++
% latex="lualatex"
% +++
\documentclass[hanging_punctuation]{jlreq}

\usepackage{luatexja}
\ltjsetparameter{jacharrange={-2,-8,-10}}
\usepackage[no-math,match,deluxe,jfm_yoko=jlreq]{luatexja-preset}
\usepackage{luatexja-otf,luatexja-adjust}
\newopentypefeature{PKana}{On}{pkna}

%\usepackage{yhmath,amssymb,mathtools,mathabx,mathrsfs,mathbbol}

%\allowdisplaybreaks[4]
\ltjenableadjust[lineend=extended,priority=true,profile=true,linestep=true]

\usepackage{xcolor}
\usepackage{tikz}
\usepackage{musikui}

\usepackage[paperheight=148mm,paperwidth=100mm,margin=0mm]{geometry}
\pagestyle{empty}

\newcommand{\NEN}{\color{gray}{年}}
\newcommand{\GAN}{\color{gray}{元}}

\newcommand{\hmeaten}[1][　]{
	\tikz[baseline=(T.base)]
		\node[draw,outer sep=0pt,inner sep=0.1\zw]
		(T)at(0,0){\jfontspec[Ligatures=TeX]{FOT-RodinNTLGPro-DB}{#1}};
}

%%%%% FONT SAFE
\IfFontExistsTF{HOT-SamuraiStd-R}
	{\newjfontfamily\hmshukujifont{HOT-SamuraiStd-R}}
	{\newcommand\hmshukujifont{}}


\begin{document}

\vfill\phantom{*}

\begin{center}
\fontsize{2cm}{2cm}\selectfont\color{orange!80!black}
\hmshukujifont{謹賀新年}
\end{center}

\vfill\vfill

\IfFontExistsTF{FOT-RodinNTLGPro-DB}{
	\fontspec[Ligatures=TeX]{FOT-RodinNTLGPro-DB}
	\jfontspec[Ligatures=TeX]{FOT-RodinNTLGPro-DB}
}{}
\begin{center}
\scalebox{1.5}{
\begin{musikui}
\kake{\eaten&\eaten&\eaten{\NEN}}
{9&\eaten}
{2&\eaten&\eaten&\eaten{\GAN}&\eaten{\NEN}}
\musi{\eaten&1&\eaten&\eaten}{0}
\musi{\eaten&0&\eaten&\eaten}{1}
\sen
\end{musikui}
}
\end{center}

\vfill\vfill

{
\IfFontExistsTF{FOT-TsukuAntiqueLMinStd-L}{
	\fontspec[Ligatures=TeX]{FOT-TsukuAntiqueLMinStd-L}
	\jfontspec[Ligatures=TeX]{FOT-TsukuAntiqueLMinStd-L}
}{}
\begin{center}
\small
\begin{minipage}{26\zw}
\setlength{\parindent}{1\zw}
今年は西暦2019年です。また、和暦では新しい年号の元年になるはずです。

ということで「2019年」と「元年」にちなんだ虫食い算を作りました。
\hmeaten[\GAN]と\hmeaten[\NEN]にも数字が
入りますが、どちらもすでに出ている数字（2, 0, 1, 9）のいずれも入りません。
さらに、2つある\hmeaten[\NEN]には同じ数字が、\hmeaten[\GAN]には
\hmeaten[\NEN]に入った数字とは異なる数字が入ります。

上の条件に従って、筆算を完成させてください。

{\footnotesize\color{black!75}一般的な注意: \hmeaten には何の制限もなく
、0から9の数字のうちいずれかが入ります。2, 0, 1, 9や、\hmeaten[\GAN]、
\hmeaten[\NEN]に入った数字が入ることもありえます。
ただし、一番上の位には0は入りません。}
\end{minipage}
\end{center}

\begin{flushright}
\IfFontExistsTF{FOT-CometStd-B}{
	\fontspec[Ligatures=TeX]{FOT-CometStd-B}
	\jfontspec[Ligatures=TeX]{FOT-CometStd-B}
}{}
2019年 元旦\hspace*{3\zw}
\end{flushright}
}

\vfill\phantom{*}

\end{document}
