body { direction: ltr; } /* Title page */ #cover-image {width: 100%; } #cover-image img { max-width: 100%; } div#text-cover h2 { page-break-before: avoid; } /* ToC page */ h1#toc { margin-top: 1em; font-size: 2em; } /* Book ToC */ .toc li { list-style: none; margin-left: 0; padding-left: 0; } .toc.has-parts li { margin-left: 10px; } .toc.has-parts li.part { margin-left: 0px; } .toc li.part { font-size: 1.2em; } .toc li.chapter { padding-left: 0px; } .toc li.section { padding-left: 10px; font-size: 0.8em; } .toc li.sub-section { padding-left: 20px; font-size: 0.7em; } .toc li.sub-sub-section { padding-left: 30px; font-size: 0.6em; } .toc li.sub-sub-sub-section { padding-left: 40px; font-size: 0.5em; } .section-number { font-weight: bold; } /* Dedication */ div.dedication { text-align: center; font-style: italic; margin-top: 10em; } /* headings */ h1#toc { text-align: left;} h1, h2, h3, h4, h5, h6, h7 { font-family: sans-serif; } /* Parts */ h1 { font-size: 4em; line-height: .8em; font-variant: small-caps; margin-top: 20%; text-align: center; padding: 0; font-weight: normal; } /* Chapters */ h1#toc, h2 { margin-top: 10%; margin-bottom: 1em; } /* Sections */ h3 { margin-top: 1em; margin-bottom: 0.25em; } h4 { margin-top: 1em; margin-bottom: 0.25em; } h5 { margin-top: 1em; margin-bottom: 0.25em; } h6 { margin: 0; } /* scene breaks */ hr.scene-break { width: 80%; margin-left: 10%; margin-right: 10%; margin-top: 1em; margin-bottom: 1em; } .scene-break.space { margin-top: 2em; } .scene-break.stars { margin-top: 1em; margin-bottom: 1em; width: 100%; text-align: center; } /* Tables */ table { margin-top: 10px; margin-bottom: 20px; border-collapse: collapse } tbody { padding-bottom: 40px; } td, th { padding-right: 10px; } th { text-align: left; border-bottom: thin solid; } /* general text */ p { text-indent: 0em; margin-top: 0.5em; } blockquote { margin: 1.5em 0em 1.5em 2em; } /* code blocks */ code.lineno, span.lineno { color: gray; font-size: 80%; } /* setting the display on a div to inline-block makes the epub reader try to fit the div on a single page. See http://www.pigsgourdsandwikis.com/2010/06/goodbye-widows-and-orphans-or-yes-you.html */ div.code-block { margin-top: 1em; margin-bottom: 1.5em; } code { -webkit-hyphens: none; } div.code-block div.highlight { -webkit-hyphens: none; } /* captions for codeblocks and tables */ p.codeblock-title, p.table-title { font-size: 80%; font-weight: 550; /* Normal = 400. bold = 700 */ page-break-after: avoid; margin-bottom: 0px; } p.codeblock-title { margin-top: -10px; padding-top: -10px; text-indent: 0em; } div.code-block hr { margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; } div.code-block hr { width: 100%; } table.with-caption { margin-top: 0px; padding-top: 0px; page-break-before: avoid; } .centered p { text-align: center; } div.page-break { page-break-after: always; } /* asides */ .sidebarish { font-size: 0.9em; } div.aside { border-style: solid; background-color: rgb(240,240,240); border-color: rgb(240,240,240); border-width: thin; margin: 1em; padding: 1em 1.5em; } /* tips, warnings, etc */ table.sidebarish { margin: 1em 1em 1em 0em; border-style: none; border-collapse: collapse; } table.sidebarish td { vertical-align: top; padding-bottom: 1em; padding-top: 1em; } .sidebarish h1, .sidebarish h2, .sidebarish h3, .sidebarish h4 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: left; } table.sidebarish td.sidebar-icon { width: 50px; padding-top: 1.5em; padding-left: 0em; } table.sidebarish td.sidebar-icon img { width: 40px; height: 40px; margin-right: 10px; } /* force some space before and after code blocks */ pre { margin-top: 0.5em; margin-bottom: 0.5em; font-family: Courier, monospace; white-space: pre-wrap; } body { direction: ltr; } /* image equations */ img.inline-equation { vertical-align: -30%; } img.block-equation { margin-top: 0.5em; margin-right: auto; margin-bottom: 0.5em; margin-left: auto; text-align: center; } /* Lists */ ul, ol { margin-top: 1em; } ol.arabic { list-style-type: decimal; } ol.lower-roman { list-style-type: lower-roman; } ol.lower-alpha { list-style-stype: lower-alpha; } /* Prevents overflow in non-iBooks epub readers */ img { max-width: 100%; } /* Images with captions */ div.image-with-caption p.caption { text-align: center; margin: 0em !important; padding: 0em !important; text-indent: 0em !important; } div.image-with-caption.floatleft { float: left; clear: left } div.image-with-caption.floatright { float: right; clear: right } div.image-with-caption.floatleft img, div.image-with-caption.floatright img { width: 100% !important; vertical-align: text-top margin: .5em !important; } div.image-with-caption.floatleft p.caption, div.image-with-caption.floatright p.caption { width: 100%; } /* NOTE: I replaced this line: * .err { border: 1px solid #FF0000 } * with this: * .err { color: #FF0000 } * to get rid of the ugly red boxes */ /* ============================================================================== */ /* everything below this line is generated by */ /* rake generate:pygments:styles[default] */ .hll { background-color: #ffffcc } .c { color: #408080; font-style: italic } /* Comment */ .err { color: #FF0000 } .k { color: #008000; font-weight: bold } /* Keyword */ .o { color: #666666 } /* Operator */ .cm { color: #408080; font-style: italic } /* Comment.Multiline */ .cp { color: #BC7A00 } /* Comment.Preproc */ .c1 { color: #408080; font-style: italic } /* Comment.Single */ .cs { color: #408080; font-style: italic } /* Comment.Special */ .gd { color: #A00000 } /* Generic.Deleted */ .ge { font-style: italic } /* Generic.Emph */ .gr { color: #FF0000 } /* Generic.Error */ .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .gi { color: #00A000 } /* Generic.Inserted */ .go { color: #888888 } /* Generic.Output */ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .gs { font-weight: bold } /* Generic.Strong */ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .gt { color: #0044DD } /* Generic.Traceback */ .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ .kp { color: #008000 } /* Keyword.Pseudo */ .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ .kt { color: #B00040 } /* Keyword.Type */ .m { color: #666666 } /* Literal.Number */ .s { color: #BA2121 } /* Literal.String */ .na { color: #7D9029 } /* Name.Attribute */ .nb { color: #008000 } /* Name.Builtin */ .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .no { color: #880000 } /* Name.Constant */ .nd { color: #AA22FF } /* Name.Decorator */ .ni { color: #999999; font-weight: bold } /* Name.Entity */ .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ .nf { color: #0000FF } /* Name.Function */ .nl { color: #A0A000 } /* Name.Label */ .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .nt { color: #008000; font-weight: bold } /* Name.Tag */ .nv { color: #19177C } /* Name.Variable */ .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .w { color: #bbbbbb } /* Text.Whitespace */ .mf { color: #666666 } /* Literal.Number.Float */ .mh { color: #666666 } /* Literal.Number.Hex */ .mi { color: #666666 } /* Literal.Number.Integer */ .mo { color: #666666 } /* Literal.Number.Oct */ .sb { color: #BA2121 } /* Literal.String.Backtick */ .sc { color: #BA2121 } /* Literal.String.Char */ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .s2 { color: #BA2121 } /* Literal.String.Double */ .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ .sh { color: #BA2121 } /* Literal.String.Heredoc */ .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ .sx { color: #008000 } /* Literal.String.Other */ .sr { color: #BB6688 } /* Literal.String.Regex */ .s1 { color: #BA2121 } /* Literal.String.Single */ .ss { color: #19177C } /* Literal.String.Symbol */ .bp { color: #008000 } /* Name.Builtin.Pseudo */ .vc { color: #19177C } /* Name.Variable.Class */ .vg { color: #19177C } /* Name.Variable.Global */ .vi { color: #19177C } /* Name.Variable.Instance */ .il { color: #666666 } /* Literal.Number.Integer.Long */