retorquere / zotero-better-bibtex

Make Zotero effective for us LaTeX holdouts
https://retorque.re/zotero-better-bibtex/
MIT License
5.01k stars 278 forks source link

Treat ideographs as individual words for key generation #1353

Closed forallsunday closed 4 years ago

forallsunday commented 4 years ago

Hi, I love the better bibtex in zotero when citing the references, however, if the title is in Chinese, the citation key will be too long.

For example, if the format is set to ​[auth:lower]_[year]_[shorttitle3_3], then

@phdthesis{liwenhui_2014_HangPaiShiPinZhongYunDongMuBiaoDeJianCeYuGenZongSuanFaYanJiu,
  author = {{李文辉}},
  title = {航拍视频中运动目标的检测与跟踪算法研究},
  type = {{{PhD Thesis}}},
  school = {西安: 西安电子科技大学},
  year = {2014}
}

The spelling is correct, but the citation key is shown as the whole title. Is there anyway to custimize the length of citation key? Something like "liwenhui_2014_HangPaiShiPin", which is keeping the first 4 words having the captical charactors when exporting to bib?

happyTonakai commented 4 years ago

Sure. The debug-ID is Z8EPRB4T-apse.

retorquere commented 4 years ago

I'm getting

@book{oakirahua2019kuchi,
  title = {口译理论研究},
  author = {王斌华},
  date = {2019}
}

for that reference with your settings.

happyTonakai commented 4 years ago

The result you get seems to be Japanese. The correct citekey should be wangbinhua2019kou in Chinese, but I still get wangbinhua2019Kou meaning that :lower has no effect.

blip-bloop commented 4 years ago

:robot: this is your friendly neighborhood build bot announcing test build 5.2.18.6162 ("allow transliteration during key build")

Install in Zotero by downloading test build 5.2.18.6162, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

retorquere commented 4 years ago

Try installing build 6162 and setting the pattern to

[auth:lower][year][Title:split-ideographs:select=1,1:transliterate:lower]
happyTonakai commented 4 years ago

Fail to install build 6162. Error message is as follows.

The add-on "%S" could not be installed. It may be incompatible with this version of Zotero.

I'm using Zotero 5.0.84

blip-bloop commented 4 years ago

:robot: this is your friendly neighborhood build bot announcing test build 5.2.18.6171 ("Merge branch 'master' into gh-1353")

Install in Zotero by downloading test build 5.2.18.6171, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

happyTonakai commented 4 years ago

:transliterate:lower works well for build 6171 :)

retorquere commented 4 years ago

Awesome, thanks, merged to master.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.