Mercurial > hg > Papers > 2015 > yuhi-master
diff paper/master_paper.sty @ 0:aae08d907517
first commit
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 26 Dec 2014 07:09:22 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/master_paper.sty Fri Dec 26 07:09:22 2014 +0900 @@ -0,0 +1,387 @@ +% +% 修士卒業論文スタイルファイル 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年度} +%\affiliation{琉球大学大学院理工学研究科\\ 情報工学専攻} +%\author{名字 名前} +% +%\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{****************************************************************} + +%長さ設定 +\hoffset -1in \addtolength{\hoffset}{20mm} +\voffset -1in \addtolength{\voffset}{10mm} +\oddsidemargin 10mm +\topmargin 0mm +\headheight 10mm +\headsep 15mm +\textheight 39\baselineskip \addtolength{\textheight}{\topskip} +\textwidth 160mm +\marginparsep 3mm +\marginparwidth 15mm +\footskip \headsep + + +%年度 +\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\@belongto{} +%\def\belongto#1{\gdef\@belongto{#1}} +\def\@affiliation{} +\def\affiliation#1{\gdef\@affiliation{#1}} +\let\belongto\affiliation + +\def\thesis{学位論文(修士)} + +%表紙 +%\renewcommand{\maketitle}{% +%\newpage\null +%\thispagestyle{empty} +%\vskip 1cm% +%\begin{center}% +%\let\footnote\thanks +% {\huge \@title \par}% +% \vskip 1.5em% +% {\huge \@etitle \par}% +% \vskip 2.5em% +% {\LARGE \@year \ \thesis \par}% +% \vskip 10em% +%% {\huge \@belongto \par}% +% {\LARGE \@affiliation \par}% +% \vskip 1.5em% +% {\LARGE \@author \par}% +%\end{center}% +%%\par\vskip 1.5em +%} +\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% + {\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} +}% + +\newenvironment{abstract_eng}{% + \titlepage + \thispagestyle{empty} + \null\vfil + \@beginparpenalty\@lowpenalty + {\Huge \bfseries \abstractengname}% + \begin{center}% + \@endparpenalty\@M + \end{center} +}% + +%目次 +\renewcommand{\tableofcontents}{% + \pagestyle{plain} + \if@twocolumn\@restonecoltrue\onecolumn + \else\@restonecolfalse\fi + \chapter*{\contentsname + \@mkboth{\contentsname}{\contentsname}% + } \pagenumbering{roman}\@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{\prechaptername}{第} +\renewcommand{\postchaptername}{章} +\renewcommand{\contentsname}{目 次} +\renewcommand{\listfigurename}{図 目 次} +\renewcommand{\listtablename}{表 目 次} +\renewcommand{\bibname}{参考文献} +\renewcommand{\indexname}{索 引} +\renewcommand{\figurename}{図} +\renewcommand{\tablename}{表} +\renewcommand{\appendixname}{付 録} +\renewcommand{\abstractname}{要 旨} +\newcommand{\abstractengname}{Abstract} + + +%%%% 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} + +%%%% 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\bf\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\bf\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 % 。