change path->main-collects-relative, and change output directory of start document

svn: r8301

original commit: 05434ec54da3cd9362493c024d73de5ec3f516a8
This commit is contained in:
Matthew Flatt 2008-01-11 19:54:38 +00:00
parent b4f706247f
commit 0732affece
2 changed files with 516 additions and 579 deletions

View File

@ -76,6 +76,8 @@
format-number format-number
quiet-table-of-contents) quiet-table-of-contents)
(init-field [css-path #f])
(define/override (get-suffix) #".html") (define/override (get-suffix) #".html")
;; ---------------------------------------- ;; ----------------------------------------
@ -133,6 +135,9 @@
(define/private (reveal-subparts? p) (define/private (reveal-subparts? p)
(part-style? p 'reveal)) (part-style? p 'reveal))
(define/public (toc-wrap table)
null)
(define/public (render-toc-view d ri) (define/public (render-toc-view d ri)
(let-values ([(top mine) (let-values ([(top mine)
(let loop ([d d][mine d]) (let loop ([d d][mine d])
@ -185,10 +190,11 @@
(class "tocviewlink")) (class "tocviewlink"))
,@(render-content (or (part-title-content top) '("???")) d ri))) ,@(render-content (or (part-title-content top) '("???")) d ri)))
(div nbsp) (div nbsp)
(table ,@(toc-wrap
`(table
((class "tocviewlist") ((class "tocviewlist")
(cellspacing "0")) (cellspacing "0"))
,@toc-content))))) ,@toc-content))))))
,@(render-onthispage-contents d ri top) ,@(render-onthispage-contents d ri top)
,@(apply append ,@(apply append
(map (lambda (t) (map (lambda (t)
@ -311,18 +317,31 @@
null)) null))
(link ((rel "stylesheet") (link ((rel "stylesheet")
(type "text/css") (type "text/css")
(href "scribble.css") (href ,(or css-path "scribble.css"))
(title "default")))) (title "default"))))
(body ,@(render-toc-view d ri) (body ,@(render-toc-view d ri)
(div ((class "maincolumn")) (div ((class "maincolumn"))
(div ((class "main")) ,@(render-part d ri)))))]) (div ((class "main"))
(install-file scribble-css) ,@(render-version d ri)
,@(render-part d ri)))))])
(unless css-path
(install-file scribble-css))
(printf "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n") (printf "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n")
(xml:write-xml/content (xml:xexpr->xml xpr))))) (xml:write-xml/content (xml:xexpr->xml xpr)))))
(define/override (render-one d ri fn) (define/override (render-one d ri fn)
(render-one-part d ri fn null)) (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) (define/override (render-part d ri)
(let ([number (collected-info-number (part-collected-info d ri))]) (let ([number (collected-info-number (part-collected-info d ri))])
`(,@(if (and (not (part-title-content d)) `(,@(if (and (not (part-title-content d))
@ -646,6 +665,9 @@
`((div ((class "tocsubtitle")) `((div ((class "tocsubtitle"))
"On this page:"))) "On this page:")))
(define/override (toc-wrap p)
(list p))
(define contents-content '("contents")) (define contents-content '("contents"))
(define index-content '("index")) (define index-content '("index"))
(define prev-content '(larr " prev")) (define prev-content '(larr " prev"))
@ -654,7 +676,11 @@
(define no-next-content next-content) (define no-next-content next-content)
(define sep-element (make-element #f '(nbsp nbsp))) (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) (define/private (find-siblings d ri)
(let ([parent (collected-info-parent (part-collected-info d ri))]) (let ([parent (collected-info-parent (part-collected-info d ri))])
@ -705,24 +731,16 @@
(let ([d (car (last-pair subs))]) (let ([d (car (last-pair subs))])
(and (part-style? d 'index) (and (part-style? d 'index)
d)))))))]) d)))))))])
`(,@(render-table (make-table `((div ([class "navleft"])
'at-left ,@(render-content
(list (append
(cons
(make-flow
(list
(make-paragraph
(list (list
(make-element (make-element
(if parent (if parent
(make-target-url "index.html") (make-target-url "index.html")
"nonavigation") "nonavigation")
contents-content))))) contents-content))
(if index (if index
(list
(make-flow
(list
(make-paragraph
(list (list
'nbsp 'nbsp
(if (eq? d index) (if (eq? d index)
@ -732,16 +750,12 @@
(make-link-element (make-link-element
#f #f
index-content index-content
(car (part-tags index))))))))) (car (part-tags index)))))
null)))) null))
d ri) d
,@(render-table (make-table ri))
'at-right (div ([class "navright"])
(list ,@(render-content
(list
(make-flow
(list
(make-paragraph
(list (list
(make-element (make-element
(if parent (if parent
@ -764,9 +778,9 @@
(if next (if next
(make-target-url (derive-filename next)) (make-target-url (derive-filename next))
"nonavigation") "nonavigation")
next-content)))))))) next-content))
d d
ri))))) ri))))))
(define/override (render-part d ri) (define/override (render-part d ri)
(parameterize ([current-version (parameterize ([current-version
@ -796,20 +810,9 @@
[on-separate-page #f]) [on-separate-page #f])
(if sep? (if sep?
;; Navigation bars; ;; Navigation bars;
`(,@(navigation d ri) `(,@(super render-version d ri)
,@(navigation d ri)
(p nbsp) (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) ,@(super render-part d ri)
(p nbsp) (p nbsp)
,@(navigation d ri) ,@(navigation d ri)

View File

@ -1,41 +1,49 @@
body { body {
color: black; color: black;
background-color: #ffffff; background-color: #ffffff;
} }
table td { table td {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
} }
.maincolumn { .maincolumn {
font-family: monospace; font-family: monospace;
width: 43em; width: 43em;
margin-right: -40em; margin-right: -40em;
margin-left: 15em; margin-left: 15em;
} }
.main { .main {
font-family: serif; font-family: serif;
text-align: left; text-align: left;
} }
.versionbox { .navleft {
position: relative;
float: left;
}
.navright {
position: relative;
float: right;
}
.versionbox {
position: relative; position: relative;
float: right; float: right;
left: 3em; left: 3em;
top: -2em;
height: 0em; height: 0em;
width: 13em; width: 13em;
margin: 0em -13em 0em 0em; margin: 0em -13em 0em 0em;
} }
.version { .version {
font-family: sans-serif; font-family: sans-serif;
font-size: small;
}
} .refpara {
.refpara {
font-family: monospace; font-family: monospace;
position: relative; position: relative;
float: right; float: right;
@ -44,454 +52,380 @@
height: 0em; height: 0em;
width: 13em; width: 13em;
margin: 0em -13em 0em 0em; margin: 0em -13em 0em 0em;
} }
.refcolumn { .refcolumn {
background-color: #F5F5DC; background-color: #F5F5DC;
display: block; display: block;
position: relative; position: relative;
width: 13em; width: 13em;
font-size: 85%; font-size: 85%;
border: 0.5em solid #F5F5DC; border: 0.5em solid #F5F5DC;
} }
.refcontent { .refcontent {
font-family: serif; font-family: serif;
} }
.tocset { .tocset {
font-family: monospace; font-family: monospace;
position: relative; position: relative;
float: left; float: left;
width: 12.5em; width: 12.5em;
margin-right: 2em; margin-right: 2em;
} }
.tocview { .tocview {
font-family: serif; font-family: serif;
text-align: left; text-align: left;
background-color: #F5F5DC; background-color: #F5F5DC;
} }
.tocsub { .tocsub {
font-family: serif; font-family: serif;
margin-top: 1em; margin-top: 1em;
text-align: left; text-align: left;
background-color: #DCF5F5; background-color: #DCF5F5;
} }
.tocviewtitle { .tocviewtitle {
font-size: 80%; font-size: 80%;
font-weight: bold; font-weight: bold;
margin: 0.2em 0.2em 0.2em 0.2em; margin: 0.2em 0.2em 0.2em 0.2em;
} }
.tocviewlist { .tocviewlist {
margin: 0.2em 0.2em 0.2em 0.2em; margin: 0.2em 0.2em 0.2em 0.2em;
} }
.tocviewlist td { .tocviewlist td {
font-size: 80%; font-size: 80%;
vertical-align: top; vertical-align: top;
} }
.tocviewlink { .tocviewlink {
text-decoration: none; text-decoration: none;
} }
.tocsublist { .tocsublist {
margin: 0.2em 0.2em 0.2em 0.2em; margin: 0.2em 0.2em 0.2em 0.2em;
} }
.tocsublist td { .tocsublist td {
vertical-align: top; vertical-align: top;
padding-left: 1em; padding-left: 1em;
text-indent: -1em; text-indent: -1em;
} }
.tocsublinknumber { .tocsublinknumber {
font-size: 80%; font-size: 80%;
} }
.tocsublink { .tocsublink {
text-decoration: none; text-decoration: none;
} }
.tocsubseclink { .tocsubseclink {
font-size: 80%; font-size: 80%;
text-decoration: none; text-decoration: none;
} }
.tocsubtitle { .tocsubtitle {
font-size: 80%; font-size: 80%;
font-style: italic; font-style: italic;
margin: 0.2em 0.2em 0.2em 0.2em; margin: 0.2em 0.2em 0.2em 0.2em;
} }
.leftindent { .leftindent {
margin-left: 1em; margin-left: 1em;
margin-right: 0em; margin-right: 0em;
} }
.insetpara { .insetpara {
margin-left: 1em; margin-left: 1em;
margin-right: 1em; margin-right: 1em;
} }
.toclink { .toclink {
text-decoration: none; text-decoration: none;
color: blue; color: blue;
font-size: 85%; font-size: 85%;
} }
.toptoclink { .toptoclink {
text-decoration: none; text-decoration: none;
color: blue; color: blue;
font-weight: bold; font-weight: bold;
} }
.inherited { .inherited {
width: 100%; width: 100%;
margin-top: 1em; margin-top: 1em;
text-align: left; text-align: left;
background-color: #ECF5F5; background-color: #ECF5F5;
} }
.inherited td { .inherited td {
padding-left: 1em; padding-left: 1em;
text-indent: -0.8em; text-indent: -0.8em;
padding-right: 0.2em; padding-right: 0.2em;
} }
.inheritedlbl { .inheritedlbl {
font-style: italic; font-style: italic;
font-size: 85%; font-size: 85%;
} }
.indexlink { .indexlink {
text-decoration: none; text-decoration: none;
} }
.nobreak { .nobreak {
white-space: nowrap; white-space: nowrap;
} }
.stt { .stt {
font-family: monospace; font-family: monospace;
} }
.title { .title {
font-size: 200%; font-size: 200%;
font-weight: normal; font-weight: normal;
margin-top: 2.8em; margin-top: 2.8em;
text-align: center; text-align: center;
} }
.partheading { .partheading {
font-size: 100%; font-size: 100%;
} }
.chapterheading { .chapterheading {
font-size: 100%; font-size: 100%;
} }
.beginsection { .beginsection {
font-size: 110%; font-size: 110%;
} }
.tiny { pre {
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; margin-left: 2em;
} }
blockquote { blockquote {
margin-left: 2em; margin-left: 2em;
} }
ol { ol {
list-style-type: decimal; list-style-type: decimal;
} }
ol ol { ol ol {
list-style-type: lower-alpha; list-style-type: lower-alpha;
} }
ol ol ol { ol ol ol {
list-style-type: lower-roman; list-style-type: lower-roman;
} }
ol ol ol ol { ol ol ol ol {
list-style-type: upper-alpha; list-style-type: upper-alpha;
} }
i { i {
font-family: serif; font-family: serif;
} }
.boxed { .boxed {
width: 100%; width: 100%;
background-color: #E8E8FF; background-color: #E8E8FF;
} }
.together { .together {
width: 100%; width: 100%;
} }
.prototype td { .prototype td {
vertical-align: top; vertical-align: top;
} }
.longprototype td { .longprototype td {
vertical-align: bottom; vertical-align: bottom;
} }
.schemeblock td { .schemeblock td {
vertical-align: baseline; vertical-align: baseline;
} }
.argcontract td { .argcontract td {
vertical-align: top; vertical-align: top;
} }
.centered { .centered {
horiz-align: center; horiz-align: center;
} }
.verbatim em { .verbatim em {
font-family: serif; font-family: serif;
} }
.ghost { .ghost {
color: white; color: white;
} }
.scheme em { .scheme em {
color: black; color: black;
font-family: serif; font-family: serif;
} }
.highlighted { .highlighted {
background-color: #ddddff; background-color: #ddddff;
} }
.defmodule { .defmodule {
width: 100%; width: 100%;
background-color: #F5F5DC; background-color: #F5F5DC;
} }
.specgrammar { .specgrammar {
float: right; float: right;
} }
.hspace { .hspace {
font-family: monospace; font-family: monospace;
} }
.small { .inferencetop td {
font-size: 80%;
}
.inferencetop td {
border-bottom: 1px solid black; border-bottom: 1px solid black;
text-align: center; text-align: center;
} }
.inferencebottom td { .inferencebottom td {
text-align: center; text-align: center;
} }
.schemeinput { .schemeinput {
color: brown; color: brown;
background-color: #eeeeee; background-color: #eeeeee;
font-family: monospace; font-family: monospace;
} }
.schemeinputbg { .schemeinputbg {
background-color: #eeeeee; background-color: #eeeeee;
} }
.schemereader { .schemereader {
font-family: monospace; font-family: monospace;
} }
.schemeparen { .schemeparen {
color: #843c24; color: #843c24;
font-family: monospace; font-family: monospace;
} }
.schememeta { .schememeta {
color: #262680; color: #262680;
font-family: monospace; font-family: monospace;
} }
.schememod { .schememod {
color: black; color: black;
font-family: monospace; font-family: monospace;
} }
.schemeopt { .schemeopt {
color: black; color: black;
} }
.schemekeyword { .schemekeyword {
color: black; color: black;
font-weight: bold; font-weight: bold;
font-family: monospace; font-family: monospace;
} }
.schemeerror { .schemeerror {
color: red; color: red;
font-style: italic; font-style: italic;
} }
.schemevariable { .schemevariable {
color: #262680; color: #262680;
font-style: italic; font-style: italic;
font-family: monospace; font-family: monospace;
} }
.schemesymbol { .schemesymbol {
color: #262680; color: #262680;
font-family: monospace; font-family: monospace;
} }
.schemevaluelink { .schemevaluelink {
text-decoration: none; text-decoration: none;
color: blue; color: blue;
} }
.schememodlink { .schememodlink {
text-decoration: none; text-decoration: none;
color: blue; color: blue;
} }
.schemesyntaxlink { .schemesyntaxlink {
text-decoration: none; text-decoration: none;
color: black; color: black;
font-weight: bold; font-weight: bold;
} }
.badlink { .badlink {
text-decoration: underline; text-decoration: underline;
color: red; color: red;
} }
.plainlink { .plainlink {
text-decoration: none; text-decoration: none;
color: blue; color: blue;
} }
.techlink { .techlink {
text-decoration: none; text-decoration: none;
color: black; color: black;
} }
.techlink:hover {
.techlink:hover {
text-decoration: underline; text-decoration: underline;
color: blue; color: blue;
} }
.schemeresult { .schemeresult {
color: #0000af; color: #0000af;
font-family: monospace; font-family: monospace;
} }
.schemestdout { .schemestdout {
color: #960096; color: #960096;
font-family: monospace; font-family: monospace;
} }
.schemecomment { .schemecomment {
color: #c2741f; color: #c2741f;
font-family: monospace; font-family: monospace;
} }
.schemevalue { .schemevalue {
color: #228b22; color: #228b22;
font-family: monospace; font-family: monospace;
} }
.bibliography td { .bibliography td {
vertical-align: top; vertical-align: top;
} }
.imageleft { .imageleft {
float: left; float: left;
margin-right: 0.3em; margin-right: 0.3em;
} }
.nonavigation { .nonavigation {
color: #EEEEEE; color: #EEEEEE;
} }
.disable { .mywbr {
/* 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; width: 0;
font-size: 1px; font-size: 1px;
} }