div.chapter h1::before { content: "Chapter 6 \A"; }
div.chapter h1 { string-set: header "Chapter 6: " content(); }

/* In TAMB, I really should use tidy=1  to close BRs and IMG tags should I ever want to print a book... */
/* For each chapter:
1. Do all content edits
2. Add cross-references/Links/footnotes
3. Convert to PDF
Edit to remove widows/orphans. (i.e. in the .tip class below, I have set widows/orphans to 5.  Could do this for <p> as well.
 */

/*Stuff that Steph added...*/
.cap {float: left;width: auto;font-size: 60px;line-height: 45px;font-family: Georgia, "Times New Roman", Times, serif;}
.tip{border-top:1px solid #336633;border-bottom:1px solid #336633;margin:10px 20px;padding:5px 0px;orphans: 5; widows: 5;}
.warning{border-top:1px solid #CC0000;border-bottom:1px solid #CC0000;margin:10px 20px;padding:5px 0px;}
.note{border-top:1px solid #0000CC;border-bottom:1px solid #0000CC;margin:10px 20px;padding:5px 0px;}
/*These are for pics with NO caption.*/
img.floatmiddle{/*Center the image...*/margin: 0px auto 0px auto; text-align:center; display:block;}
img.floatleft{/*Float the image Left...*/float: left;margin: 5px 5px 5px 5px;}
img.floatright{/*Float the image Right...*/float: right;margin: 5px 5px 5px 5px;}

/*These are for pics WITH A caption.*/
.picncaption_left{float:left;padding:5px 15px 10px 15px;text-align: center;}
.picncaption_left img {display:block;}
.picncaption_left span {font-size: 0.66em;}
.picncaption_right{float:right;padding:5px 15px 10px 15px;text-align: center;}
.picncaption_right img {display:block;}
.picncaption_right span {font-size: 0.66em;}
.picncaption{display: block;text-align: center;line-height:0.66em;}
.picncaption img {display:block;margin: 0px auto 0px auto;}
.picncaption span {margin: 0px auto 0px auto;font-size: 0.66em;}

.dialogue {margin-left:20px;margin-right:20px;font-style: italic;}

/* Beginnin' o' de blockquotes */
blockquote {
font-family:Georgia, 'Times New Roman', Times, serif;
font-style: italic;
font-size: 14px;
line-height: 2.0em;
letter-spacing: 0.25em;
margin:0px;
padding-bottom:20px;
text-align: center;
}
blockquote .quotes {font-size: 25px;vertical-align: middle; }
.text {font-weight: lighter;}
/* End o' de blockquotes */

/* Beginning of pullquote stuff */
.pullquote {
display: block !important;
color: #006584; /*darkest color please*/
width:150px;
/*height:100px;*/
background:white;
filter:alpha(opacity=90);
opacity:.90;
float:right;
margin:18px 10px 10px 10px;
font-size: 18px;
/*line-height:16px;*/
line-height:89%;
text-align: right;
}
.pullquote .first {
filter:alpha(opacity=75);
opacity:.75;
}
.pullquote .second {
filter:alpha(opacity=90);
opacity:.90;
}
/* End of pullquote stuff */


/* Sample style sheet for boom!, the book microformat              */
/* written  by Hakon Wium Lie and Bert Bos, November 2005          */
/* You may reuse this style sheet  for any purpose without any fees */


html {
  margin: 0;
  font: 10pt/1.26 "Gill Sans", sans-serif;
}

/* By default, the left margin (the one on the far right below) is 28%, leaving a huge gap on the left.
I think I will go FULL width and put the links in as footnote (very nice....) */
body {
  margin: 0 0 0 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Gill Sans", sans-serif;
  margin: 2em 0 0.5em 0;
  page-break-after: avoid;
}

h1 {
  padding: 2em 0 2em 0;
  margin: 0;
  font-size: 2.4em;
  font-weight: 900;
}

h2 {
  font-size: 1.2em;
  text-transform: uppercase;
  font-weight: bold;
}

h3 {
  font-size: 1em;
  font-weight: bold;
}




q::before {
  content: "\201C";
}

q::after {
  content: "\201D";
}

/*p { margin: 0 }*/ /*BUT OTHER P TAGS will need the margin shrunk somewhat...0.5em*/
/*p + p { text-indent: 1.3em }*/
p.sidenote + p, p.caption, p.art { text-indent: 0 }

p.author {
  margin-top: 2em;
  text-indent: 0;
  text-align: right;
}

pre {  margin: 1em 0em 1em 1.3em; }

a { text-decoration: none; color: black }

/* cross-references */

/*a.pageref::after { content: " on page " target-counter(attr(href), page); }*/
a.pageref::after { content: target-counter(attr(href), page); }
a.chapref::before { content: " Chapter " target-counter(attr(href), chapter) ", "; }
a.figref { content: " Figure " target-counter(attr(href), figure); }
a.tableref { content: " Table " target-counter(attr(href), figure); }

/* sidenotes */

/*.sidenote {
  float: left;
  clear: left;
  margin: 0 0 1em -41%;
  width: 37%;
  font-size: 0.9em;
  font-style: normal;
  text-indent: 0;
  text-align: right;
  page-break-inside: avoid;
}*/

/* sidebars */

/*div.sidebar {
  float: top-next;
  margin: 1.2em 0 1.2em 0;
  border: thin solid;
  background: #CCC;
  padding: 0.5em 1em;
  page-break-inside: avoid;
  column-count: 2;
  column-gap: 1.5em;
}*/

/*div.sidebar h2 {
  margin-top: 0;
}*/

/* figures and tables*/

div.figure {
  margin: 1em 0;
  counter-increment: figure;
}

div.figure .caption, div.table .caption {
  float: left;
  clear: left;
  width: 37%;
  text-align: right;
  font-size: 0.9em;
  margin: 0 0 1.2em -40%;
}

div.figure .caption::before {
  content: "Figure " counter(figure) ": ";
  font-weight: bold;
}

div.table .caption::before {
  content: "Table " counter(table) ": ";
  font-weight: bold;
}

div.table {
  margin: 1em 0;
  counter-increment: table;
}

div.table th {
  text-align: left;
}

table th, table td {
  text-align: left;
  padding-right: 1em;
}

table.lined td, table.lined th {
  border-top: none;
  border-bottom: thin dotted;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
}


@page {
  /* Below are the original page size and margin settings
  margin: 27mm 16mm 27mm 16mm;
  size: 7in 9.25in; */
  /* below settings were suggested by Page Perfect*/
  margin: 0.75in 0.5in 0.75in 0.5in;
  size: 6in 9in;
  /* Below Added by Steph */
  marks: crop cross;


  @footnotes {   /*This must be for the line at the bottom of the page... */
    border-top: thin solid black;
    padding-top: 0.3em;
    margin-top: 0.6em;
    /*margin-left: 30%;*/
    margin-left: 20px;
  }
}


/* define default page and names pages: cover, blank, frontmatter */

@page :left {
  @top-left {
    font: 11pt "Gill Sans", serif;
    content: "Using Thingamablog";
    vertical-align: bottom;
    padding-bottom: 2em;
  }

  @bottom-left {
    font: 11pt "Gill Sans", serif;
    content: counter(page);
    padding-top: 2em;
    vertical-align: top;
  }
}

@page :right {
  @top-right {
    font: 11pt "Gill Sans", serif;
    content: string(header, first);
    vertical-align: bottom;
    padding-bottom: 2em;
  }

  @bottom-right {
    font: 11pt "Gill Sans", serif;
    content: counter(page);
    text-align: right;
    vertical-align: top;
    padding-top: 2em;
  }
}

@page frontmatter :left {
  @top-left {
    font: 11pt "Gill Sans", serif;
    content: string(title);
    vertical-align: bottom;
    padding-bottom: 2em;
  }

  @bottom-left {
    font: 11pt "Gill Sans", serif;
    content: counter(page, lower-roman);
    padding-top: 2em;
    vertical-align: top;
  }
}

@page cover { margin: 0; }

@page frontmatter :right {
  @top-right {
    font: 11pt "Gill Sans", serif;
    content: string(header, first);
    vertical-align: bottom;
    padding-bottom: 2em;
  }

  @bottom-right {
    font: 11pt "Gill Sans", serif;
    content: counter(page, lower-roman);
    text-align: right;
    vertical-align: top;
    padding-top: 2em;
  }
}

@page blank :left {
  @top-left { content: normal }
  @bottom-left { content: normal }
}

@page blank :right {
  @top-right { content: normal }
  @bottom-right { content: normal }
}

/* footnotes */

.footspot{
  font-style:italic;
}


.footnote {
  display: none;                   /* default rule */

  display: prince-footnote;        /* prince-specific rules */
  position: footnote;
  footnote-style-position: inside;

  counter-increment: footnote;
  margin-left: 1.4em;
  font-size: 90%;
  line-height: 1.4;
  /*padding-left:1px;*/ /*I don't think it works...*/ /*so the superscript number in the text is not so close to the word it refers to... */
}

.footnote::footnote-call {
  vertical-align: super;
  font-size: 80%;
  padding-left:1px; /*so the superscript number in the content text is not so close to the word it refers to... */ 
}

.footnote::footnote-marker {
  /* This is the number at the bottom of the page. */
  vertical-align: super;
  /*color: green;*/
  padding-right: 0.4em;
}


/*
   A book consists of different types of sections. We propose to use
   DIV elements with these class names:

    frontcover
    halftitlepage: contains the title of the book
    titlepage: contains the title of the book, name of author(s) and publisher
    imprint: left page with copyright, publisher, library printing information
    dedication: right page with short dedication
    foreword: written by someone other than the author(s)
    about_tamb: added by Steph for the "About Thingamablog" page.
    about_bob: "
    toc: table of contents
    preface: preface, including acknowledgements
    chapter: each chapter is given its own DIV element
    references: contains list of references
    appendix: each appendix is given its own
    bibliography
    glossary
    index
    colophon: describes how the book was produced
    backcover

   A book will use several of the types listed above, but few books
   will use all of them.
*/

/* which section uses which named page */

div.halftitlepage, div.titlepage, div.imprint, div.dedication, div.about_tamb { page: blank }
div.foreword, div.about_bob, div.toc, div.preface { page: frontmatter }


/* page breaks */

div.frontcover, div.halftitlepage, div.titlepage { page-break-before: right }
div.imprint { page-break-before: always }
#entrybody, div.dedication, div.foreword, div.toc, div.preface, div.reference,
div.appendix, div.bibliography, div.glossary, div.index, div.colophon {
  page-break-before: always
}

/*I pulled this div.chapter out of the above in an attempt to get chapters to always start on odd pages...*/
div.chapter, div.about_tamb, div.about_bob { page-break-before: right}

div.backcover { page-break-before: left }

/* the front cover; this code is probably not very reusable by other books */

div.frontcover { page: cover; }

div.frontcover img {
  position: absolute;
  width: 7in; height: 9.25in;
  left: 0; top: 0;
  z-index: -1;
}

div.frontcover h1 {
  position: absolute;
  left: 2cm; top: 1cm;
  color: white;
  font-size: 44pt;
  font-weight: normal;
}

div.frontcover h2 {
  position: absolute;
  right: 0; top: 5cm;
  color: black;
  background: white;
  font-size: 16pt;
  font-weight: normal;
  padding: 0.2em 5em 0.2em 1em;
  letter-spacing: 0.15em;
}

div.frontcover h3 {
  position: absolute;
  left: 2cm; top: 7cm;
  color: white;
  font-size: 24pt;
  font-weight: normal;
}

div.frontcover p {
  position: absolute;
  left: 2cm; bottom: 1.5cm;
  font-size: 24pt;
  color: black;
  font-weight: bold;
  text-transform: uppercase;
}


/* titlepage, halftitlepage */

div.titlepage h1, div.halftitlepage h1 { margin-bottom: 2em; }
div.titlepage h2, div.halftitlepage h2 { font-size: 1.2em; margin-bottom: 3em; }
div.titlepage h3, div.halftitlepage h3 { font-size: 1em; margin-bottom: 3em; }
div.titlepage p, div.halftitlepage p {
  font-size: 1.4em;
  font-weight: bold;
  margin: 0; padding: 0;
}


/* TOC */

ul.toc, ul.toc ul {
  list-style-type: none;
  margin: 0; padding: 0;
}
ul.toc ul {
  margin-left: 1em;
  font-weight: normal;
}

/* I have no idea what the > means...*/
/*ul.toc > li {
  font-weight: bold;
  margin-bottom: 0.5em;
} */
ul.toc > li {
  /*font-weight: bold;*/
  margin-bottom: 0.25em;
}





ul.toc a::after {
  content: leader('.') target-counter(attr(href), page);
  font-style: normal;
}
ul.toc > li.frontmatter a::after {
  content: leader('.') target-counter(attr(href), page, lower-roman);
  font-style: normal;
}
ul.toc > li.endmatter a::after {
  content: leader('.') target-counter(attr(href), page);
  font-style: normal;
}

/*This puts the word "Chapter" and the chapter # before each Chapter plus teh chapter number, in block mode; looks like this:

Chapter 1
    Installing Thingamablog..................11
*/
/*
ul.toc > li.chapter::before {
  content: "Chapter " counter(toc-chapter, decimal);
  display: block;
  margin: 1em 0 0.1em -2.5cm;
  font-weight: normal;
  counter-increment: toc-chapter;
  page-break-after: avoid;
}
*/
/*I am trying to modify it so the word Chapter is gone, just the number remains and make it so that it is on the same line as the rest of the text...*/
ul.toc > li.chapter::before {
  content: counter(toc-chapter, decimal) " - ";
  display: inline;
  /*margin: 1em 0 0.1em -2.5cm;*/
  font-weight: normal;
  counter-increment: toc-chapter;
  page-break-after: avoid;
}


/* chapter numbers */

#entrybody, div.chapter { counter-increment: chapter; }

/* This is those 5 circles that are above and to the left of H! headings
and are outside of the allowable margin of this (narrow) book... */
h1::before {
  white-space: pre;
  /*margin-left: -2.5cm;*/
  font-size: 50%;
  content: "\B0  \B0  \B0  \B0  \B0 \A";  /* ornaments */
}



div.frontcover h1::before, div.titlepage h1::before, div.halftitlepage h1::before {
  content: normal;                  /* that is, none */
}

/*
OK to make this work I needed to:
Move my H3 tags within my div.chapter tags
and change all instances of h3 in this doc to something else
and change all instances of h1 in this doc to h3
OR...
I could change all the H3s in my .htm file to .h1

Guess what I did?

*/
h1 { string-set: header content();}


/* index */

ul.index {
  list-style-type: none;
  margin: 0; padding: 0;
  column-count: 2;
  column-gap: 1em;
}

ul.index a::after { content: ", " target-counter(attr(href), page); }


span.element, span.attribute {
  text-transform: uppercase;
  font-weight: bold;
  font-size: 80%;
}
span.property { font-weight: bold }
code, span.css, span.value, span.declaration {
  font: 90% "Lucida Console", "Lucida Sans Typewriter", monospace;
}


@media screen, handheld {
  html { margin: 1em; font: 14px "Gill Sans", sans-serif; }
  h1 { margin-bottom: 0.5em }
  div.frontcover, div.halftitlepage, div.titlepage, div.imprint,
  div.dedication, div.foreword, div.about_tamb, div.about_bob, div.toc, div.index { display: none }
}

