-
Notifications
You must be signed in to change notification settings - Fork 11
/
thesis.sty
234 lines (207 loc) · 5.49 KB
/
thesis.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
%%%%%%%%%%%%%%%% コメント用マクロ %%%%%%%%%%%%%%%%
\newif\ifnotes
\notestrue %コメントoff時コメントアウト
%\notesfalse %コメントon時コメントアウト
\ifnotes
\newcommand{\colornote}[3]{\textcolor{#1}{\sffamily\bfseries\boldmath[#2 --- \textit{#3}]}}
\else
\newcommand{\colornote}[3]{}
\fi
%% ここでコメント定義を追加
%% 例: \newcommand{\<任意の名前>}[1]{\colornote{<任意の色>}{#1}{<任意の名前>}}
\newcommand{\sassan}[1]{\colornote{red}{#1}{sassan}}
%\newcommand{\harusame}[1]{\colornote{blue}{#1}{harusame}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 変数定義
\makeatletter
% 変数読み込み
\def\jclass#1{\gdef\@jclass{#1}}
\def\jtitle#1{\gdef\@jtitle{#1}}
\def\juniv#1{\gdef\@juniv{#1}}
\def\jfaculty#1{\gdef\@jfaculty{#1}}
\def\jauthor#1{\gdef\@jauthor{#1}}
\def\jadvisor#1#2{\gdef\@jadvisor{#1}\gdef\@jposition{#2}}
\def\jhyear#1{\gdef\@jhyear{#1}}
\def\jsyear#1{\gdef\@jsyear{#1}}
\def\jkeyword#1{\gdef\@jkeyword{#1}}
\def\jproject#1{\gdef\@jproject{#1}}
\def\jdate#1{\gdef\@jdate{#1}}
\def\eclass#1{\gdef\@eclass{#1}}
\def\etitle#1{\gdef\@etitle{#1}}
\def\euniv#1{\gdef\@euniv{#1}}
\def\efaculty#1{\gdef\@efaculty{#1}}
\def\eauthor#1{\gdef\@eauthor{#1}}
\def\eadvisor#1#2{\gdef\@eposition{#1}\gdef\@eadvisor{#2}}
\def\eyear#1{\gdef\@eyear{#1}}
\def\ekeyword#1{\gdef\@ekeyword{#1}}
\def\eproject#1{\gdef\@eproject{#1}}
\def\edate#1{\gdef\@edate{#1}}
%行間設定
\renewcommand{\baselinestretch}{1.1}
\setlength{\parskip}{.2\baselineskip}
% 余白設定(左右対称)
\setlength{\textwidth}{15.92cm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\setlength{\topmargin}{-1cm}
\setlength{\textheight}{23.5cm}
\setlength{\footskip}{18mm}
% 余白設定(左綴じ用)
\newcommand{\bindermode}{%
\setlength{\textwidth}{15cm}
\setlength{\oddsidemargin}{13mm}
\setlength{\evensidemargin}{0mm}
\setlength{\topmargin}{-1cm}
\setlength{\textheight}{23.5cm}
\setlength{\footskip}{18mm}
}
% 表紙用行間広め定義
\newenvironment{lineskiptitle}{%
\baselineskip = 1.5cm
}
% 表紙の定義(日本語)
\def\jmaketitle{\par
\begingroup
\@jmaketitle
\endgroup
}
\def\@jmaketitle{%
\thispagestyle{empty}
\begin{center}
{\Large \@jclass\ \ \ \@jsyear 年度(平成\@jhyear 年度)}
\vfill
\begin{lineskiptitle}
{\huge\bf \@jtitle}
\end{lineskiptitle}
\vfill
{\Large \@juniv\ \@jfaculty}
\vspace{0.5cm}\par
{\LARGE \@jauthor}
\vspace{2cm}\par
{\Large \@jproject}
\vspace{0.5cm}\par
{\Large \@jdate}
\end{center}
%\newpage
\cleardoublepage
\pagenumbering{roman}
}
% 表紙の定義(英語)
\def\emaketitle{\par
\begingroup
\@emaketitle
\endgroup
}
\def\@emaketitle{%
\thispagestyle{empty}
\begin{center}
{\Large \@eclass\ (Academic Year \@eyear)}
\vfill
\begin{lineskiptitle}
\fbox{\Huge\sf \@etitle}
\end{lineskiptitle}
\vfill
{\Large \@euniv\par \@efaculty}
\vspace{0.5cm}\par
{\LARGE \@eauthor}
\vspace{2cm}\par
{\Large \@eproject}
\vspace{0.5cm}\par
{\Large \@edate}
\end{center}
%\newpage
\cleardoublepage
\pagenumbering{roman}
}
% アブストラクト用行間広め設定
\newenvironment{lineskipabst}{%
\baselineskip = 1cm
}
% アブストラクトの定義(日本語)
\newenvironment{jabstract}{%
\begin{center}
{\Large\bf \@jclass \@jsyear 年度(平成\@jhyear 年度)}
\vspace{0.5cm}\par
\begin{lineskipabst}
{\LARGE\bf \@jtitle}\vspace{2cm}
\end{lineskipabst}
\end{center}
\parindent=1zw
\section*{論文要旨}
\ifjapanese \else \renewcommand{\baselinestretch}{1.15}\selectfont \fi
}{
\section*{キーワード}
\@jkeyword \par
\vspace{2.5cm}\par
{\@juniv} {\@jfaculty}
\begin{flushright}
{\@jauthor}
\end{flushright}
\cleardoublepage
\ifjapanese \parindent=1zw \else \parindent=1.6zw \fi
\renewcommand{\baselinestretch}{1.0}\selectfont
}
% アブストラクトの定義(英語)
\newenvironment{eabstract}{%
\begin{center}
{\Large\bf \@eclass\ Abstract \ \ Academic Year \@eyear}
\vspace{0.5cm}\par
\begin{lineskipabst}
{\LARGE\sf \@etitle}\vspace{2cm}
\end{lineskipabst}
\end{center}
\parindent=1.6zw
\section*{Summary}
\ifjapanese \renewcommand{\baselinestretch}{0.89}\selectfont \fi
}{
\section*{Keywords}
\@ekeyword \par
\vspace{2.5cm}\par
{\@efaculty} \par
{\@euniv}
\begin{flushright}
{\@eauthor}
\end{flushright}
\cleardoublepage
\ifjapanese \parindent=1zw \else \parindent=1.6zw \fi
\renewcommand{\baselinestretch}{1.0}\selectfont
}
% 目次環境再定義
\renewcommand{\tableofcontents}{%
\section*{\contentsname}
\@starttoc{toc}
\newpage
}
% 図目次環境再定義
\renewcommand{\listoffigures}{%
\section*{\listfigurename}
\@starttoc{lof}
\newpage
}
% 表目次環境再定義
\renewcommand{\listoftables}{%
\section*{\listtablename}
\@starttoc{lot}
\cleardoublepage
}
% 謝辞環境の作成
\newenvironment{acknowledgment}{%
\addcontentsline{toc}{chapter}{\acknowledgmentname}
\chapter*{\acknowledgmentname}
}{}
% 参考文献環境の作成
\newenvironment{bib}[1][100]{%
\addcontentsline{toc}{chapter}{\bibname}
}{}
% subsubsection 環境の設定変更
\setcounter{secnumdepth}{3}
\renewcommand\thesubsubsection{(\arabic{subsubsection})}
% 箇条書きの行間設定
\renewenvironment{itemize}{%
\begin{list}{\parbox{1zw}{$\bullet$}}{%
\setlength{\itemsep}{0em}
\setlength{\parsep}{0em}
}}{%
\end{list}
}
\makeatother