You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We customize the completion display format using bibtex-completion-display-formats. For example, these templates can take additional fields by supplying the same fields in bibtex-completion-additional-search-fields and then use them.
Sometimes, we want to perform additional formatting on field values, but there is currently no hook to do this. The author and year field are exceptions, as their fallback fields, editor and date are defined, respectively, in case they are missing. In case of author, additional preprocessing such as shortening author names is performed.:
I think that it would be nice to be able to write custom field formatters. For example, bibtex-completion-field-formatters would take a list of (field . formatter-function) such that the formatter-function taking entry as an argument gets applied before rendering the value.
Would that be a possibility? This seems like relatively low-lift work that would make the template format vastly more flexible.
The text was updated successfully, but these errors were encountered:
It would be relatively easy to add some ad-hoc solution, but the truth is that a lot of the relevant code has organically grown and is not super easy to maintain and extend. It would be best to refactor this part of bibtex-completion, perhaps with some sort of plugin infrastructure that allows users to choose between different formatting / display styles. Not sure what this would look like in detail. But feel free to propose something specific and we can discuss it.
This is a feature request, not a bug report.
We customize the completion display format using
bibtex-completion-display-formats
. For example, these templates can take additional fields by supplying the same fields inbibtex-completion-additional-search-fields
and then use them.Sometimes, we want to perform additional formatting on field values, but there is currently no hook to do this. The
author
andyear
field are exceptions, as their fallback fields,editor
anddate
are defined, respectively, in case they are missing. In case ofauthor
, additional preprocessing such as shortening author names is performed.:helm-bibtex/bibtex-completion.el
Lines 864 to 898 in 78f5931
I think that it would be nice to be able to write custom field formatters. For example,
bibtex-completion-field-formatters
would take a list of(field . formatter-function)
such that the formatter-function takingentry
as an argument gets applied before rendering the value.Would that be a possibility? This seems like relatively low-lift work that would make the template format vastly more flexible.
The text was updated successfully, but these errors were encountered: