// Experimental

h1,
article {
	page-break-before: always;
}

body {
	counter-reset: h1num h2num h3num h4num figurenum;
	padding: 0;
	text-align: justify;
}

h1:before {
	content: counter(h1num) '. ';
	counter-increment: h1num;
}

h2:before {
	content: counter(h1num) '.'counter(h2num) '. ';
	counter-increment: h2num;
}

h3:before {
	content: counter(h1num) '.' counter(h2num) '.'counter(h3num) '. ';
	counter-increment: h3num;
}

h4:before {
	content: counter(h1num) '.' counter(h2num) '.'counter(h3num) '.' counter(h4num) '. ';
	counter-increment: h4num;
}

figcaption:before {
	content: counter(h1num) '-' counter(figurenum) '. ';
	counter-increment: figurenum;
}

figcaption {
	margin: 0 auto;
	max-width: 100%;
	text-align: center;
}

img,
table {
	margin: 0 auto;
}

// Not supported by all browsers
@page {
	margin-bottom: 2.5cm;
	margin-top: 2.5cm;
}

@page :left {
	margin-left: 4cm;
	margin-right: 3cm;
}

@page :right {
	margin-left: 3cm;
	margin-right: 4cm;
}
