retorquere / zotero-better-bibtex

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

Citing BibTeX @mastersthesis in Chinese #1677

Closed sati-bodhi closed 4 years ago

sati-bodhi commented 4 years ago

I am opening an issue here in regard to this Zotero forum question, as instructed. https://forums.zotero.org/discussion/85581/citing-mastersthesis-in-bibtex#latest

There is no ""Report Better BibTeX error" on the help menu, so I am submitting the debug log through the specific reference link instead.

圖片

This is actually not a Bug; more like a Feature Request, but I couldn't figure out how to change the label.

I would like to propose support for Chinese thesis type to be recognized, together with PhD and Masters for the appropriate BBT export. (Since Zotero exports the thesis type as PhD by default, only Masters Thesis would be of issue over here. )

Please verify all of the below before submitting:

  1. you have picked the right category for the issue in the previous screen.
  2. You are on the latest release of Zotero
  3. in the Zotero addons screen you can see that you have the latest release of BBT (https://github.com/retorquere/zotero-better-bibtex/releases/latest)
  4. you are posting a single bug or feature request.
  5. the issue has a subject that succinctly describes the problem or question.
  6. you are available for follow-up questions and testing.
  7. you have attached a copy of the BibTeX you were trying to import to this issue.
  8. you have included an error-report ID here generated by restarting Zotero with debugging enabled (Help -> Debug Output Logging -> Restart with logging enabled), reproducing your problem, and selecting "Report Better BibTeX error" from the help menu.

I AM NOT KIDDING ABOUT THIS. PLEASE INCLUDE A DEBUG LOG. I WILL END UP ASKING FOR IT ANYWAY

Picking the right issue category is really important. Each category (Export, General error, Import, Key generation, Question) has different instructions for gathering the data necessary required to resolve the issue you are experiencing

The error-report is important; it gives me your current BBT settings and a log of what Zotero was doing at the time of import. Without it, I'm effectively blind.

Report ID: BIPACFLA-apse Full Bib(La)TeX item you are trying to import:

@phdthesis{宋曄LiangJinNanBeiZhaoJingXueBoShiKaoLun2013,
  title = {兩晉南北朝經學博士考論},
  author = {宋曄},
  year = {2013},
  keywords = {“征而不就”,Confucian classics studies,Doctors of the Confucian classics studies,Doctors who were appointed but not worked in the folk,Jin,Southern and Northern Dynasties,两晋南北朝,兩晉南北朝;經學博士;經學;“征而不就”,经学,经学博士},
  school = {山東大學},
  type = {碩士}
}

Expected behavior: 「碩士」thesis type should be exported as masters thesis. Actual behavior: All thesis type are exported as PhD by default, with the exception of "Masters" and "MA" in English.

It is important to preserve the type field in Chinese for citation purposes, especially when that is through Zotero itself, which doesn't differentiate between @phdthesis and @mastersthesis.

The respective values for thesis type MA or Masters in Chinese are 碩士 or 硕士 in traditional and simplified Chinese. Because different people may cite this with different variations, such as: 「碩士論文」、「碩士學位」、「碩論」etc., the code can just look out for the keyword or for masters and for PhD.

label-gun[bot] commented 4 years ago

It looks like you did not upload an debug report. The debug report is important; it gives @retorquere your current BBT settings and a copy of the problematic reference as a test case so he can best replicate your problem. Without it, @retorquere is effectively blind. Debug reports are useful for both bug analysis and enhancement requests; in the case of export enhancements, I need the copy of the references you have in mind.

This request is much more likely than not to apply to you, too, even if you think it unlikely, and even if it does not, there's no harm in sending a debug log that turns out to be unnecessary. @retorquere will more often than not just end up saying "please send a debug log first". Let's just skip over the unnecesary delay this entails. Sending a debug log is very easy:

  1. If your issue relates to how BBT behaves around a specific reference(s), such as citekey generation or export, select at least one of the problematic reference(s), right-click it, and submit an BBT debug report from that popup menu. If the problem is with export, please do include a sample of what you see exported, and what you expected to see exported for these references.

  2. If the issue does not relate to references and is of a more general nature, generate an debug report by restarting Zotero with debugging enabled (Help -> Debug Output Logging -> Restart with logging enabled), reproducing your problem, and selecting "Send Better BibTeX debug report..." from the help menu.

Once done, you will see a debug ID in red. Please post that debug id in the issue here.

Thank you!

sati-bodhi commented 4 years ago

Original post has been updated.

retorquere commented 4 years ago

I cannot access Zotero debug reports (the ones that look like D<number>. Unless BBT is not working for you, following description 1 as described by label-gun will give you an option to Better BibTeX -> Send debug log.

sati-bodhi commented 4 years ago

Is this BIPACFLA-apse the right Report-ID you need?


I just realized that BibLaTeX offers the Thesis field which is similar to Zotero:

圖片

Since I actually use BibLaTeX (i.e. Biber) rather than BibTeX to process my documents, it seems more logical for my Zotero exports of the Thesis type to default to @thesis rather than @phdthesis.

If this can be done, there would not be a need to for this enhancement because I can let English references be funneled to @phdthesis or @mastersthesis according to the specific strings in the type field, while allow Chinese references to be export as @thesis in general. Differentiating between PhD and MA in Chinese in the citation style using the type field would be trivial.

retorquere commented 4 years ago

Is this BIPACFLA-apse the right Report-ID you need?

Yes, thank you.

Since I actually use BibLaTeX (i.e. Biber) rather than BibTeX to process my documents, it seems more logical for my Zotero exports of the Thesis type to default to @thesis rather than @phdthesis.

For me, this is what happens for the item you sent in the debug log. It exports to

@thesis{soye2013,
  author = {宋曄},
  date = {2013},
  institution = {{山東大學}},
  keywords = {“征而不就”,Confucian classics studies,Doctors of the Confucian classics studies,Doctors who were appointed but not worked in the folk,Jin,Southern and Northern Dynasties,两晋南北朝,兩晉南北朝;>經學博士;經學;“征而不就”,经学,经学博士},
  type = {碩士},
  title = {兩晉南北朝經學博士考論}
}

If you set type to phd or masters (or phdthesis, or ma, or master), the entry type changes accordingly, but anything else in the type field leaves it as @thesis.

sati-bodhi commented 4 years ago

For me, this is what happens for the item you sent in the debug log. It exports to

@thesis{soye2013,
  author = {宋曄},
  date = {2013},
  institution = {{山東大學}},
  keywords = {“征而不就”,Confucian classics studies,Doctors of the Confucian classics studies,Doctors who were appointed but not worked in the folk,Jin,Southern and Northern Dynasties,两晋南北朝,兩晉南北朝;>經學博士;經學;“征而不就”,经学,经学博士},
  type = {碩士},
  title = {兩晉南北朝經學博士考論}
}

If you set type to phd or masters (or phdthesis, or ma, or master), the entry type changes >accordingly, but anything else in the type field leaves it as @thesis.

I think I have been unaware of and confused about the differences between bibtex and biblatex prior to this and did not realize that I have been using the Better BibTeX format to export my citations all along! Switching to BibLaTeX matches your result.

There are nonetheless a couple of issues. The following references have been exported as @phdthesis. (Report ID: ENM2WNCT-apse)

@phdthesis{HerPhenomenological1990,
  title = {A phenomenological explication of shame in a shame culture: {{A}} cross-cultural perspective.},
  shorttitle = {A phenomenological explication of shame in a shame culture},
  author = {Her, Emily Huei-ling},
  date = {1990},
  institution = {{Southern Illinois University at Carbondale}},
  location = {{Carbondale, IL}},
  abstract = {Shame is a central human experience. The understanding of shame, however, is limited to either its cognitive (objective aspect of the experience) or affective (subjective aspect of the experience) meanings. An existential phenomenological investigation of shame offers the conative meaning of shame (intersubjective aspect of the experience) as conscious experience which correlates the cognitive and affective meanings., Although in a guilt culture, shame is generally viewed as an undesirable experience, there is a growing awareness of shame as a universal positive experience fundamental to achieving authenticity and self-improvement. It is argued that shame can be transcended in and through intimate and open interpersonal communication. While in a shame culture, shame is constantly enacted as an interpersonal dimension of human communication. The purpose of my study is to explicate the meaning of shame as lived by people in a shame culture where values of conformity, dependence, and hierarchical authority are emphasized. My phenomenological analysis is grounded in the experience of shame as lived and reflected by eight Chinese respondents from Taiwan. I offer the essential structure as well as a cultural interpretation of the shame experience in interpersonal situations., The results of my research show a demand of enactment of shame in the Chinese culture as a confirmation of group membership more than a self-actualization process. Redemption through success and achievement is required because shame is experienced as a loss of face in a context of competition and comparison. Thus, shame has significant implications for interpersonal, group, and intercultural communication. The analysis based on McFeat's model of small group culture indicates that shame experienced in small groups in Taiwan ensures the continuity of the shame culture in spite of emerging changes.},
  editora = {{ProQuest Information and Learning Co} and {Southern Illinois University at Carbondale}},
  editoratype = {collaborator},
  file = {/Users/satibodhi/Zotero/storage/3Z3CHC47/Her-1990-A phenomenological explication of shame in a shame culture.pdf},
  keywords = {Communication,Cultural anthropology,Electronic books,Social psychology},
  langid = {english}
}
% == BibLateX quality report for HerPhenomenological1990:
% I don't know how to quality-check phdthesis references

@phdthesis{RadiceWays2006,
  title = {The {{Ways}} of {{Filial Piety}} in {{Early China}}},
  author = {Radice, Thomas},
  date = {2006},
  institution = {{University of Pennsylvania}},
  location = {{Philadelphia, PA}},
  abstract = {Filial piety (xiao) is considered a core value in Chinese (and especially Confucian) thought, but few scholars have fully investigated this concept in its earliest stages of development. Though commonly defined as "service to one's parents," the earliest sources show that the Chinese concept of filial piety grew out of the ritual feeding of dead ancestors. By the Warring States period (480--221 B.C.E.), however, it not only included service to one's living parents, it also became intertwined with many other issues in early Chinese thought. This study reveals the great complexity of filial piety in early Chinese sources through a thematic analysis that includes the issues of death, moral conflict, gender and politics. My analysis shows that filial piety was intricately connected to these topics, and that early Confucian texts endorsed several interpretations of filial piety. Consequently, they also treated these issues in different ways. In addition, competing views of filial piety were promoted by the critics of Confucianism, especially Mozi. His doctrine of "universal love" ( jian ai), interpreted by the Confucians and others as hostile to filial piety, was actually intended to help fulfill filial obligations. Thus, contrary to most discussions of early Chinese filial piety, my study shows it to be neither a singular concept nor the product of a single intellectual trend.},
  editora = {{ProQuest Information and Learning Co} and {University of Pennsylvania}},
  editoratype = {collaborator},
  isbn = {9780542799976},
  keywords = {Electronic books,History; Asia; Australia and Oceania,Philosophy,Religion; History of},
  langid = {english}
}
% == BibLateX quality report for RadiceWays2006:
% I don't know how to quality-check phdthesis references

Both havePhD in the Zotero type field before the export. All others have been exported to @Thesis as expected of a normal BibLaTeX export. The same goes for master's - MA exports to @mastersthesis instead of @thesis.

I think for BibLaTeX exports, all thesis type should default to @thesis, which is the same as Zotero, rather than reverting back to BibTeX fields, as the following description from the ebib manual clearly shows:

Alias Types and Fields

The set of entry types defined by biblatex differs from the set used by BibTeX. Mostly, biblatex adds new entry types, but there are a few BibTeX entry types that have been dropped. For legacy reasons, biblatex still recognises these entry types, but it treats them as aliases for some of its own types. The relevant entry types are @conference (treated as an alias for @inproceedings), @electronic (alias for @online), @mastersthesis (alias for @thesis with the type field set to ‘Master’s thesis’), @phdthesis (alias for @thesis with the type field set to ‘PhD thesis’), @techreport (alias for @report with the type field set to ‘technical report’) and @www (alias for @online). If an entry has such an alias as entry type, Ebib displays the entry type that biblatex treats it as in the entry buffer. (For example, the entry type alias phdthesis is shown as phdthesis [==> Thesis].)

Similarly, a number of fields are deprecated but still accepted as aliases. These are address (alias for location), annote (alias for annotation), archiveprefix (for eprinttype), journal (for journaltitle), key (for sortkey), pdf (for file), primaryclass (for eprintclass), and school (for institution). These aliases are also indicated in the entry buffer: for example, if an entry has a journal field, its value is shown as the value of the journaltitle field; a tag [<== journal] is placed after the field value, indicating that the value is actually contained in the journal field. The journal field itself is shown as an undefined field, i.e., after all other fields. Displaying the value twice this way means that you can easily copy the value of the journal field to the journaltitle field, if you wish to bring your entries into line with biblatex’s conventions.

blip-bloop commented 4 years ago

:robot: this is your friendly neighborhood build bot announcing test build 5.2.84.7323 ("phd/mastersthesis => thesis + type, fixes #1677")

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

sati-bodhi commented 4 years ago

The test build fixed the bug, as expected.

retorquere commented 4 years ago

BTW, when the type is mathesis or phdthesis, biblatex will do localization.

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.