1

I would like the numbering of tables in a section to be in the following format:

Table section_number alpha: table caption.

For examples, tables of section 4.3 should look like:

Table 4.3 a: Table one of section 4.3

Table 4.3 b: Table two of section 4.3

How can I do it?

Thanks!

3
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Commented Mar 24, 2014 at 16:38
  • Do you just want to be letters instead of numbers for your table?
    – user31729
    Commented Mar 24, 2014 at 16:44
  • Yes. Thanks for you answer Christian! It works!
    – user48564
    Commented Mar 25, 2014 at 10:34

1 Answer 1

3

Writing this in your preamble:

\usepackage[labelfont={bf, sf}]{caption}
\usepackage{chngcntr}
\counterwithin*{table}{section}
\renewcommand{\thetable}{\thesection~\alph{table}}

should produce table labels and counters as you describe (unsure you want the label in sans serif font!). Here is an example produced with that code in a standard class of documents:

enter image description here

5
  • Yes. Or rather no, it's not. Usually, it is reset per chapter (my example comes from a reportdocument class.
    – Bernard
    Commented Mar 24, 2014 at 17:08
  • The chngcntr package avoids the usage of \makeatletter and also offers a way to go back from the binding of a counter to another one.
    – egreg
    Commented Mar 24, 2014 at 18:48
  • @egreg: I saw that, but it seemed to default the table counter to arabic, and I don't know how to change it to alph.
    – Bernard
    Commented Mar 24, 2014 at 19:09
  • \counterwithin*{table}{section} and \renewcommand{\thetable}{...} afterwards. The *-variant here is more efficient, because it doesn't do the default \renewcommand using \arabic.
    – egreg
    Commented Mar 24, 2014 at 19:13
  • @egreg: That's what I've just checked. Should have tried before… I modify my answer at once.
    – Bernard
    Commented Mar 24, 2014 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .