iwase/kojo1 の変更点 - PukiWiki

令和になってから国税庁の仕様が大幅に変更になったので、扶養控除(異同)申告書を作るマクロに変更が必要であった。

どうやら xelatex または uplatex で動くようである。

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %													%
 %  扶養控除(異同)申告書・九大用 by Norio Iwase	%
 %													%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %!TEX TS-program = XeLaTeX
 %!TEX encoding = UTF-8 Unicode
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \input fuyou-22.inc
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \令和{5}年分扶養控除申告書			%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 %%%%%%%%%%%%%%%%%%%%%%%%
 %  研究機関のID		% 数理にのみ対応
 %%%%%%%%%%%%%%%%%%%%%%%%
 %
 \税務所轄:{西福岡}税務署長{福岡市西区}市区町村長
 \所属機関:{国立大学法人 九州大学}番号{3290005003743}
 \所在地〒{819-0395}{福岡市西区元岡744番地}
 \部局{数理学研究院}({1200308000}):{某部門} % 数理?
 \事務局{理学部等}({0 0 2 0 9})% 理学事務?
 %
 %%%%%%%%%%%%%%%%%%%%%%%%
 %  本人のID			% 明治〜平成に対応
 %%%%%%%%%%%%%%%%%%%%%%%%
 %
 \本人姓{九}{キュウ}
 \本人姓{大}{ダイ}
 \本人名{某}{ボウ}
 \本人名{某}{ボウ}
 \本人番号{12345678}
 \本人昭和{1}年{1}月{1}日生
 \世帯主{九大 某某}({本人})
 \住所〒{819}ー{0395}:{福岡市西区元岡 1-2-3}
 \配偶者あり
 %
 %%%%%%%%%%%%%%%%%%%%%%%%
 %  配偶者データ		% 明治〜平成に対応
 %%%%%%%%%%%%%%%%%%%%%%%%
 %
 \配偶者は昭和{1}年{2}月{3}日生まれの{続柄}:{九大 何何}{キュウダイ ナニナニ}住所{福岡市西区元岡 1-2-3}所得{0}円
 %
 %%%%%%%%%%%%%%%%%%%%%%%%
 %  扶養親族データ		% 明治〜平成に対応
 %%%%%%%%%%%%%%%%%%%%%%%%
 %
 \扶養親族は平成{4}年{5}月{6}日生まれの{続柄}:{九大 某何}{キュウダイ ボウナニ}住所{福岡市西区元岡 1-2-3}所得{0}円
 \扶養親族は平成{7}年{8}月{9}日生まれの{続柄}:{九大 何某}{キュウダイ ナニボウ}住所{福岡市西区元岡 1-2-3}所得{0}円
 
 %%%%%%%%%%%%%%%%%%%%%%%%
 \これで終り書き出し	%
 %%%%%%%%%%%%%%%%%%%%%%%%

インクルードファイル fuyou-22.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}		{  32.0mm}
 \setlength{\hoffset}		{ -9.3mm}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \usepackage{amssymb}
 \usepackage{ifthen,numbersty}
 \usepackage{lscape}
 \usepackage{curves}
 \usepackage{fitwidth}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %  マクロ							%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
\def\kin{\hskip6.5pt}
 \def\kin{\hskip6.5pt}
 \def\税務所轄:#1税務署長#2市区町村長{%
 \put(3.0,364.5){\makebox(35,0)[br]{#1}}%
 \put(3.0,339.5){\makebox(35,0)[br]{\small#2}}}
 \def\所属機関:#1番号#2{%
 \put(96.0,372.5){\makebox(115,0)[bc]{#1}}%
 \put(96.3,352.0){\makebox(115,0)[bc]{\fitwidth{13.5em}{#2}}}}
 \def\機関代表:#1氏名#2{\gdef\kikanchou{#1}\gdef\souchou{#2}}
 \def\所在地〒#1#2{\gdef\kikanzip{#1}%
 \put(96.0,335.5){\makebox(115,0)[bc]{\footnotesize #2}}}
 \def\出納員#1個人番号#2{%
 \put(96.0,350.0){\makebox(30,8)[cl]{#1}}%
 \put(260.0,350.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\jimucode{#2}}
 %
 \def\本人所属:#1職#2{\gdef\shozoku{#1}\gdef\shoku{#2}}
 \def\電話#1{\gdef\denwa{#1}}
 \def\電子郵便#1{\gdef\denshimail{#1}}
 \def\ファックス#1{\gdef\fax{#1}}
 \def\住所〒#1ー#2:#3{
 \put(279.5,343.0)	{\makebox(15,0)[br]{\scriptsize #1}}
 \put(303.0,343.0)	{\makebox(15,0)[bl]{\scriptsize #2}}
 \put(257.0,332.0)	{\makebox(140,0)[bl]{\small #3}}
 }
 \def\本人年月日#1#2#3{%
 \put(424.6,381.5){\makebox(5,0)[br]{\footnotesize #1}}%
 \put(446.6,381.5){\makebox(5,0)[br]{\footnotesize #2}}%
 \put(468.6,381.5){\makebox(5,0)[br]{\footnotesize #3}}}
 \def\本人昭和#1年#2月#3日生{%
 \put(413.3,383.5){\makebox(5,0)[br]{\small 〇}}%
 \本人年月日{#1}{#2}{#3}}
 \def\本人平成#1年#2月#3日生{%
 \put(414.0,379.3){\makebox(5,0)[br]{\small 〇}}%
 \本人年月日{#1}{#2}{#3}}
 \def\世帯主#1(#2){%
 \put(415,366.3){\makebox(45,0)[bc]{#1}}%
 \put(415,352.3){\makebox(45,0)[bc]{#2}}}
 \newcount{\cntLINE} \cntLINE=2749
 \newcount{\cntline} \cntline=0
 \newcount{\cntkingaku} \cntkingaku=0
 \def\配偶者なし{
 \put(472.6,334.3){\makebox(5,6)[bc]{\Large 〇}}%
 }
 \def\配偶者あり{
 \put(461.5,334.3){\makebox(5,6)[bc]{\Large 〇}}%
 }
 \def\配偶者生まれ#1年#2月#3日生(#4)#5#6住所#7所得#8円{
 \advance\cntline by -2
 \put(56.0,\number\cntline.5){\makebox(50,6)[bc]{\rubi{#5}{#6}}}
 \advance\cntline by -3
 \put(178.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #1}}
 \put(197.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #2}}
 \put(216.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #3}}
 \advance\cntline by 7
 \put(397.6,\number\cntline.5){\makebox(90,7)[cl]{\begin{minipage}[cl]{34mm}#7\end{minipage}}}
 \advance\cntline by 0
 \cntkingaku=#8
 \put(278.6,\number\cntline.0){\makebox(32,7)[cr]{\tt\small\milnumber\cntkingaku}}
 \advance\cntline by 5
 }
 \def\配偶者は昭和#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -7
 \put(158.8,\number\cntline.5){\makebox(4,6)[bc]{\small 〇}}
 \advance\cntline by 7
 \配偶者生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 \advance\cntLINE by -8
 }
 \def\配偶者は平成#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \put(447.9,331.3){\makebox(5,6)[bc]{\Large 〇}}%
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -7
 \put(167.1,\number\cntline.5){\makebox(4,6)[bc]{\small 〇}}
 \advance\cntline by 7
 \配偶者生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 \advance\cntLINE by -8
 }
 \def\扶養親族生まれ#1年#2月#3日生(#4)#5#6住所#7所得#8円{
 \advance\cntline by -0
 \put(60.0,\number\cntline.5){\makebox(50,6)[bc]{\rubi{#5}{#6}}}
 \advance\cntline by -4
 \put(136.5,\number\cntline.0){\makebox(5,6)[cc]{#4}}
 \advance\cntline by -1
 \put(178.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #1}}
 \put(197.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #2}}
 \put(216.6,\number\cntline.5){\makebox(4.5,7)[cr]{\scriptsize #3}}
 \advance\cntline by 7
 \put(397.6,\number\cntline.5){\makebox(90,7)[cl]{\begin{minipage}[cl]{34mm}#7\end{minipage}}}
 \advance\cntline by 0
 \cntkingaku=#8
 \put(278.6,\number\cntline.5){\makebox(32,7)[cr]{\tt\small\milnumber\cntkingaku}}
 \advance\cntline by 8
 }
 \def\扶養親族は昭和#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -7
 \put(158.3,\number\cntline.7){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\扶養親族は平成#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -7
 \put(166.6,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\特定扶養は昭和#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -2
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by 3
 \advance\cntline by -7
 \put(158.3,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\特定扶養は平成#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by -2
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by 3
 \advance\cntline by -7
 \put(166.6,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\同居老親は明治#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 12
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -12
 \advance\cntline by -4
 \put(158.3,\number\cntline.9){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 4
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\同居老親は大正#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 12
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -12
 \advance\cntline by -4
 \put(166.6,\number\cntline.9){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 4
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\同居老親は昭和#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 12
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -12
 \advance\cntline by -7
 \put(158.3,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\同居老親は平成#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 12
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -12
 \advance\cntline by -7
 \put(166.6,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 7s
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\その他老親は明治#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 6
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -6
 \advance\cntline by -4
 \put(158.3,\number\cntline.9){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 4
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\その他老親は大正#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 6
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -6
 \advance\cntline by -4
 \put(166.6,\number\cntline.9){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 4
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\その他老親は昭和#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 6
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -6
 \advance\cntline by -8
 \put(158.3,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 8
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 \def\その他老親は平成#1年#2月#3日生まれの#4:#5#6住所#7所得#8円{
 \advance\cntLINE by -290
 \cntline=\cntLINE \divide\cntline by 10
 \advance\cntline by 6
 \put(232.0,\number\cntline.0){\makebox(5,7)[bc]{\small\checkmark}}
 \advance\cntline by -6
 \advance\cntline by -8
 \put(166.6,\number\cntline.5){\makebox(5,7)[cc]{\small 〇}}
 \advance\cntline by 8
 \扶養親族生まれ{#1}年{#2}月{#3}日生({#4}){#5}{#6}住所{#7}所得{#8}円
 }
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %	特種設定										%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 \makeatletter
 \makeatother
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %	\姓・\名 コマンド								%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
 \newcommand{\rubi}[2]{\hbox{\shortstack{{\scriptsize #2}\\[1.9mm]{#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\令和#1年分扶養控除申告書{
 \def\fuyou{r#1bun_01}
 \pagestyle{empty}
 %
 \begin{document}
 \begin{landscape}
 \setlength{\textwidth}		{ 200.0mm}
 \setlength{\textheight}		{ 280.0mm}
 \setlength{\oddsidemargin}	{  -6.8mm}
 \setlength{\unitlength}		{   0.478mm}
 %\setlength\unitlength{0.5mm}
 \begin{picture}(280,200)(5,194)
 %
 \put(5.2,-3.5)	{\makebox(550,395){\includegraphics[page=1]{\fuyou}}}
 %
 }
 %
 \def\これで終り書き出し{
 \put(280,370)	{\makebox( 60,0)[bc]{\Sei { } \Mei}}
 \put(255,381.6)		{\makebox(30,8)[lc]{\scriptsize \ID}}
 \put(541,398.8)		{\makebox(30,8)[rc]{\tiny \jimucode}}
 \ifx\jimu\empty
 \put(-9,398.5){\makebox(30,8)[lc]{\tiny {\bukyokucode}・{\bukyoku}}}
 \else
 \put(-9,398.5){\makebox(30,8)[lc]{\tiny {\bukyokucode}・{\bukyoku}({\jimu})}}
 \fi
 \put(-9,393){\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(-.3,-.5){\makebox(550,395){\includegraphics[page=2,origin=c]{\fuyou}}}
 \end{picture}
 \end{landscape}
 \end{document}
 }

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS