Skip to content

Commit

Permalink
remove vertical space above and below listings environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Kin committed Jul 31, 2021
1 parent 595a0f8 commit 41c1ade
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
8 changes: 7 additions & 1 deletion LaTeXTemplates/ClsStyle/ClsStyle.tex
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
\section{图片测试}
\begin{figure}[h]
\centering
\includegraphics[scale=0.8]{SampleImage}
\includegraphics[scale=0.95]{SampleImage}
\caption{示例图片}
\end{figure}

Expand All @@ -163,7 +163,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{enumerate}

\subsection{默认无序列表}
Expand All @@ -172,7 +174,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{itemize}

\subsection{自定义标签有序列表(enumitem)}
Expand All @@ -181,7 +185,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{enumerate}

\section{下划线测试(ulem)}
Expand Down
8 changes: 7 additions & 1 deletion LaTeXTemplates/ClsStyleLight/ClsStyleLight.tex
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
\section{图片测试}
\begin{figure}[h]
\centering
\includegraphics[scale=0.8]{SampleImage}
\includegraphics[scale=0.95]{SampleImage}
\caption{示例图片}
\end{figure}

Expand All @@ -158,7 +158,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{enumerate}

\subsection{默认无序列表}
Expand All @@ -167,7 +169,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{itemize}

\subsection{自定义标签有序列表(enumitem)}
Expand All @@ -176,7 +180,9 @@
\item test测试
\item 测试
\item 测试test
\item The quick brown fox jumps over the lazy dog.
\item 滚滚长江东逝水,浪花淘尽英雄。是非成败转头空,青山依旧在,几度夕阳红。白发渔樵江渚上,惯看秋月春风。一壶浊酒喜相逢,古今多少事,都付笑谈中。
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{enumerate}

\section{下划线测试(ulem)}
Expand Down
4 changes: 3 additions & 1 deletion PublicResources/DocClass.cls
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
}

% -----------------------------------------------
% 清除双面排版时封面和目录后的空白页的设定
% 抑制双面排版时封面和目录后的空白页的设定
% -----------------------------------------------
\if@twoside
% 重定义 \frontmatter 命令
Expand Down Expand Up @@ -374,6 +374,8 @@
backgroundcolor=\color{gray!5}, % 代码框背景颜色:5% 的灰色。
breaklines=true,% 代码过长时则换行。
gobble=8, % 去掉代码前多余的缩进,默认行头和代码的缩进距离为 0。
aboveskip=0pt, % listings 环境上方的垂直空间。
belowskip=0pt, % listings 环境下方的垂直空间。
}

% -----------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion PublicResources/DocClassLight.cls
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
}

% -----------------------------------------------
% 清除双面排版时封面和目录后的空白页的设定
% 抑制双面排版时封面和目录后的空白页的设定
% -----------------------------------------------
\if@twoside
% 重定义 \frontmatter 命令
Expand Down Expand Up @@ -337,6 +337,8 @@
backgroundcolor=\color{gray!5}, % 代码框背景颜色:5% 的灰色。
breaklines=true,% 代码过长时则换行。
gobble=8, % 去掉代码前多余的缩进,默认行头和代码的缩进距离为 0。
aboveskip=0pt, % listings 环境上方的垂直空间。
belowskip=0pt, % listings 环境下方的垂直空间。
}

% -----------------------------------------------
Expand Down

0 comments on commit 41c1ade

Please sign in to comment.