iwase/koujo の履歴(No.1) - PukiWiki

扶養控除申告書を作るマクロをマイナンバーに対応する書式に合わせて更新した。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%				%
%  扶養控除申告書		%
%				%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%!TEX TS-program = XeLaTeX
%!TEX encoding = UTF-8 Unicode
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\undefined\XeTeXversion
\documentclass[12pt]{jarticle}
\usepackage[dvipdfmx]{graphicx}
\usepackage[deluxe]{otf}
\input fuyou-13-p.inc
\else
\documentclass[12pt,a4paper]{article}
\usepackage[xetex]{graphicx}
\usepackage[no-math]{fontspec}
\input fuyou-13-x.inc
\fi
%
\setlength{\voffset}		{  39.0mm}
\setlength{\hoffset}		{ -13.0mm}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ここから文書開始		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  研究機関のID		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\税務所轄:{博多}税務署長{福岡市西区}市区町村長
\所属機関:{国立大学法人 九州大学}番号{12345}
\所在地〒{812-8581}{福岡県福岡市東区箱崎6丁目10番1号}
%\所在地〒{819-0395}{福岡県福岡市西区元岡744番地}
\部局{研究院}({1234567890}):{部門}
\事務局{学部等}({0 1 2 3 4})
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  研究代表者のID		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\本人姓{九}{キュウ}
\本人姓{大}{ダイ}
\本人名{某}{ナニ}
\本人名{某}{ガシ}
\本人番号{12345678}
\昭和{1}年{2}月{3}日生
\世帯主{九大 何某}({本人})
\住所〒{123}ー{0123}:{福岡市西区元岡 1 丁目 2 番 3 号}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  配偶者データ		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\配偶者{九大 何何}昭和{1}年{2}月{3}日住所{福岡市西区元岡 1-2-3}所得{0}円
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  扶養親族データ		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\扶養親族{九大 何某}続柄{子}平成{4}年{5}月{6}日住所{}所得{0}円
\特定扶養{九大 某何}続柄{子}平成{7}年{8}月{9}日住所{}所得{0}円
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\これで終り書き出し		%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

インクルードファイルは xelatex 版はテストしたが、latex 版はテストしてないのだが

\usepackage[dvipdfm]{graphicx}
\usepackage{numbersty}
\usepackage{lscape}
%
\def\税務所轄:#1税務署長#2市区町村長{%
\put(6.0,359.5){\makebox(35,0)[bc]{#1}}%
\put(6.0,336.5){\makebox(35,0)[bc]{\small#2}}}
\def\所属機関:#1番号#2{%
\put(96.0,368.5){\makebox(115,0)[bc]{ #1}}%
\gdef\kikanbangou{#2}}
\def\機関代表:#1氏名#2{\gdef\kikanchou{#1}\gdef\souchou{#2}}
\def\所在地〒#1#2{\gdef\kikanzip{#1}%
\put(96.0,332.5){\makebox(115,0)[bc]{\scriptsize #2}}}
\def\出納員#1個人番号#2{%
\put(96.0,348.0){\makebox(30,8)[cl]{#1}}%
\put(260.0,348.0){\makebox(30,8)[cl]{#2}}}
\def\部局#1(#2):#3{\gdef\bukyoku{#1}\gdef\bukyokucode{#2}\gdef\bumon{#3}}
\def\事務局#1(#2){\gdef\jimu{#1}\gdef\bumoncode{#2}}
%
\def\本人所属:#1職#2{\gdef\shozoku{#1}\gdef\shoku{#2}}
\def\住所〒#1ー#2:#3{
\put(273.0,340.0)	{\makebox(15,0)[br]{\scriptsize #1}}
\put(296.5,340.0)	{\makebox(15,0)[bl]{\scriptsize #2}}
\put(255.0,329.5)	{\makebox(140,0)[bl]{\small #3}}
}
\def\昭和#1年#2月#3日生{%
\put(387.5,374.5){\makebox(5,0)[br]{\small 〇}}%
\put(405,377.0){\makebox(5,0)[br]{\footnotesize #1}}%
\put(422,377.0){\makebox(5,0)[br]{\footnotesize #2}}%
\put(439,377.0){\makebox(5,0)[br]{\footnotesize #3}}}
\def\平成#1年#2月#3日{}
\def\世帯主#1(#2){%
\put(396,363.3){\makebox(45,0)[bc]{#1}}%
\put(396,349.3){\makebox(45,0)[bc]{#2}}}
\newcount{\cntLINE} \cntLINE=2840
\newcount{\cntline} \cntline=0
\newcount{\cntkingaku} \cntkingaku=0
\def\配偶者なし{
\put(460.1,330.5){\makebox(5,6)[bc]{\Large 〇}}%
}
\def\配偶者#1昭和#2年#3月#4日住所#5所得#6円{
\put(460.1,343.5){\makebox(5,6)[bc]{\Large 〇}}%
\cntline=\cntLINE \divide\cntline by 10
\put(80.0,\number\cntline){\makebox(50,6)[lc]{#1}}
\advance\cntline by -8
\put(176.5,\number\cntline){\makebox(4,6)[bc]{\small 〇}}
\advance\cntline by 2
\put(191.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #2}}
\put(202.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #3}}
\put(213.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #4}}
\put(285,\number\cntline){\makebox(90,7)[cl]{\small #5}}
\advance\cntline by 5
\cntkingaku=#6
\put(405.0,\number\cntline){\makebox(32,7)[cr]{\sf\small\milnumber\cntkingaku}}
}
\def\扶養親族#1続柄#2平成#3年#4月#5日住所#6所得#7円{
\advance\cntLINE by -225
\cntline=\cntLINE \divide\cntline by 10
\put(85.0,\number\cntline){\makebox(50,6)[lc]{#1}}
\advance\cntline by -6
\put(161.5,\number\cntline){\makebox(5,6)[cc]{#2}}
\advance\cntline by -2
\put(183.2,\number\cntline){\makebox(5,7)[cc]{\small 〇}}
\advance\cntline by 2
\put(191.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #3}}
\put(202.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #4}}
\put(213.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #5}}
\put(285,\number\cntline){\makebox(90,7)[cl]{#6}}
\advance\cntline by 6
\cntkingaku=#7
\put(405.0,\number\cntline){\makebox(32,7)[cr]{\sf\small\milnumber\cntkingaku}}
}
\def\特定扶養#1続柄#2平成#3年#4月#5日住所#6所得#7円{
\advance\cntLINE by -225
\cntline=\cntLINE \divide\cntline by 10
\put(85.0,\number\cntline){\makebox(50,6)[lc]{#1}}
\advance\cntline by -6
\put(161.5,\number\cntline){\makebox(5,6)[cc]{#2}}
\advance\cntline by -1
\put(183.2,\number\cntline){\makebox(5,6)[cc]{\small 〇}}
\advance\cntline by 1
\put(191.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #3}}
\put(202.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #4}}
\put(213.5,\number\cntline){\makebox(4.5,7)[cr]{\scriptsize #5}}
\put(265.0,\number\cntline){\makebox(5,7)[bc]{\large 〇}}
\put(285,\number\cntline){\makebox(90,7)[cl]{#6}}
\advance\cntline by 6
\cntkingaku=#7
\put(395.0,\number\cntline){\makebox(32,7)[cr]{\sf\small\milnumber\cntkingaku}}
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	特種設定					%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\makeatletter
\makeatother
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	\姓・\名 コマンド				%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\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}
\def\本人番号#1{\gdef\ID{#1}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\ここから文書開始			%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\ここから文書開始{
\pagestyle{empty}
%
\begin{document}
\begin{landscape}
\setlength{\textwidth}		{ 200.0mm}
\setlength{\textheight}		{ 280.0mm}
\setlength{\oddsidemargin}	{  -6.8mm}
\setlength{\unitlength}		{   0.5mm}
\begin{picture}(280,200)(0,200)
%
\put(0,0)	{\makebox(550,395){\includegraphics[page=1]{fuyou}}}
%
}
%
\def\これで終り書き出し{
\put(270,363)	{\makebox( 60,0)[bc]{\Sei { } \Mei}}
\put(260,377)		{\makebox(30,8)[lc]{\scriptsize \ID}}
\put(518,390)		{\makebox(30,8)[rc]{\scriptsize \bumoncode}}
\ifx\jimu\empty
\put(0,395){\makebox(30,8)[lc]{\tiny {\bukyokucode}・{\bukyoku}}}
\else
\put(0,395){\makebox(30,8)[lc]{\tiny {\bukyokucode}・{\bukyoku}({\jimu})}}
\fi
\put(0,390){\makebox(30,8)[lc]{\tiny {\bukyoku}\ifx\bumon\empty\else{・{\bumon}}\fi}}
%
\end{picture}
\clearpage
\addtolength{\hoffset}{-0.5mm}
\addtolength{\voffset}{ 0.3mm}
\begin{picture}(280,200)(0,200)
\put(0,0)	{\makebox(550,395){\includegraphics[page=2]{fuyou}}}
\end{picture}
\end{landscape}
\end{document}

}


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS