hushidong / biblatex-gb7714-2015

A biblatex implementation of the GB/T7714-2015 bibliography style || GB/T 7714-2015 参考文献著录和标注的biblatex样式包
742 stars 83 forks source link

对“参考文献”进行章节编号 #179

Open Stitchiey opened 6 months ago

Stitchiey commented 6 months ago

在编译时,报错LaTeX Error: Command \bibsection undefined.,于是我尝试使用\newcommand\bibsection{\section{\refname}}对参考文献章节进行编号,无果;然后使用\usepackage{xpatch} \xpatchcmd{\thebibliography}{\section}{\section}{}{}对参考文献章节进行编号,仍然没有结果。

sikouhjw commented 6 months ago

在编译时,报错LaTeX Error: Command \bibsection undefined.

那请问为什么会报错?因为你写了 bibtex 下的某些代码,提问请给出 MWE。

问题在于,你写的代码是 bibtex 下的,不适应于 biblatex。biblatex 下的代码请参考

\documentclass{article}
\usepackage[backend=biber,style=gb7714-2015]{biblatex}
\addbibresource[location=local]{gdutthesis-template.bib}
\defbibheading{bibliography}{\section{References}}
\begin{document}
\cite{kennedy1975chalks}
\printbibliography[heading=bibliography]
\end{document}
Stitchiey commented 6 months ago

果然发现我在另一个地方使用了bibtex的代码,问题已解决,谢谢! 另外,请问MWE是什么?

sikouhjw commented 6 months ago

另外,请问MWE是什么?

https://tex.meta.stackexchange.com/questions/3300/minimal-working-example-mwe