diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss
index 65058a9f..0455d9b4 100644
--- a/collects/scribble/html-render.ss
+++ b/collects/scribble/html-render.ss
@@ -76,6 +76,8 @@
format-number
quiet-table-of-contents)
+ (init-field [css-path #f])
+
(define/override (get-suffix) #".html")
;; ----------------------------------------
@@ -132,6 +134,9 @@
(define/private (reveal-subparts? p)
(part-style? p 'reveal))
+
+ (define/public (toc-wrap table)
+ null)
(define/public (render-toc-view d ri)
(let-values ([(top mine)
@@ -185,10 +190,11 @@
(class "tocviewlink"))
,@(render-content (or (part-title-content top) '("???")) d ri)))
(div nbsp)
- (table
- ((class "tocviewlist")
- (cellspacing "0"))
- ,@toc-content)))))
+ ,@(toc-wrap
+ `(table
+ ((class "tocviewlist")
+ (cellspacing "0"))
+ ,@toc-content))))))
,@(render-onthispage-contents d ri top)
,@(apply append
(map (lambda (t)
@@ -311,18 +317,31 @@
null))
(link ((rel "stylesheet")
(type "text/css")
- (href "scribble.css")
+ (href ,(or css-path "scribble.css"))
(title "default"))))
(body ,@(render-toc-view d ri)
(div ((class "maincolumn"))
- (div ((class "main")) ,@(render-part d ri)))))])
- (install-file scribble-css)
+ (div ((class "main"))
+ ,@(render-version d ri)
+ ,@(render-part d ri)))))])
+ (unless css-path
+ (install-file scribble-css))
(printf "\n")
(xml:write-xml/content (xml:xexpr->xml xpr)))))
(define/override (render-one d ri fn)
(render-one-part d ri fn null))
+ (define/public (render-version d ri)
+ `((div ([class "versionbox"])
+ ,@(render-content
+ (list
+ (make-element "version"
+ (list "Version: "
+ (current-version))))
+ d
+ ri))))
+
(define/override (render-part d ri)
(let ([number (collected-info-number (part-collected-info d ri))])
`(,@(if (and (not (part-title-content d))
@@ -645,6 +664,9 @@
(define/override (get-onthispage-label)
`((div ((class "tocsubtitle"))
"On this page:")))
+
+ (define/override (toc-wrap p)
+ (list p))
(define contents-content '("contents"))
(define index-content '("index"))
@@ -654,7 +676,11 @@
(define no-next-content next-content)
(define sep-element (make-element #f '(nbsp nbsp)))
- (inherit render-table)
+ (inherit render-table
+ render-paragraph)
+
+ (define/override (render-version r i)
+ null)
(define/private (find-siblings d ri)
(let ([parent (collected-info-parent (part-collected-info d ri))])
@@ -705,68 +731,56 @@
(let ([d (car (last-pair subs))])
(and (part-style? d 'index)
d)))))))])
- `(,@(render-table (make-table
- 'at-left
- (list
- (cons
- (make-flow
- (list
- (make-paragraph
- (list
- (make-element
- (if parent
- (make-target-url "index.html")
- "nonavigation")
- contents-content)))))
- (if index
- (list
- (make-flow
- (list
- (make-paragraph
- (list
- 'nbsp
- (if (eq? d index)
- (make-element
- "nonavigation"
- index-content)
- (make-link-element
- #f
- index-content
- (car (part-tags index)))))))))
- null))))
- d ri)
- ,@(render-table (make-table
- 'at-right
- (list
- (list
- (make-flow
- (list
- (make-paragraph
- (list
- (make-element
- (if parent
- (make-target-url (if prev
- (derive-filename prev)
- "index.html"))
- "nonavigation")
- prev-content)
- sep-element
- (make-element
- (if parent
- (make-target-url
- (if (toc-part? parent)
- (derive-filename parent)
- "index.html"))
- "nonavigation")
- up-content)
- sep-element
- (make-element
- (if next
- (make-target-url (derive-filename next))
- "nonavigation")
- next-content))))))))
- d
- ri)))))
+ `((div ([class "navleft"])
+ ,@(render-content
+ (append
+ (list
+ (make-element
+ (if parent
+ (make-target-url "index.html")
+ "nonavigation")
+ contents-content))
+ (if index
+ (list
+ 'nbsp
+ (if (eq? d index)
+ (make-element
+ "nonavigation"
+ index-content)
+ (make-link-element
+ #f
+ index-content
+ (car (part-tags index)))))
+ null))
+ d
+ ri))
+ (div ([class "navright"])
+ ,@(render-content
+ (list
+ (make-element
+ (if parent
+ (make-target-url (if prev
+ (derive-filename prev)
+ "index.html"))
+ "nonavigation")
+ prev-content)
+ sep-element
+ (make-element
+ (if parent
+ (make-target-url
+ (if (toc-part? parent)
+ (derive-filename parent)
+ "index.html"))
+ "nonavigation")
+ up-content)
+ sep-element
+ (make-element
+ (if next
+ (make-target-url (derive-filename next))
+ "nonavigation")
+ next-content))
+ d
+ ri))))))
(define/override (render-part d ri)
(parameterize ([current-version
@@ -796,20 +810,9 @@
[on-separate-page #f])
(if sep?
;; Navigation bars;
- `(,@(navigation d ri)
+ `(,@(super render-version d ri)
+ ,@(navigation d ri)
(p nbsp)
- ,@(render-table (make-table
- "versionbox"
- (list
- (list
- (make-flow
- (list
- (make-paragraph (list
- (make-element "version"
- (list "Version: "
- (current-version))))))))))
- d
- ri)
,@(super render-part d ri)
(p nbsp)
,@(navigation d ri)
diff --git a/collects/scribble/scribble.css b/collects/scribble/scribble.css
index 7f0f3dd9..e47bf76a 100644
--- a/collects/scribble/scribble.css
+++ b/collects/scribble/scribble.css
@@ -1,497 +1,431 @@
- body {
- color: black;
- background-color: #ffffff;
- }
-
- table td {
- padding-left: 0;
- padding-right: 0;
- }
-
- .maincolumn {
- font-family: monospace;
- width: 43em;
- margin-right: -40em;
- margin-left: 15em;
- }
-
- .main {
- font-family: serif;
- text-align: left;
- }
-
- .versionbox {
- position: relative;
- float: right;
- left: 3em;
- top: -2em;
- height: 0em;
- width: 13em;
- margin: 0em -13em 0em 0em;
- }
- .version {
- font-family: sans-serif;
-
- }
-
- .refpara {
- font-family: monospace;
- position: relative;
- float: right;
- left: 1em;
- top: -1em;
- height: 0em;
- width: 13em;
- margin: 0em -13em 0em 0em;
- }
-
- .refcolumn {
- background-color: #F5F5DC;
- display: block;
- position: relative;
- width: 13em;
- font-size: 85%;
- border: 0.5em solid #F5F5DC;
- }
-
- .refcontent {
- font-family: serif;
- }
-
- .tocset {
- font-family: monospace;
- position: relative;
- float: left;
- width: 12.5em;
- margin-right: 2em;
- }
-
- .tocview {
- font-family: serif;
- text-align: left;
- background-color: #F5F5DC;
- }
-
- .tocsub {
- font-family: serif;
- margin-top: 1em;
- text-align: left;
- background-color: #DCF5F5;
- }
-
- .tocviewtitle {
- font-size: 80%;
- font-weight: bold;
- margin: 0.2em 0.2em 0.2em 0.2em;
- }
-
- .tocviewlist {
- margin: 0.2em 0.2em 0.2em 0.2em;
- }
-
- .tocviewlist td {
- font-size: 80%;
- vertical-align: top;
- }
-
- .tocviewlink {
- text-decoration: none;
- }
-
- .tocsublist {
- margin: 0.2em 0.2em 0.2em 0.2em;
- }
-
- .tocsublist td {
- vertical-align: top;
- padding-left: 1em;
- text-indent: -1em;
- }
-
- .tocsublinknumber {
- font-size: 80%;
- }
-
- .tocsublink {
- text-decoration: none;
- }
-
- .tocsubseclink {
- font-size: 80%;
- text-decoration: none;
- }
-
- .tocsubtitle {
- font-size: 80%;
- font-style: italic;
- margin: 0.2em 0.2em 0.2em 0.2em;
- }
-
- .leftindent {
- margin-left: 1em;
- margin-right: 0em;
- }
-
- .insetpara {
- margin-left: 1em;
- margin-right: 1em;
- }
-
- .toclink {
- text-decoration: none;
- color: blue;
- font-size: 85%;
- }
-
- .toptoclink {
- text-decoration: none;
- color: blue;
- font-weight: bold;
- }
-
- .inherited {
- width: 100%;
- margin-top: 1em;
- text-align: left;
- background-color: #ECF5F5;
- }
-
- .inherited td {
- padding-left: 1em;
- text-indent: -0.8em;
- padding-right: 0.2em;
- }
-
- .inheritedlbl {
- font-style: italic;
- font-size: 85%;
- }
-
- .indexlink {
- text-decoration: none;
- }
-
- .nobreak {
- white-space: nowrap;
- }
-
- .stt {
- font-family: monospace;
- }
-
- .title {
- font-size: 200%;
- font-weight: normal;
- margin-top: 2.8em;
- text-align: center;
- }
-
- .partheading {
- font-size: 100%;
- }
-
- .chapterheading {
- font-size: 100%;
- }
-
- .beginsection {
- font-size: 110%;
- }
-
- .tiny {
- font-size: 40%;
- }
-
- .scriptsize {
- font-size: 60%;
- }
-
- .footnotesize {
- font-size: 75%;
- }
-
- .small {
- font-size: 90%;
- }
-
- .normalsize {
- font-size: 100%;
- }
-
- .large {
- font-size: 120%;
- }
-
- .largecap {
- font-size: 150%;
- }
-
- .largeup {
- font-size: 200%;
- }
-
- .huge {
- font-size: 300%;
- }
-
- .hugecap {
- font-size: 350%;
- }
-
- pre {
- margin-left: 2em;
- }
-
- blockquote {
- margin-left: 2em;
- }
-
- ol {
- list-style-type: decimal;
- }
-
- ol ol {
- list-style-type: lower-alpha;
- }
-
- ol ol ol {
- list-style-type: lower-roman;
- }
-
- ol ol ol ol {
- list-style-type: upper-alpha;
- }
-
- i {
- font-family: serif;
- }
-
- .boxed {
- width: 100%;
- background-color: #E8E8FF;
- }
-
- .together {
- width: 100%;
- }
-
- .prototype td {
- vertical-align: top;
- }
- .longprototype td {
- vertical-align: bottom;
- }
-
- .schemeblock td {
- vertical-align: baseline;
- }
-
- .argcontract td {
- vertical-align: top;
- }
-
- .centered {
- horiz-align: center;
- }
-
- .verbatim em {
- font-family: serif;
- }
-
- .ghost {
- color: white;
- }
-
- .scheme em {
- color: black;
- font-family: serif;
- }
-
- .highlighted {
- background-color: #ddddff;
- }
-
- .defmodule {
- width: 100%;
- background-color: #F5F5DC;
- }
-
- .specgrammar {
- float: right;
- }
-
- .hspace {
- font-family: monospace;
- }
-
- .small {
- font-size: 80%;
- }
-
- .inferencetop td {
- border-bottom: 1px solid black;
- text-align: center;
- }
- .inferencebottom td {
- text-align: center;
- }
-
- .schemeinput {
- color: brown;
- background-color: #eeeeee;
- font-family: monospace;
- }
-
- .schemeinputbg {
- background-color: #eeeeee;
- }
-
- .schemereader {
- font-family: monospace;
- }
-
- .schemeparen {
- color: #843c24;
- font-family: monospace;
- }
-
- .schememeta {
- color: #262680;
- font-family: monospace;
- }
-
- .schememod {
- color: black;
- font-family: monospace;
- }
-
- .schemeopt {
- color: black;
- }
-
- .schemekeyword {
- color: black;
- font-weight: bold;
- font-family: monospace;
- }
-
- .schemeerror {
- color: red;
- font-style: italic;
- }
-
- .schemevariable {
- color: #262680;
- font-style: italic;
- font-family: monospace;
- }
-
- .schemesymbol {
- color: #262680;
- font-family: monospace;
- }
-
- .schemevaluelink {
- text-decoration: none;
- color: blue;
- }
-
- .schememodlink {
- text-decoration: none;
- color: blue;
- }
-
- .schemesyntaxlink {
- text-decoration: none;
- color: black;
- font-weight: bold;
- }
-
- .badlink {
- text-decoration: underline;
- color: red;
- }
-
- .plainlink {
- text-decoration: none;
- color: blue;
- }
-
- .techlink {
- text-decoration: none;
- color: black;
- }
- .techlink:hover {
- text-decoration: underline;
- color: blue;
- }
-
- .schemeresult {
- color: #0000af;
- font-family: monospace;
- }
-
- .schemestdout {
- color: #960096;
- font-family: monospace;
- }
-
- .schemecomment {
- color: #c2741f;
- font-family: monospace;
- }
-
- .schemevalue {
- color: #228b22;
- font-family: monospace;
- }
-
- .bibliography td {
- vertical-align: top;
- }
-
- .imageleft {
- float: left;
- margin-right: 0.3em;
- }
-
- .nonavigation {
- color: #EEEEEE;
- }
-
- .disable {
- /* color: #e5e5e5; */
- color: gray;
- }
-
- .smallcaps {
- font-size: 75%;
- }
-
- .smallprint {
- color: gray;
- font-size: 75%;
- text-align: right;
- }
-
- .footnoterule {
- text-align: left;
- width: 40%;
- }
-
- .colophon {
- color: gray;
- font-size: 80%;
- font-style: italic;
- text-align: right;
- }
-
- .colophon a {
- color: gray;
- }
-
- .mywbr {
- width: 0;
- font-size: 1px;
- }
+body {
+ color: black;
+ background-color: #ffffff;
+}
+
+table td {
+ padding-left: 0;
+ padding-right: 0;
+}
+
+.maincolumn {
+ font-family: monospace;
+ width: 43em;
+ margin-right: -40em;
+ margin-left: 15em;
+}
+
+.main {
+ font-family: serif;
+ text-align: left;
+}
+
+.navleft {
+ position: relative;
+ float: left;
+}
+.navright {
+ position: relative;
+ float: right;
+}
+
+.versionbox {
+ position: relative;
+ float: right;
+ left: 3em;
+ height: 0em;
+ width: 13em;
+ margin: 0em -13em 0em 0em;
+}
+.version {
+ font-family: sans-serif;
+ font-size: small;
+}
+
+.refpara {
+ font-family: monospace;
+ position: relative;
+ float: right;
+ left: 1em;
+ top: -1em;
+ height: 0em;
+ width: 13em;
+ margin: 0em -13em 0em 0em;
+}
+
+.refcolumn {
+ background-color: #F5F5DC;
+ display: block;
+ position: relative;
+ width: 13em;
+ font-size: 85%;
+ border: 0.5em solid #F5F5DC;
+}
+
+.refcontent {
+ font-family: serif;
+}
+
+.tocset {
+ font-family: monospace;
+ position: relative;
+ float: left;
+ width: 12.5em;
+ margin-right: 2em;
+}
+
+.tocview {
+ font-family: serif;
+ text-align: left;
+ background-color: #F5F5DC;
+}
+
+.tocsub {
+ font-family: serif;
+ margin-top: 1em;
+ text-align: left;
+ background-color: #DCF5F5;
+}
+
+.tocviewtitle {
+ font-size: 80%;
+ font-weight: bold;
+ margin: 0.2em 0.2em 0.2em 0.2em;
+}
+
+.tocviewlist {
+ margin: 0.2em 0.2em 0.2em 0.2em;
+}
+
+.tocviewlist td {
+ font-size: 80%;
+ vertical-align: top;
+}
+
+.tocviewlink {
+ text-decoration: none;
+}
+
+.tocsublist {
+ margin: 0.2em 0.2em 0.2em 0.2em;
+}
+
+.tocsublist td {
+ vertical-align: top;
+ padding-left: 1em;
+ text-indent: -1em;
+}
+
+.tocsublinknumber {
+ font-size: 80%;
+}
+
+.tocsublink {
+ text-decoration: none;
+}
+
+.tocsubseclink {
+ font-size: 80%;
+ text-decoration: none;
+}
+
+.tocsubtitle {
+ font-size: 80%;
+ font-style: italic;
+ margin: 0.2em 0.2em 0.2em 0.2em;
+}
+
+.leftindent {
+ margin-left: 1em;
+ margin-right: 0em;
+}
+
+.insetpara {
+ margin-left: 1em;
+ margin-right: 1em;
+}
+
+.toclink {
+text-decoration: none;
+color: blue;
+font-size: 85%;
+}
+
+.toptoclink {
+text-decoration: none;
+color: blue;
+font-weight: bold;
+}
+
+.inherited {
+ width: 100%;
+ margin-top: 1em;
+ text-align: left;
+ background-color: #ECF5F5;
+}
+
+.inherited td {
+ padding-left: 1em;
+ text-indent: -0.8em;
+ padding-right: 0.2em;
+}
+
+.inheritedlbl {
+ font-style: italic;
+ font-size: 85%;
+}
+
+.indexlink {
+ text-decoration: none;
+}
+
+.nobreak {
+ white-space: nowrap;
+}
+
+.stt {
+ font-family: monospace;
+}
+
+.title {
+ font-size: 200%;
+ font-weight: normal;
+ margin-top: 2.8em;
+ text-align: center;
+}
+
+.partheading {
+ font-size: 100%;
+}
+
+.chapterheading {
+ font-size: 100%;
+}
+
+.beginsection {
+ font-size: 110%;
+}
+
+pre {
+ margin-left: 2em;
+}
+
+blockquote {
+ margin-left: 2em;
+}
+
+ol {
+ list-style-type: decimal;
+}
+
+ol ol {
+ list-style-type: lower-alpha;
+}
+
+ol ol ol {
+ list-style-type: lower-roman;
+}
+
+ol ol ol ol {
+ list-style-type: upper-alpha;
+}
+
+i {
+ font-family: serif;
+}
+
+.boxed {
+ width: 100%;
+ background-color: #E8E8FF;
+}
+
+.together {
+ width: 100%;
+}
+
+.prototype td {
+ vertical-align: top;
+}
+.longprototype td {
+ vertical-align: bottom;
+}
+
+.schemeblock td {
+ vertical-align: baseline;
+}
+
+.argcontract td {
+ vertical-align: top;
+}
+
+.centered {
+ horiz-align: center;
+}
+
+.verbatim em {
+ font-family: serif;
+}
+
+.ghost {
+ color: white;
+}
+
+.scheme em {
+ color: black;
+ font-family: serif;
+}
+
+.highlighted {
+ background-color: #ddddff;
+}
+
+.defmodule {
+ width: 100%;
+ background-color: #F5F5DC;
+}
+
+.specgrammar {
+ float: right;
+}
+
+.hspace {
+ font-family: monospace;
+}
+
+.inferencetop td {
+ border-bottom: 1px solid black;
+ text-align: center;
+}
+.inferencebottom td {
+ text-align: center;
+}
+
+.schemeinput {
+ color: brown;
+ background-color: #eeeeee;
+ font-family: monospace;
+}
+
+.schemeinputbg {
+ background-color: #eeeeee;
+}
+
+.schemereader {
+ font-family: monospace;
+}
+
+.schemeparen {
+ color: #843c24;
+ font-family: monospace;
+}
+
+.schememeta {
+ color: #262680;
+ font-family: monospace;
+}
+
+.schememod {
+ color: black;
+ font-family: monospace;
+}
+
+.schemeopt {
+ color: black;
+}
+
+.schemekeyword {
+ color: black;
+ font-weight: bold;
+ font-family: monospace;
+}
+
+.schemeerror {
+ color: red;
+ font-style: italic;
+}
+
+.schemevariable {
+ color: #262680;
+ font-style: italic;
+ font-family: monospace;
+}
+
+.schemesymbol {
+ color: #262680;
+ font-family: monospace;
+}
+
+.schemevaluelink {
+ text-decoration: none;
+ color: blue;
+}
+
+.schememodlink {
+ text-decoration: none;
+ color: blue;
+}
+
+.schemesyntaxlink {
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+}
+
+.badlink {
+ text-decoration: underline;
+ color: red;
+}
+
+.plainlink {
+ text-decoration: none;
+ color: blue;
+}
+
+.techlink {
+ text-decoration: none;
+ color: black;
+}
+
+.techlink:hover {
+ text-decoration: underline;
+ color: blue;
+}
+
+.schemeresult {
+ color: #0000af;
+ font-family: monospace;
+}
+
+.schemestdout {
+ color: #960096;
+ font-family: monospace;
+}
+
+.schemecomment {
+ color: #c2741f;
+ font-family: monospace;
+}
+
+.schemevalue {
+ color: #228b22;
+ font-family: monospace;
+}
+
+.bibliography td {
+ vertical-align: top;
+}
+
+.imageleft {
+ float: left;
+ margin-right: 0.3em;
+}
+
+.nonavigation {
+ color: #EEEEEE;
+}
+
+.mywbr {
+ width: 0;
+ font-size: 1px;
+}