diff --git a/collects/games/cards/doc.scrbl b/collects/games/cards/cards.scrbl similarity index 99% rename from collects/games/cards/doc.scrbl rename to collects/games/cards/cards.scrbl index 69c88176f8..c90fd8e8ae 100644 --- a/collects/games/cards/doc.scrbl +++ b/collects/games/cards/cards.scrbl @@ -3,7 +3,7 @@ (for-label "main.ss" scheme/gui/base)] -@title{Virtual Playing Cards Library} +@title{@bold{Cards}: Virtual Playing Cards Library} @defmodule[games/cards/main]{The @schememodname[games/cards/main] module provides a toolbox for creating cards games.} diff --git a/collects/games/cards/info.ss b/collects/games/cards/info.ss index 31cb5d1c39..add55af4b6 100644 --- a/collects/games/cards/info.ss +++ b/collects/games/cards/info.ss @@ -1,5 +1,5 @@ (module info setup/infotab (define name "Game Cards") (define doc.txt "doc.txt") - (define scribblings '(("doc.scrbl")))) + (define scribblings '(("cards.scrbl")))) diff --git a/collects/graphics/scribblings/graphics.scrbl b/collects/graphics/scribblings/graphics.scrbl index 969632e669..659ea8b4fe 100644 --- a/collects/graphics/scribblings/graphics.scrbl +++ b/collects/graphics/scribblings/graphics.scrbl @@ -4,7 +4,7 @@ scheme/contract "../graphics.ss")) -@title{Legacy Graphics Library} +@title{@bold{Graphics}: Legacy Library} @table-of-contents[] diff --git a/collects/mrlib/scribblings/mrlib.scrbl b/collects/mrlib/scribblings/mrlib.scrbl index a32fe32c6a..dfe7aeedc8 100644 --- a/collects/mrlib/scribblings/mrlib.scrbl +++ b/collects/mrlib/scribblings/mrlib.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "common.ss") -@title{Extra PLT GUI Libraries} +@title{@bold{MrLib}: Extra PLT GUI Libraries} @table-of-contents[] diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 3fba5418d8..c47fc9b72c 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -1771,6 +1771,9 @@ (define (seclink tag #:underline? [u? #t] #:doc [doc #f] . s) (make-link-element (if u? #f "plainlink") (decode-content s) `(part ,(doc-prefix doc tag)))) + (define (other-manual #:underline? [u? #t] doc) + (secref #:doc doc #:underline? u? "top")) + (define (*schemelink stx-id id . s) (let ([content (decode-content s)]) (make-delayed-element @@ -1786,7 +1789,7 @@ (define-syntax schemelink (syntax-rules () [(_ id . content) (*schemelink (quote-syntax id) 'id . content)])) - (provide secref seclink schemelink) + (provide secref seclink schemelink other-manual) (define (pidefterm . s) (let ([c (apply defterm s)]) diff --git a/collects/scribblings/drscheme/info.ss b/collects/scribblings/drscheme/info.ss index 6e84c52be3..358b7dc339 100644 --- a/collects/scribblings/drscheme/info.ss +++ b/collects/scribblings/drscheme/info.ss @@ -1,3 +1,4 @@ (module info setup/infotab (define name "Scribblings: DrScheme") - (define scribblings '(("drscheme.scrbl" (#;multi-page main-doc))))) + (define scribblings '(("drscheme.scrbl" (#;multi-page main-doc)))) + (define doc-categories '((tool 1)))) diff --git a/collects/scribblings/foreign/info.ss b/collects/scribblings/foreign/info.ss index 9c588dad79..99bacc4f36 100644 --- a/collects/scribblings/foreign/info.ss +++ b/collects/scribblings/foreign/info.ss @@ -1,3 +1,5 @@ (module info setup/infotab (define name "Scribblings: FFI") - (define scribblings '(("foreign.scrbl" (multi-page main-doc))))) + (define scribblings '(("foreign.scrbl" (multi-page main-doc)))) + (define doc-categories '(foreign)) + (define doc-priorities '(1))) diff --git a/collects/scribblings/foreign/utils.ss b/collects/scribblings/foreign/utils.ss index 8e0952d621..544d88047e 100644 --- a/collects/scribblings/foreign/utils.ss +++ b/collects/scribblings/foreign/utils.ss @@ -18,5 +18,4 @@ (define InsideMzScheme - (italic (secref #:doc '(lib "scribblings/inside/inside.scrbl") - "top"))) + (other-manual '(lib "scribblings/inside/inside.scrbl"))) \ No newline at end of file diff --git a/collects/scribblings/gui/gui.scrbl b/collects/scribblings/gui/gui.scrbl index 31ed41326c..6456663fe5 100644 --- a/collects/scribblings/gui/gui.scrbl +++ b/collects/scribblings/gui/gui.scrbl @@ -1,8 +1,7 @@ #lang scribble/doc @require["common.ss"] -@title[#:tag-prefix '(lib "scribblings/gui/gui.scrbl") - #:tag "top"]{@bold{GUI}: PLT Graphics Toolkit} +@title{@bold{GUI}: PLT Graphics Toolkit} @declare-exporting[scheme/gui/base scheme/gui] diff --git a/collects/scribblings/guide/guide-utils.ss b/collects/scribblings/guide/guide-utils.ss index 265df34b1e..d1f06b2e0d 100644 --- a/collects/scribblings/guide/guide-utils.ss +++ b/collects/scribblings/guide/guide-utils.ss @@ -19,7 +19,7 @@ ext-refsecref) (define Quick - (italic (secref #:doc '(lib "scribblings/quick/quick.scrbl") "top"))) + (other-manual '(lib "scribblings/quick/quick.scrbl"))) (define HtDP (italic (link "http://www.htdp.org" "How to Design Programs"))) @@ -62,5 +62,4 @@ (define (ext-refsecref s) (make-element #f (list (refsecref s) " in " MzScheme))) - (define MzScheme - (italic (refsecref "top")))) + (define MzScheme (other-manual '(lib "scribblings/reference/reference.scrbl")))) \ No newline at end of file diff --git a/collects/scribblings/guide/guide.scrbl b/collects/scribblings/guide/guide.scrbl index db540dde6e..fef4f2203e 100644 --- a/collects/scribblings/guide/guide.scrbl +++ b/collects/scribblings/guide/guide.scrbl @@ -3,8 +3,7 @@ @require[scribble/eval] @require["guide-utils.ss"] -@title[#:tag-prefix '(lib "scribblings/guide/guide.scrbl") - #:tag "top"]{@bold{Guide}: PLT Scheme} +@title{@bold{Guide}: PLT Scheme} This guide is intended for programmers who are new to Scheme, new to PLT Scheme, or new to some part of PLT Scheme. It assumes @@ -110,21 +109,21 @@ printed output. @; ---------------------------------------------------------------------- @section{More Libraries} -@italic{@secref[#:doc '(lib "scribblings/gui/gui.scrbl") "top"]} describes the -PLT Scheme graphics toolbox, whose core is implemented by the MrEd +@other-manual['(lib "scribblings/gui/gui.scrbl")] describes the PLT +Scheme graphics toolbox, whose core is implemented by the MrEd executable. -@italic{@secref[#:doc '(lib "scribblings/foreign/foreign.scrbl") -"top"]} describes tools for using Scheme to access libraries that are -normally used by C programs. +@other-manual['(lib "scribblings/foreign/foreign.scrbl")] describes +tools for using Scheme to access libraries that are normally used by C +programs. -@italic{@secref[#:doc '(lib "web-server/scribblings/web-server.scrbl") -"top"]} describes the PLT Scheme web server, which supports servlets +@other-manual['(lib "web-server/scribblings/web-server.scrbl")] +describes the PLT Scheme web server, which supports servlets implemented in Scheme. -@secref[#:doc '(lib "scribblings/start/start.scrbl") "top"] provides -links to documentation for many other libraries distributed with PLT -Scheme or installed on your system. +@other-manual['(lib "scribblings/start/start.scrbl")] provides links +to documentation for many other libraries distributed with PLT Scheme +or installed on your system. @link["http://planet.plt-scheme.org/"]{@|PLaneT|} offers even more downloadable packages contributed by PLT Scheme users. diff --git a/collects/scribblings/guide/info.ss b/collects/scribblings/guide/info.ss index dff8a349e7..d455aa7613 100644 --- a/collects/scribblings/guide/info.ss +++ b/collects/scribblings/guide/info.ss @@ -1,3 +1,4 @@ (module info setup/infotab (define name "Scribblings: Guide") - (define scribblings '(("guide.scrbl" (multi-page main-doc))))) + (define scribblings '(("guide.scrbl" (multi-page main-doc)))) + (define doc-categories '(getting-started))) diff --git a/collects/scribblings/honu/info.ss b/collects/scribblings/honu/info.ss index d589b0fe77..9f793c2f95 100644 --- a/collects/scribblings/honu/info.ss +++ b/collects/scribblings/honu/info.ss @@ -1,4 +1,5 @@ (module info setup/infotab (define name "Scribblings: Honu") - (define scribblings '(("honu.scrbl" (multi-page main-doc))))) + (define scribblings '(("honu.scrbl" (multi-page main-doc)))) + (define doc-categories '(other))) diff --git a/collects/scribblings/htdp-langs/htdp-langs.scrbl b/collects/scribblings/htdp-langs/htdp-langs.scrbl index 7bd53fba72..9b53ec6ebb 100644 --- a/collects/scribblings/htdp-langs/htdp-langs.scrbl +++ b/collects/scribblings/htdp-langs/htdp-langs.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "common.ss") -@title{Languages for @italic{How to Design Programs}} +@title{@italic{How to Design Programs} Languages} @table-of-contents[] diff --git a/collects/scribblings/htdp-langs/info.ss b/collects/scribblings/htdp-langs/info.ss index 01ae30e288..2c070a627b 100644 --- a/collects/scribblings/htdp-langs/info.ss +++ b/collects/scribblings/htdp-langs/info.ss @@ -1,4 +1,4 @@ (module info setup/infotab (define name "Scribblings: HtDP Languages") - (define scribblings '(("htdp-langs.scrbl" (multi-page main-doc))))) - + (define scribblings '(("htdp-langs.scrbl" (multi-page main-doc)))) + (define doc-categories '((language -1)))) \ No newline at end of file diff --git a/collects/scribblings/inside/info.ss b/collects/scribblings/inside/info.ss index 257f42b406..1b4dc57e44 100644 --- a/collects/scribblings/inside/info.ss +++ b/collects/scribblings/inside/info.ss @@ -1,3 +1,4 @@ (module info setup/infotab (define name "Scribblings: Inside PLT Scheme") - (define scribblings '(("inside.scrbl" (multi-page main-doc))))) + (define scribblings '(("inside.scrbl" (multi-page main-doc)))) + (define doc-categories '(foreign))) diff --git a/collects/scribblings/inside/inside.scrbl b/collects/scribblings/inside/inside.scrbl index f391dc3fea..6fb7bf0c09 100644 --- a/collects/scribblings/inside/inside.scrbl +++ b/collects/scribblings/inside/inside.scrbl @@ -10,10 +10,9 @@ embedded within an arbitrary C/C++ program. The manual assumes familiarity with PLT Scheme as described in @|MzScheme|. For an alternative way of dealing with foreign code, see -@italic{@secref[#:doc '(lib "scribblings/foreign/foreign.scrbl") -"top"]}, which describes the @schememodname[scheme/foreign] module for -manipulating low-level libraries and structures purely through Scheme -code. +@other-manual['(lib "scribblings/foreign/foreign.scrbl")], which +describes the @schememodname[scheme/foreign] module for manipulating +low-level libraries and structures purely through Scheme code. @table-of-contents[] diff --git a/collects/scribblings/inside/utils.ss b/collects/scribblings/inside/utils.ss index 623d199e8d..cc28c6f25c 100644 --- a/collects/scribblings/inside/utils.ss +++ b/collects/scribblings/inside/utils.ss @@ -157,7 +157,7 @@ (secref #:doc '(lib "scribblings/reference/reference.scrbl") s)) (define MzScheme - (italic (refsecref "top"))) + (other-manual '(lib "scribblings/reference/reference.scrbl"))) (define (FormatD s) (litchar (string-append "%" s))) diff --git a/collects/scribblings/quick/info.ss b/collects/scribblings/quick/info.ss index 29433b1ada..f084b83105 100644 --- a/collects/scribblings/quick/info.ss +++ b/collects/scribblings/quick/info.ss @@ -1,3 +1,4 @@ (module info setup/infotab (define name "Scribblings: Quick") - (define scribblings '(("quick.scrbl" (main-doc))))) + (define scribblings '(("quick.scrbl" (main-doc)))) + (define doc-categories '((getting-started 1)))) diff --git a/collects/scribblings/quick/quick.scrbl b/collects/scribblings/quick/quick.scrbl index 9b00f87537..3377137f86 100644 --- a/collects/scribblings/quick/quick.scrbl +++ b/collects/scribblings/quick/quick.scrbl @@ -1,7 +1,6 @@ #lang scribble/doc -@title[#:tag-prefix '(lib "quick.scrbl" "scribblings/quick") - #:tag "top"]{@bold{Quick}: An Introduction to PLT Scheme with Pictures} +@title{@bold{Quick}: An Introduction to PLT Scheme with Pictures} @; ---------------------------------------------------------------------- @@ -576,5 +575,5 @@ way that Scheme is often described---PLT Scheme offers a rich language with an extensive set of libraries and tools. To start learning about the full PLT Scheme language and tools in -depth, move on to @italic[@secref[#:doc '(lib "guide.scrbl" - "scribblings/guide") "top"]]. +depth, move on to @other-manual['(lib "guide.scrbl" +"scribblings/guide")]. diff --git a/collects/scribblings/reference/eval.scrbl b/collects/scribblings/reference/eval.scrbl index cdd1f077ed..fbca117742 100644 --- a/collects/scribblings/reference/eval.scrbl +++ b/collects/scribblings/reference/eval.scrbl @@ -184,8 +184,8 @@ An @tech{extension-load handler} takes the same arguments as a @deftech{dynamic extension}, typically with the file suffix @filepath{.so} (Unix), @filepath{.dll} (Windows), or @filepath{.dylib} (Mac OS X). The file is loaded using internal, OS-specific -primitives. See @italic{@secref[#:doc '(lib -"scribblings/inside/inside.scrbl") "top"]} for more information on +primitives. See @other-manual['(lib +"scribblings/inside/inside.scrbl")] for more information on @tech{dynamic extensions}.} diff --git a/collects/scribblings/reference/info.ss b/collects/scribblings/reference/info.ss index d922da8d20..b65237b20f 100644 --- a/collects/scribblings/reference/info.ss +++ b/collects/scribblings/reference/info.ss @@ -1,4 +1,5 @@ (module info setup/infotab (define name "Scribblings: Reference") - (define scribblings '(("reference.scrbl" (multi-page main-doc))))) + (define scribblings '(("reference.scrbl" (multi-page main-doc)))) + (define doc-categories '(language))) diff --git a/collects/scribblings/reference/mz.ss b/collects/scribblings/reference/mz.ss index 862b8125d0..42e7f08dc0 100644 --- a/collects/scribblings/reference/mz.ss +++ b/collects/scribblings/reference/mz.ss @@ -74,9 +74,8 @@ (list "."))))) (define Guide - (italic (guidesecref "top"))) + (other-manual '(lib "scribblings/guide/guide.scrbl"))) (define HonuManual - (secref #:doc '(lib "scribblings/honu/honu.scrbl") "top"))) - + (other-manual '(lib "scribblings/honu/honu.scrbl")))) diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 34ef4bc855..18c8b95b90 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -1,6 +1,9 @@ #lang scribble/doc -@require["mz.ss" - scheme/math] +@(require "mz.ss" + scheme/math) + +@(define math-eval (make-base-eval)) +@interaction-eval[#:eval math-eval (require scheme/math)] @title[#:tag "numbers"]{Numbers} @@ -809,6 +812,7 @@ Returns the sign of @scheme[x] as either @math{-1}, @math{0}, or @math{1}. @examples[ +#:eval math-eval (sgn 10) (sgn -10.0) (sgn 0) @@ -819,6 +823,7 @@ Returns the sign of @scheme[x] as either @math{-1}, @math{0}, or Returns the complex conjugate of @scheme[z]. @examples[ +#:eval math-eval (conjugate 1) (conjugate 3+4i) ]} diff --git a/collects/scribblings/reference/reference.scrbl b/collects/scribblings/reference/reference.scrbl index 43b5bd4379..2ce72aeae9 100644 --- a/collects/scribblings/reference/reference.scrbl +++ b/collects/scribblings/reference/reference.scrbl @@ -1,8 +1,7 @@ #lang scribble/doc @require["mz.ss"] -@title[#:tag-prefix '(lib "scribblings/reference/reference.scrbl") - #:tag "top"]{@bold{Reference}: PLT Scheme} +@title{@bold{Reference}: PLT Scheme} This manual defines the core PLT Scheme language and describes its most prominent libraries. The companion manual @|Guide| provides a diff --git a/collects/scribblings/reference/syntax.scrbl b/collects/scribblings/reference/syntax.scrbl index 4916d89453..6e436195c9 100644 --- a/collects/scribblings/reference/syntax.scrbl +++ b/collects/scribblings/reference/syntax.scrbl @@ -142,9 +142,8 @@ Produces an opaque value representing the location of @scheme[id], which must be bound as a @tech{top-level variable} or @tech{module-level variable}. -The result is useful to low-level extensions; see -@italic{@secref[#:doc '(lib "scribblings/inside/inside.scrbl") -"top"]}. It can also be used with +The result is useful to low-level extensions; see @other-manual['(lib +"scribblings/inside/inside.scrbl")]. It can also be used with @scheme[variable-reference->empty-namespace], @scheme[variable-reference->resolved-module-path], and @scheme[variable-reference->top-level-namespace], but facilities like diff --git a/collects/scribblings/scribble/how-to.scrbl b/collects/scribblings/scribble/how-to.scrbl index afcdbd0536..cee2c9a939 100644 --- a/collects/scribblings/scribble/how-to.scrbl +++ b/collects/scribblings/scribble/how-to.scrbl @@ -19,8 +19,10 @@ To document a collection or @|PLaneT| package: @itemize{ @item{Create a file in your collection or planet package with the - file extension @filepath{.scrbl}. The remainder of these - instructions assume that the file is called @filepath{manual.scrbl}.} + file extension @filepath{.scrbl}. Beware that the file name you + choose will determine the output directory's name. The + remainder of these instructions assume that the file is called + @filepath{manual.scrbl}.} @item{Start @filepath{manual.scrbl} like this: @verbatim[#<string a renderer part resolve-info) - (element->string b renderer part resolve-info))))) - (map line ending-ones)))))) + (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)) + (map + cdr + (sort + (map (lambda (doc) (cons (cadr doc) + (line (caddr doc)))) + docs) + (lambda (ad bd) + (let ([a (cadr (paragraph-content (car (flow-paragraphs (cadr ad)))))] + [b (cadr (paragraph-content (car (flow-paragraphs (cadr bd)))))]) + (if (= (car ad) (car bd)) + (begin + (string-cistring a renderer part resolve-info) + (element->string b renderer part resolve-info))) + (> (car ad) (car bd)))))))))) + sections))))))) ] diff --git a/collects/scribblings/tools/info.ss b/collects/scribblings/tools/info.ss index 1d18fd537b..677b128170 100644 --- a/collects/scribblings/tools/info.ss +++ b/collects/scribblings/tools/info.ss @@ -1,3 +1,4 @@ (module info setup/infotab (define name "Scribblings: Tools") - (define scribblings '(("tools.scrbl" (multi-page main-doc))))) + (define scribblings '(("tools.scrbl" (multi-page main-doc)))) + (define doc-categories '(other))) diff --git a/collects/scribblings/tools/tools.scrbl b/collects/scribblings/tools/tools.scrbl index 4829f81fa2..0764449a82 100644 --- a/collects/scribblings/tools/tools.scrbl +++ b/collects/scribblings/tools/tools.scrbl @@ -18,11 +18,11 @@ This manual describes DrScheme's tools interface. It assumes familiarity with PLT Scheme, as described in -@(secref #:doc '(lib "scribblings/guide/guide.scrbl") "top"), +@(other-manual '(lib "scribblings/guide/guide.scrbl")), DrScheme, as described in -@(secref #:doc '(lib "drscheme/drscheme.scrbl") "top"), +@(other-manual '(lib "drscheme/drscheme.scrbl")), and the Framework, as described in -@(secref #:doc '(lib "framework/framework.scrbl") "top"). +@(other-manual '(lib "framework/framework.scrbl")). @section{Thanks} diff --git a/collects/setup/scribble.ss b/collects/setup/scribble.ss index f92417d976..a00c3413b2 100644 --- a/collects/setup/scribble.ss +++ b/collects/setup/scribble.ss @@ -40,7 +40,8 @@ (and (and (list? (cadr v)) (andmap (lambda (i) (member i '(main-doc - multi-page))) + multi-page + always-run))) (cadr v))) (or (null? (cddr v)) (and (path-string? (caddr v)) @@ -58,9 +59,10 @@ (cadr d) (let-values ([(base name dir?) (split-path (car d))]) (path-replace-suffix name #"")))]) - (if (memq 'main-doc flags) + (if (or (memq 'main-doc flags) + (pair? (path->main-collects-relative dir))) (build-path (find-doc-dir) name) - (build-path dir "compiled" "doc" name))) + (build-path dir "doc" name))) flags))) s) (begin @@ -303,7 +305,9 @@ (list-ref v-in 3) ; searches (map string->path (list-ref v-in 2)) ; deps, in case we don't need to build... can-run? - my-time info-out-time #f + my-time info-out-time + (and can-run? + (memq 'always-run (doc-flags doc))) #f #f vers #f))) diff --git a/collects/trace/scribblings/trace.scrbl b/collects/trace/scribblings/trace.scrbl index bc90e40d43..cf22c652a6 100644 --- a/collects/trace/scribblings/trace.scrbl +++ b/collects/trace/scribblings/trace.scrbl @@ -4,7 +4,7 @@ (for-label scheme trace/calltrace-lib)] -@title[#:tag "top"]{@bold{Calltrace}} +@title[#:tag "top"]{@bold{Trace}: Instrumentation to Show Function Calls} @bold{Calltrace} is a tool that displays all calls to user procedures. It displays the arguments to the calls, and it indents to show the diff --git a/collects/web-server/info.ss b/collects/web-server/info.ss index d6de0ac442..d6a2feae9c 100644 --- a/collects/web-server/info.ss +++ b/collects/web-server/info.ss @@ -1,6 +1,7 @@ (module info setup/infotab (define name "Web Server") (define scribblings '(("scribblings/web-server.scrbl" (multi-page main-doc)))) + (define doc-categories '(tool)) (define mzscheme-launcher-libraries (list "main.ss")) diff --git a/src/mzscheme/src/string.c b/src/mzscheme/src/string.c index f1de0c2775..1df69826cd 100644 --- a/src/mzscheme/src/string.c +++ b/src/mzscheme/src/string.c @@ -175,6 +175,10 @@ static char *nl_langinfo(int which) if (!current_locale_name) current_locale_name = (mzchar *)"\0\0\0\0"; + if ((current_local_name[0] = 'C') + && !current_local_name[1]) + return "US-ASCII"; + for (i = 0; current_locale_name[i]; i++) { if (current_locale_name[i] == '.') { if (current_locale_name[i + 1]) { @@ -196,9 +200,12 @@ static char *nl_langinfo(int which) return "UTF-8"; } -# define mz_iconv_nl_langinfo() nl_langinfo(0) -#else +#endif + +#ifdef DONT_USE_LOCALE # define mz_iconv_nl_langinfo() "" +#else +# define mz_iconv_nl_langinfo() nl_langinfo(0) #endif static const char * const STRING_IS_NOT_UTF_8 = "string is not a well-formed UTF-8 encoding: ";