%%
%% kut-short-rep.sty
%% A style file for short reports prepared for
%% the Laboratory work on information technology II
%% of the School of Information, Kochi University of Technology.
%%
%% This file is a variant of kut-abstract.sty.
%% This version is by takata.yoshiaki@kochi-tech.ac.jp, March 2014.
%%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{kut-short-rep}
\typeout{Style for Short Reports, version 1.0, 2014/3/6,
  for Lab work on information technology II.}
%%% Sections and Captions %%%
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
    {2\Cdp}{\Cdp}{\normalfont\large\rmfamily\gtfamily\bfseries}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
    {2\Cdp}{\Cdp}{\normalfont\normalsize\rmfamily\gtfamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
    {2\Cdp}{\Cdp}{\normalfont\normalsize\rmfamily\gtfamily\bfseries}}
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
    {2\Cdp}{-1zw}{\normalfont\normalsize\rmfamily\gtfamily\bfseries ■}}
\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
    {2\Cdp}{-1zw}{\normalfont\normalsize\rmfamily\gtfamily\bfseries}}
\long\def\@makecaption#1#2{{\small
  \advance\leftskip1cm
  \advance\rightskip1cm
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1\hspace{1zw}#2}%
  \ifdim \wd\@tempboxa >\hsize
    #1\hspace{1zw}#2\par
  \else
    \global \@minipagefalse
    \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}}
\let\orig@table=\table
\def\table{\orig@table
  \belowcaptionskip=\abovecaptionskip
  \abovecaptionskip=0pt\relax}
%%% Title and Headings %%%
\let\ifEnglish=\iffalse
\def\English{\let\ifEnglish=\iftrue}
\def\Etitle#1{\gdef\@Etitle{#1}}\def\@Etitle{}
\def\Eauthor#1{\gdef\@Eauthor{#1}}\def\@Eauthor{}
\def\idnumber#1{\gdef\@idnumber{#1}}\def\@idnumber{}% Student's ID number
\def\subjecttitle#1{\gdef\@subjecttitle{#1}}\def\@subjecttitle{}
\def\@Jindent{1\Cwd}
\def\@Eindent{2em}
\renewcommand{\maketitle}{%
    \ifEnglish
      \setlength\parindent{\@Eindent}%
      \renewcommand{\@title}{\@Etitle}%
      \renewcommand{\@author}{\@Eauthor}%
    \else
      \setlength\parindent{\@Jindent}%
    \fi
    \setlength\baselineskip{14pt}%
    \twocolumn[%
      \begin{center}%
        {\Large\textbf{\@title}}\par
        \vskip 1.5zh
        {\large
          \begin{tabular}{c}%
            \@idnumber\hskip 1.5zw
            \@author
          \end{tabular}}\par
        \vskip .5zh
        {\large\@date}\par
        \vskip 1.5zh
      \end{center}]}%
\def\ps@myheadings{%
  \let\@evenfoot\@empty
  \def\@evenhead{\thepage\hfil\leftmark}%
  \def\@oddfoot{\hfil\thepage\hfil}%
  \def\@oddhead{{\rightmark}
    \ifEnglish
      \footnotesize
      Report of \@subjecttitle\hfil\@EbachelordeptScInfo
    \else
      \small
      \@subjecttitle\ レポート\hfil\@bachelordeptScInfo
    \fi}%
  \let\@mkboth\@gobbletwo
  \let\sectionmark\@gobble
  \let\subsectionmark\@gobble
}
\def\@bachelordeptScInfo{高知工科大学 情報学群}
\def\@EbachelordeptScInfo{School of Inf., Kochi Univ.\ Tech.}
%%% Style settings %%%
\pagestyle{myheadings}
\def\left@margin{20mm}
\def\right@margin{20mm}
\def\top@margin{25mm}
\def\bot@margin{25mm}
\setlength{\columnsep}{5mm}
\setlength{\oddsidemargin}{\left@margin}
\addtolength{\oddsidemargin}{-1in}
\setlength{\evensidemargin}{\left@margin}
\addtolength{\evensidemargin}{-1in}
\setlength{\textwidth}{210mm}
\addtolength{\textwidth}{-\left@margin}
\addtolength{\textwidth}{-\right@margin}
\setlength{\headheight}{10pt}
\setlength{\headsep}{5mm}
\setlength{\footskip}{10mm}
\setlength{\topmargin}{\top@margin}
\addtolength{\topmargin}{-1in}
\addtolength{\topmargin}{-\headheight}
\addtolength{\topmargin}{-\headsep}
\addtolength{\topmargin}{-3mm}
\setlength{\textheight}{297mm}
\addtolength{\textheight}{-\top@margin}
\addtolength{\textheight}{-\bot@margin}
%%% Misc. ***
% Suppress the false warnings for italic fonts.
\DeclareFontShape{JY1}{mc}{m}{it}{<5> <6> <7> <8> <9> <10> sgen*min
  <10.95><12><14.4><17.28><20.74><24.88> min10 <-> min10}{}
\DeclareFontShape{JT1}{mc}{m}{it}{<5> <6> <7> <8> <9> <10> sgen*tmin
  <10.95><12><14.4><17.28><20.74><24.88> tmin10 <-> tmin10}{}
\endinput
