Skip to content

Suggested way to make markdown image with crossref label. #548

@arbipher

Description

@arbipher

Hi developers,

I was using hybrid mode following some overleaf tutorials, but I can't figure out the correct way to cross-ref them.

\setkeys{Gin}{width=\linewidth}
![dvn1](Paul_Gauguin_-_D'ou_venons-nous.jpg "Where Do We Come From? What Are We? Where Are We Going?")

I tried figuring it out locally and here is the snippet from the lualatex output

{}\markdownRendererImage{dvn1}{asset/Paul_Gauguin_-_D'ou_venons-nous.jpg}{asset/Paul_Gauguin_-_D'ou_venons-nous.jpg}{Where Do We Come From? What Are We? Where Are We Going?}\markdownRendererInterblockSeparator

The manuals show \markdownRendererImage takes four arguments and the 1st is the label, however, I cannot use \ref{dvn1} to correct cross-ref it.

Meanwhile, the heavy-tex way make it correct

\begin{figure}[H]
    \setkeys{Gin}{width=\linewidth}
    ![Where Do We Come From? What Are We? Where Are We Going?](Paul_Gauguin_-_D'ou_venons-nous.jpg)
    \caption{Where Do We Come From? What Are We? Where Are We Going?}
    \label{fig:dvn0}
\end{figure}

p.s. as for the soft-deprecated hybrid, I also didn't figure out what should be the correct option to use my above first snippet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions