any chance for finer grained "csl- " classes in the citeproc-js output
Hi all,
I'm experimenting with using Zotpress to populate library research guides. One of the things that I would like to be able to do is to use CSS to alter the appearance of zotpress citations.
Could there be a way to adapt the HTML output to make that easier? Citeproc-js gives classes down to the "csl-entry" class but nothing finer grained than that. Could it go down to having classes for each CSL field? That would give us a lot of flexibility to adapt the output to a number of different needs, even beyond what a custom citation style would do (though I'll likely make one too, to choose exactly the csl fields I'll need).
Thanks,
Larry
I'm experimenting with using Zotpress to populate library research guides. One of the things that I would like to be able to do is to use CSS to alter the appearance of zotpress citations.
Could there be a way to adapt the HTML output to make that easier? Citeproc-js gives classes down to the "csl-entry" class but nothing finer grained than that. Could it go down to having classes for each CSL field? That would give us a lot of flexibility to adapt the output to a number of different needs, even beyond what a custom citation style would do (though I'll likely make one too, to choose exactly the csl fields I'll need).
Thanks,
Larry
I'm certainly not against the Web or anything. :)
This isn't really limited to CSS. This is about proper semantic structure, and the ability to style it would just be a benefit. None of this changes that this might be difficult to implement, but it does seem like it would be good to have, and there aren't great workarounds.
This still doesn't get us a citation-element-level metadata, but I think it's good enough to attach something like BIBO RDF to the citation's outer container-- much of the citation information might not even be included in the rendered citation anyway.
Larry
FWIW, I've started to write a bib profile that I think should be usable for both RDFa 1.1, and HTML5 microdata. In both cases, one is wrapping metadata chunks in HTML nodes, and attaching attributes to add semantics.
The citeproc-js code base is not necessarily easy to follow, but it certainly doesn't treat output as a string internally. CSL 1.0 could not be implemented by a system that did so.
A set of worked examples, preferably cast as test fixtures, would be helpful. It all seems particularly daunting when there are no concrete examples on which to base queries from my end.
What the OP is asking for (I think), which is just having class names on output tokens. For this, it should be straightforward to just dump the relevant variable names on the output nodes.
Microdata and RDFa is a little more complex, but I think it's probably best to iteratively build this, and worry less about some of the more difficult/less-frequently-used variables. I've started to create examples here, but I know there's a lot more to do:
http://bdarcus.github.com/bibo-in-html/examples