bibtool
bibtool copied to clipboard
some formatting instructions not working in custom fields?
Hello,
I'm trying to add some custom fields to my data but for some reason the logical formatting instructions don't work. For example, if I have the resource file
new.field.type {test}
add.field {test="{%n(author) # %n(editor)}"}
and the input file contains (indentation is messed up due to copy and paste)
@InCollection{ key,
series = {Testseries},
title = {Testtitle},
author = {Muster, Max},
editor = {Doe, John},
year = {1985},
pages = {1--10},
}
then running bibtool -r test.rsc -i input.bib -o output.bib
and no default resource file in the file tree produces
@InCollection{ key,
series = {Testseries},
title = {Testtitle},
author = {Muster, Max},
editor = {Doe, John},
year = {1985},
pages = {1--10},
test = {{Muster # Doe}}
}
A similar problem occurs when the alternative clause is replaced by an if-then-else statement, for example
new.field.type {test}
add.field {test="(author) {%n(author)} {%n(editor)}"}
Am I missing something?
I had to read the documentation carefully myself. It says that during adding new fields the pseudo-fields are expanded only. This does not include all formatting instructions.
I can imagine to support formatting instructions as well since this might be a desirable extension. I will have to think about it.
ok, I think this would be a very useful extension.