Adding a caption to an equation in LaTeX

前端 未结 3 1813
你的背包
你的背包 2020-12-24 05:04

Well, it seems simple enough, but I can\'t find a way to add a caption to an equation. The caption is needed to explain the variables used in the equation, so some kind of t

3条回答
  •  半阙折子戏
    2020-12-24 06:01

    As in this forum post by Gonzalo Medina, a third way may be:

    \documentclass{article}
    \usepackage{caption}
    
    \DeclareCaptionType{equ}[][]
    %\captionsetup[equ]{labelformat=empty}
    
    \begin{document}
    
    Some text
    
    \begin{equ}[!ht]
      \begin{equation}
        a=b+c
      \end{equation}
    \caption{Caption of the equation}
    \end{equ}
    
    Some other text
     
    \end{document}
    

    More details of the commands used from package caption: here.

    A screenshot of the output of the above code:

提交回复
热议问题