andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
84 stars 9 forks source link

Editor label in Chinese citations are positioned wrongly #126

Closed sati-bodhi closed 1 year ago

sati-bodhi commented 1 year ago

So I have the following reference,

@book{李學勤_字源_2013,
  title = {字源},
  editor = {{李學勤} and {趙平安}},
  date = {2013},
  publisher = {{天津古籍出版社;遼寧人民出版社}},
  file = {/home/sati/Zotero/storage/XVPJWHXA/李學勤-2013-字源.pdf}
}

cited using this csl style tsinghua.txt (!! Rename .txt back to .csl !!)

which produces this result:

 編李學勤、趙平安,《字源》(天津古籍出版社;遼寧人民出版社,2013)

The correct order should be:

李學勤、趙平安編,《字源》(天津古籍出版社;遼寧人民出版社,2013)

with the editor label coming after the authors' name.

Below is the return value from citeproc-render-citations:

(editor ((name-id . 0) . #131=((family . #45="李學勤"))) ((name-id . 1) . #132=((family . #46="趙平安"))))) :rawcite (nil (nil (((rendered-var . editor)) #47="編" (((rendered-names)) (((name-id . 0)) (nil #45#)) #48# (((name-id . 1)) (nil #46#)))) #49# (nil #50# (((rendered-var . title)) #44#) #51#)) (nil #52# (nil (nil (((rendered-var . publisher)) #43#) #53# (((rendered-var . issued)) "2013"))) #54#)) :rawbibitem nil :rc-uptodate t :sort-key ("編李學勤、趙平安" "70130000" "《字源》") :occurred-before 1 :disamb-pos first :subbib-nos nil))

The same reference is rendered correctly with the present citation style in Zotero.

Screenshot from 2022-12-10 00-54-49

andras-simonyi commented 1 year ago

Thanks for the report, will try to look into the problem shortly.

andras-simonyi commented 1 year ago

The problem was caused by a change in the CSL standard -- 1.0.2 handles label positioning slightly differently than 1.0.1. Should be fixed by PR #127, which I've just merged.