Skip to content

Commit

Permalink
feat: 支持不编号的\pubsection*
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 committed Jan 2, 2025
1 parent c5c88e3 commit 7d372ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion bithesis-doc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ \subsection{后置部分}
用于添加个人成果,添加过的成果可以通过 |printbibliography| 打印。
\end{function}

\begin{function}[added=2022-10-23]{\pubsection}
\begin{function}[added=2022-10-23, updated=2025-01-02]{\pubsection}
\begin{bitsyntax}[emph={[1]publications,pubsection,printbibliography}]
\begin{publications}
\addpubs{\meta{引用内容的key},\meta{引用内容的key2}}
Expand All @@ -1835,6 +1835,8 @@ \subsection{后置部分}

\textit{在「攻读学位期间发表论文与研究成果清单」环境中使用。}
用于添加分类的目录。

|\pubsection| 会编号;若不想编号,请改用 |\pubsection*|。
\end{function}

\begin{function}[added=2022-10-23]{\Author,\AuthorEn}
Expand Down
11 changes: 7 additions & 4 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -3133,15 +3133,18 @@
% \begin{macro}{\pubsection}
% 设置小标题。
% \begin{macrocode}
\NewDocumentCommand \pubsection {m} {
\NewDocumentCommand \pubsection {s m} {
{
% 自增计数器
\par\stepcounter{pub}
\par
\IfBooleanF {#1} {
% 自增计数器
\stepcounter{pub}
}
% 设置小标题,暂时没有考虑英文模式
\noindent
\textbf{
\heiti{
\zhnumber{\thepub}、#1
\IfBooleanF {#1} {\zhnumber{\thepub}、}#2
}
}\par
}
Expand Down

0 comments on commit 7d372ea

Please sign in to comment.