Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export to Harvard/RTF incorrect when name contains (properly escaped) "and" #4508

Closed
1 task done
timobaumann opened this issue Nov 24, 2018 · 16 comments · Fixed by #7355
Closed
1 task done

export to Harvard/RTF incorrect when name contains (properly escaped) "and" #4508

timobaumann opened this issue Nov 24, 2018 · 16 comments · Fixed by #7355
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save

Comments

@timobaumann
Copy link

timobaumann commented Nov 24, 2018

JabRef version 3.2

  • I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists (JabRef-5.0-dev--snapshot--2018-11-23--master--742cfce7e.jar)

The export filter interprets all "and"s in name fields as breaking multiple names even when the author is properly escaped with curly braces.

Steps to reproduce the behavior:

  1. consider the bibtex
@article{test,
  author = {{Organization for Economic Cooperation and Development}}
}
  1. verify that latex+biber properly output "Organization for Economic Cooperation and Development" as author
  2. export with Harvard filter and find "Organization for Economic Cooperation & Development".
  3. change name to {{Organization for Economic Cooperation and Development and other stuff}} and rejoice at "for Economic Cooperation, O.; Development & other stuff"

Clearly, the export plugin does not honor the double curly braces that should prohibit breaking names.

I haven't found any other way of quoting the "and" to avoid breaking the name into multiple names that are then recombined, either.

@Siedlerchr
Copy link
Member

Probably related to the latex to Unicode converter which kills the braces

github-actions bot pushed a commit to abepolk/jabref that referenced this issue Jan 17, 2020
9c0f5c6 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4460)
22ef83d Update Universitatsmedizin Gottingen
d2f90c9 Create drying-technology.csl (JabRef#4515)
01e339b Create terrorism-and-political-violence.csl (JabRef#4514)
6414c15 Create international-journal-of-hyperthermia.csl (JabRef#4513)
f80b38c Create Sciences Po - Ecole doctorale (note, French) (JabRef#4486)
6a22929 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4508)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 9c0f5c6
github-actions bot pushed a commit that referenced this issue Jan 17, 2020
9c0f5c6 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (#4460)
22ef83d Update Universitatsmedizin Gottingen
d2f90c9 Create drying-technology.csl (#4515)
01e339b Create terrorism-and-political-violence.csl (#4514)
6414c15 Create international-journal-of-hyperthermia.csl (#4513)
f80b38c Create Sciences Po - Ecole doctorale (note, French) (#4486)
6a22929 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (#4508)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 9c0f5c6
github-actions bot pushed a commit to calixtus/jabref that referenced this issue Jan 18, 2020
11e9ac9 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4511)
101b81c Update agriculturae-conspectus-scientificus.csl (JabRef#4510)
615377e Create international-journal-of-population-data-science.csl (JabRef#4517)
fe7cb69 Update university-of-york-apa.csl
f0c7374 Fix AGLC Subsequents
6a8ec90 More Uni Gottingen fixes
9c0f5c6 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4460)
22ef83d Update Universitatsmedizin Gottingen
d2f90c9 Create drying-technology.csl (JabRef#4515)
01e339b Create terrorism-and-political-violence.csl (JabRef#4514)
6414c15 Create international-journal-of-hyperthermia.csl (JabRef#4513)
f80b38c Create Sciences Po - Ecole doctorale (note, French) (JabRef#4486)
6a22929 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4508)
19c89f5 Create citation-compass-apa-note.csl (JabRef#4500)
fe72590 Chicago fixes & add no-ibid variant (JabRef#4503)
d602477 Update agriculturae-conspectus-scientificus.csl (JabRef#4505)
8a8911b Create mediterranean-journal-of-chemistry.csl (JabRef#4506)
ce77b28 Create conservation-and-society.csl (JabRef#4507)
25a5092 Add IMS journals (JabRef#4496)
a39430e Create rmit-university-harvard.csl (JabRef#4504)
830aa7b Update john-benjamins-publishing-company-collective-volumes.csl (JabRef#4444)
43e9216 Create PHBern IVP (JabRef#4427)
a052fd6 Create Publications du Groupe d'anthropologie et d'archéologie funéra… (JabRef#4499)
a7e12e1 Further improve legal cites for BJPS (JabRef#4497)
744a507 Update agriculturae-conspectus-scientificus.csl (JabRef#4498)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: 11e9ac9
github-actions bot pushed a commit to NikodemKch/jabref-1 that referenced this issue Feb 1, 2020
e2416fa Update clinical-and-experimental-optometry.csl (JabRef#4538)
e71363e Create geriatrie-et-psychologie-neuropsychiatrie-du-vieillissement.csl (JabRef#4543)
cdd973e APA: Add "personal communication" localization (JabRef#4539)
77bdb6f Create eksploatacja-i-niezawodnosc (JabRef#4531)
7858966 Ready: Update psychological-medicine.csl (JabRef#4536)
264141a Create south-african-actuarial-journal.csl (JabRef#4534)
1fde301 Create pakistan-journal-of-agricultural-sciences.csl (JabRef#4535)
3020eb3 Update hochschule-fur-soziale-arbeit-fhnw.csl (JabRef#4533)
57c8122 Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4530)
17c178f Update zeitschrift-fur-internationale-beziehungen.csl (JabRef#4527)
14cf589 Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4528)
ca60d6e Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4524)
74c5ae9 Update groupe-danthropologie-et-darcheologie-funeraire.csl (JabRef#4526)
999e124 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4521)
caabe36 Fix psychiatric services
f50e6f0 Add files via upload (JabRef#4519)
c728658 Create harvard-lancaster-university.csl (JabRef#4520)
11e9ac9 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4511)
101b81c Update agriculturae-conspectus-scientificus.csl (JabRef#4510)
615377e Create international-journal-of-population-data-science.csl (JabRef#4517)
fe7cb69 Update university-of-york-apa.csl
f0c7374 Fix AGLC Subsequents
6a8ec90 More Uni Gottingen fixes
9c0f5c6 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4460)
22ef83d Update Universitatsmedizin Gottingen
d2f90c9 Create drying-technology.csl (JabRef#4515)
01e339b Create terrorism-and-political-violence.csl (JabRef#4514)
6414c15 Create international-journal-of-hyperthermia.csl (JabRef#4513)
f80b38c Create Sciences Po - Ecole doctorale (note, French) (JabRef#4486)
6a22929 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4508)
19c89f5 Create citation-compass-apa-note.csl (JabRef#4500)
fe72590 Chicago fixes & add no-ibid variant (JabRef#4503)
d602477 Update agriculturae-conspectus-scientificus.csl (JabRef#4505)
8a8911b Create mediterranean-journal-of-chemistry.csl (JabRef#4506)
ce77b28 Create conservation-and-society.csl (JabRef#4507)
25a5092 Add IMS journals (JabRef#4496)
a39430e Create rmit-university-harvard.csl (JabRef#4504)
830aa7b Update john-benjamins-publishing-company-collective-volumes.csl (JabRef#4444)
43e9216 Create PHBern IVP (JabRef#4427)
a052fd6 Create Publications du Groupe d'anthropologie et d'archéologie funéra… (JabRef#4499)
a7e12e1 Further improve legal cites for BJPS (JabRef#4497)
744a507 Update agriculturae-conspectus-scientificus.csl (JabRef#4498)
bfffaed APA: Fix sort order for in-text citations (JabRef#4495)
c48d08b Add "Blood Cancer Discovery" for AACR (JabRef#4492)
f628cb2 Medizinische Fakultät Mannheim - Numerisch (JabRef#4490)
77876a4 Improve legal cites for british-journal-of-political-science (JabRef#4488)
3c0c4ee Create apa-with-abstract.csl (JabRef#4487)
a26fa95 Update afte-journal.csl (JabRef#4489)
a7bf678 Create agriculturae-conspectus-scientificus.csl (JabRef#4491)
bb01625 Make ET&C dependent of CSE (JabRef#4483)
b4418ef Create ahmad-ibrahim-kulliyyah-of-laws-international-islamic-universi… (JabRef#4482)
22872d2 APA: Use "et al." in Dutch (JabRef#4484)
5f6c080 Update weed-research.csl (JabRef#4485)
b2fbe15 APA 7th edition (JabRef#4419)
c236ade Create BFCN.csl (JabRef#4481)
25d40cd Update iso690-full-note-cs.csl (JabRef#4480)
5de3904 Update budownictwo-i-architektura-pl.csl (JabRef#4479)
9d9c1da Add files via upload (JabRef#4478)
96200b0 Create instituto-alberto-luiz-coimbra-de-pos-graduacao-e-pesquisa-de-… (JabRef#4476)
8aa9cb0 Update APA journal styles (JabRef#4475)
8549afa Update in-text citation for legal_case for BJPS (JabRef#4470)
71c9e4d Update surgical-neurology-international.csl (JabRef#4472)
a9dac17 Create FUNDING.yml
633e864 Create helsingin-yliopisto-teologinen-tiedekunta-teologian-tyyli.csl (JabRef#4303)
8797c01 Create romanian-iso-690-full-note-with-ibid-romanian.csl (JabRef#4465)
c1519e1 Create assosiation-of-firearms-and-toolmark-examiners.csl (JabRef#4468)
c974e30 Update ieee.csl (JabRef#4467)
a1b7386 Update stale.yml (JabRef#4466)
db549dd Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (JabRef#4462)
2822437 Update .travis.yml (JabRef#4463)
3d72c62 WIP: Adding deprecation notice to DIN1505-2 saying it has been superseded by ISO 690 (JabRef#4454)
1928c2b Fix links after KI update
fad65b7 Turn Kidney International into AMA dependent
6357af5 Update association-for-computing-machinery.csl (JabRef#4459)
eab02ea Create berlin-school-of-economics-and-law-international-marketing-man… (JabRef#3774)
a3e3d97 One more metadata fix
e7d5071 Some Sheldon metadata fixes
3ad4260 Create jurnal-sains-farmasi-dan-klinis.csl (JabRef#4455)
46370dc Add "AIMS Press" journals (JabRef#4458)
57fca07 Update association-for-computing-machinery.csl (JabRef#4456)
6fa90ed Add "Muséum national d'Histoire naturelle" journal styles (JabRef#4457)
7faf0b0 Bundle update
e3c1f85 Create cryptogamie, bryologie (JabRef#4350)
525bba5 Create iso690-full-note-cs.csl (JabRef#4414)
932fad5 Create iso690-author-date-de.csl (JabRef#4344)
ab23108 Create mbts-fullnote-bibliography.csl (JabRef#4363)
c163008 Create associacao-brasileira-de-normas-tecnicas-ibict-full.csl (JabRef#4202)
5586bbc Create associacao-brasileira-de-normas-tecnicas-ibict-initials.csl (JabRef#4203)
483efcb Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-service-engineering.csl (JabRef#4442)
92f437d Create independent style for molecular-nutrition-and-food-research.csl… (JabRef#4342)
0d7f481 Update taylor-and-francis-council-of-science-editors-author-date.csl (JabRef#4385)
2b2786b Create ritid-timarit-hugvisindastofnunnar.csl (JabRef#4315)
9534999 Create jsbm.csl (JabRef#4371)
b390657 Changed term on access macro, added rules for bill (JabRef#4407)
95c24f9 Create ecausp-abnt.csl (JabRef#4420)
66ca962 Reindent/reorder
91fefee Create materials-express.csl (JabRef#4445)
ea5d50b Create institut-catholique-de-paris.csl (JabRef#4450)
a4c07e2 Create institut-catholique-de-paris.csl (JabRef#4374)
8a17ae0 Update canadian-geotechnical-journal.csl (JabRef#4447)
7165db0 Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (JabRef#4448)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: e2416fa
github-actions bot pushed a commit to ddunig2/jabref that referenced this issue Feb 6, 2020
e106215 Create annales-de-demographie-historique.csl (JabRef#4512)
4dd974e Create lauterbornia.csl (JabRef#4525)
e5277ae Update sciences-po-ecole-doctorale-note-french.csl (JabRef#4551)
f9cfe40 Add new IOP dependents (JabRef#4549)
daff985 Create brazilian-journal-of-veterinary-research-and-animal-science.csl (JabRef#4544)
10c6fa8 Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (JabRef#4545)
c531528 create mcgill9-en.csl, Canadian McGill legal style (JabRef#4532)
e2416fa Update clinical-and-experimental-optometry.csl (JabRef#4538)
e71363e Create geriatrie-et-psychologie-neuropsychiatrie-du-vieillissement.csl (JabRef#4543)
cdd973e APA: Add "personal communication" localization (JabRef#4539)
77bdb6f Create eksploatacja-i-niezawodnosc (JabRef#4531)
7858966 Ready: Update psychological-medicine.csl (JabRef#4536)
264141a Create south-african-actuarial-journal.csl (JabRef#4534)
1fde301 Create pakistan-journal-of-agricultural-sciences.csl (JabRef#4535)
3020eb3 Update hochschule-fur-soziale-arbeit-fhnw.csl (JabRef#4533)
57c8122 Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4530)
17c178f Update zeitschrift-fur-internationale-beziehungen.csl (JabRef#4527)
14cf589 Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4528)
ca60d6e Update john-benjamins-publishing-company-linguistik-aktuell-linguistics-today.csl (JabRef#4524)
74c5ae9 Update groupe-danthropologie-et-darcheologie-funeraire.csl (JabRef#4526)
999e124 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4521)
caabe36 Fix psychiatric services
f50e6f0 Add files via upload (JabRef#4519)
c728658 Create harvard-lancaster-university.csl (JabRef#4520)
11e9ac9 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4511)
101b81c Update agriculturae-conspectus-scientificus.csl (JabRef#4510)
615377e Create international-journal-of-population-data-science.csl (JabRef#4517)
fe7cb69 Update university-of-york-apa.csl
f0c7374 Fix AGLC Subsequents
6a8ec90 More Uni Gottingen fixes
9c0f5c6 Update associacao-brasileira-de-normas-tecnicas-ufrgs.csl (JabRef#4460)
22ef83d Update Universitatsmedizin Gottingen
d2f90c9 Create drying-technology.csl (JabRef#4515)
01e339b Create terrorism-and-political-violence.csl (JabRef#4514)
6414c15 Create international-journal-of-hyperthermia.csl (JabRef#4513)
f80b38c Create Sciences Po - Ecole doctorale (note, French) (JabRef#4486)
6a22929 Update instituto-brasileiro-de-informacao-em-ciencia-e-tecnologia-abn… (JabRef#4508)
19c89f5 Create citation-compass-apa-note.csl (JabRef#4500)
fe72590 Chicago fixes & add no-ibid variant (JabRef#4503)
d602477 Update agriculturae-conspectus-scientificus.csl (JabRef#4505)
8a8911b Create mediterranean-journal-of-chemistry.csl (JabRef#4506)
ce77b28 Create conservation-and-society.csl (JabRef#4507)
25a5092 Add IMS journals (JabRef#4496)
a39430e Create rmit-university-harvard.csl (JabRef#4504)
830aa7b Update john-benjamins-publishing-company-collective-volumes.csl (JabRef#4444)
43e9216 Create PHBern IVP (JabRef#4427)
a052fd6 Create Publications du Groupe d'anthropologie et d'archéologie funéra… (JabRef#4499)
a7e12e1 Further improve legal cites for BJPS (JabRef#4497)
744a507 Update agriculturae-conspectus-scientificus.csl (JabRef#4498)
bfffaed APA: Fix sort order for in-text citations (JabRef#4495)
c48d08b Add "Blood Cancer Discovery" for AACR (JabRef#4492)
f628cb2 Medizinische Fakultät Mannheim - Numerisch (JabRef#4490)
77876a4 Improve legal cites for british-journal-of-political-science (JabRef#4488)
3c0c4ee Create apa-with-abstract.csl (JabRef#4487)
a26fa95 Update afte-journal.csl (JabRef#4489)
a7bf678 Create agriculturae-conspectus-scientificus.csl (JabRef#4491)
bb01625 Make ET&C dependent of CSE (JabRef#4483)
b4418ef Create ahmad-ibrahim-kulliyyah-of-laws-international-islamic-universi… (JabRef#4482)
22872d2 APA: Use "et al." in Dutch (JabRef#4484)
5f6c080 Update weed-research.csl (JabRef#4485)
b2fbe15 APA 7th edition (JabRef#4419)
c236ade Create BFCN.csl (JabRef#4481)
25d40cd Update iso690-full-note-cs.csl (JabRef#4480)
5de3904 Update budownictwo-i-architektura-pl.csl (JabRef#4479)
9d9c1da Add files via upload (JabRef#4478)
96200b0 Create instituto-alberto-luiz-coimbra-de-pos-graduacao-e-pesquisa-de-… (JabRef#4476)
8aa9cb0 Update APA journal styles (JabRef#4475)
8549afa Update in-text citation for legal_case for BJPS (JabRef#4470)
71c9e4d Update surgical-neurology-international.csl (JabRef#4472)
a9dac17 Create FUNDING.yml
633e864 Create helsingin-yliopisto-teologinen-tiedekunta-teologian-tyyli.csl (JabRef#4303)
8797c01 Create romanian-iso-690-full-note-with-ibid-romanian.csl (JabRef#4465)
c1519e1 Create assosiation-of-firearms-and-toolmark-examiners.csl (JabRef#4468)
c974e30 Update ieee.csl (JabRef#4467)
a1b7386 Update stale.yml (JabRef#4466)
db549dd Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-ser… (JabRef#4462)
2822437 Update .travis.yml (JabRef#4463)
3d72c62 WIP: Adding deprecation notice to DIN1505-2 saying it has been superseded by ISO 690 (JabRef#4454)
1928c2b Fix links after KI update
fad65b7 Turn Kidney International into AMA dependent
6357af5 Update association-for-computing-machinery.csl (JabRef#4459)
eab02ea Create berlin-school-of-economics-and-law-international-marketing-man… (JabRef#3774)
a3e3d97 One more metadata fix
e7d5071 Some Sheldon metadata fixes
3ad4260 Create jurnal-sains-farmasi-dan-klinis.csl (JabRef#4455)
46370dc Add "AIMS Press" journals (JabRef#4458)
57fca07 Update association-for-computing-machinery.csl (JabRef#4456)
6fa90ed Add "Muséum national d'Histoire naturelle" journal styles (JabRef#4457)
7faf0b0 Bundle update
e3c1f85 Create cryptogamie, bryologie (JabRef#4350)
525bba5 Create iso690-full-note-cs.csl (JabRef#4414)
932fad5 Create iso690-author-date-de.csl (JabRef#4344)
ab23108 Create mbts-fullnote-bibliography.csl (JabRef#4363)
c163008 Create associacao-brasileira-de-normas-tecnicas-ibict-full.csl (JabRef#4202)
5586bbc Create associacao-brasileira-de-normas-tecnicas-ibict-initials.csl (JabRef#4203)
483efcb Update ruhr-universitat-bochum-lehrstuhl-fur-industrial-sales-and-service-engineering.csl (JabRef#4442)
92f437d Create independent style for molecular-nutrition-and-food-research.csl… (JabRef#4342)
0d7f481 Update taylor-and-francis-council-of-science-editors-author-date.csl (JabRef#4385)
2b2786b Create ritid-timarit-hugvisindastofnunnar.csl (JabRef#4315)
9534999 Create jsbm.csl (JabRef#4371)
b390657 Changed term on access macro, added rules for bill (JabRef#4407)
95c24f9 Create ecausp-abnt.csl (JabRef#4420)
66ca962 Reindent/reorder
91fefee Create materials-express.csl (JabRef#4445)
ea5d50b Create institut-catholique-de-paris.csl (JabRef#4450)
a4c07e2 Create institut-catholique-de-paris.csl (JabRef#4374)
8a17ae0 Update canadian-geotechnical-journal.csl (JabRef#4447)
7165db0 Update ens-de-lyon-centre-d-ingenierie-documentaire.csl (JabRef#4448)

git-subtree-dir: src/main/resources/csl-styles
git-subtree-split: e106215
@github-actions
Copy link
Contributor

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

  • If there has been a longer discussion, add a short summary of the most important points as a new comment (if not yet existing).
  • Provide further steps or information on how to reproduce this issue.
  • Upvote the initial post if you like to see it implemented soon. Votes are not the only metric that we use to determine the requests that are implemented, however, they do factor into our decision-making process.
  • If all information is provided and still up-to-date, then just add a short comment that the issue is still relevant.

Thank you for your contribution!

@timobaumann
Copy link
Author

the problem persists exactly as before.

@timobaumann
Copy link
Author

@Siedlerchr , @github-actions , can you please re-open this? apparently us standard humans can't re-open our own issues in the github tracker... thanks.

@Siedlerchr Siedlerchr reopened this Jan 14, 2021
@Siedlerchr
Copy link
Member

@timobaumann So the problem exists in the latest development version 5.x?

@Siedlerchr Siedlerchr added export / save bug Confirmed bugs or reports that are very likely to be bugs and removed status: stale labels Jan 14, 2021
@timobaumann
Copy link
Author

yes. Downloaded most recent:
JabRef 5.3--2021-01-13--4d8e4f0
Linux 5.4.0-53-generic amd64
Java 15.0.1
JavaFX 15.0.1+1

put the bibtex from above, export to Harvard.

@Siedlerchr
Copy link
Member

Okay, thanks for the feedback. I think I found the problem.
The RTFChars kills the extra braces and it's called before the authors formatter. That's why the authors formatter treats this as two different authors and cuts it at the "and"

@Siedlerchr Siedlerchr self-assigned this Jan 14, 2021
@Siedlerchr
Copy link
Member

@k3KAW8Pnf7mkmdSMPHz27 I just debugged this and found out that the AuthorLastFirst formatter somehow kills the braces for corporate authors {Organization for Economic Cooperation and Development} is turned into Organization for Economic Cooperation and Development and the AuthorAbbreviator then think it's two different authors.
\format[AuthorLastFirst,AuthorAbbreviator,RTFChars]{\author} (\year),

Do you have any idea why the AuthorsFormatter does remove the braces?

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

k3KAW8Pnf7mkmdSMPHz27 commented Jan 15, 2021

In theory Author.java should kill the braces. I have considered extending it with an Author.isInstitute method. Perhaps that would work? (assuming that is the issue for you)
Is it a similar issue to

private static AuthorList createAuthorList(String unparsedAuthors) {
AuthorList authorList = new AuthorList();
for (Author author : AuthorList.parse(unparsedAuthors).getAuthors()) {
// If the author is an institution, use an institution key instead of the full name
String lastName = author.getLast()
.map(lastPart -> isInstitution(author) ?
generateInstitutionKey(lastPart) :
LatexToUnicodeAdapter.format(lastPart))
.orElse(null);
authorList.addAuthor(
author.getFirst().map(LatexToUnicodeAdapter::format).orElse(null),
author.getFirstAbbr().map(LatexToUnicodeAdapter::format).orElse(null),
author.getVon().map(LatexToUnicodeAdapter::format).orElse(null),
lastName,
author.getJr().map(LatexToUnicodeAdapter::format).orElse(null)
);
}
return authorList;

?

My best guess is that it is being removed because there is no-where in JabRef's code-base where it is explicit what the use of the String is (e.g., should it be viewed by the user -> remove braces, should it be exported or used by bracketed patterns -> keep braces).

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

k3KAW8Pnf7mkmdSMPHz27 commented Jan 15, 2021

I am sorry, I don't have more time to look at it today. I can take a closer look tomorrow. #7301 (comment) might also relate to the issue.

@Siedlerchr
Copy link
Member

@k3KAW8Pnf7mkmdSMPHz27 Yes, there needs to be a kind of check for institution that is the problem here.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

k3KAW8Pnf7mkmdSMPHz27 commented Jan 16, 2021

I don't understand what the correct output format should be for this issue. Should the output contain curly braces?

If I understand \format[AuthorLastFirst,AuthorAbbreviator,RTFChars]{\author} correctly It will call both AuthorLastFirst and AuthorAbbreviator (left to right?)?
Barring the problem with wether or not this should be possible, they are both based on Author.getLastFirst so calling them in a row shouldn't be done (perhaps there is a different LayoutFormatter that does the trick or maybe it is time for a new LayoutFormatter for this circumstance?).

Regarding what to do about the braces being removed, is in my opinion, a different and much longer discussion. Whether or not the braces should be removed is dependent on what the resulting String is supposed to be used for afterwards.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Member

My current belief regarding the formatters and AuthorList.parse is that

  1. Formatters always output in a way that can be shown to the user (no BibTeX formatting)
  2. AuthorList.parse only supports BibTex formatting (with one small extension to allow comma separated authors)

@Siedlerchr
Copy link
Member

Ah okay thanks for the insight. So I will try with only one author formatter and the rtfchars I think the layout file hasn't been touched for years...

@Siedlerchr
Copy link
Member

Siedlerchr commented Jan 18, 2021

@timobaumann This issue is now resolved in the latest master. For other layout based exporters see issue #7356. They need to be adapted to the new AuthorsFormatter Syntax as well

@timobaumann
Copy link
Author

Thanks @Siedlerchr !

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants