However, if I were to reference the figure like so:
\ref{image-reference}
Then latex is unable to recognise the reference.
Solution
To me, there seems to be a solution that wouldn't change all that much:
If we were to add \label{image-reference} to the latex output, referencing the image would be possible.
Referencing using the Markdown method
Markdown's referencing method (for table of contents, etc.) should make the referencing even easier for the user, since they could reference the image using the caption. Thus, the markdown image syntax from above, ![Image Caption](path/to/image.format), could be referenced by the following:
\cite{image-caption}
I'm not quite sure how easy the implementation of this part is though, since there will likely be edge cases where the caption includes exotic symbols.
Sadly, I am lost in the codebase of pandoc since I don't know Haskell, so I'm not sure how easy this change actually is to implement.
To the people reviewing this
Please feel free to ask me to reformulate any part of the feature proposal if it's not clear enough
If anyone would like to give me a very brief explanation of how the Markdown to LaTeX converter works, I'd be happy to try and tackle the issue myself. I have found the Text.Pandoc.Writers.LaTeX module to contain the functionality starting at line 575, but am unable to understand how exactly it functions
Feature request
Using Pandoc 2.10.1
Issue
I haven't been able to reference images using the standard Markdown syntax:
Because this converts to the following:
However, if I were to reference the figure like so:
Then latex is unable to recognise the reference.
Solution
To me, there seems to be a solution that wouldn't change all that much:
If we were to add
\label{image-reference}
to the latex output, referencing the image would be possible.Referencing using the Markdown method
Markdown's referencing method (for table of contents, etc.) should make the referencing even easier for the user, since they could reference the image using the caption. Thus, the markdown image syntax from above,
![Image Caption](path/to/image.format)
, could be referenced by the following:I'm not quite sure how easy the implementation of this part is though, since there will likely be edge cases where the caption includes exotic symbols.
Final Output
The final output would then look like so:
Input
Output
Referencing
Sadly, I am lost in the codebase of pandoc since I don't know Haskell, so I'm not sure how easy this change actually is to implement.
To the people reviewing this
Text.Pandoc.Writers.LaTeX
module to contain the functionality starting at line 575, but am unable to understand how exactly it functions