Skip to content
Snippets Groups Projects
components.sty 2.16 KiB
Newer Older
\ProvidesExplPackage{profile/components}{2021-09-04}{0.1}{NJU Thesis Undergraduate components configuration} 
Yu Xiong's avatar
Yu Xiong committed
% 图表位置调整
\floatsetup[lstlisting]{ % Captions for lstlistings
	capposition=above,%
	margins=centering,%
	floatwidth=\textwidth%
}
\floatsetup[figure]{ % Captions for figures
	capposition=bottom,%
	margins=centering,%
	floatwidth=\textwidth%
}
\floatsetup[table]{ % Captions for tables
	capposition=above,%
	margins=centering,%
	floatwidth=\textwidth%
}

% 代码样式
\lstset{
	basicstyle=\ttfamily\linespread{1}\selectfont,
    keywordstyle=\bfseries,% use bold style for keywords
    commentstyle=\rmfamily\itshape,% use italic style for comments
    stringstyle=\ttfamily,% 字符串风格
    flexiblecolumns,% ?
    numbers=left,% left-aligned numbering
    showspaces=false,% hide markers for spaces
    showstringspaces=false,
    captionpos=t,% place the caption at the top
	% frame=lrtb,% show all four sides of the frame
	%linewidth=.8\textwidth,
	% breakatwhitespace=true,
Yu Xiong's avatar
Yu Xiong committed
	breaklines=true,
	xleftmargin=2em,xrightmargin=2em,% set the width of the code environment
% 图表标题样式
Yu Xiong's avatar
Yu Xiong committed
\DeclareCaptionFont{songticap}{\zihao{5}\bf\songti}
Yu Xiong's avatar
Yu Xiong committed
\captionsetup{
    font=small,%
Yu Xiong's avatar
Yu Xiong committed
    labelfont=songticap,
Yu Xiong's avatar
Yu Xiong committed
	textfont=songticap,
Yu Xiong's avatar
Yu Xiong committed
	strut=no,%
	hypcap=true, % Links point to the top of the figure
	% indention=0pt, % Suppress indentation
	% % parindent=0pt, % Suppress space between paragraphs
	aboveskip=6pt, % Increase the space between the figure and the caption
	belowskip=6pt, % Increase the space between the caption and the table
}

% list configuration
\renewcommand{\labelitemi}{\small$\blacktriangleright$}
\renewcommand{\labelitemii}{\textbullet}

\setlist[itemize]{noitemsep}
\setlist[enumerate]{noitemsep}
\setlist[description]{noitemsep}

% 数学环境
\newtheorem{example}{} 
\newtheorem{algorithm}{算法}
\newtheorem{theorem}{定理}[section] % 按 section 编号
\newtheorem{definition}{定义}
\newtheorem{axiom}{公理}
\newtheorem{property}{性质}
\newtheorem{proposition}{命题}
\newtheorem{lemma}{引理}
\newtheorem{corollary}{推论}
\newtheorem{remark}{注解}
\newtheorem{condition}{条件}
\newtheorem{conclusion}{结论}
\newtheorem{assumption}{假设}