Bug 41690

Summary: Add MARC21 245$b (subtitle) to Cite option
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: alexander.wagner
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40648
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 14670    
Bug Blocks:    

Description Caroline Cyr La Rose 2026-01-22 20:06:01 UTC
The "Cite" option in the OPAC is missing the subtitle (245$b) in MARC21.

To recreate:
1. Add a record or find a record with a subtitle (in KTD, biblionumber 58 has a 245$b http://localhost:8081/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=58
2. In the OPAC, go to the record
   http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=58
3. Click "Cite"
   --> The subtitle is not in any of the citations

I consulted a customer in a university and he said the subtitle should be after the title and be preceded by a colon. e.g. 'More fruitful than the soil' : army, empire and the Scottish Highlands, 1715-1815
Comment 1 Caroline Cyr La Rose 2026-01-22 20:17:16 UTC
My customer also mentioned other missing elements. I wonder if I should add them in the same bug or create separate bugs for each element?

Here they are, let me know if I should create separate bugs for each of these.

- In Chicago 18th edition, there is no publication place
- Punctuation seems to be ommited in author names (they have "inc." in some of their author names and the period after inc is chopped off even if it's part of the company name)
Comment 2 Alexander Wagner 2026-01-26 08:05:42 UTC
Please note that Kohas structured outputs (I checked BibTeX) have a similar shortcoming.

For citation styles, it might be worthwhile to check if it wouldn't be sensible to come up with some conversion of the Marc data to Citation Style Language (cf. https://citationstyles.org/) and then use a library based on CSL to render the citation for the web, instead of the current static perl code that writes out fields in the relevant form for every citation style. (Cf. https://citationstyles.org/developers/#csl-processors)

Reasoning:
- CSL is supported by some well used reference management tools (I know quite a few people still you copy&paste.)
- CSL can be used to return _whatever_ style out there, so the selection could offer more, if needs be.
- CSL itself is quite flexible if it is necessary to adopt to specific styles
- Quite a few publishers support CSL by providing suitable styles for their outlets
- Filling in CSL _as best as we can_ would avoid a missing field
- There might be some ready made tools for MarcXML -> CSL