Mercurial > hg > Papers > 2012 > nobu-thesis
comparison paper/thesis.sty @ 0:b939c5aae834 draft
add paper
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 07 Feb 2012 19:09:28 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b939c5aae834 |
---|---|
1 % | |
2 % 修士卒業論文スタイルファイル master_papar.sty(ver. 2.1e) | |
3 % Time-stamp: <01/03/01 22:01:27 ryuji> | |
4 % | |
5 % ver 2.1e 2/3/01 ryuji | |
6 % ver 2.0e 17/12/00 ryuji | |
7 % ver 1.0e 05/11/99 hiroki | |
8 % | |
9 % modifier: Ryuji Gushiken(ryuji@ads.ie.u-ryukyu.ac.jp) | |
10 % | |
11 % author: Hiroki Taira(hiroki@ads.ie.u-ryukyu.ac.jp) | |
12 | |
13 % usage: | |
14 % | |
15 %\documentclass[a4j]{jreport} | |
16 % | |
17 %\usepackage{master_paper} | |
18 % | |
19 % | |
20 %\jtitle{修士論文スタイルファイル\\自律分散研バージョン} | |
21 %\etitle{\LaTeX style test file for master paper} | |
22 %\year{平成11年度} | |
23 %\affiliation{琉球大学大学院理工学研究科\\ 情報工学専攻} | |
24 %\author{名字 名前} | |
25 % | |
26 %\begin{document} | |
27 % | |
28 %\maketitle | |
29 % | |
30 %%要旨 | |
31 %\input{abstract.tex} | |
32 % | |
33 %%目次 | |
34 %\tableofcontents | |
35 % | |
36 %%図目次 | |
37 %\listoffigures | |
38 % | |
39 %%表目次 | |
40 %\listoftables | |
41 % | |
42 %%第一章 | |
43 %\input{chapter1.tex} | |
44 %%chapter1.texの\chapter{}の後ろに次のコマンドを追加してください。 | |
45 %%ページカウントがリセットされ、ページ数がアラビア文字になります。 | |
46 %% \pagenumbering{arabic} | |
47 %%第二章 | |
48 %\input{chapter2.tex} | |
49 %%第三章 | |
50 %\input{chapter3.tex} | |
51 % | |
52 %%付録 | |
53 %\input{appendix.tex} | |
54 % | |
55 %%謝辞 | |
56 %%\input{thanx.tex} | |
57 % | |
58 %%参考文献 | |
59 %\input{biblography.tex} | |
60 % | |
61 %\end{document} | |
62 | |
63 \typeout{****************************************************************} | |
64 \typeout{** 平成15年度 琉球大学大学院 学位論文(修士) ********************} | |
65 \typeout{** スタイルファイル(LaTeX2e) : 非公式 ********************} | |
66 \typeout{****************************************************************} | |
67 | |
68 %長さ設定 | |
69 \hoffset -1in \addtolength{\hoffset}{20mm} | |
70 \voffset -1in \addtolength{\voffset}{10mm} | |
71 \oddsidemargin 10mm | |
72 \topmargin 0mm | |
73 \headheight 10mm | |
74 \headsep 15mm | |
75 \textheight 39\baselineskip \addtolength{\textheight}{\topskip} | |
76 \textwidth 160mm | |
77 \marginparsep 3mm | |
78 \marginparwidth 15mm | |
79 \footskip \headsep | |
80 | |
81 | |
82 %年度 | |
83 \def\@year{} | |
84 \def\year#1{\gdef\@year{#1}} | |
85 %和文タイトル | |
86 \def\jetitle{} | |
87 \def\jtitle#1{\gdef\@title{#1}} | |
88 %英文タイトル | |
89 \def\@etitle{} | |
90 \def\etitle#1{\gdef\@etitle{#1}} | |
91 %所属 | |
92 %\def\@belongto{} | |
93 %\def\belongto#1{\gdef\@belongto{#1}} | |
94 \def\@affiliation{} | |
95 \def\affiliation#1{\gdef\@affiliation{#1}} | |
96 \let\belongto\affiliation | |
97 | |
98 \def\thesis{卒業論文} | |
99 | |
100 %表紙 | |
101 %\renewcommand{\maketitle}{% | |
102 %\newpage\null | |
103 %\thispagestyle{empty} | |
104 %\vskip 1cm% | |
105 %\begin{center}% | |
106 %\let\footnote\thanks | |
107 % {\huge \@title \par}% | |
108 % \vskip 1.5em% | |
109 % {\huge \@etitle \par}% | |
110 % \vskip 2.5em% | |
111 % {\LARGE \@year \ \thesis \par}% | |
112 % \vskip 10em% | |
113 %% {\huge \@belongto \par}% | |
114 % {\LARGE \@affiliation \par}% | |
115 % \vskip 1.5em% | |
116 % {\LARGE \@author \par}% | |
117 %\end{center}% | |
118 %%\par\vskip 1.5em | |
119 %} | |
120 \renewcommand{\maketitle}{% | |
121 \newpage\null | |
122 \thispagestyle{empty} | |
123 \vskip 1cm% | |
124 \begin{center}% | |
125 \let\footnote\thanks | |
126 {\huge\bfseries\mc\@title \par}% | |
127 \vskip 3.0em% | |
128 {\huge\textbf{\@etitle}\par}% | |
129 \vskip 1.5em% | |
130 {\LARGE \@year \ \thesis \par}% | |
131 \vskip 13em% | |
132 {\LARGE \@affiliation \par}% | |
133 \vskip 1.5em% | |
134 {\LARGE \@author \par}% | |
135 \end{center}} | |
136 | |
137 | |
138 %abstract | |
139 \renewenvironment{abstract}{% | |
140 \titlepage | |
141 \thispagestyle{empty} | |
142 \null\vfil | |
143 \@beginparpenalty\@lowpenalty | |
144 {\Huge \bfseries \abstractname}% | |
145 \begin{center}% | |
146 \@endparpenalty\@M | |
147 \end{center} | |
148 }% | |
149 | |
150 %目次 | |
151 \renewcommand{\tableofcontents}{% | |
152 \pagestyle{plain} | |
153 \if@twocolumn\@restonecoltrue\onecolumn | |
154 \else\@restonecolfalse\fi | |
155 \chapter*{\contentsname | |
156 \@mkboth{\contentsname}{\contentsname}% | |
157 } \pagenumbering{roman}\@starttoc{toc}% | |
158 \if@restonecol\twocolumn\fi | |
159 } | |
160 | |
161 %付録 | |
162 \renewcommand{\appendix}{\par | |
163 \setcounter{chapter}{0}% | |
164 \setcounter{section}{0}% | |
165 \renewcommand{\@chapapp}{\appendixname}% | |
166 \renewcommand{\@chappos}\space% | |
167 \renewcommand{\thechapter}{\@Alph\c@chapter} | |
168 \renewcommand{\thesection}{\thechapter-\arabic{section}}} | |
169 | |
170 | |
171 %章 | |
172 \renewcommand{\chapter}{% | |
173 % \pagestyle{plain} | |
174 % \pagestyle{m@tterheadings} | |
175 \pagestyle{anotherheadings} | |
176 \if@openright\cleardoublepage\else\clearpage\fi | |
177 % \thispagestyle{jpl@in}% | |
178 \thispagestyle{anotherplain}% | |
179 \global\@topnum\z@ | |
180 \@afterindentfalse | |
181 \secdef\@chapter\@schapter} | |
182 \def\@chapter[#1]#2{% | |
183 \ifnum \c@secnumdepth >\m@ne | |
184 \refstepcounter{chapter}% | |
185 \typeout{\@chapapp\space\thechapter\space\@chappos (\thepage ページ)}% | |
186 \addcontentsline{toc}{chapter}% | |
187 {\protect\numberline{\@chapapp\thechapter\@chappos}#1}% | |
188 \else | |
189 \addcontentsline{toc}{chapter}{#1}% | |
190 \fi | |
191 \chaptermark{#1}% | |
192 \addtocontents{lof}{\protect\addvspace{10\p@}}% | |
193 \addtocontents{lot}{\protect\addvspace{10\p@}}% | |
194 \@makechapterhead{#2}\@afterheading} | |
195 \def\@makechapterhead#1{\hbox{}% | |
196 \vskip2\Cvs | |
197 {\parindent\z@ | |
198 \raggedright | |
199 % | |
200 \reset@font\huge\bfseries | |
201 \ifnum \c@secnumdepth >\m@ne | |
202 \setlength\@tempdima{\linewidth}% | |
203 \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1zw}% | |
204 \addtolength\@tempdima{-\wd\z@}% | |
205 \unhbox\z@\nobreak | |
206 \vtop{\hsize\@tempdima#1}% | |
207 \else | |
208 #1\relax | |
209 \fi}\nobreak\vskip3\Cvs} | |
210 | |
211 | |
212 \renewcommand{\prepartname}{\relax} %\renewcommand{\prepartname}{第} | |
213 \renewcommand{\postpartname}{部} | |
214 \renewcommand{\prechaptername}{第}%\renewcommand{\prechaptername}{第} | |
215 \renewcommand{\postchaptername}{章} | |
216 \renewcommand{\contentsname}{目 次} | |
217 \renewcommand{\listfigurename}{図 目 次} | |
218 \renewcommand{\listtablename}{表 目 次} | |
219 \renewcommand{\bibname}{参考文献} | |
220 \renewcommand{\indexname}{索 引} | |
221 \renewcommand{\figurename}{図} | |
222 \renewcommand{\tablename}{表} | |
223 \renewcommand{\appendixname}{付 録} | |
224 \renewcommand{\abstractname}{要 旨} | |
225 | |
226 | |
227 %%%% new environment for me(ryuji) | |
228 %定義のための環境 | |
229 \newcounter{defnum}[chapter] | |
230 \newcommand{\predef}{定義} | |
231 \newcommand{\postdef}{\relax} | |
232 \newenvironment{definition}{\vskip5mm% | |
233 \center\begin{minipage}{.8\textwidth} | |
234 \addtocounter{defnum}{1} | |
235 \begin{description}\item[\textbf{\predef\thechapter.\thedefnum\postdef}] } | |
236 {\end{description}\end{minipage}\newline\vskip5mm} | |
237 | |
238 \newcommand{\preex}{例題} | |
239 \newcommand{\postex}{\relax} | |
240 \newenvironment{example}{\vskip5mm% | |
241 \center\begin{minipage}{.9\textwidth} | |
242 \begin{description}\item[\textbf{[\preex\postex]\hskip1zw}] } | |
243 {\end{description}\end{minipage}\newline\vskip5mm} | |
244 | |
245 %%%% customized by me(ryuji) | |
246 %footnoteの表示部 | |
247 \def\@makefnmark{\hbox{\@textsuperscript{\normalfont | |
248 注\kern0.1em \@thefnmark}}} | |
249 | |
250 %%%%%% added by ryuji %%%%%%%%%% | |
251 % ヘディング | |
252 % c.f. 奥村晴彦,''LaTeX2e 美文書作成入門,'' 技術評論社, pp207--231, 1997. | |
253 | |
254 %ヘッダ、フッタに追加するもの | |
255 \def\@lefthead{} | |
256 \def\marklefthead#1{\gdef\@lefthead{\small #1}} | |
257 \def\@leftfoot{} | |
258 \def\markleftfoot#1{\gdef\@leftfoot{\small #1}} | |
259 | |
260 | |
261 %\def\ps@headings{% | |
262 \def\ps@m@tterheadings{% | |
263 \let\@mkboth\@gobbletwo | |
264 \let\ps@jpl@in\ps@headnombre | |
265 \let\@oddfoot\@empty\let\@evenfoot\@empty | |
266 % \def\@evenhead{\thepage\hfil\leftmark}% | |
267 \def\@oddhead{\hss\addtolength{\textwidth}{-4.5zw} | |
268 % \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}% | |
269 \underline{\hbox to \textwidth{\vfil\@lefthead\hfil\textbf{\leftmark}}% | |
270 \hfil\hskip4zw\thepage}}% | |
271 | |
272 \def\chaptermark##1{\markboth{% | |
273 \ifnum \c@secnumdepth >\m@ne | |
274 \@chapapp\thechapter\@chappos\hskip1zw | |
275 \fi | |
276 ##1}{}}% | |
277 \def\sectionmark##1{\markright{% | |
278 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
279 ##1}}% | |
280 } | |
281 | |
282 | |
283 %もう一個のバージョン:headings(本命) | |
284 \def\ps@anotherheadings{% | |
285 \let\@mkboth\@gobbletwo | |
286 \let\ps@jpl@in\ps@headnombre | |
287 \def\@oddfoot{\reset@font% | |
288 \textbf{\footnotesize \@leftfoot}\hfil\bf\thepage}% | |
289 \let\@evenfoot\@empty | |
290 \def\@oddhead{\hss | |
291 % \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}% | |
292 \underline{\hbox to \textwidth{\@lefthead\hfil\textbf{\leftmark}}% | |
293 \hfil}}% | |
294 | |
295 \def\chaptermark##1{\markboth{% | |
296 \ifnum \c@secnumdepth >\m@ne | |
297 \@chapapp\thechapter\@chappos\hskip1zw | |
298 \fi | |
299 ##1}{}}% | |
300 \def\sectionmark##1{\markright{% | |
301 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
302 ##1}}% | |
303 } | |
304 %もう一個のバージョン:plain(本命) | |
305 \def\ps@anotherplain{% | |
306 \let\@mkboth\@gobbletwo | |
307 \let\ps@jpl@in\ps@headnombre | |
308 \def\@oddfoot{\reset@font% | |
309 \textbf{\footnotesize \@leftfoot}\hfil\bf\thepage}% | |
310 \let\@evenfoot\@empty | |
311 \let\@oddhead\@empty | |
312 \def\chaptermark##1{\markboth{% | |
313 \ifnum \c@secnumdepth >\m@ne | |
314 \@chapapp\thechapter\@chappos\hskip1zw | |
315 \fi | |
316 ##1}{}}% | |
317 \def\sectionmark##1{\markright{% | |
318 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
319 ##1}}% | |
320 } | |
321 | |
322 %スタイルセットのため | |
323 \renewenvironment{thebibliography}[1] | |
324 {\chapter*{\bibname\@mkboth{\bibname}{\bibname}}% | |
325 \markboth{\bibname}{\bibname} | |
326 \addcontentsline{toc}{chapter}{参考文献} | |
327 \list{\@biblabel{\@arabic\c@enumiv}}% | |
328 {\settowidth\labelwidth{\@biblabel{#1}}% | |
329 \leftmargin\labelwidth | |
330 \advance\leftmargin\labelsep | |
331 \@openbib@code | |
332 \usecounter{enumiv}% | |
333 \let\p@enumiv\@empty | |
334 \renewcommand\theenumiv{\@arabic\c@enumiv}}% | |
335 \sloppy | |
336 \clubpenalty4000 | |
337 \@clubpenalty\clubpenalty | |
338 \widowpenalty4000% | |
339 \sfcode`\.\@m} | |
340 {\def\@noitemerr | |
341 {\@latex@warning{Empty `thebibliography' environment}}% | |
342 \endlist} | |
343 | |
344 | |
345 %索引のため | |
346 \renewenvironment{theindex}{% | |
347 \clearpage | |
348 \columnseprule.4pt \columnsep 2zw | |
349 \markboth{\indexname}{\indexname} | |
350 \addcontentsline{toc}{chapter}{\indexname} | |
351 \begin{multicols}{3}[{\chapter*{\indexname}}] | |
352 \@mkboth{\indexname}{\indexname} | |
353 \thispagestyle{anotherplain}% | |
354 \parindent=0pt | |
355 \parskip=0pt plus .3pt \relax | |
356 \let\item=\@idxitem | |
357 \raggedright | |
358 \footnotesize\narrowbaselines | |
359 }{\end{multicols}} | |
360 \def\indexname{索引} | |
361 \def\narrowbaselines{\fontsize\@xpt\@xiipt\selectfont} | |
362 \def\@idxitem{\par \hangindent4zw} | |
363 \def\subitem{\par \hangindent4zw \hspace*{2zw}} | |
364 \def\subsubitem{\par \hangindent4zw \hspace*{3zw}} | |
365 | |
366 %禁則処理の追加 | |
367 %事前でのブレークを禁止(禁止>=10000) | |
368 \prebreakpenalty\jis`,=10000 % , | |
369 \prebreakpenalty\jis`.=10000 % . | |
370 %\prebreakpenalty\jis"2124=10000 % , | |
371 %\prebreakpenalty\jis"2125=10000 % . | |
372 %\prebreakpenalty\jis`、=10000 % 、 | |
373 %\prebreakpenalty\jis`。=10000 % 。 | |
374 %%\prebreakpenalty\jis"2124=10000 % 、 | |
375 %%\prebreakpenalty\jis"2125=10000 % 。 |