How do I make a reference to a figure in markdown using pandoc?

前端 未结 6 619
天涯浪人
天涯浪人 2020-12-12 11:08

I\'m currently writing a document in markdown and I\'d like to make a reference to an image from my text.

this is my text, I want a reference to my image1 [h         


        
6条回答
  •  萌比男神i
    2020-12-12 11:53

    Pandoc supports referencing sections (via section identifiers prefixed by #).

    Comments on this open issue describe how the following workaround leverages section identifiers for generating image references in LaTeX and HTML:

    ![A voyage to the moon\label{fig:lalune}](lalune.jpg)
    [The voyage to the moon](#fig:lalune).

    The empty line before

    is required.

提交回复
热议问题