Csimide

Results 7 comments of Csimide

可以通过比对 Citation Style Language 项目的 `locales` 得到完整的映射表 - `en-US` https://github.com/citation-style-language/locales/blob/master/locales-en-US.xml - `zh-CN` https://github.com/citation-style-language/locales/blob/master/locales-zh-CN.xml 实际用到的词语不多,只需要对`等` `卷` `册`处理应该就可以了。 ~~我改了一个支持`第x版` 的,但是不知道为什么工作不正常,~~ 修好了,您可以在 https://gist.github.com/csimide/fc0e3ef69775a69805fc6ba7af227c4c 查看。 理论上这种做法适用于 GB7714-2015 numeric 及其变体,但是由于“方言”很多,不能保证适配所有变体。

请问还有其他测试引文条目吗

目前判断中文的方法非常粗暴,我也不知道好不好用。 `regex("[等卷册和版本章期页篇译间者(不详)]")` 这一段关键字表是我看中文 `locales` 写的。之前看 LaTeX 文稿见过 `日期不详.` 之类的写法,我自己写东西引用的时候发现大部分 CSL 会将未给定的字段直接去除。因此虽然在这里对 `不详` 做了排除,但各种 `不详` 没有加到翻译表里。 我的想法是,如果做了上面的替换后,理论上应该把绝大部分单字多字的提示性文字去掉了。如果还残留有大于两个汉字,那么这条文献应该当作中文文献处理。这是一段“凭感觉”的代码,并不知道是否容易误判。如果有更好的判断方法,建议替换。 > 我刚发现我注释写的是 https://github.com/nju-lug/modern-nju-thesis/blob/8bdf5474b5d985155721ab21da5d38436f6b370b/utils/bilingual-bibliography.typ#L38 但代码写的是 https://github.com/nju-lug/modern-nju-thesis/blob/8bdf5474b5d985155721ab21da5d38436f6b370b/utils/bilingual-bibliography.typ#L40 > > 注释与代码不符,应该改成 `regex("\p{sc=Hani}{2,}")` 才对。 目前还需要大量文献条目测试。我在考虑 https://github.com/nju-lug/modern-nju-thesis/blob/8bdf5474b5d985155721ab21da5d38436f6b370b/utils/bilingual-bibliography.typ#L67 这里有一个 `default`...

> 所以这里我有一个借助闭包来解决这个问题的 workaround。 我偷懒先套娃了( ```typst #bilingual-bibliography( bibliography( "ref.bib", style: "gb-t-7714-2015-numeric-seu.csl" ) ) ```

改了一下,现在支持根据译者数量自动选择 `tran` 还是 `trans` 了。判断数量的方法比较草率,可以看注释。 另外遇到了 `等` 译为 `et al.` 时补 `.` 和空格的问题,把 `等` 也单独做了一个替换逻辑。 ~~特殊情况越做越多,怎么回事呢~~ 已经传到 https://typst.app/project/rN08qR13YfLociKdV7b1Mx (它出现在了我的 typst.app 里)和 https://gist.github.com/csimide/fc0e3ef69775a69805fc6ba7af227c4c 了

The first problem (about "gb-7714-2015-numeric") may be referenced at https://github.com/typst/hayagriva/issues/154 and https://github.com/csimide/SEU-Typst-Template#%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE.

Hello, I would like to use the skew transform implementation code in this issue to add fake italics support to [cuti](https://github.com/csimide/cuti/), a package released under the MIT license. Would it...