1

I'm trying to define the label of my table to match with the numbering of the section. Note that I also numbered my chapters and sections manually. So instead of Tabelle 1 I need Tabelle 2.1 Any one can help?

\chapter*{Kapitel 2} 
\section*{bla bla bla} 
\subsection*{bla blu bli}



\begin{table}[htbp]
 \centering
 \caption{Zusammensetzungen einiger SX-Nickelbasislegierungen in wt\%.}
 \label{tbl:1}
  \begin{tabular}{c d{2.1} d{2.1} d{2.1} d{1.1} d{1.1} d{1.2} d{1.1} d{1.1} d{1.1} d{1.1} d{1.0} d{1.2}}
   \toprule
    Alloy & \mc{Ni} & \mc{Cr} & \mc{Co} & \mc{Mo} & \mc{W} & \mc{Al} & \mc{Ti} & \mc{Ta} & \mc{Re} & \mc{Nb} & \mc{V} & \mc{Hf} \\
   \midrule
    \mcTwo{First generation} & & & & & & & & & & & \\
   \midrule
    PWA~1480    & 62.5 & 10   &  5   & \mc{---} & 4        & 5    & 1.5      & 12   & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]
    Ren{\'e}~N4 & 62.6 &  9   &  8   & 2        & 6        & 3.7  & 4.2      &  4   & \mc{---} & 0.5 & \mc{---} & \mc{---}      \\[1ex]
    CMSX-2      & 66.6 &  8   &  4.6 & 0.6      & 7.9      & 5.6  & 0.9      &  5.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\[1ex]
    SRR~99      & 66.5 &  8.5 &  5   & \mc{---} & 9.5      & 5.5  & 2.2      &  2.8 & \mc{---} & \mc{---} & \mc{---} & \mc{---} \\
   \midrule
    \mcTwo{Second generation} & & & & & & & & & & & \\
   \midrule
    PWA~1484    & 59.4 &  5   & 10   & 2        & 6        & 5.6  & \mc{---} &  9   & 3        & \mc{---} & \mc{---} & \mc{---} \\[1ex]
    Ren{\'e}~N5 & 61.8 &  7   &  8   & 2        & 5        & 6.2  & \mc{---} &  7   & 3        & 0.5      & \mc{---} & 0.2      \\[1ex]
    CMSX~4      & 61.8 &  6.5 &  9   & 0.6      & 6        & 5.6  & 1        &  6.5 & 3        & \mc{---} & \mc{---} & 0.1      \\[1ex]
    CMSX~6      & 70.4 & 10   &  5   & 3        & \mc{---} & 4.8  & 4.7      &  2   & \mc{---} & \mc{---} & \mc{---} & 0.1      \\[1ex]
   \midrule
    \mcTwo{Third generation} & & & & & & & & & & & \\
   \midrule
    CMSX-10     & 69.6 &  2   &  3   & 0.4      & 5        & 5.7  & 0.2      &  8   & 6        & 0.1      & \mc{---} & 0.03     \\[1ex]
    Ren{\'e}~N6 & 57.4 &  4.2 & 12.5 & 1.4      & 6        & 5.75 & 0        &  7.2 & 5.4      & 0        & 0        & 0.15     \\
   \bottomrule
  \end{tabular}
\end{table}

enter image description here

Moriambar
  • 11,466
abdu
  • 1,849
  • 1
    You can use the caption package \caption* which stops automatic numbering but why do \chapter*{Kapitel 2} it is so wrong and really defeats much of what LaTeX is trying to do. – David Carlisle May 21 '13 at 19:35
  • @DavidCarlisle I know but as you see, I need 3 things when beginning with a new chapter. The number of the chapter so this would be Chapter 1 (German: Kapitel 1) then the subsection is actually the title of the chapter and the subsection comes as a first section in the chapter. The automatic numbering is somehow weird I think. – abdu May 21 '13 at 19:39
  • take a look at this one link – vveliev May 21 '13 at 19:41
  • @vveliev I think I'll just use \caption*. The thing is I'm using LaTeX for the first time, so I'll try to learn more about captions the tables next time I do a new scientific report, but for now I will try to cope with the things I know =) – abdu May 21 '13 at 19:48
  • 1
    @abdu you are using the heading commands incorrectly which if you use subsection as the chapter title, which is why the resulting numbering is inappropriate – David Carlisle May 21 '13 at 19:49
  • @DavidCarlisle I edited my question and added a screenshot of my report document. As you see for the title of the chapter I need no numbering. So just the Chapter, its title and then the sections under it. – abdu May 21 '13 at 19:55
  • @abdu the markup for that should be \chapter{Begreiffs..GrundLagen}\section{Superl...Entwicklung} Then numbering cross referencing and everything else will be automatic. The style definition for \Chapter should write Kapitel 2 (or whatever other number is needed above the title.) – David Carlisle May 21 '13 at 20:15
  • Rememeber to link back to the original question. Some 'home made' commands are created there -- people can't compile the code, even if you include a document class and packages. – Svend Tveskæg May 21 '13 at 20:26
  • @SvendTveskæg ok how can I do so? – abdu May 21 '13 at 20:42
  • Update your answer and give a link... – Svend Tveskæg May 21 '13 at 20:53

2 Answers2

3

The heading style you show is the default layout in book class so there is no need for manual numbering at all.

enter image description here

\documentclass{book}

\usepackage[german]{babel}

\begin{document}

\chapter{something}
\section{blah blah}

xxx

\end{document}
David Carlisle
  • 757,742
  • Well I think I'm using the report class and try to change it to look like the book class. Thanks this worked too. I think I used too many packages which made problems when combined to the book class. But one thing is annoying, the headline. Can I somehow make it underlined and remove the italic effect? – abdu May 21 '13 at 20:42
  • @abdu fancyhdr package gives easy customisation of the fonts in the headline and whether there is a rule, but best to ask new questions rather than ask followup questions in comments – David Carlisle May 21 '13 at 20:55
1

Strange, but if you wish:

\documentclass{book}

\begin{document}

\chapter*{Kapitel 2} 
\section*{bla bla bla} 
\subsection*{bla blu bli}

\def\thetable{\thechapter.\arabic{table}} %PS

\setcounter{chapter}{2} %PS


\begin{table}[htbp]
 \centering
(Meaningless) % tabular removed -- PS
 \caption{Zusammensetzungen einiger SX-Nickelbasislegierungen in wt\%.}

 \label{tbl:1}
\end{table}

\end{document}

enter image description here

Here it is named Table, but in your language version it should be Tabelle.