From c8cf84853a83643aee050207a90db9b236b0b4ac Mon Sep 17 00:00:00 2001 From: Alexara Wu Date: Sat, 23 Sep 2023 13:23:26 +0800 Subject: [PATCH] Remove `listings` presets --- sjtutex/source/sjtutex.dtx | 30 ------------------------------ sjtutex/support/common-package.tex | 26 ++++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/sjtutex/source/sjtutex.dtx b/sjtutex/source/sjtutex.dtx index 0bed9530..8d1ced24 100644 --- a/sjtutex/source/sjtutex.dtx +++ b/sjtutex/source/sjtutex.dtx @@ -5214,36 +5214,6 @@ } % \end{macrocode} % -% \subsubsection{\pkg{listings} 宏包} -% \begin{macrocode} -\ctex_at_end_package:nn { listings } - { - \lstdefinestyle { lstStyleCode } - { - aboveskip = \medskipamount , - belowskip = \medskipamount , - basicstyle = \ttfamily \zihao { 6 } , - commentstyle = \slshape \color { black!60 } , - stringstyle = \color { green!40!black!100 } , - keywordstyle = \bfseries \color { blue!50!black } , - extendedchars = false , - upquote = true , - tabsize = 2 , - showstringspaces = false , - xleftmargin = 1 em , - xrightmargin = 1 em , - breaklines = false , - framexleftmargin = 1 em , - framexrightmargin = 1 em , - backgroundcolor = \color { gray!10 } , - columns = flexible , - keepspaces = true , - texcl = true , - mathescape = true - } - } -% \end{macrocode} -% % \subsubsection{\pkg{nomencl} 宏包} % \begin{macrocode} \ctex_at_end_package:nn { nomencl } diff --git a/sjtutex/support/common-package.tex b/sjtutex/support/common-package.tex index 223dae72..741b39ff 100644 --- a/sjtutex/support/common-package.tex +++ b/sjtutex/support/common-package.tex @@ -2,8 +2,30 @@ \usepackage[perpage,bottom,hang]{footmisc} \usepackage[ruled,vlined,linesnumbered]{algorithm2e} \usepackage{listings} -\lstnewenvironment{codeblock}[1][]% - {\lstset{style=lstStyleCode,#1}}{} +\lstdefinestyle{lstStyleCode}{% + aboveskip = \medskipamount, + belowskip = \medskipamount, + basicstyle = \ttfamily\zihao{6}, + commentstyle = \slshape\color{black!60}, + stringstyle = \color{green!40!black!100}, + keywordstyle = \bfseries\color{blue!50!black}, + extendedchars = false, + upquote = true, + tabsize = 2, + showstringspaces = false, + xleftmargin = 1em, + xrightmargin = 1em, + breaklines = false, + framexleftmargin = 1em, + framexrightmargin = 1em, + backgroundcolor = \color{gray!10}, + columns = flexible, + keepspaces = true, + texcl = true, + mathescape = true +} +\lstnewenvironment{codeblock}[1][]{% + \lstset{style=lstStyleCode,#1}}{} \usepackage{booktabs} \usepackage{longtable} \usepackage{threeparttable}