Created
November 26, 2012 03:09
-
-
Save shiffman/4146422 to your computer and use it in GitHub Desktop.
HTML for different page numbering for front matter vs content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>The Nature of Code</title> | |
<style type="text/css"> | |
div#frontmatter { | |
page: frontmatter; | |
} | |
@page :left { | |
@bottom-left { | |
content: counter(page); | |
} | |
} | |
@page :right { | |
@bottom-right { | |
content: counter(page); | |
} | |
} | |
@page frontmatter :left { | |
@bottom-left { | |
content: counter(page,lower-roman); | |
} | |
} | |
@page frontmatter :right { | |
@bottom-right { | |
content: counter(page,lower-roman); | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div id ="frontmatter"> | |
<h1>Front Matter</h1> | |
<p> | |
This is page 1. | |
</p> | |
</div> | |
<div style="page-break-after:always;"> </div> | |
<h1>Content</h1> | |
<p> | |
This is page 2. | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment