%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ssithesis.sty
% 2020/12/30 Initail Version (Yuh Yamashita)
% (C) Yuh Yamashita, 2020
%%%%%%%%%%%%%%%%%%%
% Preface
%%%%%%%%%%%%%%%%%%% 
\NeedsTeXFormat{LaTeX2e}%
%
\def\my@package@name{ssithesis}%
\expandafter\ProvidesClass\expandafter{\my@package@name}[2020/12/30 Thesis style file for Division of Systems Science and Informatics, Hokkaido University]%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Checking Global Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@report@inbook@%
\@report@inbook@false%
\DeclareOption{report}{\@report@inbook@true}%
%%%%%%%
\newif\if@afourpaper@opt@%
\@afourpaper@opt@false%
\DeclareOption{a4paper}{\@afourpaper@opt@true}%
%%%%%%%
\newif\if@uplatex@opt@%
\@uplatex@opt@false%
\DeclareOption{uplatex}{\@uplatex@opt@true}%
%%%%%%%
\newif\if@xelatex@opt@%
\@xelatex@opt@false%
\DeclareOption{xelatex}{\@xelatex@opt@true}%
%%%%%%%
\newif\if@english@article@%
\@english@article@false%
\DeclareOption{english}{\@english@article@true}%
%%%%%%%
\newif\if@pdftex@opt@%
\@pdftex@opt@false%
\DeclareOption{pdftex}{\@pdftex@opt@true}%
%%%%%%%
\newif\if@landscape@opt@%
\@landscape@opt@false%
\DeclareOption{landscape}{\@landscape@opt@true}%
%%%%%%%
\newif\if@twocolumn@opt@%
\@twocolumn@opt@false%
\DeclareOption{twocolumn}{\@twocolumn@opt@true}%
%%%%%%%
\newif\if@tate@opt@%
\@tate@opt@false%
\DeclareOption{tate}{\@tate@opt@true}%
%%%%%%%
\DeclareOption{vartwoside}{\@twosidetrue \@mparswitchfalse}% This line is added for (scr)book.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Local Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifhide@hyperref@%
\hide@hyperref@true%
\DeclareOption{colorlinks}{\hide@hyperref@false}%
%%%%%%%%%
\newif\if@load@lmodern@%
\@load@lmodern@true%
\DeclareOption{nolmodern}{\@load@lmodern@false}%
%%%%%%%%%
\newif\if@load@fontspec@%
\@load@fontspec@true%
\DeclareOption{nofontspec}{\@load@fontspec@false}%
%%%%%%%%%
\newif\if@deluxe@otf@%
\@deluxe@otf@true%
\DeclareOption{nodeluxe}{\@deluxe@otf@false}%
%%%%%%%%%
\newif\if@equalmargin@opt@%
\@equalmargin@opt@false%
\DeclareOption{equalmargin}{\@equalmargin@opt@true}%
%%%%%%%%%
\newif\if@noamssymb@opt@%
\@noamssymb@opt@false%
\DeclareOption{noamssymb}{\@noamssymb@opt@true}%
%%%%%%%%%
\newif\if@hulogo@opt@%
\@hulogo@opt@false%
\DeclareOption{hulogo}{\@hulogo@opt@true}%
%%%%%%%%%
% Process the Options
%%%%%%%%%
\ProcessOptions\relax% Option definitions must be placed before this line.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX Engine Estimation
% Either of 
%   \texengine@latex, \texengine@pdflatex, \texengine@omega, \texengine@lualatex,
%   \texengine@xelatex, \texengine@platex, \texengine@uplatex, \texengine@jlatex
% will be substitued into \latex@engine@guess .
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Enum-like assignment
\@tempcnta=1%
\def\assign@texeng#1{%
\expandafter\edef\csname texengine@#1\endcsname{\the\@tempcnta}%
\advance\@tempcnta by 1}%
\assign@texeng{latex}%
\assign@texeng{pdflatex}%
\assign@texeng{omega}%
\assign@texeng{lualatex}% includes LuaHBTeX (For Arabic languages)
\assign@texeng{xelatex}% includes both TU and EU1 encodings
\assign@texeng{platex}%
\assign@texeng{uplatex}%
\assign@texeng{aplatex}%
\assign@texeng{jlatex}%
%%% e-TeX extension \ifcsname ... \endcsname may be able to used for this purpose.
\def\my@if@primitive#1#2{%
  \edef\tt@tmpa{\string#1}\edef\tt@tmpb{\meaning#1}%
  \ifx\tt@tmpa\tt@tmpb \edef\latex@engine@guess{#2}\fi}%
%%% Following checking order is important
\def\latex@engine@guess{\texengine@latex}%
\my@if@primitive\pdftexversion{\texengine@pdflatex}%
\my@if@primitive\OmegaVersion{\texengine@omega}%
\my@if@primitive\luatexversion{\texengine@lualatex}%
\my@if@primitive\XeTeXversion{\texengine@xelatex}%
\my@if@primitive\kanjiskip{\texengine@platex}%
\my@if@primitive\kchardef{\texengine@uplatex}%
\my@if@primitive\ngbanner{\texengine@aplatex}
\my@if@primitive\jintercharskip{\texengine@jlatex}%
%%%　"Latex" command with "pdflatex" engine should be regarded as "latex."
\ifx\latex@engine@guess\texengine@pdflatex%
  \@tempcnta=\z@%
  \ifx\pdfoutput\undefined\else\@tempcnta=\pdfoutput\fi%
  \ifx\outputmode\undefined\else\@tempcnta=\outputmode\fi%
  \ifnum\@tempcnta > \z@\else\def\latex@engine@guess{\texengine@latex}\fi%
\fi%
% End of guessing LaTeX engine.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Guessing Class File
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
\newif\if@book@loaded@%
\@ifclassloaded{book}{\@book@loaded@true}{\@book@loaded@false}%
%%%
\newif\if@jsbook@loaded@%
\@ifclassloaded{jsbook}{\@jsbook@loaded@true\@book@loaded@false}{\@jsbook@loaded@false}%
%%%
\newif\if@ltjsbook@loaded@%
\@ifclassloaded{ltjsbook}{\@ltjsbook@loaded@true\@book@loaded@false\@jsbook@loaded@false}{\@ltjsbook@loaded@false}%
%%%
\newif\if@bxjsbook@loaded@%
\@ifclassloaded{bxjsbook}{\@bxjsbook@loaded@true\@book@loaded@false\@jsbook@loaded@false}{\@bxjsbook@loaded@false}%
%%%
\newif\if@scrbook@loaded@%
\@ifundefined{KOMAClassName}{\@scrbook@loaded@false}{%
    \@ifclassloaded{scrbook}{\@scrbook@loaded@true\@book@loaded@false}{\@scrbook@loaded@false}%
}%
%%%
\newif\if@scrorbook@loaded@%
\@scrorbook@loaded@false%
\if@scrbook@loaded@\@scrorbook@loaded@true\fi%
\if@book@loaded@\@scrorbook@loaded@true\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Global Option Requirement Check 
%  and Detecting illegal combination between class file and 'XXXlatex' program name.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@ltjsbook@loaded@%
    \if@report@inbook@%
        \expandafter\PackageError\expandafter{\my@package@name}{Option 'report' with Class file 'ltjsbook.cls' is prohibited in this style file.}{}%
    \fi%
    \ifx\latex@engine@guess\texengine@lualatex\else%
        \expandafter\PackageError\expandafter{\my@package@name}{Class file 'ltjsbook' requires LuaLaTeX.}{}%
    \fi%
%\fi%
%%
\else\if@bxjsbook@loaded@%
    \if@report@inbook@%
        \expandafter\PackageError\expandafter{\my@package@name}{Option 'report' with Class file 'bxjsbook.cls' is prohibited in this style file.}{}%
    \fi%
    \ifx\latex@engine@guess\texengine@xelatex\else%
        \expandafter\PackageError\expandafter{\my@package@name}{Under 'bxjsbook' class, this style file requires XeLaTeX.}{}%
    \fi%
    \if@xelatex@opt@\else%
        \expandafter\PackageError\expandafter{\my@package@name}{Under 'bxjsbook' class, this style file requires `xelatex' global option.}{}%
    \fi%
%\fi%
\else\if@jsbook@loaded@%
    \if@report@inbook@%
        \expandafter\PackageError\expandafter{\my@package@name}{Option 'report' with Class file 'jsbook.cls' is prohibited in this style file.}{}%
    \fi%
    \ifx\latex@engine@guess\texengine@uplatex%
        \if@uplatex@opt@\else%
            \expandafter\PackageError\expandafter{\my@package@name}{Class file 'jsbook' with uplatex requires 'uplatex' option.}{}%
        \fi%
    \else%
        \expandafter\PackageError\expandafter{\my@package@name}{Under 'jsbook' class, this style file requires upLaTeX. Do not use pLaTeX.}{}%
    \fi%
\fi\fi\fi%
%%
\if@scrorbook@loaded@%
    \ifx\latex@engine@guess\texengine@latex\else\ifx\latex@engine@guess\texengine@pdflatex\else\ifx\latex@engine@guess\texengine@lualatex\else%
        \expandafter\PackageError\expandafter{\my@package@name}{Class file '(scr)book.cls' requires LaTeX/pdfLaTeX/LuaLaTeX in this style file.}{}%
    \fi\fi\fi%
\fi%
%%
\if@titlepage\else%
    \expandafter\PackageWarning\expandafter{\my@package@name}{Global option 'notitlepage' will be ignored.}%
\fi%
%%%%%%%%%%%
\if@landscape@opt@%
    \expandafter\PackageError\expandafter{\my@package@name}{Global option `landscape' is prohibited in this style file.}{}
\fi%
%%
\if@twocolumn@opt@%
    \expandafter\PackageError\expandafter{\my@package@name}{Global option `twocolumn' is prohibited in this style file.}{}
\fi%
%%
\if@tate@opt@%
    \expandafter\PackageError\expandafter{\my@package@name}{Global option `tate' is prohibited in this style file.}{}
\fi%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@bare@babel@loaded@%
\@bare@babel@loaded@false%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LuaLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@ltjsbook@loaded@%
%
    \if@load@lmodern@\relax%
        \RequirePackage{lmodern}%Set T1 mathfont to Latin Modern
    \fi%
    % Because luatexja-preset calls fontspec via lualatexja-fontspec hiddenly, fontspec (or lualatexja-fontspec) with options should be called before luatexja-preset.
    \if@load@fontspec@%
        \usepackage[no-math]{luatexja-fontspec}% If user omits the line `\usepackage[....]{luatexja-preset},' default font setting is used.
        % Package `lualatexja-fontspec' calls fontspec.sty.  The option `no-math' is passed to fontspec. 
        %\RequirePackage[no-math]{fontspec}% Set TU encoding (except math) + Latin Modern T1 math font
    \fi%
    % Assuming luatex-ja.
    % Maybe, ltjsarticle.cls calls luatexja.sty.
    \ltjsetparameter{jacharrange={-2,-3}}% Similar effect to prefernoncjk in pxcjkcat
    % -2 : It excludes Greek and Cyril characters from 'JAchar.'
    % -3 : It excludes the following codes from 'JAchar.'
    % U+2070–U+209F Superscripts and Subscripts
    % U+20A0–U+20CF Currency Symbols
    % U+20D0–U+20FF Comb. Diacritical Marks for Symbols
    % U+2100–U+214F Letterlike Symbols
    % U+2150–U+218F Number Forms
    % U+2190–U+21FF Arrows
    % U+2200–U+22FF Mathematical Operators
    % U+2300–U+23FF Miscellaneous Technical
    % U+2400–U+243F Control Pictures
    % U+2500–U+257F Box Drawing
    % U+2580–U+259F Block Elements
    % U+25A0–U+25FF Geometric Shapes
    % U+2600–U+26FF Miscellaneous Symbols
    % U+2700–U+27BF Dingbats
    % U+2900–U+297F Supplemental Arrows-B
    % U+2980–U+29FF Misc. Math Symbols-B
    % U+2B00–U+2BFF Misc. Symbols and Arrows†‍
%
    % The following characters are regarded as 'ALchar.'
    % U+0080–U+00FF Latin-1 Supplement
    % U+0100–U+017F Latin Extended-A
    % U+0180–U+024F Latin Extended-B
    % U+0250–U+02AF IPA Extensions
    % U+02B0–U+02FF Spacing Modifier Letters
    % U+0300–U+036F Combining Diacritical Marks
    % U+1E00–U+1EFF Latin Extended Additional
%
    % Definition of Emoji Code Area except characters in U+1F300 - U+1FFFF (incl. in Cat 7->AL chars)
    % Area 3 also includes Emoji characters, but they have been already regarded as AL-chars in this style file.
    \ltjdefcharrange{99}{"E008,"E009,"1F000-"1F02B,%
        "1F170-"1F19A,"1F1E6-"1F1EF,"1F201,"1F202,"1F210-"1F23A,"1F250,"1F251}%
    \ltjsetparameter{jacharrange={-99}}% Emoji characters are regarded as AL-chars.
    %
    \ifhide@hyperref@%
        \RequirePackage[unicode,hidelinks,setpagesize=false]{hyperref}%
        \relax%
    \else
        \RequirePackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=orange,unicode,setpagesize=false]{hyperref}\relax%
    \fi%
    \if@english@article@\widebaselines\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% XeLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else\if@bxjsbook@loaded@%
%
    \if@load@lmodern@\relax%
        \RequirePackage{lmodern}%Set T1 mathfont to Latin Modern
    \fi%
    \if@load@fontspec@%
        \RequirePackage[no-math]{fontspec}% Set TU encoding (except math) + Latin Modern T1 math font
    \fi%
    \ifhide@hyperref@%
        \RequirePackage[unicode,hidelinks,setpagesize=false]{hyperref}%
        \relax%
    \else
        \RequirePackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=orange,unicode,setpagesize=false]{hyperref}\relax%
    \fi%
    \if@english@article@\widebaselines\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% upLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else\if@jsbook@loaded@%
%
    % Global option jis2004 may be passed to otf package.
    % pxchfon.sty may refer this option also.
    \if@deluxe@otf@%
        \RequirePackage[deluxe]{otf}%
    \else%
        \RequirePackage{otf}%
    \fi%
    \RequirePackage[utf8]{inputenc}% It enables utf8 input. TeX Live 2018 and later do not require this, but for compatibility, it remains. 
%
    \RequirePackage[prefernoncjk,ccv+]{pxcjkcat}% Enables Greek fonts
    \cjkcategory{sym18,sym19}{cjk}% Geometric Shapes and Miscellaneous Symbols are considered as CJK characters.
    %%%%%% One may want to change sym04 or sym08 to the non-CJK fonts.
    \RequirePackage[LGR,T2A,T1]{fontenc}% T1 becomes default.
    \if@english@article@%
        \widebaselines%
        \RequirePackage[greek,russian,english]{babel}% Russian Captions becomes default, but ...
        \@bare@babel@loaded@true%
    \else
        % The following two lines are based on the older version of "pxbabel."
        % For the compatibility, we adopt this way.
        \RequirePackage[greek,russian,english]{babel}% Same as before.
        \RequirePackage[main=japanese]{pxbabel}%
        % On the newer versions of "pxbabel,"
        %    \RequirePackage[greek,russian,english,schinese,tchinese,korean,japanese]{pxbabel}
        % is sufficent.
    \fi%
    \if@load@lmodern@%
        \RequirePackage{lmodern}\relax%%T1 Latin Modern
    \fi%
    %
    \ifhide@hyperref@%
        \RequirePackage[hidelinks,setpagesize=false]{hyperref}\relax%%
    \else%
        \RequirePackage[colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=orange,setpagesize=false]{hyperref}\relax%%
    \fi%
    % Lualatex and xelatex engines are used for any languages, and the unit "zw" is not defined in these engines.
    % Hence, in the bxjsbook and ltjsbook classes, a macro "\zw" is defined insted of "zw."
    % In this style, "\zw" will be used insted of "zw" for all latex engines.
    \def\zw{zw}%
    % In (u)platex+hyperref+divpdfmx cases, "unicode" option for "hyperref" does not work well. 
    % Hence, a package "pxjahyper" is required for making Unicode bookmark in the generated PDF.
    \RequirePackage{pxjahyper}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Book class (English)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else\if@scrorbook@loaded@%
    %
    \@english@article@true%
     %%
    \ifx\latex@engine@guess\texengine@pdflatex%
        \if@pdftex@opt@\else%
            \expandafter\PackageError\expandafter{\my@package@name}{A global option 'pdftex' is required for graphicx/color packages.}{}%
        \fi%
    \fi%
    %
    \ifx\latex@engine@guess\texengine@lualatex%
        \if@load@lmodern@%
            \RequirePackage{lmodern}\relax%%T1 Latin Modern
        \fi%
        \if@load@fontspec@%
            \usepackage[no-math]{fontspec}%
        \fi%
    \else%
        \RequirePackage[utf8]{inputenc}% 
        \RequirePackage[LGR,T2A,T1]{fontenc}%
        \RequirePackage[greek,russian,english]{babel}%
        \@bare@babel@loaded@true%
        \if@load@lmodern@%
            \RequirePackage{lmodern}\relax%%T1 Latin Modern
        \fi%
    \fi%
    %
    \ifhide@hyperref@%
        \RequirePackage[unicode,hidelinks,setpagesize=false]{hyperref}\relax%%
    \else%
        \RequirePackage[unicode,colorlinks=true,citecolor=blue,linkcolor=blue,urlcolor=orange,setpagesize=false]{hyperref}\relax%%
    \fi%
    %%
    \def\zw{zw}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other Class
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\else
    \expandafter\PackageError\expandafter{\my@package@name}{This style file requires (lt/bx)jsbook or (scr)book (English mode).}{}%
\fi\fi\fi\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Suppress printing page numbers at empty pages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@english@article@%
    \RequirePackage{emptypage}
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A4 Check
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@afourpaper@opt@\else%
    \expandafter\PackageWarning\expandafter{\my@package@name}{We assume that an SSI thesis is made with A4 paper size.  Global option 'a4paper' is preferred.}%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paper size and Page Layout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Geometry.sty is incompatible with js-classes with 11pt/12pt options.
% Hence, we directly assign the text dimensions of the document.
% Use truecm, turemm, truein, and truept instead of cm, mm, in, and pt.
\setlength\headheight{18truept}%
\setlength\textheight{.75\paperheight}%
\addtolength\textheight{\topskip}%
\addtolength\footskip{30truept}%
\setlength\topmargin{\paperheight}%
\addtolength\topmargin{-\headheight}%
\addtolength\topmargin{-\headsep}%
\addtolength\topmargin{-\textheight}%
\addtolength\topmargin{-\footskip}%
\setlength\topmargin{0.5\topmargin}% 上下の空白の合計の半分を上のマージンに
\addtolength\topmargin{-1in}%
%
\setlength{\textwidth}{150truemm}
%
\if@equalmargin@opt@%
    \setlength\oddsidemargin{0.5\paperwidth}%
    \addtolength\oddsidemargin{-75truemm}%
    \setlength\evensidemargin{\oddsidemargin}%
\else%
    \setlength\oddsidemargin{25truemm}%
    \setlength\evensidemargin{\paperwidth}%
    \addtolength\evensidemargin{-\textwidth}%
    \addtolength\evensidemargin{-\oddsidemargin}%
\fi%
\addtolength\oddsidemargin{-1in}% The 1 inch offset is fixed even for the magnified coordinate.
\addtolength\evensidemargin{-1in}%
\if@scrorbook@loaded@%
\else%
    \setlength{\fullwidth}{\textwidth}%
\fi%
%
\RequirePackage{bxpapersize}% Pass the global option 'a4paper' to PDF/dvi generator.
%
%%%%%%%%%%%%%%%%%%%%%%%%
% Chapter Style for KOMA-Script
%%%%%%%%%%%%%%%%%%%%%%%%
\if@scrbook@loaded@\else%
    \expandafter\newif\csname if@chapterprefix\endcsname%
    \@chapterprefixfalse%
\fi%
\if@scrbook@loaded@%
    \if@chapterprefix%
        \renewcommand*{\size@chapter}{\Huge}%
        \renewcommand*{\size@chapterprefix}{\huge}%
        \renewcommand*{\scr@chapter@beforeskip}{5.25\baselineskip \@plus 0.1\baselineskip \@minus .167\baselineskip}%
        \renewcommand*{\scr@chapter@afterskip}{3.0\baselineskip \@plus .1\baselineskip \@minus .167\baselineskip}%
        \renewcommand*{\scr@chapter@innerskip}{.8\baselineskip}%
    \fi%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Additional Packeages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{amsmath}
\if@noamssymb@opt@\else%
    \RequirePackage{amssymb}%
\fi%
\ifx\latex@engine@guess\texengine@uplatex%
    \RequirePackage{graphicx}%  If you want to use trim marks ('tombow' in Japanese), add nosetpagesize option.
\else\ifx\latex@engine@guess\texengine@latex%
    \RequirePackage{graphicx}%  If you want to use trim marks ('tombow' in Japanese), add nosetpagesize option.
\else% XXXlatex generates PDF directly.
    \RequirePackage[nosetpagesize]{graphicx}%
\fi\fi%
\RequirePackage{xcolor}% xcolor should be declared after graphicx, because xcolor has no "nosetpagesize" option.  If xcolor.sty is loaded first, undesired \special will be issued.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@out@appendix@%
\@out@appendix@true%
%%%%%%
\newif\if@old@organization@%
\@old@organization@false%
%%%%%%
\if@english@article@%
    \setlength\parindent{15\p@}%
\else%
    \setlength\parindent{1\zw}%
\fi%
%%%%%%
\def\@prethesisid{SSI}%
\def\paperid{\@prethesisid-\@acronymdoctype\@studentno}
%
%%%%%%
\if@english@article@\else%
    \def\my@touten{。}%
    \def\typeofdegree{情報科学}
    \def\juniv{北海道大学}%
    \def\jschool{大学院情報科学院}%
    \def\jdepartment{システム情報科学コース}%
    \def\@jabstract{これは概要です\my@touten}%
\fi%
\def\euniv{Hokkaido University}%
\def\eschool{Graduate School of Information Science and Technology}%
\def\edepartment{Course of Systems Science and Informatics}%
%%%%%
\def\oldorganization{%
    \if@english@article@\else%
        \def\jschool{大学院情報科学研究科}
        \def\jdepartment{システム情報科学専攻}%
    \fi%
    \def\edepartment{Division of Systems Science and Informatics}%
}%
%%%%%
\def\mastersthesis{1}%
\def\doctoralthesis{2}%

\def\@doctypeno{0}%
\gdef\@doctypeno{0}%
\def\thesistype#1{%
    \gdef\@doctypeno{#1}%
    \def\thesisordissertion{\ifcase\@doctypeno\or{Thesis}\or{Dissertation}\fi}
    \if@english@article@\else%
        \xdef\@jdoctype{\ifcase\@doctypeno\or{修士論文}\or{博士論文}\fi}%
        \xdef\@jtypeofdegree{\ifcase\@doctypeno\or{修士(\noexpand\typeofdegree)}\or{博士(\noexpand\typeofdegree)}\fi}%
    \fi
    \xdef\@edoctype{\ifcase\@doctypeno\or{Master's \noexpand\thesisordissertion}\or{Doctoral \noexpand\thesisordissertion}\fi}%
    \xdef\@acronymdoctype{\ifcase\@doctypeno\or{MT}\or{DT}\fi}%
    \edef\@tetypeofdegree{\@ifundefined{etypeofdegree}{\ifcase\@doctypeno\or{Information Science and Technology}\or{Philosophy}\fi}{\etypeofdegree}\relax\relax}%
    \gdef\etypeofdegree{\@tetypeofdegree}%
    \xdef\@etypeofdegree{\ifcase\@doctypeno\or{Master of \noexpand\etypeofdegree}\or{Doctor of \noexpand\etypeofdegree}\fi}%
}%
%
\def\@etitle{\empty}%
\def\etitle#1{\gdef\@etitle{#1}}%
\def\@eauthor{\empty}%
\def\eauthor#1{\gdef\@eauthor{#1}}%
\def\@eabstract{This is the abstract of the \expandafter\lowercase\expandafter{\thesisordissertion}.}%
\long\def\jabstract#1{\long\gdef\@jabstract{#1}}%
\long\def\eabstract#1{\long\gdef\@eabstract{#1}}%
\def\jkeyword#1{\gdef\@jkeyword{#1}}%
\def\ekeyword#1{\gdef\@ekeyword{#1}}%
\def\@studentno{XXXXXXX}%
\def\studentno#1{\gdef\@studentno{#1}}%
\def\@committee@member{}%
\def\committeemember#1#2{%
    \ifx\@committee@member\empty%
        \def\@committee@member@back{&}%
    \else%
        \def\@committee@member@back{\@committee@member\cr &}%
    \fi%
    \def\@tmpsecond{#2}%
    \ifx\@tmpsecond\empty%
        \if@english@article@%
            \xdef\@committee@member{\@committee@member@back #1}%
        \else%
            \xdef\@committee@member{\@committee@member@back & #1}%
        \fi%
    \else%
        \ifnum\@tmpsecond=1%
            \if@english@article@%
                \xdef\@committee@member{\@committee@member@back{#1} (Chief examinar)}%
            \else%
                \xdef\@committee@member{\@committee@member@back 主査 & #1}%
            \fi%
        \else%
            \if@english@article@%
                \xdef\@committee@member{\@committee@member@back{#1}}%
            \else%
                \xdef\@committee@member{\@committee@member@back 副査 & #1}%
            \fi%
        \fi%
    \fi%
}%
%
% For Compatibility
%
\def\committe#1#2#3#4#5{%
    \comitteemember{#1}{1}%
    \comitteemember{#2}{2}%
    \comitteemember{#3}{}%
    \comitteemember{#4}{}%
    \comitteemember{#5}{}%
}
%%%
\if@english@article@%
    \def\titleshort{\@etitle}%
\else
    \def\titleshort{\@title}%
\fi%
%%%
\newcount\@tyear%
\@tyear\year%
\def\writtenyear#1{\@tyear=#1}%
\newcount\@tmonth%
\@tmonth\month%
\def\writtenmonth#1{\@tmonth=#1}%
\newcount\@tday%
\@tday\day%
\def\writtenday#1{\@tday=#1}%
%%%
\if@english@article@\else
    \def\jwmonth{\the\@tyear 年\the\@tmonth 月}%
\fi%
\def\ewmonth{%
    \ifcase\@tmonth\or%
        January\or February\or March\or April\or May\or June\or%
        July\or August\or September\or October\or November\or December%
    \fi, \the\@tyear%
}%
\if@english@article@\else
    \def\jwdate{\the\@tyear 年\the\@tmonth 月\the\@tday 日}%
\fi%
\def\ewdate{%
    \ifcase\@tmonth\or%
        January\or February\or March\or April\or May\or June\or%
        July\or August\or September\or October\or November\or December%
    \fi\space\the\@tday, \the\@tyear%
}%
%%%%%%%%%%%%%%%%
% Copyrights 
%%%%%%%%%%%%%%%%
\newif\if@thesis@copyright@%
\@thesis@copyright@false%
\def\@thesiscopyright{}%
\long\def\thesiscopyright#1{%
    \@thesis@copyright@true%
    \long\gdef\@thesiscopyright{#1}%
    \if@jsbook@loaded@% "hyperxmp.sty" seems to be incompatible with uplatex or jsbook.cls.
    \else%
        \RequirePackage{hyperxmp}%
        \hypersetup{pdfcopyright={#1}}%
    \fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@english@article@%
    \def\prepartname{Part~}%
    \def\postpartname{.}%
    \def\prechaptername{Chapter~}%
    \def\postchaptername{.}%
    \def\ackname{Acknowledgements}%
    \if@bare@babel@loaded@% If babel package is loaded, these names are managed by babel.
        \setlocalecaption{english}{contents}{Contents}
        \setlocalecaption{english}{listfigure}{List of Figures}%
        \setlocalecaption{english}{listtable}{List of Tables}%
        \setlocalecaption{english}{bib}{References}%
        \setlocalecaption{english}{index}{Index}%
        \setlocalecaption{english}{figure}{Figure}%
        \setlocalecaption{english}{table}{Table}%
        \setlocalecaption{english}{appendix}{Appendix~}%
    \else%
        \renewcommand{\contentsname}{Contents}%
        \renewcommand{\listfigurename}{List of Figures}%
        \renewcommand{\listtablename}{List of Tables}%
        \renewcommand{\bibname}{References}%
        \renewcommand{\indexname}{Index}%
        \renewcommand{\figurename}{Figure}%
        \renewcommand{\tablename}{Table}%
        \renewcommand{\appendixname}{Appendix~}%

    \fi%
\else%
    \renewcommand{\prepartname}{第}%
    \renewcommand{\postpartname}{部}%
    \renewcommand{\prechaptername}{第}%
    \renewcommand{\postchaptername}{章}%
    \renewcommand{\contentsname}{目 次}%
    \renewcommand{\listfigurename}{図 目 次}%
    \renewcommand{\listtablename}{表 目 次}%
    \renewcommand{\bibname}{参考文献}%
    \renewcommand{\indexname}{索 引}%
    \renewcommand{\figurename}{図}%
    \renewcommand{\tablename}{表}%
    \renewcommand{\appendixname}{付 録}%
    \def\ackname{謝辞}%
\fi%
%%%%
\newcommand{\acknowledgements}{%
	\chapter*{\ackname}%
	\@mkboth{}{\ackname}%
	\addcontentsline{toc}{chapter}{\ackname}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\if@scrorbook@loaded@%
    \let\thebibliography@back\thebibliography%
    \let\end@thebibliography@back\endthebibliography%
    \def\thebibliography#1{%
        \let\list@@back\list%
        \def\list##1##2{%
            \addcontentsline{toc}{chapter}{\bibname}%
            \list@@back{##1}{##2}%
        }%
        \thebibliography@back{#1}%
    }%
    \def\endthebibliography{%
        \end@thebibliography@back%
        \let\list\list@@back%
    }%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%
% PDF keyword information and some tricks
%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{%
    % These lines are regarded to be included in the preamble section.
    \if@english@article@%
        \hypersetup{pdfkeywords={\@ekeyword},pdftitle={\@etitle},pdfauthor={\@eauthor}}%
    \else%
        \hypersetup{pdfkeywords={\@jkeyword},pdftitle={\@title},pdfauthor={\@author}}%
    \fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title Pages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\maketitle}{%
    \begin{titlepage}%
%%%%%%%%%%%%%%%%%%
% First Page
%%%%%%%%%%%%%%%%%%
        \let\footnotesize\small%
        \let\footnoterule\relax%
        \def\logofilename{HuLogo-6.pdf}%
%        \let\footnote\thanks
        {\raggedleft\normalsize\hspace*{\fill}\paperid}%
        \vspace*{15truemm}%
        \if@hulogo@opt@%
            \begin{center}%
                \Large\if@english@article@\bfseries\@edoctype\else\sffamily\gtfamily\@jdoctype\fi%
            \end{center}%
            \vspace*{17truemm}%
            \begin{center}%
                \Large\if@english@article@\bfseries\@etitle\else\sffamily\gtfamily\@title\fi%
            \end{center}%
            \vspace*{10truemm}%
            \begin{center}%
                \Large\if@english@article@\@eauthor\else\@author\fi%
            \end{center}%
            \vspace*{30truemm}%
            \begin{center}%
                \includegraphics[width=40truemm]{\logofilename}%
            \end{center}%
            \vspace*{10truemm}%
        \else%
            \begin{center}%
                \Large\if@english@article@\bfseries\@edoctype\else\sffamily\gtfamily\@jdoctype\fi%
            \end{center}%
            \vspace*{27truemm}%
            \begin{center}%
                \Large\if@english@article@\bfseries\@etitle\else\sffamily\gtfamily\@title\fi%
            \end{center}%
            \vspace*{20truemm}%
            \begin{center}%
                \Large\if@english@article@\@eauthor\else\@author\fi%
            \end{center}%
            \vspace*{60truemm}%
        \fi%
        \begin{center}%
            \if@english@article@\ewmonth\else\jwmonth\fi%
        \end{center}%
        \vspace*{6truemm}%
        \begin{center}%
            \if@english@article@%
                \edepartment\\%
                \eschool\\%
                \euniv%
            \else%
                \juniv\ \jschool\\%
                \jdepartment\fi
        \end{center}%
        \par%
        \@thanks\vfil\null%
%%%%%%%%%%%%%%%%%%
% Second Page
%%%%%%%%%%%%%%%%%%
        \clearpage%
        \thispagestyle{empty}%
        \vspace*{\fill}%
        \begin{center}%
            \if@english@article@%
                \@edoctype\\
                submitted to \eschool,\\ \euniv\\%
                in partial fulfillment of the requirements for the degree of \\%
                \@etypeofdegree . %
            \else%
                本論文は\juniv\jschool に\\%
                \@jtypeofdegree 授与の要件として提出した\@jdoctype である\my@touten%
            \fi%
            \\[10truept]%
            \if@english@article@%
                \@eauthor\\[20truept]%
                \begin{tabular}{ll}%
                    \thesisordissertion\ Committee: \@committee@member%
                \end{tabular}%
            \else%
                \@author\\[20truept]%
                \begin{tabular}{lll}%
                    審査委員： \@committee@member%
                \end{tabular}%
            \fi%
            \if@thesis@copyright@%
                \par%
                \vspace{10truept}%
                {\@thesiscopyright}%
            \fi%
        \end{center}%
        \par\vfil\null%
%%%%%%%%%%%%%%%%%%
% Third Page
%%%%%%%%%%%%%%%%%%
        \if@english@article@\else%
            \clearpage%
            \pagestyle{myplain}%
            \pagenumbering{roman}%
            \begin{center}%
                \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
                \Large\sffamily\gtfamily%              
                \@title\footnote{\juniv\,\jschool\,\jdepartment\, \@jdoctype,
                              \paperid, \jwdate.}%
                \renewcommand{\thefootnote}{\arabic{footnote}}%
            \end{center}%
            \vspace*{1truemm}%
            \begin{center}%
               \large\@author%
            \end{center}%
            \vspace*{10truemm}%
            \begin{center}%
               {\sffamily\gtfamily 概要}%
            \end{center}%
            \vspace*{2truemm}%
            \@jabstract\par%
            \vspace*{5truemm}%
            \noindent%
            {\sffamily\gtfamily キーワード:}\ \@jkeyword%
            \par\vfil\null%
        \fi
%%%%%%%%%%%%%%%%%%
% Fourth Page
%%%%%%%%%%%%%%%%%%
        \clearpage%
        \pagestyle{myplain}%
        \begin{center}%
            \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
            \textbf{\Large \@etitle\footnote{\@edoctype, \edepartment, \eschool, \euniv, 
                      \paperid, \ewdate.}}%
            \renewcommand{\thefootnote}{\arabic{footnote}}%
        \end{center}%
        \vspace*{1truemm}%
        \begin{center}%
            \large\@eauthor%
        \end{center}%
        \vspace*{10truemm}%
        \begin{center}%
            \textbf{Abstract}%
        \end{center}%
        \vspace*{2truemm}%
        \parindent=15\p@%
        \@eabstract\par%
        \vspace*{5truemm}%
        \noindent%
        \textbf{Keywords:}\ \@ekeyword%
        \par\vfil\null%
%%%%%%%%%%%%%%%%%%
    \end{titlepage}%
    \setcounter{footnote}{0}%
    \global\let\thanks\relax%
    \global\let\maketitle\relax%
    \global\let\@thanks\@empty%
%    \global\let\@author\@empty%
    \global\let\@date\@empty%
%    \global\let\@title\@empty%
    \global\let\title\relax%
    \global\let\author\relax%
    \global\let\date\relax%
    \global\let\and\relax%
}%
%%%%%%%%%%%%%%%%%%%%%%%
% Supress \cleardoublepage at
% \listoffigures, \listoftables
%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@openleft@back%
\newif\if@openright@back%
\if@scrorbook@loaded@%
    \expandafter\newif\csname if@openleft\endcsname%
    \@openleftfalse%
\fi
\def\@openrlback{%
    \if@openleft \@openleft@backtrue\else \@openleft@backfalse\fi%
    \if@openright \@openright@backtrue\else \@openright@backfalse\fi%
}%
\def\@openrlrestore{%
    \if@openleft@back \@openlefttrue\else \@openleftfalse\fi%
    \if@openright@back \@openrighttrue\else \@openrightfalse\fi%
}%
\let\listoffigures@orig\listoffigures%
\let\listoftables@orig\listoftables%
\def\listoffigures{%
    \@openrlback%
    \@openleftfalse\@openrightfalse%
    \listoffigures@orig%
    \@openrlrestore%
}%
\def\listoftables{%
    \@openrlback%
    \@openleftfalse\@openrightfalse%
    \listoftables@orig%
    \@openrlrestore%
}%
%
\if@scrbook@loaded@%
    \AfterTOCHead[toc]{\thispagestyle{myplain}}%
    \AfterStartingTOC[toc]{\clearpage}%
    \AfterTOCHead[lof]{\thispagestyle{myplain}}%
    \AfterStartingTOC[lof]{\clearpage}%
    \AfterTOCHead[lot]{\thispagestyle{myplain}}%
    \AfterStartingTOC[lot]{\clearpage}%
\fi%
%
%%%%%%%%%%%%%%%%%%
% Header / Footer
%%%%%%%%%%%%%%%%%%
\RequirePackage{fancyhdr}%
%%%%%%%
\newmarks\secmark% Sorry, new latex only... After 2015/01/01 LaTeX2e
%
\if@scrorbook@loaded@%
    \expandafter\newif\csname if@omit@number\endcsname%
    \let\@chapter@back\@chapter%
    \def\@chapter{\@omit@numberfalse\@chapter@back}%
    \let\@schapter@back\@schapter%
    \def\@schapter#1{\@omit@numbertrue\@schapter@back{#1}\chaptermark{#1}}%
    \def\@chappos{\postchaptername}%
\fi%
%
\fancyhead{}% Clear setting
\if@mparswitch%
    \if@english@article@%
        \fancyhead[re]{\@eauthor}%
    \else%
        \fancyhead[re]{\@author}%
    \fi%
%
    \fancyhead[le]{\titleshort}%
\else%
    \fancyhead[le]{\leftmark}%
    \fancyhead[re]{\botmarks\secmark}%%
\fi%
\fancyhead[lo]{\leftmark}%
%\fancyhead[ro]{\rightmark}%
\fancyhead[ro]{\botmarks\secmark}%%
%
\fancyfoot{}% Clear setting
\fancyfoot[CE,CO]{--- {\thepage} ---}%
%
\let\ps@fancy@back\ps@fancy%
\def\ps@fancy{%
    \ps@fancy@back%
    \def\chaptermark##1{%
        \marks\secmark{}%
        \markboth{%
            \ifnum \c@secnumdepth >\m@ne%
                \if@mainmatter%
                    \if@omit@number\else%
                        \@chapapp\if@scrorbook@loaded@\ \fi\thechapter\@chappos\hskip12pt%
                    \fi%
                \fi%
            \fi%
            ##1%
        }{}%
    }%
    \def\sectionmark##1{%
        \markright{%
            \ifnum \c@secnumdepth >\z@ \thesection \hskip12pt\fi
            ##1%
        }%
        \marks\secmark{%
            \ifnum \c@secnumdepth >\z@ \thesection \hskip12pt\fi
            ##1%
        }%
    }%
}%
%%%%%%%%%%%%%%%%%%%%%%%
\let\mainmatter@back\mainmatter%
\def\mainmatter{%
    \if@openleft\cleardoublepage\else%
    \if@openright\cleardoublepage\else\clearpage\fi\fi%
    \mainmatter@back%
    \pagestyle{fancy}%
    \pagenumbering{arabic}%
}
\def\ps@myplain{%
%  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \def\@oddfoot{\normalfont\hfil--- {\thepage} ---\hfil}%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot%
}%
\def\plainifnotempty{%
    \thispagestyle{myplain}%
}%
\let\frontmatter@back\frontmatter%
\def\frontmatter{%
    \frontmatter@back%
    \pagestyle{myplain}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% amsthm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{amsthm}%%
%
\if@english@article@%
    \theoremstyle{plain}%
    \newtheorem{thm}{Theorem}%
    \newtheorem*{thm*}{Theorem}%
    \newtheorem{lem}[thm]{Lemma}%
    \newtheorem*{lem*}{Lemma}%
    \newtheorem{prop}[thm]{Proposition}%
    \newtheorem*{prop*}{Proposition}%
    \newtheorem{cor}[thm]{Corollary}%
    \newtheorem*{cor*}{Corollary}%
    \newtheorem{conj}[thm]{Conjecture}%
    \newtheorem*{conj*}{Conjecture}%
    \theoremstyle{definition}%
    \newtheorem{axiom}[thm]{Axiom}%
    \newtheorem*{axiom*}{Axiom}%
    \newtheorem{defi}[thm]{Definition}%
    \newtheorem*{defi*}{Definition}%
    \newtheorem{assum}[thm]{Assumption}%
    \newtheorem*{assum*}{Assumption}%
    \newtheorem{exam}[thm]{Example}%
    \newtheorem*{exam*}{Example}%
    \theoremstyle{remark}%
    \newtheorem{rem}[thm]{Remark}%
    \newtheorem*{rem*}{Remark}%
\else
    \newtheoremstyle{my@thm@style}% Style Name
        {\thm@preskip\topsep}% Upper space
        {\thm@preskip\topsep}% Lower space
        {\normalfont}% font
        {}% indent
        {\sffamily\gtfamily}% Index font (changed from \bfseries)
        {}% After index (changed from ".")
        { }% Space after index (' ' or \newline)
        {}% index style  (can be left empty, meaning `normal')
    \theoremstyle{my@thm@style} % スタイルの適用
    \newtheorem{thm}{定理}%
    \newtheorem*{thm*}{定理}%
    \newtheorem{lem}[thm]{補助定理}%
    \newtheorem*{lem*}{補助定理}%
    \newtheorem{prop}[thm]{補題}%
    \newtheorem*{prop*}{補題}%
    \newtheorem{cor}[thm]{系}%
    \newtheorem*{cor*}{系}%
    \newtheorem{axiom}[thm]{公理}%
    \newtheorem*{axiom*}{公理}%
    \newtheorem{defi}[thm]{定義}%
    \newtheorem*{defi*}{定義}%
    \newtheorem{assum}[thm]{仮定}%
    \newtheorem*{assum*}{仮定}%
    \newtheorem{conj}[thm]{予想}%
    \newtheorem*{conj*}{予想}%
    \newtheorem{exam}[thm]{例題}%
    \newtheorem*{exam*}{例題}%
    \newtheorem{rem}[thm]{注意}%
    \newtheorem*{rem*}{注意}%
    \renewenvironment{proof}[1][\proofname]{\par%
        \pushQED{\qed}%
        \normalfont \topsep6\p@\@plus6\p@\relax%
        \trivlist%
        \item\relax%
        {#1}\hspace\labelsep\ignorespaces%　Removed "\itshape" and "."
    }{%
        \popQED\endtrivlist\@endpefalse%
    }%
    \renewcommand{\proofname}{{\textsf{\gtfamily 証明}}}%
\fi%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End of style file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
