\documentclass[oneside,openany]{jsbook}
% 南山大学 理工学部 卒業論文のサンプルファイル
\usepackage[dvipdfmx]{graphicx} % 図にpdf, epsファイルを使う場合
\usepackage{nitSot}          % 情報通信学科 卒業論文用のスタイル
\usepackage{float}  %図を配置するためのパッケージ
\usepackage{latexsym}        % 数学記号を増やすためのパッケージ
\usepackage{amssymb,amsmath} % 複雑な数式を書くためのパッケージ
\usepackage{enumerate}       % enumerate環境を高機能にするためのパッケージ
\usepackage{comment} %複数行をコメントアウトするためのパッケージ
%以下ソースコードを表示するためのパッケージ
\usepackage{listings}
\lstset{
  basicstyle={\ttfamily},
  identifierstyle={\small},
  commentstyle={\smallitshape},
  keywordstyle={\small\bfseries},
  ndkeywordstyle={\small},
  stringstyle={\small\ttfamily},
  frame={tb},
  breaklines=true,
  columns=[l]{fullflexible},
  numbers=left,
  xrightmargin=0zw,
  xleftmargin=3zw,
  numberstyle={\scriptsize},
  stepnumber=1,
  numbersep=1zw,
  lineskip=-0.5ex
}
\renewcommand{\lstlistingname}{プログラム}

% 目次はsectionレベルまで。
% subsectionレベルまで出したいのであれば、次のコマンドを有効にする。
%\setcounter{tocdepth}{2}

\begin{document}

% 表紙
\thispagestyle{empty}
\include{title}

% 要約
\renewcommand{\thepage}{\roman{page}}
\setcounter{page}{1}
\include{summary}

% 目次
\tableofcontents

% 本文
\newpage
\setcounter{page}{1}
\renewcommand{\thepage}{\arabic{page}}
\include{chap1}
\include{chap2}
\include{chap3}
\include{chap4}
\include{chap5}

% 参考文献
\include{ref}

% 付録
\appendix

% プログラムリストを付録に入れる場合：
\chapter{プログラムリスト}   % タイトルだけのページを仮に入れておく
\newpage                     % (目次作成のため)
% (appendA.texを別にコンパイルし、2ページ/枚の形で印刷する)

\setcounter{page}{12}			% 設定したいページ番号
\include{appendB}

\end{document}
