Hi List,
I posted this questionhttps://github.com/citation-style-language/documentation/issues/33
(text
below) as a Github issue on the CSL pages and Rintze suggested I post it to
this list as well.
I would like to define a CSL file in which the in-text format includes a
link to the resource. Can this be done in CSL by say, modifying the layout
element appropriately? I cannot figure out how to use a variable in the
prefix/suffix.
I imagine a <citation>
element looking something like this:
<layout prefix="(<a href='URL'>" suffix="</a>)" delimiter="; ">
<text macro="author-short"/>
<text macro="issued" prefix=" "/>
</layout>
but cannot see how to get URL value from something like <text macro="url">
into the prefix.
Given the importance of web-based formats and the ease of using CSL to
generate citations in markdown and html documents with tools such as
pandoc, it seems natural that individuals would want to style in-text
citations not only to reflect journal norms of author surnames etc, but
include such features as actual links, perhaps add title
attributes for
mouse-over effects, and so forth. If this is not possible in the current
implementation, is this something CSL might address in the future?
I imagine that a flexible implementation of this could further be used to
add semantic data to inline citations, e.g.
<a rel="cito:UsesMethodIn" href="http://doi.org/
10.1186/2041-1480-1-S1-S6">Shotton (2010)
Can any of this be done using the current schema? If not, is this a
reasonable thing to work towards or should it be left to some other tool?
Thanks,
Carl–
Carl Boettiger
UC Santa Cruz
http://carlboettiger.info/