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

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

Open
Stitchiey opened this issue Dec 30, 2023 · 3 comments
Open

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

Stitchiey opened this issue Dec 30, 2023 · 3 comments

Comments

@Stitchiey
Copy link

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

@sikouhjw
Copy link

在编译时,报错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
Copy link
Author

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

@sikouhjw
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants