Generalcaption of the tables and figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
c.mafla
Posts: 19
Joined: Sat Aug 02, 2008 1:20 am

caption of the tables and figures

Post by c.mafla »

Hello to everybody.

My question is: How can i put the caption of the tables and figures before the float itself??

Thanks

Carlos - Colombia

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

caption of the tables and figures

Post by localghost »

Just write the caption inside the float environment before the actual contents.

Code: Select all

\begin{figure}[!ht]
  \centering
  \caption{Dummy figure}\label{fig:dummy}
  \rule{4cm}{3cm}
\end{figure}

\begin{table}[!ht]
  \centering
  \caption{Dummy table}\label{tab:dummy}
  \begin{tabular}{ll}
    ...
  \end{tabular}
\end{table}
Note that typographically correct captions of figures are placed below and captions of tables are placed above.


Best regards
Thorsten¹
c.mafla
Posts: 19
Joined: Sat Aug 02, 2008 1:20 am

Re: caption of the tables and figures

Post by c.mafla »

Jajajaj..thanks, that was easier than that i expect.

I also believe that the captions should be below the float, but the 'Norma Técnica Colombiana' (Colombian
technical standards) doesn't see that way.

Thanks again.

Carlos - Colombia
mwmiller
Posts: 2
Joined: Wed Aug 27, 2008 12:00 am

Re: caption of the tables and figures

Post by mwmiller »

I am brand new to the forum and quite new to LaTeX. I also have a question about table captions and thought I'd post the question in this existing thread.

How do I replace a colon with a period in the table heading?

The code below produces a table heading and caption that reads:

"TABLE A: This is my caption."

I want it to read:

"TABLE A. This is my caption."

Thank you for any help.


\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}


\renewcommand{\tablename}{TABLE}
\renewcommand{\thetable}{\Alph{table}}

\begin{document}

\begin{table*}
\caption{This is my caption.}
\centering%
\begin{tabular} {l }
\hline
\\
Name \\ \hline
\\
Arnold \\ \hline
\end{tabular}
\end{table*}

\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

caption of the tables and figures

Post by localghost »

Take a look at the caption package. It lets you customize captions of floats in many ways. Take the following example.

Code: Select all

\usepackage[font=small,labelfont=bf,labelsep=period]{caption}
Other capabilities of this package are described in its documentation.


Best regards and welcome to the board
Thorsten¹
mwmiller
Posts: 2
Joined: Wed Aug 27, 2008 12:00 am

Re: caption of the tables and figures

Post by mwmiller »

Thank you! That was very helpful.
Post Reply