Permalink
Browse files

Minor changes.

  • Loading branch information...
1 parent c051c95 commit dc3ee18209e7e966c66a2e23e1267eb1c4373640 @h3rald committed Aug 7, 2011
Showing with 192 additions and 10 deletions.
  1. +0 −5 document.glyph
  2. +7 −4 styles/default.css
  3. +184 −0 styles/pagination.css
  4. +1 −1 text/gem-tips.glyph
View
@@ -1,10 +1,5 @@
book[
@head[
- xml/link[
- @href[http://fonts.googleapis.com/css?family=Crimson+Text:400,400italic,600,600italic,700,700italic]
- @rel[stylesheet]
- @type[text/css]
- ]
style[default.css]
?[eq[$[document.output]|pdf]|style[pagination.css]]
?[eq[$[filters.highlighter]|coderay]|style[coderay.css]]
View
@@ -38,28 +38,31 @@ body {
text-align: center; }
.titlepage h1 {
font-size: 2.5em;
+ line-height: 1.2em;
font-weight: bold;
- line-height: 1.5em;
margin-bottom: 0.2em; }
.halftitlepage h1 {
font-size: 2.5em;
font-weight: bold;
- line-height: 1.5em;
margin-bottom: 0.2em; }
.halftitlepage h2 {
font-size: 1.1em;
font-style: italic;
font-weight: bold;
- line-height: 1.2em;
+ padding-top: 0;
+ margin-top: 0;
+ line-height: 2.5em;
margin-bottom: 0.5em;
prince-bookmark-level: none; }
.titlepage h2 {
font-size: 1.1em;
font-style: italic;
font-weight: bold;
- line-height: 1.2em;
+ padding-top: 0;
+ margin-top: 0;
+ line-height: 2.5em;
margin-bottom: 0.5em;
prince-bookmark-level: none; }
View
@@ -0,0 +1,184 @@
+@page {
+ size: A4;
+ margin: 40pt 30pt 40pt 30pt;
+ @top {
+ content: string(book-title) " - " string(chapter-title);
+ font-style: italic; }
+
+ @bottom {
+ content: counter(page, decimal); } }
+
+@page frontmatter {
+ @bottom {
+ content: counter(page, lower-roman); } }
+
+@page backmatter {
+ @bottom {
+ content: counter(page, decimal); } }
+
+@page :first {
+ padding-top: 10%;
+ @top {
+ content: normal; }
+
+ @bottom {
+ content: normal; } }
+
+ol.toc {
+ margin-left: 1.5em; }
+
+.toc > li[class] {
+ font-weight: bold; }
+.toc li {
+ list-style-type: none;
+ margin-left: 0; }
+ .toc li a {
+ color: #000; }
+ .toc li a:hover {
+ color: #000; }
+ .toc li a::after {
+ content: leader(".") target-counter(attr(href), page); }
+
+.titlepage h1, .halftitlepage h1 {
+ string-set: book-title content(); }
+
+/* TOC Counters */
+.toc > li[class~=chapter] {
+ counter-increment: toc1;
+ counter-reset: toc2; }
+.toc > li[class~=appendix] {
+ counter-increment: appendix1;
+ counter-reset: toc2; }
+.toc ol li[class] {
+ counter-increment: toc2;
+ counter-reset: toc3; }
+.toc ol ol li[class] {
+ counter-increment: toc3;
+ counter-reset: toc4; }
+.toc ol ol ol li[class] {
+ counter-increment: toc4;
+ counter-reset: toc5; }
+.toc ol ol ol ol li[class] {
+ counter-increment: toc5; }
+.toc > li[class~=chapter]::before {
+ content: counter(toc1) ". "; }
+.toc > li[class~=appendix]::before {
+ content: counter(appendix1, upper-latin) ". "; }
+.toc > li[class] {
+ margin: 1em 0; }
+.toc ol li[class]::before {
+ margin-left: 1em; }
+.toc ol ol li[class]::before {
+ margin-left: 2em; }
+.toc ol ol ol li[class]::before {
+ margin-left: 3em; }
+.toc ol ol ol ol li[class]::before {
+ margin-left: 4em; }
+.toc ol li[class~=frontmatter]::before {
+ content: " "; }
+.toc ol li[class~=bodymatter]::before {
+ content: counter(toc1) "." counter(toc2) " "; }
+.toc ol li[class~=appendix]::before {
+ content: counter(appendix1, upper-latin) "." counter(toc2) " "; }
+.toc ol ol li[class~=bodymatter]::before {
+ content: counter(toc1) "." counter(toc2) "." counter(toc3) " "; }
+.toc ol ol li[class~=appendix]::before {
+ content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) " "; }
+.toc ol ol ol li[class~=bodymatter]::before {
+ content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) " "; }
+.toc ol ol ol li[class~=appendix]::before {
+ content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) "." counter(toc4) " "; }
+.toc ol ol ol ol li[class~=bodymatter]::before {
+ content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " "; }
+.toc ol ol ol ol li[class~=appendix]::before {
+ content: counter(appendix1, upper-latin) "." counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " "; }
+
+h2, section h1 {
+ padding-top: 2em;
+ string-set: chapter-title content();
+ page-break-before: always; }
+
+.halftitlepage h2, .titlepage h2 {
+ page-break-before: avoid; }
+
+.bodymatter .chapter h2, .bodymatter .chapter h1 {
+ counter-increment: h2;
+ counter-reset: h3; }
+
+.backmatter h2, .backmatter h1 {
+ counter-increment: a2;
+ counter-reset: h3; }
+
+.bodymatter h3, .backmatter h3, .bodymatter section h1, .backmatter section h1 {
+ counter-increment: h3;
+ counter-reset: h4; }
+
+.bodymatter h4, .backmatter h4, .bodymatter section section h1, .backmatter section section h1 {
+ counter-increment: h4;
+ counter-reset: h5; }
+
+.bodymatter h5, .backmatter h5, .bodymatter section section section h1, .backmatter section section section h1 {
+ counter-increment: h5; }
+
+h1, h2, h3, h4, h5 {
+ page-break-after: avoid; }
+
+div.frontmatter {
+ page: frontmatter; }
+div.backmatter {
+ page: backmatter; }
+
+.bodymatter h2::before, .bodymatter h1:before {
+ content: "Chapter " counter(h2, upper-roman) ": ";
+ counter-reset: footnote; }
+
+.backmatter h2::before {
+ content: "Appendix " counter(a2, upper-latin) ": "; }
+
+.bodymatter section h1:before {
+ content: "Appendix " counter(a2, upper-latin) ": "; }
+.bodymatter h3::before, .bodymatter section h1:before {
+ content: counter(h2) "." counter(h3) " "; }
+
+.backmatter h3::before {
+ content: counter(a2, upper-latin) "." counter(h3) " "; }
+
+.bodymatter section section h1:before {
+ content: counter(a2, upper-latin) "." counter(h3) " "; }
+.bodymatter h4::before, .bodymatter section section h1:before {
+ content: counter(h2) "." counter(h3) "." counter(h4) " "; }
+
+.backmatter h4::before {
+ content: counter(a2, upper-latin) "." counter(h3) "." counter(h4) " "; }
+
+.bodymatter section section section h2:before {
+ content: counter(a2, upper-latin) "." counter(h3) "." counter(h4) " "; }
+.bodymatter h5::before, .bodymatter section section section section h2:before {
+ content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) " "; }
+
+.backmatter h5::before, .bodymatter section section section section h2:before {
+ content: counter(a2, upper-latin) "." counter(h3) "." counter(h4) "." counter(h5) " "; }
+
+.box, .note, .important, .tip, .caution, .code {
+ page-break-inside: avoid; }
+
+/* Footnotes */
+@page {
+ @footnotes {
+ border-top: 1px solid #000; } }
+
+.fn {
+ font-size: 85%;
+ margin-left: 1.5em;
+ display: prince-footnote;
+ counter-increment: footnote; }
+ .fn:footnote-call {
+ content: counter(footnote);
+ font-size: 85%;
+ vertical-align: super;
+ line-height: none;
+ font-weight: bold;
+ margin-left: 1pt; }
+ .fn:footnote-marker {
+ font-weight: bold;
+ margin-right: 0.5em; }
View
@@ -144,7 +144,7 @@ section[
section[
@title[Static Web Site Generators]
gem[
- @name[jeckyll]
+ @name[jekyll]
@url[http://jekyllrb.com/]
@desc[Jekyll is a simple, blog aware, static site generator.]
]

0 comments on commit dc3ee18

Please sign in to comment.