In the example I provided, there are 3 PDF files, and I wanted to first set the title
of just one pdf file. So the alternative you provided would not work, as that would auto-set the titles of all 3 PDF files.
I thought that the example:
[[resources]]
src = "documents/photo_specs.pdf"
title = "Photo Specifications"
[[resources]]
src = "**.pdf"
name = "pdf-file-:counter"
was unambiguous… set title
for just one file and counter-based name
for all files.
The counter is grouped by the matcher + first occurrence of either title or name.
How about: “An individual counter should be grouped to matcher for each title
and name
, but only for the entities that use the :counter
placeholder.”
So in the example I posted, the counter will be grouped only with the second matcher, as only that uses :counter
.
If the example had been:
[[resources]]
# using arbitrary glob
src = "**s.pdf"
title = "PDF s #:counter"
[[resources]]
src = "**.pdf"
name = "pdf-file-:counter"
"documents/photo_specs.pdf"
would get a title
like "PDF s #1"
, but name
like "pdf-file-3"
. This was quite an arbitrary example, and thus an arbitrary outcome.
But this would then allow a normal example like in my original post to work as expected.