Table numbers with Latex

Solved
hassen62 -  
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   -
Hello everyone,
I would like to ask you the following question: how to number tables with LaTeX?
Thank you in advance for your help.
Configuration: Windows XP Internet Explorer 6.0

5 answers

  1. berber5
     
    It is enough to add (\caption{"the title of the table"}) before (\end{table})

    example:
    \begin{table}
    \begin{center}
    \begin{tabular}
    Your table
    \end{tabular}
    \end{center}
    \caption{your caption}

    \end{table}
    3
    1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 942
       
      The issue of numbering is one of style, not of the caption.

      The caption instruction allows you to create a caption that will then be processed by LaTeX and formatted according to the style of your LaTeX document.

      Even though it works, numbering the table in the caption goes against the style you are using and is not in keeping with the spirit. If you have numbered your table in the style, you have gone against the LaTeX philosophy. This is especially noticeable if you need to move your table to another section: with your method, you have to correct the caption, whereas if you work with the style, you don’t have to do that.

      In fact, in LaTeX, we don’t manually number anything, whether it’s with \section, \subsection, references to labels, or figures… LaTeX takes care of it. This prevents forgetfulness and errors in (re)numbering as well. ;-)
      0
    2. berber5
       
      Thank you for the clarification.
      Regarding automatic numbering, is there a way to refer to a given table in a text without knowing its number?
      For example: the test results are illustrated in table (xx).....
      0
    3. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 942
       
      A priori, I would say yes with \label{montableau} and \cite{montableau}.
      0
  2. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 942
     
    Tables are usually numbered automatically. It all depends on the style you are using (see documentclass and the sty/cls files you are using).

    Good luck
    0
  3. hassen62
     
    Thank you mamiemando,
    my problem is that instead of starting with begin table I started directly with begin tabular that's why I didn't get the table numbers.
    0
  4. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 942
     
    Oh yes, that's it, everything is in order?
    0
  5. hassen62
     
    Everything is fine, thank you very much for your help.
    0