lierdakil / pandoc-crossref

Pandoc filter for cross-references
https://lierdakil.github.io/pandoc-crossref/
GNU General Public License v2.0
950 stars 76 forks source link

Custom label prefixes #84

Open lierdakil opened 8 years ago

lierdakil commented 8 years ago

Moved from #83

Additionaly, it could be useful to define additional prefixes and their renderings, so I could define app -> app. as a mapping from the app prefix to the Appendix rendering.

Proposed syntax:

Definition in YAML metadata:

prefixes:
  dfn:
    ref: ["dfn.", "dfns."]
    name: "Definition"
  cl:
    ref: ["cl.", "cls."]
    scope: ["dfn"]

Reference-able items:

<div id="dfn:ring">
A _ring_ is a triple $(R,+,*)$ satisfying:

#. [$+$ is an abelian group]{#cl:addgp}
#. [$*$ is a monoid]{#cl:multmon}
#. [$*$ distributes over $+$]{#cl:distrib}
</div>
lierdakil commented 7 years ago

Related: #114, #124, #113, #111, #104

ilmaisin commented 6 years ago

If there is a style that requires "photos" and "figures" to be labelled differently and listed in different lists, would solving this issue enable the user to do that?

lierdakil commented 6 years ago

@ilmaisin, yes, probably.