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

大学受入内諾書のマクロを作成した。これは uplatex では無理かもしれない。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	大学受入内諾書			%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%charset = UTF-8
%!TEX encoding = UTF-8 Unicode
%!TEX TS-program = XeLaTeX
\input lpa1.inc
%%%%%%%%%%%%%%%%%%%%%%%%%
\ここから				%
%%%%%%%%%%%%%%%%%%%%%%%%%
%
\受入年度{2021}({2021})年	% 全角半角併記
% 本人データ	%%%%%%%%%
\本人国籍{地球国}({Earthling})	% 和名英名併記
\本人氏名{YAMADA, Taro}	% ローマ字表記
%
% 受入部署データ	%%%%%
\受入大学{九州大学}({Kyushu University})
\受入所属長{大学院数理学府}({Graduate School of Something})・{学府長}({Dean})氏名{学府 \ 長}({GAKUFU, Chou})	% 漢字ローマ字併記
%
% 受入教員データ	%%%%%
\受入教員{大学院某学研究院}({Faculty of Something})・{教授}({Professor})氏名{九大 \ 某々}({KYUDAI, Boubou})	% 漢字ローマ字併記
%
% 1 渡日時期	%%%%%%%%%
\後期渡日
%
% 2 予備教育	%%%%%%%%%
\予備教育有
%\予備教育無
%\予備教育未定
%
% 3 入学時期	%%%%%%%%%
%\即年から
\翌年から%	予備教育有の場合
%
% 4 受入部署	%%%%%%%%%
\受入部署{大学院\ 某学}({Something})学府{専攻}({Major})専攻	% ローマ字併記
%
% 5 受入身分	%%%%%%%%%
%\受入正規で{博士後期}({Doctoral})課程
\受入非正規で合格後{博士後期}({Doctoral})課程	% 漢字ローマ字併記
%
% 受入内諾に至った経緯	%
\研究テーマ{某研究課題に関する研究}
\受入経緯{
受け入れに至る端緒
\\[1ex]
受け入れまでの経過
\\[1ex]
受け入れの具体化
\\[1ex]
受け入れの判断
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%
\ここまで				%
%%%%%%%%%%%%%%%%%%%%%%%%%
%

以下が lpa1.inc である。やっつけで作ったので、とにかく動くバージョンである。

%%%
%%% XeLaTeX
%!TEX encoding = UTF-8 Unicode
%%%
\ifx\undefined\XeTeXversion
%	pLaTeX				%t
\documentclass[12pt]{jarticle}
\usepackage[deluxe]{otf}
\usepackage[dvipdfmx]{graphicx}
\usepackage{uline--}
\def\timesbf#1{{\bf #1}}
\def\tegaki#1{#1}
\def\msmin#1{#1}
\def\msgoth#1{#1}
\def\hiramin#1{#1}
\def\hiramaru#1{#1}
\def\hiragoth#1{#1}
\else
%	XeLaTeX				%
\documentclass[12pt]{article}
\usepackage[no-math]{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=1.0}
\setromanfont{Times}
\setsansfont{GillSans-Light}
\setmonofont{Helvetica}
\usepackage[boldfont,slantfont]{xeCJK}
\CJKspace
\usepackage{zxjatype} % xeCJK を内部で読み込んでいる。
\usepackage{xunicode,xltxtra}
\usepackage{zxotf}
\usepackage{uline-x}
\usepackage{pdfsync}
\def\jsScale{0.962216}
\setjamainfont[Scale=\jsScale,BoldFont=Hiragino Mincho ProN W6]{Hiragino Mincho ProN W3}
\setjasansfont[Scale=\jsScale,BoldFont=Hiragino Kaku Gothic ProN W6]{Hiragino Kaku Gothic ProN W3}
\setjamonofont[Scale=\jsScale]{Osaka-Mono}
%
\def\timesbf#1{{\fontspec{Times-Bold}#1}}
\def\tegaki#1{{\fontspec[Scale=\jsScale]{851tegakizatsu}#1}}
\def\msmin#1{{\fontspec[Scale=1.0]{MS-Mincho}#1}}
\def\msgoth#1{{\fontspec[Scale=1.0]{MS-Gothic}#1}}
\def\hiramin#1{{\fontspec[Scale=\jsScale]{HiraMinProN-W3}#1}}
\def\hiramaru#1{{\fontspec[Scale=\jsScale]{HiraMaruProN-W4}#1}}
\def\hiragoth#1{{\fontspec[Scale=\jsScale]{HiraGothProN-W3}#1}}
\fi
%%%%%%%%%%%%%
\usepackage{amsmath,amssymb}
%%%	B5 paper
\textwidth=16.5cm
\textheight=25.0cm
\hoffset -12.0mm
\voffset -23mm
\pagestyle{plain}
%%%%%%%%%%%%%
\newcount\Nendo
\def\受入年度#1(#2)年{\def\NendoJ{#1}\def\NendoR{#2}%
\Nendo=\NendoR\advance\Nendo by 1}
\def\本人国籍#1(#2){\def\NationJ{#1}\def\NationR{#2}}
\def\本人氏名#1{\def\NameR{#1}}
\def\受入大学#1(#2){\def\UnivJ{#1}\def\UnivR{#2}}
\def\受入所属長#1(#2)・#3(#4)氏名#5(#6){%
 \def\HDeptJ{#1}\def\HDeptR{#2}\def\HposJ{#3}
 \def\HposR{#4}\def\HNameJ{#5}\def\HnameR{#6}}
\def\受入教員#1(#2)・#3(#4)氏名#5(#6){%
 \def\DeptJ{#1}\def\DeptR{#2}\def\posJ{#3}%
 \def\posR{#4}\def\NameJ{#5}\def\nameR{#6}}
%
\def\後期渡日{\def\Parrival{}}
\def\予備教育有{\def\Neccessary{}}
\def\予備教育無{\def\Unneccessary{}}
\def\予備教育未定{\def\Tobedetermined{}}
\def\即年から{\def\RightYear{}}
\def\翌年から{\def\NextYear{}}
\def\受入部署#1(#2)学府#3(#4)専攻{%
\def\GakufuJ{#1}\def\GakufuR{#2}%
\def\MajorJ{#3}\def\MajorR{#4}}
\def\受入正規で#1(#2)課程{\def\Regular{}%
\def\CourseJ{#1}\def\CourseR{#2}}
\def\受入非正規で合格後#1(#2)課程{\def\NonRegular{}%
\def\CourseJ{#1}\def\CourseR{#2}}
%
\def\研究テーマ#1{\def\ResTheme{#1}}
\def\受入経緯#1{\def\ReasonPA{#1}}
%
\def\ここから{
\begin{document}
\pagestyle{empty}
\thispagestyle{empty}
\newcount\Line
}
%
\def\ここまで{
\begin{picture}(430,680)(0,0)
\put(-95,-105){\includegraphics[page=1]{LPA20XX}}
\Line=711
\put(173,\number\Line.8){\makebox(0,0)[cr]{\msmin{\NendoJ}}}
\advance\Line -16
\put(292.5,\number\Line.2){\makebox(0,0)[cl]{\timesbf{\NendoR}}}
\Line=652
\put(112,\number\Line.2){\small \NationJ \ (\NationR)}
\advance\Line -20
\put(112,\number\Line.2){\small \NameR}
\Line=602
\put(176,\number\Line){\small \UnivJ}
\advance\Line -15
\put(176,\number\Line){\small \UnivR}
\advance\Line -15
\put(176,\number\Line){\small \HDeptJ{・}\HposJ}
\advance\Line -15
\put(176,\number\Line){\small \HposR \ / \HDeptR}
\advance\Line -15
\put(176,\number\Line){\small \HNameJ}
\advance\Line -15
\put(176,\number\Line){\small \HnameR}
% 渡日時期
\Line=405
\put(221.5,\number\Line.5){\makebox(0,0)[br]{\small\NendoR}}
\multiput(346.8,\number\Line.5)(72,0){2}{\makebox(0,0)[bl]{\small\NendoR}}
\Line=407
\ifdefined\Parrival
\put(187,\number\Line){\small\checkmark}
\fi
% 予備教育
\Line 373
% 有り
\ifdefined\Neccessary
\put(-21,\number\Line){\small\checkmark}
\fi
% 無し
\ifdefined\Unneccessary
\put(77,\number\Line){\small\checkmark}
\fi
% 未定
\ifdefined\Tobedetermined
\put(185.5,\number\Line){\small\checkmark}
\fi
% 
% 入学時期
% 後期
\Line=342
\put(16.9,\number\Line.6){\makebox(0,0)[br]{\small\NendoR}}
\multiput(144,\number\Line.5)(72.5,0){2}{\makebox(0,0)[bl]{\small\NendoR}}
\advance\Line -15
\put(16.9,\number\Line.7){\makebox(0,0)[br]{\small\number\Nendo}}
\put(79.0,\number\Line.7){\makebox(0,0)[bl]{\small\number\Nendo}}
\Line=344
\ifdefined\RightYear
\put(-21,\number\Line){\small\checkmark}
\fi
\advance\Line 29
% 前期
\advance\Line -44
\ifdefined\NextYear
\put(-21,\number\Line.5){\small\checkmark}
\fi
% 学府名
\Line=283
\put(81.2,\number\Line.7){\makebox(0,0)[cr]{\small \GakufuJ}}
\put(126,\number\Line.7){\makebox(0,0)[cc]{\small \uline[lines=2,linegap=2pt]{    }}}
\put(207.7,\number\Line.5){\makebox(0,0)[cr]{\small \MajorJ}}
\Line=267
\put(63.2,\number\Line.1){\makebox(0,0)[cl]{\small of \GakufuR}}
%\advance\Line 2
\put(263.5,\number\Line.1){\makebox(0,0)[cl]{\small \MajorR}}
% 身分
% 正規
\ifdefined\Regular
\Line=232
\put(-21,\number\Line){\small\checkmark}
\advance\Line -4
\put(235,\number\Line.0){\makebox(0,0)[br]{\small \CourseJ}}
\put(371,\number\Line.5){\makebox(0,0)[br]{\small \CourseR}}
\fi
% 非正規
\ifdefined\NonRegular
\Line=216
\put(-21,\number\Line.5){\small\checkmark}
\advance\Line -17
\put(320,\number\Line.2){\makebox(0,0)[br]{\small \CourseJ}}
\put(408,\number\Line.7){\makebox(0,0)[br]{\small \CourseR}}
\fi
\end{picture}
%
\clearpage
%
\begin{picture}(430,680)(0,0)
\put(-95,-105){\includegraphics[page=2]{LPA2021}}
\put(103,686){\begin{minipage}[t]{123mm}\ResTheme\end{minipage}}
\put(-29,626){\begin{minipage}[t]{169mm}\small\baselineskip 16pt%
\ReasonPA%
\end{minipage}}
\Line=97
\put(177,\number\Line){\small \UnivJ}
\advance\Line -17
\put(177,\number\Line){\small \UnivR}
\advance\Line -17
\put(177,\number\Line){\small \DeptJ{・}\posJ}
\advance\Line -17
\put(177,\number\Line){\small \posR \ / \DeptR}
\advance\Line -16
\put(177,\number\Line){\small \NameJ}
\advance\Line -17
\put(177,\number\Line){\small \nameR}
\end{picture}
%
\end{document}
\end
}
%%%%%%%%%%%%%
%
%%%%%%%%%%
%

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