Hi, I found the need for a filter of mine to not just change @item content but also to pass some data back to the compile block. The following works:
```
compile ... do
latex_stuff = {}
filter :gather_latex_stuff, {latex_stuff: latex_stuff}
end
```
and elsewhere
```
class LaTeXStuff < Nanoc::Filter
identifier :gather_latex_stuff
def run(content, params)
shared = params[:latex_stuff]
shared[:something] = ...
```
but it sounds like a terrible hack, that could be defeated by future changes of Nanoc. What would be the cleanest way to do that?
My motivation comes from the following. I am trying to design a system to handle bibliography in articles. So I may have a hierarchy like
```
/references.bib
/first/references.bib
/first/second/article.md
```
with the *.bib files containing keyed entries with the bibliographic information (journal, author, pages, etc). Then article.md may features macros like [cite|somekey]. So I have one filter interpreting those citations, and then a layout producing the bibliography section. Both that filter and that layout need to get the information from the *.bib files and I want to gather that information only once.
Best wishes,
Luc J Bourhis