iwase/kenko2
をテンプレートにして作成
開始行:
なんとか、健康調査のマクロを改定(最新は V2.06 版)して、...
1:すべてのイベントを日付順に並べる。提出は全てのイベン...
2:休暇を取った場合は、当月の内に適切な位置に書き入れる...
3:休日にサービス出勤した場合も、当月の内に適切な位置に...
4:出退勤の記録を正確に入れる場合も、当月の内に適切な位...
ただし、出勤が12時以前で退勤が13時以後の場合に休憩時...
や午後のみの場合には差し引かない(12時から13時を休憩...
TeX のソース file のコンパイル上の注意点は以下の通りであ...
(ただし ipa は無論エールのことなどでは断じてなく、[[情報...
1:TeXShop + xelatex 用ですが、uplatex でも動く。
2:(XeLaTeX の場合) kenko2.inc 中の \usepackage[ipa]{zx...
(UpLaTeX の場合) メインファイルの7行目 %!TEX TS-pro...
上記の注意事項を守って以下のファイルを作成して Mac のHD...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 健康調査報告書 Form by Norio iWASE V2.06 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%charset = UTF-8
%!TEX encoding = UTF-8 Unicode
%!TEX TS-program = XeLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input kenko2.inc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\調査{2019}年{4}月 %後から提出する場合に調査月を指定する
\ここから
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\所属{某所}職{教員}
\氏名{何 某}{某 某}
\出退勤{8}時{30}分〜{17}時{30}分 % default の出退勤時刻
\月曜出退勤{7}時{45}分〜{16}時{30}分 % default の月曜出...
\水曜出退勤{9}時{30}分〜{18}時{15}分 % default の火曜出...
\金曜出退勤{9}時{45}分〜{17}時{30}分 % default の水曜出...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 次の様なイベントを休日と共に日付の順に並べて書く
%
%\出退{}月{}日{}時{}分〜{}時{}分[{}]
%\出退{}月{}日{}時{}分〜{}時{}分
%\休暇{}月{}日[{}]
%\休暇{}月{}日
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4月
\出退勤{8}時{30}分〜{17}時{15}分[{4}月] % 4月の default
%
\休暇{4}月{19}日
\出退{4}月{20}日{10}時{00}分〜{20}時{00}分
\休日{4}月{29}日[昭和の日]
\休日{4}月{30}日[国民の休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 5月
\出退勤{8}時{30}分〜{17}時{15}分[{5}月] % 5月の default
\月曜出退勤{7}時{45}分〜{16}時{30}分[{5}月] % 5月の defa...
\火曜出退勤{9}時{30}分〜{18}時{15}分[{5}月] % 5月の defa...
\木曜出退勤{9}時{00}分〜{18}時{45}分[{5}月] % 5月の defa...
%
\休日{5}月{1}日[即位の日]
\休日{5}月{2}日[国民の休日]
\休日{5}月{3}日[憲法記念日]
\休日{5}月{4}日[みどりの日]
\休日{5}月{5}日[こどもの日]
\休日{5}月{6}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 6月
\出退勤{8}時{30}分〜{17}時{15}分[{6}月] % 6月の default
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 7月
\出退勤{8}時{30}分〜{17}時{15}分[{7}月] % 7月の default
\休日{7}月{15}日[海の日]
\休日{8}月{11}日[山の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 8月
\出退勤{8}時{30}分〜{17}時{15}分[{8}月] % 8月の default
%
\休日{8}月{12}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 9月
\出退勤{8}時{30}分〜{17}時{15}分[{9}月] % 9月の default
%
\休日{9}月{16}日[敬老の日]
\休日{9}月{23}日[秋分の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 10月
\出退勤{8}時{30}分〜{17}時{15}分[{10}月] % 10月の default
%
\休日{10}月{10}日[体育の日]
\休日{10}月{22}日[即位礼正殿の儀の行われる日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 11月
\出退勤{8}時{30}分〜{17}時{15}分[{11}月] % 11月の default
%
\休日{11}月{3}日[文化の日]
\休日{11}月{4}日[振り替え休日]
\休日{11}月{23}日[勤労感謝の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 12月
\出退勤{8}時{30}分〜{17}時{15}分[{12}月] % 12月の default
%
\休暇{12}月{19}日
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1月
\出退勤{8}時{30}分〜{17}時{15}分[{1}月] % 1月の default
%
\休日{1}月{1}日[元日]
\休日{1}月{13}日[成人の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2月
\出退勤{8}時{30}分〜{17}時{15}分[{2}月] % 2月の default
%
\休日{2}月{11}日[建国記念の日]
\休日{2}月{23}日[天皇誕生日]
\休日{2}月{24}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 3月
\出退勤{8}時{30}分〜{17}時{15}分[{3}月] % 3月の default
%
\休日{3}月{20}日[春分の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\疲労の蓄積({})% {<主な自覚症状>}
\面談の希望({})% {有}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\以上 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
以下が kenko2.inc の中身である。この中でネット上にあった...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 健康調査報告書 Macro by Norio iWASE V2.06 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\undefined\XeTeXversion
\documentclass[12pt,a4j]{jarticle}
\usepackage[dvipdfmx]{graphicx}
\ifdefined\mac\usepackage[deluxe]{otf}\fi
\else
\documentclass[12pt,a4paper]{article}
\usepackage[xetex]{graphicx}
\usepackage[no-math]{fontspec}
\usepackage[boldfont,slantfont]{xeCJK}
\usepackage{zxjatype}
\usepackage[ipa]{zxjafont}
\CJKspace
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{Times}\setsansfont{Papyrus}\setmonofont{A...
\ifdefined\mac
\setjamainfont[Scale=0.95]{HGSeikaishotaiPRO}
\setjasansfont[Scale=0.962,BoldFont=Hiragino Mincho Pr...
\setjamonofont[Scale=0.9]{Osaka-Mono}
\usepackage{zxotf}
\fi
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 共通設定 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textheight=25.0truecm
\hoffset -12.0truemm
\voffset -20truemm
\ifx\undefined\XeTeXversion% pLaTeX
\addtolength{\hoffset}{-.2em}
\addtolength{\voffset}{-.7ex}
\else% XeLaTeX
\fi
\setlength\unitlength{1.03truept}
\setlength\fboxsep{0pt}
%
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% マクロ定義(借用) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\makeatletter
%
\def\weekdayno#1#2#3{\@tempcnta=#1 \@tempcntb=#2
\ifnum\@tempcntb<3
\advance\@tempcnta by -1\advance\@tempcntb by 12\fi
\multiply\@tempcntb by 13\advance\@tempcntb by 8
\divide\@tempcntb by 5\advance \@tempcntb by \@tempcnta
\divide \@tempcnta by 4\advance \@tempcntb by \@tempc...
\divide \@tempcnta by 25\advance \@tempcntb by -\@tem...
\divide \@tempcnta by 4\advance \@tempcntb by \@tempc...
\advance \@tempcntb by #3
\@tempcnta=\@tempcntb
\divide \@tempcntb by 7\multiply \@tempcntb by 7
\advance \@tempcnta by -\@tempcntb
\ifcase\@tempcnta\c@weekday=0\or\c@weekday=1\or\c@wee...
}
%
\def\Sunday{日} \def\Monday{月} \def\Tuesday{火} \def\We...
%
\def\weekday#1#2#3{\weekdayno{#1}{#2}{#3}
\ifcase\c@weekday\Sunday\or\Monday\or\Tuesday\or\Wedn...
}
%
\def\days#1in#2{\@tempcnta=#1 \@tempcntb=#1
\divide\@tempcnta by 25 \multiply\@tempcnta by 25
\divide\@tempcntb by 16 \multiply\@tempcntb by 16
\ifnum\@tempcnta<#1 \@tempcnta=0 %
\else \ifnum\@tempcntb=#1\@tempcnta=0 \else\@temp...
\@tempcntb=#1 \divide\@tempcntb by 4 \multiply\@tempc...
\ifnum\@tempcntb=#1 \@tempcntb=\@tempcnta\else \@temp...
\ifcase#2\or\c@days=31\or%
\ifnum\@tempcntb=0\c@days=29\else\c@days=28\fi%
\or\c@days=31\or\c@days=30\or\c@days=31\or\c@days=30\...
\else\c@days=0\fi%
}
%
\makeatother
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% マクロ定義本体 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcount\DXyear \DXyear=\number\year
\newcount\DXmonth \DXmonth=\number\month \advance\DXmont...
\ifnum\DXmonth=0 \DXmonth=12 \advance\DXyear -1 \fi
\newcount\DXdate \DXdate=0
%
\newcount\ExcessTime \ExcessTime=0
\newcount\Line
\newcount\STdate \newcount\STmonth
\newcount\STtemp \newcount\STtempa \newcount\STtempb
\newcount\Dcol \newcount\Wcol
\def\firstDcol{-30} \def\secondDcol{240}
\def\firstWcol{-2} \def\secondWcol{269}
\def\linegap{24} \def\Dcolbg{15} \def\Linebg{11}
\def\DTyear{\number\DXyear}\def\DTmonth{\number\DXmonth}
%
\makeatletter
\newcount\DXweek \newcount\c@weekday \newcount\c@days
\weekdayno{\DXyear}{\DXmonth}{1}
\DXweek=\number\c@weekday
\days{\number\DXyear}in{\number\DXmonth}
\def\DTlength{\number\c@days}
%
\def\調査#1年#2月{\def\DTyear{#1} \def\DTmonth{#2} \DXye...
%
\def\出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\timedata{#1}時{#2}分〜{#3}時{#4}分}{\t...
\def\月曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\montimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\火曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\tuetimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\水曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\wedtimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\木曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\thutimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\金曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\fritimedata{#1}時{#2}分〜{#3}時{#4}分}...
\makeatother
%
\def\出勤#1時#2分{
\def\DShourMon{#1}\def\DSminMon{#2}\def\DShourTue{#1}\de...
\def\退勤#1時#2分{
\def\DThourMon{#1}\def\DTminMon{#2}\def\DThourTue{#1}\de...
\def\timedata#1時#2分〜#3時#4分[#5月]{
\ifnum\DXmonth=#5
\def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon...
\def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue...
\def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed...
\def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu...
\def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri...
\fi
}
\def\montimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon{#3}...
\def\tuetimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue{#3}...
\def\wedtimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed{#3}...
\def\thutimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu{#3}...
\def\fritimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri{#3}...
%
\def\ここから{
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
\ifx\undefined\DTyear\def\DTyear{\number\DXyear}\fi
\ifx\undefined\DTmonth\def\DTmonth{\number\DXmonth}\fi
\ifx\undefined\XeTeXversion
\begin{picture}(430,680)(-20,45)
\else
\begin{picture}(430,680)(3,17)
\fi
\put(-31,528) {\makebox(0,1)[cl]{\texttt{\textbf{{\DT...
\Line=469 \Dcol=\firstDcol \Wcol=\firstWcol
}
\def\所属#1職#2{
\put(124,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#1...
\put(231,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#2...
}
\def\氏名#1#2{
\put(308,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#1...
}
\def\疲労の蓄積(#1){\def\temp{#1}%
\ifx\temp\empty \else%
\put( -3,60) {\makebox(0,0)[cc]{\Large 〇}}
\put( 65,60){\makebox(0,0)[tl]{\begin{minipage}{147mm}\b...
\fi%
}
\def\面談の希望(#1){
\def\Ari{有}\def\Kibou{#1}
\ifx\Kibou\Ari
\put( -3, 7) {\makebox(0,0)[cc]{\Large 〇}}
\else
\fi
}
\def\holidaycolorbox{
\advance\Dcol -\Dcolbg\advance\Line -\Linebg
\put(\number\Dcol.7,\number\Line.7){\colorbox{gray!60...
\advance\Line \Linebg\advance\Dcol \Dcolbg
}
\def\saturdaycolorbox{
\advance\Dcol -\Dcolbg\advance\Line -\Linebg
\put(\number\Dcol.7,\number\Line.7){\colorbox{gray!30...
\advance\Line \Linebg\advance\Dcol \Dcolbg
}
%
\def\holiday#1#2[#3]{
\ifnum\DXmonth=#1
\STdate=#2 \advance\STdate -1
\upto{\number\STdate}for{}if{0}
\advance \DXdate 1
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek=0\holidaycolorbox
\else\saturdaycolorbox\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{\beg...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
\fi
}
%
\def\working#1#2#3#4#5#6[#7]{
\ifnum\DXmonth=#1
\STdate=#2 \advance\STdate -1
\upto{\number\STdate}for{}if{0}
\STtemp=\number\Wcol
\UpTo{#2}at{#3}{#4}to{#5}{#6}for{#7}if{1}
\fi
}
%
\makeatletter
%
\def\休暇#1月#2日{\@ifnextchar[{\holiday{#1}{#2}}{\holid...
\def\休日#1月#2日{\@ifnextchar[{\holiday{#1}{#2}}{\holid...
\def\出退#1月#2日#3時#4分〜#5時#6分{\@ifnextchar[%
{\working{#1}{#2}{#3}{#4}{#5}{#6}}{\working{#1}{#2}{#...
%
\newcount\flag
\def\UpTo#1at#2#3to#4#5for#6if#7{
\STdate=#1
\@whilenum\DXdate<#1 \do{ \flag=0 \advance \DXdate 1
\STtempa=#2 \multiply\STtempa by 60 \advance\STte...
\STtempb=#4 \multiply\STtempb by 60 \advance\STte...
\ifx1#7 \flag=1\fi
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek>0
\ifnum\DXweek<6 \flag=1
\else \saturdaycolorbox\fi
\else \holidaycolorbox \fi
\STtemp=\number\Wcol
\advance\STtemp 82
\ifnum\flag=1
\put(\number\STtemp.5,\number\Line){\makebox(...
\ifnum\STtempa>720%12*60
\ifnum\STtempa>780%13*60
\else\STtempa=720%12*60
\advance\STtempb -60\fi
\else
\ifnum\STtempb<780%13*60
\ifnum\STtempb<720%12*60
\else\STtempb=780%13*60
\advance\STtempa 60\fi
\else
\advance\STtempa 60
\fi
\fi
\advance\STtempb -\number\STtempa
\STtempa=\number\STtempb
\ifnum\DXweek>0\ifnum\DXweek<6
\advance\STtempa -465
\fi\fi
\advance\ExcessTime \number\STtempa
\STtempa=0 \advance\STtemp 38
\@whilenum\STtempb>59 \do{\advance\STtempb -6...
\put(\number\STtemp,\number\Line){\makebox(0,...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{...
\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
}
}
\def\upto#1for#2if#3{
\STdate=#1
\@whilenum\DXdate<#1 \do{ \flag=0 \advance \DXdate 1
\ifx1#3 \flag=1\fi
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek>0
\ifnum\DXweek<6 \flag=1
\else \saturdaycolorbox\fi
\else \holidaycolorbox \fi
\STtemp=\number\Wcol
\advance\STtemp 82
\ifnum\flag=1
\ifnum\DXweek=1
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourMon \multiply\STtempa by ...
\STtempb=\DThourMon \multiply\STtempb by ...
\fi\ifnum\DXweek=2
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourTue \multiply\STtempa by ...
\STtempb=\DThourTue \multiply\STtempb by ...
\fi\ifnum\DXweek=3
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourWed \multiply\STtempa by ...
\STtempb=\DThourWed \multiply\STtempb by ...
\fi\ifnum\DXweek=4
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourThu \multiply\STtempa by ...
\STtempb=\DThourThu \multiply\STtempb by ...
\fi\ifnum\DXweek=5
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourFri \multiply\STtempa by ...
\STtempb=\DThourFri \multiply\STtempb by ...
\fi
\ifnum\STtempa>720%12*60
\ifnum\STtempa>780%13*60
\else\STtempa=720%12*60
\advance\STtempb -60\fi
\else
\ifnum\STtempb<780%13*60
\ifnum\STtempb<720%12*60
\else\STtempb=780%13*60
\advance\STtempa 60\fi
\else
\advance\STtempa 60
\fi
\fi
\advance\STtempb -\number\STtempa
\STtempa=\number\STtempb
\ifnum\DXweek>0\ifnum\DXweek<6
\advance\STtempa -465
\fi\fi
\advance\ExcessTime \number\STtempa
\STtempa=0 \advance\STtemp 38
\@whilenum\STtempb>59 \do{\advance\STtempb -6...
\put(\number\STtemp,\number\Line){\makebox(0,...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{...
\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
}
}
%
\def\以上{
\upto{\DTlength}for{}if{0}
\ifnum\ExcessTime>0 \STtempb=\number\ExcessTime \else...
\STtempa=0
\@whilenum\STtempb>59 \do{\advance\STtempb -60 \advan...
\put(472,61){\makebox(0,1)[cr]{\number\STtempa\hskip....
\ifx\undefined\XeTeXversion
\put(-76,-53){\includegraphics[width=205mm]{kenko-...
\else
\put(-76,-53){\includegraphics[width=205mm]{kenko-...
\fi
\end{picture}
\end{document}
\end
}
\makeatother
%
終了行:
なんとか、健康調査のマクロを改定(最新は V2.06 版)して、...
1:すべてのイベントを日付順に並べる。提出は全てのイベン...
2:休暇を取った場合は、当月の内に適切な位置に書き入れる...
3:休日にサービス出勤した場合も、当月の内に適切な位置に...
4:出退勤の記録を正確に入れる場合も、当月の内に適切な位...
ただし、出勤が12時以前で退勤が13時以後の場合に休憩時...
や午後のみの場合には差し引かない(12時から13時を休憩...
TeX のソース file のコンパイル上の注意点は以下の通りであ...
(ただし ipa は無論エールのことなどでは断じてなく、[[情報...
1:TeXShop + xelatex 用ですが、uplatex でも動く。
2:(XeLaTeX の場合) kenko2.inc 中の \usepackage[ipa]{zx...
(UpLaTeX の場合) メインファイルの7行目 %!TEX TS-pro...
上記の注意事項を守って以下のファイルを作成して Mac のHD...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 健康調査報告書 Form by Norio iWASE V2.06 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%charset = UTF-8
%!TEX encoding = UTF-8 Unicode
%!TEX TS-program = XeLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input kenko2.inc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\調査{2019}年{4}月 %後から提出する場合に調査月を指定する
\ここから
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\所属{某所}職{教員}
\氏名{何 某}{某 某}
\出退勤{8}時{30}分〜{17}時{30}分 % default の出退勤時刻
\月曜出退勤{7}時{45}分〜{16}時{30}分 % default の月曜出...
\水曜出退勤{9}時{30}分〜{18}時{15}分 % default の火曜出...
\金曜出退勤{9}時{45}分〜{17}時{30}分 % default の水曜出...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% 次の様なイベントを休日と共に日付の順に並べて書く
%
%\出退{}月{}日{}時{}分〜{}時{}分[{}]
%\出退{}月{}日{}時{}分〜{}時{}分
%\休暇{}月{}日[{}]
%\休暇{}月{}日
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 4月
\出退勤{8}時{30}分〜{17}時{15}分[{4}月] % 4月の default
%
\休暇{4}月{19}日
\出退{4}月{20}日{10}時{00}分〜{20}時{00}分
\休日{4}月{29}日[昭和の日]
\休日{4}月{30}日[国民の休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 5月
\出退勤{8}時{30}分〜{17}時{15}分[{5}月] % 5月の default
\月曜出退勤{7}時{45}分〜{16}時{30}分[{5}月] % 5月の defa...
\火曜出退勤{9}時{30}分〜{18}時{15}分[{5}月] % 5月の defa...
\木曜出退勤{9}時{00}分〜{18}時{45}分[{5}月] % 5月の defa...
%
\休日{5}月{1}日[即位の日]
\休日{5}月{2}日[国民の休日]
\休日{5}月{3}日[憲法記念日]
\休日{5}月{4}日[みどりの日]
\休日{5}月{5}日[こどもの日]
\休日{5}月{6}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 6月
\出退勤{8}時{30}分〜{17}時{15}分[{6}月] % 6月の default
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 7月
\出退勤{8}時{30}分〜{17}時{15}分[{7}月] % 7月の default
\休日{7}月{15}日[海の日]
\休日{8}月{11}日[山の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 8月
\出退勤{8}時{30}分〜{17}時{15}分[{8}月] % 8月の default
%
\休日{8}月{12}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 9月
\出退勤{8}時{30}分〜{17}時{15}分[{9}月] % 9月の default
%
\休日{9}月{16}日[敬老の日]
\休日{9}月{23}日[秋分の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 10月
\出退勤{8}時{30}分〜{17}時{15}分[{10}月] % 10月の default
%
\休日{10}月{10}日[体育の日]
\休日{10}月{22}日[即位礼正殿の儀の行われる日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 11月
\出退勤{8}時{30}分〜{17}時{15}分[{11}月] % 11月の default
%
\休日{11}月{3}日[文化の日]
\休日{11}月{4}日[振り替え休日]
\休日{11}月{23}日[勤労感謝の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 12月
\出退勤{8}時{30}分〜{17}時{15}分[{12}月] % 12月の default
%
\休暇{12}月{19}日
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1月
\出退勤{8}時{30}分〜{17}時{15}分[{1}月] % 1月の default
%
\休日{1}月{1}日[元日]
\休日{1}月{13}日[成人の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2月
\出退勤{8}時{30}分〜{17}時{15}分[{2}月] % 2月の default
%
\休日{2}月{11}日[建国記念の日]
\休日{2}月{23}日[天皇誕生日]
\休日{2}月{24}日[振り替え休日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 3月
\出退勤{8}時{30}分〜{17}時{15}分[{3}月] % 3月の default
%
\休日{3}月{20}日[春分の日]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\疲労の蓄積({})% {<主な自覚症状>}
\面談の希望({})% {有}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\以上 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
以下が kenko2.inc の中身である。この中でネット上にあった...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 健康調査報告書 Macro by Norio iWASE V2.06 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\undefined\XeTeXversion
\documentclass[12pt,a4j]{jarticle}
\usepackage[dvipdfmx]{graphicx}
\ifdefined\mac\usepackage[deluxe]{otf}\fi
\else
\documentclass[12pt,a4paper]{article}
\usepackage[xetex]{graphicx}
\usepackage[no-math]{fontspec}
\usepackage[boldfont,slantfont]{xeCJK}
\usepackage{zxjatype}
\usepackage[ipa]{zxjafont}
\CJKspace
\defaultfontfeatures{Mapping=tex-text}
\setromanfont{Times}\setsansfont{Papyrus}\setmonofont{A...
\ifdefined\mac
\setjamainfont[Scale=0.95]{HGSeikaishotaiPRO}
\setjasansfont[Scale=0.962,BoldFont=Hiragino Mincho Pr...
\setjamonofont[Scale=0.9]{Osaka-Mono}
\usepackage{zxotf}
\fi
\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 共通設定 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\textheight=25.0truecm
\hoffset -12.0truemm
\voffset -20truemm
\ifx\undefined\XeTeXversion% pLaTeX
\addtolength{\hoffset}{-.2em}
\addtolength{\voffset}{-.7ex}
\else% XeLaTeX
\fi
\setlength\unitlength{1.03truept}
\setlength\fboxsep{0pt}
%
\usepackage{amsmath,amssymb}
\usepackage{xcolor}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% マクロ定義(借用) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\makeatletter
%
\def\weekdayno#1#2#3{\@tempcnta=#1 \@tempcntb=#2
\ifnum\@tempcntb<3
\advance\@tempcnta by -1\advance\@tempcntb by 12\fi
\multiply\@tempcntb by 13\advance\@tempcntb by 8
\divide\@tempcntb by 5\advance \@tempcntb by \@tempcnta
\divide \@tempcnta by 4\advance \@tempcntb by \@tempc...
\divide \@tempcnta by 25\advance \@tempcntb by -\@tem...
\divide \@tempcnta by 4\advance \@tempcntb by \@tempc...
\advance \@tempcntb by #3
\@tempcnta=\@tempcntb
\divide \@tempcntb by 7\multiply \@tempcntb by 7
\advance \@tempcnta by -\@tempcntb
\ifcase\@tempcnta\c@weekday=0\or\c@weekday=1\or\c@wee...
}
%
\def\Sunday{日} \def\Monday{月} \def\Tuesday{火} \def\We...
%
\def\weekday#1#2#3{\weekdayno{#1}{#2}{#3}
\ifcase\c@weekday\Sunday\or\Monday\or\Tuesday\or\Wedn...
}
%
\def\days#1in#2{\@tempcnta=#1 \@tempcntb=#1
\divide\@tempcnta by 25 \multiply\@tempcnta by 25
\divide\@tempcntb by 16 \multiply\@tempcntb by 16
\ifnum\@tempcnta<#1 \@tempcnta=0 %
\else \ifnum\@tempcntb=#1\@tempcnta=0 \else\@temp...
\@tempcntb=#1 \divide\@tempcntb by 4 \multiply\@tempc...
\ifnum\@tempcntb=#1 \@tempcntb=\@tempcnta\else \@temp...
\ifcase#2\or\c@days=31\or%
\ifnum\@tempcntb=0\c@days=29\else\c@days=28\fi%
\or\c@days=31\or\c@days=30\or\c@days=31\or\c@days=30\...
\else\c@days=0\fi%
}
%
\makeatother
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% マクロ定義本体 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcount\DXyear \DXyear=\number\year
\newcount\DXmonth \DXmonth=\number\month \advance\DXmont...
\ifnum\DXmonth=0 \DXmonth=12 \advance\DXyear -1 \fi
\newcount\DXdate \DXdate=0
%
\newcount\ExcessTime \ExcessTime=0
\newcount\Line
\newcount\STdate \newcount\STmonth
\newcount\STtemp \newcount\STtempa \newcount\STtempb
\newcount\Dcol \newcount\Wcol
\def\firstDcol{-30} \def\secondDcol{240}
\def\firstWcol{-2} \def\secondWcol{269}
\def\linegap{24} \def\Dcolbg{15} \def\Linebg{11}
\def\DTyear{\number\DXyear}\def\DTmonth{\number\DXmonth}
%
\makeatletter
\newcount\DXweek \newcount\c@weekday \newcount\c@days
\weekdayno{\DXyear}{\DXmonth}{1}
\DXweek=\number\c@weekday
\days{\number\DXyear}in{\number\DXmonth}
\def\DTlength{\number\c@days}
%
\def\調査#1年#2月{\def\DTyear{#1} \def\DTmonth{#2} \DXye...
%
\def\出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\timedata{#1}時{#2}分〜{#3}時{#4}分}{\t...
\def\月曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\montimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\火曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\tuetimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\水曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\wedtimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\木曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\thutimedata{#1}時{#2}分〜{#3}時{#4}分}...
\def\金曜出退勤#1時#2分〜#3時#4分{
\@ifnextchar[{\fritimedata{#1}時{#2}分〜{#3}時{#4}分}...
\makeatother
%
\def\出勤#1時#2分{
\def\DShourMon{#1}\def\DSminMon{#2}\def\DShourTue{#1}\de...
\def\退勤#1時#2分{
\def\DThourMon{#1}\def\DTminMon{#2}\def\DThourTue{#1}\de...
\def\timedata#1時#2分〜#3時#4分[#5月]{
\ifnum\DXmonth=#5
\def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon...
\def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue...
\def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed...
\def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu...
\def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri...
\fi
}
\def\montimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon{#3}...
\def\tuetimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue{#3}...
\def\wedtimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed{#3}...
\def\thutimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu{#3}...
\def\fritimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5
\def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri{#3}...
%
\def\ここから{
\pagestyle{empty}
\begin{document}
\thispagestyle{empty}
\ifx\undefined\DTyear\def\DTyear{\number\DXyear}\fi
\ifx\undefined\DTmonth\def\DTmonth{\number\DXmonth}\fi
\ifx\undefined\XeTeXversion
\begin{picture}(430,680)(-20,45)
\else
\begin{picture}(430,680)(3,17)
\fi
\put(-31,528) {\makebox(0,1)[cl]{\texttt{\textbf{{\DT...
\Line=469 \Dcol=\firstDcol \Wcol=\firstWcol
}
\def\所属#1職#2{
\put(124,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#1...
\put(231,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#2...
}
\def\氏名#1#2{
\put(308,680.7) {\makebox(0,0)[cc]{\footnotesize\text{#1...
}
\def\疲労の蓄積(#1){\def\temp{#1}%
\ifx\temp\empty \else%
\put( -3,60) {\makebox(0,0)[cc]{\Large 〇}}
\put( 65,60){\makebox(0,0)[tl]{\begin{minipage}{147mm}\b...
\fi%
}
\def\面談の希望(#1){
\def\Ari{有}\def\Kibou{#1}
\ifx\Kibou\Ari
\put( -3, 7) {\makebox(0,0)[cc]{\Large 〇}}
\else
\fi
}
\def\holidaycolorbox{
\advance\Dcol -\Dcolbg\advance\Line -\Linebg
\put(\number\Dcol.7,\number\Line.7){\colorbox{gray!60...
\advance\Line \Linebg\advance\Dcol \Dcolbg
}
\def\saturdaycolorbox{
\advance\Dcol -\Dcolbg\advance\Line -\Linebg
\put(\number\Dcol.7,\number\Line.7){\colorbox{gray!30...
\advance\Line \Linebg\advance\Dcol \Dcolbg
}
%
\def\holiday#1#2[#3]{
\ifnum\DXmonth=#1
\STdate=#2 \advance\STdate -1
\upto{\number\STdate}for{}if{0}
\advance \DXdate 1
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek=0\holidaycolorbox
\else\saturdaycolorbox\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{\beg...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
\fi
}
%
\def\working#1#2#3#4#5#6[#7]{
\ifnum\DXmonth=#1
\STdate=#2 \advance\STdate -1
\upto{\number\STdate}for{}if{0}
\STtemp=\number\Wcol
\UpTo{#2}at{#3}{#4}to{#5}{#6}for{#7}if{1}
\fi
}
%
\makeatletter
%
\def\休暇#1月#2日{\@ifnextchar[{\holiday{#1}{#2}}{\holid...
\def\休日#1月#2日{\@ifnextchar[{\holiday{#1}{#2}}{\holid...
\def\出退#1月#2日#3時#4分〜#5時#6分{\@ifnextchar[%
{\working{#1}{#2}{#3}{#4}{#5}{#6}}{\working{#1}{#2}{#...
%
\newcount\flag
\def\UpTo#1at#2#3to#4#5for#6if#7{
\STdate=#1
\@whilenum\DXdate<#1 \do{ \flag=0 \advance \DXdate 1
\STtempa=#2 \multiply\STtempa by 60 \advance\STte...
\STtempb=#4 \multiply\STtempb by 60 \advance\STte...
\ifx1#7 \flag=1\fi
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek>0
\ifnum\DXweek<6 \flag=1
\else \saturdaycolorbox\fi
\else \holidaycolorbox \fi
\STtemp=\number\Wcol
\advance\STtemp 82
\ifnum\flag=1
\put(\number\STtemp.5,\number\Line){\makebox(...
\ifnum\STtempa>720%12*60
\ifnum\STtempa>780%13*60
\else\STtempa=720%12*60
\advance\STtempb -60\fi
\else
\ifnum\STtempb<780%13*60
\ifnum\STtempb<720%12*60
\else\STtempb=780%13*60
\advance\STtempa 60\fi
\else
\advance\STtempa 60
\fi
\fi
\advance\STtempb -\number\STtempa
\STtempa=\number\STtempb
\ifnum\DXweek>0\ifnum\DXweek<6
\advance\STtempa -465
\fi\fi
\advance\ExcessTime \number\STtempa
\STtempa=0 \advance\STtemp 38
\@whilenum\STtempb>59 \do{\advance\STtempb -6...
\put(\number\STtemp,\number\Line){\makebox(0,...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{...
\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
}
}
\def\upto#1for#2if#3{
\STdate=#1
\@whilenum\DXdate<#1 \do{ \flag=0 \advance \DXdate 1
\ifx1#3 \flag=1\fi
\ifnum\DXdate=16
\Line=469 \Dcol=\secondDcol \Wcol=\secondWcol
\fi
\ifnum\DXweek>0
\ifnum\DXweek<6 \flag=1
\else \saturdaycolorbox\fi
\else \holidaycolorbox \fi
\STtemp=\number\Wcol
\advance\STtemp 82
\ifnum\flag=1
\ifnum\DXweek=1
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourMon \multiply\STtempa by ...
\STtempb=\DThourMon \multiply\STtempb by ...
\fi\ifnum\DXweek=2
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourTue \multiply\STtempa by ...
\STtempb=\DThourTue \multiply\STtempb by ...
\fi\ifnum\DXweek=3
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourWed \multiply\STtempa by ...
\STtempb=\DThourWed \multiply\STtempb by ...
\fi\ifnum\DXweek=4
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourThu \multiply\STtempa by ...
\STtempb=\DThourThu \multiply\STtempb by ...
\fi\ifnum\DXweek=5
\put(\number\STtemp.5,\number\Line){\make...
\STtempa=\DShourFri \multiply\STtempa by ...
\STtempb=\DThourFri \multiply\STtempb by ...
\fi
\ifnum\STtempa>720%12*60
\ifnum\STtempa>780%13*60
\else\STtempa=720%12*60
\advance\STtempb -60\fi
\else
\ifnum\STtempb<780%13*60
\ifnum\STtempb<720%12*60
\else\STtempb=780%13*60
\advance\STtempa 60\fi
\else
\advance\STtempa 60
\fi
\fi
\advance\STtempb -\number\STtempa
\STtempa=\number\STtempb
\ifnum\DXweek>0\ifnum\DXweek<6
\advance\STtempa -465
\fi\fi
\advance\ExcessTime \number\STtempa
\STtempa=0 \advance\STtemp 38
\@whilenum\STtempb>59 \do{\advance\STtempb -6...
\put(\number\STtemp,\number\Line){\makebox(0,...
\STtemp=\number\Wcol
\advance\STtemp 126
\put(\number\STtemp,\Line){\makebox(0,3)[cl]{...
\fi
\put(\number\Dcol,\number\Line){\makebox(0,1)[cc]...
\put(\number\Wcol,\number\Line){\makebox(0,1)[cc]...
\advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek...
\advance\Line -\linegap
}
}
%
\def\以上{
\upto{\DTlength}for{}if{0}
\ifnum\ExcessTime>0 \STtempb=\number\ExcessTime \else...
\STtempa=0
\@whilenum\STtempb>59 \do{\advance\STtempb -60 \advan...
\put(472,61){\makebox(0,1)[cr]{\number\STtempa\hskip....
\ifx\undefined\XeTeXversion
\put(-76,-53){\includegraphics[width=205mm]{kenko-...
\else
\put(-76,-53){\includegraphics[width=205mm]{kenko-...
\fi
\end{picture}
\end{document}
\end
}
\makeatother
%
ページ名: