Comments (10)
I tried to do this myself, and didn't get very far.
<group delimiter=" " prefix="<<" suffix=">>">
<text variable="citation-label" prefix="" suffix=""/>
works on the rspec of asciidoctor-bibliography and generates <<ref>>
, but I couldn't get it to propagate into my call of asciidoctor-rfc2, so I couldn't tell whether it would be processed as is by that gem. :-(
from asciidoctor-bibliography.
It occurs to me that overloading the cite macro contents may be overkill; a relref can be indicated by passing a "section" attribute to the macro, just as a "format" attribute can be passed to the macro.
from asciidoctor-bibliography.
I fixed the "simple citation" bug (changing the tag name) in #62.
However the CSL style isn't really the place to implement this logic (has decent logic control but it's too structured). I also feel that neither asciidoctor-bibliography
is (outside of domain).
However with #63 we should now have enough flexibility to do whatever we want.
Btw, given we're using <<..>>
interpolations I think it is unnecessary to force some custom syntax (the user will never see) on asciidoctor-bibliography
macros.
Continuing the discussion on #59.
from asciidoctor-bibliography.
Btw, the correct behaviour is in rfc-v3.csl not rfc-v2.csl : the default citation needs to be <xref/>
not <xref>[citation]</xref>
in order for it to play well with xml2rfc. Am commenting out rfc-v2.csl code.
from asciidoctor-bibliography.
... actually, not even that. The correct behaviour for v3 would be:
it "formats a single citation" do
expect(formatted_citation("cite:[RFC2119]", options: options)).
to eq '+++<xref target="RFC2119"/>+++'
end
it "formats a single citation with locator" do
expect(formatted_citation("cite:[RFC2119, section=1.2.3]", options: options)).
to eq '+++<relref target="RFC2119" section="1.2.3"/>+++'
end
And from what I gather, we've given up on that; CSL is just not that powerful. So not even the locator behaviour is desirable; we'll be using text attributes instead throughout, with raw XML. Again, not happy with that solution, but so long as we're relying on CSL, we're stuck with it.
from asciidoctor-bibliography.
Unfortunately while CSL/Citeproc (= styling/structuring) cover most common publishing needs they are respectively awkward in rendering code and not arbitrarily extensible.
They were chosen because of their wide adoption (= huge high quality style database) and because the project is a moral heir of asciidoctor-bibtex
.
I think the only way to cleanly handle the situation would be to define a new pair of styling/structuring standards that encompass all we need. However the scope/effort for such a task would be pretty big. (@ronaldtse possibly too much?)
@opoudjis Thanks for the last commit. Even if the solution isn't perfect, would it make sense to you to release it as a bugfix and close this issue?
from asciidoctor-bibliography.
I've been actually talking to @opoudjis that there should be a better data model for handling bibliographic items and references to documents, and also their formatting into text/syntax.
Let's resolve with a bugfix for now and see how else we can streamline the processing?
from asciidoctor-bibliography.
Agreed, Paolo.
from asciidoctor-bibliography.
Since @opoudjis pinged me on this, I think the next thing is to adopt the new bibliography data model in https://github.com/riboseinc/isodoc-models .
@paolobrasolin what's your plan?
from asciidoctor-bibliography.
Closing and moving to new issue #69.
from asciidoctor-bibliography.
Related Issues (20)
- Bug with custom attributes when translating to DocBook HOT 3
- Question: own styles HOT 1
- :bibliography-database: not set via asciidoctor-epub3 for included documents HOT 6
- Bib entry with identical author and year HOT 18
- Minor APA format issue HOT 4
- Converting directly with Ruby HOT 2
- Variable interpolation breaks include
- anomalies when using Asciidoctor's ifeval::[] and asciidoctor-bibliography HOT 3
- Errors with asciidoctor-pdf HOT 2
- Numbered bibliography
- Comparison with asciidoc-bib and asciidoctor-bibtex
- A problem building Nokogiri, when installing on Windows HOT 7
- Migrate to GitHub Actions from Travis
- Change default branch to main HOT 1
- Asciidoc-bibliography messes with section levels after include
- Feature request: Styling per bibliography
- Citations get parsed within inline source code environment HOT 2
- Multi-Citation of more than two keys not working HOT 5
- [enhancement] nocite macro for bibliography entry without expicit citation HOT 1
- Incompatibility with asciidoctor version >= 2.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-bibliography.