LaTeX forum ⇒ Text FormattingHow add a caption to a formula?

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

How add a caption to a formula?

Postby artemff » Sat Oct 17, 2009 11:32 pm

For example:

  1. Newton's Second Law
  2. F = ma

User avatar
Stefan Kottwitz
Site Admin
Posts: 9406
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Oct 18, 2009 12:03 am

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
Site admin

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Postby gmedina » Sun Oct 18, 2009 12:21 am

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:

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \usepackage{caption}
  4.  
  5. \DeclareCaptionType{mycapequ}[][List of equations]
  6. \captionsetup[mycapequ]{labelformat=empty}
  7.  
  8. \begin{document}
  9. \listofmycapequs
  10.  
  11. \begin{mycapequ}[!ht]
  12. \caption{Newton's Second Law}
  13. \begin{equation}
  14. F=ma
  15. \end{equation}
  16. \end{mycapequ}
  17.  
  18. \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

Postby artemff » Sun Oct 18, 2009 9:49 am

gmedina, thanks for example.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 1 guest