/* counters */

/* c1 must be initialized inside the body since otherwise
 * the scope of the counter is not global
 */

#content {
    counter-reset: c1 image-counter table-counter;
}

h1 {
    counter-increment: c1;
    counter-reset: c2;
}

h2 {
    counter-increment: c2;
    counter-reset: c3;
}

h3 {
    counter-increment: c3;
    counter-reset: c4;
}

h4 {
    counter-increment: c4;
    counter-reset: c5;
}

h5 {
    counter-increment: c5;
    counter-reset: c6;
}

h6 {
    counter-increment: c6;
    counter-reset: c7;
}

h7 {
    counter-increment: c7;
    counter-reset: c8;
}

h7 {
    counter-increment: c8;
    counter-reset: c9;
}


h1:before {
    content: counter(c1) " ";
}

h2:before {
    content: counter(c1) "." counter(c2)  " ";
}

h3:before {
    content: counter(c1) "." counter(c2)  "." counter(c3) " ";
}

h4:before {
    content: counter(c1) "." counter(c2)  "." counter(c3) "." counter(c4) " ";
}

h5:before {
    content: counter(c1) "." counter(c2)  "." counter(c3) "." counter(c4) "." counter(c5) " ";
}

h6:before {
    content: counter(c1) "." counter(c2)  "." counter(c3) "." counter(c4) "." counter(c5) "." counter(c6) " ";
}

h7:before {
    content: counter(c1) "." counter(c2)  "." counter(c3) "." counter(c4) "." counter(c5) "." counter(c6) "." counter(c7) " ";
}


