Skip to content

Commit b69ca6b

Browse files
committed
添加控制浮动体的选项 free-float
1 parent 19b068e commit b69ca6b

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

example/Qiuyun_Zou.tex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
\gdutsetup{
1313
style = {
1414
cover = {false},
15+
free-float = {true},
1516
font = {times*},
1617
math-font = {times*},
1718
cjk-font = {windows},
@@ -51,6 +52,9 @@
5152
}
5253
}
5354

55+
\usepackage{glossaries}
56+
\renewcommand{\loadglsentries}[1]{}
57+
5458
\begin{document}
5559

5660
\begin{abstract}
@@ -177,7 +181,7 @@ \subsection{最小均方误差估计}{Minimum Mean Square Error Estimation}
177181
差、成功失败误差三种情况,如\autoref{Common_cost_function} 所示。显然,最
178182
小均方误差所选取的代价函数为二次误差型(Quadratic error)。
179183

180-
\begin{figure}[htbp]
184+
\begin{figure}
181185
\subfloat[Quadratic error]{\label{Quadratic_error}
182186
\includegraphics[width=0.3\textwidth]{example-image-a.pdf}
183187
}
@@ -199,7 +203,7 @@ \section{应用:Massive MIMO 信号检测}{Application in Massive MIMO Signal
199203
VAMP算法,其计算量主要集中在矩阵求逆部分,假设迭代次数为 $T$,则其计算复杂度
200204
$\mscr O(TN^3)$。对比各检测器的计算复杂度,得到\autoref{Comparison_diagram_of_computational_complexity_of_detector}。
201205

202-
\begin{table}[htbp]
206+
\begin{table}
203207
\bicaption{检测器计算复杂度对比图}{Comparison diagram of computational complexity of detector}
204208
\label{Comparison_diagram_of_computational_complexity_of_detector}
205209
\begin{tabular}{cc}

gdutthesis.cls

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@
397397
\bool_if:NT \g__gdut_draft_bool { \geometry { showframe } }
398398
\bool_new:N \l__gdut_cover_bool
399399
\bool_new:N \l__gdut_open_bool
400+
\bool_new:N \l__gdut_free_float_bool
400401
\keys_define:nn { gdut / style }
401402
{
402403
cover .choice:,
@@ -411,6 +412,12 @@
411412
{ \bool_set_true:N \l__gdut_open_bool },
412413
open / false .code:n =
413414
{ \bool_set_false:N \l__gdut_open_bool },
415+
free-float .choice:,
416+
free-float .value_required:n = true,
417+
free-float / true .code:n =
418+
{ \bool_set_true:N \l__gdut_free_float_bool },
419+
free-float / false .code:n =
420+
{ \bool_set_false:N \l__gdut_free_float_bool },
414421
}
415422
\tl_new:N \g__gdut_fontset_tl
416423
\tl_new:N \g__gdut_math_fontset_tl
@@ -1159,10 +1166,23 @@
11591166
\def\@floatboxreset{\centering}%
11601167
}
11611168
\AtBeginEnvironment{table}{\small}
1162-
\cs_set:Npn \@float #1
1169+
\ctex_at_end_preamble:n
11631170
{
1164-
\edef\reserved@a{\noexpand\@xfloat{#1}[\csname fps@#1\endcsname]}
1165-
\reserved@a
1171+
\bool_if:NT \l__gdut_free_float_bool
1172+
{
1173+
\NewDocumentCommand \gdut@xfloat { m o } { \@xfloat #1 [tbp] }
1174+
\def \@float #1
1175+
{
1176+
\@ifnextchar[
1177+
{
1178+
\gdut@xfloat{#1}
1179+
}
1180+
{
1181+
\edef\reserved@a{\noexpand\@xfloat{#1}[\csname fps@#1\endcsname]}
1182+
\reserved@a
1183+
}
1184+
}
1185+
}
11661186
}
11671187
\clist_map_inline:nn
11681188
{
@@ -1792,6 +1812,7 @@
17921812
{
17931813
style / cover = false,
17941814
style / open = true,
1815+
style / free-float = true,
17951816
style / font = times,
17961817
style / math-font = times,
17971818
style / cjk-font = fandol,

main.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
cover = {false},
2626
open = {true},
2727
% open = {false},
28+
free-float = {true},
29+
% free-float = {false},
2830
% font = {garamond},
2931
% font = {libertinus},
3032
% font = {lm},

user-manual/gdutthesis.dtx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,16 +1027,21 @@ Copyright (C) 2017&ndash;2021 by Xiangdong Zeng <xdzeng96@gmail.com>.
10271027
% \begin{fdusyntax}[emph={[1]cover}]
10281028
% cover = (*<true|(false)>*)
10291029
% \end{fdusyntax}
1030-
%^^A-
10311030
% 设置是否输出封面。
10321031
% \end{function}
10331032
%
10341033
% \begin{function}{style/open}
10351034
% \begin{fdusyntax}[emph={[1]open}]
10361035
% open = (*<(true)|false>*)
10371036
% \end{fdusyntax}
1038-
%^^A-
1039-
% 设置是否不分奇偶页输出新的一章,|true| 为任意页可输出新的一章,|false| 为奇数页输出新的一章。
1037+
% 设置是否不分奇偶页输出新的一章。|true| 为任意页可输出新的一章,|false| 为奇数页输出新的一章。
1038+
% \end{function}
1039+
%
1040+
% \begin{function}{style/free-float}
1041+
% \begin{fdusyntax}[emph={[1]free-float}]
1042+
% free-float = (*<(true)|false>*)
1043+
% \end{fdusyntax}
1044+
% 设置是否允许浮动体自由浮动。|true| 表示让浮动体自由浮动,|false| 表示可以用浮动体选项限制浮动体的位置。
10401045
% \end{function}
10411046
%
10421047
% \begin{function}{style/font,style/math-font}

0 commit comments

Comments
 (0)