1. I am almost sure that Pandoc will just ignore unknown fields, at least that's what happened (unfortunately and to my disappointment) the last time I have tried to use non-standard fields in a style.
2. If you don't want to hardcode the transliteration into one of the existing fields, the easiest solution might be to use something along the lines of this script.
import json
import argparse
parser = argparse.ArgumentParser(description='Merge title and subtitle fields in CSL JSON with custom separator')
parser.add_argument('-f', '--from', action="store", dest="from_file")
parser.add_argument('-t', '--to', action="store", dest="to_file")
parser.add_argument('-s', '--separator', action="store", dest="separator", default=": ")
args = parser.parse_args()
# Load JSON File
with open(args.from_file, 'r') as from_file:
references = json.load(from_file)
# Merge Title and Subtitle Fields
for reference in references:
try:
reference['title'] = reference['title'] + args.separator + reference['subtitle']
reference.pop('subtitle', None)
except:
pass
# Write results back to File
with open(args.to_file, "w") as to_file:
json.dump(references, to_file, indent=2,ensure_ascii=False)
This will merge title and subtitle fields, but you can of course adapt this to merge `title` and `title:transliteration`. (You'll need to you have your reference data available in CSL JSON.)
Am Freitag, 6. September 2019 21:49:16 UTC+2 schrieb BP: