Skip to content

How to reference an image? #520

Closed Answered by Witiko
jurf asked this question in Q&A
Oct 20, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

As you noted, in commit 1c31c01, I disabled the automatic generation of LaTeX labels from the Markdown image labels. I did this because the Markdown image labels may contain not just text but also markup:

![foo _bar_](baz)

Generating LaTeX labels from text with markup would cause issues.

The "official" syntax is using the option linkAttributes and attaching an HTML identifier to the image you wish to reference:

![foo _bar_](baz){#foo-bar}

However, there is no "official" semantics to this syntax, i.e. you would need to redefine the renderers imageAttributeContextBegin, imageAttributeContextEnd, and attributeIdentifier yourself to achieve the desired effect.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Witiko
Comment options

@Witiko
Comment options

@Witiko
Comment options

Answer selected by Witiko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants