Skip to content

Commit

Permalink
fix: 修复英文标题引发的封面和摘要页问题 (#217,#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
atxy-blip committed Aug 21, 2023
1 parent 27be21e commit 3d40c5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

- 整合表格环境字体设置 - [#94]

### 修复

- 修复英文标题超长引发的页面元素混乱 - [#217]
- 修复英文标题手动换行与摘要页的冲突 - [#227]

## [1.3.0] - 2023-06-06

### 新增
Expand Down
24 changes: 14 additions & 10 deletions source/njuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ To produce the documentation run the original source files ending with
% \file{njuthesis.dtx}\TblrNote{a} & 文档类源代码 \\
% \file{njuthesis.ins}\TblrNote{a} & 文档类安装脚本 \\
% \file{njuthesis.pdf} & 用户手册(本文档) \\
% \file{njuthesis-doc.cls} & 用户手册样式 \\
% \file{njuthesis-sample.bib} & 示例参考文献列表 \\
% \file{njuthesis-sample.tex} & 示例文档,不妨以此为基础撰写论文 \\
% \file{njuthesis-graduate.def} & 研究生参数配置文件 \\
Expand Down Expand Up @@ -3459,8 +3460,8 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_title:N #1
{
\@@_get_width:NV \l_@@_tmpa_dim #1
\hbox:n { \@@_uuline:N \l_@@_tmpa_dim #1 }
\@@_get_width:NV \l_@@_tmpa_dim #1
\@@_uuline:N \l_@@_tmpa_dim #1
}
% \end{macrocode}
% \end{macro}
Expand Down Expand Up @@ -6708,6 +6709,7 @@ To produce the documentation run the original source files ending with
% \end{macro}
%
% \subparagraph{英文封面} 包括标题、顶部、中部、校徽、底部。
% \changes{v1.4}{2023/08/21}{修复英文标题超长引发的页面元素混乱。}
%
% \begin{macro}{g/cover-en/title}
% 研究生英文封面标题实例。
Expand All @@ -6716,7 +6718,7 @@ To produce the documentation run the original source files ending with
{
content = \g_@@_info_title_en_tl,
format = \bf \sffamily \zihao { 2 },
bottom-skip = 2 cm
bottom-skip = 1 cm plus 1 fil minus .5 cm
}
% \end{macrocode}
% \end{macro}
Expand All @@ -6736,7 +6738,7 @@ To produce the documentation run the original source files ending with
\textsf { \g_@@_info_supv_en_tl
\tex_par:D \g_@@_info_supvii_en_tl },
format = \zihao { 4 },
bottom-skip = 0 pt plus 1.2 fil minus 1 cm
bottom-skip = 1 cm plus 1 fil minus .5 cm
}
% \end{macrocode}
% \end{macro}
Expand All @@ -6750,7 +6752,7 @@ To produce the documentation run the original source files ending with
\c_@@_text_cover_en_tl \@@_vskip:
\group_begin: \scshape \g_@@_info_degree_en_tl \group_end:
\@@_vskip: { in } \@@_vskip: \g_@@_info_major_en_tl,
bottom-skip = 2 cm
bottom-skip = .5 cm plus 1 fil
}
% \end{macrocode}
% \end{macro}
Expand All @@ -6761,7 +6763,7 @@ To produce the documentation run the original source files ending with
\@@_declare_element:nn { g / cover-en / emblem-img }
{
content = \@@_emblem:N \c_@@_emblemwdii_dim,
bottom-skip = 1.5 cm
bottom-skip = 1 cm minus .5 cm
}
% \end{macrocode}
% \end{macro}
Expand Down Expand Up @@ -7581,10 +7583,6 @@ To produce the documentation run the original source files ending with
\@@_make_cover:
}
% \end{macrocode}
% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
% \begin{macrocode}
\tl_remove_all:Nn \g_@@_info_title_tl { \\ }
% \end{macrocode}
% 如果在选择了 \opt{decl-page},就生成本科生的诚信承诺书,
% 或研究生的原创性声明和出版授权书。
% \begin{macrocode}
Expand Down Expand Up @@ -7963,6 +7961,7 @@ To produce the documentation run the original source files ending with
\cleardoublepage
\thispagestyle { plain }
\@@_abs_bookmark:Vn \c_@@_name_abstracta_tl { abstract }
\tl_gremove_all:Nn \g_@@_info_title_tl { \\ }
\@@_make_abstract:
\group_begin: \kaishu \zihao { -4 } #1
}
Expand All @@ -7978,6 +7977,11 @@ To produce the documentation run the original source files ending with
\cleardoublepage
\thispagestyle { plain }
\@@_abs_bookmark:Vn \c_@@_name_abstracta_en_tl { abstract-en }
% \end{macrocode}
% \changes{v1.4}{2023/08/21}{修复英文标题手动换行与摘要页的冲突。}
% 生成封面后清除标题中的换行控制符,便于在摘要中输出。
% \begin{macrocode}
\tl_gremove_all:Nn \g_@@_info_title_en_tl { \\ }
\@@_make_abstract_en:
\group_begin: \zihao { -4 } #1
}
Expand Down

0 comments on commit 3d40c5e

Please sign in to comment.