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
This is a feature request. Would it make sense to allow BibTeX::Filter know more metadata in addition to the value?
For example, instead of making filter interface as:
classFilterdefapply(value)endend
Allow the interface access more meta data:
classFilterdefapply(value,info)endend
The info would be a Hash storing variaous meta data, such as:
{:entry=># the entry of the whole bibtex record:field=># the field of the current value, such as :first_name, :last_name, :title, etc.:index=># the index of the value if there are multiple same field, e.g. the index of the author.:annotation=># support bibtex annotation}
The reason of using Hash is that it allows us to extend the feature in the future if necessary.
This will allow the filter to access more information regarding the current value. And it will enable us to support many features. For example:
That said, the intention of the filters is was mostly to clean or convert values directly after parsing; your examples seem to be for rendering, formatting entries, but why use filters for that, why not just write a normal method that does it?
This is a feature request. Would it make sense to allow
BibTeX::Filter
know more metadata in addition to the value?For example, instead of making filter interface as:
Allow the interface access more meta data:
The
info
would be a Hash storing variaous meta data, such as:The reason of using Hash is that it allows us to extend the feature in the future if necessary.
This will allow the filter to access more information regarding the current value. And it will enable us to support many features. For example:
+
is in the key #128)The text was updated successfully, but these errors were encountered: