替换第一章图片为PDF矢量图,修正一个错字

merge-requests/11/head
xphi 4 years ago
parent a2bd9d2a53
commit 90d5ae0cfb

@ -1,6 +1,6 @@
%# -*- coding: utf-8-unix -*- %# -*- coding: utf-8-unix -*-
%============================================================ %============================================================================
% 基本库 % 基本库
\usepackage{longtable} \usepackage{longtable}
\usepackage{multirow} \usepackage{multirow}
@ -15,8 +15,8 @@
linkcolor=purple,citecolor=red,plainpages=false]{hyperref} linkcolor=purple,citecolor=red,plainpages=false]{hyperref}
\usepackage[centering,a4paper,body={16cm,22cm}]{geometry} \usepackage[centering,a4paper,body={16cm,22cm}]{geometry}
% %============================================================ %============================================================================
% % 配制全局字体 % 配制全局字体
% \setmonofont{inconsolata} % 使用 inconsolata 等宽字体 % \setmonofont{inconsolata} % 使用 inconsolata 等宽字体
% % 使用方正系列字体 % % 使用方正系列字体
@ -33,19 +33,19 @@
% \renewcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋 % \renewcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋
% \renewcommand*{\lishu}{\CJKfamily{zhli}} % 隶书 % \renewcommand*{\lishu}{\CJKfamily{zhli}} % 隶书
%============================================================ %============================================================================
% 配制列表环境 % 配制列表环境
\usepackage{enumitem} \usepackage{enumitem}
\setlist{nosep} % 紧凑间距 \setlist{nosep} % 紧凑间距
\setlist*{leftmargin=*} % 列表和段落头对齐 \setlist*{leftmargin=*} % 列表和段落头对齐
\setlist[1]{labelindent=\parindent} % Only the level 1 \setlist[1]{labelindent=\parindent} % Only the level 1
%============================================================ %============================================================================
% 绘图支持 % 绘图支持
\usepackage{tikz} \usepackage{tikz}
\definecolor{c1}{RGB}{116, 52, 129} %清华紫 \definecolor{c1}{RGB}{116, 52, 129} %清华紫
\definecolor{c2}{RGB}{130, 80, 140} \definecolor{c2}{RGB}{130, 80, 140}
\definecolor{c3}{RGB}{230, 180, 240} \definecolor{c3}{RGB}{230, 180, 240}
%============================================================ %============================================================================
% 定制代码框 % 定制代码框
\usepackage[breakable,minted]{tcolorbox} \usepackage[breakable,minted]{tcolorbox}
\newtcblisting{code}[1][]{ \newtcblisting{code}[1][]{
@ -67,30 +67,30 @@
mathescape mathescape
} }
} }
%============================================================ %============================================================================
% 设置 PDF 文件信息 % 设置 PDF 文件信息
\hypersetup{ \hypersetup{
pdfauthor = {计算机网络教案社区}, pdfauthor = {计算机网络教案社区},
pdftitle = {实验指导书}, pdftitle = {实验指导书},
pdfkeywords = {计算机网络}} pdfkeywords = {计算机网络}}
%============================================================ %============================================================================
% 文档风格 % 文档风格
\ctexset{today=small} \ctexset{today=small}
\ctexset{contentsname=目~~~~录} \ctexset{contentsname=目~~~~录}
\setcounter{secnumdepth}{4} % 章节编号深度 (part 对应 -1) \setcounter{secnumdepth}{4} % 章节编号深度 (part 对应 -1)
\setcounter{tocdepth}{1} % 目录深度 (part 对应 -1) \setcounter{tocdepth}{1} % 目录深度 (part 对应 -1)
%============================================================ %============================================================================
% 每节单独起一页 % 每节单独起一页
\newcommand{\sectionbreak}{\clearpage} \newcommand{\sectionbreak}{\clearpage}
%============================================================ %============================================================================
% 居中章节标题 % 居中章节标题
\newenvironment{pre}{ \newenvironment{pre}{
\titleformat{\chapter}[display]{\centering}{}{-3mm}{\Huge\heiti} \titleformat{\chapter}[display]{\centering}{}{-3mm}{\Huge\heiti}
\titlespacing{\chapter}{0pt}{0pt}{2\baselineskip} \titlespacing{\chapter}{0pt}{0pt}{2\baselineskip}
\chapter{前~~~~言}{} \chapter{前~~~~言}{}
}{} }{}
%============================================================ %============================================================================
% chapter级样式设置 % chapter级样式设置
\ctexset{chapter/name = {第,单元}} \ctexset{chapter/name = {第,单元}}
\titleformat{\chapter}[display]{\flushleft}{ \titleformat{\chapter}[display]{\flushleft}{
@ -102,7 +102,7 @@
\end{tikzpicture} \end{tikzpicture}
}{-30mm}{\Huge\heiti} }{-30mm}{\Huge\heiti}
\titlespacing{\chapter}{0pt}{0pt}{2\baselineskip} \titlespacing{\chapter}{0pt}{0pt}{2\baselineskip}
%============================================================ %============================================================================
% section级样式设置 % section级样式设置
\ctexset{section/break = \Needspace{\textheight}} \ctexset{section/break = \Needspace{\textheight}}
\ctexset{section={ \ctexset{section={
@ -111,7 +111,7 @@
afterskip={1.0ex \@plus .2ex}, afterskip={1.0ex \@plus .2ex},
} }
} }
%============================================================ %============================================================================
% subection级样式设置 % subection级样式设置
\ctexset{subsection={ \ctexset{subsection={
format={\bfseries\heiti\normalsize}, format={\bfseries\heiti\normalsize},
@ -120,7 +120,7 @@
number={\chinese{subsection}~.} number={\chinese{subsection}~.}
} }
} }
%============================================================ %============================================================================
% subsubection级样式设置 % subsubection级样式设置
\ctexset{subsubsection={ \ctexset{subsubsection={
format={\bfseries\bfseries\normalsize}, format={\bfseries\bfseries\normalsize},
@ -129,7 +129,7 @@
number={\arabic{subsection}.\arabic{subsubsection}} number={\arabic{subsection}.\arabic{subsubsection}}
} }
} }
%============================================================ %============================================================================
% paragraph级样式设置 % paragraph级样式设置
\ctexset{paragraph={ \ctexset{paragraph={
format={\normalfont\normalsize}, format={\normalfont\normalsize},
@ -137,7 +137,7 @@
number={\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}} number={\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}}
} }
} }
%============================================================ %============================================================================
% 设置页眉与页脚样式 % 设置页眉与页脚样式
\def\markboxwidth{0.75\textwidth} \def\markboxwidth{0.75\textwidth}
\pagestyle{fancy} \pagestyle{fancy}
@ -152,20 +152,20 @@
\addtolength{\headheight}{2.5pt} \addtolength{\headheight}{2.5pt}
\renewcommand{\footrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}
%============================================================ %============================================================================
% 设置图片的标题样式 % 设置图片的标题样式
\DeclareCaptionFont{heiti}{\heiti} \DeclareCaptionFont{heiti}{\heiti}
\captionsetup{format=plain,labelformat=simple, \captionsetup{format=plain,labelformat=simple,
labelsep=space,justification=centering, labelsep=space,justification=centering,
font={small,heiti}} font={small,heiti}}
\captionsetup[sub]{font=footnotesize} \captionsetup[sub]{font=footnotesize}
%====================================================================== %============================================================================
% 设置图、表的号 % 设置图、表的号
\numberwithin{figure}{section} \numberwithin{figure}{section}
\numberwithin{table}{section} \numberwithin{table}{section}
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{section}--\arabic{figure}} \renewcommand{\thefigure}{\arabic{chapter}.\arabic{section}--\arabic{figure}}
\renewcommand{\thetable}{\arabic{chapter}.\arabic{section}--\arabic{table}} \renewcommand{\thetable}{\arabic{chapter}.\arabic{section}--\arabic{table}}
%====================================================================== %============================================================================
% 设置目录格式 % 设置目录格式
\makeatletter \makeatletter
\renewcommand\tableofcontents{% \renewcommand\tableofcontents{%
@ -177,11 +177,11 @@
} }
\addtocontents{toc}{\let\string\CTEX@spaceChar\relax} \addtocontents{toc}{\let\string\CTEX@spaceChar\relax}
\makeatother \makeatother
%====================================================================== %============================================================================
% 行距缩放 % 行距缩放
\linespread{1.5} \linespread{1.5}
\renewcommand{\arraystretch}{1} \renewcommand{\arraystretch}{1}
%====================================================================== %============================================================================
% 调整附录格式 % 调整附录格式
\let\stdappendix\appendix \let\stdappendix\appendix
\renewcommand{\appendix}{ \renewcommand{\appendix}{

@ -53,29 +53,8 @@ TCP 报文段结构如图\ref{fig:c:wireshark_TCP-structure}所示,
\small \small
\begin{figure}[!ht] \begin{figure}[!ht]
\centering \centering
\begin{code}[text] \includegraphics[width=10cm]{TCP-structure}
0 1 2 3 \caption{TCP报文段结构示意图}
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Acknowledgment Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data | |U|A|P|R|S|F| |
| Offset| Reserved |R|C|S|S|Y|I| Window |
| | |G|K|H|T|N|N| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | Urgent Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
\end{code}
% \includegraphics[width=10cm]{TCP-structure}
\caption{TCP报文段结构标意图}
\label{fig:c:wireshark_TCP-structure} \label{fig:c:wireshark_TCP-structure}
\end{figure} \end{figure}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Loading…
Cancel
Save