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

Support cross-referencing within the template text #350

Open
OliverTod opened this issue Dec 10, 2020 · 1 comment
Open

Support cross-referencing within the template text #350

OliverTod opened this issue Dec 10, 2020 · 1 comment

Comments

@OliverTod
Copy link

OliverTod commented Dec 10, 2020

Feature request:
Based on the existing practice of using automatic cross references in MSword, it would be good to have a way to easily and dynamically cross reference within the contract text. This could be references to a heading (for example, the title of the document, a schedule or a clause), a specific numbered paragraph or even a span of text within a paragraph (though this is rare).

This may already be possible using html tags or the markdown syntax: [link title](link)

The main requirement is that the link title text should match the paragraph number of the text it references. That is, editing the text (ie adding or deleting lines so that the referenced paragraph number changes) should result in the link title changing also. The link is to the particular paragraph text and not the position of that text in the document.

We need to be cautious that adding this functionality will not disrupt the readability of the raw-markdown file. I am not sure that adding html tags will be an encouraging step for many people.

My initial thoughts are:

  • this could be achieved by allocating (and then hiding) an id to every line of text which can then be referenced (I think this is how MSword does it) OR requiring users to add their own reference ids to text that they want to link to; and
  • whether as part of the editor or separately, there will need to be a way for the link title to be updated when the paragraph number changes.
@jolanglinais
Copy link
Member

The first thought I had when this was presented in the working group call was how markdown supports the format for links:

Sentence sentence [link1][linkReference1] sentence.

Paragraph sentence sentence.

[linkReference1]: www.something.com

And the [linkReference1]: www.something.com does not render. Maybe this could help us with creating and storing internal references @jeromesimeon?

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

No branches or pull requests

2 participants