%==== General Version History ======================================
% 2006-05-30 Taku Yamanaka (Physics Dept., Osaka Univ.)
% 2006-06-02 V1.0
% 2006-06-14 V1.1 Use automatic calculation for cost tables.
% 2006-06-18 V1.2 Split user's contents and the format.
% 2006-06-20 V1.3 Reorganized user and format files
% 2006-06-25 V1.4 Readjusted all the table column widths with p{...}.
%				With \KLTabR and \KLTabRNum, now the items can be right-justified
%				in the cell defined by p{...}.
% 2006-06-26 V1.5 Use \newlength and \setlength, instead of \newcommand, to define positions.
% 2006-08-19 V1.6 Remade it for 2007 JFY version.
% 2006-09-05 V1.7 Added font declarations suggested by Hoshino@Meisei Univ.
% 2006-09-06 V1.8 Introduced usePDFform flag to switch the form file format.
% 2006-09-09 V1.9 Changed p.7, to allow different heights between years. (Thanks to Ytow.)
% 2006-09-11 V2.0 Added an option to show budget summary.
% 2006-09-13 V2.1 Added an option to show the group.
% 2006-09-14 V2.1.1 Cleaned up Kenkyush Chosho.
% 2006-09-21 V2.2 Generated under a new automatic development system.
%====================================================== 
\usepackage{../kakenhi}
%\DrawBox  % uncomment this to show the boxes 

\pagestyle{empty}

% ===== File format for forms ===========================
\ifthenelse{\boolean{usePDFform}}{
	\newcommand{\KLFormFormat}{pdf}	\usepackage[dvipdfm]{graphicx}
}{	\newcommand{\KLFormFormat}{eps}	\usepackage{graphicx}
}

% ===== Parameters for LaTeX =========================
\setlength{\topmargin}{-3.9cm}
\setlength{\oddsidemargin}{-2.9cm}
\setlength{\evensidemargin}{-2.9cm}
	% Above three margins are set so that the origin of the coordinate is the top-left corner.
	
\setlength{\textwidth}{22cm}		
	% should be large enough to avoid Overfull \hbox warning when including PDF form files
	
\setlength{\textheight}{30cm}	
	% should be large enough to avoid the 1st form to flow into the 2nd page
	
% ===== Font declarations  ======================================
\DeclareFontShape{JT1}{mc}{m}{it}{<->ssub * mc/m/n}{}
\DeclareFontShape{JY1}{mc}{m}{it}{<->ssub * mc/m/n}{}

% ===== Parameters for KL (Kakenhi LaTeX) ========================
% general purpose temporary variables
\newlength{\KLX}
\newlength{\KLY}
\newlength{\KLW}
\newlength{\KLH}
\newlength{\KLCella}
\newlength{\KLCellb}
\newlength{\KLLeftEdge}
\newlength{\KLLeftTable}

% standard widths
\newlength{\KLFullWidth} 			
\newlength{\KLMiniPageWidth}	\setlength{\KLMiniPageWidth}{21.2cm} % 

% vertical and horizontal shift amounts for pdf and eps forms
\newlength{\KLGraphicsVspace}	\setlength{\KLGraphicsVspace}{-0cm}
\newlength{\KLGraphicsHspace}	\setlength{\KLGraphicsHspace}{-0.1cm}

% standard left edge positions
\newlength{\KLOddLeftEdge}
\newlength{\KLUnivLeftEdge}
\newlength{\KLEvenLeftEdge}

\newlength{\KLLeftOddTable}
\newlength{\KLLeftUnivTable}
\newlength{\KLLeftEvenTable}

% sub-page
\newlength{\KLSubPageX}
\newlength{\KLSubPageY}
\newlength{\KLspx}
\newlength{\KLspy}
\newcommand{\KLSubPageXmm}{}	% for \input(x,y){....} which uses a unit (mm)
\newcommand{\KLSubPageYmm}{}	% for \input(x,y){....} which uses a unit (mm)

% 奇数ページの下のある、種目、研究機関名、研究代表者氏名の座標
\newlength{\KLBottomInfoY}
\newlength{\KLBottomInfoH}	
\newlength{\KLBottomKindX}	
\newlength{\KLBottomKindW}	
\newlength{\KLBottomIDX}
\newlength{\KLBottomIDW}
\newlength{\KLBottomKikanX}	
\newlength{\KLBottomKikanW}	
\newlength{\KLBottomNameX}	
\newlength{\KLBottomNameW}	

% ===== standard counters ======================================
\newcounter{KLSubPageNo}	% sub-page counter
\newcounter{KLPageOffset}		% to generate sub-page number

% ===== Global definitions for the Kakenhi form ======================
%　基本情報
\newcommand{\研究開始年度}{2007}
\newcommand{\研究開始元号年度}{19}	%平成

%===== To check page overflow after the pages with watermarks. =====
\newcommand{\KLCheckPageNo}[3]{
	\ifthenelse{\value{page}>#1}{
		\phantom{x}	\vspace{2cm}
		{\LARGE　　「 #2 」は#3 ページ分しか書けません。\\
		　　行数を減らしてください。}\\
		{\Large 　　(もし、この前のページが空欄の場合には、
		
		　　{\tt \textbackslash vspace\{2cm\}  \textbackslash phantom\{x}\}\\
		
		　　を「#2」の最後に入れてみて下さい。)
		}
		\clearpage
	}{}
}

%Arguments for \KLCheckPageNo................................
\newcommand{\KLcpnPage}{}
\newcommand{\KLcpnItem}{} 
\newcommand{\KLcpnMaxPage}{}
%=======================================================
