File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1334,6 +1334,23 @@ \subsubsection{其他配置}
1334
1334
1335
1335
\end {function }
1336
1336
1337
+ \begin {function }[added=2024-05-20]{misc/algorithmSeparation}
1338
+ \begin {bitsyntax }[emph={[1]algorithmSeparation}]
1339
+ floatSeparation = (*(12pt plus 4pt minus 4pt)|\marg {长度}*)
1340
+ \end {bitsyntax }
1341
+
1342
+ \textit {此选项一般不需要用户自行修改。 }
1343
+
1344
+ 此选项用于调整算法与正文之间的距离。距离用\href {https://www.overleaf.com/learn/latex/Lengths_in_LaTeX}{长度}表示,例如 |0.5em| 大致是半个字高。默认值更复杂一些,它表示以12点为基准,允许上下浮动4点。
1345
+
1346
+ (学校既无明文规定,也无实例。)
1347
+
1348
+ 此选项目前只支持 |algorithm2e| 宏包的 |algorithm| 环境。
1349
+
1350
+ \textit {请在导言区使用此选项。 }
1351
+
1352
+ \end {function }
1353
+
1337
1354
\begin {function }[added=2024-04-30, updated=2024-05-13]{misc/tabularRowSeparation}
1338
1355
\begin {bitsyntax }[emph={[1]tabularRowSeparation}]
1339
1356
tabularRowSeparation = (*(1)|\marg {正实数}*)
Original file line number Diff line number Diff line change 736
736
% 浮动体相关的各种间距
737
737
floatSeparation .tl_set:N = \l _@@_misc_float_separation_tl,
738
738
floatSeparation .initial:n = {0},
739
+ algorithmSeparation .tl_set:N = \l _@@_misc_algorithm_separation_tl,
740
+ algorithmSeparation .initial:n = {12pt plus 4pt minus 4pt},
739
741
tabularRowSeparation .tl_set:N = \l _@@_misc_tabular_row_separation_tl,
740
742
tabularRowSeparation .initial:n = {1},
741
743
}
1648
1650
% 调整浮动体与文字之间的距离
1649
1651
\addtolength {\intextsep }{\l _@@_misc_float_separation_tl\baselineskip }
1650
1652
\addtolength {\textfloatsep }{\l _@@_misc_float_separation_tl\baselineskip }
1653
+ % 调整算法与文字之间的距离
1654
+ % 针对 algorithm2e 宏包
1655
+ \@ifpackageloaded {algorithm2e}{
1656
+ % 宏包手册介绍可自定义宏,再`\SetAlgoSkip`;我们为简洁,直接覆写。
1657
+ \renewcommand {\@algoskip }{\vspace {\l _@@_misc_algorithm_separation_tl}}
1658
+ }{}
1651
1659
}
1652
1660
% \end{macrocode}
1653
1661
% \end{macro}
You can’t perform that action at this time.
0 commit comments