Skip to content

添加 citation-style-language 支持与美术学院脚注引证样式 thuthesis-arts (#844)#1070

Open
Dixiao-L wants to merge 1 commit into
tuna:masterfrom
Dixiao-L:csl-arts
Open

添加 citation-style-language 支持与美术学院脚注引证样式 thuthesis-arts (#844)#1070
Dixiao-L wants to merge 1 commit into
tuna:masterfrom
Dixiao-L:csl-arts

Conversation

@Dixiao-L

@Dixiao-L Dixiao-L commented Jun 6, 2026

Copy link
Copy Markdown

概述

本 PR 在 master(v7.7.1)上引入 citation-style-languageciteproc-lua)参考文献后端,并内置美术学院的脚注引证样式 thuthesis-arts,落实 #844 的需求。

美术学院《研究生学位论文引证规范》要求采用**注释式(note)**引证:正文用带圈上标序号 ①②③,引文以脚注形式置于当页下,参考文献表用方括号 [n] 连续编号、悬挂缩进。这类样式用 BibTeX 难以实现,宜用 CSL(见 #844@zepinglee 的讨论)。

相关功能此前已由 @zepingleecsl 分支 实现(另见 #948,由 @evie-mo 维护),但一直未并入 master。本 PR 将该集成层重建到当前 master,并在原 CSL 基础上增加了中英文双语支持(补上当年“目前只支持英文格式”的缺口)。

改动

  • thuthesis.dtx
    • 参考文献后端回退逻辑增加对 citation-style-language 的判断,避免在已加载 CSL 时仍自动加载 natbib 而冲突。
    • 新增 \AtEndOfPackageFile*{citation-style-language} 钩子,按学位/语言配置参考文献表的字体、条目间距与悬挂缩进。
  • 内置三个 CSL 样式thuthesis-numericthuthesis-author-year@zepinglee 原作)、thuthesis-arts(美术学院,中英双语,注释式)。
  • latexmkrc:新增基于 .ccfcus_dep,使用 CSL 时自动调用 citeproc-lua对默认 BibTeX / BibLaTeX 流程零影响(无 .ccf 不触发,用户无需额外配置)。
  • build.lua:将 *.csl 纳入安装/源文件。
  • thusetup.tex / thuthesis-example.tex:增加 CSL 用法示例(默认仍为 BibTeX)。
  • CHANGELOG.md

用法

% thusetup.tex:注释掉 natbib,启用
\usepackage{citation-style-language}
\cslsetup{style = thuthesis-arts}   % 美术学院
\addbibresource{ref/refs.bib}
% 正文用 \cite{...};用 \printbibliography 输出参考文献表

中文文献在 .bib 条目中设 language = {zh-CN} 即按中文格式排版,英文文献按英文格式。citeproc-lua 已随 TeX Live 2023+ 发行,latexmk 编译时自动调用,无需另装。

测试(TeX Live 2026 / citeproc-lua 0.9.1)

  • thuthesis-arts:正文带圈上标脚注引证 ①②③、再次引证自动简化、方括号悬挂参考文献表,中英双语切换均正常。
  • 用一篇真实的美术学院硕士论文(80 页,中英文混合)完整编译通过:0 个未定义引用、latexmk 自动调用 citeproc-lua,脚注与参考文献表均符合《引证规范》。
  • 回归:默认 BibTeX 示例编译不受影响,不生成 .ccf、不调用 citeproc
  • l3build check:除一个与本改动无关的既有失败(config-crossref/package-hyperref,在 master 上同样失败,系 TeX Live 2026 hyperref 版本漂移)外全部通过。

致谢与署名

Closes #844

Revive the citation-style-language (citeproc-lua) note-style support from
the stale `csl` branch onto v7.7.1 and bundle a bilingual (zh/en) 美术学院
style `thuthesis-arts`, closing tuna#844.

- thuthesis.dtx: don't force natbib when citation-style-language is loaded;
  add the citation-style-language bibliography-formatting hook.
- bundle thuthesis-numeric.csl, thuthesis-author-year.csl (Zeping Lee) and
  thuthesis-arts.csl (bilingual 美术学院 note style; bibliography lists
  Chinese entries before foreign ones per the 《引证规范》).
- latexmkrc: zero-config .ccf-keyed cus_dep auto-runs citeproc-lua only for
  CSL documents; default bibtex/biber workflow is unaffected.
- build.lua: ship *.csl; thusetup/example: document CSL usage.

Co-Authored-By: Zeping Lee <zepinglee@gmail.com>
Co-Authored-By: Evie Mo <105700377+evie-mo@users.noreply.github.com>
@zepinglee

Copy link
Copy Markdown
Contributor

之前需要手动修改 latexmkrc$bibtex 配置才能使用 latexmk 编译,所以一直没合并到 master。后来我想到了生成 .ccf(CSL control file,目前其实是空的),应该可以解决这个问题,但不确定在 overleaf/texpage 等平台能不能用。

我打算在下个大版本 v7.8.0v8.0.0 中合并进 master。

另外关于 CSL 样式,推荐使用最新的 https://zotero-chinese.com/styles/综合性期刊文献引证技术规范(注释)/,这个跟《中国社会科学》(social-sciences-in-china)略有差异。

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

Successfully merging this pull request may close these issues.

美术学院格式支持

2 participants