Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 支持不编号的\pubsection* #567

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading