Giter Site home page Giter Site logo

labelrefs.sile's People

Contributors

omikhleia avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

labelrefs.sile's Issues

Consider migrating to SILE org and/or core

I am personally of the opinion that while it is a good thing that this can be a third party package and I'm glad we hashed out the issues involved in making enough API surface area for this to work as an external package, this is actually a fundamental enough functionality that will be useful to enough other packages that it should be kept a little closer to SILE's core.

Would you consider one or both steps of moving this into the SILE org and publishing stable versions from the API key there; and secondarily re-splicing the code into the SILE core so it can be tested and refactored on the same release cycle?

Keep in mind that since 3rd party packages take precedence over core ones if any aspect of the core one was not to your liking you could continue to use the forked/3rd party one over the official/core one without anything different that what you're doing now.

Optional support for reference styling

If (optional) package resilient.styles is available (from the resilient.sile collection), then when the new v2 styling paradigm lands there (PR 13), it could be interesting for labelrefs to apply the reference styles available there.

So e.g. referring to a captioned figure ("Figure 5. Some caption") would generate "fig. 5" -- or whatever the style defines -- rather than just the "5" alone.

(Opened in advance so I remember it in due time)

Avoid extra rerun warnings when references have not changed

When overriding the tocentry to collect title references, we should likely

  • Strip positions from nodes
  • Possibly strip command at toplevel: when SILE.call("tocentry"...) is used, it takes care of it, but if using a AST construct (as in resilient classes, utils.create(Structured)Command("tocentry", ...) then the top level is the tocentry command, so we eventually get:
      ["some-id"] = {
        link = "ref:some-dest",
        marker = "some-id",
        pageno = "...",
        section = "x.y",
        title = {
          "My reference",
          col = 0, -- OOPS
          command = "tocentry", -- EEK
          id = "command", -- EEK
          lno = 0, -- OOPS
          options = { -- EEK
            bookmark = true,
            level = N,
            number = "x.y"
          },
          pos = 0 -- OOPS
        }
      }
    }
    
    Though not problematic at the core of the processing (it's skipped by SILE.process), some of this stuff should not be here...

The SILE AST is a mess of undocumented things and weird decisions... Oh my... LoL ;)

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.