なんとか、健康調査のマクロを改定(最新は V2.06 版)して、備考欄にも対応(若干の仕様変更あり)した。TeXのソース file 作成上の注意点は以下の通り:
1:すべてのイベントを日付順に並べる。提出は全てのイベントが揃ったあと、次の月でなければならない。 2:休暇を取った場合は、当月の内に適切な位置に書き入れる。(実労働時間も裁量労働の時間も0) 3:休日にサービス出勤した場合も、当月の内に適切な位置に書き入れる。(裁量労働の時間は0) 4:出退勤の記録を正確に入れる場合も、当月の内に適切な位置に書き入れる。 ただし、出勤が12時以前で退勤が13時以後の場合に休憩時間1時間が差し引かれる。午前中のみ や午後のみの場合には差し引かない(12時から13時を休憩時間としている)ので注意されたい。
TeX のソース file のコンパイル上の注意点は以下の通りである。
(ただし ipa は無論エールのことなどでは断じてなく、情報処理推進機構 謹製の無料で使える 日本国標準フォント のことである)
1:TeXShop + xelatex 用ですが、uplatex でも動く。 2:(XeLaTeX の場合) kenko2.inc 中の \usepackage[ipa]{zxjafont} の [ipa] は ipaフォントの指定で、[ipa] がダメなら [hiragino](ヒラギノフォント指定)とか [ms](MS明朝など指定)とかに変更すればこれを使用できる。 (UpLaTeX の場合) メインファイルの7行目 %!TEX TS-program = XeLaTeX の XeLaTeX を UpLaTeX に変更する。
上記の注意事項を守って以下のファイルを作成して Mac のHDのどこかに置き、Automator で自動コンパイルとメールへの自動添付と送信までを次の月の最初の出勤日に紐付ければ完成となる。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 健康調査報告書 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月の default \火曜出退勤{9}時{30}分〜{18}時{15}分[{5}月] % 5月の default \木曜出退勤{9}時{00}分〜{18}時{45}分[{5}月] % 5月の default % \休日{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 の中身である。この中でネット上にあった奥村さんの okumacro.sty の一部や Stack Exchange の \NumberOfDaysInMonthを 参考(若干の仕様変更あり)にしている。
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 健康調査報告書 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{Arial} \ifdefined\mac \setjamainfont[Scale=0.95]{HGSeikaishotaiPRO} \setjasansfont[Scale=0.962,BoldFont=Hiragino Mincho ProN W6,ItalicFont=Hiragino Kaku Gothic ProN W3]{Hiragino Mincho ProN W3} \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 \@tempcnta \divide \@tempcnta by 25\advance \@tempcntb by -\@tempcnta \divide \@tempcnta by 4\advance \@tempcntb by \@tempcnta \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@weekday=2\or\c@weekday=3\or\c@weekday=4\or\c@weekday=5\or\c@weekday=6\fi% } % \def\Sunday{日} \def\Monday{月} \def\Tuesday{火} \def\Wednesday{水} \def\Thursday{木} \def\Friday{金} \def\Saturday{土} % \def\weekday#1#2#3{\weekdayno{#1}{#2}{#3} \ifcase\c@weekday\Sunday\or\Monday\or\Tuesday\or\Wednesday\or\Thursday\or\Friday\or\Saturday\fi% } % \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\@tempcnta=1\fi\fi \@tempcntb=#1 \divide\@tempcntb by 4 \multiply\@tempcntb by 4 \ifnum\@tempcntb=#1 \@tempcntb=\@tempcnta\else \@tempcntb=1\fi \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\or\c@days=31\or\c@days=31\or\c@days=30\or\c@days=31\or\c@days=30\or\c@days=31% \else\c@days=0\fi% } % \makeatother % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % マクロ定義本体 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \newcount\DXyear \DXyear=\number\year \newcount\DXmonth \DXmonth=\number\month \advance\DXmonth -1 \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} \DXyear=#1 \DXmonth=#2 \days{#1}in{#2}\def\DTlength{\number\c@days} \weekdayno{#1}{#2}{1} \DXweek=\number\c@weekday} % \def\出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\timedata{#1}時{#2}分〜{#3}時{#4}分}{\timedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \def\月曜出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\montimedata{#1}時{#2}分〜{#3}時{#4}分}{\montimedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \def\火曜出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\tuetimedata{#1}時{#2}分〜{#3}時{#4}分}{\tuetimedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \def\水曜出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\wedtimedata{#1}時{#2}分〜{#3}時{#4}分}{\wedtimedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \def\木曜出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\thutimedata{#1}時{#2}分〜{#3}時{#4}分}{\thutimedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \def\金曜出退勤#1時#2分〜#3時#4分{ \@ifnextchar[{\fritimedata{#1}時{#2}分〜{#3}時{#4}分}{\fritimedata{#1}時{#2}分〜{#3}時{#4}分[{\number\DXmonth}月]}} \makeatother % \def\出勤#1時#2分{ \def\DShourMon{#1}\def\DSminMon{#2}\def\DShourTue{#1}\def\DSminTue{#2}\def\DShourWed{#1}\def\DSminWed{#2}\def\DShourThu{#1}\def\DSminThu{#2}\def\DShourFri{#1}\def\DSminFri{#2}} \def\退勤#1時#2分{ \def\DThourMon{#1}\def\DTminMon{#2}\def\DThourTue{#1}\def\DTminTue{#2}\def\DThourWed{#1}\def\DTminWed{#2}\def\DThourThu{#1}\def\DTminThu{#2}\def\DThourFri{#1}\def\DTminFri{#2}} \def\timedata#1時#2分〜#3時#4分[#5月]{ \ifnum\DXmonth=#5 \def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon{#3}\def\DTminMon{#4} \def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue{#3}\def\DTminTue{#4} \def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed{#3}\def\DTminWed{#4} \def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu{#3}\def\DTminThu{#4} \def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri{#3}\def\DTminFri{#4} \fi } \def\montimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5 \def\DShourMon{#1}\def\DSminMon{#2}\def\DThourMon{#3}\def\DTminMon{#4}\fi} \def\tuetimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5 \def\DShourTue{#1}\def\DSminTue{#2}\def\DThourTue{#3}\def\DTminTue{#4}\fi} \def\wedtimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5 \def\DShourWed{#1}\def\DSminWed{#2}\def\DThourWed{#3}\def\DTminWed{#4}\fi} \def\thutimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5 \def\DShourThu{#1}\def\DSminThu{#2}\def\DThourThu{#3}\def\DTminThu{#4}\fi} \def\fritimedata#1時#2分〜#3時#4分[#5月]{\ifnum\DXmonth=#5 \def\DShourFri{#1}\def\DSminFri{#2}\def\DThourFri{#3}\def\DTminFri{#4}\fi} % \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{{\DTyear\hskip.08em年\hskip.08em\DTmonth\hskip.08em月}}}}} \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} \text{#2}}} } \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}\baselineskip6.5mm{#1}\end{minipage}}} \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}{\framebox(250.2,23.4){}}} \advance\Line \Linebg\advance\Dcol \Dcolbg } \def\saturdaycolorbox{ \advance\Dcol -\Dcolbg\advance\Line -\Linebg \put(\number\Dcol.7,\number\Line.7){\colorbox{gray!30}{\framebox(250.2,23.4){}}} \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]{\large\texttt{\textbf{\number\DXdate}}}} \put(\number\Wcol,\number\Line){\makebox(0,1)[cc]{\large\texttt{\textbf{\weekday{\number\DXyear}{\number\DXmonth}{\number\DXdate}}}}} \STtemp=\number\Wcol \advance\STtemp 126 \put(\number\STtemp,\Line){\makebox(0,3)[cl]{\begin{minipage}[c]{28mm} \footnotesize #3\end{minipage}}} \advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek -7\fi \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}}{\holiday{#1}{#2}[{}]}} \def\休日#1月#2日{\@ifnextchar[{\holiday{#1}{#2}}{\holiday{#1}{#2}[{}]}} \def\出退#1月#2日#3時#4分〜#5時#6分{\@ifnextchar[% {\working{#1}{#2}{#3}{#4}{#5}{#6}}{\working{#1}{#2}{#3}{#4}{#5}{#6}[{}]}} % \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\STtempa #3 \STtempb=#4 \multiply\STtempb by 60 \advance\STtempb #5 \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(0,1)[cr]{\small #2:#3 \texttt{〜} #4:#5}} \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 -60 \advance\STtempa 1} \put(\number\STtemp,\number\Line){\makebox(0,1)[cr]{\footnotesize \number\STtempa\hskip.2ex:\hskip.1ex\ifnum\STtempb<10{0}\fi\number\STtempb}} \STtemp=\number\Wcol \advance\STtemp 126 \put(\number\STtemp,\Line){\makebox(0,3)[cl]{\begin{minipage}[c]{28mm} \footnotesize #6\end{minipage}}} \fi \put(\number\Dcol,\number\Line){\makebox(0,1)[cc]{\large\texttt{\textbf{\number\DXdate}}}} \put(\number\Wcol,\number\Line){\makebox(0,1)[cc]{\large\texttt{\textbf{\weekday{\number\DXyear}{\number\DXmonth}{\number\DXdate}}}}} \advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek -7\fi \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){\makebox(0,1)[cr]{\small \DShourMon:\DSminMon \texttt{〜} \DThourMon:\DTminMon}} \STtempa=\DShourMon \multiply\STtempa by 60 \advance\STtempa \DSminMon \STtempb=\DThourMon \multiply\STtempb by 60 \advance\STtempb \DTminMon \fi\ifnum\DXweek=2 \put(\number\STtemp.5,\number\Line){\makebox(0,1)[cr]{\small \DShourTue:\DSminTue \texttt{〜} \DThourTue:\DTminTue}} \STtempa=\DShourTue \multiply\STtempa by 60 \advance\STtempa \DSminTue \STtempb=\DThourTue \multiply\STtempb by 60 \advance\STtempb \DTminTue \fi\ifnum\DXweek=3 \put(\number\STtemp.5,\number\Line){\makebox(0,1)[cr]{\small \DShourWed:\DSminWed \texttt{〜} \DThourWed:\DTminWed}} \STtempa=\DShourWed \multiply\STtempa by 60 \advance\STtempa \DSminWed \STtempb=\DThourWed \multiply\STtempb by 60 \advance\STtempb \DTminWed \fi\ifnum\DXweek=4 \put(\number\STtemp.5,\number\Line){\makebox(0,1)[cr]{\small \DShourThu:\DSminThu \texttt{〜} \DThourThu:\DTminThu}} \STtempa=\DShourThu \multiply\STtempa by 60 \advance\STtempa \DSminThu \STtempb=\DThourThu \multiply\STtempb by 60 \advance\STtempb \DTminThu \fi\ifnum\DXweek=5 \put(\number\STtemp.5,\number\Line){\makebox(0,1)[cr]{\small \DShourFri:\DSminFri \texttt{〜} \DThourFri:\DTminFri}} \STtempa=\DShourFri \multiply\STtempa by 60 \advance\STtempa \DSminFri \STtempb=\DThourFri \multiply\STtempb by 60 \advance\STtempb \DTminFri \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 -60 \advance\STtempa 1} \put(\number\STtemp,\number\Line){\makebox(0,1)[cr]{\footnotesize \number\STtempa\hskip.2ex:\hskip.1ex\ifnum\STtempb<10{0}\fi\number\STtempb}} \STtemp=\number\Wcol \advance\STtemp 126 \put(\number\STtemp,\Line){\makebox(0,3)[cl]{\begin{minipage}[c]{28mm} \footnotesize #2\end{minipage}}} \fi \put(\number\Dcol,\number\Line){\makebox(0,1)[cc]{\large\texttt{\textbf{\number\DXdate}}}} \put(\number\Wcol,\number\Line){\makebox(0,1)[cc]{\large\texttt{\textbf{\weekday{\number\DXyear}{\number\DXmonth}{\number\DXdate}}}}} \advance\DXweek 1 \ifnum\DXweek>6 \advance\DXweek -7\fi \advance\Line -\linegap } } % \def\以上{ \upto{\DTlength}for{}if{0} \ifnum\ExcessTime>0 \STtempb=\number\ExcessTime \else \STtempb=0 \fi \STtempa=0 \@whilenum\STtempb>59 \do{\advance\STtempb -60 \advance\STtempa 1} \put(472,61){\makebox(0,1)[cr]{\number\STtempa\hskip.2ex:\hskip.1ex\ifnum\STtempb<10{0}\fi\number\STtempb}} \ifx\undefined\XeTeXversion \put(-76,-53){\includegraphics[width=205mm]{kenko-chosa1.pdf}} \else \put(-76,-53){\includegraphics[width=205mm]{kenko-chosa1}} \fi \end{picture} \end{document} \end } \makeatother %