How to use latex equation environment in Pandoc Markdown?

后端 未结 2 1716
醉话见心
醉话见心 2021-01-31 11:08

In Pandoc markdown, I can use \'$$\' to start a display math environment. However, these equations are not numbered in latex so I hope to use the equation environment instead, l

2条回答
  •  深忆病人
    2021-01-31 11:16

    Try the pandoc-eqnos filter. Labels may be attached to equations using attributes:

     $$ y = mx +b $$ {#eq:description}
    

    ... and then referenced like this:

    @eq:description
    

    For tex/pdf output, LaTeX's native equation environment and \label and \ref macros are used; for all others the numbers are hard-coded.

    Instructions are given on the pandoc-eqnos page for how to install and apply the filter.

提交回复
热议问题