记录gb7714-bilingual并整理其它方法#139
Conversation
✅ Deploy Preview for luxury-mochi-9269a9 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
c4f12cf to
f6e93b7
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds documentation for the gb7714-bilingual package as a third method to fix the "et al." language issue in Chinese/English mixed bibliographies. It also introduces infrastructure to install local Typst packages (specifically citext) for testing the documented solutions.
Changes:
- Added a new shell script to install citext as a local package for use in documentation examples
- Integrated the installation script into GitHub workflows and Netlify build process
- Significantly expanded the FAQ documentation to comprehensively cover three methods for handling bilingual bibliography issues, including the newly documented gb7714-bilingual package
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/install-typst-local-packages.sh | New script to download and install citext v0.4.0 as a local package for documentation examples |
| netlify.toml | Added call to install-typst-local-packages.sh in the build command |
| .github/workflows/check.yml | Added step to run install-typst-local-packages.sh before building |
| .github/workflows/build.yml | Added step to run install-typst-local-packages.sh before building |
| docs/FAQ/bib-etal-lang.md | Extensively expanded documentation to cover three methods (character replacement, citext, and gb7714-bilingual) with detailed pros/cons, examples, and technical explanations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
db6c324 to
73aa5fc
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also update typst from v0.14.1 to v0.14.2.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@lucifer1004 与 @Shuenhoy,过年好!这个 PR 涉及你们做的项目,而且包含比较主观的评价。如果最近一两周有空,欢迎审核! 具体操作建议:
|
|
|
||
| 更多细节请阅读 [gb7714-bilingual – Typst Universe](https://typst.app/universe/package/gb7714-bilingual)。 | ||
|
|
||
| 另外还可使用同作者开发的 [citrus](https://typst.app/universe/package/citrus)(又名 citeproc-typst),原理相同,支持一般 CSL,但因为代码逻辑更复杂而性能相对低下。 |
There was a problem hiding this comment.
citrus 的原理并不相同。
gb7714-bilingual 是手工实现规则;citrus 是完整解析 CSL 宏,通过实际运行宏来渲染引用和文献列表。
There was a problem hiding this comment.
有道理;那说“原理类似,支持一般CSL”可以吗?或者怎么表达?
There was a problem hiding this comment.
感觉 Citrus 需要单开一个 section,因为是唯一一个真正在 Typst 内部实现 CSL macro expansion 的解决方案。
There was a problem hiding this comment.
唔,这则FAQ的目的是解决“等”“et al.”问题。如果我理解得没问题,对于国标样式,citrus相对gb7714-bilingual没有优势?若确实如此,那我认为citrus在FAQ不该专门列出;以后在 news 那边可以单独列。
| 这种方法简单快速,能覆盖大部分场景。 | ||
| - **优点** | ||
| - 简单快速,能覆盖大部分场景 | ||
| - 不会增加格式问题 |
There was a problem hiding this comment.
“格式问题”指某处少个逗号、URL链接错误之类的细节。“不会增加格式问题”表示只会改正“等”“et al.”问题,不会导致其它地方出现新的问题。citext换了引擎和CSL,gb7714-bilingual换了整套实现方法,所以输出结果和原来没有任何关系,无法保证不增加格式问题。
之所以专门拿这一点出来说,是因为有时候会主动过拟合,比如把某段内容特意写到错误的字段。这种时候用modern-nju-thesis最保险。
这里举不出具体的“格式问题”,因为一旦举出来就能解决了,比如gb7714-bilingual那边的 pku-typst/gb7714-bilingual#8 (comment) 和 pku-typst/gb7714-bilingual#1 。
你们觉得呢?需要删去这一点,还是怎么改呢?
There was a problem hiding this comment.
“不会引入与依语言决定渲染无关的额外格式错误”之类的?
Resolves #130
预览:https://deploy-preview-139--luxury-mochi-9269a9.netlify.app/FAQ/bib-etal-lang.html#%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E8%8B%B1%E6%96%87%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E4%B8%AD%E7%9A%84-%E7%AD%89
比较各方法的性能
{nju,citext,gb7}.typ就是那三个“完整测试例子”,min.typ是把nju.typ简化到Typst内置方式。另外,据 https://github.com/Shuenhoy 反映,有时候gb7714-bilingual反而比原生还快。