Skip to content

Commit

Permalink
报告添加条件编译,允许切换为不生成算法源码的模式
Browse files Browse the repository at this point in the history
  • Loading branch information
miRoox committed Dec 19, 2019
1 parent 842efb4 commit 2d0606f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions report/report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@
\usepackage[section]{placeins}
\usepackage{tikz}
\usepackage{makecell}
\usepackage[outputdir={out}]{minted}% 代码高亮,需要Pygments
\usepackage{url}

\newtoggle{nocode}
\settoggle{nocode}{false}
\nottoggle{nocode}{
\usepackage[outputdir={out}]{minted}% 代码高亮,需要Pygments
% C++代码高亮
\newmintedfile[cppfile]{cpp}{linenos,mathescape,fontsize=\footnotesize}
}{}

\usetikzlibrary{shapes,arrows,chains,fit,positioning,backgrounds}

\hitgsrepset{
Expand All @@ -28,9 +35,6 @@
section/format=\Large\bfseries
}

% C++代码高亮
\newmintedfile[cppfile]{cpp}{linenos,mathescape,fontsize=\footnotesize}

\renewcommand\thesubfigure{(\alph{subfigure})} % 得到“图 1(a)”形式的引用

% \newcommand{\todo}{{\emph{待完善}\par}}
Expand Down Expand Up @@ -287,6 +291,7 @@ \section{结果分析与讨论}
不会出现全局直方图均衡化那样减弱背景和目标区分度的情况。
不过,由于目标和背景之间的边界处也会存在满足条件的对比度情况,因此局部统计增强可能导致目标边界的背景被增强,形成一道不太协调的灰色轮廓。

\nottoggle{nocode}{
\appendix

\section{算法源码}
Expand All @@ -305,5 +310,6 @@ \section{算法源码}
\noindent 源文件\textbf{algorithms.cpp}:

\cppfile{../DIP-src/algorithms.cpp}
}{}

\end{document}

0 comments on commit 2d0606f

Please sign in to comment.