Skip to content

Suggest to support "clever references" with "+" #5

Description

@dmitryperets

Since pandoc-xnos seems to be dead for now and it doesn't really support pandoc 3.x (e.g. pandoc-fignos is broken due to the new AST format), migrating to this native LUA implementation sounds like a good idea. But it would be beneficial if we could keep the documents written for pandoc-xnos...

So one of the differences is the "clever references" feature available in pandoc-xnos. The difference is the following:

  • pandoc-xnos:

    • @fig:myfigure is simply replaced with the number of the figure (e.g. 1).
    • +@fig:myfigure is replaced with the caption + number (e.g. Figure 1)
  • luarefnos:

    • @fig:myfigure is replaced with the caption + number (e.g. Figure 1)

Ideally, my suggestion is to implement exactly the same syntax as pandoc-xnos.
But if that is too complex, maybe it is possible to implement deletion of the + sign right before the reference.

Explanation:

  • Today @fig:myfigure in luarefnos does the same as +@fig:myfigure in pandoc-xnos. Namely, it emits caption + number (e.g. Figure 1)
  • If someone has a document written for pandoc-xnos, they are likely to have something like:
    Please see +@fig:myfigure for more details.
    
  • If they migrate to luarefnos, this line will be rendered as:
    Please see +Figure 1 for more details.
    
  • So it is almost like the clever reference, but there is this + that should not be there...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions