%# -*- coding: utf-8-unix -*-
%=========================================================================
% instructions.tex for Computer Network Assigenment & Project Instructions
%=========================================================================
% 双面打印
% \documentclass[fontset=fandol]{../format/instructions}
\documentclass[]{instructions}
\addbibresource{../bib/main.bib}  % 导入参考文献数据库
\begin{document}
\pagestyle{empty}
\input{../data/cover}  % 载入封面

%=========================================================================
% 版本声明
\clearpage
\begin{center}
  \Large{\sffamily\bfseries\heiti Version 0.4} \\ \vspace{2em}
  \Large{\sffamily\bfseries\heiti 发布日期: \today} \\ \vspace{1em}
\end{center} 

% \vfill
% \vspace{30em}
% \begin{tabular*}{\textwidth}{ccc}
%   \includegraphics{figure/by-nc.eps}
%   & \begin{minipage}[b]{0.6\textwidth}
%     \small\sffamily
%     本作品采用知识共享 署名-非商业性使用 4.0 国际许可协议进行许可。\\
%     访问~\href{http://creativecommons.org/licenses/by-nc/4.0/}{此链接}~查看该许可协议。
%   \end{minipage}
% \end{tabular*}  

%=========================================================================
% 前言
\thispagestyle{empty}
\frontmatter  % 对前言和概览用罗马数字作为页码
\pagestyle{empty}
\input{../data/preface}

%=========================================================================
% 目录
\cleardoublepage
\pagestyle{empty}
\tableofcontents
\mainmatter	  % 对正文用阿拉伯数字作为页码

%======================================================================
% 正文内容
\pagestyle{fancy}
\setcounter{page}{1}

% “网络抓包与协议分析”
\graphicspath{{../figure/chapters/wireshark/}}
\input{../data/ch_wireshark/preface}
\input{../data/ch_wireshark/sec_arp}
\input{../data/ch_wireshark/sec_ip}
\input{../data/ch_wireshark/sec_tcp}

% “基于套接字的网络程序设计”
\graphicspath{{../figure/chapters/socket/}}
\input{../data/ch_socket/preface}
\input{../data/ch_socket/sec_udp}
\input{../data/ch_socket/sec_web}
\input{../data/ch_socket/sec_smtp}


% “组网基础”
\graphicspath{{../figure/chapters/ensp/}}
\input{../data/ch_ensp/preface}
\input{../data/ch_ensp/sec_static}
\input{../data/ch_ensp/sec_rip}
\input{../data/ch_ensp/sec_ospf}

% “路由器实现”
\graphicspath{{../figure/chapters/router-openbox/}}
\input{../data/ch_router-openbox/preface}
\input{../data/ch_router-openbox/sec_switch}
\input{../data/ch_router-openbox/sec_router}
\input{../data/ch_router-openbox/sec_networking}

% “软件定义网络与网络测量”
\graphicspath{{../figure/chapters/sdn-openbox/}}
\input{../data/ch_sdn-openbox/preface}
\input{../data/ch_sdn-openbox/sec_sdn}
\input{../data/ch_sdn-openbox/sec_topo}
\input{../data/ch_sdn-openbox/sec_ns}


%=========================================================================
% 附录
\appendix
\titleformat{\chapter}[display]{\flushleft}{
  \begin{tikzpicture}
  \node[anchor=south west] (chap) at (0,1.3){
    \Large\heiti {附录\Alph{chapter}}};
  \path [left color=c1,right color=c3] (0,-0.3) rectangle (\textwidth,-0.5);
  \path(0,-0.2);
  \end{tikzpicture}
}{-30mm}{\Huge\heiti}
\titlespacing{\chapter}{0pt}{0pt}{2\baselineskip}
\renewcommand{\thefigure}{\Alph{chapter}--\arabic{figure}}
\renewcommand{\thetable}{\Alph{chapter}--\arabic{table}}
\renewcommand{\chaptername}{附录\Alph{chapter}}

\graphicspath{{../figure/appendixes/ensp/}}
\input{../data/appendix/ensp}

\graphicspath{{../figure/appendixes/openbox/}}
\input{../data/appendix/openbox}

\graphicspath{{../figure/appendixes/fast/}}
\input{../data/appendix/fast}

\backmatter	
%======================================================================
% 参考文献
% \printbibliography[heading=bibintoc]
% \makeatletter
% \makeatother

\end{document}