Skip to content

Fix to add support for bookmarks (internal links)#447

Open
geoffkendall wants to merge 1 commit into
guigrpa:masterfrom
geoffkendall:fix/add-bookmark
Open

Fix to add support for bookmarks (internal links)#447
geoffkendall wants to merge 1 commit into
guigrpa:masterfrom
geoffkendall:fix/add-bookmark

Conversation

@geoffkendall

Copy link
Copy Markdown

Adds support for internal bookmarks, so (for example) citations can be spread throughout a report (e.g. [1], [2]) and these can be linked to corresponding bookmark anchors in a final references section. New tests have been added to cover this feature. Here's how this looks in the README.md file:

LINK

Includes a hyperlink with the data resulting from evaluating a JavaScript snippet:

+++LINK ({ url: project.url, label: project.name })+++

If the label is not specified, the URL is used as a label.

To link to an internal bookmark (see BOOKMARK below), use the bookmark field instead of url:

+++LINK ({ bookmark: 'mySection', label: 'Go to My Section' })+++

BOOKMARK

Inserts a bookmark anchor at the current position, which can be targeted by internal LINK commands:

+++BOOKMARK 'mySection'+++

Place this command inside a paragraph (e.g. a heading styled paragraph in your template). The argument is a JavaScript expression that evaluates to the bookmark name string. An internal link pointing to this bookmark can then be created with:

+++LINK ({ bookmark: 'mySection', label: 'Go to My Section' })+++

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.

1 participant