そう言えば、今年は被扶養者申告書のマクロも作った。これも、もしかしたら uplatex でも動くかもしれない。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % 被扶養者申告書・九大用 % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %!TEX TS-program = XeLaTeX %!TEX encoding = UTF-8 Unicode %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \input hifuyou-17.inc %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ここから文書開始 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %\共済組合:{文部科学省}支部{九州大学} % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 本人のID % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \所属部局:{数理学研究院}職{教授} \本人姓{九}{キュウ} \本人姓{大}{ダイ} \本人名{某}{ナニ} \本人名{某}{ガシ} \住所{福岡市西区元岡1丁目2番3号} \本人{昭和}{12}年{03}月{04}日生({X})個人番号{12345678} % Xは 男 または 女 のいずれか一方 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 申告内容 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \申告:平成{29}年{04}月{01}日 \親族{子}({男})姓名{九大 何某}読み{キュウダイ ナニガシ}(平成{12年3月4日}生)は{会社員}(年間所得{1234567}円、住所{\footnotesize 福岡市西区元岡4丁目5番6号})で{\footnotesize 平成29年4月1日\hfill 就職\,}の為 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \これで終り書き出し % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
以下が hifuyou-17.inc の中身である。均等割り付けのマクロ fitwidth.sty は http://www.math.nagoya-u.ac.jp/~kubo/ja/latex/tips-003.html から取って来た。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % 被扶養者申告書 Form by Norio Iwase % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ifx\undefined\XeTeXversion \documentclass[12pt,a4j]{jarticle} \usepackage[dvipdfmx]{graphicx} \usepackage[deluxe]{otf} \else \documentclass[12pt,a4paper]{article} \usepackage[xetex]{graphicx} \usepackage[no-math]{fontspec} \usepackage[boldfont,slantfont]{xeCJK} \usepackage{zxjatype} \usepackage{zxotf} \usepackage{xunicode}\usepackage{xltxtra} \CJKspace % \defaultfontfeatures{Mapping=tex-text} \setromanfont{Times}\setsansfont{Papyrus}\setmonofont{Arial} \setjamainfont[Scale=0.95]{HGSeikaishotaiPRO} \setjasansfont[Scale=0.9]{IPAexMincho} \setjamonofont[Scale=0.9]{Osaka-Mono} \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 共通設定 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setlength{\voffset} { 46.0mm} \setlength{\hoffset} { -11.5mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{amssymb} \usepackage{ifthen,numbersty} \usepackage{lscape} \usepackage{fitwidth} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \姓・\名 コマンド % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newcommand{\rubi}[2]{\hbox{\shortstack{{\tiny #2}\\[.0mm]{#1}}}} \newcommand{\Sei}{}\newcommand{\Mei}{} \newcommand{\sei}{}\newcommand{\mei}{} \def\本人姓#1#2{\begingroup\def\protect{\noexpand\protect\noexpand}% \ifthenelse{\equal{\Sei}{}}{}{\xdef\Sei{\Sei\protect{ }}}% \xdef\Sei{\Sei\protect\rubi{#1}{#2}}% \ifthenelse{\equal{\sei}{}}{}{\xdef\sei{\sei\protect{}}}% \xdef\sei{\sei{\protect\bgroup\protect #1\protect\egroup}}% \endgroup} \def\本人名#1#2{\begingroup\def\protect{\noexpand\protect\noexpand}% \ifthenelse{\equal{\Mei}{}}{}{\xdef\Mei{\Mei\protect{ }}}% \xdef\Mei{\Mei\protect\rubi{#1}{#2}}% \ifthenelse{\equal{\mei}{}}{}{\xdef\mei{\mei\protect{}}}% \xdef\mei{\mei{\protect\bgroup\protect #1\protect\egroup}}% \endgroup} \gdef\Showa{昭和}\gdef\Heisei{平成} \def\showa{}\def\heisei{} \gdef\menoko{}\gdef\onoko{} \def\本人#1#2年#3月#4日生(#5)個人番号#6{ \def\Hera{#1}\def\Hnen{#2}\def\Htsuki{#3}\def\Hhi{#4}\def\Hsex{#5}\def\Hbangou{#6}% \ifx\Showa\Hera\def\showa{\Large 〇}\fi% \ifx\Heisei\Hera\def\heisei{\Large 〇}\fi% \ifx\Onoko\Hsex\def\onoko{\Large 〇}\fi% \ifx\Menoko\Hsex\def\menoko{\Large 〇}\fi% \put( 9.4,311.4) {\makebox(140,8)[cc]{\fitwidth{10.2em}{#6}}} } % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % マクロ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \def\申告:平成#1年#2月#3日{ \put(259.2,116.3){\makebox(19,6)[cr]{\fitwidth{2.42em}{#1}}}% \put(306.5,116.3){\makebox(19,6)[cr]{\fitwidth{2.42em}{#2}}} \put(350.5,116.3){\makebox(19,6)[cr]{\fitwidth{2.42em}{#3}}}} % \def\所属部局:#1職#2{\gdef\shozoku{#1}\gdef\shoku{#2}} \def\電話#1{\gdef\denwa{#1}} \def\住所#1{\gdef\jusho{#1}} % \newcounter{FUYOSHA}\setcounter{FUYOSHA}{249} \gdef\Menoko{女}\gdef\Onoko{男} % \def\親族#1(#2)姓名#3読み#4(平成#5生)は#6(年間所得#7円、住所#8)で#9の為{{ \def\seibetu{#2}\ifx\Onoko\seibetu \addtocounter{FUYOSHA}{10} \put(122.0,\number\value{FUYOSHA}.9) {\makebox( 40,0)[cc]{\color{red} 〇}} \addtocounter{FUYOSHA}{-10} \fi\ifx\Menoko\seibetu \addtocounter{FUYOSHA}{-5} \put(122.0,\number\value{FUYOSHA}.2) {\makebox( 40,0)[cc]{\color{red} 〇}} \addtocounter{FUYOSHA}{5} \fi \addtocounter{FUYOSHA}{2} \put(138.0,\value{FUYOSHA}) {\makebox( 40,0)[cc]{\color{red}#1}} \addtocounter{FUYOSHA}{-10} \put(160.0,\value{FUYOSHA}) {\makebox( 40,0)[cc]{\color{red} 〇}} \addtocounter{FUYOSHA}{7} \put(76.5,\value{FUYOSHA}) {\makebox( 40,0)[cc]{\color{red}\small #3}} \addtocounter{FUYOSHA}{16} \put(76.5,\value{FUYOSHA}) {\makebox( 40,0)[cc]{\color{red}\footnotesize #4}} \addtocounter{FUYOSHA}{-15} \put(282.5,\value{FUYOSHA}) {\makebox( 20,0)[cr]{\color{red}\small 円}} \addtocounter{FUYOSHA}{3} \put(235.0,\value{FUYOSHA}) {\makebox( 20,0)[cr]{\color{red}\begin{minipage}[c]{15.0mm}\small\hfill#6\end{minipage}}} \addtocounter{FUYOSHA}{2} \put(181,\value{FUYOSHA}) {\makebox( 41,0)[cr]{\color{red}\footnotesize \fitwidth{5.2em}{#5}}} \put(280.0,\value{FUYOSHA}) {\makebox( 14,0)[cr]{\color{red}\small{\milnumber#7}}} \put(365.0,\value{FUYOSHA}) {\makebox( 20,0)[cr]{\color{red}\begin{minipage}[c]{39.0mm}\small#8\end{minipage}}} \put(426.0,\value{FUYOSHA}) {\makebox( 20,0)[cl]{\color{red}\begin{minipage}[c]{27.0mm}\baselineskip12pt\small#9\end{minipage}}} \addtocounter{FUYOSHA}{1} \addtocounter{FUYOSHA}{-40} }} % \def\ここから文書開始{% \pagestyle{empty} \begin{document} \begin{landscape} \setlength{\textwidth} { 200.0mm} \setlength{\textheight} { 280.0mm} \setlength{\oddsidemargin} { -6.8mm} \setlength{\unitlength} { 0.5mm} \setlength\unitlength{0.5mm} \begin{picture}(280,200)(0,200) \put(.5,7) {\makebox(565,402){\includegraphics{hifuyou10}}} } % \def\これで終り書き出し{% \put(543.9,376){\scriptsize$\frown$} \put(543.9,331.5){\scriptsize$\smile$} \put(230.0,336.0) {\makebox( 60,8)[cl]{\Sei { } \Mei}} \put(230.0,316.0) {\makebox( 60,8)[cl]{\shozoku}} \put(331.0,88.2) {\makebox(140,8)[cl]{\jusho}} \put(331.0,75.2) {\makebox(130,8)[cl]{\hfill\small (\sei \ \mei)}} \put(344.9,335.7) {\makebox( 40,0)[cc]{\onoko}} \put(360.9,335.7) {\makebox( 40,0)[cc]{\menoko}} \put(425.0,345.0) {\makebox( 40,0)[cc]{\showa}} \put(425.0,335.5) {\makebox( 40,0)[cc]{\heisei}} \put(476.5,340.2) {\makebox( 10,0)[cr]{\Hnen}} \put(501.5,340.2) {\makebox( 10,0)[cr]{\Htsuki}} \put(526.5,340.2) {\makebox( 10,0)[cr]{\Hhi}} % \end{picture} \end{landscape} % \end{document} } %