view graduate_paper.sty @ 9:6e7e571d96e2 default tip

*** empty log message ***
author kent
date Mon, 17 Mar 2008 12:55:42 +0900
parents 01f8838d91fd
children
line wrap: on
line source

%
% 修士卒業論文スタイルファイル master_papar.sty(ver. 2.1e)
%                               Time-stamp: <01/03/01 22:01:27 ryuji>
%
%         ver 2.1e 2/3/01 ryuji
%         ver 2.0e 17/12/00 ryuji
%         ver 1.0e 05/11/99 hiroki
%
% modifier: Ryuji Gushiken(ryuji@ads.ie.u-ryukyu.ac.jp)
%
% author: Hiroki Taira(hiroki@ads.ie.u-ryukyu.ac.jp)

% usage:
%
%\documentclass[a4j]{jreport}
%
%\usepackage{master_paper}
%
%
%\jtitle{修士論文スタイルファイル\\自律分散研バージョン}
%\etitle{\LaTeX  style test file for master paper} 
%\year{平成11年度}
%\thesis{卒業論文|修士論文|..}
%\logo{\includegraphics[width=..]{filename}}
%\affiliation{琉球大学大学院理工学研究科\\ 情報工学専攻}
%\author{名字 名前}
%% or %%
%\author{0.....A 名字 名前\\指導教官 名字 名前}
%
%\begin{document}
%
%\maketitle
%
%%要旨
%\input{abstract.tex}
%
%%目次
%\tableofcontents
%
%%図目次
%\listoffigures
%
%%表目次
%\listoftables
%
%%第一章
%\input{chapter1.tex}
%%chapter1.texの\chapter{}の後ろに次のコマンドを追加してください。
%%ページカウントがリセットされ、ページ数がアラビア文字になります。
%%  \pagenumbering{arabic}
%%第二章
%\input{chapter2.tex}
%%第三章
%\input{chapter3.tex}
%
%%付録
%\input{appendix.tex}
%
%%謝辞
%%\input{thanx.tex}
%
%%参考文献
%\input{biblography.tex}
%
%\end{document}

\typeout{****************************************************************}
\typeout{** 平成15年度 琉球大学大学院 学位論文(修士) ********************}
\typeout{** スタイルファイル(LaTeX2e) : 非公式       ********************}
\typeout{****************************************************************}

%長さ設定
\setlength{\hoffset}{-1in}
\setlength{\voffset}{-1in}
\setlength{\topmargin}{10mm}
\setlength{\oddsidemargin}{30mm}
\setlength{\evensidemargin}{30mm}
\setlength{\headheight}{10mm}
\setlength{\headsep}{15mm}
\setlength{\topskip}{0mm}
\setlength{\textwidth}{160mm}
\setlength{\textheight}{232mm} % 297mm - margin - 15mm
\setlength{\marginparwidth}{3mm}
\setlength{\marginparsep}{15mm}
\setlength{\footnotesep}{2mm}
\setlength{\footskip}{15mm}

%年度
\def\@year{}
\def\year#1{\gdef\@year{#1}}
%和文タイトル
\def\jetitle{}
\def\jtitle#1{\gdef\@title{#1}}
%英文タイトル
\def\@etitle{}
\def\etitle#1{\gdef\@etitle{#1}}
%論文
\def\@thesis{}
\def\thesis#1{\gdef\@thesis{#1}}
%ロゴ
\def\@logo{}
\def\logo#1{\gdef\@logo{#1}}
%所属
%\def\@belongto{}
%\def\belongto#1{\gdef\@belongto{#1}}
\def\@affiliation{}
\def\affiliation#1{\gdef\@affiliation{#1}}
\let\belongto\affiliation


%%%%表紙
\renewcommand{\maketitle}{%
\newpage\null
\thispagestyle{empty}
\vskip 1cm%
\begin{center}%
\let\footnote\thanks
  {\huge\bfseries\mc\@title \par}%
    \vskip 3.0em%
  {\huge\textbf{\@etitle}\par}%
    \vskip 1.5em%
  {\LARGE \@year \ \@thesis \par}%
    \vskip 13em%
  { \@logo \par}%
    \vskip 1.5em%
  {\LARGE \@affiliation \par}%
    \vskip 1.5em%
  {\LARGE \@author \par}%
\end{center}}


%%%% Abstract
\renewenvironment{abstract}{%
      \titlepage
      \thispagestyle{empty}
      \null\vfil
      \@beginparpenalty\@lowpenalty
      {\Huge \bfseries \abstractname}%
      \begin{center}\@endparpenalty\@M\end{center}
}%

%%%%目次
\renewcommand{\tableofcontents}{%
  \pagestyle{plain}
  \if@twocolumn\@restonecoltrue\onecolumn
  \else\@restonecolfalse\fi
  \chapter*{\contentsname
    \@mkboth{\contentsname}{\contentsname}%
  }  \pagenumbering{arabic}\@starttoc{toc}%
  \if@restonecol\twocolumn\fi
}

%%%%付録
\renewcommand{\appendix}{\par
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \renewcommand{\@chapapp}{\appendixname}%
  \renewcommand{\@chappos}\space%
  \renewcommand{\thechapter}{\@Alph\c@chapter}
  \renewcommand{\thesection}{\thechapter-\arabic{section}}}


%%%%章
\renewcommand{\chapter}{%
%  \pagestyle{plain}
%  \pagestyle{m@tterheadings}
  \pagestyle{anotherheadings}
  \if@openright\cleardoublepage\else\clearpage\fi
%  \thispagestyle{jpl@in}%
  \thispagestyle{anotherplain}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \refstepcounter{chapter}%
    \typeout{\@chapapp\space\thechapter\space\@chappos (\thepage ページ)}%
    \addcontentsline{toc}{chapter}%
      {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \@makechapterhead{#2}\@afterheading}
\def\@makechapterhead#1{\hbox{}%
  \vskip2\Cvs
  {\parindent\z@
   \raggedright
%
   \reset@font\huge\bfseries
   \ifnum \c@secnumdepth >\m@ne
     \setlength\@tempdima{\linewidth}%
     \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1zw}%
     \addtolength\@tempdima{-\wd\z@}%
     \unhbox\z@\nobreak
     \vtop{\hsize\@tempdima#1}%
   \else
     #1\relax
   \fi}\nobreak\vskip3\Cvs}


\renewcommand{\prepartname}{\relax}
%\renewcommand{\prepartname}{第}
\renewcommand{\postpartname}{部}
\renewcommand{\prechaptername}{第}
\renewcommand{\postchaptername}{章}
\renewcommand{\contentsname}{目 次}
\renewcommand{\listfigurename}{図 目 次}
\renewcommand{\listtablename}{表 目 次}
\renewcommand{\bibname}{参考文献}
\renewcommand{\indexname}{索 引}
\renewcommand{\figurename}{図}
\renewcommand{\tablename}{表}
\renewcommand{\appendixname}{付 録}
\renewcommand{\abstractname}{要 旨}


%%%% new environment for me(ryuji)
%定義のための環境
\newcounter{defnum}[chapter]
\newcommand{\predef}{定義}
\newcommand{\postdef}{\relax}
\newenvironment{definition}{\vskip5mm%
  \center\begin{minipage}{.8\textwidth}
  \addtocounter{defnum}{1}
  \begin{description}\item[\textbf{\predef\thechapter.\thedefnum\postdef}] }
  {\end{description}\end{minipage}\newline\vskip5mm}

\newcommand{\preex}{例題}
\newcommand{\postex}{\relax}
\newenvironment{example}{\vskip5mm%
  \center\begin{minipage}{.9\textwidth}
  \begin{description}\item[\textbf{[\preex\postex]\hskip1zw}]}
  {\end{description}\end{minipage}\newline\vskip5mm}


%%%% new environment for youta
\newcounter{linenumber}
\newenvironment{listing}{%
 \begin{list}{%
  \footnotesize\arabic{linenumber}}{%
   \usecounter{linenumber}%
   \setlength{\baselineskip}{11pt plus 3pt minus 3pt}%
   \setlength{\itemsep}{0pt plus 2pt minus 2pt}%
   \setlength{\parsep}{10pt plus 5pt minus 5pt}%
   \addtolength{\labelsep}{1ex}}%
   \newcommand{\q}{\hspace*{1em}}%
   \newcommand{\And}{\textbf{and}}%
   \newcommand{\Begin}{\textbf{begin}}%
   \newcommand{\Break}{\textbf{break}}%
   \newcommand{\Case}{\textbf{case}}%
   \newcommand{\Continue}{\textbf{continue}}%
   \newcommand{\Do}{\textbf{do}}%
   \newcommand{\Else}{\textbf{else}}%
   \newcommand{\End}{\textbf{end}}%
   \newcommand{\Exit}{\textbf{exit}}%
   \newcommand{\For}{\textbf{for}}%
   \newcommand{\Function}{\textbf{function}}%
   \newcommand{\Goto}{\textbf{goto}}%
   \newcommand{\If}{\textbf{if}}%
   \newcommand{\Not}{\textbf{not}}%
   \newcommand{\Or}{\textbf{or}}%
   \newcommand{\Procedure}{\textbf{procedure}}%
   \newcommand{\Repeat}{\textbf{repeat}}%
   \newcommand{\Set}{\textbf{set}}%
   \newcommand{\Then}{\textbf{then}}%
   \newcommand{\To}{\textbf{to}}%
   \newcommand{\Until}{\textbf{until}}%
   \newcommand{\Var}{\textbf{var}}%
   \newcommand{\While}{\textbf{while}}}%
 {\end{list}}


%%%% Source Listing Environment
% Usage : \sourcelist{filename}{Title}
% it needs eclbkbox.sty, add \usepackage{eclbkbox.sty} to preamble
% ソースコードを張り付けるための環境
\newcounter{lineno}
\newcommand{\verbatimfile}[1]{%
 \setcounter{lineno}{0}%
 \begingroup%
  \@verbatim \frenchspacing \@vobeyspaces \parindent=42pt %
  \everypar{\stepcounter{lineno}\llap{\thelineno\hskip5mm}}\input{#1}%
 \endgroup%
}
%% Subset of above Environment
\newcounter{lstnum}[chapter]
\newcommand{\sourcelist}[2]{%
 \addtocounter{lstnum}{1}%
 \vskip5mm %
 \begin{breakbox}%
 \begin{center}\textbf{リスト\thechapter.\thelstnum\relax:} #2\end{center}%
 \vspace{-5mm} %
 \begin{scriptsize}%
 \verbatiminput{#1}
 \end{scriptsize}%
 \vspace{5mm} %
 \end{breakbox}}


%%%% Circled Number
% 円囲み数字
%\newcommand{\maru}[1]{\ooalign{\hfil\hbox{$\bigcirc$}\hfil\crcr\hfil\hbox{#1}\hfil}}
\newcommand{\maru}[1]{{\ooalign{\hfil\raise.167ex\hbox{$\bigcirc$}\hfil%
  \crcr\hfil\hbox{#1}\hfil}}}


%%%% Captions for figure and table
% figure 環境内でも表キャプションが使える
\newcommand{\figcaption}{\def\@captype{figure}\caption}
% もちろん table 環境で図キャプションもおk
\newcommand{\tblcaption}{\def\@captype{table}\caption}


%%%% customized by me(ryuji)
%footnoteの表示部
\def\@makefnmark{\hbox{\@textsuperscript{\normalfont%
  (注\kern0.1em \@thefnmark)}}}

%%%%%% added by ryuji %%%%%%%%%%
% ヘディング
% c.f. 奥村晴彦,''LaTeX2e 美文書作成入門,'' 技術評論社, pp207--231, 1997.

%ヘッダ、フッタに追加するもの
\def\@lefthead{}
\def\marklefthead#1{\gdef\@lefthead{\small #1}}
\def\@leftfoot{}
\def\markleftfoot#1{\gdef\@leftfoot{\small #1}}


%\def\ps@headings{%
\def\ps@m@tterheadings{%
  \let\@mkboth\@gobbletwo
  \let\ps@jpl@in\ps@headnombre
  \let\@oddfoot\@empty\let\@evenfoot\@empty
%  \def\@evenhead{\thepage\hfil\leftmark}%
  \def\@oddhead{\hss\addtolength{\textwidth}{-4.5zw}
%      \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}%
      \underline{\hbox to \textwidth{\vfil\@lefthead\hfil\textbf{\leftmark}}%
      \hfil\hskip4zw\thepage}}%

  \def\chaptermark##1{\markboth{%
     \ifnum \c@secnumdepth >\m@ne
       \@chapapp\thechapter\@chappos\hskip1zw
     \fi
     ##1}{}}%
  \def\sectionmark##1{\markright{%
     \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi
     ##1}}%
  }


%もう一個のバージョン:headings(本命)
\def\ps@anotherheadings{%
  \let\@mkboth\@gobbletwo
  \let\ps@jpl@in\ps@headnombre
  \def\@oddfoot{\reset@font%
    \textbf{\footnotesize \@leftfoot}\hfil\thepage}%
  \let\@evenfoot\@empty
  \def\@oddhead{\hss
%      \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}%
      \underline{\hbox to \textwidth{\@lefthead\hfil\textbf{\leftmark}}%
      \hfil}}%

  \def\chaptermark##1{\markboth{%
     \ifnum \c@secnumdepth >\m@ne
       \@chapapp\thechapter\@chappos\hskip1zw
     \fi
     ##1}{}}%
  \def\sectionmark##1{\markright{%
     \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi
     ##1}}%
  }
%もう一個のバージョン:plain(本命)
\def\ps@anotherplain{%
  \let\@mkboth\@gobbletwo
  \let\ps@jpl@in\ps@headnombre
  \def\@oddfoot{\reset@font%
    \textbf{\footnotesize \@leftfoot}\hfil\thepage}%
  \let\@evenfoot\@empty
  \let\@oddhead\@empty
  \def\chaptermark##1{\markboth{%
     \ifnum \c@secnumdepth >\m@ne
       \@chapapp\thechapter\@chappos\hskip1zw
     \fi
     ##1}{}}%
  \def\sectionmark##1{\markright{%
     \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi
     ##1}}%
  }

%スタイルセットのため
\renewenvironment{thebibliography}[1]
{\chapter*{\bibname\@mkboth{\bibname}{\bibname}}%
   \markboth{\bibname}{\bibname}
   \addcontentsline{toc}{chapter}{参考文献}
   \list{\@biblabel{\@arabic\c@enumiv}}%
        {\settowidth\labelwidth{\@biblabel{#1}}%
         \leftmargin\labelwidth
         \advance\leftmargin\labelsep
         \@openbib@code
         \usecounter{enumiv}%
         \let\p@enumiv\@empty
         \renewcommand\theenumiv{\@arabic\c@enumiv}}%
   \sloppy
   \clubpenalty4000
   \@clubpenalty\clubpenalty
   \widowpenalty4000%
   \sfcode`\.\@m}
  {\def\@noitemerr
    {\@latex@warning{Empty `thebibliography' environment}}%
   \endlist}


%索引のため
\renewenvironment{theindex}{%
  \clearpage
  \columnseprule.4pt \columnsep 2zw
  \markboth{\indexname}{\indexname}
  \addcontentsline{toc}{chapter}{\indexname}
  \begin{multicols}{3}[{\chapter*{\indexname}}]
    \@mkboth{\indexname}{\indexname}
    \thispagestyle{anotherplain}%
    \parindent=0pt
    \parskip=0pt plus .3pt \relax
    \let\item=\@idxitem
    \raggedright
    \footnotesize\narrowbaselines
  }{\end{multicols}}
\def\indexname{索引}
\def\narrowbaselines{\fontsize\@xpt\@xiipt\selectfont}
\def\@idxitem{\par \hangindent4zw}
\def\subitem{\par \hangindent4zw \hspace*{2zw}}
\def\subsubitem{\par \hangindent4zw \hspace*{3zw}}

%禁則処理の追加
  %事前でのブレークを禁止(禁止>=10000)
\prebreakpenalty\jis`,=10000 % ,
\prebreakpenalty\jis`.=10000 % .
%\prebreakpenalty\jis"2124=10000 % ,
%\prebreakpenalty\jis"2125=10000 % .
%\prebreakpenalty\jis`、=10000 % 、
%\prebreakpenalty\jis`。=10000 % 。
%%\prebreakpenalty\jis"2124=10000 % 、
%%\prebreakpenalty\jis"2125=10000 % 。