Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API change] Add a Ref inline element and Reference type #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

despresc
Copy link
Contributor

Resolves jgm/pandoc#813 in this package. Writers targeting formats that do not have native references (and all other writers, initially) can attempt to render the [Inline] content of a Ref when encountered, which will be a raw inline from an input format if not empty, unless a filter is used or a numbering/referencing pass is added to Pandoc.

I have also added

data RefType
  = NumberRef
  | PageRef
  | RefTypeDefault

to Ref, since paginated formats that have references distinguish between the two. But this could also be handled in the Attr in Ref (or not at all).

The Ref element is analogous to the \ref family of LaTeX commands. It
is a collection of references to other identified elements, similar to
the Cite element. It includes a RefType type that distinguishes
between number references and page references.

The Reference type represents a single reference to an identified
element. Unlike a Link, the text of a Reference is generally expected
to be replaced with attributes of the referenced element. These
attributes are normally either its number or page number, and a
possibly-configurable prefix representing the type of thing referenced
(like "figure" or "table").

The ReferenceMode type records any local modification to the prefix of
a reference, recognizing explicit upper case and lower case prefix
selection, prefix suppression, and normal (default) references.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Feature: internal links to tables and figures and headers
1 participant