Mercurial > hg > Papers > 2014 > nobuyasu-master
comparison paper/master_paper.sty @ 0:90adb016389d
First commit
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Jan 2014 04:40:03 +0900 |
parents | |
children | 6546ef0f953c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:90adb016389d |
---|---|
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 \newenvironment{abstract_eng}{% | |
151 \titlepage | |
152 \thispagestyle{empty} | |
153 \null\vfil | |
154 \@beginparpenalty\@lowpenalty | |
155 {\Huge \bfseries \abstractengname}% | |
156 \begin{center}% | |
157 \@endparpenalty\@M | |
158 \end{center} | |
159 }% | |
160 | |
161 | |
162 %目次 | |
163 \renewcommand{\tableofcontents}{% | |
164 \pagestyle{plain} | |
165 \if@twocolumn\@restonecoltrue\onecolumn | |
166 \else\@restonecolfalse\fi | |
167 \chapter*{\contentsname | |
168 \@mkboth{\contentsname}{\contentsname}% | |
169 } \pagenumbering{roman}\@starttoc{toc}% | |
170 \if@restonecol\twocolumn\fi | |
171 } | |
172 | |
173 %付録 | |
174 \renewcommand{\appendix}{\par | |
175 \setcounter{chapter}{0}% | |
176 \setcounter{section}{0}% | |
177 \renewcommand{\@chapapp}{\appendixname}% | |
178 \renewcommand{\@chappos}\space% | |
179 \renewcommand{\thechapter}{\@Alph\c@chapter} | |
180 \renewcommand{\thesection}{\thechapter-\arabic{section}}} | |
181 | |
182 | |
183 %章 | |
184 \renewcommand{\chapter}{% | |
185 % \pagestyle{plain} | |
186 % \pagestyle{m@tterheadings} | |
187 \pagestyle{anotherheadings} | |
188 \if@openright\cleardoublepage\else\clearpage\fi | |
189 % \thispagestyle{jpl@in}% | |
190 \thispagestyle{anotherplain}% | |
191 \global\@topnum\z@ | |
192 \@afterindentfalse | |
193 \secdef\@chapter\@schapter} | |
194 \def\@chapter[#1]#2{% | |
195 \ifnum \c@secnumdepth >\m@ne | |
196 \refstepcounter{chapter}% | |
197 \typeout{\@chapapp\space\thechapter\space\@chappos (\thepage ページ)}% | |
198 \addcontentsline{toc}{chapter}% | |
199 {\protect\numberline{\@chapapp\thechapter\@chappos}#1}% | |
200 \else | |
201 \addcontentsline{toc}{chapter}{#1}% | |
202 \fi | |
203 \chaptermark{#1}% | |
204 \addtocontents{lof}{\protect\addvspace{10\p@}}% | |
205 \addtocontents{lot}{\protect\addvspace{10\p@}}% | |
206 \@makechapterhead{#2}\@afterheading} | |
207 \def\@makechapterhead#1{\hbox{}% | |
208 \vskip2\Cvs | |
209 {\parindent\z@ | |
210 \raggedright | |
211 % | |
212 \reset@font\huge\bfseries | |
213 \ifnum \c@secnumdepth >\m@ne | |
214 \setlength\@tempdima{\linewidth}% | |
215 \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1zw}% | |
216 \addtolength\@tempdima{-\wd\z@}% | |
217 \unhbox\z@\nobreak | |
218 \vtop{\hsize\@tempdima#1}% | |
219 \else | |
220 #1\relax | |
221 \fi}\nobreak\vskip3\Cvs} | |
222 | |
223 | |
224 \renewcommand{\prepartname}{\relax} %\renewcommand{\prepartname}{第} | |
225 \renewcommand{\postpartname}{部} | |
226 \renewcommand{\prechaptername}{第}%\renewcommand{\prechaptername}{第} | |
227 \renewcommand{\postchaptername}{章} | |
228 \renewcommand{\contentsname}{目 次} | |
229 \renewcommand{\listfigurename}{図 目 次} | |
230 \renewcommand{\listtablename}{表 目 次} | |
231 \renewcommand{\bibname}{参考文献} | |
232 \renewcommand{\indexname}{索 引} | |
233 \renewcommand{\figurename}{図} | |
234 \renewcommand{\tablename}{表} | |
235 \renewcommand{\appendixname}{付 録} | |
236 \renewcommand{\abstractname}{要 旨} | |
237 | |
238 | |
239 %%%% new environment for me(ryuji) | |
240 %定義のための環境 | |
241 \newcounter{defnum}[chapter] | |
242 \newcommand{\predef}{定義} | |
243 \newcommand{\postdef}{\relax} | |
244 \newenvironment{definition}{\vskip5mm% | |
245 \center\begin{minipage}{.8\textwidth} | |
246 \addtocounter{defnum}{1} | |
247 \begin{description}\item[\textbf{\predef\thechapter.\thedefnum\postdef}] } | |
248 {\end{description}\end{minipage}\newline\vskip5mm} | |
249 | |
250 \newcommand{\preex}{例題} | |
251 \newcommand{\postex}{\relax} | |
252 \newenvironment{example}{\vskip5mm% | |
253 \center\begin{minipage}{.9\textwidth} | |
254 \begin{description}\item[\textbf{[\preex\postex]\hskip1zw}] } | |
255 {\end{description}\end{minipage}\newline\vskip5mm} | |
256 | |
257 %%%% customized by me(ryuji) | |
258 %footnoteの表示部 | |
259 \def\@makefnmark{\hbox{\@textsuperscript{\normalfont | |
260 注\kern0.1em \@thefnmark}}} | |
261 | |
262 %%%%%% added by ryuji %%%%%%%%%% | |
263 % ヘディング | |
264 % c.f. 奥村晴彦,''LaTeX2e 美文書作成入門,'' 技術評論社, pp207--231, 1997. | |
265 | |
266 %ヘッダ、フッタに追加するもの | |
267 \def\@lefthead{} | |
268 \def\marklefthead#1{\gdef\@lefthead{\small #1}} | |
269 \def\@leftfoot{} | |
270 \def\markleftfoot#1{\gdef\@leftfoot{\small #1}} | |
271 | |
272 | |
273 %\def\ps@headings{% | |
274 \def\ps@m@tterheadings{% | |
275 \let\@mkboth\@gobbletwo | |
276 \let\ps@jpl@in\ps@headnombre | |
277 \let\@oddfoot\@empty\let\@evenfoot\@empty | |
278 % \def\@evenhead{\thepage\hfil\leftmark}% | |
279 \def\@oddhead{\hss\addtolength{\textwidth}{-4.5zw} | |
280 % \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}% | |
281 \underline{\hbox to \textwidth{\vfil\@lefthead\hfil\textbf{\leftmark}}% | |
282 \hfil\hskip4zw\thepage}}% | |
283 | |
284 \def\chaptermark##1{\markboth{% | |
285 \ifnum \c@secnumdepth >\m@ne | |
286 \@chapapp\thechapter\@chappos\hskip1zw | |
287 \fi | |
288 ##1}{}}% | |
289 \def\sectionmark##1{\markright{% | |
290 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
291 ##1}}% | |
292 } | |
293 | |
294 | |
295 %もう一個のバージョン:headings(本命) | |
296 \def\ps@anotherheadings{% | |
297 \let\@mkboth\@gobbletwo | |
298 \let\ps@jpl@in\ps@headnombre | |
299 \def\@oddfoot{\reset@font% | |
300 \textbf{\footnotesize \@leftfoot}\hfil\bf\thepage}% | |
301 \let\@evenfoot\@empty | |
302 \def\@oddhead{\hss | |
303 % \underline{\hbox to \textwidth{\hfil\textbf{\rightmark}}% | |
304 \underline{\hbox to \textwidth{\@lefthead\hfil\textbf{\leftmark}}% | |
305 \hfil}}% | |
306 | |
307 \def\chaptermark##1{\markboth{% | |
308 \ifnum \c@secnumdepth >\m@ne | |
309 \@chapapp\thechapter\@chappos\hskip1zw | |
310 \fi | |
311 ##1}{}}% | |
312 \def\sectionmark##1{\markright{% | |
313 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
314 ##1}}% | |
315 } | |
316 %もう一個のバージョン:plain(本命) | |
317 \def\ps@anotherplain{% | |
318 \let\@mkboth\@gobbletwo | |
319 \let\ps@jpl@in\ps@headnombre | |
320 \def\@oddfoot{\reset@font% | |
321 \textbf{\footnotesize \@leftfoot}\hfil\bf\thepage}% | |
322 \let\@evenfoot\@empty | |
323 \let\@oddhead\@empty | |
324 \def\chaptermark##1{\markboth{% | |
325 \ifnum \c@secnumdepth >\m@ne | |
326 \@chapapp\thechapter\@chappos\hskip1zw | |
327 \fi | |
328 ##1}{}}% | |
329 \def\sectionmark##1{\markright{% | |
330 \ifnum \c@secnumdepth >\z@ \thesection.\hskip1zw\fi | |
331 ##1}}% | |
332 } | |
333 | |
334 %スタイルセットのため | |
335 \renewenvironment{thebibliography}[1] | |
336 {\chapter*{\bibname\@mkboth{\bibname}{\bibname}}% | |
337 \markboth{\bibname}{\bibname} | |
338 \addcontentsline{toc}{chapter}{参考文献} | |
339 \list{\@biblabel{\@arabic\c@enumiv}}% | |
340 {\settowidth\labelwidth{\@biblabel{#1}}% | |
341 \leftmargin\labelwidth | |
342 \advance\leftmargin\labelsep | |
343 \@openbib@code | |
344 \usecounter{enumiv}% | |
345 \let\p@enumiv\@empty | |
346 \renewcommand\theenumiv{\@arabic\c@enumiv}}% | |
347 \sloppy | |
348 \clubpenalty4000 | |
349 \@clubpenalty\clubpenalty | |
350 \widowpenalty4000% | |
351 \sfcode`\.\@m} | |
352 {\def\@noitemerr | |
353 {\@latex@warning{Empty `thebibliography' environment}}% | |
354 \endlist} | |
355 | |
356 | |
357 %索引のため | |
358 \renewenvironment{theindex}{% | |
359 \clearpage | |
360 \columnseprule.4pt \columnsep 2zw | |
361 \markboth{\indexname}{\indexname} | |
362 \addcontentsline{toc}{chapter}{\indexname} | |
363 \begin{multicols}{3}[{\chapter*{\indexname}}] | |
364 \@mkboth{\indexname}{\indexname} | |
365 \thispagestyle{anotherplain}% | |
366 \parindent=0pt | |
367 \parskip=0pt plus .3pt \relax | |
368 \let\item=\@idxitem | |
369 \raggedright | |
370 \footnotesize\narrowbaselines | |
371 }{\end{multicols}} | |
372 \def\indexname{索引} | |
373 \def\narrowbaselines{\fontsize\@xpt\@xiipt\selectfont} | |
374 \def\@idxitem{\par \hangindent4zw} | |
375 \def\subitem{\par \hangindent4zw \hspace*{2zw}} | |
376 \def\subsubitem{\par \hangindent4zw \hspace*{3zw}} | |
377 | |
378 %禁則処理の追加 | |
379 %事前でのブレークを禁止(禁止>=10000) | |
380 \prebreakpenalty\jis`,=10000 % , | |
381 \prebreakpenalty\jis`.=10000 % . | |
382 %\prebreakpenalty\jis"2124=10000 % , | |
383 %\prebreakpenalty\jis"2125=10000 % . | |
384 %\prebreakpenalty\jis`、=10000 % 、 | |
385 %\prebreakpenalty\jis`。=10000 % 。 | |
386 %%\prebreakpenalty\jis"2124=10000 % 、 | |
387 %%\prebreakpenalty\jis"2125=10000 % 。 |