move all "meta manuals" to a single place, plain title for user pages

svn: r9895
This commit is contained in:
Eli Barzilay 2008-05-19 18:34:31 +00:00
parent 1c598fafc3
commit e8a22fada9
23 changed files with 397 additions and 390 deletions

View File

@ -1,3 +0,0 @@
#lang setup/infotab
(define scribblings '(("acks.scrbl" () (omit))))

View File

@ -1,3 +0,0 @@
#lang setup/infotab
(define scribblings '(("license.scrbl" () (omit))))

View File

@ -1,132 +0,0 @@
#lang scribble/doc
@(require scribble/manual)
@(define (copyright . strs)
(verbatim (apply string-append
" "
(map (lambda (s)
(if (string=? s "\n")
"\n "
s))
strs))))
@title{License}
PLT software and documentation is distributed under the GNU Lesser
General Public License (LGPL). This means
@itemize{
@item{You can link PLT software (such as MzScheme or MrEd) into
proprietary applications, provided you follow the specific
rules stated in the LGPL.}
@item{You can modify PLT software. If you distribute a modified
version, you must distribute it under the terms of the LGPL,
which in particular means that you must release the source code
for the modified software.}
}
See @filepath{doc/release-notes/COPYING.LIB} in your PLT installation
for more information.
@copyright{
PLT Scheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.}
PLT software includes or extends the following copyrighted material:
@copyright{
DrScheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.}
@copyright{
MrEd
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.}
@copyright{
MzScheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.}
@copyright{
libscheme
Copyright (c) 1994 Brent Benson
All rights reserved.}
@copyright{
wxWindows
Copyright (c) 1994 Artificial Intelligence Applications Institute,
The University of Edinburgh
All rights reserved.}
@copyright{
wxWindows Xt
Copyright (c) 1994 Artificial Intelligence Applications Institute,
The University of Edinburgh
Copyright (c) 1995 GNU (Markus Holzem)
All rights reserved.}
@copyright{
Conservative garbage collector
Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
Copyright (c) 1991-1996 Xerox Corporation
Copyright (c) 1996-1999 Silicon Graphics
Copyright (c) 1999-2001 by Hewlett-Packard Company
All rights reserved.}
@copyright{
Collector C++ extension by Jesse Hull and John Ellis
Copyright (c) 1994 Xerox Corporation
All rights reserved.}
@copyright{
The A List
Copyright (c) 1997-2000 Kyle Hammond.
All rights reserved.}
@copyright{
Independent JPEG Group library
Copyright (c) 1991-1998 Thomas G. Lane.
All rights reserved.}
@copyright{
libpng
Copyright (c) 2000-2002 Glenn Randers-Pehrson
All rights reserved.}
@copyright{
zlib
Copyright (c) 1995-2002 Jean-loup Gailly and Mark Adler
All rights reserved.}
@copyright{
GNU MP Library
Copyright (c) 1992, 1993, 1994, 1996 by Free Software
Foundation, Inc.}
@copyright{
GNU lightning
Copyright (c) 1994, 1995, 1996, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.}
@copyright{
GNU Classpath
GNU Public License with special exception}
@copyright{
Clanbomber icon
Everaldo Coelho
http://www.everaldo.com/}
@copyright{
Save icon
David Vignoni
http://icon-king.com/}

View File

@ -1,9 +1,12 @@
#lang scribble/doc
@(require scribble/manual
drscheme/acks)
drscheme/acks
"private/front-toc.ss")
@title{Acknowledgements}
@front-toc['acks]
@(get-general-acks)
@(get-translating-acks)

View File

@ -0,0 +1,20 @@
#lang scheme/base
(provide (all-defined-out))
;; Configuration of various parts of the main pages
(define manual-sections
'((getting-started "Getting Started")
(language "Languages")
(tool "Tools")
(gui-library "GUI and Graphics Libraries")
(net-library "Network Libraries")
(parsing-library "Parsing Libraries")
(tool-library "Tool Libraries")
(foreign "Low-Level APIs")
(interop "Interoperability")
(library "Miscellaneous Libraries")
(experimental "Experimental Languages and Libraries")
(legacy "Legacy Languages and Libraries")
(other "Other")))

View File

@ -0,0 +1,14 @@
#lang setup/infotab
(define scribblings
'(("start.scrbl"
(main-doc-root always-run depends-all-main no-depend-on) (omit))
("user/start.scrbl"
(user-doc-root always-run depends-all no-depend-on) (omit))
("master-index.scrbl"
(depends-all-main no-depend-on) (omit))
("user/master-index.scrbl"
(user-doc depends-all no-depend-on) (omit))
("license.scrbl" () (omit))
("acks.scrbl" () (omit))
("release.scrbl" () (omit))))

View File

@ -0,0 +1,148 @@
#lang scribble/doc
@(require scribble/manual
"private/front-toc.ss")
@(define (copyright . strs) (apply verbatim #:indent 2 strs))
@front-toc['license]
@title{License}
PLT software and documentation is distributed under the GNU Lesser
General Public License (LGPL). This means
@itemize{
@item{You can link PLT software (such as MzScheme or MrEd) into
proprietary applications, provided you follow the specific
rules stated in the LGPL.}
@item{You can modify PLT software. If you distribute a modified
version, you must distribute it under the terms of the LGPL,
which in particular means that you must release the source code
for the modified software.}
}
See @filepath{doc/release-notes/COPYING.LIB} in your PLT installation
for more information.
@copyright{
PLT Scheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
}
PLT software includes or extends the following copyrighted material:
@copyright{
DrScheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.
}
@copyright{
MrEd
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.
}
@copyright{
MzScheme
Copyright (c) 1995-2003 PLT
Copyright (c) 2004-2008 PLT Scheme Inc.
All rights reserved.
}
@copyright{
libscheme
Copyright (c) 1994 Brent Benson
All rights reserved.
}
@copyright{
wxWindows
Copyright (c) 1994
Artificial Intelligence Applications Institute,
The University of Edinburgh
All rights reserved.
}
@copyright{
wxWindows Xt
Copyright (c) 1994
Artificial Intelligence Applications Institute,
The University of Edinburgh
Copyright (c) 1995 GNU (Markus Holzem)
All rights reserved.
}
@copyright{
Conservative garbage collector
Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
Copyright (c) 1991-1996 Xerox Corporation
Copyright (c) 1996-1999 Silicon Graphics
Copyright (c) 1999-2001 by Hewlett-Packard Company
All rights reserved.
}
@copyright{
Collector C++ extension by Jesse Hull and John Ellis
Copyright (c) 1994 Xerox Corporation
All rights reserved.
}
@copyright{
The A List
Copyright (c) 1997-2000 Kyle Hammond.
All rights reserved.
}
@copyright{
Independent JPEG Group library
Copyright (c) 1991-1998 Thomas G. Lane.
All rights reserved.
}
@copyright{
libpng
Copyright (c) 2000-2002 Glenn Randers-Pehrson
All rights reserved.
}
@copyright{
zlib
Copyright (c) 1995-2002 Jean-loup Gailly and Mark Adler
All rights reserved.
}
@copyright{
GNU MP Library
Copyright (c) 1992, 1993, 1994, 1996
Free Software Foundation, Inc.
}
@copyright{
GNU lightning
Copyright (c) 1994, 1995, 1996, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
}
@copyright{
GNU Classpath
GNU Public License with special exception
}
@copyright{
Clanbomber icon
Everaldo Coelho
http://www.everaldo.com/
}
@copyright{
Save icon
David Vignoni
http://icon-king.com/
}

View File

@ -0,0 +1,10 @@
#lang scribble/doc
@(require scribble/basic
scribble/decode
"private/front-toc.ss")
@title{Master Index (installation)}
@front-toc['index]
@(make-splice (index-blocks))

View File

@ -0,0 +1,39 @@
#lang scheme/base
(require scribble/manual
scribble/struct
scribble/decode
setup/dirs)
(provide front-toc)
(define bug-url "http://bugs.plt-scheme.org/")
(define spacer
(make-toc-element #f null '(nbsp)))
(define ((to-toc here) there target label)
(let* ([elt (make-element "tocsubseclink" (list label))]
[elt (if (eq? here there) elt (link target #:underline? #f elt))])
(make-toc-element #f null (list elt))))
;; FIXME: Use this to avoid hard-wiring manual titles and paths below
(define (resolve s [f s])
(resolved-module-path-name
(module-path-index-resolve
(module-path-index-join `(lib ,(format "scribblings/~a/~a.scrbl" s f))
#f))))
(define (front-toc here)
(define docdir (let ([d (find-doc-dir)]) (lambda (p) (build-path d p))))
(let ([to-toc (to-toc here)])
(make-splice
(list (to-toc 'start "index.html" "PLT Manuals")
(to-toc 'search "search/index.html" "Search PLT Manuals")
spacer
(to-toc 'index "master-index/index.html" "Master Index")
spacer
(to-toc 'license (docdir "license/index.html") "License")
(to-toc 'acks (docdir "acks/index.html") "Acknowledgments")
(to-toc 'release (docdir "release/index.html") "Release Notes")
spacer
(to-toc #f (format "~a?v=~a" bug-url (version)) "Report a Bug")))))

View File

@ -0,0 +1,115 @@
#lang scheme/base
(require scribble/manual
scribble/struct
scribble/decode
setup/getinfo
setup/main-collects
scheme/list
"front-toc.ss"
"../config.ss")
(provide build-contents)
(define-struct sec (cat label))
(define sections
(map (lambda (xs) (apply make-sec xs)) manual-sections))
(define (in-main-collects? dir)
(pair? (path->main-collects-relative dir)))
(define (add-sections cat mk-sep l)
(if (null? l)
null
(let loop ([l l] [key (if (equal? "" (caddar l)) (caar l) +inf.0)])
(cond [(null? l) null]
[(equal? (caar l) key) (cons (cadar l) (loop (cdr l) key))]
[else (let ([lbl (caddar l)] ; currently always ""
[l (cons (cadar l) (loop (cdr l) (caar l)))]
[sep? (not (= (truncate (/ key 10))
(truncate (/ (caar l) 10))))])
(if sep? (cons (mk-sep lbl) l) l))]))))
(define (build-contents all?)
(let* ([dirs (find-relevant-directories '(scribblings))]
[infos (map get-info/full dirs)]
[docs (append-map
(lambda (i dir)
(define s (and (or all? (in-main-collects? dir))
(i 'scribblings)))
(if (not s)
null
(filter-map
(lambda (d)
(if (and (not all?)
(pair? (cdr d))
(or (memq 'user-doc (cadr d))
(memq 'user-doc-root (cadr d))))
#f
(let* ([new-cat (if ((length d) . > . 2)
(caddr d)
'(library))]
[sub-cat (and (list? new-cat)
((length new-cat) . > . 1)
(cadr new-cat))])
(list
;; Category
(let ([the-cat
(if (pair? new-cat) (car new-cat) 'unknown)])
(or (and (eq? the-cat 'omit) the-cat)
(ormap (lambda (sec)
(and (eq? the-cat (sec-cat sec))
the-cat))
sections)
'library))
;; Priority
(if (and sub-cat (real? sub-cat)) sub-cat 0)
;; Priority label (not used):
""
;; Path
(build-path dir (if (pair? d) (car d) "???"))))))
s)))
infos
dirs)]
[plain-line
(lambda content
(list (make-flow (list (make-paragraph content)))))]
[line
(lambda (doc)
(plain-line (hspace 2) (other-manual doc #:underline? #f)))])
(make-splice
(list
(make-delayed-block
(lambda (renderer part resolve-info)
(make-table
#f
(cdr
(append-map
(lambda (sec)
(let ([docs (filter (lambda (doc) (eq? (car doc) (sec-cat sec)))
docs)])
(list*
(plain-line (hspace 1))
(plain-line (sec-label sec))
(add-sections
(sec-cat sec)
(lambda (str)
(plain-line
(make-element (if (string=? str "") "sepspace" "septitle")
(list 'nbsp str))))
(sort
(map (lambda (doc)
(list (cadr doc) (line (cadddr doc)) (caddr doc)))
docs)
(lambda (ad bd)
(if (= (car ad) (car bd))
(let ([str (lambda (x)
(element->string
(cadr (paragraph-content
(car (flow-paragraphs (caadr x)))))
renderer part resolve-info))])
(string-ci<? (str ad) (str bd)))
(> (car ad) (car bd)))))))))
sections)))))
(front-toc 'start)))))

View File

@ -1,22 +1,26 @@
#lang scribble/doc
@(require scribble/manual
setup/dirs)
setup/dirs
"private/front-toc.ss")
@(define (rl-link path . content)
(apply link (apply build-path (find-doc-dir) "release-notes" path)
content))
@(define (mzport doc from to)
(rl-link (list "mzscheme" doc) (format "Porting from ~a to ~a" from to)))
@title{Release Notes}
@front-toc['release]
@itemize[#:style "compact"]{
@item{@rl-link['("drscheme" "HISTORY.txt")]{DrScheme}}
@item{@rl-link['("mzscheme" "HISTORY.txt")]{MzScheme}
@itemize[#:style "compact"]{
@item{@rl-link['("mzscheme" "MzScheme_4.txt")]{Porting from v3xx to v4.x}}
@item{@rl-link['("mzscheme" "MzScheme_300.txt")]{Porting from v2xx to v3xx}}
@item{@rl-link['("mzscheme" "MzScheme_200.txt")]{Porting from v1xx to v2xx}}
}}
@item{@mzport["MzScheme_4.txt" "v3xx" "v4.x"]}
@item{@mzport["MzScheme_300.txt" "v2xx" "v3xx"]}
@item{@mzport["MzScheme_200.txt" "v1xx" "v2xx"]}}}
@item{@rl-link['("mred" "HISTORY.txt")]{MrEd}}
@item{@rl-link['("stepper" "HISTORY.txt")]{Stepper}}

View File

@ -0,0 +1,13 @@
#lang scribble/doc
@(require scribble/manual
scribble/struct
"private/manuals.ss")
@title{PLT Scheme Documentation (installation)}
@margin-note{This is an installation-specific listing. Running
@exec{plt-help} may open a different page with local and
user-specific documentation, including documentation for
installed @|PLaneT| packages.}
@(build-contents #f)

View File

@ -1,7 +1,10 @@
#lang scribble/doc
@(require scribble/basic
scribble/decode)
scribble/decode
"../private/front-toc.ss")
@title{Master Index}
@front-toc['index]
@(make-splice (index-blocks))

View File

@ -0,0 +1,21 @@
#lang scribble/doc
@(require scribble/manual
scribble/struct
"../private/manuals.ss")
@title{PLT Scheme Documentation}
@;{
@; This page should always be the default, so it doesn't need to say
@; something special or link to the main page.
@margin-note{This is a user-specific listing, which may include
@|PLaneT| packages and other collections that are not in
the main installation. The main installation's listing is
@other-manual['(lib "scribblings/start/start.scrbl")].}
;}
@margin-note{This is the PLT Scheme documentation, including
user-specific packages (@|PLaneT| packages and other
collections) that are not in the main installation.}
@(build-contents #t)

View File

@ -1,3 +0,0 @@
#lang setup/infotab
(define scribblings '(("master-index.scrbl" (depends-all-main no-depend-on) (omit))))

View File

@ -1,3 +0,0 @@
#lang setup/infotab
(define scribblings '(("release.scrbl" () (omit))))

View File

@ -1,4 +0,0 @@
#lang setup/infotab
(define scribblings
'(("start.scrbl" (main-doc-root always-run depends-all-main no-depend-on) (omit))))

View File

@ -1,192 +0,0 @@
#lang scheme/base
(require scribble/manual
scribble/struct
scribble/decode
setup/getinfo
setup/main-collects
setup/dirs)
(provide build-contents)
(define (resolve s)
(resolved-module-path-name
(module-path-index-resolve
(module-path-index-join `(lib ,(string-append s ".scrbl")
"scribblings"
,s)
#f))))
(define-struct sec (cat label))
(define sections
(list (make-sec 'getting-started
"Getting Started")
(make-sec 'language
"Languages")
(make-sec 'tool
"Tools")
(make-sec 'gui-library
"GUI and Graphics Libraries")
(make-sec 'net-library
"Network Libraries")
(make-sec 'parsing-library
"Parsing Libraries")
(make-sec 'tool-library
"Tool Libraries")
(make-sec 'foreign
"Low-Level APIs")
(make-sec 'interop
"Interoperability")
(make-sec 'library
"Miscellaneous Libraries")
(make-sec 'experimental
"Experimental Languages and Libraries")
(make-sec 'legacy
"Legacy Languages and Libraries")
(make-sec 'other
"Other")))
(define (main-collects? dir)
(pair? (path->main-collects-relative dir)))
(define (to-toc target label)
(make-toc-element
#f
null
(list (link target
#:underline? #f
(make-element "tocsubseclink"
(list label))))))
(define (make-spacer)
(make-toc-element
#f
null
(list 'nbsp)))
(define (add-sections cat mk-sep l)
(if (null? l)
null
(let loop ([l l][key (if (equal? "" (caddar l))
(caar l)
+inf.0)])
(cond
[(null? l) null]
[(equal? (caar l) key)
(cons (cadar l) (loop (cdr l) key))]
[else
(let ([lbl (caddar l)] ; currently always ""
[l (cons (cadar l) (loop (cdr l) (caar l)))]
[sep? (not (= (truncate (/ key 10))
(truncate (/ (caar l) 10))))])
(if sep?
(cons (mk-sep lbl) l)
l))]))))
(define (build-contents all?)
(let* ([dirs (find-relevant-directories '(scribblings))]
[infos (map get-info/full dirs)]
[docs (apply append
(map (lambda (i dir)
(if (or all?
(main-collects? dir))
(let ([s (i 'scribblings)])
(apply
append
(map (lambda (d)
(if (and (not all?)
(pair? (cdr d))
(or (memq 'user-doc (cadr d))
(memq 'user-doc-root (cadr d))))
null
(let* ([new-cat (if ((length d) . > . 2)
(caddr d)
'(library))]
[sub-cat (and (list? new-cat)
((length new-cat) . > . 1)
(cadr new-cat))])
(list
(list
;; Category
(let ([the-cat (if (pair? new-cat)
(car new-cat)
'unknown)])
(or (and (eq? the-cat 'omit) the-cat)
(ormap (lambda (sec)
(and (eq? the-cat (sec-cat sec))
the-cat))
sections)
'library))
;; Priority
(if (and sub-cat
(real? sub-cat))
sub-cat
0)
;; Priority label (not used):
""
;; Path
(if (pair? d)
(build-path dir (car d))
(build-path dir "???")))))))
s)))
null))
infos
dirs))]
[plain-line
(lambda content
(list (make-flow (list (make-paragraph content)))))]
[line
(lambda (doc)
(plain-line (hspace 2)
(other-manual doc #:underline? #f)))])
(make-splice
(list
(make-delayed-block
(lambda (renderer part resolve-info)
(make-table
#f
(cdr
(apply append
(map (lambda (sec)
(let ([docs (filter (lambda (doc)
(eq? (car doc) (sec-cat sec)))
docs)])
(list*
(plain-line (hspace 1))
(plain-line (sec-label sec))
(add-sections
(sec-cat sec)
(lambda (str)
(plain-line (make-element (if (string=? str "")
"sepspace"
"septitle")
(list 'nbsp str))))
(sort
(map (lambda (doc) (list (cadr doc)
(line (cadddr doc))
(caddr doc)))
docs)
(lambda (ad bd)
(let ([a (cadr (paragraph-content (car (flow-paragraphs (caadr ad)))))]
[b (cadr (paragraph-content (car (flow-paragraphs (caadr bd)))))])
(if (= (car ad) (car bd))
(begin
(string-ci<? (element->string a renderer part resolve-info)
(element->string b renderer part resolve-info)))
(> (car ad) (car bd))))))))))
sections))))))
(to-toc "master-index/index.html"
"Master Index")
(make-spacer)
(to-toc (build-path (find-doc-dir) "license/index.html")
"License")
(to-toc (build-path (find-doc-dir) "acks/index.html")
"Acknowledgments")
(to-toc (build-path (find-doc-dir) "release/index.html")
"Release Notes")
(make-spacer)
(to-toc (format "http://bugs.plt-scheme.org/?v=~a" (version))
"Report a Bug")))))

View File

@ -1,14 +0,0 @@
#lang scribble/doc
@(require scribble/manual
scribble/struct
"manuals.ss")
@title{PLT Scheme Documentation}
@margin-note{This is an installation-specific listing. Running
@exec{plt-help} may open a different
page with local and user-specific documentation,
including documentation for installed @|PLaneT| packages.}
@(build-contents #f)

View File

@ -1,4 +0,0 @@
#lang setup/infotab
(define scribblings
'(("master-index.scrbl" (user-doc depends-all no-depend-on) (omit))))

View File

@ -1,8 +0,0 @@
#lang scribble/doc
@(require scribble/basic
scribble/decode)
@title{Master Index (user)}
@(make-splice (index-blocks))

View File

@ -1,4 +0,0 @@
#lang setup/infotab
(define scribblings
'(("user-start.scrbl" (user-doc-root depends-all always-run no-depend-on) (omit))))

View File

@ -1,13 +0,0 @@
#lang scribble/doc
@(require scribble/manual
scribble/struct
"../start/manuals.ss")
@title{PLT Scheme Documentation (user)}
@margin-note{This is a user-specific listing, which may include
@|PLaneT| packages and other collections that are not in
the main installation. The main installation's listing is
@other-manual['(lib "scribblings/start/start.scrbl")].}
@(build-contents #t)