Giter VIP home page Giter VIP logo

Comments (10)

opoudjis avatar opoudjis commented on September 5, 2024

I tried to do this myself, and didn't get very far.

<group delimiter=" " prefix="&lt;&lt;" suffix="&gt;&gt;">
        <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.

opoudjis avatar opoudjis commented on September 5, 2024

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.

paolobrasolin avatar paolobrasolin commented on September 5, 2024

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.

opoudjis avatar opoudjis commented on September 5, 2024

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.

opoudjis avatar opoudjis commented on September 5, 2024

... 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.

paolobrasolin avatar paolobrasolin commented on September 5, 2024

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.

ronaldtse avatar ronaldtse commented on September 5, 2024

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.

opoudjis avatar opoudjis commented on September 5, 2024

Agreed, Paolo.

from asciidoctor-bibliography.

ronaldtse avatar ronaldtse commented on September 5, 2024

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.

ronaldtse avatar ronaldtse commented on September 5, 2024

Closing and moving to new issue #69.

from asciidoctor-bibliography.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.