Text FormattingHow add a caption to a formula?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

How add a caption to a formula?

Post by artemff »

For example:

Code: Select all

Newton's Second Law
 F = ma

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: How add caption of formula?

Post by Stefan Kottwitz »

It depends on how it should be aligned. You could write normal text above, or use a multiline environment of amsmath and the \text macro like \text{Newton's Second Law}.

Stefan
LaTeX.org admin
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How add a caption to a formula?

Post by gmedina »

As Stefan_K has pointed out, it all depends on your intent; here's an example using some of the features provided by the caption package:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{caption}

\DeclareCaptionType{mycapequ}[][List of equations]
\captionsetup[mycapequ]{labelformat=empty}

\begin{document}
\listofmycapequs

\begin{mycapequ}[!ht]
  \caption{Newton's Second Law}
  \begin{equation}
    F=ma
  \end{equation}
\end{mycapequ}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
artemff
Posts: 113
Joined: Sat Oct 17, 2009 11:15 pm

Re: How add caption of formula?

Post by artemff »

gmedina, thanks for example.
Post Reply