%=================================================================
% form05_pd_header.tex
%	for the 2007(H19) Japanese Fiscal Year
%	2006-10-01 : Taku Yamanaka (Osaka Univ.)
%			Switched to the new development system using a "mother file".
%	2007-03-24: Taku
%			Switched to a method using "picture" environment.
%	2007-05-09: Taku
%=================================================================
\usepackage{calc}
\usepackage{watermark}
\usepackage{longtable}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.

\geometry{noheadfoot,scale=1}  %scale=1 resets margins to 0
\setlength{\unitlength}{1pt}

% picture environment location, in  units of points
\newcommand{\KLOddPictureX}{84}%
\newcommand{\KLEvenPictureX}{70}%
\newcommand{\KLPictureY}{781}%
\newcommand{\KLOddPictureInWaterMarkX}{58}
\newcommand{\KLEvenPictureInWaterMarkX}{58}
\newcommand{\KLPictureInWaterMarkY}{791}

% standard left edge positions
\newcommand{\KLOddLeftEdge}{47}
\newcommand{\KLOddRightEdge}{548}
\newcommand{\KLEvenLeftEdge}{45}
\newcommand{\KLEvenRightEdge}{549}

\newcommand{\KLLeftEdge}{}
\newcommand{\KLRightEdge}{}

% standard margins for text in frames
\setcounter{KLParboxSideMargin}{7}
\setcounter{KLParboxTopMargin}{12}
\setcounter{KLParboxBottomMargin}{5}

% ===== Global definitions for the Kakenhi form ======================
%　基本情報
\newcommand{\研究種目}{PD}
\newcommand{\研究種目後半}{}
\ifthenelse{\isundefined{\研究種別}}{
	\newcommand{\研究種別}{}
}{}%
\newcommand{\KLMainFile}{pd.tex}
\newcommand{\KLForms}{pd_forms}
\newcommand{\KLYoshiki}{yoshiki_pd}

%　奇数ページの下に記入される情報
\newcommand{\klbyYup}{}
\newcommand{\klbyYdown}{}
\newcommand{\klbyKikanXleft}{}
\newcommand{\klbyKikanXright}{}
\newcommand{\klbyNameXleft}{}
\newcommand{\klbyNameXright}{}

\newcommand{\KLBottomInfo}[6]{%
	\ifthenelse{\equal{#1}{}}{%
		\renewcommand{\klbyYup}{65}
		\renewcommand{\klbyYdown}{47}
	}{%
		\renewcommand{\klbyYup}{#1}
		\renewcommand{\klbyYdown}{#2}
	}
	
	\ifthenelse{\equal{#3}{}}{%
		\renewcommand{\klbyKikanXleft}{133}
		\renewcommand{\klbyKikanXright}{348}
		\renewcommand{\klbyNameXleft}{415}
		\renewcommand{\klbyNameXright}{545}
	}{%
		\renewcommand{\klbyKikanXleft}{#3}
		\renewcommand{\klbyKikanXright}{#4}
		\renewcommand{\klbyNameXleft}{#5}
		\renewcommand{\klbyNameXright}{#6}
	}
%	\KLTextBox{\klbyKikanXleft}{\klbyYup}{\klbyKikanXright}{\klbyYdown}{}{\研究機関名}%
	\KLTextBox{\klbyNameXleft}{\klbyYup}{\klbyNameXright}{\klbyYdown}{}{\申請者氏名}%
}
%==========================================================

%------ These should be set before \begin{document} ------
\setlength{\oddsidemargin}{-5mm}
\setlength{\evensidemargin}{-5mm}
\setlength{\textwidth}{168mm}
\setlength{\topmargin}{-4mm}
\setlength{\textheight}{248mm}
%----------------------------------------------------------------------------


