jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.14k stars 3.3k forks source link

Support for Partial Match in citation-abbreviations Field #9872

Open TomBener opened 2 weeks ago

TomBener commented 2 weeks ago

Problem:

Currently, the citation-abbreviations feature does not support partial matching within fields like publisher or container-title. This limitation makes it cumbersome to abbreviate terms when the exact full name of the field value is not known or when multiple variations of a term need to be abbreviated.

Proposed Solution:

I propose extending the functionality of the citation-abbreviations feature to support partial matching within specific fields. This enhancement would allow users to specify partial terms or patterns within fields, enabling more flexible abbreviation of field values.

For example, supporting a syntax like the following in the citation-abbreviations JSON or YAML file to abbreviate common texts journal, review, university:

{
     "default": {
          "container-title": {
               "Journal": "J.",
               "Review": "Rev."
          },
          "publisher": {
               "University": "Univ."
          }
     }
}

This enhancement would greatly improve the usability and flexibility of the citation-abbreviations feature, especially when dealing with large bibliographies with varying field values.